/* BioReveal — Reveal page (v0.9 — analysis-first). * * Renders the AI's REAL analysis of the patient. No raw biomarker numbers * displayed — the AI interpreted them and wrote the read. Same render path * for both Claude and rules-engine output (they share schema). */ const PEPTIDE_PRICES = { "Sermorelin": 179, "NAD+": 189, "BPC-157": 149, "Glutathione": 119, "Ipamorelin": 169, "GHK-Cu": 159, "Selank": 139, "DSIP": 129, "B12 / MIC": 99, "CJC-1295": 169, "TB-500": 219, "Tesamorelin": 199, "Epitalon": 149, "Semax": 149, "PT-141": 119, }; const StepAnalysis = ({ onStart, error, onRetry }) => { const lines = [ "Reading what you said you want fixed", "Cross-checking your health background", "Reading the bioscan", "Listening to what you said", "Picking the right peptides for you", "Writing your personal read", ]; const [i, setI] = React.useState(0); const startedRef = React.useRef(false); React.useEffect(() => { if (!startedRef.current) { startedRef.current = true; onStart(); } }, []); React.useEffect(() => { if (error || i >= lines.length) return; const t = setTimeout(() => setI(i + 1), 700); return () => clearTimeout(t); }, [i, error]); return (
{error ? "Synthesis paused" : "Writing your analysis"}
{!error && (
{lines.map((l, idx) => (
{l}
))}
)} {error && (
ERROR
{error}
)}
); }; // Map peptide name → URL slug for deep-page links const PEPTIDE_SLUG = { "Sermorelin": "sermorelin", "NAD+": "nad-plus", "BPC-157": "bpc-157", "Ipamorelin": "ipamorelin", "GHK-Cu": "ghk-cu", "Glutathione": "glutathione", "Selank": "selank", "DSIP": "dsip", "B12 / MIC": "b12-mic", "CJC-1295": "cjc-1295", }; const Reveal = ({ profile, onRestart }) => { const { protocol } = profile; const peptides = (protocol.recommended_protocol || []).map(p => ({ ...p, price: PEPTIDE_PRICES[p.name] || 159 })); const total = peptides.reduce((s, p) => s + p.price, 0); const engine = protocol._meta?.engine || "fallback"; const { MDReviewer, ComplianceStrip, Testimonials, PressStrip } = window.BR_TRUST || {}; const { ChatSidekick } = window.BR_CHAT || {}; // Split analysis paragraphs const analysisParas = (protocol.analysis || "").split(/\n\n+/).filter(Boolean); return (
{/* HERO — headline + engine tag */}
★ YOUR PERSONAL READ

{protocol.stack_name}

{protocol.headline}

{/* THE ANALYSIS — the new headline section */} {analysisParas.length > 0 && (
★ THE READ
{analysisParas.map((p, i) => (

$1") }}/> ))}

)} {/* PROTOCOL CARDS */} {peptides.length > 0 && (
★ THE PROTOCOL

What we'd recommend.

{peptides.length} peptide{peptides.length > 1 ? "s" : ""}, sequenced for your goals + signals. A licensed clinician reviews before anything ships.

{peptides.map((p, i) => (

{p.name}

{p.mechanism_short}

★ Why for you {p.match_reason}

Dose
{p.dose}
Week 1
{p.expected_week_1}
Week 12
{p.expected_week_12}
{(p.side_effects_likely?.length || p.contraindications?.length) ? (
{p.side_effects_likely?.length > 0 &&
SIDE EFFECTS · {p.side_effects_likely.join(" · ")}
} {p.contraindications?.length > 0 &&
⚠ AVOID IF · {p.contraindications.join(" · ")}
}
) : null}
${p.price}/mo
Read more →
))}
)} {/* LIFESTYLE PLAYS */} {protocol.lifestyle_plays?.length > 0 && (
★ FREE LEVERS

Lifestyle moves that compound the protocol.

These cost nothing and double the effect of every peptide we recommended.

{protocol.lifestyle_plays.map((l, i) => (
{String(i + 1).padStart(2, "0")}

{l.play}

{l.why}

))}
)} {/* WHAT TO WATCH */} {protocol.what_to_watch?.length > 0 && (
★ HOW YOU'LL KNOW IT'S WORKING

Track these week-to-week.

{protocol.what_to_watch.map((w, i) => (
Track
{w.signal}
If working
{w.if_improving}
If not
{w.if_not}
))}
)} {/* HONEST CAVEAT */} {protocol.if_im_being_honest && (
★ IF I'M BEING HONEST

{protocol.if_im_being_honest}

)} {/* MD REVIEW FLAGS */} {protocol.md_review_flags?.length > 0 && protocol.md_review_flags[0] !== "routine_review" && (
★ MD REVIEW FLAGS
{protocol.md_review_flags.map(f => ( ⚑ {f.replace(/_/g, " ")} ))}
)} {/* TRUST: MD reviewer */} {MDReviewer && } {/* TRUST: testimonials */} {Testimonials && } {/* TRUST: compliance + money-back */} {ComplianceStrip && } {/* TRUST: press */} {PressStrip && } {/* FINAL CTA */}

Book your $0 MD consult.

{peptides.length > 0 && (
Estimated stack · monthly ${total}/mo
)}
{protocol.disclaimer || "DRAFT — pending licensed clinician review."}
); }; Object.assign(window, { Reveal, StepAnalysis });