1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{4001:(e,t,r)=>{"use strict";r.d(t,{l:()=>i});var o=r(7876),s=r(1379),a=r(9688);let i=e=>{let{...t}=e,{theme:r="system"}=(0,s.D)();return(0,o.jsx)(a.l$,{theme:r,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})}},4013:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var o=r(7876),s=r(4232),a=r(8971),i=r(2315),n=r(4001),l=r(9688),d=r(9099);function c(e){let{onBack:t}=e,r=(0,d.useRouter)(),[c,u]=(0,s.useState)(""),[m,g]=(0,s.useState)(!1),x=async e=>{if(e.preventDefault(),!c)return void l.oR.error("Please enter your email address",{position:"bottom-right",style:{fontWeight:"bold",fontSize:"1rem"},duration:5e3});g(!0);try{let e=await fetch("/api/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c})}),t=await e.json();e.ok?(l.oR.success(t.message||"If an account with that email exists, a reset link has been sent.",{position:"bottom-right",style:{fontWeight:"bold",fontSize:"1rem"},duration:5e3,description:void 0}),u("")):l.oR.error(t.message||"Failed to send reset email. Please try again.",{position:"bottom-right",style:{fontWeight:"bold",fontSize:"1rem"},duration:5e3})}catch(e){console.error("Forgot password error:",e),l.oR.error("Something went wrong. Please try again.",{position:"bottom-right",style:{fontWeight:"bold",fontSize:"1rem"},duration:5e3})}finally{g(!1)}};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.l,{position:"top-right",richColors:!0}),(0,o.jsxs)("div",{className:"relative mx-auto max-w-md bg-white p-8 rounded-3xl shadow-lg min-w-sm flex flex-col items-stretch text-[#18181b] border border-gray-100",style:{boxShadow:"0 8px 32px 0 rgba(60, 60, 60, 0.08)"},children:[(0,o.jsxs)("div",{className:"flex flex-col items-center mb-6",children:[(0,o.jsx)("div",{className:"text-lg font-bold mb-1",children:"Forgot password?"}),(0,o.jsx)("div",{className:"text-sm text-gray-500 text-center mb-2",children:"Enter your email and we'll send you a link to reset your password."})]}),(0,o.jsxs)("form",{onSubmit:x,className:"flex flex-col gap-4",children:[(0,o.jsx)(a.p,{type:"email",placeholder:"Email",value:c,onChange:e=>u(e.target.value),required:!0,disabled:m,className:"rounded-lg text-black placeholder-gray-400 bg-white border border-gray-200 shadow-none focus:outline-none focus:ring-2 focus:ring-[#2563eb] h-11"}),(0,o.jsx)(i.$,{type:"submit",disabled:m||!c,className:"w-full cursor-pointer bg-earthmark-dark-green text-white font-bold rounded-lg text-base h-11 hover:bg-earthmark-dark-green mt-2 disabled:opacity-50",children:m?"Sending...":"Send login link"})]}),(0,o.jsxs)("div",{className:"flex items-center my-6",children:[(0,o.jsx)("div",{className:"flex-1 h-px bg-gray-200"}),(0,o.jsx)("span",{className:"mx-3 text-xs text-gray-400",children:"OR"}),(0,o.jsx)("div",{className:"flex-1 h-px bg-gray-200"})]}),(0,o.jsx)("div",{className:"text-center mb-6",children:(0,o.jsx)("a",{href:"#",className:"text-[#18181b] font-semibold text-sm hover:underline",onClick:e=>{e.preventDefault(),r.push("/auth/signup")},children:"Create new account"})}),(0,o.jsx)(i.$,{type:"button",variant:"ghost",className:"w-full cursor-pointer bg-gray-100 text-[#18181b] font-semibold rounded-b-2xl text-base h-11 border-t border-gray-200 mt-2 hover:bg-gray-200",onClick:t,children:"Back to login"})]})]})}function u(){let e=(0,d.useRouter)();return(0,o.jsx)("div",{className:"flex-1 flex items-center justify-center py-16",children:(0,o.jsx)("div",{className:"w-full max-w-lg",children:(0,o.jsx)(c,{onBack:()=>e.push("/auth/login")})})})}},4620:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/forgot-password",function(){return r(4013)}])},8971:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var o=r(7876);r(4232);var s=r(4317);function a(e){let{className:t,type:r,...a}=e;return(0,o.jsx)("input",{type:r,"data-slot":"input",className:(0,s.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...a})}}},e=>{var t=t=>e(e.s=t);e.O(0,[210,636,593,792],()=>t(4620)),_N_E=e.O()}]);
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.