1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="9ee27d9f-bcb6-4940-b41f-00bc7d1cc4ba")}catch(e){}}();import{c3 as N,c4 as P,c as b,u as v,a as C,r as k,j as s,B as g,q as I,cz as _,I as E}from"./index-BFiNvylu.js";import{a as R,u as $,F as A,b as L,c as O,d as B,e as J,g as q}from"./form-Bw3S76bS.js";import{c as z,b as j,C as F,a as S,d as D}from"./card-B9yqEqNl.js";import{n as M}from"./email-yUml_Ca6.js";import"./label-3D9CUkkK.js";const T="/api",U=N({email:P().email({message:"Please enter a valid email address."})}),V=()=>I({mutationFn:async({email:e})=>{const t=await _(`${T}/auth/reset-password`,{method:"POST",requiresAuth:!1,body:JSON.stringify({email:e})});if(!t.ok){let r="Failed to process password reset";try{const i=await t.text();i&&(r=JSON.parse(i).detail||r)}catch{}throw new Error(r)}const a=await t.text();try{return a?JSON.parse(a):{}}catch{return{}}}});function H(){const e=b.c(17),t=v();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/(authentication)/forgot-password"},e[0]=a):a=e[0];const r=C(a),[i,w]=k.useState(!1),{mutate:f,isPending:l,error:d}=V();let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m={resolver:R(U),defaultValues:{email:""}},e[1]=m):m=e[1];const o=$(m);let u;e[2]!==o||e[3]!==f?(u=h=>{h.preventDefault();const y=M(o.getValues("email"));f({email:y},{onSuccess:()=>{w(!0)}})},e[2]=o,e[3]=f,e[4]=u):u=e[4];const p=u;let n;e[5]!==d||e[6]!==o||e[7]!==p||e[8]!==l||e[9]!==i?(n=s.jsx(z,{children:i?s.jsx(s.Fragment,{children:s.jsxs(j,{className:"text-center","data-e2e-id":"forgot-password-sent",children:[s.jsx(F,{className:"text-xl",children:"Check Your Email"}),s.jsx(S,{children:"If an account with that email exists, you will receive a password reset link. Please check your inbox and follow the instructions to reset your password."})]})}):s.jsxs(s.Fragment,{children:[s.jsxs(j,{className:"text-center",children:[s.jsx(F,{className:"text-xl",children:"Forgot Password"}),s.jsx(S,{children:"Enter your email address and we'll send you a link to reset your password"})]}),s.jsx(D,{children:s.jsx(A,{...o,children:s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsx(L,{control:o.control,name:"email",render:Y}),d&&s.jsx("div",{className:"text-sm text-red-500 font-medium","data-e2e-id":"forgot-password-error",children:d.message}),s.jsx(g,{type:"submit",className:"w-full",disabled:l,"data-e2e-id":"forgot-password-submit",children:l?"Sending...":"Send Reset Link"})]})})})]})}),e[5]=d,e[6]=o,e[7]=p,e[8]=l,e[9]=i,e[10]=n):n=e[10];let c;e[11]!==t||e[12]!==r.redirect?(c=s.jsx("div",{className:"text-center",children:s.jsx(g,{variant:"link","data-e2e-id":"forgot-password-back-to-login",onClick:()=>{const h=r.redirect?`?redirect=${encodeURIComponent(r.redirect)}`:"";t({to:`/signin${h}`})},children:"Back to Login"})}),e[11]=t,e[12]=r.redirect,e[13]=c):c=e[13];let x;return e[14]!==n||e[15]!==c?(x=s.jsxs("div",{className:"flex flex-col gap-6",children:[n,c]}),e[14]=n,e[15]=c,e[16]=x):x=e[16],x}function Y(e){const{field:t}=e;return s.jsxs(O,{children:[s.jsx(B,{children:"Email"}),s.jsx(J,{children:s.jsx(E,{placeholder:"[email protected]","data-e2e-id":"forgot-password-email",...t})}),s.jsx(q,{})]})}function G(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10",children:s.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-6",children:[s.jsxs("a",{href:"#",className:"flex flex-row items-center gap-2 self-center font-medium",children:[s.jsx("img",{src:"/superai-logo.webp",alt:"Super.AI",className:"size-12"}),"Super.AI Flows"]}),s.jsx(H,{})]})}),e[0]=t):t=e[0],t}const ee=G;export{ee as component}; 2 3//# chunkId=9ee27d9f-bcb6-4940-b41f-00bc7d1cc4ba
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.