1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[40933],{72740:function(e,t,n){"use strict";n.d(t,{Z:function(){return login_BackButton}});var o=n(85893),i=n(94184),a=n.n(i),l=n(9970);let LeftArrow=e=>{let{className:t}=e;return(0,l.I)((0,o.jsx)("path",{d:"m1 1 6 6-6 6",stroke:"#000",strokeWidth:"2",fill:"none",fillRule:"evenodd",opacity:".3",strokeLinecap:"round",strokeLinejoin:"round"}),{width:8,height:14,style:t})};var r=n(37973),s=n.n(r),login_BackButton=e=>{let{onClick:t,classname:n}=e;return(0,o.jsxs)("div",{className:a()(s()["back-btn-holder"],n),onClick:t,children:[(0,o.jsx)(LeftArrow,{className:s()["back-arrow"]}),(0,o.jsx)("div",{className:s()["back-text"],children:"Back"})]})}},40933:function(e,t,n){"use strict";var o=n(85893),i=n(67294),a=n(50259),l=n(70148),r=n(69272),s=n(49472),c=n(65783),u=n(95521),d=n(92935),p=n(994),h=n(77903),_=n(29636),m=n.n(_),g=n(87478),O=n(94184),L=n.n(O),v=n(72740),b=n(67555),x=n.n(b);n(99566);var f=n(19709),C=n(61818);let N=["","","",""];t.Z=e=>{var t,n,_;let{title:O="We will send an OTP via SMS on the mobile number you enter...",onLoginSuccess:b,onOTPSent:k,onChangeNumberClickParentComponent:S,updateTabHeight:I,pageSourceTypeProp:A,classnames:E}=e,j=(0,C.Dj)(u.S5.UnitedStates),w=(0,i.useContext)(d.r),y=u.DK.findIndex(e=>e.countryCode.toString()===w.countryCode),T={code:u.DK[-1===y?0:y],isOtpSent:!1,otp:N},{executeRecaptcha:D}=(0,a.xX)(),[B,R]=(0,i.useState)(T),[U,F]=(0,i.useState)(!1),P=(0,i.useRef)(30),[H,Q]=(0,i.useState)(30),K=(0,i.useRef)(null),[M,V]=(0,i.useState)(""),startTimer=()=>{K.current&&(clearInterval(K.current),K.current=null),K.current=setInterval(()=>{P.current>0?(P.current=P.current-1,Q(P.current)):K.current&&(clearInterval(K.current),K.current=null)},1e3)};(0,i.useEffect)(()=>I(),[M,B.isOtpSent]),(0,i.useEffect)(()=>()=>{K.current&&clearInterval(K.current)},[]),(0,i.useEffect)(()=>{B.isOtpSent&&startTimer()},[B.isOtpSent]),(0,i.useEffect)(()=>{4!==B.otp.length||B.otp.includes("")||G()},[B.otp]);let q=(0,i.useCallback)(()=>{K.current&&clearInterval(K.current),K.current=null,P.current=30,Q(30),V(""),R(T),S&&S()},[]),W=(0,i.useCallback)(async()=>{var e,t,n;if(((null===(e=B.mobile)||void 0===e?void 0:e.length)||0)!==((null===(t=B.code)||void 0===t?void 0:t.phoneLength)||12)){(0,l.Am)("Kindly enter ".concat((null===(n=B.code)||void 0===n?void 0:n.phoneLength)||12," digit mobile number."));return}if(!D){(0,p.J_h)(),(0,l.Am)("Recaptcha not available, please try again!");return}F(!0);let o=await D("sendOtp");if(!o){(0,p.J_h)(),(0,l.Am)("Recaptcha not available, please try again!");return}(0,h.qC)(c.T5+"/users/otp",{mobile:B.mobile,code:B.code.code,captchaToken:o,enterprise:!0}).then(e=>{F(!1),(null==e?void 0:e.error)?l.Am.error(e.error):(R({...B,otp:N}),R({...B,isOtpSent:!0}),k&&k())}).catch(e=>{F(!1),l.Am.error(e.message||"Internal Server Error")})},[B]),backspaceHandler=e=>{let t=e.target;if("Backspace"===e.code||"Delete"===e.code){e.preventDefault();let n=parseInt(t.name.replace("otp-",""));if(!t.value&&n>0){let e=document.querySelector("input[name=otp-".concat(n-1,"]"));null!==e&&e.focus(),n-=1}let o=B.otp.slice();o[n]="",R({...B,otp:o})}},onOtpChange=(e,t)=>
1{let n=e.target.value;n.length>1&&(n=n[n.length-1]);let o=B.otp.slice();if(o[t]=n,R({...B,otp:o}),n.length>0){let e=document.querySelector("input[name=otp-".concat(t+1,"]"));null!==e&&e.focus()}if(0===n.length){let e=document.querySelector("input[name=otp-".concat(t-1,"]"));null!==e&&e.focus()}},G=(0,i.useCallback)(()=>{if(B.otp.length<4||B.otp.includes("")){(0,l.Am)("Kindly enter 4 digit OTP.");return}(0,p.loT)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow),F(!0),(0,h.qC)(c.T5+"/users/login",{mobile:B.mobile,code:B.code.code,otp:B.otp.join("")}).then(e=>{e.error&&(null==e?void 0:e.message)?(V(e.message),(0,p.cAu)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow),F(!1)):(b(e),(0,p.UiW)(),setTimeout(()=>{F(!1)},3e4))}).catch(e=>{var t,n;F(!1),(0,p.cAu)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow),(null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message)&&V(e.response.data.message)})},[B]);return(0,o.jsx)("div",{className:L()(m()["otp-login-container"],A===g.r5.SOLUTION_PLACEHOLDER&&m()["otp-login-container-solution-placeholder"],A===g.r5.GOVT_EXAM&&m()["otp-login-container-govt-exam"]),children:B.isOtpSent?(0,o.jsxs)(o.Fragment,{children:[A===g.r5.SOLUTION_PLACEHOLDER&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Z,{onClick:q,classname:m()["back-btn"]}),(0,o.jsx)("div",{className:m()["main-title"],children:"Enter verification code"})]}),(0,o.jsxs)("span",{className:m()["title-otp"],children:["We have sent a verification code to"," "]}),(0,o.jsx)("span",{className:m()["title-phone"],children:(null===(_=(0,f.S)("+".concat(B.code.code).concat(B.mobile)))||void 0===_?void 0:_.formatInternational())+" "}),(0,o.jsx)("span",{className:m()["change-number"],onClick:q,children:"Change number"}),(0,o.jsx)("div",{className:L()(m()["resend-sms-holder"],A===g.r5.SOLUTION_PLACEHOLDER&&m()["resend-sms-holder-Solution-Placeholder"]),children:H?(0,o.jsxs)(o.Fragment,{children:[" ",(0,o.jsx)("span",{className:m()["title-otp"],children:"Didn't receive? Resend SMS in "}),(0,o.jsx)("span",{className:m()["timer-value"],children:H})," "]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:m()["title-otp"],children:"Didn't receive? "}),(0,o.jsx)("span",{onClick:()=>{W(),(0,p.DAw)(),P.current=30,startTimer()},className:m()["resend-sms-cta"],children:"Resend SMS"})]})}),(0,o.jsx)("div",{className:m()["otp-input-holder"],children:B.otp.map((e,t)=>(0,o.jsx)(s.default,{onChange:e=>onOtpChange(e,t),name:"otp-".concat(t),className:M?m()["otp-input-error"]:""===B.otp[t]?m()["otp-input"]:m()["otp-input-active"],inputClassname:m()["otp-input-text"],type:"number",onKeyDown:backspaceHandler,value:B.otp[t],autoFocus:0===t},"otp-".concat(t)))}),M&&(0,o.jsx)("p",{className:m()["otp-error-msg"],children:M}),(0,o.jsx)(r.default,{className:L()(m()["login-cta"],A===g.r5.SOLUTION_PLACEHOLDER&&m()["login-cta-solution-placeholder"]),disabled:""===B.otp[0]||""===B.otp[1]||""===B.otp[2]||""===B.otp[3],onClick:G,loading:U,children:A===g.r5.SOLUTION_PLACEHOLDER?"Submit":"Login"})]}):(0,o.jsxs)("div",{children:[A!==g.r5.SOLUTION_PLACEHOLDER&&A!==g.r5.GOVT_EXAM&&A!==g.r5.ONLINE_TUTOR&&!!O&&(0,o.jsx)("div",{className:m().title,children:O}),(0,o.jsxs)("div",{className:L()(m()["mobile-input-holder"],A===g.r5.SOLUTION_PLACEHOLDER&&m()["mobile-input-holder-solution-placeholder"],null==E?void 0:E.inputHolder),children:[(0,o.jsx)("div",{className:L()(m()["phone-number-hint"],B.mobile?m().hidden:""),children:"Enter phone number"}),(0,o.jsx)(x(),{country:j.toString().toLowerCase(),onlyCountries:u.DK.map(e=>e.countryCode.toString().toLowerCase()),preferredCountries:["us","ca","in","ae","sa","qa"],value:null,placeholder:"Enter phone number",countryCodeEditable:!1,enableSearch:!1,inputProps:{name:"phone",required:!0,autoFocus:!1,id:"phone-input"},inputClass:L()(null==E?void 0:E.phoneInput,m()["mobile-input"]),buttonClass:m()["country-code-select"],dropdownClass:L()(null==E?void 0:E.countryCodeDropdown,m()["country-code-dropdown"]),onChange:(e,t)=>
1{(0,p.xo2)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow);let n=e.slice(t.dialCode.length),o=u.DK.findIndex(e=>e.countryCode.toString()===t.countryCode.toUpperCase());R({...B,code:{code:t.dialCode.toString(),phoneLength:u.DK[-1===o?0:o].phoneLength},mobile:n})},onClick:(e,t)=>{},onEnterKeyPress:e=>{var t,n,o;(null===(t=B.mobile)||void 0===t?void 0:t.length)===((null===(n=B.code)||void 0===n?void 0:n.phoneLength)||12)?(W(),(0,p.QIb)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow)):(0,l.Am)("Kindly enter ".concat((null===(o=B.code)||void 0===o?void 0:o.phoneLength)||12," digit mobile number."))}})]}),(0,o.jsx)(r.default,{className:L()(m()["login-cta"],A===g.r5.SOLUTION_PLACEHOLDER&&m()["login-cta-solution-placeholder"],A===g.r5.GOVT_EXAM&&m()["login-cta-govt-exam"],A===g.r5.ONLINE_TUTOR&&m()["login-cta-online-tutor"]),onClick:()=>{W(),(0,p.QIb)(A===g.r5.SOLUTION_PLACEHOLDER?p.fB5.QAInstantFlow:p.fB5.AskQuestionFlow)},disabled:(null===(t=B.mobile)||void 0===t?void 0:t.length)!==((null===(n=B.code)||void 0===n?void 0:n.phoneLength)||12),loading:U,children:"Send OTP"})]})})}},11400:function(e,t,n){"use strict";n.d(t,{W:function(){return SearchIcon}});var o=n(85893),i=n(9970);let SearchIcon=e=>{let{className:t}=e;return(0,i.I)((0,o.jsx)("path",{d:"M15.794 14.846 11.83 10.88a6.64 6.64 0 0 0 1.503-4.212A6.676 6.676 0 0 0 6.665 0C2.986 0 0 2.993 0 6.668a6.673 6.673 0 0 0 6.668 6.666 6.647 6.647 0 0 0 4.212-1.503l3.963 3.963a.661.661 0 0 0 .954 0 .65.65 0 0 0-.003-.948zM1.33 6.668a5.34 5.34 0 0 1 5.335-5.335 5.345 5.345 0 0 1 5.339 5.339 5.345 5.345 0 0 1-5.339 5.338A5.345 5.345 0 0 1 1.33 6.668z",fill:"#000",fillRule:"nonzero"}),{width:16,height:16,style:t})}},49472:function(e,t,n){"use strict";n.r(t),n.d(t,{InputVariant:function(){return i}});var o,i,a=n(85893),l=n(5152),r=n.n(l),s=n(94184),c=n.n(s),u=n(17411),d=n.n(u),p=n(11400);let h=r()(()=>n.e(20909).then(n.bind(n,20909)),{loadableGenerated:{webpack:()=>[20909]}});(o=i||(i={})).Search="search",o.Standard="standard",t.default=e=>{let{variant:t="standard",placeholder:n,onChange:o,onClick:i,value:l,label:r,className:s,multiline:u,rows:_,inputClassname:m,type:g,leftIcon:O,transparent:L,error:v,success:b,maxLength:x,disabled:f,min:C,max:N,name:k,onKeyDown:S,autoFocus:I,readonly:A}=e;return"search"===t?(0,a.jsxs)("div",{className:d()["input-holder"],children:[(0,a.jsx)(p.W,{className:d()["input-icon"]}),(0,a.jsx)("input",{placeholder:n,onChange:o,onClick:i,value:l,className:c()(s,d()["input-search"]),maxLength:x,disabled:f,name:k,autoFocus:I,readOnly:A})]}):(0,a.jsxs)("div",{className:s,children:[!!r&&(0,a.jsx)("p",{className:d()["input-label"],children:r}),(0,a.jsxs)("div",{className:d()["input-holder"],children:[!!O&&(0,a.jsx)(h,{alt:"input-icon",src:O,width:16,height:16,loading:"lazy",className:d()["input-icon"]}),u?(0,a.jsx)("textarea",{placeholder:n,onChange:o,rows:_||2,value:l,maxLength:x,disabled:f,className:c()(d()["input-standard"],d()["input-standard-textarea"],O?d()["input-icon-standard"]:"",L?d()["input-standard-transparent"]:"",v?d()["input-error"]:"",b?d()["input-success"]:"",f?d()["input-disabled"]:"",m||""),onKeyDown:S,name:k,autoFocus:I,readOnly:A}):(0,a.jsx)("input",{type:g,placeholder:n,onChange:o,onClick:i,value:l,maxLength:x,disabled:f,min:C,max:N,className:c()(d()["input-standard"],O?d()["input-icon-standard"]:"",L?d()["input-standard-transparent"]:"",v?d()["input-error"]:"",b?d()["input-success"]:"",f?d()["input-disabled"]:"",m||""),onKeyDown:S,name:k,autoFocus:I,readOnly:A})]})]})}},37973:function(e){e.exports={"back-btn-holder":"BackButton_back-btn-holder__yz5Ve","back-arrow":"BackButton_back-arrow__pMAND","back-text":"BackButton_back-text__fPZJN"}},29636:function(e){e.exports={"otp-login-container":"OtpLogin_otp-login-container__dbMe4","otp-login-container-solution-placeholder":"OtpLogin_otp-login-container-solution-placeholder__hKAX2","otp-login-container-govt-exam":"OtpLogin_otp-login-container-govt-exam__VlGmp",title:"OtpLogin_title__8iuXW","title-phone":"OtpLogin_title-phone__FsQvZ","change-number":"OtpLogin_change-number__sa9JE","title-otp":"OtpLogin_title-otp__DLZX1","timer-value":"OtpLogin_timer-value__Knbq7","resend-sms-cta":"OtpLogin_resend-sms-cta__OhfO9","country-code-dropdown":"OtpLogin_country-code-dropdown__kvvVJ","main-title":"OtpLogin_main-title__ABjLl","resend-sms-holder":"OtpLogin_resend-sms-holder__ZOozw","resend-sms-holder-Solution-Placeholder":"OtpLogin_resend-sms-holder-Solution-Placeholder__Nm2GM","mobile-input-holder":"OtpLogin_mobile-input-holder__TAj3Q","phone-number-hint":"OtpLogin_phone-number-hint__UJvqB",hidden:"OtpLogin_hidden__t2hs_","country-code-select":"OtpLogin_country-code-select__A9hbj","mobile-input"
1:"OtpLogin_mobile-input__9LJvM","mobile-input-solution-placeholder":"OtpLogin_mobile-input-solution-placeholder__nwknV","mobile-input-holder-solution-placeholder":"OtpLogin_mobile-input-holder-solution-placeholder___2W91","login-cta":"OtpLogin_login-cta__YiFdh","login-cta-solution-placeholder":"OtpLogin_login-cta-solution-placeholder__rLzUE","login-cta-govt-exam":"OtpLogin_login-cta-govt-exam__H_Iu1","login-cta-online-tutor":"OtpLogin_login-cta-online-tutor__wK8kp","captcha-holder":"OtpLogin_captcha-holder__04hcr","otp-input-holder":"OtpLogin_otp-input-holder__r6i8U","otp-error-msg":"OtpLogin_otp-error-msg___S9JW","otp-input":"OtpLogin_otp-input__h96v5","otp-input-active":"OtpLogin_otp-input-active__WU_Mv","otp-input-error":"OtpLogin_otp-input-error__qCGH2","otp-input-text":"OtpLogin_otp-input-text__Jsp_V"}},17411:function(e){e.exports={"input-holder":"Input_input-holder__Zos0k","input-label":"Input_input-label__z199Y","input-icon":"Input_input-icon__4GCY6","input-search":"Input_input-search__k7VOG","input-standard":"Input_input-standard__TL330","input-disabled":"Input_input-disabled__LTUZk","input-standard-textarea":"Input_input-standard-textarea__u43Nu","input-icon-standard":"Input_input-icon-standard__bHAaK","input-standard-transparent":"Input_input-standard-transparent__B5ll1","input-error":"Input_input-error__44MQV","input-success":"Input_input-success__aBbRd"}}}]);
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.