1var f=Object.defineProperty;var a=(s,i)=>f(s,"name",{value:i,configurable:!0});import{j as e,m as t,B as b,aA as j,E as y,R as w}from"./vendor-ui-CGbRblPw.js";import{r as o,L as u}from"./vendor-react-B7SHFsLe.js";import{h as N,A as v}from"./index-ClNjN171.js";import"./vendor-query-BpyaVjbq.js";function L(){N("Reset Your Password - Recover Your Botvee AI Account");const[s,i]=o.useState(""),[c,m]=o.useState(!1),[h,g]=o.useState(!1),[x,n]=o.useState(""),p=a(async l=>{l.preventDefault(),m(!0),n("");try{const r=await fetch(`${v}/api/auth/forgot-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s})}),d=await r.json();r.ok?g(!0):n(d.error||"Failed to send reset email")}catch(r){const d=r instanceof Error?r.message:"Something went wrong";n(d)}finally{m(!1)}},"handleSubmit");return e.jsxs("div",{className:"min-h-screen flex bg-background font-sans",children:[e.jsxs("div",{className:"hidden lg:flex lg:w-1/2 relative bg-primary text-white overflow-hidden items-center justify-center p-12",children:[e.jsxs("div",{className:"absolute inset-0 z-0",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-br from-primary to-indigo-900 opacity-90"}),e.jsx(t.div,{animate:{scale:[1,1.2,1],rotate:[0,90,0]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute top-[-20%] left-[-20%] w-[800px] h-[800px] bg-white/10 rounded-full blur-3xl op
1acity-30"}),e.jsx(t.div,{animate:{scale:[1,1.5,1],x:[0,100,0]},transition:{duration:15,repeat:1/0,ease:"easeInOut"},className:"absolute bottom-[-20%] right-[-10%] w-[600px] h-[600px] bg-cyan-400/20 rounded-full blur-3xl opacity-30"})]}),e.jsx("div",{className:"relative z-10 max-w-lg",children:e.jsxs(t.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},children:[e.jsx("div",{className:"bg-white/10 backdrop-blur-lg p-4 rounded-2xl w-16 h-16 flex items-center justify-center mb-8 shadow-xl",children:e.jsx(b,{className:"w-8 h-8 text-white"})}),e.jsxs("h1",{className:"text-5xl font-bold mb-6 leading-tight",children:["Reset your ",e.jsx("br",{}),e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-cyan-300 to-white",children:"Password."})]}),e.jsx("p",{className:"text-lg text-white/80 mb-8 leading-relaxed",children:"Don't worry, happens to the best of us. We'll help you recover your access in no time."})]})})]}),e.jsx("div",{className:"w-full lg:w-1/2 flex items-center justify-center p-8 lg:p-12 relative bg-background",children:e.jsxs("div",{className:"w-full max-w-md
1space-y-8",children:[e.jsxs("div",{className:"lg:hidden flex items-center gap-2 mb-8",children:[e.jsx("img",{src:"/logos/Bot Vee Gradient Logo icon.png",alt:"BotVee",className:"w-8 h-8 object-contain"}),e.jsx("span",{className:"text-xl font-bold text-foreground",children:"BotVee"})]}),e.jsxs(t.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5},children:[e.jsxs(u,{to:"/login",className:"inline-flex items-center text-sm text-muted-foreground hover:text-foreground mb-8 transition-colors",children:[e.jsx(j,{className:"w-4 h-4 mr-2"}),"Back to Login"]}),e.jsxs("div",{className:"text-center lg:text-left mb-10",children:[e.jsx("h2",{className:"text-3xl font-bold text-foreground",children:"Forgot Password?"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"Enter your email and we'll send you reset instructions."})]}),h?e.jsxs(t.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-green-500/10 border border-green-500/30 rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(y,{className:"w-6 h-6 text-green-500"})}),e.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",children:"Check your email"}),e.jsxs("p",{className:"text-muted-foreground mb-6",children:["We've sent password reset instructions to ",e.jsx("strong",{className:"text-foreground",children:s})]}),e.jsx(u,{to:"/login",className:"block w-full bg-primary hover:bg-primary/90 text-white font-semibold py-3 rounded-xl transition-colors text-center",children:"Back to Login"})]}):e.jsxs(e.Fragment,{children:[x&&e.jsx(t.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mb-6 p-4 bg-red-500/10 border border-red-500/30 text-red-600 dark:text-red-400 rounded-xl text-sm",children:x}),e.jsxs("form",{onSubmit:p,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email Address"}),e.jsx("input",{type:"email",placeholder:"[email protected]",value:s,onChange:a(l=>i(l.target.value),"onChange"),className:"w-full px-4 py-3 rounded-xl border border-border bg-muted/40 text-foreground placeholder:text-muted-foreground focus:ring-2 focus:ring-primary focus:border-transparent transition-all duration-200 outline-none hover:border-border/80",required:!0})]}),e.jsx("button",{type:"submit",disabled:c,className:"w-full bg-primary hover:bg-primary/90 text-white font-semibold py-3.5 rounded-xl shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 flex items-center justify-center space-x-2",children:c?e.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Send Reset Link"}),e.jsx(w,{className:"w-4 h-4"})]})})]})]})]})]})})]})}a(L,"ForgotPasswordPage");export{L 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.