1"use strict";(self.webpackChunkfront_end_ui=self.webpackChunkfront_end_ui||[]).push([[9401],{92319(e,t,a){a.d(t,{A:()=>r});var s=a(77440);const r={aboutUs:(e,t)=>{const a="/content/api/common/about-us/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},ctpfPolicy:(e,t)=>{const a="/content/api/common/aml-ctpf-policy/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},ruleBuySell:(e,t)=>{const a="/content/api/common/buy-sell-rule/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},coinListingRules:(e,t)=>{const a="/content/api/common/coin-listing-rule/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},termAndCondition:(e,t)=>{const a="/content/api/common/term-and-condition/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},privacyPolicy:(e,t)=>{const a="/content/api/common/privacy-policy/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},fatca:(e,t)=>{const a="/content/api/common/fatca-content/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},feeContent:(e,t)=>{const a="/content/api/common/fee-content/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(a,{params:t})},financialReport:()=>s.A.get("/content/api/common/annual-financial-report/"),serviceReport:()=>s.A.get("/content/api/common/monthly-financial-report/"),marketingBanner:e=>{const t="/content/api/common/marketing-banner/".concat(null!==e&&void 0!==e?e:"en");return s.A.get(t)}}},76241(e,t,a){a.d(t,{A:()=>i});var s=a(52765),r=a(50119),n=a(72004),l=a(26308),c=a(9950),o=a(44414);const i=e=>{let t=e.password,a=e.className;const i=(0,r.a$)(),d=(0,c.useCallback)((e=>e.toUpperCase()!==e),[]),u=(0,c.useCallback)((e=>e.toLowerCase()!==e),[]),p=(0,c.useCallback)((e=>e.split("").some((e=>!Number.isNaN(Number(e))))),[]),m=(0,c.useCallback)((e=>e.split("").some((e=>l.xi.includes(e)))),[]),h=(0,c.useCallback)((e=>" "!==e[e.length-1]),[]),g=(0,c.useMemo)((()=>({one:(null===t||void 0===t?void 0:t.length)>=12,two:d(t)&&u(t),three:p(t),four:m(t)&&h(t)})),[t,d,u,p,m,h]);return(0,o.jsxs)("div",{className:(0,n.A)("password-checker",a),children:[(0,o.jsx)("span",{children:i("password-checker.title")}),(0,o.jsx)(s.A,{checked:g.one,children:i("password-checker.rule-1")}),(0,o.jsx)(s.A,{checked:g.two,children:i("password-checker.rule-2")}),(0,o.jsx)(s.A,{checked:g.three,children:i("password-checker.rule-3")}),(0,o.jsx)(s.A,{checked:g.four,children:i("password-checker.rule-4")})]})}},22538(e,t,a){a.d(t,{A:()=>l});var s=a(72004),r=(a(9950),a(44414));const n=[{key:"level-one",value:0},{key:"level-two",value:1},{key:"level-three",value:2}],l=e=>{let t=e.level;return(0,r.jsx)("div",{className:"level__container",children:n.map((e=>{let a=e.key,n=e.value;return(0,r.jsx)("div",{className:(0,s.A)("indicator",{weak:n<=t&&0===n,medium:n<=t&&1===n,strong:n<=t&&2===n})},a)}))})}},19401(e,t,a){a.r(t),a.d(t,{default:()=>le});var s=a(97e3),r=a(50119),n=a(62601),l=a(12756),c=a(38981),o=a(9950),i=a(95443),d=a(68895),u=a(79894),p=a(41413),m=a(31395),h=a(52662),g=a(83696),A=a(55428),x=a(97592),v=a(59724),f=a(72004),y=a(26699),b=a(15111),j=a(3345),w=a(20880),N=a(24378),C=a(35046),k=a(69565),S=a(44719),T=a(48538),E=a(17811),_=a(80737),R=a(92319),F=a(74364),I=a(75851),G=a(15803),L=a(44414);const V=e=>{var t;let a=e.isShowing,l=e.parentCallback,c=e.handleCancel;const i=(0,r.a$)(),d=(0,G.A)().i18n,u=(0,o.useState)(),p=(0,s.A)(u,2),m=p[0],h=p[1],g=(0,o.useState)(!1),A=(0,s.A)(g,2),x=A[0],v=A[1],y=(0,o.useState)(),b=(0,s.A)(y,2),j=b[0],w=b[1],N=(0,o.useRef)(),C=(0,o.useRef)(),V=(0,o.useRef)(),O=(0,o.useCallback)((async()=>{const e=(await R.A.fatca(d.language)).body;h(e||{})}),[]);(0,o.useEffect)((()=>{O().catch((()=>{}))}),[d.language]);(0,o.useEffect)((()=>{if(N.current){const e=N.current,t=e.scrollHeight,a=e.clientHeight;v(t>a)}}),[]);return(0,L.jsx)("div",{children:(0,L.jsx)(S.A,{open:a,className:"fatca-modal",closable:!1,footer:!1,children:(0,L.jsx)("div",{className:"fatca flex-col g-30",children:(0,L.jsxs)("div",{className:"flex-col g-10",children:[(0,L.jsxs)("div",{className:"fatca__header",children:[(0,L.jsx)(F.A,{src:n.icons.fatcaTerm,alt:"play store download",customStyle:{width:"60px",height:"110px"}}),(0,L.jsx)("div",{className:"text-center",children:(0,L.jsx)("span",{className:(0,f.A)("text-white-2 cursor-d",I.A.h2),children:i("register.fatca.title")})})]}),(0,L.jsxs)("div",{className:"fatca__content-wrapper",onScroll:()=>{if(N.current){const e=N.current,t=e.scrollTop,a=e.scrollHeight,s=e.clientHeight;let r=0;"number"===typeof t&&"number"===typeof s&&(r=t+s),v(r>a-20)}},ref:N,children:[(0,L.jsx)("div",{ref:C}),(0,L.jsx)("div",{className:"text-greyish fatca__content",dangerouslySetInnerHTML:{__html:null!==(t=null===m||void 0===m?void 0:m.content)&&void 0!==t?t:""}}),(0,L.jsx)(T.A,{className:"button-scroll",onClick:x?()=>{var e;null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}:()=>{var e;null===(e=V.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},children:(0,L.jsx)(F.A,{className:"btn-delete cursor-p",src:x?n.icons.arrowUpBlack:n.icons.arrowDownBlack,alt:"delete icon"})}),(0,L.jsx)("div",{ref:V})]}),(0,L.jsx)("div",{className:"text-greyish radiobox__group",children:(0,L.jsx)(E.Ay.Group,{onChange:e=>{w(e.target.value)},children:(0,L.jsxs)(_.A,{direction:"vertical",children:[(0,L.jsx)(E.Ay,{value:1,children:i("register.fatca.confirmation-1")}),(0,L.jsx)(E.Ay,{value:2,children:i("register.fatca.confirmation-2")})]})})}),(0,L.jsxs)("div",{className:"button-wrapper",children:[(0,L.jsx)(T.A,{className:(0,f.A)("br-30 bd-none w-100-p !h-45 ".concat(j?"button-secondary":"button-disable-secondary"),I.A.p1),onClick:()=>{1===j&&l(),2===j&&(c(),(0,k.tm)({title:i("register.modal-not-support.title"),message:i("register.modal-not-support.message")}))},disabled:!j,children:i("button.iAgree")}),(0,L.jsx)(T.A,{className:(0,f.A)("br-30 bd-none button-decline",I.A.p1),onClick:c,children:i("button.iDeclined")})]})]})})})})},O={content:"",languageCode:"",lastModifiedDate:"",title:""},H=e=>{var t,a;let l=e.isShowing,c=e.parentCallback,i=e.handleCancel;const d=(0,r.a$)(),u=(0,G.A)().i18n,p=(0,o.useState)(!1),m=(0,s.A)(p,2),h=m[0],g=m[1],A=(0,o.useState)(O),x=(0,s.A)(A,2),v=x[0],y=x[1],b=(0,o.useState)(O),j=(0,s.A)(b,2),w=j[0],N=j[1],C=(0,o.useRef)(),k=(0,o.useRef)(),E=(0,o.useRef)(),_=(0,o.useCallback)((async()=>{const e=(await R.A.privacyPolicy(u.language)).body;y(e||O)}),[]),V=(0,o.useCallback)((async()=>{const e=(await R.A.termAndCondition(u.language)).body;N(e||O)}),[]);(0,o.useEffect)((()=>{_(),V()}),[u.language]),(0,o.useEffect)((()=>
1{if(C.current){const e=C.current,t=e.scrollHeight,a=e.clientHeight;g(t>a)}}),[]);const H=()=>{var e;return null===(e=k.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth"})};return(0,o.useEffect)((()=>{l||H()}),[l]),(0,L.jsx)("div",{children:(0,L.jsxs)(S.A,{destroyOnClose:!0,open:l,className:"privacy-policy-modal",closable:!1,children:[(0,L.jsxs)("div",{className:"!py-6",children:[(0,L.jsx)(F.A,{src:n.icons.lockWithShadow,alt:"play store download",customStyle:{width:"60px",height:"110px"}}),(0,L.jsx)("div",{className:"text-center",children:(0,L.jsx)("span",{className:(0,f.A)("text-white-2 cursor-d",I.A.h2),children:d("register.policy.title")})})]}),(0,L.jsxs)("div",{className:"privacy-policy flex-col g-30",children:[(0,L.jsxs)("div",{className:"privacy-policy__wrapper",onScroll:()=>{if(C.current){const e=C.current,t=e.scrollTop,a=e.scrollHeight,s=e.clientHeight;let r=0;"number"===typeof t&&"number"===typeof s&&(r=t+s),g(r>a-20)}},ref:C,children:[(0,L.jsx)("div",{ref:k}),(0,L.jsx)("span",{className:(0,f.A)("title text-white-2",I.A.p2),children:w.title}),(0,L.jsx)("div",{className:"privacy-policy__content",dangerouslySetInnerHTML:{__html:null!==(t=w.content)&&void 0!==t?t:""}}),(0,L.jsx)("span",{className:(0,f.A)("title text-white-2",I.A.p2),children:v.title}),(0,L.jsx)("div",{className:"privacy-policy__content",dangerouslySetInnerHTML:{__html:null!==(a=v.content)&&void 0!==a?a:""}}),(0,L.jsx)("div",{ref:E})]}),(0,L.jsx)(T.A,{className:"button-scroll",onClick:h?H:()=>{var e;return null===(e=E.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth"})},children:(0,L.jsx)(F.A,{className:"btn-delete cursor-p",src:h?n.icons.arrowUpBlack:n.icons.arrowDownBlack,alt:"delete icon"})}),(0,L.jsxs)("div",{className:"button-wrapper",children:[(0,L.jsx)(T.A,{className:(0,f.A)("br-30 bd-none button-secondary !h-45",I.A.p1),onClick:c,disabled:!h,children:d("button.iAgree")}),(0,L.jsx)(T.A,{className:(0,f.A)("br-30 bd-none button-decline",I.A.p1),onClick:i,children:d("button.iDeclined")})]})]})]})})};var D=a(26308),q=a(85006),B=a(89468),P=a(38349),U=a(18386),M=a(20266),$=a(31533),W=a(46413),X=a(62962),z=a(69468),K=a(76241),J=a(22538);const Q=["referralId"],Z=e=>{var t;let a=e.initialValues,n=e.referralCode,l=e.isRequiredReferral,c=e.onRefreshReferral,m=e.accountType,S=e.onNext;const T=(0,r.a$)(),E=(0,r.jL)(),_=(0,P.A)().forceUpdate,R=(0,M.A)(),F=(0,$.A)("SIGNUP"),O=F.provider,Z=F.handleCaptchaInvalid,Y=(0,G.A)().i18n,ee=null!==(t=(0,r.GV)(B.OW))&&void 0!==t?t:[],te=(0,o.useRef)(null),ae=g.A.useForm(),se=(0,s.A)(ae,1)[0],re=(0,r.GV)(u.z0);(0,U.A)(se,T);const ne=(0,o.useState)(!1),le=(0,s.A)(ne,2),ce=le[0],oe=le[1],ie=(0,o.useState)(!0),de=(0,s.A)(ie,2),ue=de[0],pe=de[1],me=(0,o.useState)(!1),he=(0,s.A)(me,2),ge=he[0],Ae=he[1],xe=(0,o.useState)(!1),ve=(0,s.A)(xe,2),fe=ve[0],ye=ve[1],be=(0,o.useState)(!1),je=(0,s.A)(be,2),we=je[0],Ne=je[1],Ce=(0,o.useState)(D.ig),ke=(0,s.A)(Ce,2),Se=ke[0],Te=ke[1],Ee=(0,o.useState)(!1),_e=(0,s.A)(Ee,2),Re=_e[0],Fe=_e[1],Ie=(0,o.useCallback)((e=>{var t;return{email:e.email,password:e.password,referralId:e.referralId||null,corporate:"individual"!==m,languageCode:Y.language,acceptTermsAndConditions:e.acceptTermsAndConditions,acceptFATCA:null!==(t=e.acceptFATCA)&&void 0!==t&&t}}),[m,Y.language]),Ge=(0,W.A)((async(e,t)=>{const a=t?"GEETEST"===O?{"X-Slider-Captcha":(0,v.encode)(t)}:{"X-Recaptcha":(0,v.encode)(t)}:null,s=t?a:null,r=await d.A.register(Ie(e),{headers:(0,i.A)({},s)}),n=r.ok,o=r.error;var p;"GOOGLE"===O&&(null===(p=te.current)||void 0===p||p.reset());if(Fe(!1),n)E((0,u.xg)({email:e.email,phoneNumber:"".concat(Se.phoneCode).concat(e.phoneNumber),phoneCode:Se.phoneCode,type:"email",password:e.password})),S();else if(o){var m;"GOOGLE"===O?(E((0,u.t0)()),Ne(!1)):Ne(se.isFieldsTouched()&&!ue&&!ce),null!==o&&void 0!==o&&null!==(m=o.fieldErrors)&&void 0!==m&&m.phoneNumber?oe(!0):"user.error.registration"===o.message?(0,k.Hm)({message:o.detail}):l&&"user.error.referral-code-not-found"===o.message?R((0,i.A)((0,i.A)({},o),{},{message:"".concat(o.message,"-2")}),c):l||"user.error.referral-code-not-found"!==o.message?R(o,(()=>Z(o.message))):R(o,c)}})),Le=(0,W.A)((async e=>{if(Fe(!0),!ce){if("false"===await(async()=>{const e=(await A.A.getSettingConfig(q.bD.REGISTRATION)).body;return(null===e||void 0===e?void 0:e.value)||"false"})())return void(0,k.Hm)({message:T("register.error.registerDisabled"),title:T("register.error.registerDisabled-title"),okText:T("button.ok")});O||await Ge(e).catch((()=>{}
1)),"GEETEST"===O&&(e=>{E((0,w.TG)(!0)),window.initGeetest4({captchaId:x.A.geetestRecaptchaSiteKey,product:"bind",width:"300px",lang:"eng"},(t=>{t.showCaptcha(),t.onSuccess((async()=>{const a=(0,i.A)((0,i.A)({},t.getValidate()),{},{version:"v4"});await Ge(e,JSON.stringify(a)).catch((()=>{}))})),t.onClose((()=>{Fe(!1)}))})),setTimeout((()=>{E((0,w.TG)(!1))}),1e3)})(e),"GOOGLE"===O&&await(async(e,t)=>{await Ge(e,t)})(e,re)}}));return(0,o.useEffect)((()=>{se.setFieldsValue({referralId:n})}),[se,n]),(0,o.useEffect)((()=>()=>{E((0,u.t0)())}),[]),(0,o.useEffect)((()=>{const e=ee.find((e=>"TH"===e.iso));Te(e||D.ig)}),[ee]),(0,L.jsxs)(o.Fragment,{children:[(0,L.jsx)("div",{className:"register br-30",children:(0,L.jsxs)(C.A,{className:"register__form",name:"register",initialValues:a,onFinish:Le,form:se,onFieldsChange:()=>{const e=se.getFieldsValue(),t=(e.referralId,(0,h.A)(e,Q)),a=l?se.getFieldsValue():t,s=se.getFieldsError().some((e=>e.errors.length))||Object.values(a).some((e=>!e));pe(s),Ne("GOOGLE"===O?se.isFieldsTouched()&&!ue&&!ce&&Boolean(re):se.isFieldsTouched()&&!ue&&!ce)},children:[(0,L.jsx)(j.A,{className:"input-primary",name:"email",label:T("input.email.label"),placeholder:T("input.email.placeholder"),maxLength:D.E2.EMAIL,rules:[{required:!0,message:T("input.validation.email.required")},{pattern:D.Xw,message:T("input.validation.email.pattern")},{max:D.E2.EMAIL,message:T("input.validation.email.maxLength",{len:D.E2.EMAIL})}]}),(0,L.jsxs)("div",{className:"form-password-wrapper",children:[(0,L.jsx)(b.A,{className:"input-primary",name:"password",label:T("input.password.label"),placeholder:T("input.password.placeholder4"),maxLength:D.E2.PASSWORD,rules:[{required:!0,message:T("input.validation.password.required")},{pattern:D.A9,message:T("input.validation.password.pattern")},{max:D.E2.PASSWORD,message:T("input.validation.password.maxLength",{len:D.E2.PASSWORD})}],onChange:_}),se.getFieldValue("password")?(0,L.jsxs)("div",{className:(0,f.A)("check-password",I.A.p3),children:[(0,L.jsxs)("div",{className:"password-status flex-jt-space-between",children:[(0,L.jsx)(J.A,{level:(0,z.A)(se.getFieldValue("password"))}),(0,L.jsx)("div",{className:"text-checked text-gray",children:(e=>{switch(e){case 0:return T("common.check-password.weak");case 1:return T("common.check-password.medium");default:return T("common.check-password.strong")}})((0,z.A)(se.getFieldValue("password")))})]}),(0,L.jsx)("div",{className:"password-policy",children:(0,L.jsx)(K.A,{password:se.getFieldValue("password")})})]}):null]}),(0,L.jsx)(j.A,{className:"input-primary",name:"referralId",label:T("input.referralCode.label".concat(l?"1":"")),placeholder:T("input.referralCode.placeholder"),maxLength:D.E2.REFERRAL_CODE,rules:[{required:l,message:T("input.validation.referralCode.required")}]}),(0,L.jsxs)("div",{className:"register-tearms-conditions",children:[(0,L.jsx)(y.A,{name:"acceptTermsAndConditions",labelNode:(0,L.jsxs)("div",{children:[T("register.form.checkbox.policy.part-1"),(0,L.jsx)("span",{style:{color:"#03FFCB"},children:T("register.form.checkbox.policy.part-2")}),T("register.form.checkbox.policy.part-3"),(0,L.jsx)("span",{style:{color:"#03FFCB"},children:T("register.form.checkbox.policy.part-4")}),T("register.form.checkbox.policy.part-5")]}),required:!0,onGetChecked:e=>{e.target.checked?Ae(!0):Ne(!1)},className:"checkbox--common"}),"individual"===m&&(0,L.jsx)(y.A,{name:"acceptFATCA",label3:"en"===Y.language?T("register.form.secondCheckBox3"):"",required:!0,onGetChecked:e=>{e.target.checked?ye(!0):Ne(!1)},className:"checkbox--common",labelNode:(0,L.jsxs)("div",{children:[T("register.form.checkbox.fatca.part-1"),(0,L.jsx)("span",{style:{color:"#03FFCB"},children:T("register.form.checkbox.fatca.part-2")}),T("register.form.checkbox.fatca.part-3")]})})]}),"GOOGLE"===O&&(0,L.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,L.jsx)(X.A,{ref:te,sitekey:x.A.googleRecaptchaSiteKey,onChange:e=>{E((0,u.HH)(e)),(ue||ce||!Boolean(re))&&(!se.isFieldsTouched()||ue||ce)||Ne(!0)},onExpired:()=>{var e;E((0,u.t0)()),null===te||void 0===te||null===(e=te.current)||void 0===e||e.reset(),Ne(!1)}})}),(0,L.jsx)(N.A,{name:T("button.continue"),type:"primary",formFieldStyle:{marginTop:"10px"},className:(0,f.A)("br-30",I.A.p3),buttonClassName:"br-30 bd-none w-100-p ".concat(we?"button-secondary":"button-disable-secondary"," ").concat(I.A.p1," "),disabled:!we||Re}),(0,L.jsxs)("span",{className:(0,f.A)("text-center",I.A.p3),children:[T("register.form.already-account")," ",(0,L.jsx)(p.k2,{to:"/login",className:"text-light-green text-underline",children:T("register.form.sign-in")})]})]})}),(0,L.jsx)(H,{parentCallback:()=>{Ae(!1)},isShowing:ge,handleCancel:()=>{se.setFieldValue("acceptTermsAndConditions",!1),Ne(!1),Ae(!1)}}),(0,L.jsx)(V,{parentCallback:()=>{ye(!1)},isShowing:fe,handleCancel:()=>{se.setFieldValue("acceptFATCA",!1),Ne(!1),ye(!1)}})]})},Y=e=>{let t=e.image,a=e.title,s=e.desc,r=e.type,l=e.chooseAccountType,c=e.active;return(0,L.jsxs)(T.A,{className:(0,f.A)("account-type-tag",{active:c}
1),onClick:()=>l(r),children:[(0,L.jsx)("div",{className:"image",children:(0,L.jsx)(F.A,{src:n.icons[t],alt:"icon type",customStyle:{width:"20px",height:"20px"}})}),(0,L.jsxs)("div",{className:"content",children:[(0,L.jsx)("span",{className:"title text-white-2",children:a}),(0,L.jsx)("span",{className:"desc text-white-2",children:s})]})]})},ee=e=>{let t=e.onNext,a=e.type,s=e.chooseAccountType;const n=(0,r.a$)();return(0,L.jsxs)("div",{className:"step-choose-account-type",children:[(0,L.jsxs)("div",{className:"step-choose-account-type__option",children:[(0,L.jsx)(Y,{image:"individualType",title:n("register.step-1.account-type.personal"),desc:n("register.step-1.account-type.personal-desc"),type:"individual",chooseAccountType:s,active:"individual"===a}),(0,L.jsx)(Y,{image:"companyType",title:n("register.step-1.account-type.corporate"),desc:n("register.step-1.account-type.corporate-desc"),type:"corporate",chooseAccountType:s,active:"corporate"===a})]}),(0,L.jsxs)("div",{className:"flex-col g-10",children:[(0,L.jsx)(T.A,{onClick:()=>{a&&t()},className:"button-secondary br-100",disabled:!a,children:n("button.continue")}),(0,L.jsxs)("span",{className:"text-center p1",children:[n("register.form.already-account")," ",(0,L.jsx)(p.k2,{to:"/login",className:"text-light-green p1",children:n("register.form.sign-in")})]})]})]})};var te=a(35473);const ae={email:"",password:"",phoneNumber:"",referralId:"",phoneCode:"",typeCorporate:"",acceptTermsAndConditions:!1,acceptFATCA:!1},se=()=>{const e=(0,r.a$)(),t=(0,r.GV)(u.Nd),a=(0,p.ok)(),n=(0,s.A)(a,1)[0],l=(0,o.useState)(1),c=(0,s.A)(l,2),h=c[0],g=c[1],A=(0,o.useState)(""),x=(0,s.A)(A,2),v=x[0],f=x[1],y=(0,o.useState)(ae),b=(0,s.A)(y,2),j=(b[0],b[1]),w=(0,o.useState)(!1),N=(0,s.A)(w,2),C=N[0],k=N[1],S=(0,o.useMemo)((()=>{var e;return null!==(e=n.get("referralCode"))&&void 0!==e?e:""}),[n]),T=(0,o.useCallback)((a=>{const s={1:e("register.step-1.title"),2:e("register.step-2.title"),5:e("register.step-5.title")};return 3===a?"email"===(null===t||void 0===t?void 0:t.type)?e("register.step-4.title"):e("register.step-3.title"):s[a]||e("register.step-4.title")}),[e,null===t||void 0===t?void 0:t.type]),E=(0,o.useCallback)((e=>{g((t=>null!==e&&void 0!==e?e:t+1))}),[]),_=(0,o.useCallback)((e=>{f(e),j((t=>(0,i.A)((0,i.A)({},t),{},{typeCorporate:e})))}),[]),R=(0,o.useCallback)((async()=>{const e=(await d.A.getReferralSetting()).body;k("REQUIRED"===(null===e||void 0===e?void 0:e.type))}),[]);return(0,o.useEffect)((()=>{R()}),[R]),(0,L.jsxs)(L.Fragment,{children:[5!==h&&(0,L.jsxs)("div",{className:"register__header",children:[(0,L.jsx)("span",{className:"h4-bold",children:T(h)}),3!==h&&(0,L.jsx)("span",{className:"sub-title text-gray",children:e("register.step-1.sub-title")})]}),(0,L.jsxs)("div",{className:"register__steps",children:[1===h&&(0,L.jsx)(ee,{onNext:E,type:v,chooseAccountType:_}),2===h&&(0,L.jsx)(Z,{initialValues:ae,referralCode:S,isRequiredReferral:C,onRefreshReferral:R,accountType:v,onNext:E}),3===h&&(0,L.jsx)(m.A,{onNext:E}),5===h&&(0,L.jsx)(te.A,{})]})]})};var re=a(46777),ne=a(95167);const le=()=>{var e,t;const a=(0,r.a$)(),i=(0,G.A)().i18n,d=(0,o.useState)({title:"",subTitle:"",imageUrl:""}),u=(0,s.A)(d,2),p=u[0],m=u[1],h=(0,o.useState)(!0),g=(0,s.A)(h,2),A=g[0],x=g[1];(0,c.A)(a("title.signupPage")),(0,l.A)();const v=(0,o.useCallback)((async()=>{x(!0);const e=await re.A.getSiteContent({siteType:q.jy.REGISTER,languageCode:i.language}),t=e.ok,a=e.body;t&&a&&m(a),x(!1)}),[i.language]);return(0,o.useEffect)((()=>{v()}),[v]),A?(0,L.jsx)(ne.A,{}):(0,L.jsxs)("div",{className:"register-page",children:[(0,L.jsxs)("div",{className:"register-page__left",children:[(0,L.jsx)("img",{className:(0,f.A)(p.imageUrl?"img-promotion":"login__img--mei"),src:p.imageUrl||n.imageCollection.meiLogin,alt:"mei"}),(0,L.jsx)("span",{className:"h3-bold-nl text-center mt-5 mb-15",children:null!==(e=p.title)&&void 0!==e?e:a("register.title")}),(0,L.jsx)("span",{className:"p2 text-center text-gray",children:null!==(t=p.subTitle)&&void 0!==t?t:a("register.subTitle")})]}),(0,L.jsx)("div",{className:"register-page__right",children:(0,L.jsx)(se,{})})]})}},38349(e,t,a){a.d(t,{A:()=>n});var s=a(97e3),r=a(9950);const n=()=>{const e=(0,r.useReducer)((e=>e+1),0),t=(0,s.A)(e,2),a=t[0];return{forceUpdate:t[1],trigger:a}}},31533(e,t,a){a.d(t,{A:()=>c});var s=a(97e3),r=a(32606),n=a(9950);const l=["common.error.recaptcha.google-required","common.error.recaptcha.slider-required"],c=e=>
1{const t=(0,n.useState)({activeProvider:null}),a=(0,s.A)(t,2),c=a[0],o=a[1],i=(0,n.useState)(!0),d=(0,s.A)(i,2),u=d[0],p=d[1],m=(0,n.useCallback)((async()=>{const e=await r.A.getSettingCaptchaProvider(),t=e.ok,a=e.body;t&&a&&o(a)}),[]),h=(0,n.useCallback)((async()=>{const t=await r.A.getRecaptcha(),a=t.ok,s=t.body;a&&s&&p(s.filter((t=>t.friendlyName===e.toUpperCase()))[0].enable)}),[]);(0,n.useEffect)((()=>{h(),m()}),[]);const g=(0,n.useCallback)((e=>{l.includes(e)&&m()}),[]);return(0,n.useMemo)((()=>({provider:u?null===c||void 0===c?void 0:c.activeProvider:null,getReCaptchaProvider:m,handleCaptchaInvalid:g})),[c,m,g])}},69468(e,t,a){a.d(t,{A:()=>s});const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";let t=0;return[/\d/g,/[a-z]/g,/[A-Z]/g,/[@$!%*?&#^,.<>?/~`;:"'+=()_-]/g].forEach((a=>{a.test(e)&&(t+=1)})),e.length>=12&&(t+=1),t<=2?0:t>2&&t<5?1:2}}}]);
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.