1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4949],{37584:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/verify",function(){return i(42408)}])},42408:function(e,t,i){"use strict";i.r(t);var s=i(7297),n=i(85893),r=i(67294),a=i(11163),o=i.n(a),l=i(28687),_=i.n(l),g=i(44608),u=i(84316),p=i(34339),c=i(75920),d=i(9008),m=i.n(d),h=i(42020),f=i(4153),v=i(6003),y=i(13438),b=i.n(y),I=i(60202),S=i(78636);function w(){let e=(0,s.Z)(["\n query genericPageSeoTags($path: String!, $countryCode: String!){\n genericPage(where: {\n path: $path\n }){\n path\n name\n regionSeoTags(where: {\n regions_some: {\n countries_some: {\n code: $countryCode\n }\n }\n }){\n name\n description\n keywords\n og__type\n og__site_name\n og__title\n og__description\n og__url\n og__image\n subject\n author\n robots\n googlebot__news\n apple__itunes__app\n google__play__app\n thumbnail\n og__video\n og__video__secure_url\n og__video__width\n og__video__height\n og__video__tag\n twitter__card\n twitter__site\n twitter__creator\n twitter__title\n twitter__description\n twitter__image\n twitter__url\n twitter__player\n twitter__player__width\n twitter__player__height\n fb__app_id\n fbPages\n \n }\n }\n } "]);return w=function(){return e},e}class T extends r.Component{static async getInitialProps(e){let t={},i=new g.default;await i.getInitialSession(e,!0);let s="",n=new p.Z;s=await n.getCountryCode(e);let a=e.asPath;s||(s="");let o={code:"IN",name:"India",isdCode:91,iconUrl:"https://yuppstatic.akamaized.net/yupptv/yuppflix/countries/india.png"};I.Jm.map(e=>{e.code===s&&(o=e)});let u=(0,l.gql)(w()),c={path:a,countryCode:s},d=[],m=await _()("https://api-eu-central-1.graphcms.com/v2/ckh0dne57rh8901xj2s6p730m/master",u,c).catch(e=>{});return m&&(d=m),r.Component.getInitialProps&&(t=await r.Component.getInitialProps(e)),{seoContent:d,pageProps:t,error:"",pageContent:"",selectedCountryObj:o,userGeo:s}}componentDidMount(){let e=new u.default,t=e.getData("is-logged-in"),i=(0,S.getCountrySlug)(this.props.userGeo);t||o().push(i+"/"),t&&f.L("account/verify - YuppMaster");let s=e.getData("otp-configs");s&&this.setState({otpCnfgObj:s});let n=e.getData("user-basic-info"),r=e.getSessionData("verify-src");if("mobile"===r&&s&&s.mobileVerficationMandatoryAfterSignin&&"Y"===s.mobileVerficationMandatoryAfterSignin&&!n.isPhoneNumberVerified&&n.phoneNumber){let e=this.state.signInForm;e.email.value=n.phoneNumber,e.email.errorMessage="",this.setState(()=>({signInForm:e,passwordCompletionError:"",userIdType:"mobile",user:{email_number:n.phoneNumber.split("-")[1]}})),setTimeout(()=>{this.setState({displayOtp:!0})},0)}else if("email"===r&&s&&s.emailVerficationMandatoryAfterSignin&&"Y"===s.emailVerficationMandatoryAfterSignin&&!n.isEmailVerified&&n.email){let e=this.state.signInForm;e.email.value=n.email,e.email.errorMessage="",this.setState(()=>({signInForm:e,passwordCompletionError:"",userIdType:"email",user:{email_number:n.email}})),setTimeout(()=>{this.setState({displayOtp:!0})},0)}new g.default}handleChange(e,t){let i=this.state.signInForm;i[e].value=t.target.value,i[e].errorMessage="",this.setState({signInForm:i,passwordCompletionError:""})}async handleOnSubmit(e,t){t.preventDefault();let i=this.state.signInForm,s=!0,n=this.checkFormValidations(JSON.parse(JSON.stringify(i)),e);s=n.isValid,i=n.form,s?this.verifyOTP():this.setState({signInForm:i})}async getuserInfo(e){let t=new g.default,i=await t.getData("API_SERVER_URL","service/api/education/auth/v1/user/info",{}).catch(e=>{});if(i&&i.status&&i.response){let e=new u.default,s=new h.default,n=i.response;e.setLocalData("user-details",n),e.setData("is-logged-in",!0);let r=e.getData("user-basic-info");r?(r.name=i.response.firstName?i.response.firstName:i.response.name,r.phoneNumber=i.response.phoneNumber,r.email=i.response.email,r.isEmailVerified=i.response.isEmailVerified,r.isPhoneNumberVerified=i.response.isPhoneNumberVerified,r.userId=i.response.userId,r.lmsId=i.response.attributes.lms_user_id,r.lmsUserId=i.response.attributes.lms_user_name):r={name:i.response.firstName?i.response.firstName:i.response.name,phoneNumber:i.response.phoneNumber,email:i.response.email,isEmailVerified:i.response.isEmailVerified,isPhoneNumberVerified:i.response.isPhoneNumberVerified,userId:i.response.userId,lmsId:i.response.attributes.lms_user_id,lmsUserId:i.response.attributes.lms_user_name},e.setData("user-basic-info",r),s.setUserProfile();let a=e.getSessionData("selected-package");e.getSessionData("bannerTargetPath");let l=e.getSessionData("redirectionPath"),_=e.getData("redirectionPath"),g=!1;if(i&&i.response&&i.response.attributes&&i.response.attributes.targeted_exam&&i.response.attributes.grade){let e=await t.getData("API_SERVER_URL","service/api/education/common/v1/default/course/list?master_stream_code="+i.response.attributes.targeted_exam+"&grade_co
1de="+i.response.attributes.grade,{}).catch(e=>{});e&&e.status&&e.response&&e.response.courses&&e.response.courses.length>0&&(g=!0)}a?o().push("/order_summary"):g&&i.response.attributes.grade&&i.response.attributes.targeted_exam?o().push("/defaultCourse"):l?o().push(l):_?o().push(_):o().push("/user/dashboard")}else this.setState({key:i.error.message})}checkFormValidations(e,t){let i=!0,s=e;if("otp"===t){let e=s.otp.value.join("");0===e.length?(s[t].errorMessage="Enter a valid OTP",i=!1):e.length<4&&(s[t].errorMessage="Incorrect OTP",i=!1)}return{form:JSON.parse(JSON.stringify(s)),isValid:i}}sendOTP(e){let t,i=this,s=this.state.signInForm.email.value;this.setState(()=>({user:{email_number:s}})),t="mobile"===this.state.userIdType?{mobileNumber:this.state.signInForm.email.value.replace("-","")+"",requestContext:"verify_mobile"}:{email:this.state.signInForm.email.value,requestContext:"verify_email"};let n=new g.default,r=new c.default,a={metadata:r.encryptData(JSON.stringify({request:"send/otp"})),data:r.encryptData(JSON.stringify(t))};n.postEncryptData("API_SERVER_URL","service/auth/send",a,{}).then(function(e){if(null==e?void 0:e.status)i.setState(()=>({referenceID:e.response.referenceId})),new h.default,i.startTimer();else{var t;i.setState({passwordCompletionError:(null==e?void 0:null===(t=e.error)||void 0===t?void 0:t.message)||""})}},function(e){console.error("response"+e)})}resendOTP(){let e=this,t={referenceId:String(this.state.referenceID)},i=this.state.signInForm;i.otp.value=["","","",""],i.otp.errorMessage="",this.setState({signInForm:i,error:""});let s=new g.default,n=new c.default,r={data:n.encryptData(JSON.stringify(t)),metadata:n.encryptData(JSON.stringify({request:"resend/otp"}))};s.postEncryptData("API_SERVER_URL","service/auth/send",r,{}).then(function(t){if(null==t?void 0:t.status)e.setState({referenceID:t.response.referenceId}),e.startTimer();else{var i;e.setState({error:(null==t?void 0:null===(i=t.error)||void 0===i?void 0:i.message)||""})}},function(e){console.error("response"+e)})}verifyOTP(){let e=this,t=this.state.signInForm.otp.value.join("");if(0==t.length)loaclForm[key].errorMessage="Enter a valid "+loaclForm[key].label,isvalid=!1;else if(t.length<4)loaclForm[key].errorMessage="Incorrect "+loaclForm[key].label,isvalid=!1;else{parseInt(this.state.signInForm.otp.value.join(""));let t="mobile"===this.state.userIdType?"service/api/education/auth/v1/verify/mobile":"service/api/education/auth/v1/verify/email",i={otp:parseInt(this.state.signInForm.otp.value.join(""))};"mobile"===this.state.userIdType?i.mobile=this.state.signInForm.email.value:i.email=this.state.signInForm.email.value,new g.default().postClientSideData("API_SERVER_URL",t,i,{}).then(function(t){if(t.status)new u.default().setSessionData("verifySrc",""),new h.default,e.getuserInfo("error");else{let i="";t.error&&t.error.message&&(i=t.error.message),e.setState({error:i}),new h.default}},function(e){})}}handleOTPKeydown(e,t){if(t.preventDefault(),"keydown"===event.type&&"Backspace"===event.key)!this.state.signInForm.otp.value[e]&&e>0?(this.handleOTPChange(e-1,{target:{value:""}}),this.arrayOfOTPRefs[e-1].focus()):this.handleOTPChange(e,{target:{value:""}});else{let t={target:{value:event.key}};this.handleOTPChange(e,t)}}startTimer(){this.setState(()=>({time:30})),this.timer=setInterval(()=>{let e=this.state.time;this.setState({time:e-1}),1==e&&clearInterval(this.timer)},1e3)}render(){let e="";return this.props.seoContent&&this.props.seoContent.genericPage&&(e=this.props.seoContent.genericPage.regionSeoTags&&!!this.props.seoContent.genericPage.regionSeoTags.length>0?this.props.seoContent.genericPage.regionSeoTags[0]:""),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m(),{children:[!!e&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:e.og__title}),(0,n.jsx)("meta",{name:"description",content:e.description}),(0,n.jsx)("link",{rel:"canonical",href:e.og__url})]}),!!e&&0!==Object.keys(e).length&&Object.keys(e).map((t,i)=>(e[t],(0,n.jsx)(n.Fragment,{children:e[t]?t.includes("og__")||t.includes("twitter__")?(0,n.jsx)("meta",{property:t.split("__").join(":")+"",content:e[t]+""}):(0,n.jsx)("meta",{name:t.split("__").join("-")+"",content:e[t]+""}):""})))]}),(0,n.jsxs)("div",{className:b().container,children:[(0,n.jsxs)("div",{className:b().leftBlock,children:[(0,n.jsx)("img",{src:"https://d2ivesio5kogrp.cloudfront.net/static/yuppedu/images/signinBg.svg",className:b().signinBg,alt:"signinBg"}),(0,n.jsxs)("div",{className:b().pageTitle,children:[(0,n.jsx)("img",{className:b().whiteLogo,src:"https://d2ivesio5kogrp.cloudfront.net/static/yuppedu/images/Header_white.svg",slt:"logo"}),(0,n.jsxs)("h3",{children:["Platform for Better Learning",(0,n.jsx)("br",{}),"& Better Results"]})]})]}),(0,n.jsx)("div",{className:b().rightBlock,children:1===this.state.activeStep&&this.state.displayOtp&&(0,n.jsx)(v.Z,{cleverTapSource:"Account verify",prevstate:this.state,backToStep:this.backToStep1,context:"mobile"===this.state.userIdType?"verify_mobile":"verify_email",ctC
1ontext:"verify",handleOTPVerifiedCallback:this.handleOTPVerifiedCallback})})]})]})}constructor(e){super(e),this.handleOTPChange=(e,t)=>{let i=t.target.value;var s=RegExp("^\\d{1}$");if(i&&!1===s.test(i));else{let t=this.state.signInForm;t.otp.value[e]=i,t.otp.errorMessage="",this.setState({signInForm:t,error:""}),i&&e<3&&this.arrayOfOTPRefs[e+1].focus()}},this.setOTPRef=e=>{null!==e&&-1===this.arrayOfOTPRefsIds.indexOf(e.id)&&(this.arrayOfOTPRefs.push(e),this.arrayOfOTPRefsIds.push(e.id))},this.handleOTPVerifiedCallback=e=>{let t=new u.default;t.setLocalData("showSuccessToast",!0),t.setLocalData("userIdType",this.state.userIdType),t.setSessionData("verifySrc",""),new h.default,this.getuserInfo("error")},this.state={signInForm:JSON.parse(JSON.stringify(O)),error:"",signInSuccess:!1,isLoading:!1,activeStep:1,user:{email_number:""},otp:["","","",""],error:"",otpVerified:"",selectedCountryObj:this.props.selectedCountryObj,time:30,cleverTapSource:"Account verify"},this.arrayOfOTPRefs=[],this.arrayOfOTPRefsIds=[],this.arrayOfOptionsRefs=[],this.arrayOfOptionsRefIds=[]}}t.default=T;let O={email:{label:"Email / Mobile Number",value:"",helperText:"",errorMessage:"",isRequired:!0,emailPattern:"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$",phonePattern:"^\\d{6,18}$"},otp:{label:"OTP",value:["","","",""],helperText:"",errorMessage:"",isRequired:!0,pattern:""}}},4153:function(e,t,i){"use strict";i.d(t,{B:function(){return r},L:function(){return n}});var s=i(60202);let n=(e,t)=>{var i;null==window||null===(i=window.dataLayer)||void 0===i||i.push("config",s.eG.gTag,{page_path:e,page_title:t})},r=e=>{var t;let{action:i,category:s,label:n,value:r}=e;null==window||null===(t=window.dataLayer)||void 0===t||t.push("event",i,{event_category:s,event_label:n,value:r})}},13438:function(e){e.exports={container:"signin_container__3cJeO",leftBlock:"signin_leftBlock__Q2Fh8",signinBg:"signin_signinBg__Eu5LL",pageTitle:"signin_pageTitle__RWJmG",whiteLogo:"signin_whiteLogo__uZl7h",rightBlock:"signin_rightBlock___A_QN",pageFooter:"signin_pageFooter__KNdSd",message:"signin_message__wAiOM",form:"signin_form__vmUqb",successInner:"signin_successInner__tIQut",parentIdentifierSelector:"signin_parentIdentifierSelector__sRRg9",errorMsg:"signin_errorMsg__LaJBK",fieldError:"signin_fieldError__ACtbk",otpErrorMsg:"signin_otpErrorMsg__lVab_",orText:"signin_orText__IRmUO",tmpbutton:"signin_tmpbutton__wNLTD",message2:"signin_message2__If0O_",fieldTitle:"signin_fieldTitle__oGoNO",error:"signin_error__8cVRv",inputField:"signin_inputField__x6ZTd",forgotPswdField:"signin_forgotPswdField__RxReb",countryLabel:"signin_countryLabel__Bhnoc",countryInput:"signin_countryInput__3TBm1",countryCode:"signin_countryCode__8VRRO",flagIcon:"signin_flagIcon__cratn",countrySelection:"signin_countrySelection__UoQFC",searchbox:"signin_searchbox__0Xsmf",listItem:"signin_listItem__mVIuT",submitBtn:"signin_submitBtn__RULir",userImg:"signin_userImg__KFRVz",otpToText:"signin_otpToText__MbZ18",edit:"signin_edit__HOOU1",cls1:"signin_cls1__ziWYV",forgotPswdLink:"signin_forgotPswdLink__o3GoZ",otp:"signin_otp__VaORF",showResend:"signin_showResend__wirAW",hideResend:"signin_hideResend__7EdRf",resendbtn:"signin_resendbtn__pmyc5",timer:"signin_timer___zUd5",resendOTP:"signin_resendOTP__A7Fyh",errorMsgSpacing:"signin_errorMsgSpacing__Bfx77",otpBox:"signin_otpBox__nOA_x",otpBoxSuccess:"signin_otpBoxSuccess__VfB6E",footer:"signin_footer__pr5Kd",suggestion:"signin_suggestion__y_70X",signupForm:"signin_signupForm__64v_8",agreementConfirmation:"signin_agreementConfirmation__3G9WB",profilePopup:"signin_profilePopup__uoJlH",contnetBox:"signin_contnetBox__T_Hna",errorMsgMobile:"signin_errorMsgMobile__DkoTX",radio:"signin_radio__Glv79",coursePageForm:"signin_coursePageForm__stJT0",toastMsg:"signin_toastMsg__MBAU4",submitBtnMargins:"signin_submitBtnMargins__c70le",emailAndMobileNum:"signin_emailAndMobileNum__zTOzf",teacherSigninWrap:"signin_teacherSigninWrap__nD2lC",teacherDivider:"signin_teacherDivider__cKIyQ",teacherSignin:"signin_teacherSignin__9mhkV",googleLoginBtn:"signin_googleLoginBtn__d_4nY",socialLoginContainer:"signin_socialLoginContainer__1aF1J",googleLoginContainer:"signin_googleLoginContainer__xesto",googleBtn:"signin_googleBtn__h1FNC",googleIcon:"signin_googleIcon__1oFGX"}}},function(e){e.O(0,[6271,399,6003,9774,2888,179],function(){return e(e.s=37584)}),_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.