PageSourceSearch

https://www.viva88.net/b/_next/static/chunks/877-352bb1d0e38ed736.js

js viva88.net collected 2026-10-01 01:27:13 UTC 29,499 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[877],{4328:function(e,r,t){var n=t(6835),s=t(3443),a=t(7144),c=t(7875),i=t(7294),o=t(5893);r.Z=function(e){var r=e.contactListType,t=(0,s.Mj)().cashSiteInfo,l=t.Mobile,u=t.Contact,d=(0,c.$G)().t,p=(0,i.useState)(null),h=p[0],f=p[1],m=function(e){var r=e.split("-"),t=(0,n.Z)(r,2),s=t[0],a=t[1],c=s.replace(/\D/g,""),i=a.replace(/\D/g,"");return"+".concat(c).concat(i)},x=function(e){if(!Array.isArray(e))return{lineId:"",telegram:""};var r=e.find(function(e){return"line"===e.Type}),t=e.find(function(e){return"tele"===e.Type});return{lineId:(null==r?void 0:r.Value)||"",telegram:(null==t?void 0:t.Value)||""}}(u),g=x.lineId,j=x.telegram;return((0,i.useEffect)(function(){f((0,a.L_)())},[]),l||g||j)?(0,o.jsxs)("ul",{className:"contact-list".concat(r&&" contact-list--".concat(r)),children:[(0,o.jsx)("li",{className:"contact-list__title",children:(0,o.jsx)("span",{className:"text",children:d("lbl_AgtCash_ContactAgent")})}),l&&(0,o.jsxs)("li",{className:"contact-list__item",onClick:function(e){e.preventDefault(),"desktop"!==h&&"mobile"===h&&(window.location.href="tel:".concat(m(l)))},children:[(0,o.jsx)("i",{className:"icon icon--phone-fill"}),(0,o.jsx)("span",{className:"text",children:l})]}),g&&(0,o.jsxs)("li",{className:"contact-list__item",onClick:function(e){e.preventDefault(),window.open("https://line.me/R/ti/p/".concat(g),"_blank")},children:[(0,o.jsx)("i",{className:"icon icon--social-line-fill"}),(0,o.jsx)("span",{className:"text",children:g})]}),j&&(0,o.jsxs)("li",{className:"contact-list__item",onClick:function(e){e.preventDefault(),window.open("https://t.me/".concat(j),"_blank")},children:[(0,o.jsx)("i",{className:"icon icon--social-telegram-fill"}),(0,o.jsx)("span",{className:"text",children:j})]})]}):(0,o.jsx)(o.Fragment,{})}},9897:function(e,r,t){var n=t(7294),s=t(8333),a=t(7144),c=t(8275),i=t(5893);r.Z=function(e){var r=e.children,t=(0,n.useState)("desktop"),o=t[0],l=t[1],u=(0,c.d)().width;return(0,n.useEffect)(function(){if("mobile"===(0,a.L_)()&&u<s.Z.mediumWidth){l("mobile");return}u>s.Z.mediumWidth?l("desktop"):l("mobile")},[u]),(0,i.jsx)("div",{className:"app","data-layout":o,children:r})}},3677:function(e,r,t){t.d(r,{Z:function(){return eC}});var n,s,a=t(1163),c=t.n(a),i=t(3443),o=t(6084),l=t(7875),u=t(5893),d=function(e){var r=e.children,t=e.pageType,n=void 0===t?"":t;return(0,u.jsx)("div",{className:"page".concat(n&&" page--".concat(n)),children:r})},p=function(e){var r=e.children;return(0,u.jsx)("div",{className:"page__header",children:r})},h=function(e){var r=e.children;return(0,u.jsx)("div",{className:"page__content",children:r})},f=function(e){var r=e.children;return(0,u.jsx)("div",{className:"page__footer",children:r})},m=function(e){var r=e.onClick,t=e.logoInfo,n=(0,l.$G)().t,s=(0,i.Mj)().composePath;return(0,u.jsxs)("div",{className:"page__logo",children:[t&&(0,u.jsx)("div",{className:"page__logo-info",children:(0,u.jsx)("span",{className:"text",children:n("lbl_AgtCash_PoweredBy")})}),(0,u.jsx)("a",{onClick:r||function(){c().push("/")},children:(0,u.jsx)("img",{src:s({pathType:o.Z.siteImage,pathName:"logo_slogan/logo_en.svg"}),alt:""})})]})},x=t(7294),g=t(1664),j=t.n(g),N=t(1975),b=t(6234),v=(0,x.createContext)(),_=function(e){var r=e.children,t=e.dropdownType,n=void 0===t?"":t,s=(0,x.useState)(!1),a=s[0],c=s[1],i=(0,x.useState)(""),o=i[0],l=i[1];return(0,u.jsx)(v.Provider,{value:{dropdownOpen:a,setDropdownOpen:c,dropdownItemSelectedText:o,setDropdownItemSelectedText:l},children:(0,u.jsx)("div",{className:"dropdown".concat(n&&" dropdown--".concat(n)),"data-open":a,children:r})})},w=function(e){var r=e.btnText,t=e.btnIcon,n=void 0===t?"":t,s=(0,x.useContext)(v),a=s.dropdownOpen,c=s.setDropdownOpen,i=s.dropdownItemSelectedText;return(0,u.jsxs)("div",{className:"dropdown__btn",onClick:function(){return c(!a)},children:[n&&(0,u.jsx)("i",{className:"icon icon--".concat(n)}),(0,u.jsx)("span",{className:"text",children:i||r}),(0,u.jsx)("i",{className:"icon icon--caret"})]})},C=function(e){var r=e.children;return(0,u.jsx)("div",{className:"dropdown__container",children:r})},y=function(e){var r=e.children;return(0,u.jsx)("div",{className:"dropdown__list",children:r})},T=function(e){var r=e.children,t=e.text,n=e.onClick,s=(0,x.useContext)(v),a=s.setDropdownOpen,c=s.setDropdownItemSelectedText;return(0,u.jsxs)("div",{className:"dropdown__item",onClick:function(){c(t),a(!1),n&&n(t)},children:[(0,u.jsx)("span",{className:"text",children:t}),r]})},A=function(e){var r=e.children,t=e.panelType,n=void 0===t?"":t;return(0,u.jsx)("div",{className:"panel".concat(n&&" panel--".concat(n)),children:r})},O=function(e){var r=e.children;return(0,u.jsx)("div",{className:"panel__header",children:r})},k=function(e){var r=e.children;return(0,u.jsx)("div",{className:"panel__content",children:r})},D=function(){var e=(0,l.$G)().t,r=(0,N.$)().currentStep;return(0,u.jsxs)("div",{className:"register-step",children:[(0,u.jsx)("div",{className:"register-step__step1","data-selected":1===r,children:(0,u.jsx)("span",{className:"text",children:e("lbl_AgtCash_AccountInfo")})}),(0,u.jsx)("span",{className:"register-step__decorative-line"}),(0,u.jsx)("div",{className:"register-step__step2","data-selected":2===r,children:(0,u.jsx)("span",{className:"text",children:e("lbl_AgtCash_PersonalInfo")})})]})},S=t(7812),P=function(e){var r=e.children,t=e.formType,n=void 0===t?"":t;return(0,u.jsx)("div",{className:"form".concat(n&&" form--".concat(n)),children:r})},U=function(e){var r=e.children;return(0,u.jsx)("div",{className:"form__group",children:r})},I=function(e){var r=e.children;return(0,u.jsx)("div",{className:"form__row",children:r})},E=function(e){var r=e.children;return(0,u.jsx)("div",{className:"form__info",children:r})},L=function(e){var r=e.children;return(0,u.jsx)("div",{className:"form__submit",children:r})},Z=function(e){var r=e.children,t=e.textfieldType,n=(void 0===t?[]:t).map(function(e){return"textfield--".concat(e)}).join(" ");return(0,u.jsxs)("div",{className:"textfield ".concat(n),children:[r,(0,u.jsx)("span",{className:"textfield__bg"})]})},M=function(e){var r=e.inputType,t=e.value,n=e.placeholder,s=e.onCh
1ange,a=e.required;return(0,u.jsx)("input",{className:"textfield__input",type:r,value:t,placeholder:n,onChange:s,required:a})},F=function(e){var r=e.icon;return(0,u.jsx)("div",{className:"textfield__icon",children:r&&(0,u.jsx)("i",{className:"icon icon--".concat(r)})})},R=function(e){var r=e.onClick,t=e.btnSelected;return(0,u.jsxs)("a",{className:"btn btn--icon",onClick:r,"data-selected":t,children:[(0,u.jsx)("i",{className:"icon icon--visibility-off"}),(0,u.jsx)("i",{className:"icon icon--visibility"})]})},$=function(e){var r=e.inputType,t=e.inputTypeSwitch,n=e.value,s=e.placeholder,a=e.onChange,c=e.required,i=(0,x.useState)(!1),o=i[0],l=i[1];return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(M,{inputType:o?r:t,value:n,placeholder:s,onChange:a,required:c}),(0,u.jsx)(R,{btnSelected:o,onClick:function(){return l(!o)}})]})},B=function(e){var r=e.children,t=e.textfieldTipsType,n=void 0===t?"":t;return(0,u.jsx)("ul",{className:"textfield-tips".concat(n&&" textfield-tips--".concat(n)),children:r})},q=function(e){var r=e.text;return(0,u.jsx)("li",{className:"textfield-tips__tip",children:r})},G=t(29),W=t(9499),J=t(6835),H=t(7794),V=t.n(H),z=t(8367),K=(n=(0,G.Z)(V().mark(function e(r){var t,n,s;return V().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.username,n=r.clientApiUrl,e.next=3,fetch("".concat(n,"/api/Login/CheckUserName?username=").concat(t),{method:"GET"});case 3:return s=e.sent,e.abrupt("return",s.json());case 5:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),Q=(s=(0,G.Z)(V().mark(function e(r){var t,n,s,a;return V().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.registerData,n=r.clientApiUrl,e.next=3,fetch("".concat(n,"/api/Login/RegisterCashMember"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});case 3:if((s=e.sent).ok){e.next=6;break}throw Error("HTTP ".concat(s.status));case 6:return e.next=8,s.json();case 8:return a=e.sent,e.abrupt("return",a);case 10:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)}),X={Success:0,CustomerIDError:2,IncorrectUsername:11,CreateUserFailed911:911,UnderMmaintenance:90016,UplineDisableCashService:101,MaximumUser:40040,UplineDisabled:600,UplineClosed:601,CreateUserFailed111:111,CreateUserFailed112:112,CreateUserFailed113:113,CreateUserFailed114:114,CreateUserFailed115:115,CreateUserFailed116:116,CreateUserFailed216:216,UplineDisableRegister:102,ServerError:900,Error:400,ApiBackendError:999},Y=t(3349),ee=t(7541),er=t(6535),et=t(2005),en=t(1129);function es(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function ea(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?es(Object(t),!0).forEach(function(r){(0,W.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):es(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var ec=function(){var e,r,t=(0,l.$G)().t,n=(0,a.useRouter)().locale,s=(0,i.Mj)(),c=s.toggleShowRegister,o=s.clientApiUrl,d=s.rsaPublicKey,p=(0,x.useContext)(b.pI),h=(p[0],p[1]),f=(0,x.useState)(!1),m=f[0],g=f[1],j=(0,et.Z)().verifyCashDomain,v=(0,N.$)(),_=v.currentStep,w=v.setCurrentStep,C=v.formData,y=v.formError,T=v.setFormError,A=v.setRegisterResponse,O=v.setCountdown,k=v.setRegisterLoading,D=v.setLoginState,S=v.clearFormData,P=v.loginTempData,U=(0,z.hq)(),E=(0,J.Z)(U,2),Z=E[0],M=E[1],F=(0,i.Mj)().ip,R=function(){O({second:10,timer:null});var e=setInterval(function(){O(function(r){if(r.second<=1){clearInterval(e);var t=ea(ea({},Z),{},{username:C.userName,password:C.userpwd});return D(function(e){return ea(ea({},e),{},{process:!0})}),(0,Y.xt)("".concat(o,"/api/Login"),t,d).then(function(e){(0,ee.z4)(o,e,t,M,n,F,!1)}).catch(function(){D(function(e){return ea(ea({},e),{},{error:!0,process:!1})})}),{second:0,timer:null}}return ea(ea({},r),{},{second:r.second-1})})},1e3);O(function(r){return ea(ea({},r),{},{timer:e})})},$=(e=(0,G.Z)(V().mark(function e(){return V().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(C.userName){e.next=3;break}return T(function(e){return ea(ea({},e),{},{userName:!0})}),e.abrupt("return",!0);case 3:if(!(C.userName.length<5||C.userName.length>15)){e.next=6;break}return T(function(e){return ea(ea({},e),{},{userName:!0})}),e.abrupt("return",!0);case 6:if(/^[a-zA-Z0-9]+$/.test(C.userName)){e.next=9;break}return T(function(e){return ea(ea({},e),{},{userName:!0})}),e.abrupt("return",!0);case 9:return e.next=11,K({username:C.userName,clientApiUrl:o});case 11:if(!1!==e.sent.available){e.next=15;break}return T(function(e){return ea(ea({},e),{},{userNameAvailable:!0})}),e.abrupt("return",!0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),B=function(){return C.userpwd?(C.userpwd.length<6||C.userpwd.length>10)&&(T(function(e){return ea(ea({},e),{},{userpwd:!0})}),!0):(T(function(e){return ea(ea({},e),{},{userpwd:!0})}),!0)},q=(r=(0,G.Z)(V().mark(function e(){var r,n,s,a,c;return V().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==_){e.next=39;break}if(r=!1,!P.custToken){e.next=22;break}return e.prev=3,e.next=6,$();case 6:r=e.sent,e.next=13;break;
1case 9:e.prev=9,e.t0=e.catch(3),A({code:X.ApiBackendError,message:"".concat(t("lbl_AgtCash_RegisterErrorMsg")),showModal:!0}),r=!0;case 13:if(C.userpwdOld!==P.password&&(T(function(e){return ea(ea({},e),{},{userpwdOld:!0})}),r=!0),C.userpwdOld===C.userpwd&&(T(function(e){return ea(ea({},e),{},{userpwdDifference:!0})}),r=!0),B(),C.userpwdConfirm!==C.userpwd&&(T(function(e){return ea(ea({},e),{},{userpwdConfirm:!0})}),r=!0),!r){e.next=19;break}return e.abrupt("return");case 19:w(function(e){return e+1}),e.next=37;break;case 22:return e.prev=22,e.next=25,$();case 25:r=e.sent,e.next=32;break;case 28:e.prev=28,e.t1=e.catch(22),A({code:X.ApiBackendError,message:"".concat(t("lbl_AgtCash_RegisterErrorMsg")),showModal:!0}),r=!0;case 32:if(n=B(),!(r=r||n)){e.next=36;break}return e.abrupt("return");case 36:w(function(e){return e+1});case 37:e.next=62;break;case 39:if(2!==_){e.next=62;break}if(s=!1,C.firstName?C.firstName.length>50?(T(function(e){return ea(ea({},e),{},{firstNameLength:!0})}),s=!0):/^[^\d!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+$/.test(C.firstName)||(T(function(e){return ea(ea({},e),{},{firstName:!0})}),s=!0):(T(function(e){return ea(ea({},e),{},{firstName:!0})}),s=!0),C.lastName?C.lastName.length>50?(T(function(e){return ea(ea({},e),{},{lastNameLength:!0})}),s=!0):/^[^\d!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+$/.test(C.lastName)||(T(function(e){return ea(ea({},e),{},{lastName:!0})}),s=!0):(T(function(e){return ea(ea({},e),{},{lastName:!0})}),s=!0),C.countryCode?C.countryCode.length>3&&(T(function(e){return ea(ea({},e),{},{countryCode:!0})}),s=!0):(T(function(e){return ea(ea({},e),{},{countryCode:!0})}),s=!0),C.phoneNumber?(C.phoneNumber.length<6||C.phoneNumber.length>12)&&(T(function(e){return ea(ea({},e),{},{phoneNumber:!0})}),s=!0):(T(function(e){return ea(ea({},e),{},{phoneNumber:!0})}),s=!0),!s){e.next=47;break}return e.abrupt("return");case 47:return e.prev=47,k(!0),A({code:null,message:"",showModal:!0}),a=(0,W.Z)({agentId:C.agentId,custToken:C.custToken,userName:C.userName,rsaPassword:(0,er.SJ)(C.userpwd,d),userpwd:(0,er.__)(C.userpwd),firstName:C.firstName,lastName:C.lastName,mobilePhone:C.mobilePhone,domain:C.domain},"custToken",C.custToken),e.next=53,Q({registerData:a,clientApiUrl:o});case 53:c=e.sent,k(!1),c.code===X.Success?(A({code:c.code,message:"",showModal:!0}),R()):A({code:c.code,message:"".concat(t("lbl_AgtCash_RegisterErrorMsg")," (").concat(c.co
1de,")"),showModal:!0}),e.next=62;break;case 58:e.prev=58,e.t2=e.catch(47),k(!1),A({code:X.ApiBackendError,message:"".concat(t("lbl_AgtCash_RegisterErrorMsg")," (").concat(e.t2.code,")"),showModal:!0});case 62:case"end":return e.stop()}},e,null,[[3,9],[22,28],[47,58]])})),function(){return r.apply(this,arguments)});return(0,x.useEffect)(function(){var e=Object.values(y).some(function(e){return!0===e}),r=!1;1===_?r=P.custToken?!C.userName||!C.userpwd||!C.userpwdOld||!C.userpwdConfirm:!C.userName||!C.userpwd:2===_&&(r=!C.firstName||!C.lastName||!C.countryCode||!C.phoneNumber),g(e||r)},[y,C,_,P.custToken]),(0,u.jsxs)(L,{children:[(0,u.jsxs)(I,{children:[(0,u.jsxs)("a",{className:"btn btn--back",onClick:function(){var e=_-1;e<=0?(S(),c(!1),j((0,en.Z)(window.location.href))):(2===_&&T(function(e){return ea(ea({},e),{},{firstName:!1,firstNameLength:!1,lastName:!1,lastNameLength:!1,countryCode:!1,phoneNumber:!1})}),w(e))},children:[(0,u.jsx)("i",{className:"icon icon--arrow-left"}),(0,u.jsx)("span",{className:"text",children:t("lbl_AgtCash_Back")})]}),(0,u.jsx)("a",{className:"btn btn--next","data-disable":m,onClick:q,children:(0,u.jsx)("span",{className:"text",children:1===_?t("lbl_AgtCash_Next"):2===_&&C.custToken?t("lbl_AgtCash_UpdateInfo"):t("lbl_AgtCash_RegisterAccount")})})]}),(0,u.jsx)(I,{children:(0,u.jsx)("a",{className:"btn btn--link",onClick:function(){c(!1),w(1),S(),T(function(e){return ea(ea({},e),{},{userName:!1,userpwd:!1,userpwdOld:!1,userpwdConfirm:!1,userpwdDifference:!1,firstName:!1,firstNameLength:!1,lastName:!1,lastNameLength:!1,countryCode:!1,phoneNumber:!1})}),h({type:"SHOW_LOGIN_POPUP"})},children:(0,u.jsx)("span",{className:"text",children:t("lbl_AgtCash_HaveAccount")})})})]})},ei=function(){var e=(0,l.$G)().t,r=(0,N.$)(),t=r.formData,n=r.formError,s=r.handleInputChange;return(0,u.jsxs)(P,{children:[(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:(0,S.Z)(n.userName||n.userNameAvailable?["error"]:[]),children:[(0,u.jsx)(F,{icon:"my-account"}),(0,u.jsx)(M,{inputType:"text",value:t.userName,placeholder:e("lbl_AgtCash_LoginName"),onChange:s("userName"),required:n.userName})]}),(n.userName||n.userNameAvailable)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.userName&&(0,u.jsx)(q,{text:e("lbl_AgtCash_LoginNameTip")}),n.userNameAvailable&&(0,u.jsx)(q,{text:e("lbl_AgtCash_LoginNameAvailable")})]})]}),(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:["password"].concat((0,S.Z)(n.userpwd?["error"]:[])),children:[(0,u.jsx)(F,{icon:"lock"}),(0,u.jsx)($,{inputType:"text",inputTypeSwitch:"password",value:t.userpwd,placeholder:e("lbl_AgtCash_Pwd"),onChange:s("userpwd"),required:n.userpwd})]}),n.userpwd&&(0,u.jsx)(B,{textfieldTipsType:"error",children:(0,u.jsx)(q,{text:e("lbl_AgtCash_PwdTip")})})]}),(0,u.jsx)(ec,{})]})},eo=function(){var e=(0,l.$G)().t,r=(0,N.$)(),t=r.formData,n=r.formError,s=r.handleInputChange;return(0,u.jsxs)(P,{children:[(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:(0,S.Z)(n.firstName||n.firstNameLength?["error"]:[]),children:[(0,u.jsx)(F,{icon:"account-circle-outline"}),(0,u.jsx)(M,{inputType:"text",value:t.firstName,placeholder:e("lbl_AgtCash_FirstName"),onChange:s("firstName"),required:n.firstName})]}),(n.firstName||n.firstNameLength)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.firstName&&(0,u.jsx)(q,{text:e("lbl_AgtCash_UserNameTip")}),n.firstNameLength&&(0,u.jsx)(q,{text:e("lbl_AgtCash_UserNameMaxLength")})]})]}),(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:(0,S.Z)(n.lastName||n.lastNameLength?["error"]:[]),children:[(0,u.jsx)(F,{icon:"account-circle-outline"}),(0,u.jsx)(M,{inputType:"text",value:t.lastName,placeholder:e("lbl_AgtCash_LastName"),onChange:s("lastName"),required:n.lastName})]}),(n.lastName||n.lastNameLength)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.lastName&&(0,u.jsx)(q,{text:e("lbl_AgtCash_UserNameTip")}),n.lastNameLength&&(0,u.jsx)(q,{text:e("lbl_AgtCash_UserNameMaxLength")})]})]}),(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:["country-code"].concat((0,S.Z)(n.countryCode?["error"]:[])),children:[(0,u.jsx)(F,{icon:"phone-outline"}),(0,u.jsx)(M,{inputType:"text",value:t.countryCode,placeholder:"66",onChange:s("countryCode")})]}),(0,u.jsx)(Z,{textfieldType:(0,S.Z)(n.phoneNumber?["error"]:[]),children:(0,u.jsx)(M,{inputType:"text",value:t.phoneNumber,placeholder:e("lbl_AgtCash_Phone"),onChange:s("phoneNumber")})}),(n.phoneNumber||n.countryCode)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.countryCode&&(0,u.jsx)(q,{text:e("lbl_AgtCash_CountryCodeTip")}),n.phoneNumber&&(0,u.jsx)(q,{text:e("lbl_AgtCash_PhoneTip")})]})]}),(0,u.jsx)(E,{children:(0,u.jsx)("span",{className:"text",children:e("lbl_AgtCash_RegisterInfo")})}),(0,u.jsx)(ec,{})]})},el=function(){var e=(0,l.$G)().t,r=(0,N.$)(),t=r.formData,n=r.formError,s=r.handleInputChange;return(0,u.jsxs)(P,{children:[(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:(0,S.Z)(n.userName||n.userNameAvailable?["error"]:[]),children:[(0,u.jsx)(F,{icon:"my-account"}),(0,u.jsx)(M,{inputType:"text",value:t.userName,placeholder:e("lbl_AgtCash_LoginName"),onChange:s("userName"),required:n.userName})]}),(n.userName||n.userNameAvailable)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.userName&&(0,u.jsx)(q,{text:e("lbl_AgtCash_LoginNameTip")}
1),n.userNameAvailable&&(0,u.jsx)(q,{text:e("lbl_AgtCash_LoginNameAvailable")})]})]}),(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:["password"].concat((0,S.Z)(n.userpwdOld?["error"]:[])),children:[(0,u.jsx)(F,{icon:"lock"}),(0,u.jsx)($,{inputType:"text",inputTypeSwitch:"password",value:t.userpwdOld,placeholder:e("lbl_AgtCash_PwdOld"),onChange:s("userpwdOld"),required:n.userpwdOld})]}),n.userpwdOld&&(0,u.jsx)(B,{textfieldTipsType:"error",children:(0,u.jsx)(q,{text:e("lbl_AgtCash_PwdIncorrect")})})]}),(0,u.jsxs)(U,{children:[(0,u.jsxs)(Z,{textfieldType:["password"].concat((0,S.Z)(n.userpwd||n.userpwdConfirm||n.userpwdDifference?["error"]:[])),children:[(0,u.jsx)(F,{icon:"lock"}),(0,u.jsx)($,{inputType:"text",inputTypeSwitch:"password",value:t.userpwd,placeholder:e("lbl_AgtCash_PwdNew"),onChange:s("userpwd"),required:n.userpwd})]}),(0,u.jsxs)(Z,{textfieldType:["password"].concat((0,S.Z)(n.userpwd||n.userpwdConfirm||n.userpwdDifference?["error"]:[])),children:[(0,u.jsx)(F,{icon:"lock"}),(0,u.jsx)($,{inputType:"text",inputTypeSwitch:"password",value:t.userpwdConfirm,placeholder:e("lbl_AgtCash_PwdConfirm"),onChange:s("userpwdConfirm"),required:n.userpwdConfirm})]}),(n.userpwd||n.userpwdConfirm||n.userpwdDifference)&&(0,u.jsxs)(B,{textfieldTipsType:"error",children:[n.userpwdDifference&&(0,u.jsx)(q,{text:e("lbl_AgtCash_PwdDifference")}),n.userpwd&&(0,u.jsx)(q,{text:e("lbl_AgtCash_PwdTip")}),n.userpwdConfirm&&(0,u.jsx)(q,{text:e("lbl_AgtCash_PwdNotMatch")})]})]}),(0,u.jsx)(ec,{})]})},eu=t(6554),ed=function(e){var r,t=e.language,n=e.domainName;e.loginWebEnableBehaviorCatcher&&(null===(r=eu.s.api)||void 0===r||r.pushEvent("User change language",{payload:JSON.stringify({language:t})},n||void 0,{skipDedupe:!0}))},ep=function(){var e=(0,l.$G)().t,r=(0,a.useRouter)(),t=r.locale,n=r.asPath,s=(0,N.$)(),c=s.currentStep,o=s.loginTempData,d=(0,x.useContext)(i.Re),p=d.languageList,h=d.loginWebEnableBehaviorCatcher,f=(0,x.useContext)(b.pI)[0],m=p&&p.filter(function(e){return"en"===e.code||"th"===e.code})||[];return(0,u.jsxs)(A,{panelType:"register",children:[(0,u.jsxs)(O,{children:[(0,u.jsx)("span",{className:"text-title",children:e("lbl_AgtCash_JoinUs")}),(0,u.jsxs)(_,{children:[(0,u.jsx)(w,{btnText:e("en"===f.language||"th"===f.language?(p&&p.find(function(e){return e.code===f.language})).name:(p&&p.find(function(e){return"en"===e.code})).name)}),m.length>0&&(0,u.jsx)(C,{children:(0,u.jsx)(y,{children:m.map(function(e){return(0,u.jsx)(j(),{href:r.pathname,as:n,locale:e.code,children:(0,u.jsx)(T,{text:e.name,onClick:function(){ed({language:t,domainName:"login-relevant",loginWebEnableBehaviorCatcher:h})}})},e.code)})})})]})]}),(0,u.jsxs)(k,{children:[(0,u.jsx)(D,{}),1===c&&o.custToken&&(0,u.jsx)(el,{}),1===c&&!o.custToken&&(0,u.jsx)(ei,{}),2===c&&(0,u.jsx)(eo,{})]})]})},eh=t(4328),ef=function(e){var r=e.children,t=e.modalType,n=e.open,s=(void 0===t?[]:t).map(function(e){return"modal--".concat(e)}).join(" ");return(0,u.jsx)("div",{className:"modal ".concat(s),"data-open":void 0!==n&&n,children:r})},em=function(e){var r=e.children;return(0,u.jsx)("div",{className:"modal__dialog",children:r})},ex=function(e){var r=e.children;return(0,u.jsx)("div",{className:"modal__body",children:r})},eg=t(7935);function ej(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function eN(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ej(Object(t),!0).forEach(function(r){(0,W.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ej(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var eb=[X.IncorrectUsername,X.CreateUserFailed911,X.CreateUserFailed111,X.CreateUserFailed112,X.CreateUserFailed113,X.CreateUserFailed114,X.CreateUserFailed115,X.CreateUserFailed116,X.CreateUserFailed216,X.ServerError,X.Error,X.ApiBacken
1dError],ev=[X.CustomerIDError,X.UnderMmaintenance,X.UplineDisableCashService,X.MaximumUser,X.UplineDisabled,X.UplineClosed,X.UplineDisableRegister],e_=function(e){var r,t=e.status;e.open;var n=(0,l.$G)().t,s=(0,a.useRouter)().locale,c=(0,N.$)(),o=c.setCurrentStep,d=c.setFormData,p=c.setRegisterResponse,h=c.countdown,f=c.setCountdown,m=c.formData,g=c.registerLoading,j=c.loginState,v=c.setLoginState,_=c.clearFormData,w=(0,z.hq)(),C=(0,J.Z)(w,2),y=C[0],T=C[1],A=(0,i.Mj)(),O=A.ip,k=A.clientApiUrl,D=A.toggleShowRegister,S=A.rsaPublicKey,P=(0,x.useContext)(b.pI),U=(P[0],P[1]),I=(0,et.Z)().verifyCashDomain,E=function(){D(!1),p({code:null,message:"",showModal:!1}),_(),o(1)},L=function(){h.timer&&clearInterval(h.timer),f({second:0,timer:null})};return(0,u.jsx)(ef,{modalType:["register"],open:t.showModal,children:(0,u.jsx)(em,{children:(0,u.jsxs)(ex,{children:[(0,u.jsxs)("div",{className:"register-msg",children:[g?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eg.Z,{}),(0,u.jsxs)("span",{className:"text-title",children:[n("lbl_AgtCash_Loading"),"..."]})]}):t.code===X.Success?j.error?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("i",{className:"icon icon--warning-triangle-fill"}),(0,u.jsx)("span",{className:"text-title",children:n("lbl_AgtCash_Warning")})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("i",{className:"icon icon--successful-circle-fill"}),(0,u.jsx)("span",{className:"text-title",children:n(m.custToken?"lbl_AgtCash_UpdateInfoMsg":"lbl_AgtCash_RegistSuccess")})]}):eb.includes(t.code)||ev.includes(t.code)?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("i",{className:"icon icon--warning-triangle-fill"}),(0,u.jsx)("span",{className:"text-title",children:n("lbl_AgtCash_Warning")})]}):void 0,j.process?(0,u.jsx)(eg.Z,{}):(0,u.jsx)("span",{className:"text",children:g?"":t.code===X.Success&&0!==h.second?j.error?n("lbl_AgtCash_LoginFaildMsg"):j.process?"":n("lbl_AgtCash_RedirectingMsg",{0:h.second}):t.code===X.Success&&0===h.second&&j.error?n("lbl_AgtCash_LoginFaildMsg"):t.message})]}),g?null:(0,u.jsx)("a",{className:"btn btn--secondary",onClick:function(){if(t.code===X.Success){if(j.error){E(),U({type:"SHOW_LOGIN_POPUP"});return}L();var e=eN(eN({},y),{},{username:m.userName,password:m.userpwd});v(function(e){return eN(eN({},e),{},{process:!0})}),(0,Y.xt)("".concat(k,"/api/Login"),e,S).then(function(r){(0,ee.z4)(k,r,e,T,s,O,!1)}).catch(function(){v(function(e){return eN(eN({},e),{},{error:!0,process:!1})})})}eb.includes(t.code)&&(o(1),p({code:null,message:"",showModal:!1}),d(function(e){return eN(eN({},e),{},{userpwd:""})})),ev.includes(t.code)&&(E(),I((0,en.Z)(window.location.href)))},children:(0,u.jsx)("span",{className:"text",children:(r=t.code)===X.Success?n(j.error?"lbl_AgtCash_ReLogin":"lbl_AgtCash_GoToPlay"):eb.includes(r)?n("lbl_AgtCash_TryAgain"):ev.includes(r)?n("lbl_AgtCash_Back"):void 0})})]})})})},ew=function(){var e=(0,i.Mj)().toggleShowRegister;return(0,u.jsxs)(d,{pageType:"register",children:[(0,u.jsx)(p,{children:(0,u.jsx)(m,{onClick:function(){e(!1)},logoInfo:!0})}),(0,u.jsx)(h,{children:(0,u.jsx)(ep,{})}),(0,u.jsx)(f,{children:(0,u.jsx)(eh.Z,{contactListType:"cash-agent"})})]})},eC=function(){var e=(0,N.$)().registerResponse;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ew,{}),e.showModal&&(0,u.jsx)("div",{className:"modal-layer",children:(0,u.jsx)(e_,{status:e})})]})}},7935:function(e,r,t){var n=t(5893);r.Z=function(){return(0,n.jsx)("div",{className:"preloader",children:(0,n.jsx)("div",{className:"preloader__spiner",children:(0,n.jsxs)("div",{className:"preloader__circles",children:[(0,n.jsx)("div",{className:"preloader__circle-1"}),(0,n.jsx)("div",{className:"preloader__circle-2"})]})})})}},2005:function(e,r,t){t.d(r,{Z:function(){return f}});var n,s=t(9499),a=t(2673),c=t(1163),i=t(3443),o=t(29),l=t(7794),u=t.n(l),d=(n=(0,o.Z)(u().mark(function e(r){var t,n,s,a,c;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.domain,n=r.clientApiUrl,t){e.next=3;break}throw Error("Domain is required");case 3:return s="".concat(n,"/api/SiteInfo/VerifyAgencyCashDomain?domain=").concat(t),e.prev=4,e.next=7,fetch(s);case 7:return a=e.sent,e.next=10,a.json();case 10:return c=e.sent,e.abrupt("return",c);case 14:throw e.prev=14,e.t0=e.catch(4),console.error("VerifyAgencyCashDomain error:",e.t0),e.t0;case 18:case"end":return e.stop()}},e,null,[[4,14]])})),function(e){return n.apply(this,arguments)});function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
1r%2?p(Object(t),!0).forEach(function(r){(0,s.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var f=function(){var e=(0,c.useRouter)(),r=(0,i.Mj)(),t=r.setAgentId,n=r.setIsShowJoinNowButton,s=r.setIsShowCashMemberJoinNowButton,o=r.setIsCashSite,l=r.setCashSiteInfo,u=r.clientApiUrl,p=r.siteName,f=(0,a.D)(function(e){return d({domain:e,clientApiUrl:u})},{onSuccess:function(r){if(0===r.ErrorCode&&r.Data){if(t(r.Data.AgentId),l(r.Data),!r.Data.AgentId){e.replace("/".concat(e.locale,"/errorPage"));return}if(0===r.Data.OfferType){n(!1);return}if(0===r.Data.Status){n(!1),s(!0);return}if(1===r.Data.Status){n(!1);return}2===r.Data.Status&&e.replace("/".concat(e.locale,"/errorPage"));return}0===r.ErrorCode&&r.Data||e.replace("/".concat(e.locale,"/errorPage"))},onError:function(){e.replace("/".concat(e.locale,"/errorPage"))}});return h(h({},f),{},{verifyCashDomain:function(e){if(e){console.log("siteName",p);var r=e.match(/simplec-(\d+)/);r&&"nova88"===p&&!Number.isNaN(r[1])&&(o(!0),f.mutate(e))}}})}},1673:function(e,r){r.Z=function(e){switch(e){case"nova88":return"Nova88";case"pica88":return"PICA88";case"ibcbet":return"IBCBet";case"bettha88":return"Bettha88";case"fifabet":return"FifaBet";case"ocean99":return"Ocean99";default:return e}}}}]);
2//# sourceMappingURL=877-352bb1d0e38ed736.js.map

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.