1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8741],{81103:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register/forgotPassword",function(){return n(8453)}])},7587:function(e,t,n){"use strict";var r=n(5311),a=n(91612);let s=(0,n(66840).forwardRef)((e,t)=>(0,r.jsx)(a.r,{ref:t,...e,color:"blue.500"}));t.Z=s},8272:function(e,t,n){"use strict";var r=n(5311),a=n(11754);n(66840),t.Z=function(e){let{children:t,rows:n=3,mb:s=0,...o}=e;return(0,r.jsx)(a.M,{columns:{base:1,md:3,lg:n},gap:4,mb:s,...o,children:t})}},15593:function(e,t,n){"use strict";n.d(t,{kZ:function(){return u},G8:function(){return c.Z},CD:function(){return p},ZP:function(){return x}});var r=n(5311),a=n(34134),s=n(81784),o=n(61534),l=n(74927),i=n(13714);n(66840);var u=function(e){let{to:t=o.K$.COLLECTION_CENTER,children:n}=e,{user:u,union:c}=(0,s.Z)(),d=(0,l.Tk)(t),{t:v}=(0,i.Z)();return(0,l.Ft)(d,u)&&(null==c?void 0:c.hasContainer)?n:(0,r.jsx)(a.k,{m:4,justifyContent:"center",mt:8,children:(0,r.jsxs)("p",{children:[v("traceability:container.restricted_access"),"."]})})},c=n(8272),d=n(52804),v=n(66595),m=n(63009),f=n(23609),h=n(7959);function p(e){let{children:t,mb:n=2,actions:s,PreviousPageButton:o,floatHeader:l=!1,...i}=e,{scrollY:u}=(0,m.v)(),c=(0,f.H)(u,[0,50],[1,.8]),p=(0,f.H)(u,[0,50],[1,.95]);return(0,r.jsxs)(a.k,{alignItems:"center",as:h.E.header,position:l?"sticky":"relative",top:"0",backgroundColor:"white",zIndex:l?99:0,rounded:l?"md":void 0,shadow:l?"sm":void 0,my:l?2:0,px:l?2:0,pt:l?2:0,children:[(0,r.jsx)(d.x,{mb:n,mt:6,children:o&&o}),(0,r.jsxs)(a.k,{flex:1,justifyContent:{base:"center",md:"space-between"},alignItems:"center",mb:null!=n?n:0,flexWrap:"wrap",gap:2,children:[l?(0,r.jsx)(h.E.div,{style:{opacity:c,scale:p},transition:{duration:.3},children:(0,r.jsx)(v.X,{as:"h1",display:"inline-block",...i,children:t})}):(0,r.jsx)(v.X,{as:"h1",display:"inline-block",...i,children:t}),s&&s]})]})}var x=function(e){let{to:t=o.K$.COLLECTION_CENTER,children:n}=e,{user:a}=(0,s.Z)(),i=(0,l.Tk)(t);return(0,r.jsx)(r.Fragment,{children:(0,l.Ft)(i,a)&&n})}},72703:function(e,t,n){"use strict";n.d(t,{x:function(){return m}});var r=n(14517),a=n(5311),s=n(52804),o=n(83297),l=n(66740);n(66840);var i=n(36602),u=n(21562),c=n(190);function d(){let e=(0,r._)(["\n .PhoneInput {\n position: relative;\n input {\n padding-left: 3rem;\n }\n .PhoneInputCountryIconImg {\n height: 1em;\n margin-top: 0.6rem;\n }\n .PhoneInputCountryIconUnicode,\n .PhoneInputCountryIcon {\n line-height: 2.5rem;\n padding: 0 0.7rem;\n font-size: 1.4rem;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n z-index: 2;\n }\n select {\n display: none;\n }\n }\n"]);return d=function(){return e},e}let v=l.Z.div(d()),m=e=>{var t;let{name:n,label:r,hint:l,mb:d=4,defaultCountry:m,disabled:f=!1,...h}=e,{field:p,fieldState:x}=(0,i.bc)({name:n});return(0,a.jsxs)(c.g,{as:v,invalid:!!x.error,errorText:null==x?void 0:null===(t=x.error)||void 0===t?void 0:t.message,mb:d,htmlFor:p.name,label:r,...h,children:[(0,a.jsx)(s.x,{width:"full",children:(0,a.jsx)(u.ZP,{id:n,inputComponent:o.I,countrySelectProps:{unicodeFlags:!0},defaultCountry:m,disabled:f,...p})}),l&&(0,a.jsx)(c.g,{color:"gray.600",helperText:l})]})}},74e3:function(e,t,n){"use strict";n.d(t,{J:function(){return d}});var r=n(5311),a=n(99561),s=n(68097),o=n(17390);n(66840);var l=n(36602),i=n(190),u=n(82926);let c=[{label:"Yes",value:!0},{label:"No",value:!1}],d=e=>{var t,n;let{helpText:d,label:v,name:m,placeholder:f,title:h,hint:p,mb:x=4,isInline:g=!0,options:b=c,isClearable:j,...y}=e,{field:w,fieldState:_}=(0,l.bc)({name:m}),E=y.castType||typeof(null==b?void 0:null===(t=b[0])||void 0===t?void 0:t.value);return(0,r.jsxs)(i.g,{invalid:!!_.error,errorText:(0,o.Z)(null==_?void 0:null===(n=_.error)||void 0===n?void 0:n.message,m,v||f),mb:x,htmlFor:w.name,label:v,...y,children:[(0,r.jsx)(u.E,{colorPalette:"blue",id:m,...w,value:String(w.value),onChange:e=>w.onChange((0,o.c)(e,E)),children:(0,r.jsx)(a.K,{direction:g?"row":"column",py:2,children:b.map(e=>(0,r.jsx)(u.Y,{value:String(e.value),children:e.label},e.value))})}),j&&(0,r.jsx)(s.z,{onClick:()=>w.onChange(""),size:"xs",children:"Clear"}),p&&(0,r.jsx)(i.g,{color:"gray.600",helperText:p})]})}},15994:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var r=n(5311),a=n(66840),s=n(36602),o=n(38954);let l=e=>{let{children:t,isDisabled:n,colorPalette:l="blue",mb:i=0,icon:u,leftIcon:c,rightIcon:d,...v}=e,{formState:m}=(0,s.Gc)(),[f,h]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{h(n)},[n]),(0,r.jsxs)(o.z,{loading:m.isSubmitting,type:"submit",disabled:f,mb:i,...v,colorPalette:l,variant:"solid",children:[c,u,t,d]})}},49330:function(e,t,n){"use strict";n.d(t,{N:function(){return l}});var r=n(5311),a=n(83297);n(66840);var s=n(36602),o=n(190);let l=e=>{var t;let{id:n,name:l,label:i,type:u="text",mb:c=4,mt:d=0,pl:v=4,disabled:m,hint:f,required:h,showLabel:p=!0,maxLength:x,hidden:g,autoComplete:b,placeholder:j,...y}=e,{field:w,fieldState:_}=(0,s.bc)({name:l,defaultValue:""});return(0,r.jsxs)(o.g,{label:p&&i,htmlFor:l,invalid:!!_.error,errorText:null==_?void 0:null===(t=_.error)||void 0===t?void 0:t.message,mb:c,mt:d,hidden:g,required:h,colorPalette:"blue",...y,children:[(0,r.jsx)(a.I,{id:n||l,placeholder:j,t
1ype:u,maxLength:x,disabled:m,autoComplete:b,pl:v,...w}),x&&w.value&&(0,r.jsx)(o.g,{color:"gray.600",helperText:"".concat(w.value.length,"/").concat(x)}),f&&(0,r.jsx)(o.g,{color:"gray.600",helperText:f})]})}},38460:function(e,t,n){"use strict";n.d(t,{Co:function(){return l},De:function(){return o},Lj:function(){return a},Xb:function(){return s},uz:function(){return r}});let r=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Others",value:"Others"}],a=[{label:"Agriculture",value:"Agriculture"},{label:"Business",value:"Business"},{label:"Education",value:"Education"},{label:"Government",value:"Government"},{label:"Research",value:"Research"},{label:"Student",value:"Student"},{label:"Other",value:"Other"}],s=[{label:"Corporation",value:"Corporation"},{label:"Government",value:"Government"},{label:"Non Governmental Organization",value:"Non_governmental_organization"},{label:"Educational Institution",value:"Educational_institution"},{label:"Other",value:"Other"}],o=[{label:"Email",value:"EMAIL"},{label:"Mobile",value:"MOBILE"}],l={MANUAL:"manual",OAUTH_GOOGLE:"oauth-google"}},38954:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var r=n(5311),a=n(68097),s=n(90147),o=n(53035),l=n(10790);let i=n(66840).forwardRef(function(e,t){let{loading:n,disabled:i,loadingText:u,children:c,...d}=e;return(0,r.jsx)(a.z,{disabled:n||i,ref:t,...d,children:n&&!u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.u,{display:"inline-flex",children:(0,r.jsx)(o.$,{size:"inherit",color:"inherit"})}),(0,r.jsx)(l.D,{opacity:0,children:c})]}):n&&u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$,{size:"inherit",color:"inherit"}),u]}):c})})},190:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var r=n(5311),a=n(60005);let s=n(66840).forwardRef(function(e,t){let{label:n,children:s,helperText:o,errorText:l,optionalText:i,htmlFor:u,...c}=e;return(0,r.jsxs)(a.Tn,{ref:t,...c,children:[n&&(0,r.jsxs)(a.Qy,{htmlFor:u,children:[n,(0,r.jsx)(a.SB,{fallback:i})]}),s,o&&(0,r.jsx)(a.pH,{children:o}),l&&(0,r.jsx)(a.FI,{children:l})]})})},82926:function(e,t,n){"use strict";n.d(t,{E:function(){return o},Y:function(){return s}});var r=n(5311),a=n(54999);let s=n(66840).forwardRef(function(e,t){let{children:n,inputProps:s,rootRef:o,...l}=e;return(0,r.jsxs)(a.mJ,{ref:o,...l,children:[(0,r.jsx)(a.$z,{ref:t,...s}),(0,r.jsx)(a.Xu,{}),n&&(0,r.jsx)(a.xZ,{children:n})]})}),o=a.ZY},8453:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return S}});var r=n(5311),a=n(44466),s=n(34134),o=n(52804),l=n(33020),i=n(7587),u=n(15593),c=n(72703),d=n(74e3),v=n(15994),m=n(49330),f=n(79994),h=n.n(f),p=n(60551),x=n(68704),g=n(87032),b=n(61876),j=n(13714),y=n(66840),w=n(36602),_=n(64585),E=n(21562),Z=n(43184),C=n(38460);function I(){let{t:e}=(0,j.Z)(),t=(0,b.useRouter)(),[n,f]=(0,y.useState)(!1),[I,S]=(0,y.useState)(),{open:T,onClose:P}=(0,a.q)({defaultOpen:!0}),R=(0,w.cI)({mode:"onBlur",resolver:(0,p.X)(Z.Ry().shape({verificationType:Z.Z_().required(),email:Z.Z_().email().when("verificationType",{is:e=>e===C.De[0].value,then:Z.Z_().required()}),mobileNumber:Z.Z_().test("mobile","${path} is not valid",e=>!e||(0,E.tm)(e)).when("verificationType",{is:e=>e===C.De[1].value,then:Z.Z_().required()})})),defaultValues:{verificationType:C.De[0].value}}),N=(0,w.cI)({mode:"onBlur",resolver:(0,p.X)(Z.Ry().shape({otp:Z.Z_().required(),password:Z.Z_().min(8).required(),confirmPassword:Z.Z_().oneOf([Z.iH("password"),null],"Passwords do not match").required()}))}),O=R.watch("verificationType");(0,y.useEffect)(()=>{f(O===C.De[1].value)},[O]);let k=async t=>{let{verificationType:n,email:r,mobileNumber:a}=t,s=n===C.De[0].value?r:a,{success:o,data:l,user:i}=await (0,x.v7)({verificationId:s});o?(S({...i,vt:n.toLowerCase()}),P()):(0,g.Z)(e(l))},z=async n=>{let r={id:null==I?void 0:I.id,...n},{success:a}=await (0,x._p)(r);a?((0,g.Z)(e("auth:forgot.reset_success"),g.k.Success),t.push("/login")):(0,g.Z)(e("auth:otp.messages.error"))},F=async()=>{let t={id:null==I?void 0:I.id,action:1},{success:n,data:r}=await (0,x.Y3)(t);(0,g.Z)(e(r),n?g.k.Success:g.k.Error)};
1return(0,r.jsx)(s.k,{className:"container fadeInUp",align:"center",justify:"center",pt:6,children:(0,r.jsx)(o.x,{maxW:"xs",width:"full",pb:4,children:T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.CD,{children:e("auth:forgot.title")}),(0,r.jsx)(w.RV,{...R,children:(0,r.jsxs)("form",{onSubmit:R.handleSubmit(k),children:[(0,r.jsx)("div",{"data-hidden":!h().REGISTER.MOBILE,children:(0,r.jsx)(d.J,{name:"verificationType",label:e("auth:forgot.form.verification_type"),options:C.De,mb:1})}),n?(0,r.jsx)(c.x,{name:"mobileNumber",label:e("user:mobile")}):(0,r.jsx)(m.N,{name:"email",label:e("user:email")}),(0,r.jsx)(v.M,{rightIcon:(0,r.jsx)(_.W9,{}),children:e("auth:forgot.form.submit")})]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.CD,{children:e("auth:otp.title")}),(0,r.jsxs)(l.x,{mb:4,children:[e("auth:otp.description")," ",null==I?void 0:I.vt]}),(0,r.jsx)(w.RV,{...N,children:(0,r.jsxs)("form",{onSubmit:N.handleSubmit(z),children:[(0,r.jsx)(m.N,{name:"otp",label:e("auth:otp.form.otp")}),(0,r.jsx)(m.N,{name:"password",label:e("user:password"),type:"password",autoComplete:"new-password"}),(0,r.jsx)(m.N,{name:"confirmPassword",label:e("user:confirm_password"),type:"password",autoComplete:"new-password"}),(0,r.jsxs)(s.k,{justifyContent:"space-between",alignItems:"center",children:[(0,r.jsx)(v.M,{rightIcon:(0,r.jsx)(_.W9,{}),children:e("auth:otp.form.submit")}),(0,r.jsx)(i.Z,{onClick:F,children:e("auth:otp.resend")})]})]})})]})})})}function S(){return(0,r.jsx)(I,{})}},68704:function(e,t,n){"use strict";n.d(t,{E3:function(){return u},QW:function(){return m},UK:function(){return p},Y3:function(){return v},_p:function(){return h},fX:function(){return c},g:function(){return i},ow:function(){return d},v7:function(){return f}});var r=n(61534),a=n(73770),s=n(87032),o=n(57016),l=n(93659);let i=async e=>(await l.Z.post("".concat(r.f4.USER,"/v1/authenticate/login"),(0,o.Pz)(e))).data,u=async e=>{try{let{data:t}=await l.Z.post("".concat(r.f4.USERGROUP,"/v1/group/register"),e);return{success:!0,data:t}}catch(e){var t,n;return console.error(e),(0,s.Z)(null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message),{success:!1,data:{}}}},c=async()=>{try{let{user:e,...t}=(await a.ZP.get("".concat(r.f4.ENTITIES,"/user/me"))).data;return{...e,...t}}catch(e){return console.error(e),{}}},d=async e=>{try{let{data:t}=await a.qj.get("".concat(r.f4.USER,"/v1/user/autocomplete"),{params:{name:e}});return{success:!0,data:t.map(e=>({...e,display:e.name}))}}catch(e){var t,n;return console.error(e),(0,s.Z)(null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message),{success:!1,data:[]}}},v=async e=>{try{let{data:t}=await l.Z.post("".concat(r.f4.USER,"/v1/authenticate/regenerate-otp"),(0,o.Pz)(e));return{success:t.status,data:"otp.messages.".concat(t.message)}}catch(e){return console.error(e),{success:!1,data:"otp.messages.could_not_send_mail_sms"}}},m=async e=>{try{let{data:t}=await l.Z.post("".concat(r.f4.USERGROUP,"/v1/group/verify-user"),(0,o.Pz)(e));return{success:t.status,data:t,message:"otp.messages.".concat(t.message)}}catch(e){return console.error(e),{success:!1,data:{},message:"otp.messages.error"}}},f=async e=>{try{let{data:t}=await l.Z.post("".concat(r.f4.USER,"/v1/authenticate/forgot-password"),(0,o.Pz)(e));return{success:t.status,data:"otp.messages.".concat(t.message),user:t.user||{}}}catch(e){return console.error(e),{success:!1,data:"otp.messages.could_not_send_mail_sms",user:{}}}},h=async e=>{try{let{data:t}=await l.Z.post("".concat(r.f4.USER,"/v1/authenticate/reset-password"),(0,o.Pz)(e));return{success:!0,data:t}}catch(e){var t,n;return console.error(e),(0,s.Z)(null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message),{success:!1,data:{}}}},p=async(e,t)=>{try{let{data:n}=await a.qj.get("".concat(r.f4.USER,"/v1/user/ibp/autocomplete"),{params:{name:e,userGroupId:t}});return{success:!0,data:n.map(e=>({...e,display:e.name}))}}catch(e){var n,o;return console.error(e),(0,s.Z)(null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message),{success:!1,data:[]}}}},17390:function(e,t,n){"use strict";n.d(t,{Z:function(){return r},c:function(){return a}});let r=(e,t,n)=>{var r;return n?null==e?void 0:null===(r=e.replace("[",".").replace("]",""))||void 0===r?void 0:r.replace(t,n):e},a=(e,t)=>{try{switch(t){case"number":case"boolean":case"object":return JSON.parse(e);default:return e}}catch(t){return e}}},57016:function(e,t,n){"use strict";n.d(t,{Pz:function(){return s}});var r=n(90486);let a={arrayFormat:"comma",parseNumbers:!0,parseBooleans:!0},s=e=>(0,r.stringify)(e,a)}},function(e){e.O(0,[4832,3895,3184,6602,347,6492,507,2888,9774,179],function(){return e(e.s=81103)}),_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.