1import{A as x,E as f,r as t,j as e,L as h,i as n}from"./index-Z8OYoERx.js";import{P as b}from"./PublicLayout-DEjfTHeE.js";import{T as g}from"./TurnstileWidget-Dh6c0xE8.js";import"./x-4eepEkSW.js";const y=x({method:"POST"}).handler(f("89198a81463bb6aa343290301537e5f7b143f326697f70b3bff67defcfca897b"));function N(){const[r,m]=t.useState(""),[o,i]=t.useState(!1),[a,u]=t.useState(!1),[l,d]=t.useState(null);async function p(s){if(s.preventDefault(),!!r){if(!l){n.error("Please complete the captcha challenge.");return}i(!0);try{await y({data:{email:r.trim(),redirectTo:`${window.location.origin}/reset`,captchaToken:l}}),u(!0),n.success("If that email exists, a reset link is on the way.")}catch(c){n.error(c instanceof Error?c.message:"Could not send reset email.")}finally{i(!1),d(null)}}}return e.jsx(b,{children:e.jsxs("div",{className:"container mx-auto max-w-md px-4 py-16",children:[e.jsx("h1",{className:"font-display text-4xl",children:"Forgot password"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Enter your email and we'll send a reset link."}),e.jsxs("form",{onSubmit:p,className:"mt-6 space-y-3 rounded-lg border border-border bg-card p-6",children:[e.jsx("input",{type:"email",required:!0,value:r,onChange:s=>m(s.target.value),placeholder:"[email protected]",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"}),e.jsx(g,{onToken:d,action:"password_reset"}),e.jsx("button",{type:"submit",disabled:o||a,className:"w-full rounded-md bg-primary py-3 text-sm font-bold uppercase tracking-wider text-primary-foreground disabled:opacity-60",children:a?"Link sent":o?"Sendingâ¦":"Send reset link"}),a&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Check your inbox (and spam). The link expires after a short time."}),e.jsxs("p",{className:"pt-2 text-xs text-muted-foreground",children:["Remembered it?"," ",e.jsx(h,{to:"/login",className:"underline",children:"Back to sign in"})]})]})]})})}export{N as component};
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.