1import{c as N,i as k,g as S,u as E,r as a,j as e,b as g}from"./index-RBxNCHx2.js";function V(){var p;const n=N(),h=k(),[o]=S(),{verify:b,login:y}=E(),s=o.get("email")||"",r=(o.get("code")||"").replace(/\D/g,"").slice(0,6),l=(p=h.state)==null?void 0:p.password,[i,j]=a.useState(r),[c,d]=a.useState(""),[x,m]=a.useState(!1),u=async t=>{d(""),m(!0);try{if(await b(s,t.trim()),g.verifyEmail(),l)try{await y(s,l),g.login("email"),n("/onboarding/connect");return}catch{}n("/onboarding/auth?mode=login&verified=true")}catch(v){d(v.message||"Verification failed")}finally{m(!1)}},w=t=>{t.preventDefault(),u(i)},f=a.useRef(!1);return a.useEffect(()=>{f.current||s&&r.length===6&&(f.current=!0,u(r))},[]),e.jsxs("div",{className:"flex flex-col items-center gap-8",children:[e.jsxs("div",{className:"flex flex-col items-center gap-5 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-primary-fixed/10 border border-primary-fixed/25 flex items-center justify-center",children:e.jsx("span",{className:"material-symbols-outlined text-primary-fixed text-[30px]",children:"mark_email_read"})}),e.jsxs("h2",{className:"font-display text-[2rem] sm:text-[2.4rem] leading-[1] tracking-[-0.025em] text-bone",children:["Check your",e.jsx("span",{className:"block italic font-[600]",children:"inbox."})]}),e.jsxs("p",{className:"font-ui text-on-surface-variant text-[14px] max-w-sm",children:["Enter the 6-digit code we sent to"," ",e.jsx("span",{className:"text-bone font-medium break-all",children:s})]})]}),e.jsxs("form",{onSubmit:w,className:"flex flex-col items-center gap-6 w-full",children:[e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,value:i,onChange:t=>j(t.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000",className:"w-full max-w-xs bg-surface-container-low border border-white/15 rounded-md px-4 py-4 text-bone placeholder:text-on-surface-variant/40 outline-none focus:border-primary-fixed/60 transition-colors text-center tracking-[0.5em] text-2xl font-mono",autoFocus:!0}),c&&e.jsx("div",{className:"border-l-2 border-crimson bg-crimson/5 px-3 py-2 w-full max-w-xs",children:e.jsx("p",{className:"font-ui text-[13px] text-bone text-center",children:c})}),e.jsxs("button",{type:"submit",disabled:x||i.length!==6,className:"cta-glow w-full max-w-xs inline-flex items-center justify-center gap-3 bg-primary-fixed text-on-primary-fixed font-ui font-semibold text-[15px] px-6 py-3.5 rounded-full hover:bg-primary-fixed-dim transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:[x?"Verifyingâ¦":"Verify",e.jsx("span",{children:"â"})]})]}),e.jsxs("p",{className:"font-ui text-[13px] text-on-surface-variant/70 text-center max-w-xs",children:["Didn't get it? Check your spam folder, or email"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-primary-fixed hover:underline",children:"[email protected]"})," ","and we'll help."]})]})}export{V as default};
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.