1import{_ as Mt}from"./00odMr0x.js";import{x as Et,d as Se,r as l,aO as Ft,K as Be,G as C,l as Ne,n as Xe,R as et,S as tt,u as Ve,o as nt,aH as At,f as h,a as u,b as s,e as f,c as ee,g as w,t as g,w as H,h as e,a9 as _,F as _e,I as Ke,as as ot,aI as Dt,_ as Te,aK as qt,au as ke,av as Ie,H as ve,B as st,M as Le,T as Y,ap as Ge,aq as ze,P as he,ar as We,U as Ue,aA as jt,q as Qt,p as Je,an as Yt,at as Ht,ao as Kt,a0 as Gt,J as ge,A as Ze,v as zt}from"./zGN25SIG.js";import{_ as Wt}from"./D2WAcC-S.js";import{_ as Jt}from"./B4Q5fQQX.js";import{_ as at}from"./CivJAmq1.js";import{u as Zt}from"./Cb99P-qe.js";import{C as ie}from"./DxzWTJS2.js";import{_ as rt}from"./B_rfAPYF.js";import{_ as Xt}from"./CzZ_3Hx8.js";import{_ as lt}from"./Dzg3GZNq.js";import{_ as en}from"./BJ4Kb05H.js";import{_ as tn}from"./DC164Om_.js";import{_ as nn}from"./DlvqEqMQ.js";import{_ as on}from"./Df55q1d9.js";import{_ as sn}from"./B9nXDqA2.js";import{v as an,a as rn}from"./Dl-wgz1W.js";import{s as ln}from"./BdzrbLwg.js";import"./BmwrrxPv.js";import"./DuRGqVWg.js";const un=Et("/images/layout/icn-check-bullet-red.svg"),cn={class:"space-y-4"},dn={class:"text-[11px] text-white/40 uppercase tracking-wider ml-5"},pn={class:"ui-section-divider"},fn={class:"px-4 py-3 space-y-2"},mn={class:"text-white/70 text-[13px]"},hn={class:"ui-section-divider"},gn={class:"flex items-center gap-3 flex-1 min-w-0"},vn={class:"flex flex-col min-w-0"},bn={class:"auth-field-label text-[11px] text-white/40 uppercase tracking-wider mb-1.5"},yn={class:"text-[14px] text-white/90 truncate"},Cn=["onClick"],wn={class:"text-[14px] text-white/90 flex-1"},_n={key:0,src:Dt,alt:"",class:"w-5 h-5 flex-shrink-0"},kn={key:1,class:"text-white/20 text-lg flex-shrink-0"},Sn={class:"text-[11px] text-white/40 uppercase tracking-wider ml-5"},xn={class:"ui-section-divider"},Pn={class:"w-5 h-5 rounded-full border border-[#E3BB72]/50 flex items-center justify-center mr-3 flex-shrink-0"},$n={key:0,class:"w-2.5 h-2.5 rounded-full bg-[#E3BB72]"},Rn={class:"text-[14px] text-white/90"},Ln={class:"w-5 h-5 rounded-full border border-[#E3BB72]/50 flex items-center justify-center mr-3 flex-shrink-0"},Un={key:0,class:"w-2.5 h-2.5 rounded-full bg-[#E3BB72]"},Bn={class:"text-[14px] text-white/90"},Nn={key:4},Vn=Se({__name:"RegisterStepForm",props:{inputUsername:{},inputPassword:{},inputCountryCode:{},inputPhoneCountryCode:{},inputPhoneNumber:{},referralCode:{},referralSetFromQuery:{type:Boolean},registerSourceLabel:{},registerSourceList:{},showRegisterSourceInput:{type:Boolean},showInputReferralCode:{type:Boolean},isEnableFeatureMembership:{type:Boolean},showCurrencyChoices:{type:Boolean},registerOption:{},registerInProgress:{type:Boolean},enableSubmit:{type:Boolean},checkLength:{type:Boolean},checkUppercase:{type:Boolean},checkNumber:{type:Boolean},isEnableAltcha:{type:Boolean}},emits:["update:inputUsername","update:inputPassword","update:inputCountryCode","update:inputPhoneCountryCode","update:inputPhoneNumber","update:referralCode","countryChoiceChanged","phoneChoiceChanged","registerSourceSelected","registerOptionChanged","update:altchaPayload","next"],setup(te,{expose:k,emit:S}){const d=te,b=S,r=l(null),m=l(null),c=l(null),K=l(null),x=Ft();function D(){d.isEnableFeatureMembership&&d.showInputReferralCode&&!d.referralSetFromQuery&&K.value?.focus()}const y=l("");Be(y,o=>b("update:altchaPayload",o));const V=C({get:()=>d.inputUsername,set:o=>b("update:inputUsername",o.toLowerCase())}),O=C({get:()=>d.inputPassword,set:o=>b("update:inputPassword",o)});C({get:()=>d.inputCountryCode,set:o=>b("update:inputCountryCode",o)});const{setLocale:B}=Ne(),L=Xe(),ne=et(),{countryChoices:P}=tt(ne),I=l(!1),j=C(()=>P.value.find(o=>o.code===d.inputCountryCode)||null);function ce({lang:o,code:a}){qt.find(U=>U.localeValue===o)&&(B(o),L.setLanguage(o));const M=P.value.find(U=>U.code===a);M&&b("countryChoiceChanged",M)}const oe=Ve();function q(){if(!P.value.length)return;const o=(oe.query||{}).country?.toString();if(o){const U=P.value.find(E=>E.code?.toLowerCase()===o.toLowerCase());if(U){b("countryChoiceChanged",U);return}}if(P.value.some(U=>U.code===d.inputCountryCode))return;const M=P.value.find(U=>U.default)??P.value[0];M&&b("countryChoiceChanged",M)}nt(async()=>{P.value.length||await ne.fetchCountryChoices(),q()});const G=C({get:()=>d.inputPhoneCountryCode,set:o=>b("update:inputPhoneCountryCode",o)}),T=C({get:()=>d.inputPhoneNumber,set:o=>b("update:inputPhoneNumber",o)}),de=C({get:()=>d.referralCode,set:o=>b("update:referralCode",o.toLowerCase())}),Z=C(()=>d.inputUsername.length>=4),se=C(()=>Z.value?null:Ne().t("error.usernameLength")),z=C(()=>[{key:"changePassword.info1",pass:d.checkLength},{key:"changePassword.info2",pass:d.checkUppercase},{key:"changePassword.info3",pass:d.checkNumber}]),pe=C(()=>d.checkLength&&d.checkUppercase&&d.checkNumber&&d.inputUsername&&d.inputPassword&&d.inputPhoneCountryCode&&d.inputPhoneNumber&&Z.value);return k({altchaPayload:y,phoneNumberInputRef:c}),(o,a)=>{const M=rt,U=Xt,E=lt,ae=at,fe=At("flag"),F=en,W=tn,me=nn,re=Te;return u(),h("div",cn,[s("div",dn,g(o.$t("info.registerBasicInfoSectionTitle")),1),f(E,{variant:"glass"},{default:H(()=>[s("div",pn,[f(M,{ref_key:"usernameRef",ref:r,modelValue:e(V),"onUpdate:modelValue":a[0]||(a[0]=i=>_(V)?V.value=i:null),label:o.$t("usernamePlaceholder"),placeholder:o.$t("usernamePlaceholder"),inputmode:"text",autocomplete:"username",enterkeyhint:"next",maxlength:20,onEnter:a[1]||(a[1]=i=>e(m)?.focus())},null,8,["modelValue","label","placeholder"])]),f(U,{ref_key:"passwordRef",ref:m,modelValue:e(O),"onUpdate:modelValue":a[2]||(a[2]=i=>_(O)?O.value=i:null),label:o.$t("passwordPlaceholder"),autocomplete:"new-password",enterkeyhint:"next",onEnter:a[3]||(a[3]=i=>
1!d.registerInProgress&&e(c)?.focus())},null,8,["modelValue","label"])]),_:1}),e(V)&&e(se)?(u(),ee(ae,{key:0,msg:e(se),type:"error"},null,8,["msg"])):w("",!0),e(O)&&(!o.checkLength||!o.checkUppercase||!o.checkNumber)?(u(),ee(E,{key:1,label:o.$t("changePassword.requirements")},{default:H(()=>[s("div",fn,[(u(!0),h(_e,null,Ke(e(z).filter(i=>!i.pass),i=>(u(),h("div",{key:i.key,class:"flex items-center gap-2.5"},[a[14]||(a[14]=s("img",{class:"w-4 h-4 flex-shrink-0",src:un,alt:""},null,-1)),s("span",mn,g(o.$t(i.key)),1)]))),128))])]),_:1},8,["label"])):w("",!0),f(E,{variant:"glass"},{default:H(()=>[s("div",hn,[s("div",{class:"flex items-center min-h-[50px] px-4 cursor-pointer active:opacity-70 transition-opacity w-full",onClick:a[4]||(a[4]=i=>I.value=!0)},[s("div",gn,[e(j)?(u(),ee(fe,{key:0,class:"text-[20px] flex-shrink-0",iso:e(j).flagClass},null,8,["iso"])):w("",!0),s("div",vn,[s("span",bn,g(o.$t("countryPlaceholder")),1),s("span",yn,g(e(j)?e(j).name:""),1)])]),a[15]||(a[15]=s("span",{class:"text-white/30 text-lg flex-shrink-0 ml-2"},"âº",-1))]),f(ot,{open:e(I),"onUpdate:open":a[5]||(a[5]=i=>_(I)?I.value=i:null),dismissible:"","hide-confirm":"",onDone:ce},null,8,["open"])]),f(F,{ref_key:"phoneNumberInputRef",ref:c,"phone-country-code":e(G),"onUpdate:phoneCountryCode":a[6]||(a[6]=i=>_(G)?G.value=i:null),"phone-number":e(T),"onUpdate:phoneNumber":a[7]||(a[7]=i=>_(T)?T.value=i:null),onPhoneChoiceChanged:a[8]||(a[8]=i=>b("phoneChoiceChanged",i)),onEnter:D},null,8,["phone-country-code","phone-number"])]),_:1}),o.showRegisterSourceInput?(u(),h(_e,{key:2},[f(W,{variant:"glass",label:o.$t("info.registerKnownFromSectionTitle"),"selected-label":o.registerSourceLabel,searchable:!0},{items:H(({query:i,close:be})=>[(u(!0),h(_e,null,Ke(o.registerSourceList.filter(N=>!i||N.name.toLowerCase().includes(i.toLowerCase())),N=>(u(),h("div",{key:N._id,class:"flex items-center gap-3 px-6 py-3 cursor-pointer active:bg-white/5 transition-colors border-b border-white/5 last:border-0",onClick:()=>{b("registerSourceSelected",N),be()}},[s("span",wn,g(N.name),1),N.name===o.registerSourceLabel?(u(),h("img",_n)):(u(),h("span",kn,"âº"))],8,Cn))),128))]),_:1},8,["label","selected-label"]),o.isEnableFeatureMembership&&o.showInputReferralCode?(u(),ee(E,{key:0,variant:"glass"},{default:H(()=>[f(M,{ref_key:"referralCodeRef",ref:K,modelValue:e(de),"onUpdate:modelValue":a[9]||(a[9]=i=>_(de)?de.value=i:null),label:o.$t("referralCodePlaceholder"),placeholder:o.$t("referralCodePlaceholder"),inputmode:"text",readonly:o.referralSetFromQuery,maxlength:20},null,8,["modelValue","label","placeholder","readonly"])]),_:1})):w("",!0)],64)):w("",!0),o.showCurrencyChoices?(u(),h(_e,{key:3},[s("div",Sn,g(o.$t("info.choosePaymentOption")),1),f(E,null,{default:H(()=>[s("div",xn,[s("div",{class:"flex items-center min-h-[50px] px-4 cursor-pointer active:bg-white/5 transition-colors",onClick:a[10]||(a[10]=i=>b("registerOptionChanged",e(ie).FIAT))},[s("div",Pn,[o.registerOption===e(ie).FIAT?(u(),h("div",$n)):w("",!0)]),s("span",Rn,g(o.$t("btn.fiatMoney")),1)])]),s("div",{class:"flex items-center min-h-[50px] px-4 cursor-pointer active:bg-white/5 transition-colors",onClick:a[11]||(a[11]=i=>b("registerOptionChanged",e(ie).CRYPTO))},[s("div",Ln,[o.registerOption===e(ie).CRYPTO?(u(),h("div",Un)):w("",!0)]),s("span",Bn,g(o.$t("btn.crypto")),1)])]),_:1}),f(ae,{msg:o.$t("info.cannotChangePaymentOptionAfterRegister"),type:"warning"},null,8,["msg"])],64)):w("",!0),e(pe)&&o.isEnableAltcha?(u(),h("div",Nn,[f(E,{label:o.$t("changePassword.verification")},{default:H(()=>[f(me,{ref_key:"altchaRef",ref:x,payload:e(y),"onUpdate:payload":a[12]||(a[12]=i=>_(y)?y.value=i:null),remark:"register_request"},null,8,["payload"])]),_:1},8,["label"])])):w("",!0),f(re,{variant:"primary",label:o.$t("registerNextStep"),disabled:!o.enableSubmit,loading:o.registerInProgress,onClick:a[13]||(a[13]=i=>b("next"))},null,8,["label","disabled","loading"])])}}}),In=Object.assign(Vn,{__name:"RegisterStepForm"}),Tn={class:"space-y-4"},On={key:0,class:"px-1 space-y-0.5"},Mn={class:"text-[12px] text-white/50"},En={class:"text-white/80"},Fn={class:"flex items-center justify-between"},An={class:"text-[11px] text-white/30"},Dn={key:0,class:"loader"},qn={key:1,class:"flex flex-col items-center gap-3"},jn=["disabled"],Qn={class:"flex gap-3 pt-2 border-t border-white/5"},Yn=Se({__name:"RegisterStepOTP",props:ke({phoneNumber:{},phoneDialCode:{},otpRef:{},showRefCodeText:{type:Boolean},isRegisterNeedVerifyOTP:{type:Boolean},showVerificationCodeText:{},isLoadingVerificationCode:{type:Boolean},showVerificationBtnDisabled:{type:Boolean},registerInProgress:{type:Boolean},enableSubmit:{type:Boolean}},{verificationCode:{default:""},verificationCodeModifiers:{}}),emits:ke(["update:verificationCode","resend","changeNumber","next","back"],["update:verificationCode"]),setup(te,{emit:k}){const S=k,d=l(null),b=Ie(te,"verificationCode");return(r,m)=>{const c=on,K=Te;return u(),h("div",Tn,[r.showRefCodeText?(u(),h("div",On,[s("div",Mn,[ve(g(r.$t("info.otpSentTo"))+" ",1),s("span",En,g(r.phoneDialCode)+" "+g(r.phoneNumber),1)]),s("div",Fn,[s("div",An,[ve(g(r.$t("user.otpRefCode"))+": "+g(r.otpRef)+" ",1),r.otpRef?w("",!0):(u(),h("span",Dn))]),s("button",{class:"text-[12px] text-[#E3BB72]/70 underline cursor-pointer",onClick:m[0]||(m[0]=x=>S("changeNumber"))},g(r.$t("btn.changeNumber")),1)])])):w("",!0),r.isRegisterNeedVerifyOTP?(u(),h("div",qn,[f(c,{ref_key:"otpInputRef",ref:d,length:6,onComplete:m[1]||(m[1]=x=>b.value=x),"onUpdate:modelValue":m[2]||(m[2]=x=>b.value=x)},null,512),s("button",{class:st(["text-[12px] transition-colors",r.showVerificationBtnDisabled?"text-white/20 cursor-not-allowed":"text-[#E3BB72]/70 underline cursor-pointer"]),disabled:r.showVerificationBtnDisabled,onClick:m[3]||(m[3]=x=>S("resend"))},g(r.showVerificationCodeText||r.$t("sendCodeLabel")),11,jn)])):w("",!0),s("div",Qn,[f(K,{class:"flex-1",variant:"cancel",label:r.$t("registerPreviousStep"),disabled:r.registerInProgress,onClick:m[4]||(m[4]=x=>S("back"))},null,8,["label","disabled"]),f(K,{class:"flex-1",variant:"primary",label:r.$t("registerNextStep"),disabled:!r.enableSubmit,loading:r.registerInProgress,onClick:m[5]||(m[5]=x=>S("next"))},null,8,["label","disabled","loading"])])])}}}),Hn=Object.assign(Yn,{__name:"RegisterStepOTP"}),Kn={class:"space-y-4"},Gn={class:"ui-section-divider"},zn={class:"px-4 py-3"},Wn={class:"block text-[11px] text-white/40 mb-1.5 uppercase tracking-wider"},Jn={class:"normal-case tracking-normal text-white/30 ml-1"},Zn={class:"flex gap-3 pt-2 border-t border-white/5"},Xn=Se({__name:"RegisterStepProfile",props:ke({registerInProgress:{type:Boolean},enableSubmit:{type:Boolean}},{nickname:{default:""},nicknameModifiers:{},dob:{default:""},dobModifiers:{}}),emits:ke(["finish","back"],["update:nickname","update:dob"]),setup(te,{emit:k}){const S=k,d=Ie(te,"nickname"),b=Ie(te,"dob");return(r,m)=>{const c=rt,K=sn,x=lt,D=Te;return u(),h("div",Kn,[f(x,{variant:"input"},{default:H(()=>[s("div",Gn,[f(c,{modelValue:d.value,"onUpdate:modelValue":m[0]||(m[0]=y=>d.value=y),label:`${r.$t("inputNicknamePlaceholder")} ${r.$t("labelOptional")}`,placeholder:r.$t("inputNicknamePlaceholder"),inputmode:"text",autocomplete:"nickname",enterkeyhint:"next",maxlength:20},null,8,["modelValue","label","placeholder"])]),s("div",zn,[s("label",Wn,[ve(g(r.$t("inputDobPlaceholder"))+" ",1),s("span",Jn,g(r.$t("labelOptional")),1)]),f(K,{dob:b.value,"onUpdate:dob":m[1]||(m[1]=y=>b.value=y),placeholder:r.$t("inputDobPlaceholder")},null,8,["dob","placeholder"])])]),_:1}),s("div",Zn,[f(D,{class:"flex-1",variant:"cancel",label:r.$t("registerPreviousStep"),disabled:r.registerInProgress,onClick:m[2]||(m[2]=y=>S("back"))},null,8,["label","disabled"]),f(D,{class:"flex-1",variant:"primary",label:r.$t("registerLabel"),disabled:!r.enableSubmit,loading:r.registerInProgress,onClick:m[3]||(m[3]=y=>S("finish"))},null,8,["label","disabled","loading"])])])}}}),eo=Object.assign(Xn,{__name:"RegisterStepProfile"}),to=["innerHTML"],no={key:0},oo={class:"flex justify-between items-center p-4",style:{position:"fixed",top:"0",width:"100%","max-width":"438px","z-index":"10"}},so=["src"],ao={class:"ml-2 text-[#FBDEB2] text-[14px]"},ro={class:"flex flex-row items-center gap-4"},lo=["src"],io={class:"h-[calc(100vh-72px)] overflow-auto pb-[100px]"},uo={class:"w-full py-6"},co={class:"login-form"},po={key:0,class:"text-center text-xs text-white mt-10"},fo={key:1},mo={class:"px-5 pt-4 pb-4 space-y-4"},ho={key:0,class:"text-center text-[11px] text-white/40 uppercase tracking-wider"},go={key:1,class:"text-center text-[11px] text-white/40 uppercase tracking-wider"},vo={key:2,class:"text-center text-[11px] text-white/40 uppercase tracking-wider"},bo={class:"text-center text-[12px] text-white/40 px-2"},yo={key:0,class:"flex flex-row justify-center items-center mt-6 mx-4"},Co={class:"text-white text-sm"},wo={class:"w-[100px] ml-4"},_o=Se({__name:"index",setup(te){Zt(l({path:"/member/register"}));const k=Xe(),S=et(),{isEnableFeatureMembership:d,registerNeedVerifyOTP:b,isEnableAltcha:r}=tt(S),{setLocale:m,t:c,locale:K}=Ne(),x=Le(),D=Ve(),y=Y("register:username",""),V=Y("register:password",""),O=C({get:()=>k.userCountryCode,set:t=>{k.userCountryCode=t}}),B=Y("register:phoneCountryCode",""),L=Y("register:phoneNumber",""),ne=l(null),P=l(""),I=l(""),j=l(!1),ce=l(!1),oe=l(c("sendCodeLabel")),q=l(!1),G=l(""),T=l(null),de=l("60"),Z=l(""),se=l(!1),z=l([]),pe=l(""),o=l(!1),a=C(()=>Ge(k.activeLanguage)?.icn||ze()?.icn),M=l(!1),U=l(!1),E=l(!1),ae=l(!1),fe=l(""),F=l(!1),W=Y("referralCodeFromQuery",""),me=Y("referralSetFromQuery",!1),re=Y("register:inputNickname",""),i=Y("register:inputDob",""),be=l(!1),N=l(!0),Q=l(!1),X=l(!1);nt(async()=>{await it()});const it=async()=>
1{if(await dt(),fe.value=S.maintenanceMessage,ae.value=S.isMaintenance,!S.isEnableRegister)return x.push("/"+he.LOGIN);await Oe(),await Me(),await vt(),await bt(),await Fe(),k.refreshContactChannel()},ut=t=>{let n=O.value;O.value=t.code,L.value,n!==t.code&&Gt(()=>{k.refreshContactChannel()})},ct=t=>{ne.value=t,B.value||(B.value=t.code)},ye=C(()=>b.value&&ne.value?.supportPhoneOtpVerify),dt=async()=>{const t=await S.fetchSiteConfig(!0);if(t&&t.type==="INVALID_HOSTNAME")return x.push("/403")},Oe=async()=>{await pt(),await ft()},pt=async()=>{let t=(D.query||{}).lang;if(t)if(t=String(t),We(t))Ge(t)&&we(t?.toString());else{let n=ze();n&&we(n.localeValue)}},ft=async()=>{let t=(D.query||{}).s?.toString()||null;t&&await xe(t,!0)},Me=async()=>{let t=S.getSiteLastRegisterSource();t&&await xe(t)},ue=l(),Ee=Y("imsl",!1),Ce=Y("irssfp",!1),xe=async(t,n=!1)=>{if(t){const{registerSource:p}=await Ue.isValidRegisterSourcesBySlug(t);if(!p)T.value="",pe.value="",ue.value=null,Ce.value=!1;else{if(T.value=p.slug,pe.value=p.name,ue.value=p,z.value.forEach(R=>{R.isDefault=R._id===p._id}),S.setSiteLastRegisterSource(p.slug),k.setBindRegisterSourceSlug(p.slug),!Ee.value){const{locale:R}=p;R&&R!=="auto"&&ht(R)}n&&(Ce.value=!0)}if(ue.value){let R=ue.value.currencyTypes||[];R.length&&!R.includes(Z.value)&&Re(R[0])}else Re(ie.FIAT),Ce.value=!1;await k.refreshContactChannel()}},mt=C(()=>T.value?!Ce.value:!0),ht=t=>{We(t)&&we(t)},Fe=async()=>{z.value=[];const t=await Ue.getRegisterSourceChoices({visibleOnly:!0,countryCode:String(O.value)});t&&(z.value=t.map(n=>({_id:n._id,name:n.name,slug:n.slug,locale:n.locale,isDefaultReferral:n.isDefaultReferral||!1})),!T.value&&z.value.length===1&&z.value[0]&&Ae(z.value[0]))},Ae=t=>{xe(t.slug)},gt=C(()=>ue.value?(ue.value.currencyTypes||[]).length>1:!1),vt=async()=>{D.query&&D.query.referral&&(W.value=D.query.referral?D.query.referral.toString():"",me.value=!0),W.value&&(be.value=!0)},bt=async()=>{await k.refreshLocationInfo()};
1function we(t){m(t),k.setLanguage(t);let n=Object.assign({},Ve().query||{});delete n.locale,delete n.lang,Object.keys(n).length===0?Le().replace({query:{l:1}}):Le().replace({query:n})}function yt({lang:t,code:n}){we(t),n&&(O.value=n),Ee.value=!0,k.refreshContactChannel()}const Ct=async()=>{if(!y.value)return $(c("error.enterUsername")),!1;if(y.value.length<4)return $(c("error.usernameLength")),!1;if(!V.value)return $(c("error.passwordRequire")),!1;if(an(y.value))return $(c("usernamePlaceholder")+": "+c("info.onlyAcceptAlphaNumeric")),!1;if(rn(V.value))return $(c("passwordPlaceholder")+": "+c("info.onlyAcceptAlphaNumericWithSymbols")),!1;if(!M.value)return $(c("passwordPlaceholder")+": "+c("changePassword.info1")),!1;if(!U.value)return $(c("passwordPlaceholder")+": "+c("changePassword.info2")),!1;if(!E.value)return $(c("passwordPlaceholder")+": "+c("changePassword.info3")),!1;if(!B.value)return $(c("error.selectPhoneCountryCode")),!1;if(!L.value)return $(c("error.enterPhoneNumber")),!1;const t=await ge.CheckUsername(y.value);if(!t?.succ)return $(t?.msg??""),!1;const n=Ut(B.value,L.value);if(!n?.valid)return $(n?.msg??""),!1;const p=await ge.CheckPhoneNumber(L.value.toString(),B.value);return p?.succ?!(r.value&&!le.value):($(p?.msg??""),!1)},Pe=l(null),le=l(""),De=async()=>{try{if(se.value=!0,P.value="",!ye.value)return!0;if(j.value=!1,I.value="",B.value&&L.value){const t=le.value,n=await ge.GetOTP(L.value.toString(),B.value,t);if(n?.succ){j.value=!0,ce.value=!0,oe.value=c("sendCodeLabel"),G.value=n?.otpRef??"";let p=de.value;const R=ln(()=>{p--,p<=0||!j.value?(clearInterval(R),j.value=!1,oe.value=c("sendCodeLabel")):oe.value=c("resendLabel")+` (${p})`},1e3);return!0}else return $(n?.msg??""),!1}}catch{}finally{se.value=!1}};Be(V,t=>{M.value=t.length>=8&&t.length<=16,U.value=/[A-Z]/.test(t),E.value=/\d/.test(t)},{immediate:!0});const qe=C(()=>y.value.length>=4),wt=C(()=>!(!M.value||!U.value||!E.value||!qe.value||!y.value||!V.value||!L.value)),_t=C(()=>wt.value?r.value?!!le.value:!0:!1),kt=async()=>{try{if(I.value="",F.value=!0,Pe.value?.altchaPayload&&(le.value=Pe.value.altchaPayload),!await Ct())return!1;await De()&&(N.value=!1,Q.value=!0,xt.value||(Q.value=!1,X.value=!0,je.value||(X.value=!1,Q.value=!1,N.value=!0,await $e())))}catch{}finally{F.value=!1}},St=C(()=>F.value?!1:ye.value?!!P.value:!0),xt=C(()=>ye.value),Pt=async()=>{try{I.value="",F.value=!0;const t=await ge.CheckOTP(L.value.toString(),B.value,G.value,P.value);return t?.succ?(Q.value=!1,X.value=!0,je.value||(X.value=!1,N.value=!0,await $e()),!0):($(t?.msg??""),!1)}catch{}finally{F.value=!1}},$t=C(()=>!!T.value),Rt=C(()=>!(F.value||!$t.value)),je=C(()=>!1),$e=Ht(async()=>{try{if(I.value="",F.value=!0,!T.value)return $(c("error.selectHowDoYouKnowUs")),!1;const{valid:t}=await Ue.isValidRegisterSourcesBySlug(String(T.value));if(!t)return $(c("error.selectHowDoYouKnowUs")),T.value="",await Oe(),await Me(),await Fe(),!1;let n=i.value;n&&(Ze(n).isValid()?n=Ze(n).format("DD/MM/YYYY"):n="");{console.log("altchaPayloadValue.value",le.value);const p=await ge.RegisterUser(y.value,V.value,L.value.toString(),B.value,G.value,P.value,T.value||"",b?.value,k.activeLanguage,Z.value,d.value?W.value:"",O.value,re.value,n,le.value);return p?.succ?(await k.setAuthenticated(!0,p.token,p.user),q.value=!0,W.value="",me.value=!1,T.value=null,S.setSiteLastRegisterSource(null),window.scrollTo({top:0,behavior:"smooth"}),Lt(),!0):($(p?.msg??""),!1)}}catch{}finally{F.value=!1}}),Lt=()=>{I.value="",y.value="",V.value="",L.value="",re.value="",i.value="",P.value=""},Ut=(t,n)=>{const p="#length#",R=n.length;let A=ne.value;if(!A)return{valid:!0,msg:""};let J="";if(A.phoneMinLength||A.phoneMaxLength){if(R!==A.phoneMinLength&&A.phoneMinLength===A.phoneMaxLength)return J=c("error.phoneNumberLength").replace(p,`${A.phoneMinLength}`),{valid:!1,msg:J};if(R<A.phoneMinLength)return J=c("error.phoneNumberAtLeastLength").replace(p,`${A.phoneMinLength}`),{valid:!1,msg:J};if(R>A.phoneMaxLength)return J=c("error.phoneNumberNotMoreThanLength").replace(p,`${A.phoneMaxLength}`),{valid:!1,msg:J}}return{valid:!0,msg:J}},Bt=jt(),$=t=>{I.value=t,Bt.error(t,{timeout:5e3})},Qe=()=>{Q.value?(He(),Q.value=!1,N.value=!0):X.value&&(X.value=!1,Q.value=!1,N.value=!0)},Ye=()=>x.push("/"+he.LOGIN),He=()=>{j.value=!1,P.value="",I.value="",ce.value=!1,G.value="",Q.value=!1,N.value=!0},Re=t=>{Z.value=t},Nt=()=>{const t=Z.value;t===ie.FIAT?x.replace("/"+he.SETUP_ACCOUNT_SETUP_PROFILE):t===ie.CRYPTO&&x.replace("/"+he.SETUP_ACCOUNT_SETUP_PROFILE)},Vt=()=>{o.value=!o.value},It=()=>x.push("/"+he.LOGIN);return Be(K,()=>{oe.value=c("sendCodeLabel")}),(t,n)=>{const p=Mt,R=Yt,A=Wt,J=Jt,Tt=at,Ot=Kt;return u(),h("div",{class:st(["w-full h-full relative mx-auto max-w-[438px] overflow-hidden",e(q)?"h-full":""])},[s("div",{class:"login-bg",style:Qt({backgroundImage:`url(${e(Je)("/images/login-backdrop.webp")})`})},null,4),f(p,{modelValue:e(q),"onUpdate:modelValue":n[0]||(n[0]=v=>_(q)?q.value=v:null),username:e(y),"confirm-label":t.$t("btn.OK"),onConfirm:Nt},null,8,["modelValue","username","confirm-label"]),f(R,{modelValue:e(ae),"onUpdate:modelValue":n[1]||(n[1]=v=>_(ae)?ae.value=v:null),title:t.$t("info.systemMaintenanceNotice"),"confirm-label":t.$t("btn.OK"),dismissible:!1,onConfirm:It},{default:H(()=>[e(fe)?(u(),h("div",{key:0,class:"text-white/60 text-[14px] leading-relaxed",innerHTML:e(fe)},null,8,to)):w("",!0)]),_:1},8,["modelValue","title","confirm-label"]),e(q)?w("",!0):(u(),h("section",no,[n[13]||(n[13]=s("div",{style:{height:"72px"}},null,-1)),s("div",oo,[s("div",{class:"flex flex-row items-center cursor-pointer",onClick:Ye},[s("img",{src:e(Je)("/images/layout/icn-left-round.svg"),alt:"back"},null,8,so),s("span",ao,g(t.$t("btn.login")),1)]),s("div",ro,[f(A),s("img",{class:"w-[40px] h-[40p
1x] cursor-pointer",src:e(a),alt:"language",onClick:Vt},null,8,lo)])])])),f(ot,{open:e(o),"onUpdate:open":n[2]||(n[2]=v=>_(o)?o.value=v:null),dismissible:"","hide-confirm":"",onDone:yt},null,8,["open"]),s("div",io,[s("div",uo,[f(J),s("div",co,[e(q)?(u(),h("div",po,g(t.$t("registerMsg4")),1)):w("",!0),e(q)?w("",!0):(u(),h("div",fo,[s("div",mo,[e(N)?(u(),h("div",ho,g(t.$t("registerMsg3")),1)):w("",!0),e(Q)?(u(),h("div",go,g(t.$t("registerMsg6")),1)):w("",!0),e(X)?(u(),h("div",vo,g(t.$t("registerMsg7")),1)):w("",!0),e(I)?(u(),ee(Tt,{key:3,msg:e(I),type:"error"},null,8,["msg"])):w("",!0),e(N)?(u(),ee(In,{key:4,ref_key:"stepFormRef",ref:Pe,"input-username":e(y),"onUpdate:inputUsername":n[3]||(n[3]=v=>_(y)?y.value=v:null),"input-password":e(V),"onUpdate:inputPassword":n[4]||(n[4]=v=>_(V)?V.value=v:null),"input-country-code":e(O),"onUpdate:inputCountryCode":n[5]||(n[5]=v=>_(O)?O.value=v:null),"input-phone-country-code":e(B),"onUpdate:inputPhoneCountryCode":n[6]||(n[6]=v=>_(B)?B.value=v:null),"input-phone-number":e(L),"onUpdate:inputPhoneNumber":n[7]||(n[7]=v=>_(L)?L.value=v:null),"referral-code":e(W),"onUpdate:referralCode":n[8]||(n[8]=v=>_(W)?W.value=v:null),"referral-set-from-query":e(me),"register-source-label":e(pe),"register-source-list":e(z),"show-register-source-input":e(mt),"show-input-referral-code":e(be),"is-enable-feature-membership":e(d),"show-currency-choices":e(gt),"register-option":e(Z),"register-in-progress":e(F),"enable-submit":e(_t),"check-length":e(M),"check-uppercase":e(U),"check-number":e(E),"is-enable-altcha":e(r),onCountryChoiceChanged:ut,onPhoneChoiceChanged:ct,onRegisterSourceSelected:Ae,onRegisterOptionChanged:Re,"onUpdate:altchaPayload":n[9]||(n[9]=v=>le.value=v),onNext:kt},null,8,["input-username","input-password","input-country-code","input-phone-country-code","input-phone-number","referral-code","referral-set-from-query","register-source-label","register-source-list","show-register-source-input","show-input-referral-code","is-enable-feature-membership","show-currency-choices","register-option","register-in-progress","enable-submit","check-length","check-uppercase","check-number","is-enable-altcha"])):w("",!0),e(Q)?(u(),ee(Hn,{key:5,"verification-code":e(P),"onUpdate:verificationCode":n[10]||(n[10]=v=>_(P)?P.value=v:null),"phone-number":e(L),"phone-dial-code":e(ne)?.dialCode||"","otp-ref":e(G),"show-ref-code-text":e(ce),"is-register-need-verify-o-t-p":e(ye)??!1,"show-verification-code-text":e(oe),"is-loading-verification-code":e(se),"show-verification-btn-disabled":e(se)?!0:!e(B)||!e(L)||!e(qe),"register-in-progress":e(F),"enable-submit":e(St),onResend:De,onChangeNumber:He,onNext:Pt,onBack:Qe},null,8,["verification-code","phone-number","phone-dial-code","otp-ref","show-ref-code-text","is-register-need-verify-o-t-p","show-verification-code-text","is-loading-verification-code","show-verification-btn-disabled","register-in-progress","enable-submit"])):w("",!0),e(X)?(u(),ee(eo,{key:6,nickname:e(re),"onUpdate:nickname":n[11]||(n[11]=v=>_(re)?re.value=v:null),dob:e(i),"onUpdate:dob":n[12]||(n[12]=v=>_(i)?i.value=v:null),"register-in-progress":e(F),"enable-submit":e(Rt),onFinish:e($e),onBack:Qe},null,8,["nickname","dob","register-in-progress","enable-submit","onFinish"])):w("",!0),s("p",bo,[ve(g(t.$t("registerMsg2"))+" ",1),f(Ot,{to:"/register",class:"text-[#E3BB72]/70"},{default:H(()=>[ve(g(t.$t("tnc")),1)]),_:1})])])]))]),e(q)?w("",!0):(u(),h("div",yo,[s("div",Co,g(t.$t("info.alreadyHaveAccount")),1),s("div",wo,[s("button",{class:"border border-1 border-[#E3BB72] font-normal text-sm rounded-xl w-full flex items-center justify-center btn-click-animation p-2 active:bg-white/5 transition-colors",onClick:Ye},g(t.$t("btn.login")),1)])]))])])],2)}}}),qo=zt(_o,[["__scopeId","data-v-aeea08c8"]]);export{qo as default};
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.