PageSourceSearch

https://rainx.in/assets/ForgotPassword-nVEIbVTD.js

js rainx.in collected 2026-09-24 12:20:01 UTC 4,108 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-B5O6TaIB.js";import{r as t,L as S}from"./react-vendor-Dwsg5a2_.js";import{u as C,g as L,a as b}from"./index-Cbf_hYLb.js";import{S as E}from"./SEO-CeZ123iL.js";import{S as T,h as P,a as R}from"./react-google-recaptcha-v3.esm-IhisVCcC.js";/* empty css                 */function I(){const{settings:r}=C(),[c,f]=t.useState(""),[l,d]=t.useState(""),[u,i]=t.useState(""),[h,o]=t.useState(null),[g,p]=t.useState(!1),[m,x]=t.useState(!1),[_,v]=t.useState(!1);t.useEffect(()=>{const s=setTimeout(()=>v(!0),50);return()=>clearTimeout(s)},[]);const k=async s=>{var j,y;if(s.preventDefault(),d(""),i(""),(r==null?void 0:r.security_captcha_enabled)==="true"&&!h&&r.security_captcha_provider!=="recaptcha"){i("Please complete the CAPTCHA.");return}x(!0);try{const a={email:c};(r==null?void 0:r.security_captcha_enabled)==="true"&&(a.captcha_token=h,a.captcha_provider=r.security_captcha_provider||"recaptcha");const n=await b.post("/api/auth/forgot-password",a);d(n.data.status),o(null),p(N=>!N)}catch(a){i(((y=(j=a.response)==null?void 0:j.data)==null?void 0:y.message)||"An error occurred"),o(null),p(n=>!n)}finally{x(!1)}},w=()=>(r==null?void 0:r.security_captcha_enabled)!=="true"?null:e.jsxs("div",{className:"w-full my-4 flex justify-center",children:[r.security_captcha_provider==="cloudflare"&&r.security_turnstile_site_key&&e.jsx(T,{siteKey:r.security_turnstile_site_key,onSuccess:s=>o(s),onError:()=>i("CAPTCHA verification failed.")}),(!r.security_captcha_provider||r.security_captcha_provider==="recaptcha")&&r.security_recaptcha_site_key&&e.jsx(P,{reCaptchaKey:r.security_recaptcha_site_key,children:e.jsx(R,{onVerify:s=>o(s),refreshReCaptcha:g})})]});return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Forgot Password",description:"Reset your account password"}),e.jsx("div",{className:"login-root",children:e.jsxs("div",{className:`neu-card${_?" mounted":""}`,children:[r!=null&&r.site_logo?e.jsx("img",{src:L(r.site_logo),alt:(r==null?void 0:r.site_title)||"Logo",className:"neu-brand-logo"}):e.jsx("div",{className:"neu-avatar",children:e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}),e.jsx("h1",{className:"neu-title",children:"Reset Password"}),e.jsx("p",{className:"neu-sub",children:"Enter your email to receive a reset link"}),u&&e.jsxs("div",{className:"error-box",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),u]}),l&&e.jsxs("div",{className:"notice-box",children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6L9 17l-5-5"})}),l]}),e.jsxs("form",{onSubmit:k,children:[e.jsx("div",{className:"form-group",children:e.jsxs("div",{className:"input-wrap",children:[e.jsx("span",{className:"input-icon",children:e.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),e.jsx("path",{d:"m22 7-10 6L2 7"})]})}),e.jsx("input",{type:"email",className:"form-input",placeholder:"Email Address",value:c,onChange:s=>f(s.target.value),required:!0})]})}),w(),e.jsx("button",{type:"submit",className:"btn-signin",disabled:m,style:{marginTop:"1.5rem"},children:m?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"btn-spinner"}),"Sending..."]}):"Send Reset Link"})]}),e.jsxs("div",{className:"register-row",style:{marginTop:"1.5rem"},children:["Remembered your password?"," ",e.jsx(S,{to:"/login",className:"register-link",children:"Sign In"})]})]})})]})}export{I 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.