PageSourceSearch

https://peakhuman.ai/assets/PeakBriefSection-DsaQNUHx.js

js peakhuman.ai collected 2026-10-05 12:25:01 UTC 5,031 bytes, 1 lines download raw bytes

1import{b as e,nt as t,st as n,t as r}from"./router-compat-D23zHYye.js";import{t as i}from"./button-C5neQc3W.js";import{t as a}from"./arrow-right-DYOoTsFr.js";import{n as o}from"./client--SgM3Bpv.js";import{W as s}from"./index-taMkFv8a.js";import{t as c}from"./section-tag-KaegScBE.js";import{t as l}from"./input-DIu0FpNR.js";import{t as u}from"./checkbox-MZ-tCen8.js";import{n as d,r as f,t as p}from"./types-CkUG6iuP.js";var m=n(t(),1),h=e(),g=d({email:f().trim().email({message:`Please enter a valid email address`}).max(255),consent:p(!0,{errorMap:()=>({message:`Please confirm your consent to subscribe`})})});function _(){let[e,t]=(0,m.useState)(``),[n,d]=(0,m.useState)(``),[f,p]=(0,m.useState)(!1),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(``),{toast:x}=s();return(0,h.jsxs)(`section`,{"data-theme":`dark`,className:`relative bg-accent-1 text-white overflow-hidden [color-scheme:dark] mx-4 md:mx-8 lg:mx-12 my-8 rounded-3xl md:rounded-[2rem]`,children:[(0,h.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 opacity-[0.18]`,style:{backgroundImage:`radial-gradient(ellipse at 50% 0%, hsl(var(--accent-3) / 0.45), transparent 60%)`}}),(0,h.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 mix-blend-overlay opacity-[0.05]`,style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`}}),(0,h.jsx)(`div`,{className:`relative w-full px-6 md:px-10 lg:px-16 py-20 md:py-28`,children:(0,h.jsxs)(`div`,{className:`max-w-3xl mx-auto text-center`,children:[(0,h.jsx)(c,{variant:`accent`,className:`mb-6 mx-auto`,children:`Get Started — Free`}),(0,h.jsxs)(`h2`,{className:`font-serif text-4xl md:text-5xl lg:text-6xl leading-[1.08] tracking-tight text-white mb-5`,children:[`Join 100,000 biohackers getting the`,` `,(0,h.jsx)(`em`,{className:`italic text-white`,children:`Peak Human`}),` brief`]}),(0,h.jsx)(`p`,{className:`text-base md:text-lg text-white/75 leading-relaxed max-w-2xl mx-auto mb-10`,children:`Drop your details and we'll send you the same weekly intelligence longevity leaders, scientists and investors read every Monday.`}),(0,h.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),b(``);let i=g.safeParse({email:e,consent:f});if(!i.success){b(i.error.errors[0].message);return}v(!0);try{let{data:r,error:i}=await o.functions.invoke(`subscribe-peak-brief`,{body:{email:e.trim(),name:n.trim()||null,consent:!0,source:`peak_brief`,page_url:typeof window<`u`?window.location.href:``}});if(i||!r?.ok)throw Error(i?.message||r?.error||`Subscription failed`);r?.status===`already_member`?x({title:`You're already part of Peak Human`,description:`Sign in to your member account to access the latest brief.`}):x({title:`You're in.`,description:`Watch your inbox Monday morning for the Peak Human brief.`}),t(``),d(``),p(!1)}catch(e){let t=e instanceof Error?e.message:`Something went wrong. Please try again.`;b(t),x({title:`Subscription failed`,description:t,variant:`destructive`})}finally{v(!1)}},className:`flex flex-col gap-3 max-w-xl mx-auto text-left`,children:[(0,h.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,h.jsx)(l,{type:`text`,placeholder:`First name`,value:n,onChange:e=>d(e.target.value),className:`h-12 bg-white/[0.06] border-white/15 text-white placeholder:text-white/50 rounded-md focus:border-accent-3`,disabled:_}),(0,h.jsx)(l,{type:`email`,placeholder:`Email address`,value:e,onChange:e=>t(e.target.value),className:`h-12 bg-white/[0.06] border-white/15 text-white placeholder:text-white/50 rounded-md focus:border-accent-3`,disabled:_})]}),y&&(0,h.jsx)(`p`,{className:`text-sm text-destructive -mt-1`,children:y}),(0,h.jsxs)(`label`,{className:`flex items-start gap-3 mt-1 cursor-pointer select-none`,children:[(0,h.jsx)(u,{checked:f,onCheckedChange:e=>p(e===!0),disabled:_,className:`mt-0.5 border-white/40 data-[state=checked]:bg-accent-3 data-[state=checked]:border-accent-3`,"aria-required":`true`}),(0,h.jsx)(`span`,{className:`text-xs text-white/75 leading-relaxed`,children:`I consent to receive the Peak Human weekly newsletter and related updates by email. I can unsubscribe at any time.`})]}),(0,h.jsx)(i,{type:`submit`,disabled:_||!f,className:`h-12 w-full bg-white text-primary hover:bg-accent-5 rounded-md text-xs font-semibold tracking-[0.22em] uppercase gap-2 disabled:opacity-60`,children:_?`Subscribing…`:(0,h.jsxs)(h.Fragment,{children:[`Get My Peak Human Brief`,(0,h.jsx)(a,{className:`w-4 h-4`})]})})]}),(0,h.jsxs)(`p`,{className:`text-xs text-white/55 leading-relaxed mt-6 max-w-md mx-auto`,children:[`By submitting you agree to re
1ceive the Peak Human newsletter and accept our`,` `,(0,h.jsx)(r,{to:`/privacy-policy`,className:`underline underline-offset-2 hover:text-white transition-colors`,children:`privacy policy`}),`.`]})]})})]})}export{_ as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.