Protocol Builder
/* Theme product title hidden; the page carries its own h1. Same rule as the prior product pages. */ .product__title,.product-single__title,h1.product__title{display:none !importan t} .pt-smin-section{display:none !important} /* Everything below is scoped to .ptp so the theme and the subscription widget above are untouched. */ .ptp{--bg:#1a1a18;--bg2:#222220;--cream:#e8e0d0;--cream2:#bfb8a8;--muted:#a49d90;--muted2:#8a8478;--gold:#b8a882;--border:rgba(184,168,130,0.2);--border2:rgba(184,168,130,0.28);--card:rgba(255,255,255,0.04);--cardh:rgba(184,168,130,0.09); max-width:760px;margin:0 auto;padding:8px 0 48px;font-family:'Jost',sans-serif;font-weight:300;font-size:.92rem;line-height:1.7;color:var(--cream2);-webkit-font-smoothing:antialiased} .ptp *,.ptp *::before,.ptp *::after{box-sizing:border-box;margin:0;padding:0} .ptp a{color:inherit;text-decoration:none} .ptp p{margin:0 0 14px;color:var(--cream2)} .ptp p:last-child{margin-bottom:0} /* Section header: small uppercase label with a hairline, from the homepage. */ .ptp .pt-sec{display:flex;align-items:center;gap:10px;margin:34px 0 10px} .ptp .pt-sec-text{font-size:.62rem;font-weight:500;letter-spacing:.22em;text-transform:uppercase;color:var(--cream2);white-space:nowrap} .ptp .pt-sec-line{flex:1;height:1px;background:var(--border)} .ptp .pt-sec-lead{font-family:'Cormorant Garamond',serif;font-size:1.35rem;font-weight:500;line-height:1.25;color:var(--cream);margin:0 0 12px} /* Card shell: #222220, 4px radius, 2px gold gradient line across the top. */ .ptp .pt-block{display:block;position:relative;overflow:hidden;background:var(--bg2);border:1px solid var(--border2);border-radius:4px;padding:22px 20px 20px;color:var(--cream)} .ptp .pt-block::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.5} .ptp .pt-block--wide{border-color:rgba(184,168,130,.5);background:linear-gradient(180deg,rgba(184,168,130,0.07),var(--bg2))} .ptp .pt-block-tag{font-size:.6rem;font-weight:500;letter-spacing:.26em;text-transform:uppercase;color:var(--gold);margin-bottom:8px} /* Hero */ .ptp .pt-hero{padding:4px 0 0} .ptp .pt-eyebrow{font-size:.6rem;font-weight:500;letter-spacing:.26em;text-transform:uppercase;color:var(--gold);margin-bottom:12px} .ptp h1.pt-h1{font-family:'Cormorant Garamond',serif;font-size:clamp(1.7rem,3.4vw,2.3rem);font-weight:500;line-height:1.18;color:var(--cream);margin:0 0 14px;display:block !important} .ptp .pt-who{font-size:.9rem;font-weight:300;color:var(--cream2);line-height:1.7;max-width:620px;margin-bottom:14px} .ptp .pt-sub-note{display:flex;align-items:center;gap:10px;font-size:.72rem;font-weight:400;letter-spacing:.04em;color:var(--cream2);padding:12px 14px;background:rgba(184,168,130,0.06);border:1px solid rgba(184,168,130,0.18);border-radius:4px;max-width:560px} .ptp .pt-sub-note svg{flex-shrink:0;color:var(--gold)} .ptp .pt-sub-note strong{color:var(--cream);font-weight:500} /* Example block */ .ptp .pt-ex{margin-top:16px} .ptp .pt-ex-head{display:flex;align-items:center;gap:8px;margin-bottom:14px} .ptp .pt-ex-dot{width:5px;height:5px;border-radius:50%;background:var(--gold);flex-shrink:0} .ptp .pt-ex-label{font-size:.58rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--muted2)} .ptp .pt-ex-q{font-size:.86rem;color:var(--cream2);font-style:italic;margin-bottom:10px;line-height:1.55} .ptp .pt-ex-a{font-size:.86rem;color:var(--cream);line-height:1.7} .ptp .pt-ex-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px} .ptp .pt-ex-grid--4{grid-template-columns:repeat(4,1fr)} .ptp .pt-ex-panel{padding:14px 13px;background:var(--card);border:1px solid rgba(184,168,130,0.18);border-radius:4px} .ptp .pt-ex-panel-name{font-size:.58rem;font-weight:500;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid rgba(184,168,130,0.15)} .ptp .pt-ex-panel .pt-ex-q,.ptp .pt-ex-panel .pt-ex-a{font-size:.78rem} .ptp .pt-row{margin-bottom:10px} .ptp .pt-row-name{font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted2);margin-bottom:4px} .ptp .pt-track{background:rgba(184,168,130,0.08);border-radius:2px;height:7px;overflow:hidden} .ptp .pt-bar{height:100%;border-radius:2px;background:linear-gradient(90deg,var(--gold),rgba(184,168,130,0.4))} .ptp .pt-flag{margin-top:12px;padding:10px 12px;background:rgba(184,168,130,0.06);border:1px solid var(--border);border-radius:3px;font-size:.8rem;color:var(--cream2);line-height:1.55} .ptp .pt-flag strong{color:var(--cream);font-weight:500} .ptp .pt-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 0;border-bottom:1px solid rgba(184,168,130,0.12)} .ptp .pt-line:last-child{border-bottom:none} .ptp .pt-line-l{font-size:.62rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted2);white-space:nowrap} .ptp .pt-line-v{font-size:.84rem;color:var(--cream);text-align:right} .ptp .pt-ex-panel .pt-line-v{font-size:.76rem} .ptp .pt-ex-cap{font-size:.72rem;color:var(--muted2);font-style:italic;margin-top:14px;line-height:1.5;text-align:center} .ptp .pt-guide-list{display:grid;grid-template-columns:1fr 1fr;gap:8px} .ptp .pt-guide{display:block;padding:14px 14px 12px;background:var(--card);border:1px solid var(--border);border-radius:4px;transition:background .15s,border-color .15s} .ptp .pt-guide:hover{background:var(--cardh);border-color:rgba(184,168,130,.35)} .ptp .pt-guide-t{font-family:'Cormorant Garamond',serif;font-size:1.05rem;font-weight:500;line-height:1.2;color:var(--cream);margin-bottom:5px} .ptp .pt-guide-d{font-size:.72rem;color:var(--cream2);line-height:1.5} .ptp .pt-guide-go{font-size:.6rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-top:8px} /* Member state under the example (script driven) */ .ptp .pt-upgrade{display:none;margin-top:16px;text-align:center} .ptp .pt-upgrade.active{display:block} .ptp .pt-upgrade-text{font-size:.8rem;color:var(--cream2);line-height:1.55;margin-bottom:6px} .ptp .pt-upgrade-note{font-size:.66rem;color:var(--muted2)} .ptp .pt-nudge{display:none;margin-top:16px;padding:14px 16px;background:rgba(184,168,130,0.06);border:1px solid rgba(184,168,130,0.22);border-radius:4px} .ptp .pt-nudge.active{display:block} .ptp .pt-nudge-label{font-size:.58rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:6px} .ptp .pt-nudge-text{font-size:.8rem;color:var(--cream2);line-height:1.5;margin-bottom:10px} .ptp .pt-nudge-links{display:flex;flex-wrap:wrap;gap:8px} .ptp .pt-btn{display:inline-block;text-align:center;padding:10px 20px;background:var(--cream);color:var(--bg);font-family:'Jost',sans-serif;font-size:.68rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;border-radius:50px;text-decoration:none;transition:background .15s} .ptp .pt-btn:hover{background:var(--gold)} .ptp .pt-btn--ghost{background:transparent;color:var(--gold);border:1px solid var(--border2)} .ptp .pt-btn--ghost:hover{background:rgba(184,168,130,0.1);color:var(--cream)} /* Problem copy */ .ptp .pt-prose{max-width:640px} .ptp .pt-prose p{font-size:.92rem} /* Free vs member */ .ptp .pt-cmp{display:grid;grid-template-columns:1fr 1fr;gap:8px} .ptp .pt-cmp-col{padding:18px 18px 16px;background:var(--card);border:1px solid var(--border);border-radius:4px} .ptp .pt-cmp-col.member{background:var(--bg2);border-color:rgba(184,168,130,.5);position:relative;overflow:hidden} .ptp .pt-cmp-col.member::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.6} .ptp .pt-cmp-head{font-size:.6rem;font-weight:500;letter-spacing:.24em;text-transform:uppercase;color:var(--gold);margin-bottom:12px} .ptp .pt-cmp-item{font-size:.82rem;line-height:1.55;padding:6px 0 6px 14px;position:relative;color:var(--cream)} .ptp .pt-cmp-item::before{content:'';position:absolute;left:0;top:14px;width:4px;height:4px;border-radius:50%;background:var(--gold);opacity:.7} .ptp .pt-cmp-item.no{color:var(--muted2)} .ptp .pt-cmp-item.no::before{background:var(--muted2);opacity:.5} /* Phase 19: rows that are true only on the account path (19.16 d). The script marks the root live. */ .ptp .pt-live-only{display:none} .ptp.pt-live .pt-live-only{display:block} .ptp .pt-cmp-note{font-size:.76rem;color:var(--muted2);margin-top:10px;line-height:1.55} /* How it works */ .ptp .pt-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px} .ptp .pt-step{padding:18px 16px 16px;background:var(--card);border:1px solid var(--border);border-radius:4px} .ptp .pt-step-n{font-family:'Cormorant Garamond',serif;font-size:1.6rem;line-height:1;color:var(--gold);margin-bottom:8px} .ptp .pt-step-t{font-family:'Cormorant Garamond',serif;font-size:1.1rem;font-weight:500;line-height:1.2;color:var(--cream);margin-bottom:6px} .ptp .pt-step-b{font-size:.78rem;color:var(--cream2);line-height:1.55} /* Pricing ladder: homepage membership rows */ .ptp .pt-mem-intro{font-size:.84rem;color:var(--cream2);line-height:1.6;margin:0 0 12px} .ptp .pt-mem-list{display:flex;flex-direction:column;gap:6px} .ptp .pt-mem-row{display:block;padding:14px 16px;background:var(--bg2);border:1px solid var(--border2);border-radius:4px;color:var(--cream);transition:background .15s} .ptp a.pt-mem-row:hover{background:rgba(184,168,130,0.06)} .ptp .pt-mem-row--wide{border-color:rgba(184,168,130,.5);background:linear-gradient(180deg,rgba(184,168,130,0.07),var(--bg2))} .ptp .pt-mem-row--current{border-left:2px solid var(--gold);background:rgba(184,168,130,0.05)} .ptp .pt-mem-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:4px} .ptp .pt-mem-name{font-family:'Cormorant Garamond',serif;font-size:1.08rem;font-weight:500;color:var(--cream);line-height:1.2} .ptp .pt-mem-price{font-size:.64rem;font-weight:400;letter-spacing:.08em;color:var(--gold);white-space:nowrap} .ptp .pt-mem-desc{font-size:.74rem;color:var(--cream2);line-height:1.55} .ptp .pt-mem-flag{display:inline-block;margin-top:6px;font-size:.58rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)} .ptp .pt-mem-math{font-size:.78rem;color:var(--muted2);line-height:1.6;margin-top:12px} /* FAQ */ .ptp .pt-faq details{background:var(--card);border:1px solid var(--border);border-radius:4px;margin-bottom:6px;padding:0 16px} .ptp .pt-faq summary{cursor:pointer;list-style:none;padding:14px 0;font-family:'Cormorant Garamond',serif;font-size:1.08rem;font-weight:500;color:var(--cream);line-height:1.25;display:flex;justify-content:space-between;gap:12px;align-items:center} .ptp .pt-faq summary::-webkit-details-marker{display:none} .ptp .pt-faq summary::after{content:'+';color:var(--gold);font-family:'Jost',sans-serif;font-size:1rem;flex-shrink:0} .ptp .pt-faq details[open] summary::after{content:'\2212'} .ptp .pt-faq .pt-faq-a{padding:0 0 14px;font-size:.84rem;color:var(--cream2);line-height:1.65} .ptp .pt-faq .pt-faq-a a{color:var(--gold);text-decoration:underline;text-underline-offset:3px} /* Your Research line and disclaimer */ .ptp .pt-yr{margin-top:26px;font-size:.82rem;color:var(--cream2);line-height:1.65;max-width:640px} .ptp .pt-yr a{color:var(--gold);text-decoration:underline;text-underline-offset:3px} .ptp .pt-disclaimer{font-size:.6rem;color:var(--muted2);text-align:center;margin-top:28px;line-height:1.5;opacity:.75} @media(max-width:700px){ .ptp .pt-ex-grid--4{grid-template-columns:1fr 1fr} .ptp .pt-steps{grid-template-columns:1fr} } @media(max-width:560px){ .ptp{padding:4px 0 40px;font-size:.9rem} .ptp .pt-ex-grid,.ptp .pt-ex-grid--4,.ptp .pt-cmp,.ptp .pt-guide-list{grid-template-columns:1fr} .ptp .pt-block{padding:20px 16px 18px} .ptp h1.pt-h1{font-size:1.65rem} .ptp .pt-mem-top{flex-direction:column;gap:2px} } { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [ { "@type": "Question", "name": "What is free in the Protocol Builder?", "acceptedAnswer": { "@type": "Answer", "text": "The general framework for your goal, the foundation flags, and the first full compound layer, with the deeper layers locked. One email opens it. You can save the free result to Your Research." } }, { "@type": "Question", "name": "What does the $39.99 subscription add?", "acceptedAnswer": { "@type": "Answer", "text": "Every compound layer with the reasoning and the research range, the week by week titration calendar, the reconstitution math per compound, the receptor and interaction map, the if it stalls path, the 12 week review, and saved protocols that show what changed since your last build." } }, { "@type": "Question", "name": "Does this include the Bloodwork Interpreter?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, at no extra cost. Anyone can enter their lab results and read each marker on its own. This plan adds the in depth read of how those markers connect against your own numbers, what is missing and why, and what moved from one draw to the next, all saved to Your Research." } }, { "@type": "Question", "name": "Does this include Your Baseline history?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, at no extra cost. Anyone with a free account can save their numbers in Your Baseline, and the latest ones fill in every tool. This plan adds your saved check-in history, trend lines and research start markers, and tool reads that take your history into account." } }, { "@type": "Question", "name": "Does the Protocol Builder include the Guides Library?", "acceptedAnswer": { "@type": "Answer", "text": "Yes. A Builder subscription opens all seven paid guides in the Guides Library, which is $19.99 a month on its own. It also unlocks the Protocol Check member layer: the full sequenced correction plan, result history and trend, and a receptor map for your declared stack." } }, { "@type": "Question", "name": "Which email unlocks it?", "acceptedAnswer": { "@type": "Answer", "text": "The email you use at checkout. Enter the same address in the Builder, the Protocol Check, and any guide, and the gate reads the subscription. One email, nothing else to activate." } }, { "@type": "Question", "name": "Can I cancel?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, anytime, from the Manage Subscription page. Month to month. Full Access is the only annual plan." } }, { "@type": "Question", "name": "Should I get bloodwork before I build the protocol?", "acceptedAnswer": { "@type": "Answer", "text": "The Builder asks about your baseline panel, and research practice treats a baseline as the reference every later read is measured against. The free Bloodwork Diagnostic Tool builds that panel from your goals and symptoms, with the reason each marker is on it, to take to a doctor." } } ] } Research Compound Tool A complete research protocol, layered and sequenced, laid out week by week before you run it. For a researcher starting a protocol, or rebuilding one that is not producing the result the data says to expect, who wants the whole thing in order instead of a list of compounds. The Subscribe button is above this page. $39.99 a month. Cancel anytime. Includes the Protocol Check member layer, the full Guides Library and the full Bloodwork Interpreter. Example build, member view The framework GoalFat loss, lean mass protected Foundation checkSleep, protein, stimulant load, stress Layer 1GLP-1 class, with the research range Layer 2Growth hormone peptide, sequenced after Conflict mapNo shared receptor. Fasted window flagged. The calendar Weeks 1 to 4Base step, hold and read Week 5First review point If it stallsAdjustment path, one variable at a time Week 12Full review against the baseline ReconstitutionUnits per compound, preloaded Example shape only. The compounds, the layers, and the calendar are generated from your goal and your answers, in the research register. The free Builder returns the framework, the foundation flags, and the first full compound layer. Membership opens every layer, the week by week calendar, the reconstitution math, the receptor map, the if it stalls path, the 12 week review, and saved protocols. It also unlocks the Protocol Check member layer and the full Guides Library. Subscribe above to unlock it. You already have access Your subscription covers the Protocol Builder, the Protocol Check member layer, and the full Guides Library. Open the Protocol BuilderOpen the Protocol CheckOpen the Guides Library The problem it solves Most protocols are assembled one compound at a time from forum posts, and the order, the timing, and the interactions never get checked against each other. The Protocol Builder starts from your goal and your situation, runs the foundation check first, assigns compound layers in the order research supports, maps the conflicts, and lays the whole thing out on a week by week calendar with the reconstitution math beside each compound. The research range sits next to every layer, framed as what studies have used, so you can see the reasoning rather than a number. What membership adds The free Builder is the proof. The paid layer is the whole protocol. Free The general framework for your goal The foundation flags The first full compound layer Save the free result to Your Research Bloodwork Interpreter: every marker on your lab report, read on its own The deeper compound layers Week by week titration calendar Reconstitution math per compound Receptor and interaction map If it stalls path and 12 week review Saved protocols with what changed How your markers connect, what is missing and why, what moved between draws Member Every compound layer with the reasoning and the research range Week by week titration calendar per compound Reconstitution math per compound, preloaded Receptor and interaction map across the whole protocol The if it stalls adjustment path and the 12 week review Saved protocols with what changed since your last build Bloodwork Interpreter in full: how your markers connect against your own numbers, what is missing and why, next steps, and what moved since your last draw The Protocol Check member layer: the full sequenced correction plan, result history and trend, and a receptor map for your declared stack The full Guides Library, all seven paid guides Everything in Your Research opens Your saved protocol opens and prints from Your Research. There is no download button inside the tool. How it works 1 Answer a short questionnaire Goal, current position, the specific problems, sex, age, and what you already run. About the length of a form, not an intake. 2 The foundation check runs first Sleep, protein, stimulant load, and stress are read before any compound is placed, because research suggests no compound layer produces a clean result on a foundation that fails. 3 The protocol builds in layers Compound layers in the order research supports, the conflict map, the calendar, and the reconstitution math, with the if it stalls path and the 12 week review already in place. Save it and it waits in Your Research. Pricing Monthly on its own, or included in the year. Six products, sold separately, so you only pay for the part you are stuck on. Every row below opens that product. Research Search Engine$5.99 / month Ask anything about a protocol and get a research grounded answer in seconds. Unlimited questions, threaded follow up, saved history, and answer export. Includes the full Bloodwork Interpreter. Includes Your Baseline history and trends. Stack Calculator$12.99 / month Units to draw and water to add, free for everyone. Members put up to 8 compounds on one timeline and see where half-lives overlap and where the timing needs to move. Search + Calculator Bundle$15.99 / month Both tools on one subscription. On their own they are $5.99 and $12.99 a month, so the bundle is $2.99 a month less. Includes the full Bloodwork Interpreter. Includes Your Baseline history and trends. Protocol Builder$39.99 / month The full layered protocol with a week by week titration calendar, the reconstitution math, the receptor map, and the if it stalls path. Includes the Protocol Check member layer and the full Guides Library. Includes the full Bloodwork Interpreter. Includes Your Baseline history and trends. This page. Subscribe above Guides Library$19.99 / month Seven research guides on protocol design, sequencing, stacking, and dose logic. Included with the Protocol Builder and with Full Access. Full Access Membership$199.99 / year All three tools plus the full Guides Library on one subscription. Bought separately for a year the four come to $947.52. The only annual plan. Includes the full Bloodwork Interpreter. Includes Your Baseline history and trends. The math, run plainly. A year of the Builder at $39.99 is $479.88. Full Access is $199.99 for the same year, $279.89 less, and it adds the Research Search Engine and the Stack Calculator. The Guides Library is included here either way. Most people build the protocol in the first week and then live with it for twelve, which is the stretch the annual is built for. Questions What is free in the Protocol Builder?The general framework for your goal, the foundation flags, and the first full compound layer, with the deeper layers locked. One email opens it. You can save the free result to Your Research.What does the $39.99 subscription add?Every compound layer with the reasoning and the research range, the week by week titration calendar, the reconstitution math per compound, the receptor and interaction map, the if it stalls path, the 12 week review, and saved protocols that show what changed since your last build.Does this include the Bloodwork Interpreter?Yes, at no extra cost. Anyone can enter their lab results and read each marker on its own. This plan adds the in depth read of how those markers connect against your own numbers, what is missing and why, and what moved from one draw to the next, all saved to Your Research. Does this include Your Baseline history?Yes, at no extra cost. Anyone with a free account can save their numbers in Your Baseline, and the latest ones fill in every tool. This plan adds your saved check-in history, trend lines and research start markers, and tool reads that take your history into account.Does the Protocol Builder include the Guides Library?Yes. A Builder subscription opens all seven paid guides in the Guides Library, which is $19.99 a month on its own. It also unlocks the Protocol Check member layer: the full sequenced correction plan, result history and trend, and a receptor map for your declared stack.Which email unlocks it?The email you use at checkout. Enter the same address in the Builder, the Protocol Check, and any guide, and the gate reads the subscription. One email, nothing else to activate.Can I cancel?Yes, anytime, from the Manage Subscription page. Month to month. Full Access is the only annual plan.Should I get bloodwork before I build the protocol?The Builder asks about your baseline panel, and research practice treats a baseline as the reference every later read is measured against. The free Bloodwork Diagnostic Tool builds that panel from your goals and symptoms, with the reason each marker is on it, to take to a doctor. Your Research keeps everything you save from every tool in one place and opens all of it. Any active subscription opens every saved entry, so a result you ran before you subscribed is waiting when you come back. For educational and research purposes only. Not medical advice. Not for human use guidance. Project Theo (function() { 'use strict'; // Protocol Builder product page member state. Every member link is the plain tool page; the tools read the signed in account. // Phase 19 (P1): on the account path the page never reads storage. It waits for the theme helper // (window.ptAuth, snippet pt-auth), shows the upgrade note to a signed out visitor, and otherwise asks // the Worker with the session token in the Authorization header and no query. The tool links stay // plain. A 401 (token lapsed) or a network error shows the upgrade note, as the 1722 page did on any // failure; there is no retry. The 1722 email path is gone (2010_11_17): no storage read, no address keyed // check, and the member links stay the plain tool pages. var WORKER = 'https://pt-search.odd-snowflake-2e43.workers.dev'; var GRANTS = ["builder"]; var upgrade = document.getElementById('ptPreviewUpgrade'); var nudge = document.getElementById('ptPreviewNudge'); function showUpgrade() { if (upgrade) upgrade.classList.add('active'); } /* Phase 19: the account helper (theme snippet pt-auth). live is the cutover flag (R1). */ function ptAuthLive(){ try { return !!(window.ptAuth && window.ptAuth.live === true); } catch(e){ return false; } } function ptAuthReady(){ try { var r = window.ptAuth && window.ptAuth.ready; return (r && typeof r.then === 'function') ? r : Promise.resolve(null); } catch(e){ return Promise.resolve(null); } } function ptAuthToken(){ try { return Promise.resolve(window.ptAuth.getToken()).catch(function(){ return null; }); } catch(e){ return Promise.resolve(null); } } // 19.15: sentences that become true at the cutover. Visible text by data-pt-live, and the // same FAQ strings inside the FAQPage JSON-LD, swapped only when the account path is live. var LIVE_TEXT = { 'faq-free': 'A free Project Theo account opens it.', 'faq-account-q': 'Which account unlocks it?', 'faq-account-a': 'The account with the email you use at checkout. Log in with it in any tool and the subscription opens. If you check out with a different email, contact support and the grant moves.', }; var LIVE_JSON = [ ['One email opens it.', 'A free Project Theo account opens it.'], ['Which email unlocks it?', 'Which account unlocks it?'], ['The email you use at checkout. Enter the same address in the Builder, the Protocol Check, and any guide, and the gate reads the subscription. One email, nothing else to activate.', 'The account with the email you use at checkout. Log in with it in any tool and the subscription opens. If you check out with a different email, contact support and the grant moves.'], ]; function goLive(){ var root = document.querySelector('.ptp'); if (root) root.classList.add('pt-live'); var els = document.querySelectorAll('.ptp [data-pt-live]'); for (var i = 0; i < els.length; i++) { var t = LIVE_TEXT[els[i].getAttribute('data-pt-live')]; if (t) els[i].textContent = t; } var scripts = document.querySelectorAll('script[type="application/ld+json"]'); for (var j = 0; j < scripts.length; j++) { var s = scripts[j].textContent; if (s.indexOf('FAQPage') === -1) continue; for (var k = 0; k < LIVE_JSON.length; k++) s = s.split(LIVE_JSON[k][0]).join(LIVE_JSON[k][1]); try { JSON.parse(s); scripts[j].textContent = s; } catch(e) {} } } function render(d) { var tools = (d && Array.isArray(d.tools)) ? d.tools : []; var entitled = (d && d.tier === 'full') || GRANTS.every(function(t) { return tools.indexOf(t) !== -1; }); if (entitled && nudge) { nudge.classList.add('active'); } else { showUpgrade(); } } if (!ptAuthLive()) { showUpgrade(); return; } goLive(); ptAuthReady().then(function(user) { if (!user) { showUpgrade(); return null; } return ptAuthToken().then(function(token) { if (!token) { showUpgrade(); return null; } return fetch(WORKER + '/check-subscription', { headers: { 'Authorization': 'Bearer ' + token } }) .then(function(r) { return r.ok ? r.json() : null; }) .then(function(d) { render(d); }); }); }).catch(showUpgrade); })();