1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1342],{23754:function(e,a,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/callback/google",function(){return o(73631)}])},73631:function(e,a,o){"use strict";o.r(a),o.d(a,{__N_SSP:function(){return v},default:function(){return w}});var l=o(85893),s=o(67294),n=o(3619),r=o(62001),t=o(59642),i=o(17585),c=o(47041),d=o(8964),m=o(98903),u=o(67841),f=o(88887),p=o(53400),h=o(4975),_=o(77999),y=o(50769),b=o(96486),g=o.n(b),v=!0;function w(e){var a;let{t:o,locale:b,errorMsg:v,profile:w}=e,N=b.split("-"),x=null!==(a=g().find(d.hO,{code:N[0]}))&&void 0!==a?a:{},[k,j]=(0,s.useState)({}),[A,C]=(0,s.useState)({}),[E,T]=(0,s.useState)({new_user:!1,bank_list:[],isSubmitted:!1,dialcode:x.value}),{new_user:U,bank_list:S,isSubmitted:P,dialcode:K}=E,F=(0,_.Z)(f.MI),{errors:O,getInputProps:z,onSubmit:Z,values:B,setFieldValue:M,validateField:V,setFieldError:W,clearFieldError:X}=(0,m.c)({initialValues:{username:"",password:"",confirm_password:"",full_name:"",email:"",phone_no:"",bank:"",acc_no:""},validate:F}),D=()=>{setTimeout(()=>window.location.href="/".concat(b),2e3)},G=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};T(a=>({...a,...e}))};if((0,s.useEffect)(()=>{let e=async()=>{if(v){t.A.error(v),D();return}try{var e;let a=await (0,i.bT)(),o=await (0,r.v2)("/api/auth/getUserByToken",{...a,third_token:w.sub});if(null==o?void 0:null===(e=o.data)||void 0===e?void 0:e.sys_currency){let e=o.data.sys_currency;t.A.success(o.message),(0,i.l5)(e,o.data,d.d),D()}else G({new_user:!0})}catch(e){t.A.error(e),D()}};e()},[]),U){let e=e=>{try{G({dialcode:e})}catch(e){t.A.error(e)}},a=async function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{let o=e.currentTarget.name,l=e.currentTarget.value;if(o){let e=V(o);if(a&&l&&!1==e.hasError){clearTimeout(A[o]);let e=setTimeout(async()=>{try{await s(o,l)}catch(e){"canceled"!==e.message&&t.A.error(e)}clearTimeout(A[o]),C(e=>(delete e[o],{...e}))},1e3);C(a=>({...a,[o]:e}))}}}catch(e){"canceled"!==e.message&&t.A.error(e)}},s=async(e,a)=>{try{k[e]&&k[e].abort();let o=new AbortController;j(a=>({...a,[e]:o})),"phone_no"===e&&(a=K+a);try{return await (0,r.v2)("/api/account/isExist",{attr:e,value:a},{signal:o.signal}),G({}),X(e),!0}catch(a){if("canceled"!=a.message)return W(e,a.message),!1;throw a}finally{j(a=>(delete a[e],{...a}))}}catch(e){throw e}},m=async e=>{try{var a,l;G({isSubmitted:!0});let s=g().cloneDeep(e);if(s.phone_no=K+s.phone_no,g().size(S)&&s.bank&&""!=s.bank){let e=g().find(S,{bid:s.bank});s.mtype=e.mtype}let n=await (0,i.bT)(),m=(0,c.getCookie)("affcode"),u={...n,...s,third_token:null!==(l=null==w?void 0:w.sub)&&void 0!==l?l:"",sys_currency:o("sys_currency"),aff:null!=m?m:"",ignore_email:1},f=await (0,r.v2)("/api/auth/signup3rdparty",u);if(t.A.success(f.message),null==f?void 0:null===(a=f.data)||void 0===a?void 0:a.sys_currency){let e=f.data.sys_currency;(0,i.l5)(e,f.data,d.d),D()}}catch(e){t.A.error(e)}finally{G({isSubmitted:!1})}};return(0,l.jsxs)(y.Z,{className:"auth",title:"",isOpened:!0,onCloseModal:()=>{},children:[P&&(0,l.jsx)(n.fF,{size:"lg",variant:"oval"}),(0,l.jsxs)(p.ZP,{onSubmit:Z(m),noValidate:!0,children:[(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.oi,{label:o("Username"),name:"username",withAsterisk:!0,placeholder:o("Username"),className:"form-control",autoComplete:"off",loading:A.username,...z("username"),onKeyUp:e=>a(e,!0)})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.WU,{label:o("Password"),name:"password",withAsterisk:!0,placeholder:"********",className:"form-control",...z("password"),autoComplete:"off",onKeyUp:e=>a(e)})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.WU,{label:o("Confirm Password"),name:"confirm_password",withAsterisk:!0,placeholder:"********",className:"form-control",...z("confirm_password"),autoComplete:"off",onKeyUp:e=>a(e)})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.QG,{label:o("Bank"),name:"bank",className:"form-control",autoComplete:"off",...z("bank"),_callback:e=>G(e),t:o})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.oi,{label:o("Account No."),name:"acc_no",placeholder:o("Account No."),className:"form-control",autoComplete:"off",...z("acc_no")})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.oi,{label:o("Full Name (as per bank account)"),name:"full_name",withAsterisk:!0,placeholder:o("Full Name"),className:"form-control",autoComplete:"off",...z("full_name"),loading:k.full_name,onKeyUp:e=>a(e,!0)})}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(p.oi,{label:o("Email Address"),name:"email",withAsterisk:!0,placeholder:o("Email Address"),className:"form-control",autoComplete:"off",type:"email",...z("email"),loading:k.email,onKeyUp:e=>a(e,!0)})}),(0,l.jsxs)("div",{className:"form-group dial-code",children:[(0,l.jsx)(h.Z,{label:o("Phone No"),withAsterisk:!0,value:K,data:d.hO,className:"form-control",classNames:{icon:"dial-code-icon",dropdown:"dial-code-dropdown"},name:"phone_no",onChange:e}),(0,l.jsx)(p.oi,{label:(0,l.jsx)(l.Fragment,{children:"\xa0"}),name:"phone_no",className:"form-control",placeholder:o("Phone No"),type:"number",...z("phone_no"),loading:k.phone_no,onKeyUp:e=>a(e,"second",!0)})]}),(0,l.jsx)("div",{className:"form-group",children:(0,l.jsx)(u.z,{className:"submit-btn",type:"submit",disabled:!g().isEmpty(O)||!g().isEmpty(A),loading:!g().isEmpty(k)||P,children:o("Register")})})]})]})}return(0,l.jsx)(n.fF,{size:"lg",variant:"oval"})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=23754)}),_N_E=e.O()}]);
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.