PageSourceSearch

https://srm.cleeng.com/assets/Auth-CPePSJ8W.js

js cleeng.com collected 2026-09-24 09:18:21 UTC 30,642 bytes, 8 lines download raw bytes

1import{j as e,r as s}from"./react-DT6guO4n.js";import{u as Ve}from"./react-hook-form-VyoTQOyg.js";import{o as Le}from"./_hookform_resolvers-p1EarZC2.js";import{e as Ne}from"./react-query-CULkuBWQ.js";import{i as $e,a as ve}from"./axios-CyZX-0Aq.js";import{a as et,L as tt}from"./Loader-5dsK-VGp.js";import{B as R,u as se,n as k,L as ae,d as E,e as N,r as Be,p as st,h as at,U as rt,i as ke,l as Me,j as Ee,s as Z,k as it,m as ot,o as nt,q as H,v as W,w as X,C as _,x as ct,y as Fe,z as lt,D as De,E as dt,F as Oe,G as ut,H as mt,J as de,K as pt,N as ce,O as ht}from"./main-BL5zgPyM.js";import{r as gt,F,g as ft,a as xt,b as wt,c as yt}from"./PrefixedInput-shlq1WgG.js";import{L as D,H as re,D as Ue,F as L,C as ue,u as jt,g as Re,a as Ct,p as At,b as bt,v as St,R as It,c as Pt,S as kt,d as Et,e as me,f as $,h as pe,i as he,j as Ft,A as Rt}from"./RegisterFormFields-mI9hLFaM.js";import"./lodash-CWlkvKj-.js";import"./dayjs-CnNg6fAM.js";import{b as Qe,c as Ke,I as ee}from"./_phosphor-icons_react-CxHS0iTv.js";import{c as Tt,a as Vt,b as Lt}from"./yup-CQnK4sJK.js";import{a as z,u as ge,d as U}from"./react-router-BcEcYxhP.js";import{i as Nt}from"./helpers-D3tXlV1S.js";import{F as fe}from"./formik-Bb35AFS9.js";import{R as xe}from"./react-google-recaptcha-D4qtDM73.js";import{I as te,a as Q}from"./Input-CqwnEALZ.js";import"./react-helmet-Dte7BTN0.js";import{d as v,l as we}from"./styled-components-B57Umeu6.js";import{am as vt}from"./_mui_material-qlWpdCXu.js";import"./_babel_runtime-q5swkfHD.js";import"./react-dom-aC8izt2d.js";import"./scheduler-C6wT7SwS.js";import"./userManager-DmZdVoMm.js";import"./oidc-client-ts-31uKIj6n.js";import"./jwt-decode-DG8-DTcQ.js";import"./prop-types-BiHeSDec.js";import"./react-router-dom-BOl-Cqxw.js";import"./history-B_VsH3l1.js";import"./resolve-pathname-DDWomiuY.js";import"./value-equal-Bi9TveP1.js";import"./tiny-invariant-8XFOl4Ix.js";import"./react-redux-DOC9nX-u.js";import"./hoist-non-react-statics-k0Ol7z-C.js";import"./react-is-DieEVaj3.js";import"./use-sync-external-store-CYkyu1wA.js";import"./react-lazily-D0Gu-wQD.js";import"./sonner-BAIRKie7.js";import"./redux-DmAxXYtO.js";import"./_redux-devtools_extension-CJlOaIZW.js";import"./redux-thunk-C7u9vEBE.js";import"./redux-responsive-Bex-p5NA.js";import"./mediaquery-B6UHGVxm.js";import"./_reduxjs_toolkit-CmhpJ4b4.js";import"./immer-DyKKngzo.js";import"./userpilot-DvXxTX2Y.js";import"./react-loading-skeleton-DTKXK-WS.js";import"./_sentry_core-BQLQGxJC.js";import"./_sentry_react-BLRC8jqs.js";import"./_sentry_browser-DtvKl6oi.js";import"./_sentry-internal_browser-utils-ty-ljt34.js";import"./_sentry-internal_replay-DKusQVg3.js";import"./tslib-CdgRgkfm.js";import"./_emotion_unitless-BgJuBvcv.js";import"./stylis-Cee4o_pc.js";import"./_mui_utils-CL4euAKP.js";import"./clsx-B2UhURHB.js";import"./react-transition-group-DXQlNCub.js";import"./dom-helpers-Ch5ni-Yy.js";import"./_mui_system-B5Rji5W9.js";import"./_mui_styled-engine-CDwmo2OG.js";import"./_emotion_styled-BHk0IVOr.js";import"./_emotion_is-prop-valid-DdJ3Q1kW.js";import"./_emotion_memoize-bPQddURB.js";import"./_emotion_utils-NurU61FY.js";import"./_emotion_serialize-CO8XPw6B.js";import"./_emotion_hash-CHEqu8kg.js";import"./_emotion_use-insertion-effect-with-fallbacks-VmzL0uDb.js";import"./_emotion_react-OKlLFgt9.js";import"./_emotion_cache-Ce5vM9pC.js";import"./_emotion_sheet-B1Z110SH.js";import"./_mui_private-theming-DkNboAHQ.js";import"./_popperjs_core-qF6yP002.js";import"./path-to-regexp-BZRQKXoA.js";import"./isarray-Bnallxef.js";import"./react-select-DIdcyfcN.js";import"./_floating-ui_dom-DoF1NKFD.js";import"./_floating-ui_utils-Dbtwwyja.js";import"./use-isomorphic-layout-effect-Cj89e4Jz.js";import"./memoize-one-B-fBjqfi.js";import"./Checkbox-KgJMv3DI.js";import"./Tooltip-DSelQfsB.js";import"./externalProperties-CMMGXaox.js";import"./dompurify-B9fLH9w6.js";import"./property-expr-HeqoNzBe.js";import"./tiny-case-dcCnzP3_.js";import"./toposort-lECIw1j-.js";import"./query-string-CBuqCTFj.js";import"./decode-uri-component-ClTk5E8F.js";import"./split-on-first-CYM6MfS3.js";import"./filter-obj-DC3ADRBu.js";import"./react-fast-compare-DKxJBi6e.js";import"./deepmerge-4j7FbuOR.js";import"./create-react-context-DuBJpjge.js";import"./gud-D51OUGAk.js";import"./fbjs-DLFkPucG.js";import"./lodash-es-BhL4k2f0.js";import"./react-async-script-BiY7ybnn.js";import"./react-side-effect-BDw4OSeP.js";import"./object-assign-lqT-zfGg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"6ee5f8e92223815c8c6364c9f56a5e04b2af25b3"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="e7f80164-0e00-49ce-885e-2d91c9acdd20",t._sentryDebugIdIdentifier="sentry-dbid-e7f80164-0e00-49ce-885e-2d91c9acdd20")})()}catch{}const le=({name:t,passwordVisibilityState:i})=>{const[a,n]=i,c=a.has(t),l=()=>{n(u=>{const o=new Set(u);return u.has(t)?o.delete(t):o.add(t),o})};return e.jsxs(R,{color:"darkBlue",onClick:l,size:"small",children:[e.jsx("span",{className:"visually-hidden",children:c?"hide password":"show password"}),c?e.jsx(Qe,{}):e.jsx(Ke,{})]})},Bt=Tt().shape({password:gt.password,repeatPassword:Vt().oneOf([Lt("password"),void 0],"Passwords must match").required("Please repeat your password")}),Mt=()=>{const[t,i]=s.useState(new Set(["password","repeatPassword"])),a=z(),{getSearchParam:n}=se(),c=n("activationToken"),{control:l,...u}=Ve({mode:"all",resolver:Le(Bt)}),{mutate:o,isLoading:x}=Ne({mutationFn:({password:r,token:d})=>et(r,d),onError:r=>{var d;if(!$e(r)){k.error("Something went wrong...");return}k.error(((d=r.response)==null?void 0:d.data.message)??"Couldn't activate your account. Please try again.")},onSuccess:()=>{a.push("/login?SuccessActivate=true")}}),w=({password:r})=>{c&&o({password:r,token:c})};return s.useEffect(()=>{c||a.push("/login")},[c]),e.jsxs(D,{title:"Activate your account",children:[e.jsx(re,{children:"Activate your account"}),e.jsx(Ue,{children:"Provide a password to activate your admin account"}),e.jsxs(F,{control:l,onSubmit:w,...u,children:[e.jsx(L,{children:e.jsxs(F.Item,{control:l,name:"password",children:[e.jsx(F.Label,{children:"Password"}),e.jsx(F.Input,{clearOnInvalid:!0,includeDefaultSuffix:!0,showOkSuffix:!0,suffixContent:e.jsx(le,{name:"password",passwordVisibilityState:[t,i]}),type:t.has("password")?"password":"text"}),e.jsx(F.Error,{})]})}),e.jsx(L,{children:e.jsxs(F.Item,{control:l,name:"repeatPassword",children:[e.jsx(F.Label,{children:"Repeat password"}),e.jsx(F.Input,{clearOnInvalid:!0,includeDefaultSuffix:!0,showOkSuffix:!0,suffixContent:e.jsx(le,{name:"repeatPassword",passwordVisibilityState:[t,i]}),type:t.has("repeatPassword")?"password":"text"}),e.jsx(F.Error,{})]})}),e.jsx(R,{className:"inline-full",type:"submit",variant:"contained",children:x?"Activating...":"Activate account"})]}),e.jsx(ue,{children:e.jsx(ae,{color:"subtone",to:"/login",children:"Back to login"})})]})},Dt=({registerStep:t,setRegisterStep:i})=>{const a=E(),n=z(),{externalProperties:c}=jt(),{search:l}=ge(),{errorMessage:u,errorMessageCaptcha:o,isLoading:x,isPublisherDataLoading:w,publisherCountries:r,publisherCurrencies:d,reCaptchaKey:y,reCaptchaVisible:A,redirectUrl:m}=N(g=>g.auth),j=!!u,b=s.useMemo(()=>Re(d.currencies).find(({value:g})=>d.default===g),[d.default,d.currencies]),h=s.useMemo(()=>Re(r.countries).find(({value:g})=>r.default===g),[r.default,r.countries]),{control:I,formState:S,reset:C,...p}=Ve({defaultValues:Ct(),mode:"onTouched",resolver:Le(ft(A))});p.watch("email");const O=s.useCallback(()=>Be(m,l,n.replace),[n.replace,m,l]),{mutate:q,isLoading:oe}=Ne({mutationFn:async g=>st(g),onSettled:()=>O()}),B=g=>{p.setValue("reCaptcha",g??"")},f=async g=>{if(g<t){i(g);return}const T=nt[g-1];await p.trigger(T),T.map(K=>p.getFieldState(K)).every(K=>!K.invalid)&&i(g)},M=s.useCallback((g,T)=>{p.setError(g,{message:T,type:"validate"},{shouldFocus:!0})}
1,[p]),He=s.useCallback(async g=>{var T,ne,K,Ce,Ae,be;try{const G=await p.trigger();if(x||w||!G)return;const V=At(g),P=await a(at({...V,externalProperties:c})).unwrap();if(P!=null&&P.success){sessionStorage.setItem(rt,"true"),window.dataLayer=window.dataLayer||[];const{company:Y,country:J,currency:Se,email:Ie,firstName:Je,lastName:Xe}=g,Pe=((T=P==null?void 0:P.data)==null?void 0:T.userId)??((ne=P==null?void 0:P.data)==null?void 0:ne.publisherId)??null;window.dataLayer.push({company:Y,country:J,currency:Se,emailAddress:Ie,event:"User Signed Up",firstName:Je,lastname:Xe,userId:Pe}),Nt&&(ke.identify(String(Pe),{how_did_you_hear_about_us:((K=g.howDidYouHearAboutUs)==null?void 0:K.label)||"Not specified"}),ke.track("user_landed_on_the_overview_page")),await a(Me({email:g.email,password:g.password})).unwrap();const _e=bt(g);q(_e)}}catch(G){if(ve.isAxiosError(G)){const{email:V,firstName:P,lastName:Y,company:J}=((Ae=(Ce=G.response)==null?void 0:Ce.data)==null?void 0:Ae.errors)||{};if(!(((be=G.response)==null?void 0:be.status)===423&&(V||P||Y||J))){await a(Ee());return}J&&M("company","An error appeared. Please check your company's name and try again."),(V||P||Y)&&i(1),V&&M("email",V!=null&&V.emailExists?"We already have an account with this email address":String(Object.values(V)[0]??"")),Y&&M("lastName","An error appeared. Please check your name and try again."),P&&M("firstName","An error appeared. Please check your name and try again.")}else a(Z("Unexpected error"));await a(Ee())}},[a,c,p,x,w,q,i,M]),qe=s.useMemo(()=>St(p.getFieldState,p.getValues,t),[p,t]);return s.useEffect(()=>{!j&&!o||(k.error(u||o,{duration:8e3}),a(Z("")))},[j,o,u,a]),s.useEffect(()=>{const g=p.getValues("country"),T=p.getValues("currency");h&&!g&&p.setValue("country",h),b&&!T&&p.setValue("currency",b)},[h,b]),s.useEffect(()=>{a(it()),a(ot())},[]),e.jsx(F,{control:I,formState:S,onSubmit:He,reset:C,...p,children:e.jsx(It,{areCurrentStepFieldsValid:qe,control:I,formState:S,handleCaptchaChange:B,handleSteps:f,isLoading:x||w||oe,reCaptchaKey:y,reCaptchaVisible:A,registerStep:t})})},Ot=()=>{const t=E(),[i,a]=s.useState(1),n=s.useMemo(()=>i===1?e.jsx(Pt,{}):e.jsx(kt,{}),[i]);return s.useEffect(()=>{t(H()),k.closeNotification()},[]),e.jsx(D,{banner:n,variant:"registration",children:e.jsxs(e.Fragment,{children:[e.jsx(Dt,{registerStep:i,setRegisterStep:a}),e.jsxs(Et,{children:["Already have an account?"," ",e.jsx(ae,{color:"auth",to:"/login",children:"Sign In."})]})]})})},Ut=({formik:t})=>{const i=E(),[a,n]=s.useState(!0),{isLoading:c,errorMessage:l,successMessage:u,reCaptchaVisible:o,reCaptchaKey:x}=N(C=>C.auth),{setFieldValue:w,errors:r,touched:d,handleSubmit:y,handleChange:A,handleBlur:m,values:j}=t,b=s.useRef(null),h=s.useCallback(C=>{w("recaptcha",C)},[w]),I=C=>{var O;w(C,"");const p=(O=b.current)==null?void 0:O.querySelector(`#${C}`);p&&(p==null||p.focus())},S=s.useCallback(()=>n(C=>!C),[]);return s.useEffect(()=>{var p;const C=(p=b.current)==null?void 0:p.querySelector("#email");l&&C&&(C.focus(),C.select())},[l]),s.useEffect(()=>{!l&&!u||(l&&k.error(l,{duration:8e3}),u&&k.success(u,{duration:8e3}),i(Z("")),i(W("")))},[i,l,u]),e.jsxs(me,{name:"auth-login",onSubmit:y,ref:b,children:[e.jsxs(L,{children:[e.jsx(X,{htmlFor:"email",children:"Email"}),e.jsx(te,{"aria-errormessage":"email-error","aria-invalid":!!(r.email&&d.email),className:"autofill-form-input",id:"email",name:"email",onBlur:m,onChange:A,suffixContent:e.jsxs(e.Fragment,{children:[r.email&&d.email?e.jsxs(_,{onClick:()=>I("email"),children:[e.jsx("span",{className:"visually-hidden",children:"clear value"}),e.jsx(ee,{})]}):null,!r.email&&d.email?e.jsx($,{}):null]}),value:j==null?void 0:j.email}),r.email&&d.email?e.jsx(Q,{"data-error":"true",id:"email-error",children:"Invalid email address."}):null]}),e.jsxs(L,{children:[e.jsx(X,{htmlFor:"password",children:"Password"}),e.jsx(te,{"aria-errormessage":"password-error","aria-invalid":!!(r.password&&d.password),className:"autofill-form-input",id:"password",name:"password",onBlur:m,onChange:A,suffixContent:e.jsxs(e.Fragment,{children:[r.password&&d.password?e.jsxs(_,{onClick:()=>I("password"),children:[e.jsx("span",{className:"visually-hidden",children:"clear value"}),e.jsx(ee,{})]}):null,!r.password&&d.password?e.jsx($,{}):null,e.jsxs(R,{color:"darkBlue",onClick:S,size:"small",children:[e.jsx("span",{className:"visually-hidden",children:a?"show password":"hide password"}),a?e.jsx(Qe,{}):e.jsx(Ke,{})]})]}),type:a?"password":"text",value:j==null?void 0:j.password}),r.password&&d.password?e.jsx(Q,{"data-error":"true",id:"password-error",children:"Please fill out this field."}):null]}),o?e.jsxs(L,{children:[e.jsx(pe,{"data-testid":"recaptcha-container",children:e.jsx(xe,{onChange:h,sitekey:x})}),r.recaptcha?e.jsx(Q,{children:"Please complete the CAPTCHA to proceed with your login."}):null]}):null,e.jsxs(R,{className:"inline-full",type:"submit",variant:"contained",children:[c?e.jsx(he,{size:20}):null,c?"Loading":"Sign in"]})]})},Qt=()=>{const[t,i]=s.useState(void 0),{isLoading:a,reCaptchaVisible:n,errorMessage:c,TFA:l}=N(m=>m.auth),{getSearchParam:u}=se(),o=E(),x=z(),w=s.useRef(""),r=s.useRef(x.location.state),d=()=>{const m=u("SuccessResetPassword"),j=u("SuccessActivate");i(sessionStorage.getItem("srm:auto_logout")==="true"),sessionStorage.removeItem("srm:auto_logout"),m?o(W("Your password has been changed!")):j&&o(W("Your account has been activated!"))},y=s.useCallback(async({email:m,password:j,recaptcha:b})=>{a||(w.current=m,window.sessionStorage.clear(),i(void 0),await o(Me({email:m.trim(),password:j.trim(),reCaptcha:b||""})),sessionStorage.setItem(ct,"true"))},[a]);s.useEffect(()=>{o(H()),o(Fe()),d()},[]),s.useEffect(()=>
1{!a&&c&&o(Fe())},[c,a]),s.useEffect(()=>{l==="email"&&x.push(`/login/2fa?email=${encodeURIComponent(w.current)}`)},[l]);const A=s.useMemo(()=>{var m;return{email:((m=r.current)==null?void 0:m.emailAddress)??"",password:"",recaptcha:""}},[]);return e.jsx(D,{title:"Login",children:e.jsxs(e.Fragment,{children:[e.jsx(re,{children:"Sign in"}),t?e.jsxs(Ft,{children:["You got ",e.jsx("b",{children:"logged out"})," due to inactivity. Please sign in again."]}):null,e.jsx(fe,{enableReinitialize:!0,initialValues:A,onSubmit:m=>{y(m).catch()},render:m=>e.jsx(Ut,{formik:m}),validateOnBlur:!0,validationSchema:()=>xt(n)}),e.jsx(R,{className:"inline-full spaced",to:"/register",variant:"outlined",children:"Create an account"}),e.jsx(ue,{children:e.jsx(ae,{color:"subtone",to:"/forgot-password",children:"Forgot password"})})]})})},Kt=()=>{const t=E(),{isLoading:i,errorMessage:a,successMessage:n,reCaptchaKey:c,reCaptchaVisible:l,errorMessageCaptcha:u}=N(r=>r.auth),o=s.useRef(null),x=s.useCallback(async({email:r,reCaptcha:d})=>{var y;try{if(i)return;await t(lt({email:r,reCaptcha:d})).unwrap()}catch(A){if(ve.isAxiosError(A)&&String((y=A.response)==null?void 0:y.status).startsWith("4")){const m=o==null?void 0:o.current;m==null||m.select(),m==null||m.focus()}}finally{await t(De()).unwrap()}},[i]),w=s.useMemo(()=>({email:"",reCaptcha:""}),[]);return s.useEffect(()=>{const r={duration:8e3};u&&k.error(u,r),a&&k.error(a,r),n&&k.success(n,r),t(Z("")),t(W(""))},[u,a,n]),e.jsx(fe,{enableReinitialize:!0,initialValues:w,onSubmit:x,render:({errors:r,touched:d,handleBlur:y,handleChange:A,handleSubmit:m,setFieldValue:j,values:b})=>{const h=()=>{const{current:S}=o;j("email",""),S&&(S==null||S.focus())},I=S=>{S&&j("reCaptcha",S)};return e.jsxs(e.Fragment,{children:[e.jsxs(me,{onSubmit:m,children:[e.jsxs(L,{children:[e.jsx(X,{htmlFor:"email",children:"Email"}),e.jsx(te,{"aria-errormessage":"email-error","aria-invalid":!!(r.email||a||u),id:"email",name:"email",onBlur:y,onChange:A,ref:o,suffixContent:e.jsxs(e.Fragment,{children:[r.email&&d.email?e.jsxs(_,{onClick:h,children:[e.jsx("span",{className:"visually-hidden",children:"clear value"}),r!=null&&r.email?e.jsx(ee,{}):null]}):null,!r.email&&d.email?e.jsx($,{}):null]}),value:b==null?void 0:b.email}),d.email&&r.email?e.jsx(Q,{"data-error":"true",id:"email-error",children:r.email}):null]}),l?e.jsxs(L,{children:[e.jsx(pe,{"data-testid":"recaptcha-container",children:e.jsx(xe,{onChange:I,sitekey:c})}),r.reCaptcha?e.jsx(Q,{children:"Please complete the CAPTCHA to continue the reset password process."}):null]}):null,e.jsx(R,{className:"inline-full",type:"submit",variant:"contained",children:i?e.jsxs(e.Fragment,{children:[e.jsx(he,{size:20}),"Loading"]}):"Reset Password"})]}),e.jsx(ue,{children:e.jsx(ae,{color:"subtone",to:"/login",children:"Back to login"})})]})},validateOnBlur:!0,validationSchema:wt(l)})},zt=()=>{const t=E();return s.useEffect(()=>{t(H()),t(De())},[]),e.jsxs(D,{title:"Forgot Password",children:[e.jsx(re,{children:"Forgot your password?"}),e.jsx(Ue,{children:"Just enter your email address below and we will send you a link to reset your password"}),e.jsx(Kt,{})]})},Gt=()=>{const[t,i]=s.useState(new Set(["newPassword","repeatPassword"])),a=E(),{isLoading:n,reCaptchaKey:c,reCaptchaVisible:l,errorMessage:u,errorMessageCaptcha:o}=N(h=>h.auth),x=z(),{getSearchParam:w}=se(),r=s.useRef(w("email")??""),d=s.useRef(w("userId")??""),y=s.useRef(w("resetPasswordToken")??""),A=s.useRef(null),m=s.useCallback(async({newPassword:h,reCaptcha:I})=>{try{if(n)return;await a(dt({email:r.current,password:h,reCaptcha:I,resetPasswordToken:y.current,userId:d.current})).unwrap(),x.push("/login?SuccessResetPassword=true")}catch{await a(Oe()).unwrap()}},[x,n]),j=s.useCallback((h,I)=>{h&&I("reCaptcha",h)},[]);s.useEffect(()=>{(async()=>{try{await a(mt({email:r.current,resetPasswordToken:y.current,userId:d.current})).unwrap()}catch{x.push("/login")}})()},[]);const b=s.useMemo(()=>({newPassword:"",reCaptcha:"",repeatPassword:""}),[]);return s.useEffect(()=>{const h={duration:8e3};u&&k.error(u,h),o&&k.error(o,h),a(Z("")),a(W(""))},[a,u,o]),e.jsx(fe,{initialValues:b,onSubmit:m,render:({errors:h,handleBlur:I,handleChange:S,handleSubmit:C,touched:p,setFieldValue:O,values:q})=>{const oe=B=>{var M;O(B,"");const f=(M=A.current)==null?void 0:M.querySelector(`#${B}`);
1f&&f.focus()};return e.jsxs(me,{onSubmit:C,ref:A,children:[ut.map(({label:B,name:f})=>e.jsxs(L,{children:[e.jsx(X,{htmlFor:f,children:B}),e.jsx(te,{"aria-errormessage":`${f}-error`,"aria-invalid":!!h[f],id:f,name:f,onBlur:I,onChange:S,suffixContent:e.jsxs(e.Fragment,{children:[e.jsx(le,{name:f,passwordVisibilityState:[t,i]}),h[f]&&p[f]?e.jsxs(_,{onClick:()=>oe(f),children:[e.jsx("span",{className:"visually-hidden",children:"clear value"}),e.jsx(ee,{})]}):null,!h[f]&&p[f]?e.jsx($,{}):null]}),type:t.has(f)?"password":"text",value:q[f]}),h[f]?e.jsx(Q,{"data-error":"true",id:`${f}-error`,children:h[f]}):null]},f)),l?e.jsxs(L,{children:[e.jsx(pe,{"data-testid":"recaptcha-container",children:e.jsx(xe,{onChange:B=>j(B,O),sitekey:c})}),h.reCaptcha?e.jsx(Q,{children:"Please complete the CAPTCHA to finalize the reset password process."}):null]}):null,e.jsx(R,{className:"inline-full",type:"submit",variant:"contained",children:n?e.jsxs(e.Fragment,{children:[e.jsx(he,{size:20}),"Loading"]}):"Submit"})]})},validateOnBlur:!0,validationSchema:yt(l)})},Yt=()=>{const t=E();return s.useEffect(()=>{t(Oe())},[]),e.jsxs(D,{title:"Reset Password",children:[e.jsx(re,{children:"Enter new password"}),e.jsx(Gt,{})]})},Zt=v.div.withConfig({displayName:"Verification.styled__ImageStyled",componentId:"sc-1c28b7b9-0"})(["",""],({$bgnImage:t})=>t&&we(["width:50px;height:50px;margin-block-end:5px;margin-inline:auto;background:no-repeat center/contain url(",");"],t)),Wt=v.h1.withConfig({displayName:"Verification.styled__PanelTitleStyled",componentId:"sc-1c28b7b9-1"})(["margin:10px;padding:10px 0;font-size:",";font-weight:600;line-height:1.1em;color:",";text-align:center;"," ",""],({theme:t})=>t.fonts["2xl"],({theme:t})=>t.colors.getColor("dark",80),de.big`
2    font-size: ${({theme:t})=>t.fonts["3xl"]};
3  `,({isTFAconfirm:t})=>t&&we(["font-weight:400;"])),Ht=v(vt).withConfig({displayName:"Verification.styled__LoaderStyled",componentId:"sc-1c28b7b9-2"})(["color:",";"],({theme:t})=>t.colors.system.brand),qt=v.p.withConfig({displayName:"Verification.styled__PanelSubtitleStyled",componentId:"sc-1c28b7b9-3"})(["padding:0 10px;font-size:",";font-weight:300;line-height:1.3;color:",";text-align:center;"],({theme:t})=>t.fonts.md,({theme:t})=>t.colors.getColor("dark",80));v.div.withConfig({displayName:"Verification.styled__FormWrapperStyled",componentId:"sc-1c28b7b9-4"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:50px 30px;"," animation:"," 0.3s ease-out;"],de.small`
4    padding: 40px 10px 60px;
5  `,({theme:t})=>t.animations.fadeScale);const Jt=()=>{const t=E(),{isLoading:i,zendeskVerificationStatus:a}=N(l=>l.auth),{getSearchParam:n}=se(),c=s.useRef(n("hash"));return s.useEffect(()=>{c.current&&t(pt(c.current))},[]),e.jsx(D,{title:"Email Verification",children:i?e.jsx(Ht,{"data-testid":"loader"}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{$bgnImage:ce[a].icon}),e.jsx(Wt,{children:ce[a].title}),e.jsx(qt,{children:ce[a].subtitle})]})})},ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAADiUlEQVR4nO3dzWrVQBiA4ddTdKGL3oDX4UoEQSuCoiK4EMWb8C7EixBEV4pgURFFkILQixFcKOIf8sGMPeacJDOZv2+SeZftNByehhKSL51jn09fxXQOuAacAD4AL4A/tHw6DtwDLgK/gFfAU3G00A+A+50DvgFuAt8atVO7wD5wtrP4GXBLoEX/bc+R5My+0rBH2zWGZ3oW3l0BNwaOct78lk4W+PC1NIYsXV45IDbs/lyQpR2B/uhwwIa9mSuy9E6gHwOfHBY37KN8kA+ARwL9Q/6GAIcOP9Sw/ZAPzcXEz5X5whdgr2GP5ou8Z2xZrX2jYQ83GZkONA27tyBktkDTsDcKRqYHmob9ryjIDEDTsOMhMwLNgrGjIuMAzQKxoyPjCM2CsJMg4wHNArCTIeMJzYyxkyIzAZoZYidHZiI0M8LOgkwANDPAzoZMIDQVY2dFJgI0FWJnRyYSNBVhF0EmIjQVYBdDJjI0irGLIpMAGoXYxZFJBI0ibBXIJIRGAbYaZBJDUxBbFTIZoCmArQ6ZTNBSLmyVyGSEJgO2WmQyQ5MQWzUyBaBJgK0emULQRMSuApmC0ETArgaZwtAEYFeFLK2//lYyHzh5gelUTcgoOKNtvmd2VcgogsYTeyxVyCiDJhK2OmQUQhOIrRIZpdBMxFaLjGLoKX2Vt5+0fjit0D6XezbV42caoacg29Ria4MOQbapxNYEHQPZpg5bC7TvvYvqBis1QE+5QVTdYGVp6Kl34aqbYi0JHXqrsyrsUtCx7idXg10COvZN+yqwc0OnejKiHjsndOrHT6qxc0HnesanFjsHdO4HqSqxU0OXelqtDjsldOmRAFXYqaC1zF2owU4BrW24RQV2bGitE0TFsWNCax/TKoodC7qWWbhi2DGgaxs4LIIdCl3dVKcpO3YIdK3ItqzYU6FrR7Zlw54CPRdkWxZsX+i5IduSY/tAzxXZlhTbFXruyLZk2C7QS0G2JcEeg14asi069hD0UpFtUbH7oJeObIuGvQ26If9fFOwudEPeXjD2On
5RDHi4I20I3ZLcmY6/M9p37Ddk5X+zn4rwye6R2t+/cVkM+ygf7EnBdoC84LG7Im3md2QL9e2RRQ+7PFfu7QL8eWNCQx3PBfinQT8yWyt0OGrJzFnvbTqcPZbtZ+x9oBPy22alzR/ZIle07Nb9brTTZvP6O2cxe3k2XK473AH8B33TwjfNhGkYAAAAASUVORK5CYII=",Te=v.section.withConfig({displayName:"TFA.styled__InnerWrapperStyled",componentId:"sc-5fd5a13f-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:50px 30px;animation:"," 0.3s ease-out;& > button,a{width:fit-content;margin-block-start:20px;}"],({theme:t})=>t.animations.fadeScale),ye=v.img.withConfig({displayName:"TFA.styled__TFAIconStyled",componentId:"sc-5fd5a13f-1"})(["width:50px;height:50px;margin-block-end:5px;"]),ie=v.h1.withConfig({displayName:"TFA.styled__TitleStyled",componentId:"sc-5fd5a13f-2"})(["margin:10px;padding:10px 0;font-size:",";font-weight:600;color:",";text-align:center;word-break:break-word;"," ",""],({theme:t})=>t.fonts["2xl"],({theme:t})=>t.colors.getColor("dark",80),de.big`
6    font-size: ${({theme:t})=>t.fonts["3xl"]};
7  `,({$isProceedToAccount:t})=>t&&we(["font-weight:400;line-height:1.1;"])),je=v.p.withConfig({displayName:"TFA.styled__SubTitleStyled",componentId:"sc-5fd5a13f-3"})(["padding:0 10px;font-size:",";font-weight:300;line-height:1.3;color:",";text-align:center;"],({theme:t})=>t.fonts.md,({theme:t})=>t.colors.getColor("dark",80)),Ge=s.memo(()=>e.jsxs(e.Fragment,{children:[e.jsx(ye,{alt:"Cross icon",src:ze}),e.jsx(ie,{children:"Your email was not verified"}),e.jsxs(je,{children:["This might be because your verification link expired.",e.jsx("br",{})," Enter your login details one more time to receive a fresh link."]}),e.jsx(R,{to:"/login",variant:"contained",children:"Try again"})]}));Ge.displayName="ErrorMessage";const Ye=s.memo(()=>e.jsxs(e.Fragment,{children:[e.jsx(ye,{alt:"Cross icon",src:ze}),e.jsx(ie,{children:"Oops..."}),e.jsx(je,{children:"Something went wrong..."}),e.jsx(R,{className:"inline-full",to:"/login",variant:"contained",children:"Try again"})]}));Ye.displayName="NoParamsMessage";const Ze=s.memo(({code:t,userId:i})=>{const{isLoading:a,errorVerify2fa:n}=N(o=>o.auth),c=z(),l=E(),u=()=>l(ht({code:t,userId:i}));return s.useEffect(()=>{n&&(c.push("/login/2fa?error=true"),l(H()))},[n]),e.jsxs(e.Fragment,{children:[e.jsx(ie,{$isProceedToAccount:!0,children:"Click the button below to proceed to your Cleeng account"}),e.jsx(R,{disabled:a,onClick:()=>u(),variant:"contained",children:"Continue"})]})});Ze.displayName="ProceedToAccount";const Xt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAL6ElEQVR4nO1dDbBVVRX+7sXHkx8zI1BUDJAZNXmO8KYwMcupSamn00xOP2jqpFCvGaUfGDWhcgSzIqWYCSRozFFxilczBoH9UGFavHqUwETMiEGBoghZwrz34MFrFn6HOVzO2Xudc/Y595xz+WbOiO+ee/ba67v77LXWXnvtyrS130KBMBDAOACjAbwDwFkA3g5gKIDTfd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9dwNP0zKt5/jRR13ck5QcOCLIw1LlCYh+TGKSRBcTI9PIu4uKZr6WngfwC8sydS28kzAjW2thcF3IYh0zfyLZ+vzO48xqmZ9CmrEG4rMt4NEzP4ph0MTtuxFpVBoRL/kqAHdHeOV5GM7cuy5uYJrPX2QaRsVg1gpfwGX1v/BQ9Kg72/vY16uiRAi0qExbq4rZxcV4LkUk3aV3iKR1cmPTFhbD09Syq3A39RjuCW2hPBOVifkmdHLJwBqVjoukAtqwmbV5pvNESdOhhSbINpTLePnRy0yYvawa5eXSDWQFj2G8XM9t+2iNLrGt5yRF2gSBHZCkiCe5BtLu8JXVzPPkznb0PBt62Jf7TMvULpF2tSs/pENf4r6Y7yqOUs4TuinzWPYhE3KQMUEeXuZB46M4oky54PXGTso4ijIHpkaliXoQ5GEv56XR3A7YkZMK9z2U5VrKNreepUGzmINsOMwNSytZP7WNZxmJCWw6kcUl9nDb4SrKYaoAlinyQJAf+2lMPMnR3cISAJMZbL3Qgcx99LE2cif1s9ywq1qCzhp5I8gPUZiEW+TydnmLuSzLy/LqkSV1qcQli2Uy8mqL40qhQiFcyq2JvyRFo6QukZS+KcZRbwD+D0xJrqyrm3H/AAAAAElFTkSuQmCC",_t=t=>{const[i,a]=t.split("@");return e.jsxs(e.Fragment,{children:[i,e.jsx("wbr",{}),"@",a]})},We=s.memo(({email:t})=>e.jsxs(e.Fragment,{children:[e.jsx(ye,{alt:"Check icon",src:Xt}),e.jsxs(ie,{children:["A verification email has been sent to ",t.includes("@")?_t(t):t]}),e.jsxs(je,{children:["Your account is protected by 2-factor authentication.",e.jsx("br",{})," Click the link in the verification email to securely sign in."]})]}));We.displayName="VerificationEmailSent";const $t=()=>{const[t,i]=s.useState(""),[a,n]=s.useState(""),[c,l]=s.useState(""),[u,o]=s.useState(""),x=ge(),w=E(),{redirectUrl:r}=N(y=>y.auth),d=!t&&(!a||!c)&&!u;return s.useEffect(()=>{const y=new URLSearchParams(x.search);i(y.get("email")??""),n(y.get("code")??""),l(y.get("userId")??""),o(y.get("error")??"")},[x.search]),s.useEffect(()=>{r&&(window.location.href=r)},[r]),s.useEffect(()=>{w(H())},[]),r?e.jsx(D,{title:"2FA",children:e.jsx(Te,{children:e.jsx(tt,{})},x.search)}):e.jsx(D,{title:"2FA",children:e.jsxs(Te,{children:[t?e.jsx(We,{email:t}):null,a&&c?e.jsx(Ze,{code:a,userId:c}):null,u?e.jsx(Ge,{}):null,d?e.jsx(Ye,{}):null]},x.search)})},Wa=()=>{const t=z(),{search:i,pathname:a}=ge(),{redirectUrl:n}=N(c=>c.auth);return s.useEffect(()=>{n&&a!=="/register"&&Be(n,i,t.replace)},[n]),e.jsxs(Rt,{children:[e.jsx(U,{exact:!0,path:"/register",children:e.jsx(Ot,{})}),e.jsx(U,{exact:!0,path:"/activate",children:e.jsx(Mt,{})}),e.jsx(U,{exact:!0,path:"/login",children:e.jsx(Qt,{})}),e.jsx(U,{exact:!0,path:"/login/2fa",children:e.jsx($t,{})}),e.jsx(U,{exact:!0,path:"/forgot-password",children:e.jsx(zt,{})}),e.jsx(U,{exact:!0,path:"/reset-password",children:e.jsx(Yt,{})}),e.jsx(U,{exact:!0,path:"/login/verification",children:e.jsx(Jt,{})})]})};export{Wa as Auth};
8//# sourceMappingURL=Auth-CPePSJ8W.js.map

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.