PageSourceSearch

https://portal.commoninterest.com/assets/forgot-login-BP0eOOUg.js

js commoninterest.com collected 2026-09-24 13:28:26 UTC 4,540 bytes, 1 lines download raw bytes

1import{u as l,j as e,F as N,b6 as y,r as g,I as C,B as F,n as u}from"./elements-DVh2jUIM.js";import{u as f}from"./useAuthorization-D7B2eQha.js";import{u as h}from"./useBanner-CJNHVgHN.js";import{x as p,o as b,F as L,R as d,L as j,k as P}from"./index-DeQvL4I7.js";import{C as w}from"./CustomContent-qUKl3gpM.js";import{u as v}from"./useCustomContent-BqBLnYCa.js";import{C as S,F as k}from"./ForgotLoginForm-DXqkLFtb.js";import{u as I}from"./index.esm-BsOhZrKM.js";import{u as R}from"./useRedesign-DVyq07A4.js";import"./grids-DXrfAsUA.js";import"./startOfDay-AazlW55I.js";import"./index-DWdRGcKw.js";import"./useMutation-CfDMVIpo.js";function q(){const{t:s}=l(),o=v("ForgotPassword","Home_v2"),a=p(),n=b().pathname==="/login";return e.jsxs("div",{children:[e.jsxs("button",{className:"flex items-center gap-2 mb-4 text-base-link",onClick:()=>a("/login"),"data-qa":"forgot-login-back-to-login",children:[e.jsx(N,{icon:y}),e.jsx("p",{children:s("auth.login.backToLogin")})]}),o&&e.jsx("div",{className:"lg:mb-[2vw] mb-12 w-full",children:e.jsx(w,{content:o})}),e.jsx("h1",{className:"font-bold text-2xl lg:mb-[1vw] mb-6","data-qa":"forgot-login-header",children:s(n?"auth.login.enterVerificationCodeToLogin":"auth.login.resetYourPassword")})]})}const M={title:"Welcome, Neighbor!",showPropertySelector:!1};function Q(){return L?e.jsx(A,{}):e.jsx(H,{})}function A(){var r;const{isLoggedIn:s}=f(),[o,a]=g.useState(""),{t}=l(),n=b(),i=(r=n.state)==null?void 0:r.view,c=n.pathname==="/login",m=R();return s?e.jsx(d,{to:"/dashboard"}):m?e.jsx(d,{to:"/public?modal=resetPassword"}):e.jsxs("div",{className:"px-horizontal-layout flex flex-wrap-reverse xl:flex-nowrap justify-center gap-10 py-8 bg-base-fill rounded-xl",children:[e.jsxs("div",{className:"flex flex-col w-full xl:max-w-[50%]",children:[e.jsx(q,{}),i==="otpCodeInput"?e.jsx(S,{email:o,shouldResetPassword:!0}):e.jsxs("div",{className:"flex flex-col gap-4 items-center",children:[e.jsx(k,{setEmail:a,shouldResetPassword:!0}),e.jsxs("p",{children:[t("auth.login.alreadyHave")," ",e.jsx(j,{to:c?"/login":"/forgot-login",state:{view:"otpCodeInput"},className:"text-base-link hover:underline",children:t("auth.login.continue")})]})]})]}),e.jsx(E,{})]})}const E=()=>{const s=h();return e.jsx("div",{className:"hidden flex-col md:flex",children:s?e.jsx("img",{src:s,width:548,className:"rounded-xl max-w-full max-h-[548px]",alt:"banner"}):e.jsx("div",{className:"min-h-[548px] max-h-[548px] bg-gray-100 w-[30vw] max-w-[600px] mb-20 rounded-xl"})})};function H(){const{t:s}=l(),{isLoggedIn:o}=f(),a=h(),t=v("ForgotPassword","Home_v2");return o?e.jsx(d,{to:"/dashboard"}):e.jsxs("div",{className:"px-horizontal-layout flex flex-wrap-reverse xl:flex-nowrap justify-center gap-10 py-8 bg-base-fill rounded-xl",children:[e.jsxs("div",{className:"flex flex-col w-full xl:max-w-[50%]",children:[t&&e.jsx("div",{className:"lg:mb-[2vw] mb-12 w-full",children:e.jsx(w,{content:t})}),e.jsx("h1",{className:"font-bold text-2xl lg:mb-[1vw] mb-6",children:s("auth.login.resetYourPassword")}),e.jsx(B,{})]}),e.jsx("div",{className:"hidden flex-col md:flex",children:a?e.jsx("img",{src:a,width:548,className:"rounded-xl max-w-full max-h-[548px]",alt:"banner"}):e.jsx("div",{className:"min-h-[548px] max-h-[548px] bg-gray-100 w-[30vw] max-w-[600px] mb-20 rounded-xl"})})]})}function B(){const{t:s}=l(),o=p(),[a,t]=g.useState(!1),{handleSubmit:n,register:i,formState:{errors:c}}=I(),m=r=>{t(!0),P.resetPassword({emailAddress:r.email}).then(()=>{o("/login"),u({message:"Password Reset",type:"success"})}).catch(x=>{console.error(x),u({message:x.message,type:"error"})}).finally(()=>t(!1))};return e.jsxs("form",{id:"forgot-password-form",noValidate:!0,onSubmit:n(m),className:"space-y-16",children:[e.jsx("div",{className:"flex flex-col gap-7",children:e.jsx(C,{errorSpacing:!1,type:"text",label:s("auth.login.email").toString(),className:"lg:w-11/12",placeholder:"[email protected]",error:c.email&&s("auth.login.invalidEmail").toString(),qaAttribute:"email",...i("email",{required:!0,pattern:/^[^@ ]+@[^@ ]+\.[^@ .]{2,}$/})})}),e.jsxs("div",{className:"flex flex-col justify-center items-center",children:[e.jsx(F,{type:"submit",className:"mb-5 w-48","data-qa":"rest-password-btn",disabled:a,children:s("auth.login.resetPassword")}),e.jsxs("p",{children:[s("auth.login.alreadyHaveAccount")," ",e.jsx(j,{to:"/login",className:"text-base-link hover:underline","data-qa":"log-in-link",children:s("auth.login.logIn")})]})]})]})}export{Q as Component,H as LegacyForgotLogin,A as OtpForgotLogin,M as handle};

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.