(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[465,7677,381],{14057:function(e,n,t){"use strict";var o=t(85893),r=t(67294),i=t(76030);n.Z=e=>{let{show:n,children:t,duration:a=.3}=e,c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!c.current)return;let e=c.current.scrollHeight;(0,i.Z)({targets:c.current,height:n?e:0,opacity:n?1:0,duration:1e3*a,easing:"easeInOutQuad"})},[n,a]),(0,o.jsx)("div",{ref:c,style:{overflow:"hidden",height:0},children:t})}},57765:function(e,n,t){"use strict";t.d(n,{PR:function(){return _}});var o=t(82729),r=t(85893),i=t(81763),a=t(4281),c=t(61232),s=t(67294),l=t(58199),h=t(73645),d=t(99260),u=t(70508),f=t(63996),g=t(7159),p=t(4994);function m(){let e=(0,o._)(["\n gap: ",";\n & > span {\n border-radius: ",";\n background: rgba(0, 0, 0, 0.04);\n color: #b9bbc6;\n font-weight: 500;\n padding: 0 ",";\n }\n"]);return m=function(){return e},e}function b(){let e=(0,o._)(["\n gap: ",";\n font-size: ",";\n line-height: ",";\n\n .phone-options {\n gap: ",";\n & > .title {\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n padding: "," 0;\n }\n\n .options-btn {\n color: #7e808a;\n align-self: flex-start;\n &:hover {\n opacity: 0.7;\n }\n }\n .sms {\n margin-top: ",";\n }\n }\n .submit-action {\n gap: ",";\n color: #b9bbc6;\n font-weight: 500;\n .login-btn {\n background-color: #000;\n color: #d4ff70;\n height: ",";\n border-radius: ",";\n }\n }\n"]);return b=function(){return e},e}function x(){let e=(0,o._)(["\n border-radius: ",";\n border: "," solid #ebebef;\n display: flex;\n padding: ",";\n gap: ",";\n cursor: pointer;\n &:hover {\n opacity: 0.7;\n }\n &.active {\n border: "," solid #7a0;\n }\n .www-icon {\n width: ",";\n height: ",";\n }\n .phone-info {\n gap: ",";\n .desc {\n gap: ",";\n & > span:last-child {\n color: #b9bbc6;\n font-weight: ",";\n }\n & > span {\n font-weight: ",";\n }\n }\n }\n"]);return x=function(){return e},e}let y=[{type:l.rk.whatsapp,title:"WhatsApp",icon:"whatsApp",dataKey:"whatsapp"},{type:l.rk.telegram,title:"Telegram",icon:"telegram",dataKey:"telegram"}],w={type:l.rk.sms,title:"SMS",icon:"phone",tag:!0},v=(0,i.zo)(a.Layout.Row)(m(),(0,i.hO)(4),(0,i.hO)(4),(0,i.hO)(4)),O=(0,i.zo)(a.Layout.Col)(b(),(0,i.hO)(40),(0,i.hO)(14),(0,i.hO)(20),(0,i.hO)(8),(0,i.hO)(16),(0,i.hO)(20),e=>e.theme.Semi,(0,i.hO)(4),(0,i.hO)(12),(0,i.hO)(12),(0,i.hO)(48),(0,i.hO)(8)),j=e=>{let{icon:n,title:t,phone:o,onClick:i,tag:c,className:s}=e;return(0,r.jsxs)(k,{className:s,onClick:i,children:[(0,r.jsxs)(a.Layout.RowMiddle,{className:"phone-info",children:[n,(0,r.jsxs)(a.Layout.Col,{className:"desc",children:[(0,r.jsx)("span",{children:t}),(0,r.jsx)("span",{children:o})]})]}),c]})},k=(0,i.zo)(a.Layout.RowBetween)(x(),(0,i.hO)(12),(0,i.hO)(1),(0,i.hO)(16),(0,i.hO)(12),(0,i.hO)(1),(0,i.hO)(20),(0,i.hO)(20),(0,i.hO)(12),(0,i.hO)(4),e=>e.theme.Regular,e=>e.theme.Semi),_=e=>{let n={[l.rk.sms]:"SMS",[l.rk.whatsapp]:"WhatsApp",[l.rk.telegram]:"Telegram"};return void 0!==e&&e in n?n[e]:"SMS"};n.ZP=e=>{let{mobile:n,handleSubmit:t,activeProvider:o,hasPhoneOptions:i,className:m}=e,{t:b}=(0,c.$G)(),[x,k]=(0,s.useState)(i),[C,A]=(0,s.useState)(!1),[N,L]=(0,s.useState)(o),{data:P}=(0,p.ZP)(g.F2.appSendProviderCheck,null,{dedupingInterval:3e4});(0,s.useEffect)(()=>{if(P){if(o)return;let e=y.find(e=>P[e.dataKey]);L((null==e?void 0:e.type)||l.rk.sms)}},[P]);let S=function(e,t,o){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(0,r.jsx)(j,{title:t,phone:n,className:(0,d.classList)(e===l.rk.sms&&"sms",N===e&&"active"),icon:(0,r.jsx)(a.Icon,{name:o}),tag:i?(0,r.jsxs)(v,{children:[(0,r.jsx)("span",{children:b("login.phone.verify.tag.slow")}),(0,r.jsx)("span",{children:b("login.phone.verify.tag.unstable")})]}):void 0,onClick:()=>L(e)},e)};if(!P)return(0,r.jsx)(O,{className:m,children:(0,r.jsx)(a.Loading,{})});let z=[...y.filter(e=>P[e.dataKey]),w],E=z[0],I=z.slice(1);return(0,r.jsxs)(O,{className:m,children:[(0,r.jsxs)(a.Layout.Col,{className:"phone-options",children:[(0,r.jsx)("div",{className:"title",children:b("login.phone.verify.title")}),S(E.type,E.title,E.icon,E.type===l.rk.sms),I.length>0&&(0,r.jsxs)(a.Layout.Col,{children:[(0,r.jsx)(h.Av,{className:"options-btn",onClick:()=>k(!0),children:b("login.phone.verify.otheroptions")}),(0,r.jsx)(u.fw,{show:x,children:I.map(e=>S(e.type,e.title,e.icon,e.type===l.rk.sms))})]})]}),(0,r.jsxs)(a.Layout.Col,{className:"submit-action",children:[b("login.phone.verify.submit.tips",[_(N)]),(0,r.jsx)(f.zx,{className:"login-btn",disabled:void 0===N,onClick:async()=>{A(!0);try{await t(N,x)}catch(e){(0,a.Notify)(e)}finally{A(!1)}},loading:C,children:b("login.phone.verify.submit.sendcode")})]})]})}},32064:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(81763),a=t(73645),c=t(67294),s=t(25675),l=t.n(s);function h(){let e=(0,o._)(["\n .text-button {\n height: ",";\n width: ",";\n\n img {\n width: 100%;\n height: 100%;\n }\n }\n"]);return h=function(){return e},e}let d=(0,i.zo)(a.u)(h(),(0,i.hO)(24),(0,i.hO)(24));n.Z=(0,c.memo)(e=>{let{onClick:n,name:t,src:o,desc:i}=e;return(0,r.jsx)(d,{title:i,children:(0,r.jsx)(a.Av,{onClick:n,children:(0,r.jsx)(l(),{alt:t,src:o,width:24,height:24})})})})},63996:function(e,n,t){"use strict";t.d(n,{mD:function(){return d},tY:function(){return l},zx:function(){return s}});var o=t(85893),r=t(81763),i=t(73645),a=t(70508),c=t(41686);let s=(0,c.ZP)(i.xk).withConfig({componentId:"sc-ef209879-0"})(["&.button{height:",";border-radius:",";background-color:#1c2024;color:#d4ff70;&:disabled{color:#b9bbc6;background-color:#ebebef;}}"],(0,r.hO)(48),(0,r.hO)(8)),l=e=>(0,o.jsx)(h,{children:(0,o.jsx)(a.Wc,{...e})}),h=c.ZP.div.withConfig({componentId:"sc-ef209879-1"})(["margin-bottom:",";"],(0,r.hO)(28)),d=(0,c.ZP)(i.b0).withConfig({componentId:"sc-ef209879-2"})(["&.input{.input-control{border-color:#ebebef;&.is-focus{border-color:#7a0;box-shadow:none;}}}"])},22442:function(e,n,t){"use strict";t.r(n),t.d(n,{WalletConnectLogin:function(){return v},WalletConnectProvider:function(){return w}});var o=t(85893),r=t(67294),i=t(4281),a=t(7159),c=t(55548),s=t(50555),l=t(30438),h=t(57421),d=t(66403),u=t(52961),f=t(24543),g=t(73935),p=t(80228),m=t(13118),b=t(32064);let x=[d.R,u.y,f.e],y="6f74f58b14158d4a3fc7f30df77d62ab",w=e=>{let{children:n}=e,{publicClient:t}=(0,l.QB)(x,[(0,c.X)({projectId:y})]),r=(0,h._g)({autoConnect:!0,connectors:(0,c.gu)({projectId:y,chains:x}),publicClient:t}),i=new c.J0(r,x);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(h.eM,{config:r,children:n}),g.createPortal((0,o.jsx)(s.Eg,{projectId:y,ethereumClient:i,themeVariables:{"--w3m-z-index":"2000"}}),document.body)]})};function v(){let{gotoApp:e,afterLogin:n}=(0,m.hq)(),t=(0,r.useRef)(""),{open:c,setDefaultChain:l,close:u}=(0,s.k_)();l(d.R);let{address:f,isConnected:g,connector:x}=(0,h.mA)(),{data:y,signMessage:w,error:v,reset:O}=(0,h.QW)(),{disconnect:j}=(0,h.qL)();async function k(t){let{signature:o,publicAddress:r,message:c}=t;try{O(),j(),u();let t=await a.nA.basicLogin("wallet_connect",{hash:o,address:r,message:c});n(t,()=>{e()})}catch(e){(0,i.Notify)(e)}}return(0,r.useEffect)(()=>{g&&x&&a.nA.randomMessage().then(e=>{t.current=e,w({message:e})}).catch(e=>{(0,i.Notify)(e),O(),j(),u()})},[g,w,x]),(0,r.useEffect)(()=>{y&&f&&k({signature:y,publicAddress:f,message:t.current})},[y,f]),(0,r.useEffect)(()=>{v&&(O(),j(),(0,i.Notify)(Error(v.message)))},[v,j,O]),(0,o.jsx)(b.Z,{onClick:function(){g&&(O(),j()),c({route:"ConnectWallet"})},name:"walletConnect",src:p.Gs.aF,desc:"Continue with Wallet Connect"})}},70508:function(e,n,t){"use strict";t.d(n,{gz:function(){return ev},fw:function(){return ej.Z},xE:function(){return Y},zx:function(){return Q.zx},pL:function(){return N},Kb:function(){return eg},TR:function(){return d},WU:function(){return X},j7:function(){return e_.ZP},GC:function(){return ex},ay:function(){return el},tn:function(){return ek},B5:function(){return er},Wc:function(){return F},uR:function(){return D}});var o=t(82729),r=t(85893),i=t(67294),a=t(81763),c=t(25675),s=t.n(c),l=t(80228);function h(){let e=(0,o._)(["\n padding: "," 0;\n height: ",";\n "," {\n height: ",";\n padding: "," 0;\n }\n"]);return h=function(){return e},e}var d=()=>(0,r.jsx)(u,{children:(0,r.jsx)(s(),{src:l.Gs.Ih,alt:"cwallet",width:160,height:32})});let u=a.zo.div(h(),(0,a.hO)(64),(0,a.hO)(160),a.Uh.mobile,(0,a.hO)(128),(0,a.hO)(48));var f=t(4281),g=t(7159),p=t(29323),m=t(61232),b=t(74103),x=t(73645),y=t(32064),w=t(5152),v=t.n(w),O=t(21073),j=t(67932);function k(){let e=(0,o._)(["\n position: relative;\n z-index: 3;\n width: 100%;\n\n .method-box {\n .or-box {\n height: ",";\n margin: "," 0;\n\n span {\n color: #b9bbc6;\n font-size: ",";\n line-height: ",";\n margin: 0 ",";\n text-transform: lowercase;\n }\n\n > div {\n background-color: #dddde3;\n height: ",";\n width: 100%;\n }\n }\n\n .main-method {\n display: grid;\n grid-template-areas:\n 'a a'\n 'b c'\n 'd e';\n grid-gap: ",";\n\n .button {\n height: ",";\n width: 100%;\n border-radius: ",";\n background-color: #f2f2f5;\n &:not(:disabled):hover {\n background-color: #b9bbc6;\n box-shadow: none;\n .button-inner {\n & > span {\n color: #fcfcfd;\n }\n }\n }\n .icon-box {\n height: ",";\n width: ",";\n border-radius: 50%;\n background-color: #fff;\n margin-right: ",";\n\n .www-icon {\n &.telegram-icon {\n fill: #2aabee;\n }\n\n &.discord-icon {\n fill: #5865f2;\n }\n }\n }\n span {\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n color: #7e808a;\n }\n }\n\n .passkey {\n grid-area: a;\n }\n\n .google {\n grid-area: b;\n }\n .telegram {\n grid-area: c;\n }\n .twitter {\n grid-area: d;\n }\n\n .discord {\n grid-area: e;\n }\n }\n\n .more-method {\n grid-gap: ",";\n margin-top: ",";\n justify-content: center;\n\n .text-button {\n height: ",";\n width: ",";\n\n img {\n width: 100%;\n height: 100%;\n }\n }\n }\n }\n"]);return k=function(){return e},e}let _=v()(()=>Promise.resolve().then(t.bind(t,22442)).then(e=>e.WalletConnectLogin),{loadableGenerated:{webpack:()=>[22442]},ssr:!1}),C=v()(()=>Promise.resolve().then(t.bind(t,22442)).then(e=>e.WalletConnectProvider),{loadableGenerated:{webpack:()=>[22442]},ssr:!1}),A={wallet_link:a.P6.getWalletLink,metamask:a.P6.getMetamask,tron_link:a.P6.getTronLink,phantom:a.P6.getPhantom};var N=(0,p.Pi)(e=>{let{haveMoreLogin:n}=e,{afterLogin:t,interceptNewDeviceLogin:o,gotoApp:i}=(0,b.hq)(),{t:c}=(0,m.$G)("common"),s=async e=>{try{let n=await a.P6.getDeviceId(),r=await g.nA.getAuthData(e);if(!g.nA.checkAuthLoginParams(e,r))return;let c=await g.nA.platformLoginApi({device:"web",platform:e,param:JSON.stringify(r),timestamp:String(Date.now()),device_id:n});if(!await o(c,"platform"))return;t(c,()=>{i()})}catch(e){console.error(e)}};async function h(e){let n;try{let r=A[e];if("function"==typeof r){let[c,s]=await Promise.all([g.nA.randomMessage(),r()]);n=s;let{signature:l,publicAddress:h}=await s.signPersonalMessage(c),d=await a.P6.getDeviceId(),u=await g.dJ.postJson(j.Jt,{data:{data:JSON.stringify({platform:e,param:JSON.stringify({hash:l,address:h,message:c}),device:"web",device_name:navigator.userAgent.slice(0,250),device_id:d,timestamp:String(Date.now())})}});if(!await o(u,"platform"))return;t(u,()=>{var e;null===(e=s.disconnectWallet)||void 0===e||e.call(s),i()})}}catch(e){var r;(0,f.Notify)(e),null==n||null===(r=n.disconnectWallet)||void 0===r||r.call(n)}}let d=async()=>{try{let e=await (0,a.eB)();if(e){let n=await g.nA.basicLogin("passkey",{passkey_request_id:e});t(n,()=>{i()})}}catch(e){if(10025==e.code){(0,f.Notify)(c("login.the.passkey.unavailable"));return}(0,f.Notify)(c("login.authentication.failed"))}};return(0,r.jsx)(L,{children:n&&(0,r.jsxs)("div",{className:"method-box",children:[(0,r.jsxs)(f.Layout.RowMiddle,{className:"or-box",children:[(0,r.jsx)("div",{}),(0,r.jsx)("span",{children:c("login.more")}),(0,r.jsx)("div",{})]}),(0,r.jsxs)("div",{className:"main-method",children:[(0,r.jsxs)(x.xk,{className:"passkey",onClick:d,children:[(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{name:"passkey",size:16})}),(0,r.jsxs)("span",{children:[c("login.continue.text")," ",c("login.passkey")]})]}),(0,r.jsxs)(x.xk,{className:"google",onClick:()=>s("google"),children:[(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{name:"google",size:16})}),(0,r.jsx)("span",{children:c("login.continue.google")})]}),(0,r.jsxs)(x.xk,{className:"telegram",onClick:()=>s("telegram"),children:[(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{className:"telegram-icon",name:"telegram",size:16})}),(0,r.jsx)("span",{children:c("login.continue.telegram")})]}),(0,r.jsxs)(x.xk,{className:"twitter",onClick:()=>s("twitter"),children:[(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{name:"x",size:16})}),(0,r.jsx)("span",{children:c("login.continue.xtwitter")})]}),(0,r.jsxs)(x.xk,{className:"discord",onClick:()=>s("discord"),children:[(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{className:"discord-icon",name:"discord",size:16})}),(0,r.jsx)("span",{children:c("login.continue.discord")})]})]}),(0,r.jsxs)(f.Layout.RowMiddle,{className:"more-method",children:[(0,r.jsx)(y.Z,{onClick:()=>s("reddit"),name:"reddit",src:l.Gs.Od,desc:"Continue with Reddit"}),(0,r.jsx)(C,{children:(0,r.jsx)(_,{})}),!O.B.isMobile&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Z,{onClick:()=>h("wallet_link"),name:"walletLink",src:l.Gs.lj,desc:"Continue with Coinbase"}),(0,r.jsx)(y.Z,{onClick:()=>h("metamask"),name:"metamask",src:l.Gs.QF,desc:"Continue with Metamask"}),(0,r.jsx)(y.Z,{onClick:()=>h("tron_link"),name:"tronlink",src:l.Gs.Po,desc:"Continue with Tronlink"}),(0,r.jsx)(y.Z,{onClick:()=>h("phantom"),name:"phantom",src:l.Gs.ez,desc:"Continue with Phantom"})]})]})]})})});let L=a.zo.div(k(),(0,a.hO)(20),(0,a.hO)(40),(0,a.hO)(16),(0,a.hO)(20),(0,a.hO)(12),(0,a.hO)(1),(0,a.hO)(12),(0,a.hO)(48),(0,a.hO)(8),(0,a.hO)(24),(0,a.hO)(24),(0,a.hO)(8),(0,a.hO)(16),(0,a.hO)(24),e=>e.theme.Regular,(0,a.hO)(12),(0,a.hO)(40),(0,a.hO)(24),(0,a.hO)(24));t(22442),t(46702);var P=t(41686),S=t(97358),z=t(23940);let E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mO8evNiPQAICgMAGt1KtwAAAABJRU5ErkJggg==";function I(){return{type:"click",captcha_id:"",image_base64:E,thumb_base64:E,thumb_x:0,thumb_y:0,thumb_width:0,thumb_height:0}}function R(e,n){return"number"==typeof e&&Number.isFinite(e)?e:n}function M(e,n,t){return Math.min(t,Math.max(n,e))}var W=e=>{let{identity:n}=e,[t,o]=(0,i.useState)(I),[a,c]=(0,i.useState)(""),s=(0,i.useRef)(null);function l(){f.pop.back()}async function h(){try{c(""),o(e=>({...I(),type:e.type}));let e=await g.nA.sendCaptchaV2(n),t=function(e){let n=String((null==e?void 0:e.type)||"click").toLowerCase();return{type:n.includes("drag")||n.includes("rotate")?"drag":n.includes("slide")?"slide":"click",captcha_id:String((null==e?void 0:e.captcha_id)||""),image_base64:String((null==e?void 0:e.image_base64)||E),thumb_base64:String((null==e?void 0:e.thumb_base64)||E),thumb_y:R(Number(null==e?void 0:e.thumb_y),0),thumb_width:50,thumb_height:50}}(e);o(t)}catch(e){(0,f.Notify)(e)}}async function d(e,n){try{let n=e.map(e=>p(e)).map(e=>"".concat(e.x,",").concat(e.y)).join(",");await g.nA.verifyCaptcha(t.captcha_id,n),f.pop.back({captcha_id:t.captcha_id,code:n})}catch(e){c("Please click on the letters in order."),n()}}async function u(e,n,o){try{let n=p(e),o="".concat(n.x,",").concat(n.y);await g.nA.verifyCaptcha(t.captcha_id,o),f.pop.back({captcha_id:t.captcha_id,code:o})}catch(e){c("drag"===o?"Please drag to the correct position.":"Please slide to the correct position."),n()}}function p(e){var n;let t=null===(n=s.current)||void 0===n?void 0:n.querySelector('[class*="gocaptcha-module_bodyInner"]'),o=(null==t?void 0:t.clientWidth)||350,r=(null==t?void 0:t.clientHeight)||250;return{x:M(Math.round(e.x*(o>0?350/o:1)),0,350),y:M(Math.round(e.y*(r>0?250/r:1)),0,250)}}return(0,i.useEffect)(()=>{h()},[]),(0,r.jsx)(B,{ref:s,className:"captcha",$hasError:!!a,children:function(){let e={width:350,height:250,showTheme:!1},n=e=>t.captcha_id?a||e:"";return"slide"===t.type?(0,r.jsx)(z.Z.Slide,{data:{image:t.image_base64,thumb:t.thumb_base64,thumbX:R(t.thumb_x,0),thumbY:R(t.thumb_y,0),thumbWidth:t.thumb_width,thumbHeight:t.thumb_height},config:{...e,title:n("Please slide to complete verification")},events:{refresh:h,close:l,confirm:(e,n)=>{u({x:e.x,y:e.y},n,"slide")}}}):"drag"===t.type?(0,r.jsx)(z.Z.SlideRegion,{data:{image:t.image_base64,thumb:t.thumb_base64,thumbX:0,thumbY:0,thumbWidth:t.thumb_width,thumbHeight:t.thumb_height},config:{...e,title:n("Please drag to complete verification")},events:{refresh:h,close:l,confirm:(e,n)=>{u({x:e.x,y:e.y},n,"drag")}}}):(0,r.jsx)(z.Z.Click,{data:{image:t.image_base64,thumb:t.thumb_base64},config:{...e,thumbWidth:150,thumbHeight:40,title:n("Please click in order"),buttonText:"Confirm"},events:{refresh:h,close:l,confirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;d(e.map(e=>({x:e.x,y:e.y})),n)}}})}()})};let B=P.ZP.div.withConfig({componentId:"sc-f3a05c89-0"})(["--go-captcha-theme-text-color:",";--go-captcha-theme-btn-color:#000000;--go-captcha-theme-btn-bg-color:rgb(189,238,99);--go-captcha-theme-btn-disabled-color:#9fb8ff;--go-captcha-theme-btn-border-color:rgb(189,238,99);--go-captcha-theme-active-color:rgb(189,238,99);--go-captcha-theme-error-color:#e23d31;--go-captcha-theme-error-bg-color:#fff1f0;--go-captcha-theme-error-border-color:#ff7a45;--go-captcha-theme-drag-bg-color:rgb(189,238,99);--go-captcha-theme-drag-icon-color:#000000;width:",";background-color:#fff;border-radius:",";display:flex;flex-direction:column;align-items:center;justify-content:center;[class*='gocaptcha-module_header'] span{color:var(--go-captcha-theme-text-color);}[class*='gocaptcha-module_buttonBlock'] button{border-radius:20px;font-weight:600;letter-spacing:0;}[class*='gocaptcha-module_buttonBlock'] button:not(.disabled):hover{opacity:0.92;}","{width:100vw;}"],e=>{let{$hasError:n}=e;return n?"#e23d31":"#333333"},(0,a.hO)(400),(0,a.hO)(10),a.Uh.mobile);async function D(e){let{identity:n}=e;return f.pop.push((0,r.jsx)(W,{identity:n}),{closeable:!1})}(0,P.ZP)(f.Pop).withConfig({componentId:"sc-42699c79-0"})(["&.pop{display:flex;justify-content:center;align-items:center;}"]),P.ZP.div.withConfig({componentId:"sc-42699c79-1"})(["background-color:#fff;padding:15px;border-radius:10px;padding-right:10px;.captcha__header{.title-box{.title{font-size:",";line-height:",";}.thumb{flex-shrink:0;margin-left:",";}}.refresh-btn{.www-icon path{fill:#5c7c2f;}}}> h5{color:",";margin-top:6px;}.captcha__body{margin:10px auto 0;border-radius:5px;overflow:hidden;position:relative;width:350px;display:flex;justify-content:center;.source{width:350px;height:250px;vertical-align:middle;border-radius:8px;}.point{position:absolute;background:#3e7cff;border:2px solid #fff;border-radius:50%;width:26px;height:26px;font-size:14px;font-weight:",";color:#fff;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-50%);user-select:none;}}.captcha__footer{margin-top:",";grid-gap:",";.button{flex:1;height:",";border-radius:",";font-size:",";}.close{background-color:#f0f0f3;}.confirm{background-color:#bdee63;}}"],(0,a.hO)(14),(0,a.hO)(20),(0,a.hO)(12),S.rS.errorColor,e=>e.theme.Medium,(0,a.hO)(36),(0,a.hO)(12),(0,a.hO)(48),(0,a.hO)(8),(0,a.hO)(16));var G=t(54428),Z=t(99260);function U(){let e=(0,o._)(["\n .input-box {\n display: flex;\n justify-content: space-between;\n\n & > input {\n opacity: 0.05;\n /* */\n border: none;\n color: transparent;\n outline: none;\n caret-color: transparent;\n background-color: transparent;\n width: ",";\n height: ",";\n position: relative;\n top: ",";\n left: 0;\n }\n .code-item {\n flex: 1;\n height: ",";\n border-radius: ",";\n outline: solid "," #ebebef;\n background-color: #fff;\n font-size: ",";\n line-height: ",";\n cursor: pointer;\n margin-left: ",";\n\n &:first-of-type {\n margin-left: 0;\n }\n &.current-empty {\n outline: solid "," #7a0;\n &::after {\n content: '|';\n animation: "," 1s infinite;\n }\n }\n &.success{\n outline-color: #527D00;\n }\n\n &.current {\n outline-color: #d3d4db;\n }\n &.error {\n outline-color: #e5484d;\n }\n\n &.disabled {\n outline: "," solid #d3d4db;\n background: #f0f0f3;\n cursor: not-allowed;\n }\n }\n }\n\n .footer {\n margin-top: ",";\n font-size: ",";\n line-height: ",";\n\n .loader-icon {\n animation: "," 2s linear infinite;\n align-self: flex-end;\n }\n\n > span {\n color: #e5484d;\n }\n\n .success-box {\n span {\n color: #30a46c;\n }\n }\n }\n"]);return U=function(){return e},e}var F=(0,i.memo)(e=>{let{len:n=6,callBack:t,verify:o,onError:a,loading:c,autoFocus:s=!0,className:l}=e,{t:h}=(0,m.$G)("common"),d=(0,i.useRef)(null),[u,g]=(0,i.useState)(s),[p,b]=(0,i.useState)("");(0,i.useEffect)(()=>{o&&"success"!==o.type&&b("")},[o]),(0,i.useEffect)(()=>{(null==o?void 0:o.type)==="error"&&""!==p&&a&&a()},[p]);let x=()=>{var e;null===(e=d.current)||void 0===e||e.focus()};return(0,i.useEffect)(()=>{(0,G.Z)(()=>{s&&x()},100)},[s]),(0,r.jsxs)($,{className:l,children:[(0,r.jsxs)("div",{className:"input-box",children:[(0,r.jsx)("input",{disabled:c,value:p,onBlur:()=>g(!1),onFocus:()=>g(!0),onChange:e=>{let o=e.target.value;(!o||/^[0-9]{1,6}$/.test(o))&&(b(o),o.length===n&&setTimeout(()=>{t&&t(o)},100))},ref:d,maxLength:n}),Array(n).fill("").map((e,n)=>{let t=p[n]||"0"==p[n],i=!p[n]&&"0"!=p[n]&&p.length===n&&u;return(0,r.jsx)(f.Layout.Center,{className:(0,Z.classList)("code-item",o&&"error"===o.type&&"error",o&&"success"===o.type&&"success",t&&"current",i&&"current-empty",c&&"disabled"),onClick:x,children:t||""},n.toString())})]}),(0,r.jsxs)(f.Layout.Col,{className:"footer",children:[c&&(0,r.jsx)(f.Icon,{name:"loader",className:"loader-icon",size:16}),o&&"error"===o.type&&(0,r.jsx)("span",{children:o.msg}),o&&"success"===o.type&&(0,r.jsxs)(f.Layout.RowBetween,{className:"success-box",children:[(0,r.jsx)("span",{children:h("login.logging.in")}),(0,r.jsx)(f.Icon,{name:"success",className:"success-icon",size:16})]})]})]})});let q=(0,P.F4)(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]),T=(0,P.F4)(["0%,100%{opacity:1};50%{opacity:0}"]),$=a.zo.div(U(),(0,a.hO)(1),(0,a.hO)(64),(0,a.hO)(40),(0,a.hO)(64),(0,a.hO)(12),(0,a.hO)(1),(0,a.hO)(28),(0,a.hO)(36),(0,a.hO)(8),(0,a.hO)(1),T,(0,a.hO)(1),(0,a.hO)(12),(0,a.hO)(12),(0,a.hO)(16),q);var J=t(15989);function H(){let e=(0,o._)(["\n &.text-button {\n height: ",";\n width: ",";\n }\n"]);return H=function(){return e},e}var Y=()=>{let{pop:e}=(0,J.useLoginContext)();return(0,r.jsx)(K,{onClick:e,children:(0,r.jsx)(f.Icon,{name:"leftArrow",size:24})})};let K=(0,a.zo)(x.Av)(H(),(0,a.hO)(24),(0,a.hO)(24));var Q=t(63996);function V(){let e=(0,o._)(["\n .password-input {\n /* width: 100%; */\n border-radius: ",";\n border: "," solid #EBEBEF;\n display: flex;\n background-color: #fff;\n\n &.error {\n border-color: #f25145;\n }\n \n &:not(.error).focus {\n border-color: #7A0;\n }\n\n .input-control {\n width: 100%;\n border: none;\n\n &:hover,\n &.is-focus {\n box-shadow: none;\n }\n }\n\n .input-after {\n padding: 0 ",";\n display: flex;\n align-items: center;\n margin: 0;\n\n .text-button {\n line-height: 0;\n }\n }\n }\n\n > p {\n margin-top: ",";\n font-size: ",";\n line-height: ",";\n color: #e5484d;\n }\n"]);return V=function(){return e},e}var X=(0,i.memo)(e=>{let{visible:n=!1,value:t,placeholder:o="",isError:a,errorMsg:c,id:s,maxLength:l,disabled:h,onChange:d,onBlur:u,onFocus:g,onEnter:p}=e,[m,b]=(0,i.useState)(n),[y,w]=(0,i.useState)(!1);return(0,r.jsxs)(ee,{children:[(0,r.jsx)(Q.mD,{onKeyDown:e=>{"Enter"===e.code&&(e.preventDefault(),p&&p())},id:s,isError:a,className:"password-input ".concat(y?"focus":""," ").concat(a?"error":""),value:t,maxLength:l,onChange:e=>d&&d(e),onFocus:()=>{w(!0),g&&g()},placeholder:o,onBlur:()=>{w(!1),u&&u()},disabled:h,type:m?"text":"password",after:(0,r.jsx)(x.Av,{onClick:()=>b(e=>!e),children:(0,r.jsx)(f.Icon,{size:24,name:m?"invisible":"visible"})})}),!!a&&(0,r.jsx)("p",{children:c})]})});let ee=a.zo.div(V(),(0,a.hO)(8),(0,a.hO)(1),(0,a.hO)(16),(0,a.hO)(8),(0,a.hO)(12),(0,a.hO)(16));var en=t(13118);function et(){let e=(0,o._)(["\n color: #7a0;\n font-weight: ",";\n font-size: ",";\n font-variant-numeric: tabular-nums;\n & > span > span {\n color: #7e808a;\n font-weight: 500;\n }\n"]);return et=function(){return e},e}function eo(){let e=(0,o._)(["\n height: ",";\n border-radius: ",";\n background-color: #1c2024;\n color: #d4ff70;\n &:disabled {\n color: #b9bbc6;\n background-color: #ebebef;\n }\n"]);return eo=function(){return e},e}var er=e=>{let{type:n="text",codeType:t,autoSendOnce:o}=e,{t:a}=(0,m.$G)("common"),{identity:c,method:s,email:l,area:h,mobile:d,request_code:u}=(0,en.hq)(),[g,p]=(0,i.useState)(60),[b,x]=(0,i.useState)("text"===n&&!o),y=(0,i.useRef)(null),w=async()=>{try{let e=await D({identity:l});if(!e)return;await (0,en.ij)({captchaCode:{captcha_id:e.captcha_id,captcha_code:e.code},identity:c,method:s,...u?{request_code:u}:{email:l,area:h,mobile:d},type:t}),x(!0)}catch(e){(0,f.Notify)(e)}},v=()=>{O(),y.current=setInterval(()=>{p(e=>e>0?e-1:(x(!1),60))},1e3)};(0,i.useEffect)(()=>(b?v():O(),()=>{O()}),[b]),(0,i.useEffect)(()=>{o&&w()},[]);let O=()=>{y.current&&clearInterval(y.current)};return"button"===n?(0,r.jsx)(ea,{onClick:w,className:"resend-btn",disabled:b,children:(0,r.jsx)("span",{children:b?a("login.code.sent",["(".concat(g,"s)")]):a("login.send.code")})}):(0,r.jsx)(ei,{onClick:w,className:"resend-btn",disabled:b,children:(0,r.jsx)("span",{children:b?(0,r.jsxs)(r.Fragment,{children:[a("login.resend.slot",[""])," ",(0,r.jsxs)("span",{children:["(",g,"s)"]})," "]}):a("common.key.resend")})})};let ei=(0,a.zo)(x.Av)(et(),e=>e.theme.DemiBold,(0,a.hO)(14)),ea=(0,a.zo)(x.xk)(eo(),(0,a.hO)(48),(0,a.hO)(8));function ec(){let e=(0,o._)(["\n color: #5c7c2f;\n font-weight: ",";\n font-size: ",";\n font-variant-numeric: tabular-nums;\n"]);return ec=function(){return e},e}function es(){let e=(0,o._)(["\n height: ",";\n background-color: #bdee63;\n padding: 0 ",";\n"]);return es=function(){return e},e}var el=e=>{let{type:n="text",onClick:t,autoClick:o}=e,{t:a}=(0,m.$G)("common"),[c,s]=(0,i.useState)(60),[l,h]=(0,i.useState)(!1),d=(0,i.useRef)(null),u=()=>{f(),d.current=setInterval(()=>{s(e=>e>0?e-1:(h(!1),60))},1e3)};(0,i.useEffect)(()=>(l?u():f(),()=>{f()}),[l]);let f=()=>{d.current&&clearInterval(d.current)};(0,i.useEffect)(()=>{o&&g()},[o]);let g=async()=>{t&&(await t(),h(!0))};return"button"===n?(0,r.jsx)(ed,{onClick:g,className:"resend-btn",disabled:l,children:(0,r.jsx)("span",{children:l?a("login.code.sent",["(".concat(c,"s)")]):a("login.send.code")})}):(0,r.jsx)(eh,{onClick:g,className:"resend-btn",disabled:l,children:(0,r.jsx)("span",{children:l?a("login.resend.slot",["(".concat(c,"s)")]):a("common.key.resend")})})};let eh=(0,a.zo)(x.Av)(ec(),e=>e.theme.Medium,(0,a.hO)(14)),ed=(0,a.zo)(x.xk)(es(),(0,a.hO)(48),(0,a.hO)(12));var eu=t(4994);function ef(){let e=(0,o._)(["\n width: 100%;\n height: 100%;\n\n .qr-code {\n width: ",";\n height: ",";\n border-radius: ",";\n padding: ",";\n background-color: #fff;\n box-shadow: "," "," "," "," rgba(134, 172, 208, 0.04);\n position: relative;\n overflow: hidden;\n\n &.blur {\n img {\n filter: blur(",");\n opacity: 0.3;\n }\n }\n img {\n width: 100%;\n height: 100%;\n }\n }\n\n .mask {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n justify-content: center;\n\n h4 {\n margin-bottom: ",";\n font-size: ",";\n line-height: ",";\n }\n .icon-box {\n background-color: #fff;\n height: ",";\n width: ",";\n border-radius: ",";\n\n .loader-icon {\n animation: "," 2s linear infinite;\n }\n }\n > span {\n font-size: ",";\n line-height: ",";\n color: #7E808A;\n margin-top: ",";\n }\n .text-button {\n color: #5c7c2f;\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n }\n\n .refresh-btn {\n background-color: #1c2024;\n height: ",";\n width: ",";\n border-radius: ",";\n }\n }\n\n > p {\n font-size: ",";\n line-height: ",";\n color: #1c2024;\n margin-top: ",";\n\n a {\n color: #5c7c2f;\n font-weight: ",";\n }\n }\n"]);return ef=function(){return e},e}var eg=()=>{let{gotoApp:e,afterLogin:n}=(0,J.useLoginContext)(),[t,o]=(0,i.useState)(!0),[c,s]=(0,i.useState)(""),[l,h]=(0,i.useState)(1),d=(0,i.useMemo)(()=>c&&[1,2].includes(l)?g.F2.getCardBinSupportMerchantListApi(c):null,[l,c]),{data:u}=(0,eu.ZP)(d,null,{refreshInterval:4e3});async function p(){o(!0);try{let e=a.P6.getBrowser(),n=await g.nA.getQrCodeIdApi("".concat(e.type,"-").concat(e.versions));s(n),h(1)}catch(e){(0,f.Notify)(e)}finally{o(!1)}}async function m(t,o){try{let r=await g.nA.basicLogin("qrcode",{scan_id:t,auth_code:o});n(r,()=>{e()})}catch(e){(0,f.Notify)(e)}}(0,i.useEffect)(()=>{p()},[]),(0,i.useEffect)(()=>{u&&(h(u.status),3===u.status&&u.auth_code&&m(c,u.auth_code),null==u||u.auth_code)},[u]);let b=(0,i.useMemo)(()=>[2,3,-1].includes(l),[l]),y=(0,i.useMemo)(()=>t||!c?(0,r.jsx)(f.Loading,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.Qrcode,{text:"https://".concat(a.OB.host,"/?loginCode=").concat(c)}),(()=>{switch(l){case 2:return(0,r.jsxs)(f.Layout.ColMiddle,{className:"mask",children:[(0,r.jsx)("h4",{children:"Scanned"}),(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{className:"loader-icon",name:"loader",size:24})}),(0,r.jsx)("span",{children:"Please confirm on Phone"}),(0,r.jsx)(x.Av,{onClick:p,children:"Refresh"})]});case 3:return(0,r.jsxs)(f.Layout.ColMiddle,{className:"mask success",children:[(0,r.jsx)("h4",{children:"Scanned"}),(0,r.jsx)(f.Layout.Center,{className:"icon-box",children:(0,r.jsx)(f.Icon,{name:"success",size:24})}),(0,r.jsx)("span",{children:"Logging in"})]});case -1:return(0,r.jsxs)(f.Layout.ColMiddle,{className:"mask expired",children:[(0,r.jsx)("h4",{children:"Expired"}),(0,r.jsx)(Q.zx,{className:"refresh-btn",onClick:p,children:(0,r.jsx)(f.Icon,{name:"refreshV2",size:24})}),(0,r.jsx)("span",{children:"Click to refresh"})]});default:return null}})()]}),[c,l,t]);return(0,r.jsxs)(em,{children:[(0,r.jsx)("div",{className:"qr-code ".concat(b?"blur":""),children:y}),(0,r.jsxs)("p",{children:["Scan with ",(0,r.jsx)(f.LinkButton,{href:"/download",children:"Cwallet App"})," to Log in"]})]})};let ep=(0,P.F4)(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]),em=(0,a.zo)(f.Layout.ColMiddle)(ef(),(0,a.hO)(256),(0,a.hO)(256),(0,a.hO)(20),(0,a.hO)(24),(0,a.hO)(0),(0,a.hO)(14),(0,a.hO)(32),(0,a.hO)(0),(0,a.hO)(10),(0,a.hO)(16),(0,a.hO)(16),(0,a.hO)(24),(0,a.hO)(48),(0,a.hO)(48),(0,a.hO)(12),ep,(0,a.hO)(12),(0,a.hO)(16),(0,a.hO)(16),(0,a.hO)(12),(0,a.hO)(16),(0,a.hO)(8),(0,a.hO)(48),(0,a.hO)(48),(0,a.hO)(12),(0,a.hO)(14),(0,a.hO)(20),(0,a.hO)(32),e=>e.theme.DemiBold);function eb(){let e=(0,o._)(["\n margin-top: ",";\n color: #8b8d98;\n font-size: ",";\n line-height: ",";\n letter-spacing: ",";\n text-align: center;\n\n a {\n color: #1c2024;\n }\n"]);return eb=function(){return e},e}var ex=()=>{let{t:e}=(0,m.$G)();return(0,r.jsxs)(ey,{children:[e("login.by.continuing")," ",(0,r.jsxs)("a",{href:a.OB.webUrl.termsOfUse,target:"_blank",children:[e("login.zero.policy.text2")," "]})," ",e("text.and")," ",(0,r.jsx)("a",{href:a.OB.webUrl.privacyPolicy,target:"_blank",children:e("login.zero.policy.text4")})]})};let ey=a.zo.p(eb(),(0,a.hO)(40),(0,a.hO)(12),(0,a.hO)(16),(0,a.hO)(.4));function ew(){let e=(0,o._)(["\n .img-box {\n background-color: #feebec;\n width: ",";\n height: ",";\n border-radius: 50%;\n }\n\n h4 {\n font-size: ",";\n line-height: ",";\n color: #1c2024;\n font-weight: ",";\n margin-top: ",";\n }\n p {\n font-size: ",";\n line-height: ",";\n color: #1c2024;\n margin-top: ",";\n text-align: center;\n }\n\n .button {\n height: ",";\n background-color: #bdee63;\n margin-top: ",";\n }\n"]);return ew=function(){return e},e}var ev=e=>{let{retryCount:n,desc:t}=e,{t:o}=(0,m.$G)("common");return(0,r.jsx)(eO,{closeable:!1,children:(0,r.jsxs)(f.Layout.ColMiddle,{children:[(0,r.jsx)(f.Layout.Center,{className:"img-box",children:(0,r.jsx)(s(),{className:"error-img",src:l.Gs.XT,alt:"error",width:80,height:80})}),(0,r.jsx)("h4",{children:o("login.account.limited")}),(0,r.jsx)("p",{children:t||"Account has limited with the continually wrong password. Please kindly try again ".concat(n," hours later.")}),(0,r.jsx)(x.xk,{onClick:f.pop.back,children:o("login.got.it")})]})})};let eO=(0,a.zo)(f.Pop)(ew(),(0,a.hO)(88),(0,a.hO)(88),(0,a.hO)(24),(0,a.hO)(32),e=>e.theme.DemiBold,(0,a.hO)(32),(0,a.hO)(16),(0,a.hO)(24),(0,a.hO)(12),(0,a.hO)(48),(0,a.hO)(36));var ej=t(14057),ek=e=>{let{type:n="text",codeType:t}=e,{t:o}=(0,m.$G)("common"),{identity:a,method:c,email:s,area:l,mobile:h,request_code:d}=(0,en.hq)(),[u,g]=(0,i.useState)(60),[p,b]=(0,i.useState)("text"===n),x=(0,i.useRef)(null),y=async()=>{try{let e=await D({identity:a});if(!e)return;await (0,en.ij)({captchaCode:{captcha_id:e.captcha_id,captcha_code:e.code},identity:a,method:c,...d?{request_code:d}:{email:s,area:l,mobile:h},type:t}),b(!0)}catch(e){(0,f.Notify)(e)}},w=()=>{v(),x.current=setInterval(()=>{g(e=>e>0?e-1:(b(!1),60))},1e3)};(0,i.useEffect)(()=>(p?w():v(),()=>{v()}),[p]);let v=()=>{x.current&&clearInterval(x.current)};return(0,r.jsx)(Q.zx,{disabled:p,onClick:y,children:(0,r.jsx)("span",{children:p?o("login.code.sent",["(".concat(u,"s)")]):o("login.send.code")})})},e_=t(57765)},13118:function(e,n,t){"use strict";t.d(n,{hq:function(){return o.useLoginContext},ij:function(){return o.getVerifyCode}});var o=t(15989)},47677:function(e,n,t){"use strict";t.r(n),t.d(n,{checkActivityReport:function(){return i}});var o=t(7159),r=t(81763);let i=async()=>{let e=window.location.pathname;if(!(e.includes("deep_linking")||e.includes("native_webauthn")))try{let e=r.P6.getURLSearchParams("startapp");if(!e)return;let n=e.split("__CPN__")[1];await o.nA.sendLuckyBoxActivityReportApi(n)}catch(e){console.error(e)}}},50381:function(e,n,t){"use strict";t.r(n),t.d(n,{loginSuccessEvent:function(){return r}});var o=t(81763);let r=e=>{let n=new URL(window.location.href).searchParams.get("backurl")||"";(0,o.L9)(e.is_new?"user_register":"user_login",{user_id:e.user_id,referrer_url:n}),window.ttq&&window.ttq.track(e.is_new?"CompleteRegistration":"CompleteLogin")}},74103:function(e,n,t){"use strict";t.d(n,{Oj:function(){return i},hq:function(){return a},m8:function(){return r}});var o=t(67294);let r={password:"",method:"email",maskEmail:"",email:"",maskArea:"+1",area:"+1",maskMobile:"",mobile:"",isLogin:!0,phoneReciveMode:void 0,phoneOptions:!1,request_code:"",isBack:!1,stage:t(58199).wY.EnterEmailOrMobile,identity:"",registered:0,hasBindPasskey:!1,isNewDevice:!1,isNewUser:!1,verifyCode:"",captchaCode:{captcha_id:"",captcha_code:""},needAuthMap:{device_auth:!1,code_auth:!1},interceptNewDeviceLogin:async()=>!0,afterLogin:()=>{},gotoApp:()=>{},finishWithAuthCode:()=>{},preferFinalizeJump:!1,authCode:"",finalizeAuthCodeWithCode:async()=>{},setState:()=>{},push:()=>{},pop:()=>{},replace:()=>{},close:()=>{}},i=o.createContext(r);function a(){let e=(0,o.useContext)(i);if(void 0===e)throw Error("useLoginStateContext must be used within a LoginContext");return e}},15989:function(e,n,t){"use strict";t.r(n),t.d(n,{DEFAULT_LOGIN_STATE:function(){return o.m8},LoginContext:function(){return o.Oj},checkActivityReport:function(){return g},getVerifyCode:function(){return h},identifyPhoneNumber:function(){return p},loginAnalyticsEvent:function(){return b},parseErrorData:function(){return f},resetPasswordVerify:function(){return u},safeJumpToApp:function(){return m},sendCwalletCaptcha:function(){return d},useLoginContext:function(){return o.hq}});var o=t(74103),r=t(7159),i=t(58199),a=t(70508),c=t(61232),s=t(4281),l=t(81763);let h=async e=>{let{captchaCode:n,identity:t,method:o,type:i,email:a="",mobile:c="",area:s="",request_code:l="",receive_mode:h}=e,{captcha_id:d,captcha_code:u}=n;"email"===o?await r.nA.sendEmailCode({request_code:l,email:a,code_type:i,opt:{captcha_id:d,captcha_code:u,identity:t}}):await r.nA.getSmsCode({request_code:l,area:s,mobile:c,code_type:i,opt:{captcha_id:d,captcha_code:u,identity:t},receive_mode:h})},d=async e=>{let{identity:n,method:t,type:o,email:r="",area:i="",mobile:c="",request_code:l="",receive_mode:d}=e;try{let e=await (0,a.uR)({identity:n});if(!e)throw Error("");return await h({captchaCode:{captcha_id:e.captcha_id,captcha_code:e.code},identity:n,method:t,type:o,mobile:l?"":c,area:l?"":i,email:l?"":r,request_code:l,receive_mode:d}),{captcha_id:e.captcha_id,captcha_code:e.code}}catch(e){(0,s.Notify)(e);return}},u=(e,n)=>{let t=e.trim(),o=n.trim(),r=t.length,i=o.length;return r!==i||t!==o?(null===c.ag||void 0===c.ag?void 0:c.ag.t("login.notMatch"))||"":(r<8||i<8||r>20||i>20)&&(null===c.ag||void 0===c.ag?void 0:c.ag.t("login.digits"))||""},f=e=>{try{if(e.response.data){let n=e.response.data,{left_retry_num:t=0,retry_type:o,total_retry_num:r=0,block_hours:a=2}=n;switch(o){case i.y3.MAIL_CODE:case i.y3.PHONE_CODE:if(t>1)return{code:e.response.code,msg:"You have failed ".concat(r-t," times, ").concat(t," chances left"),data:n,type:"error"};if(1===t)return{code:e.response.code,msg:"Wrong code, ".concat(t," chance left before before your account is locked for ").concat(a," hours."),data:n,type:"error"};return{code:e.response.code,msg:"Account has limited with the continually wrong code. Please kindly\n try again ".concat(a," hours later."),type:"warn",data:n};case i.y3.PHONE_PASSWD:case i.y3.EMAIL_PASSWD:if(t>1)return{code:e.response.code,msg:"Wrong password, ".concat(t," chances left"),data:n,type:"error"};if(1===t)return{code:e.response.code,msg:"Wrong password, ".concat(t," chance left before your account is locked for ").concat(a," hours."),data:n,type:"error"};return{code:e.response.code,msg:"Account has limited with the continually wrong password. Please kindly\n try again ".concat(a," hours later."),type:"warn",data:n};case i.y3.PAY_PASS:if(t>1)return{code:e.response.code,msg:"Wrong password, ".concat(t," chances left"),data:n,type:"error"};if(1===t)return{code:e.response.code,msg:"Wrong password, ".concat(t," chance left before account are restricted for ").concat(a," hours."),data:n,type:"error"};return{code:e.response.code,msg:"Account has limited with the continually wrong password. Please kindly\n try again ".concat(a," hours later."),type:"warn",data:n};case i.y3.MODIFY_PASSWD:return{code:e.response.code,msg:"You have recently changed your payment password. account are disabled for ".concat(a," hours."),type:"warn",data:n};case i.y3.GOOGLE_CODE:case i.y3.CAPTCHA_CODE:case i.y3.NONE:default:return{code:e.response.code,msg:"",type:"error"}}}else{if(100114===e.response.code)return{msg:"",type:"error",code:e.response.code};return{code:e.response.code,msg:"",type:"error"}}}catch(e){return{msg:"",type:"error"}}},g=async()=>{let e=window.location.pathname;if(!(e.includes("deep_linking")||e.includes("native_webauthn")))try{let e=l.P6.getURLSearchParams("startapp");if(!e)return;let n=e.split("__CPN__")[1];await r.nA.sendLuckyBoxActivityReportApi(n)}catch(e){console.error(e)}};function p(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=[...n.length>0?n:["1"]].sort((e,n)=>n.length-e.length),o=e.match(/^\s*([+]?\d+)\s+(.*)$/);return o?function(e,n,t,o){let r=e.startsWith("+")?e.slice(1):e;if(t.includes(r)){let e=n.replace(/\s/g,"");if(""===e||/^\d+$/.test(e))return{area_code:r,number:e}}return{email:o}}(o[1],o[2],t,e):function(e,n){let t;let o=e.replace(/\s/g,"");for(let e of(t=o.startsWith("+")?o.slice(1):o,n))if(t.startsWith(e)){let n=t.slice(e.length);if(""===n||/^\d+$/.test(n))return{area_code:e,number:n}}return{email:e}}(e,t)}function m(e){let{backUrl:n,AUTH_CODE:t,isDomainChanged:o}=e;try{let e=new URL(decodeURIComponent(n)),r="cwallet.in";if([l.OB.host,r].some(n=>{if(!e.host.endsWith(n))return!1;let t=e.host.split(n),o=t[t.length-2];return!!(""===o||o.length>1&&o.endsWith("."))})){let i=n;if((o||e.host.endsWith(r))&&t){let e=new URL(n);e.searchParams.append("AUTH_CODE",t),i=e.toString()}window.location.href=l.P6.sanitizeHref(decodeURIComponent(i))}else window.location.href="https://".concat(l.OB.appDomain)}catch(e){window.location.href="https://".concat(l.OB.appDomain)}}t(47677);var b=t(50381)},35883:function(){}}]);