1import{k as f,r as s,j as e,L as o}from"./vendor-BFXU7DOE.js";import{s as g,B as d,m as p,a as j}from"./index-0a0uir_3.js";import{G as v}from"./GuardianLogo-CR5GMaoV.js";import{I as N}from"./input-tkUwFhSJ.js";import{n as y}from"./At.es-BxJrBxtu.js";import{m as w}from"./SpinnerGap.es-Ss98-HCj.js";import"./ui-B_QsM55A.js";import"./radix-BmG-mZpu.js";const G=()=>{const m=f(),[t,c]=s.useState(""),[r,l]=s.useState(!1),[i,x]=s.useState(""),[u,n]=s.useState(!1),b=async a=>{a.preventDefault(),x(""),l(!0);try{await j.forgotPassword(t),n(!0)}catch{n(!0)}finally{l(!1)}},h=()=>{m("/reset-password",{state:{email:t}})};return e.jsxs("div",{className:"min-h-screen bg-linear-to-br from-gray-900 via-brand-darker to-blue-900 flex items-center justify-center p-4",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-brand rounded-full mix-blend-screen filter blur-xl opacity-20 animate-blob"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-blue-500 rounded-full mix-blend-screen filter blur-xl opacity-20 animate-blob animation-delay-2000"}),e.jsx("div",{className:"absolute top-40 left-40 w-80 h-80 bg-cyan-500 rounded-full mix-blend-screen filter blur-xl opacity-20 animate-blob animation-delay-4000"})]}),e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsx("div",{className:"text-center mb-8",children:e.jsx(v,{size:"lg",variant:"light"})}),e.jsx("div",{className:"bg-surface-solid rounded-2xl shadow-2xl border border-edge p-8",children:u?e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"p-4 bg-green-500/10 border border-green-500/30 rounded-lg",children:e.jsxs("p",{className:"text-sm text-status-green flex items-center",children:[e.jsx(g,{className:"w-5 h-5 mr-2 shrink-0"}),"If an account exists with this email, you'll receive a reset code."]})}),e.jsx(d,{onClick:h,className:"w-full",children:"Enter Reset Code"}),e.jsx("div",{className:"text-center pt-4 border-t border-edge",children:e.jsx(o,{to:"/login",className:"text-fg-subtle hover:text-fg text-sm transition-colors",children:"â Back to Login"})})]}):e.jsxs("form",{className:"space-y-6",onSubmit:b,children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-fg-muted mb-2",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(y,{className:"h-5 w-5 text-fg-subtle"})}),e.jsx(N,{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:"pl-10 py-3 text-fg",placeholder:"[email protected]",value:t,onChange:a=>c(a.target.value)})]})]}),i&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4",children:e.jsxs("p",{className:"text-sm text-status-red flex items-center",children:[e.jsx(p,{className:"w-5 h-5 mr-2 shrink-0"}),i]})}),e.jsx(d,{type:"submit",disabled:r,className:"w-full",children:r?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-fg"}),"Sending Reset Code..."]}):"Send Reset Code"}),e.jsx("div",{className:"text-center pt-4 border-t border-edge",children:e.jsx(o,{to:"/login",className:"text-fg-subtle hover:text-fg text-sm transition-colors",children:"â Back to Login"})})]})})]})]})};export{G 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.