(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[48815],{57094:function(e){e.exports=function(e){return e.split("")}},45534:function(e){e.exports=function(e,n,i){var t=-1,o=e.length;n<0&&(n=-n>o?0:o+n),(i=i>o?o:i)<0&&(i+=o),o=n>i?0:i-n>>>0,n>>>=0;for(var r=Array(o);++t=o?e:t(e,n,i)}},46128:function(e,n,i){var t=i(19257),o=i(45245),r=i(85915),a=i(46235);e.exports=function(e){return function(n){n=a(n);var i=o(n)?r(n):void 0,u=i?i[0]:n.charAt(0),l=i?t(i,1).join(""):n.slice(1);return u[e]()+l}}},45245:function(e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},85915:function(e,n,i){var t=i(57094),o=i(45245),r=i(97549);e.exports=function(e){return o(e)?r(e):t(e)}},97549:function(e){var n="[\\ud800-\\udfff]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",t="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",r="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+i+"|"+t+")"+"?",l="[\\ufe0e\\ufe0f]?",c=l+u+("(?:\\u200d(?:"+[o,r,a].join("|")+")"+l+u+")*"),f="(?:"+[o+i+"?",i,r,a,n].join("|")+")",s=RegExp(t+"(?="+t+")|"+f+c,"g");e.exports=function(e){return e.match(s)||[]}},14574:function(e,n,i){var t=i(46235),o=i(96676);e.exports=function(e){return o(t(e).toLowerCase())}},96676:function(e,n,i){var t=i(46128)("toUpperCase");e.exports=t},79194:function(e,n,i){"use strict";var t=i(57044),o=i(14574),r=i.n(o),a=i(24277);n.Z=function(e,n){return(0,t.Z)({},e,e.rules&&{rules:e.rules.map((function(i){return{type:i.type,value:i.value,errorMessage:n("common:validation.".concat(i.errorId),(0,t.Z)({field:r()(e.field)},i.errorExtraParams))}}))},e.label&&{label:e.type===a.E.Checkbox?e.label:n("form.".concat(e.label))},e.defaultValue&&{defaultValue:e.defaultValue},e.placeholder&&{placeholder:e.placeholder})}},6507:function(e,n,i){"use strict";var t=i(57044),o=i(14574),r=i.n(o),a=i(48559),u=a.Z.InvalidField;n.Z=function(e,n,i,o){return Object.values(a.Z).includes(e)?i("common:validation.".concat(e),(0,t.Z)({field:r()(n)},o)):i("common:validation.".concat(u),{field:r()(n)})}},71522:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return F}});var t=i(57044),o=i(16946),r=i(57611),a=i(61395),u=i(99968),l=i(79194),c=i(47995),f=i(93267),s=i.n(f),d=i(1997),m=i(51726),_=i(67597),v=i(67385),p=i(6507),g=i(39399),x=i(9740),h=i(37572),Z=i(12195),C=i(48559),b=i(12253),j=i(24277),S=function(e){var n=e.emailFormField,i=(0,_.useState)(!1),t=i[0],o=i[1],l=(0,u.kY)().mutate,f=(0,_.useState)(),S=f[0],F=f[1],k=(0,a.Z)("common").t,E=(0,_.useState)(0),N=E[0],y=E[1],B={field:"code",type:j.E.Number,placeholder:k("form.code"),rules:[{type:b.S.Required,value:!0,errorMessage:(0,p.Z)(C.Z.RequiredField,"code",k)}]};return(0,r.jsxs)("div",{className:s().container,children:[(0,r.jsx)("h2",{className:s().title,children:k("email-verification.email-verification")}),t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:s().emailSent,children:(0,r.jsx)(v.Z,{i18nKey:"common:email-verification.email-sent",values:{email:S},components:{strong:(0,r.jsx)("strong",{className:s().strong})}})}),(0,r.jsx)(c.Z,{formFields:[B],onSubmit:function(e){return(0,Z.dz)("verification_code"),(0,x.kK)({email:S,verificationCode:e.code.toString()}).then((function(){l((0,h.bo)())})).catch(function(){var e=(0,d.Z)((function(e){return(0,m.__generator)(this,(function(n){return[2,{errors:{code:null===e||void 0===e?void 0:e.message}}]}))}));return function(n){return e.apply(this,arguments)}}())},actionText:k("common:email-verification.verify-code")}),(0,r.jsx)(g.Z,{onResendButtonClicked:function(){(0,x.x8)(S),y((function(e){return e+1}))}},N)]}):(0,r.jsx)(c.Z,{formFields:[n],onSubmit:function(e){(0,Z.dz)("email_verification"),(0,x.x8)(e.email),o(!0),F(e.email)},actionText:k("submit")})]})},F=function(e){var n=e.requiredFields,i=(0,u.kY)().mutate,f=(0,a.Z)("common").t,d=n.find((function(e){return"email"===e.field}));return!!d?(0,r.jsx)(S,{emailFormField:(0,l.Z)((0,o.Z)((0,t.Z)({},d),{placeholder:f("form.email")}),f)}):(0,r.jsxs)("div",{className:s().container,children:[(0,r.jsx)("h2",{className:s().title,children:f("complete-sign-up")}),(0,r.jsx)(c.Z,{formFields:n.map((function(e){return(0,l.Z)((0,o.Z)((0,t.Z)({},e),{placeholder:f("form.".concat(e.field))}),f)})),onSubmit:function(e){(0,Z.dz)("complete_signUp"),(0,x.kK)(e).then((function(){i((0,h.bo)())}))},actionText:f("submit")})]})}},39399:function(e,n,i){"use strict";var t=i(57611),o=i(67597),r=i(61395),a=i(85494),u=i(11203),l=i.n(u);n.Z=function(e){var n=e.onResendButtonClicked,i=e.initialRemainingTimeInSeconds,u=void 0===i?60:i,c=(0,o.useState)(u),f=c[0],s=c[1],d=(0,r.Z)("common").t,m=f>0;return(0,o.useEffect)((function(){var e=setInterval((function(){s((function(e){return e>0?e-1:e}))}),1e3);return function(){return clearInterval(e)}}),[]),(0,t.jsxs)("div",{className:l().resendEmailSection,children:[(0,t.jsx)("div",{children:d("email-verification.check-spam")}),(0,t.jsx)(a.ZP,{className:l().resendButton,isDisabled:m,variant:a.Wu.Outlined,onClick:n,children:m?d("email-verification.resend-email-in",{remainingTime:f}):d("email-verification.resend-email")})]})}},48559:function(e,n){"use strict";var i;!function(e){e.InvalidEmail="invalid-email",e.RequiredField="required-field",e.InvalidField="invalid-field",e.MaximumLength="maximum-length",e.MinimumLength="minimum-length"}(i||(i={})),n.Z=i},93267:function(e){e.exports={container:"CompleteSignupForm_container__WWUVf",title:"CompleteSignupForm_title__nNTvk",strong:"CompleteSignupForm_strong__XIUxt",emailSent:"CompleteSignupForm_emailSent__Nlle8"}},11203:function(e){e.exports={outerContainer:"login_outerContainer__A5dFD",innerContainer:"login_innerContainer__zmY_3",cta:"login_cta__wFjiE",title:"login_title__2X_RY",loginButton:"login_loginButton__dummI",googleButton:"login_googleButton__C3bbp",facebookButton:"login_facebookButton__fBPjs",emailSentContainer:"login_emailSentContainer__WuCgZ",paragraphContainer:"login_paragraphContainer__pVbiZ",emailContainer:"login_emailContainer___pCrO",verificationCode:"login_verificationCode__7ykje",resendEmailSection:"login_resendEmailSection__QpqqL",resendButton:"login_resendButton__jWH7R",privacyText:"login_privacyText__n_Ss5",bold:"login_bold__MqfjF"}}}]); //# sourceMappingURL=48815.6cc98b1473e88fd4.js.map