1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1868],{77273:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/forgotPassword",function(){return s(94575)}])},94575:function(e,l,s){"use strict";s.r(l);var t=s(85893),i=s(65400),o=s.n(i),n=s(97538),a=s(51024),d=s(11187),r=s(64749),c=s(41664),u=s.n(c),m=s(67294),x=s(37094),h=s(18318),p=s(30080),g=s(58386),f=s(73272),v=s(63197),j=s(19693),w=s(11163),b=s(10996),N=s(87066);l.default=()=>{let[e,l]=(0,m.useState)(0),[s,i]=(0,m.useState)(!1),[c,C]=(0,m.useState)([...b.P]),{setIsLoggedIn:y}=(0,j.E)(),A=(0,w.useRouter)(),[F]=n.Z.useForm(),[_,E]=d.ZP.useMessage(),[B,P]=(0,m.useState)(!1),[k,S]=(0,m.useState)(null),[T,Z]=(0,m.useState)(null),[I,R]=(0,m.useState)(null),[O,q]=(0,m.useState)(null);(0,m.useEffect)(()=>{let e=(0,f.le)("accessToken");null!=e&&e.length>0&&A.replace("/")},[]),(0,m.useEffect)(()=>{N.Z.get("https://ipapi.co/json/").then(e=>{if(null==e?void 0:e.data){var l;F.setFieldValue("countryCode",null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.country_calling_code.replace("+",""))}}).catch(e=>console.log(e))},[]);let handleOTP=l=>{let s={...l,verificationToken:k,...0===e?{email:T}:{mobile:I,countryCode:O}};i(!0),(0,v.tq)(s).then(e=>{if(null==e?void 0:e.status)A.push("/login");else{var l,s,t,i;_.open({type:"error",content:(null==e?void 0:e.message)=="VALIDATION ERROR"?null==e?void 0:null===(i=e.details)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:null===(s=t.validation_results)||void 0===s?void 0:null===(l=s[0])||void 0===l?void 0:l.reason:null==e?void 0:e.message})}}).catch(e=>console.log(e)).finally(()=>i(!1))},handleResend=()=>{(0,v.ZD)(0===e?"?email=".concat(F.getFieldValue("email")):"?mobile=".concat(F.getFieldValue("mobile"),"&countryCode=").concat(F.getFieldValue("countryCode"))).then(l=>{if(null==l?void 0:l.status)P(!0),S(null==l?void 0:l.verificationToken),0===e?Z(F.getFieldValue("email")):(R(F.getFieldValue("mobile")),q(F.getFieldValue("countryCode")));else{var s,t,i,o;_.open({type:"error",content:(null==l?void 0:l.message)=="VALIDATION ERROR"?null==l?void 0:null===(o=l.details)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:null===(t=i.validation_results)||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.reason:null==l?void 0:l.message})}}).catch(e=>console.log(e))};return(0,t.jsxs)("div",{style:{backgroundImage:"url('https://res.cloudinary.com/dbusbjuea/image/upload/v1760361423/Utils/authbg.webp')",backgroundSize:"cover"},className:"font-poppins w-full h-screen ",children:[E,(0,t.jsx)("div",{className:"flex flex-col p-4 justify-center h-full w-full m-auto items-center",children:(0,t.jsxs)("div",{className:"bg-white rounded-md p-4 mt-3 w-full md:w-1/2 lg:w-1/2 xl:w-1/4",children:[(0,t.jsx)(u(),{href:"/",children:(0,t.jsx)("div",{className:"flex justify-end items-center",children:(0,t.jsx)(h.bjh,{className:"bg-purple3 text-white rounded-sm font-semibold cursor-pointer p-1",size:18})})}),(0,t.jsx)("p",{className:"font-semibold text-lg",children:"Reset your Password"}),!B&&(0,t.jsxs)("div",{className:"grid grid-cols-2 place-items-center mt-3 gap-x-5",children:[(0,t.jsxs)("p",{onClick:()=>l(0),className:"flex justify-center text-xs cursor-pointer md:text-sm items-center gap-x-3 h-10 rounded-md ".concat(0==e?"bg-black text-white":"border border-[#A89BC3] text-[#A89BC3]"," w-full"),children:[(0,t.jsx)(x.JwT,{size:20}),"Email"]}),(0,t.jsxs)("p",{onClick:()=>l(1),className:"flex justify-center text-xs cursor-pointer md:text-sm items-center gap-x-3 h-10 rounded-md ".concat(1==e?"bg-black text-white":"border border-[#A89BC3] text-[#A89BC3]"," w-full"),children:[(0,t.jsx)(x.rxo,{size:20}),"Mobile"]})]}),!B&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsxs)(n.Z,{form:F,onFinish:e=>handleResend(),children:[0==e?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(n.Z.Item,{name:"email",rules:[{required:!0,message:"Email is required"},{pattern:f.s9,message:"Enter valid email"}],children:(0,t.jsx)(a.Z,{placeholder:"[email protected]",prefix:(0,t.jsx)(x.JwT,{color:"#A89BC3"}),className:"h-10 text-[#A89BC3] px-4 font-semibold"})})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"grid grid-cols-3 w-full place-items-center gap-x-3",children:[(0,t.jsx)(n.Z.Item,{className:"w-full col-span-1",name:"countryCode",rules:[{required:!0,message:"Select dial code"}],children:(0,t.jsx)(r.default,{onSearch:e=>{if(e.length>0){let l=c.filter(l=>(null==l?void 0:l.dial_code.includes(e))||(null==l?void 0:l.name.toLowerCase().includes(e.toLowerCase())));C(l)}else C([...b.P])},showSearch:!0,placeholder:"Code",className:"h-10 text-[#A89BC3] font-semibold",prefix:(0,t.jsx)(x.gyF,{color:"#A89BC3"}),children:c.map((e,l)=>(0,t.jsxs)(r.default.Option,{value:e.dial_code,children:[e.dial_code," ",null==e?void 0:e.flag]},l))})}),(0,t.jsx)(n.Z.Item,{name:"mobile",className:"w-full col-span-2",rules:[{required:!0,message:"Mobile is required"}],children:(0,t.jsx)(a.Z,{placeholder:"800XX 55XXX",prefix:(0,t.jsx)(x.rxo,{color:"#A89BC3"}),className:"h-10 text-[#A89BC3] px-4 font-semibold"})})]})}),(0,t.jsx)(o(),{loading:s,className:"font-bold w-full h-14 roun
1ded-lg mt-4",htmlType:"submit",style:{background:"linear-gradient(90deg, #5729AB 0%, #54115F 100%)",color:"white"},children:"Send OTP"})]})}),B&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("p",{className:"text-[#9E9E9E] font-medium text-center ",children:"One Time Password"}),(0,t.jsxs)(n.Z,{form:F,onFinish:e=>handleOTP(e),children:[(0,t.jsx)(n.Z.Item,{className:"flex justify-center m-auto items-center mt-2",name:"otp",rules:[{required:!0,message:"Otp Is Required"}],children:(0,t.jsx)(g.Z,{numInputs:6,renderInput:e=>(0,t.jsx)("input",{className:"rounded-lg w-10 focus:outline-none",...e}),inputStyle:{width:"15%",borderRadius:5,outline:"none",color:"#A89BC3",fontSize:"18px",fontWeight:"600",background:"#F5F0FF",marginRight:"10px",height:"50px",border:"1px solid #A89BC3"}})}),(0,t.jsx)(n.Z.Item,{name:"newPassword",rules:[{required:!0,message:"Password is required"},{pattern:f.lI,message:"Enter valid password"}],children:(0,t.jsx)(a.Z.Password,{placeholder:"New Password",prefix:(0,t.jsx)(p.Tmq,{color:"#A89BC3"}),className:"h-10 text-[#A89BC3] px-4 mt-2 font-semibold"})}),(0,t.jsx)(o(),{loading:s,className:"font-bold w-full h-14 rounded-lg mt-4",htmlType:"submit",style:{background:"linear-gradient(90deg, #5729AB 0%, #54115F 100%)",color:"white"},children:"Reset Password"})]})]})]})})]})}}},function(e){e.O(0,[509,8469,8872,5400,2333,1024,4749,7538,1187,816,9774,2888,179],function(){return e(e.s=77273)}),_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.