1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6724],{16125:(e,t,r)=>{"use strict";r.d(t,{N:()=>i,q:()=>s});var n=r(18153),a=r(26249);let i={min:e=>(0,n.Y)(a.Z,{i18nKey:"common:password.hints.min",attributes:{length:e},children:"{{length}} characters without accents"}),max:e=>(0,n.Y)(a.Z,{i18nKey:"common:password.hints.max",attributes:{length:e},children:"max {{length}} characters"}),numerical:()=>(0,n.Y)(a.Z,{i18nKey:"common:password.hints.numerical",children:"1 numerical (0-9)"}),lowerAndUpper:()=>(0,n.Y)(a.Z,{i18nKey:"common:password.hints.lowerAndUpper",children:"1 lowercase (a-z) and 1 uppercase (A-Z)"}),specialCharacter:()=>(0,n.Y)(a.Z,{i18nKey:"common:password.hints.specialCharacter",children:"1 special character (^$*.[]{}()?\"!@#%&/\\,<>':;|_~\\`=+-)"})},s=(e,t,r)=>e||void 0!==t?void 0===t?"ok":r?t[r]?"error":"ok":(console.warn("Password hints invalid arguments"),"info"):"info"},18770:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(18153),a=r(67621),i=r(14232),s=r(89099),o=r(88992),l=r(39091),d=r(71090),c=r(26249),h=r(38799),u=r(56382),w=r(38192),m=r(96969),p=r(39117),g=r(10599),C=r(35186),v=r(73251),f=r(16125);let A=l.Ik({newPassword:l.Yj().matchesCognitoMin(16).matchesCognitoLowerAndUpper().matchesCognitoNumerical().matchesCognitoSpecial().max(99).default("")}),Y=e=>{var t,r,a,l,Y,y;let{userChallenge:L}=e,P=(0,s.useRouter)(),{completeNewPassword:b}=(0,g.A)(),{handleSubmit:x,formState:{errors:N,isSubmitting:S,dirtyFields:_,isValid:K},register:M,subscribe:T,trigger:k}=(0,o.mN)({mode:"onTouched",criteriaMode:"all",defaultValues:A.getDefault(),resolver:(0,d.t)(A)}),[D,E]=(0,h.A)(async e=>{let{newPassword:t}=e,r=await b(L.username,L.challenge.session,t);if("authenticated"===r.type)return await P.push("/admin/merchants");if("signigIn"===r.type&&"SMS_MFA"===r.subtype)return C.default.userChallenge=r.userChallenge,await P.push("/admin/two-step-verification");throw Error("Unhandled auth state: ".concat(r.type))});(0,i.useEffect)(()=>{let e=T({name:"newPassword",formState:{values:!0},callback:()=>{k("newPassword")}});return()=>e()},[T,k]);let V=S&&K;return(0,n.Y)(p.Ay,{title:(0,n.Y)(c.A,{i18nKey:"admin:auth.forceChangePassword.title",children:"Change password"}),subTitle:(0,n.Y)(c.A,{i18nKey:"admin:auth.forceChangePassword.subTitle",children:"Due to security reasons you need to create your own password."}),children:(0,n.FD)("form",{onSubmit:x(E),children:[(0,n.FD)(u.zB,{size:"medium",children:[(0,n.Y)(u.s3,{disabled:V,label:(0,n.Y)(c.A,{i18nKey:"admin:auth.forceChangePassword.newPassword.label",children:"Password"}),...M("newPassword"),error:!!N.newPassword}),(0,n.Y)(v.A,{variant:(0,f.q)(_.newPassword,null==(t=N.newPassword)?void 0:t.types,"matchesCognitoMin"),text:f.N.min(16)}),(0,n.Y)(v.A,{variant:(0,f.q)(_.newPassword,null==(r=N.newPassword)?void 0:r.types,"matchesCognitoLowerAndUpper"),text:f.N.lowerAndUpper()}),(0,n.Y)(v.A,{variant:(0,f.q)(_.newPassword,null==(a=N.newPassword)?void 0:a.types,"matchesCognitoNumerical"),text:f.N.numerical()}),(0,n.Y)(v.A,{variant:(0,f.q)(_.newPassword,null==(l=N.newPassword)?void 0:l.types,"matchesCognitoSpecial"),text:f.N.specialCharacter()}),!!(null==(y=N.newPassword)||null==(Y=y.types)?void 0:Y.max)&&(0,n.Y)(v.A,{variant:"error",text:f.N.max(99)})]}),!!D&&(0,n.Y)(p.yh,{children:D}),(0,n.Y)(m.A,{type:"submit",isLoading:S,size:"large",fullWidth:!0,children:(0,n.Y)(c.A,{i18nKey:"admin:auth.forceChangePassword.submit",children:"Create"})}),(0,n.Y)(p.L,{children:(0,n.FD)(c.A,{i18nKey:"admin:auth.forceChangePassword.footer.contactSupportCentre",children:["Need help with Log in?"," ",(0,n.Y)(w.A,{href:"/admin/contact-support-centre",variant:"standalone",children:"Contact support centre"})]})})]})})};var y=r(86662);let L=()=>L.userChallenge?(0,n.Y)(a.A,{children:(0,n.Y)(Y,{userChallenge:L.userChallenge})}):(0,n.Y)(y.A,{});L.userChallenge=void 0;let P=L},23181:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(18153);let a=e=>{let{error:t}=e;return t?(0,n.Y)(n.FK,{children:t.message}):null}},35186:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(18153),a=r(67621),i=r(89099),s=r(88992),o=r(39091),l=r(63456),d=r(71090),c=r(38799),h=r(26249),u=r(23181),w=r(56382),m=r(96969),p=r(38192),g=r(39117),C=r(10599);let v=o.Ik({code:o.Yj().length(6).required().default("")}),f=e=>{var t;let{userChallenge:r}=e,a=(0,i.useRouter)(),{t:o}=(0,l.Bd)(),{confirmSignInWithSmsMfaCode:f,confirmSignInWithTokenMfaCode:A,state:Y}=(0,C.A)(),y=(e=>"signigIn"==e.type&&"SMS_MFA"==e.subtype?"sms":"signigIn"==e.type&&"SOFTWARE_TOKEN_MFA"==e.subtype?"totp":void 0)(Y),{handleSubmit:L,formState:{errors:P,isSubmitting:b},control:x}=(0,s.mN)({mode:"onTouched",defaultValues:v.getDefault(),resolver:(0,d.t)(v)}),[N,S]=(0,c.A)(async e=>{let{code:t}=e;switch(y){case"sms":await f(r.username,r.challenge.session,t);break;case"totp":await A(r.username,r.challenge.session,t)}await a.push("/admin/merchants")}),_="totp"===y?o("admin:auth.twoStepVerification.subTitleAuthenticator","Please enter the code from your associated authenticator app"):"sms"===y?o("admin:auth.twoStepVerification.subTitleCodeDestination","Please enter the code you were sent to {{codeDestination}}",{codeDestination:(null==(t=r.challenge.challengeParams)?void 0:t.CODE_DELIVERY_DESTINATION)||""}):"";return(0,n.Y)(g.Ay,{title:(0,n.Y)(h.A,{i18nKey:"admin:auth.twoStepVerification.title",children:"Enter security code"}),subTitle:_,children:(0,n.FD)("form",{onSubmit:L(S),children:[(0,n.Y)(w.zB,{size:"medium",children:(0,n.Y)(s.xI,{render:e=>{let{field:t}=e;return(0,n.Y)(w.GQ,{onChange:t.onChange,value:t.value,error:!!P.code,helperText:(0,n.Y)(u.A,{error:P.code})})},name:"code",control:x})}),!!N&&(0,n.Y)(g.yh,{children:N}),(0,n.Y)(m.A,{type:"submit",isLoading:b,size:"large",fullWidth:!0,children:(0,n.Y)(h.A,{i18nKey:"admin:auth.twoStepVerification.confirm",children:"Confirm"})}),(0,n.Y)(g.L,{children:(0,n.Y)(p.A,{href:"/admin/login",variant:"standalone",children:(0,n.Y)(h.A,{i18nKey:"admin:auth.twoStepVerification.footer.backToLogin",children:"Back to Log in page"})})})]})})};var A=r(86662);let Y=()=>Y.userChallenge?(0,n.Y)(a.A,{children:(0,n.Y)(f,{userChallenge:Y.userChallenge})}):(0,n.Y)(A.A,{});Y.userChallenge=void 0;let y=Y},41962:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(18153);let a=e=>(0,n.Y)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.66675 7.99935C2.66675 10.9449 5.05456 13.3327 8.00008 13.3327C10.9456 13.3327 13.3334 10.9449 13.3334 7.99935C13.3334 5.05383 10.9456 2.66602 8.00008 2.66602C5.05456 2.66602 2.66675 5.05383 2.66675 7.99935ZM5.73734 6.49085L6.49159 5.73661L8.00008 7.2451L9.50858 5.73661L10.2628 6.49085L8.75433 7.99935L10.2628 9.50784L9.50857 10.2621L8.00008 8.7536L6.49159 10.2621L5.73734 9.50784L7.24583 7.99935L5.73734 6.49085Z",fill:"currentColor"})})},51036:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/force-change-password",function(){return r(18770)}])},73251:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(18153),a=r(38993),i=r(4728),s=r(74669),o=r(41962);let l=(0,a.AH)("display:flex;align-items:center;","formHelperCss"),d=(0,a.AH)("flex-shrink:0;","iconCss"),c={info:{variantCss:e=>(0,a.AH)("color:",e.colors.grey[60],";","variantCss"),Icon:e=>(0,n.Y)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.66499 8C2.66499 10.9464 5.05355 13.335 7.99999 13.335C10.9464 13.335 13.335 10.9464 13.335 8C13.335 5.05356 10.9464 2.665 7.99999 2.665C5.05355 2.665 2.66499 5.05356 2.66499 8ZM8 6.3995C7.55803 6.3995 7.19975 6.04122 7.
119975 5.59925C7.19975 5.15728 7.55803 4.799 8 4.799C8.44196 4.799 8.80025 5.15728 8.80025 5.59925C8.80025 6.04122 8.44196 6.3995 8 6.3995ZM7.4665 9.6005V8H6.933V6.933H8C8.29464 6.933 8.5335 7.17185 8.5335 7.4665V9.6005H9.6005V10.6675H6.3995V9.6005H7.4665Z",fill:"currentColor"})})},ok:{variantCss:e=>(0,a.AH)("color:",e.colors.utilitarian.green.default,";","variantCss"),Icon:s.A},error:{variantCss:e=>(0,a.AH)("color:",e.colors.utilitarian.red.default,";","variantCss"),Icon:o.A}},h=e=>{let{variant:t,text:r}=e,{Icon:a,variantCss:s}=c[t];return(0,n.FD)(i.A,{css:[l,s],children:[(0,n.Y)(a,{css:d})," ",r]})}},74669:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(18153);let a=e=>(0,n.Y)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.66675 7.99935C2.66675 5.05535 5.05608 2.66602 8.00008 2.66602C10.9441 2.66602 13.3334 5.05535 13.3334 7.99935C13.3334 10.9433 10.9441 13.3327 8.00008 13.3327C5.05608 13.3327 2.66675 10.9433 2.66675 7.99935ZM5.06675 8.26602L5.821 7.51177L7.32949 9.02026L10.3465 6.00327L11.1007 6.75752L7.32949 10.5288L6.95237 10.1516L6.57524 9.77451L5.06675 8.26602Z",fill:"currentColor"})})},86662:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(89099);let a=()=>{let e=(0,n.useRouter)();return e.isReady&&e.push("/admin/login"),null}}},e=>{e.O(0,[746,9509,5549,8389,2390,603,5518,636,6593,8792],()=>e(e.s=51036)),_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.