PageSourceSearch

https://assets-blog.upgrad.com/1599/_next/static/chunks/2872.34ce33ebf8b0cd0e.js

js upgrad.com collected 2026-09-24 08:54:26 UTC 16,033 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2872,2099],{3575:function(e,t,i){i.r(t);var r=i(85893),o=i(5379),n=i.n(o),a=i(5152),s=i.n(a),l=i(91620),d=i(78274);let c=s()(()=>i.e(3652).then(i.bind(i,42945)),{loadableGenerated:{webpack:()=>[42945]}}),m=s()(()=>i.e(1435).then(i.bind(i,1435)),{loadableGenerated:{webpack:()=>[1435]}});t.default=e=>{let{hidePopup:t,className:i,data:o,alertmsgClose:a,hideButton:s,iconType:b,zIndex:p,btnText:x="OK",closeIconCallback:h=()=>{},showCloseIcon:u=!1}=e,{title:f,msg:g}=o,handleClick=()=>{a(),(0,d.L9)(l.aq,{Button_text:x||"OK",category:"journey",label:x||"OK"})};return(0,r.jsxs)(r.Fragment,{children:[t?(0,r.jsxs)("div",{className:"jsx-eb89915c09b1e4d0 alertWrapper",children:[b&&(0,r.jsx)("div",{className:"jsx-eb89915c09b1e4d0 "+"icon ".concat(b),children:(0,r.jsx)(m,{path:"icons/righttick.png",height:22,width:28,alt:"",title:""})}),(0,r.jsx)("h2",{className:"jsx-eb89915c09b1e4d0",children:(0,r.jsx)("strong",{className:"jsx-eb89915c09b1e4d0",children:f})}),(0,r.jsx)("p",{className:"jsx-eb89915c09b1e4d0",children:g}),!s&&(0,r.jsx)("button",{onClick:handleClick,className:"jsx-eb89915c09b1e4d0 btn-ok",children:x||"OK"})]}):(0,r.jsx)(c,{zIndex:p||10,closeBtnHide:!0,className:i||"otplayer",children:(0,r.jsxs)("div",{className:"jsx-eb89915c09b1e4d0 alertWrapper",children:[u?(0,r.jsx)("span",{onClick:h,className:"jsx-eb89915c09b1e4d0 icoTimes"}):"",b&&(0,r.jsx)("div",{className:"jsx-eb89915c09b1e4d0 "+"icon ".concat(b),children:(0,r.jsx)(m,{path:"icons/righttick.png",height:22,width:28,alt:"",title:""})}),(0,r.jsx)("h2",{className:"jsx-eb89915c09b1e4d0 "+((u?"mt-2":"")||""),children:(0,r.jsx)("strong",{className:"jsx-eb89915c09b1e4d0",children:f})}),(0,r.jsx)("p",{className:"jsx-eb89915c09b1e4d0",children:g}),!s&&(0,r.jsx)("button",{onClick:handleClick,className:"jsx-eb89915c09b1e4d0 btn-ok",children:x||"OK"})]})}),(0,r.jsx)(n(),{id:"eb89915c09b1e4d0",children:".alertWrapper.jsx-eb89915c09b1e4d0{text-align:center;padding:15px 5px}.alertWrapper.jsx-eb89915c09b1e4d0 h2.jsx-eb89915c09b1e4d0{font-size:22px;font-weight:400;color:#000}.alertWrapper.jsx-eb89915c09b1e4d0 p.jsx-eb89915c09b1e4d0{font-size:14px!important;line-height:1.2;color:#000;margin:0 0 20px 0;font-weight:400}.btn-ok.jsx-eb89915c09b1e4d0{width:106px;height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:14px;font-weight:400;background:#d13b45;border:0;color:#fff}.icon.jsx-eb89915c09b1e4d0{width:52px;height:52px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;margin:0 auto 20px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.success.jsx-eb89915c09b1e4d0{border:3px solid#3fda18;color:#3fda18}.fail.jsx-eb89915c09b1e4d0{border:3px solid#e32525;color:#e32525}"})]})}},22872:function(e,t,i){i.r(t);var r=i(85893),o=i(5379),n=i.n(o),a=i(67294),s=i(5152),l=i.n(s),d=i(78052),c=i(74231),m=i(82175),b=i(82669),p=i(67555),x=i.n(p),h=i(23921),u=i(11826),f=i(71064),g=i(3575),w=i(5203),k=i(9008),j=i.n(k),v=i(92668);let y=l()(()=>i.e(3594).then(i.bind(i,57208)),{loadableGenerated:{webpack:()=>[57208]}}),N=l()(()=>Promise.resolve().then(i.bind(i,1435)),{loadableGenerated:{webpack:()=>[1435]}}),z=c.Ry().shape({mobile:c.Z_().required("Required").matches(/^[0-9]*$/,"only numbers allowed").min(10,"Invalid mobile number").test("Number should not start with digits from 0-5","Invalid mobile number",e=>{let t=new String(e);return t.at(0)-"0">5}),countryCode:c.Z_().required("Required")}),C=c.Ry().shape({otp:c.Z_().max(4).min(4).required("Required").matches(/^[a-zA-Z0-9_.-]*$/,"Only alphanumerics are allowed")});t.default=e=>{let{userData:t,closePopup:i,handleIdentify:o}=e,[s,l]=(0,a.useState)(null),[c,p]=(0,a.useState)(0),[k,E]=(0,a.useState)("00:00"),[O,T]=(0,a.useState)(null),[P,M]=(0,a.useState)(null),[R,S]=(0,a.useState)({mobile:null==t?void 0:t.mobile,countryCode:"+91"}),[Z,W]=(0,a.useState)(null);(0,a.useEffect)(()=>{R.mobile&&clearTimer(getDeadTime())},[]);let sendOTP=e=>{M(!0),onClickReset(),u.Z.put("".concat(f.ZP.auth,"/user/").concat(null==t?void 0:t.userId,"/identity"),{...e},{params:{verificationType:"CHANGE_MOBILE"}}).then(t=>{var i;M(!1),l({token:null==t?void 0:null===(i=t.data)||void 0===i?void 0:i.token,mobile:null==e?void 0:e.mobile,countryCode:"+91"}),p(1)}).catch(e=>{var t,i;M(!1),T({status:!1,title:"",msg:((null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.errorCode)?w.R.errorCode[e.data.errorCode]:null==e?void 0:e.errorMessage)||(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.errorCode)})})},_=(0,a.useRef)(null),getTimeRemaining=e=>{let t=Date.parse(e)-Date.parse(new Date);return{total:t,hours:Math.floor(t/1e3/60/60%24),minutes:Math.floor(t/1e3/60%60),seconds:Math.floor(t/1e3%60)}},startTimer=e=>{let{total:t,hours:i,minutes:r,seconds:o}=getTimeRemaining(e);t>=0&&E((r>9?r:"0"+r)+":"+(o>9?o:"0"+o))},clearTimer=e=>
1{E("00:60"),_.current&&clearInterval(_.current);let t=setInterval(()=>{startTimer(e)},1e3);_.current=t},getDeadTime=()=>{let e=new Date;return e.setSeconds(e.getSeconds()+60),e},otpVerify=e=>{let r={token:null==s?void 0:s.token,otp:e};M(!0),u.Z.post("".concat(f.ZP.auth,"/otp/verify"),r).then(async e=>{M(!1),p(2),(0,h.VV)("userDetails");let r=await u.Z.get("".concat(f.ZP.user,"/user/").concat(null==t?void 0:t.userId,"/lite")),n=(0,v.q)(null==r?void 0:r.data);(0,h.Ps)(n,"","userLiteData"),o("mobile",null==r?void 0:r.data),setTimeout(()=>{window.location.reload(),i()},2e3)},e=>{var t,i;M(!1),T({status:!1,title:"",msg:((null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.errorCode)?w.R.errorCode[e.data.errorCode]:null==e?void 0:e.errorMessage)||(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.errorCode)})})};(0,a.useEffect)(()=>{onClickReset()},[s]);let onClickReset=()=>{clearTimer(getDeadTime())};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(j(),{children:[(0,r.jsx)("link",{href:"/page-builder-asset/style/phone-input-2.css",rel:"stylesheet",as:"style",onLoad:"this.onload=null;this.rel='stylesheet'"}),(0,r.jsx)("noscript",{children:(0,r.jsx)("link",{rel:"stylesheet",type:"text/css",charSet:"UTF-8",href:"/page-builder-asset/style/phone-input-2.css"})})]}),P&&(0,r.jsx)(y,{}),O&&(0,r.jsx)(g.default,{alertmsgClose:()=>{T(null)},data:O}),(0,r.jsx)("div",{onClick:()=>(0,a.startTransition)(()=>{i()}),className:"closeBtn",children:(0,r.jsx)("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M15.6667 16.3332L1 1.6665M15.6667 1.6665L1 16.3332",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round"})})}),0===c?(0,r.jsxs)(r.Fragment,{children:[(null==t?void 0:t.mobile)?(0,r.jsx)("h2",{children:"Edit Mobile number"}):(0,r.jsx)("h2",{children:"Add Mobile number"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"emailtext",children:"An OTP will be sent via SMS to this mobile number."}),(0,r.jsx)(m.J9,{enableReinitialize:!0,initialValues:R,validationSchema:z,onSubmit:e=>{sendOTP(e)},children:e=>{let{errors:i,touched:o,values:n,setFieldValue:a}=e;return(0,r.jsxs)(m.l0,{children:[(0,r.jsx)("article",{className:"rowwrap",children:(0,r.jsx)(b.Z,{children:(0,r.jsxs)("div",{className:"numberverfification",children:[(0,r.jsxs)("div",{className:"phone",children:[(0,r.jsx)(x(),{countryCodeEditable:!1,inputStyle:{width:"100%"},enableSearch:!0,country:"in",value:n.countryCode,disabled:!0,onChange:e=>{e&&e>0?a("countryCode","+".concat(e)):a("countryCode","")}}),Z||i.countryCode&&(0,r.jsx)("span",{className:"errorMsghome",children:i.countryCode||Z})]}),(0,r.jsxs)("div",{className:"number",children:[(0,r.jsx)("article",{className:"width ".concat(i.mobile&&o.mobile?"errorWrapper":""),children:(0,r.jsx)(m.gN,{className:"form-control",onBlur:e=>{var t;let i=null===(t=e.target.value)||void 0===t?void 0:t.trim();a("mobile",i)},onChange:e=>{let i=e.target.value;(null==t?void 0:t.mobile)==i?W("Please Enter different Mobile number"):W(null),a("mobile",i)},maxLength:10,type:"tel",value:n.mobile,id:"edit-mobile-number",name:"mobile",placeholder:"Enter Your Mobile"})}),i.mobile&&o.mobile&&(0,r.jsx)("span",{className:"errorMsghome",children:i.mobile})]})]})})}),(0,r.jsx)("button",{type:"submit",className:"submitContinueBtn",children:"Continue"})]})}})]})]}):1===c?(0,r.jsxs)("div",{children:[(null==t?void 0:t.mobile)?(0,r.jsx)("h2",{children:"Edit Mobile number"}):(0,r.jsx)("h2",{children:"Add Mobile number"}),(0,r.jsxs)("p",{className:"emailtext",children:["Enter the OTP you've received to ",null==s?void 0:s.mobile]}),(0,r.jsx)(m.J9,{initialValues:{otp:""},validationSchema:C,onSubmit:e=>{otpVerify(e.otp)},children:e=>{let{errors:t,touched:i,values:o,setFieldValue:n}=e;return(0,r.jsxs)(m.l0,{children:[(0,r.jsx)("article",{className:"rowwrap",children:(0,r.jsx)(b.Z,{children:(0,r.jsxs)("div",{className:"emailverfification",children:[(0,r.jsx)("article",{className:"width ".concat(t.otp&&i.otp?"errorWrapper":""),children:(0,r.jsx)(m.gN,{type:"text",id:"add-otp",onBlur:e=>{var t;let i=null===(t=e.target.value)||void 0===t?void 0:t.trim();n("otp",i)},onChange:e=>{let t=e.target.value;n("otp",t)},className:"form-control",name:"otp",value:o.otp,placeholder:"Enter Your OTP",maxLength:4})}),t.otp&&i.otp&&(0,r.jsx)("span",{className:"errorMsghome",children:t.otp})]})})}),(0,r.jsxs)("div",{className:"resendOtp",children:[(0,r.jsx)("button",{type:"submit",className:"submitContinueBtn ".concat(!o.otp&&"disabled"),children:"Verify OTP"}),(0,r.jsxs)("p",{children:[(0,r.jsx)("button",{disabled:"00:00"!==k,type:"button",style:{border:"none",background:"transparent"},onClick:()=>{(0,a.startTransition)(()=>
1{isEditPhone?sendOTP(R.countryCode,phone):handleVerify("phone")})},className:"resendOtpPera ".concat("00:00"!==k&&"disabledpera"),children:"Resend OTP"})," ","00:00"!==k&&(0,r.jsxs)("span",{className:"timerset",children:[(0,r.jsx)("span",{children:"in"})," ",k]})]})]})]})}})]}):2===c?(0,r.jsxs)("div",{className:"verifiedWrapper",children:[(0,r.jsx)(N,{path:"home/images/success.gif",height:200,width:300,alt:"success-logo",title:"success-logo"}),(0,r.jsx)("p",{children:"Mobile number Verified!"})]}):"",(0,r.jsx)(n(),{id:d.Z.__hash,children:d.Z})]})}},78052:function(e,t){let i=new String(".emailLimitText{white-space:nowrap;width:330px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:block}.errorWrapper{border:2px solid#e95454;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;width:100%}.errorWrapperOtp{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.errorWrapper .form-control{border:0}.errorMsghome{font-size:13px;position:absolute;bottom:-17px;right:0;font-weight:400;color:#ee2c3c}.errorWrapper .form-control:focus{border:0!important}.rowwrap{margin-top:44px}.emailverfification{position:relative}.numberverfification{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}.numberverfification .flag-dropdown{height:39px}.numberverfification .selected-flag{height:36px!important}.numberverfification .phone{-webkit-box-flex:.7;-webkit-flex:.7;-moz-box-flex:.7;-ms-flex:.7;flex:.7;padding-right:12px}.numberverfification .number{-webkit-box-flex:2;-webkit-flex:2;-moz-box-flex:2;-ms-flex:2;flex:2}.react-tel-input .form-control{height:39px}.EditEmailPhone{width:460px;height:100%;padding:27px 22px;position:fixed;right:0;top:0;background:#fff;z-index:13;-webkit-box-shadow:-6px 0px 30px -7px rgba(0,0,0,.25);-moz-box-shadow:-6px 0px 30px -7px rgba(0,0,0,.25);box-shadow:-6px 0px 30px -7px rgba(0,0,0,.25);-webkit-animation:growRight.6s ease-in-out forwards;-moz-animation:growRight.6s ease-in-out forwards;-o-animation:growRight.6s ease-in-out forwards;animation:growRight.6s ease-in-out forwards;-webkit-transform-origin:right;-moz-transform-origin:right;-ms-transform-origin:right;-o-transform-origin:right;transform-origin:right}@-webkit-keyframes growRight{0%{-webkit-transform:scalex(0);transform:scalex(0)}100%{-webkit-transform:scalex(1);transform:scalex(1)}}@-moz-keyframes growRight{0%{-moz-transform:scalex(0);transform:scalex(0)}100%{-moz-transform:scalex(1);transform:scalex(1)}}@-o-keyframes growRight{0%{-o-transform:scalex(0);transform:scalex(0)}100%{-o-transform:scalex(1);transform:scalex(1)}}@keyframes growRight{0%{-webkit-transform:scalex(0);-moz-transform:scalex(0);-o-transform:scalex(0);transform:scalex(0)}100%{-webkit-transform:scalex(1);-moz-transform:scalex(1);-o-transform:scalex(1);transform:scalex(1)}}.closeBtn{margin-bottom:63px;cursor:pointer}.EditEmailPhone input{width:100%;height:39px;-webkit-transition:.7s all ease-in-out;-moz-transition:.7s all ease-in-out;-o-transition:.7s all ease-in-out;transition:.7s all ease-in-out}.enterOtpn{width:181px!important}.EditEmailPhone h2{font-weight:400;font-size:32px;line-height:39px;color:#343434}.EditEmailPhone .emailtext{font-weight:400;font-size:14px;line-height:17px;color:#484848}.submitContinueBtn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:52px;padding:0 50px;background:#d13b45;color:#fff;font-weight:600;font-size:16px;line-height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;outline:none;border:none;margin-top:16px}.resendOtp{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:15px 0}.resendOtp p{margin-bottom:0}.resendOtp p span span{color:#c5c5c5}.resendOtp .resendOtpPera{margin-bottom:0;color:#d13b45}.resendOtp .disabledpera{color:#c5c5c5}.resendOtp p span{color:#000}.disabled{background:#ececec}.verifiedWrapper{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;
1-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.verifiedWrapper p{font-weight:400;font-size:22px;line-height:27px;color:#363636;margin-bottom:0}@media screen and (max-width:767px){.numberverfification .phone{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1}.EditEmailPhone{width:100%;padding:21px 17px}.EditEmailPhone h2{font-size:24px}.closeBtn{margin-bottom:43px}.EditEmailPhone input{width:100%}.verifiedWrapper p{font-size:16px}.submitContinueBtn{margin-top:13px}.resendOtp p{margin-top:13px}.resendOtp .timerset{display:block;text-align:center;margin-top:3px}}");i.__hash="c5d28f3e1e12f44b",t.Z=i},82669:function(e,t,i){var r=i(87462),o=i(63366),n=i(67294),a=i(45697),s=i.n(a),l=i(93967),d=i.n(l),c=i(23663),m=["className","cssModule","row","disabled","check","inline","tag"],b={children:s().node,row:s().bool,check:s().bool,inline:s().bool,disabled:s().bool,tag:c.iC,className:s().string,cssModule:s().object},FormGroup=function(e){var t=e.className,i=e.cssModule,a=e.row,s=e.disabled,l=e.check,b=e.inline,p=e.tag,x=(0,o.Z)(e,m),h=(0,c.mx)(d()(t,!!a&&"row",l?"form-check":"form-group",!!l&&!!b&&"form-check-inline",!!l&&!!s&&"disabled"),i);return"fieldset"===p&&(x.disabled=s),n.createElement(p,(0,r.Z)({},x,{className:h}))};FormGroup.propTypes=b,FormGroup.defaultProps={tag:"div"},t.Z=FormGroup}}]);

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.