PageSourceSearch

https://app.usbank-brc.com/assets/index-BCYJOPBp.js

js usbank-brc.com collected 2026-10-06 18:41:04 UTC 8,437 bytes, 1 lines download raw bytes

1import{r as e,e as E,j as s,i as U,k as v,s as q,u as K,h as G}from"./vendor-framework-CobW1Mgl.js";import{b,aS as N,V as H,n as r,a2 as S,j as $,d0 as Y,a8 as J,cK as Q,S as X,f4 as Z,f3 as V,f5 as ss,eN as M,bP as es}from"./index-Bvuwlx66.js";import{F as as,a as ts,u as os}from"./formik.esm-B5d-KiUO.js";import{P as rs}from"./PaperPlaneIcon-BnFzc7gx.js";import{u as ns}from"./useScopedCopy-CUxxhPmk.js";import{C as R}from"./circle-arrow-right-bsVnLBpP.js";import{L as O}from"./LinkText-5k0QoM5U.js";import{c as is,F as z}from"./index-DeeLJMZ2.js";import{F as P}from"./index-DsoTrhbm.js";import{c as y,ay as D}from"./vendor-utils-CAEY8Ghx.js";import{p as cs,a as ls,P as ds,i as ms}from"./utils-D59wieOA.js";import"./vendor-i18n-B6HYivoC.js";import"./vendor-firebase-Bl-igiUH.js";import"./vendor-state-DA1MgQuN.js";import"./hoist-non-react-statics.cjs-COuVnAi4.js";const ps=({emailPasswordResetMessageIsSentTo:i,redirectToLoginLink:m,setError:o,setEmailPasswordResetMessageIsSentTo:u,sendEmail:_})=>{const p=E(),[w,c]=e.useState(!1),[n,a]=e.useState(45),t=b(N),l=ns();e.useEffect(()=>{if(c(!0),n>0){const f=setInterval(()=>{a(k=>k-1)},1e3);return()=>clearInterval(f)}return c(!1),()=>n},[n,c]);const d=H(),h=e.useCallback(()=>{d({title:l(s.jsx(r,{k:"auth_module.letter_sent"})),body:l(s.jsx(r,{k:"auth_module.we_sent_password_reset_link",components:[s.jsx("br",{},"0")]})),actionText:l(s.jsx(r,{k:"common.got_it_exclamation"}))})},[d,l]),x=e.useCallback(()=>{p(m)},[m]),g=e.useCallback(()=>{_(i,f=>{o(f),u("")},()=>{a(45),h()}),c(!1)},[i,_,h]);return s.jsxs("div",{className:"send_instuctions__page","data-testid":"reset-password-email-sent",children:[s.jsx(rs,{className:"plane"}),s.jsxs("div",{className:"title",children:[s.jsx("p",{children:s.jsx(r,{k:"auth_module.check_your_email"})}),s.jsx("p",{children:s.jsx(r,{k:"auth_module.password_recover_instructions"})})]}),s.jsxs("div",{className:"send_instuctions__page__btn",children:[s.jsx(S,{type:"btn",rightIcon:s.jsx(R,{size:20,color:t==null?void 0:t.colorVariables.icons.icon_primary1_button}),btnLook:"filled",onClick:x,value:s.jsx(r,{k:"auth_module.take_login_screen"}),size:"large"}),w?s.jsx("p",{children:s.jsx(r,{k:"auth_module.resend_in_n_second",options:{seconds:n}})}):s.jsx(S,{type:"link",btnLook:"text",size:"large",value:s.jsx(r,{k:"auth_module.didnt_get_letter"}),onClick:g,"data-testid":"reset-password-resend"})]})]})},us=e.memo(ps),_s=({resetPasswordToken:i})=>{const m=E(),{t:o}=$(),[u,_]=e.useState(void 0),p=b(N),w=e.useCallback(async a=>{try{await cs.validate(a,{abortEarly:!1})}catch(t){return is(o,t)}return{}},[o]),c=e.useCallback(async(a,{setErrors:t})=>{_(void 0),await ls(a,i||"",t,_,o,m)},[i,o,m]),n=e.useMemo(()=>ds.map(a=>o(a.key)),[o]);return s.jsx(as,{initialValues:ms,validate:w,onSubmit:c,children:({errors:a,touched:t,handleBlur:l,setFieldTouched:d})=>s.jsxs(ts,{className:"reset_password_form",children:[s.jsxs("div",{className:"reset_password_form__body",children:[s.jsx("div",{className:"reset_password_form__body__head",children:s.jsx("p",{className:"reset_password_form__body__head__title",children:s.jsx(r,{k:"common.change_password"})})}),s.jsx(P,{message:u?y(u)[0]:void 0,variant:"emphasized",className:"w-full"}),s.jsxs("div",{className:"flex flex-col gap-4 w-full items-start",children:[s.jsx("p",{className:Y("reset_password_form__body__field_title !mb-0",t.newPassword&&a.newPassword&&"!text-destructive"),children:s.jsx(r,{k:"common.new_password"})}),s.jsx(P,{title:s.jsx(r,{k:"common.your_password_needs"}),checklist:t.newPassword&&a.newPassword?n.map(h=>{const x=y(a.newPassword),g=x.length===1&&!n.includes(x[0]);return{label:h,isValid:g?!1:!x.includes(h)}}):[],variant:"emphasized",className:"w-full"}),s.jsx(z,{type:"password",name:"newPassword",handleBlur:l,setFieldTouched:d,className:"new-password",autocomplete:"new-password",placeholder:`${o("common.new_password")}...`,"data-testid":"reset-password-new"}),s.jsx(z,{type:"password",name:"newPasswordConfirmation",handleBlur:l,setFieldTouched:d,className:"password-confirmation",autocomplete:"new-password",placeholder:`${o("common.repeat_new_password")}...`,"data-testid":"reset-password-confirm"}),s.jsx(P,{message:t.newPasswordConfirmation&&a.newPasswordConfirmation?y(a.newPasswordConfirmation)[0]:void 0,variant:"emphasized",className:"w-full"})]})]}),s.jsx("div",{className:"reset_password_form__footer",children:s.jsx(S,{type:"btn",btnLook:"filled",btnType:"submit",rightIcon:s.jsx(R,{size:20,color:p==null?void 0:p.colorVariables.icons.icon_primary1_button}
1),value:s.jsx(r,{k:"auth_module.change_password"}),size:"large",disabled:D(t)||!D(a),"data-testid":"reset-password-change-submit"})})]})})},ws=e.memo(_s),xs=({error:i,isLoading:m,resetPasswordToken:o})=>s.jsxs("div",{className:"reset_password__page",children:[i&&s.jsxs("div",{className:"title",children:[s.jsx("p",{children:s.jsx(r,{k:"auth_module.reset_password_token_verify_error"})}),s.jsx("p",{children:i})]}),s.jsxs("div",{className:"reset_password__page__container",children:[m&&s.jsx(J,{withText:!0,containerType:"inline-block",textTranslationKey:"auth_module.verifying_reset_password_token"}),!i&&!m&&s.jsx(ws,{resetPasswordToken:o}),s.jsx(O,{value:s.jsx(r,{k:"auth_module.go_to_the_login_page"}),to:"/auth/login"})]})]}),hs=e.memo(xs),js=({error:i,redirectToLoginLink:m,sendEmail:o,setError:u,isLoading:_})=>{const[p,w]=e.useState(""),c=b(N),n=e.useCallback(t=>{w(t),u(void 0)},[u]),a=async t=>{t.preventDefault();try{await o(p,l=>u(l))}catch(l){console.error(l)}};return s.jsxs("form",{className:"reset_password__page",onSubmit:a,children:[s.jsxs("div",{className:"title",children:[s.jsx("p",{children:s.jsx(r,{k:"auth_module.reset_password"})}),s.jsx("p",{children:s.jsx(r,{k:"auth_module.reset_password_page_text"})})]}),s.jsx("div",{className:"entry",children:s.jsxs("div",{className:"entry_item",children:[s.jsx("p",{className:"title",children:s.jsx(r,{k:"common.email"})}),s.jsx(Q,{type:"email",name:"email",placeholder:"[email protected]",autocomplete:"email",value:p||"",onChange:n,errorWithFocus:!0,errors:i,"data-testid":"reset-password-email"})]})}),s.jsxs("div",{className:"reset_password__page__btn",children:[s.jsx(S,{type:"btn",btnType:"submit",rightIcon:s.jsx(R,{size:20,color:c==null?void 0:c.colorVariables.icons.icon_primary1_button}),btnLook:"filled",value:s.jsx(r,{k:"auth_module.send_instructions"}),disabled:!p,size:"large",isLoading:_,"data-testid":"reset-password-submit"}),s.jsx(O,{value:s.jsx(r,{k:"common.cancel"}),to:m,"data-testid":"reset-password-back-to-login"})]})]})},fs=e.memo(js),gs=()=>{const[i]=G(),m=E(),[o,u]=e.useState(void 0),[_,p]=e.useState(!0),w=i.get("resetPasswordToken");return e.useEffect(()=>{if(!w){alert("No reset password token in search parameters. Please, contact a platform administrator."),m("/auth/reset-password");return}(async()=>{var c,n,a,t,l;try{await M.resetPasswordValidateToken({resetPasswordToken:w})}catch(d){u(((a=(n=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:n.errors)==null?void 0:a.resetPasswordToken)||((l=(t=d==null?void 0:d.response)==null?void 0:t.data)==null?void 0:l.message)),console.error(d)}p(!1)})()},[]),s.jsx(hs,{error:_?"":o,isLoading:_,resetPasswordToken:w})},ks=()=>{const{t:i}=$(),{search:m}=K(),o=os(),u=X(),[_,p]=e.useState(void 0),[w,c]=e.useState(!1),[n,a]=e.useState(""),{title:t,metaData:l}=b(Z(V.RESET_PASSWORD));e.useEffect(()=>{u(ss(V.RESET_PASSWORD))},[]);const d=e.useCallback(async(x,g,f)=>{var C,T,F,I,L,A;const k=o();if(k)try{await k.render(),await k.verify()}catch(j){console.error(j);return}c(!0);try{await M.resetPasswordSendEmail({email:x}),n!==x&&a(x),f&&f()}catch(j){const B=(I=(F=(T=(C=j==null?void 0:j.response)==null?void 0:C.data)==null?void 0:T.errors)==null?void 0:F.email)==null?void 0:I[0],W=(A=(L=j==null?void 0:j.response)==null?void 0:L.data)==null?void 0:A.message;g(B||W||i("common.error_occurred"))}c(!1)},[n,i,o,p,a]),h=e.useMemo(()=>`/auth/login${m}`,[m]);return s.jsxs(s.Fragment,{children:[s.jsx(es,{pageTitle:t,pageMetaData:l}),n?s.jsx(us,{emailPasswordResetMessageIsSentTo:n,redirectToLoginLink:h,setEmailPasswordResetMessageIsSentTo:a,setError:p,sendEmail:d}):s.jsx(fs,{redirectToLoginLink:h,error:_,setError:p,sendEmail:d,isLoading:w})]})},zs=()=>s.jsxs(U,{children:[s.jsx(v,{path:"",element:s.jsx(ks,{})}),s.jsx(v,{path:"/from-email",element:s.jsx(gs,{})}),s.jsx(v,{path:"*",element:s.jsx(q,{to:"/auth/reset-password"})})]});export{zs 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.