1export const __webpack_id__=8067;export const __webpack_ids__=[8067];export const __webpack_modules__={64322:(e,i,n)=>{n.r(i),n.d(i,{EmailVerification:()=>ce,default:()=>le});var t={};n.r(t),n.d(t,{defaultState:()=>j,reducer:()=>C});var a,o=n(63412),s=n.n(o),r=n(45932),c=n.n(r),l=n(74848),d=n(10782),u=n(9982),m=n(15245),f=n(40476),v=n(15424),h=n(30514),_=n(37489),g=n(35103),p=n(84974),E=n(96540),x=n(88152),y=n(27411),b=n(53108),w=n(97459);!function(e){e.SET_DATA="EMAIL_VERIFICATION:DATA:SET"}(a||(a={}));const N=e=>({type:a.SET_DATA,payload:e});var S=n(74294),V=n(1932);const j={errorMessage:"",isEmailSent:!1,isEmailVerified:!1,isLoaderShown:!0,isLoading:!1,isResendWarningShown:!1},C=e=>(0,V.jM)(((i,n)=>{switch(n.type){case a.SET_DATA:case a.SET_DATA+e:Object.assign(i,Object.assign({},n.payload))}}),j),{withDynamicReducer:R,useDynamicReducerSelector:L,useDynamicReducerDispatch:M}=(0,S.X)("EmailVerification",t);var A=function(e,i,n,t){return new(n||(n=Promise))((function(a,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(i){i(e)}))}(e.value).then(s,r)}c((t=t.apply(e,i||[])).next())}))};var I=n(53806),D=function(e,i,n,t){return new(n||(n=Promise))((function(a,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(i){i(e)}))}(e.value).then(s,r)}c((t=t.apply(e,i||[])).next())}))};var T=n(83312),k=function(e,i,n,t){return new(n||(n=Promise))((function(a,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(i){i(e)}))}(e.value).then(s,r)}c((t=t.apply(e,i||[])).next())}))};const P=()=>{const e=(0,p.NR)(),i=M(),n=(0,b.Z)(),t=(0,T.a)(),{showComponentMessage:a}=(0,p.zi)(),o=(()=>{const e=(0,I.B)(),i=(0,u.GV)(c()("casinoName"));return(0,E.useCallback)((n=>D(void 0,[n],void 0,(function*({sendMail:n=1,template:t}){const{data:a}=yield e(Object.assign({ID:35559,responses:[35560,35561],description:"Create Email Token",sendMail:n,casinoName:i},t?{template:t}:{}));return a}))),[e,i])})(),{emailTemplateName:s,verification:r}=(0,p.TP)(),l=L(c()("isResendWarningShown")),d="verificationLink"===r;return(0,E.useCallback)((r=>k(void 0,[r],void 0,(function*({isResend:r}){var c,u;if(!l){i(N({isLoading:!0,errorMessage:""}));try{const n=yield o({template:s}),{showMessageNotificationInfo:l}=null!==(u=null===(c=null==n?void 0:n.actions)||void 0===c?void 0:c.find((e=>e.showMessageNotificationInfo)))&&void 0!==u?u:{},{message:m}=null!=l?l:{};d?a(m||e("success")):i(N({isEmailSent:!0,isResendWarningShown:!0})),r&&m&&t(m,{variant:"success"})}catch(e){const t=n(e);i(N({errorMessage:t}))}finally{i(N({isLoading:!1}))}}}))),[i,s,n,l,d,o,a,t,e])};var W=n(43382),$=function(e,i,n,t){return new(n||(n=Promise))((function(a,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):function(e){return e instanceof n?e:new n((function(i){i(e)}))}(e.value).then(s,r)}c((t=t.apply(e,i||[])).next())}))};var F=n(68767),B=n(57182);var z=n(90952),O=n(95501),q=n(75132),K=n(64853);const X=()=>{const e=(0,p.NR)(),i=M(),{resetCodeTimeout:n=0}=(0,p.TP)(),t=L(c()("isResendWarningShown")),[a,o]=(0,E.useState)(n);return(0,E.useEffect)((()=>{if(!t)return void o(n);const e=setInterval((()=>{o((e=>e>=1?e-1:0))}),1e3);return()=>clearInterval(e)}),[t,n]),(0,E.useEffect)((()=>{t&&0===a&&i(N({isResendWarningShown:!1}))}),[a,t,i]),t?(0,l.jsx)(K.A,{message:e("code.resendWarning",[a])}):null},Z=(0,E.memo)(X),U="VerificationCodeControls__resendLink--nd7",G="VerificationCodeControls__isResendDisabled--1id",H="VerificationCodeControls__control--2jF",J="VerificationCodeControls__controls--2UU",Q="VerificationCodeControls__submit--2X3",Y=({submitting:e,handleSubmit:i})=>{const n=(0,p.NR)(),t=P(),{isLoading:a,isResendWarningShown:o}=L(s()(["isLoading","isResendWarningShown"])),{values:{code:r=""}}=(0,z.lN)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Z,{}),(0,l.jsx)(q.p,{"aria-label":n("code.label"),className:`${H} cms-email-verification-input`,inputMode:"numeric",isLabelAsteriskEnabled:!0,label:n("code.label"),name:"code",placeholder:n("c
1ode.placeholder"),type:"text"}),(0,l.jsxs)("div",{className:U,children:[n("code.didNotReceive"),(0,l.jsx)(O.N,{className:`${o||a||e?G:""}`,onClick:()=>t({isResend:!0}),children:n("code.resend")})]}),(0,l.jsx)("div",{className:J,children:(0,l.jsx)(v.$,{isNew:!0,size:"large",type:"button",onClick:i,className:Q,disabled:a||e||!r.length,children:n("code.button.submit")})})]})},ee=(0,E.memo)(Y),ie="EmailVerification__container--3x7",ne="EmailVerification__info--3VI",te="EmailVerification__description--ut4",ae="EmailVerification__icon--1r9",oe="EmailVerification__error--CaX",se="EmailVerification__controls--2Pl",re="EmailVerification__submit--9LL",ce=(0,_.m)({isForLoggedIn:!0,tkPrefix:"playtech.mobile.email-verification."})(R()((()=>{const{email:e=""}=(0,u.Cn)(c()("userDetails")),i=(0,p.NR)(),n=(()=>{const e=M(),i=(0,b.Z)(),n=(0,W.i)(),t=(0,x.x)();return(0,E.useCallback)((a=>$(void 0,[a],void 0,(function*({code:a}){e(N({errorMessage:""}));try{yield n({code:a});const{markEmailVerified:i=0}=yield t({requestedPlayerData:[w.B5.MARK_EMAIL_VERIFIED]});e(N({isEmailVerified:Boolean(Number(i))}))}catch(n){const t=i(n);e(N({errorMessage:t}))}}))),[n,e,i,t])})(),t=(()=>{const e=(0,B.N)();return(0,E.useMemo)((()=>({code:[(0,F.required)(),(0,F.int)({error:e("code.validation.int")}),(0,F.length)({min:6,max:6,error:e("code.validation.length")})]})),[e])})(),a=P(),{initialEmailSent:o,verification:r}=(0,p.TP)(),{errorMessage:_,isEmailSent:S,isEmailVerified:V,isLoading:j,isLoaderShown:C}=L(s()(["errorMessage","isEmailSent","isEmailVerified","isLoading","isLoaderShown"])),R="verificationCode"===r&&(o||S);return(()=>{const e=(0,y.a)(),{showComponentError:i}=(0,p.zi)(),n=M(),t=(0,x.x)(),a=(0,b.Z)();(0,E.useEffect)((()=>{(()=>{A(void 0,void 0,void 0,(function*(){try{const{markEmailVerified:i="0"}=yield t({requestedPlayerData:[w.B5.MARK_EMAIL_VERIFIED]});e()&&n(N({isEmailVerified:Boolean(Number(i))}))}catch(n){const t=a(n);e()&&i(t)}finally{e()&&n(N({isLoaderShown:!1}))}}))})()}),[n,a,t,e,i])})(),C?(0,l.jsx)(h.a,{}):V?(0,l.jsxs)("div",{className:`${ie} ${ne} cms-email-verification-container`,children:[(0,l.jsx)(f.I,{className:`${ae} cms-email-verification-verified-icon`,type:"success"}),(0,l.jsx)("div",{children:i("verified")})]}):(0,l.jsx)("div",{className:`${ie} cms-email-verification-container`,children:(0,l.jsx)(d.A,{initialValues:{code:""},onSubmit:n,validationConfig:t,render:({submitting:n,handleSubmit:t})=>(0,l.jsxs)("form",{className:"cms-email-verification-form",onSubmit:e=>e.preventDefault(),children:[(0,l.jsx)("p",{className:te,children:(0,l.jsx)(m.F,{replacers:[e],tKey:`playtech.mobile.email-verification.description.${r}`})}),_&&(0,l.jsx)(g.W,{className:oe,message:_}),!o&&!S&&(0,l.jsx)("div",{className:se,children:(0,l.jsx)(v.$,{className:re,disabled:j,isNew:!0,onClick:a,size:"large",type:"button",children:i("submit")})}),R&&(0,l.jsx)(ee,{submitting:n,handleSubmit:t})]})})})}))),le=ce}}; 2//# sourceMappingURL=email-verification.64fe2bb0f6b091d46020.chunk.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.