1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1304],{81304:(e,t,n)=>{n.r(t),n.d(t,{VerifyOtpForm:()=>N});var s=n(37876),a=n(14232),l=n(22826),r=n(77888),c=n(65089),i=n.n(c),u=n(55185),m=n(83097),o=n(537),d=n(36768),x=n(57370),h=n(83456),v=n(56073),p=n(15039),b=n.n(p);let N=e=>{var t;let{activeForm:n,setActiveForm:c,setShowSuccessOverlay:p,setShowLoadingOverlay:N,phone:f,formData:g,otpDestination:j,setOtpDestination:k,setVerificationId:w}=e,[A,E]=(0,a.useState)(""),{showModal:R}=(0,d.h)(),[S,_]=(0,a.useState)(),[I,O]=(0,a.useState)(!0),[y,C]=(0,a.useState)(300),[P,T]=(0,a.useState)();(0,a.useEffect)(()=>{let e=F();return()=>{clearInterval(e)}},[]);let F=()=>{C(300),O(!1);let e=setInterval(()=>{C(t=>1===t?(clearInterval(e),O(!0),0):t-1)},1e3);return e};return(0,a.useEffect)(()=>{!1===S&&c(l.R.ENTER_LOGIN_PIN)},[S]),(0,a.useEffect)(()=>{6===A.length&&(N(!0),(0,o.IN)({recipient:f,otp:A}).then(e=>{N(!1),"success"===e.status?(setTimeout(()=>{p(!0)},1e3),setTimeout(()=>_(!1),2e3),w(e.data.reference)):_(!0)}).catch(e=>{var t;N(!1),R([],x.A,()=>null,"",null!=(t=null==e?void 0:e.message)?t:"Something went wrong, please try again later.")}))},[A.length]),(0,s.jsx)(h.A,{step:2,children:(0,s.jsxs)("div",{className:"bg-white px-8 w-full",children:[(0,s.jsx)("h1",{id:"signup-heading",className:"text-2xl font-bold mb-1 text-center",children:"Verify Your Phone Number"}),(0,s.jsxs)("p",{className:"text-[#7B7F99] text-sm font-medium text-center mb-10 max-w-[18.1875rem] mx-auto",children:["Kindly input the 6-digit Code sent to your phone number +",(0,v.JT)(null==g||null==(t=g.values)?void 0:t.phone)]}),(0,s.jsxs)("p",{className:"text-[#7B7F99] text-sm font-medium text-center mb-10",children:["Wrong phone number?"," ",(0,s.jsx)("a",{onClick:()=>c(l.R.EMAIL_PASSWORD_FORM),className:b()("!text-[#EA157F] underline hover:text-black",i().link),children:"Change Phone Number"})]}),(0,s.jsxs)("div",{className:"mb-6 mx-auto",children:[(0,s.jsx)(m.$,{value:A,setValue:E,numInputs:6,classNames:"max-w-[362px] mx-auto"}),S&&(0,s.jsx)("div",{className:"invalid text-[0.625rem] font-medium text-center ".concat(i().invalid),children:"The OTP you entered is invalid"})]}),(0,s.jsxs)("div",{className:"flex items-center mb-[1.25rem] max-w-[22.5rem] mx-auto",children:[(0,s.jsx)("button",{className:"button border rounded-[0.75rem] block p-[1.125rem] mr-1 w-1/5",style:{padding:"16px"},onClick:()=>c(l.R.EMAIL_PASSWORD_FORM),children:(0,s.jsx)(u.A,{size:20,className:""})}),(0,s.jsx)(r.A,{variant:"black",Text:"Resend Code",className:"w-4/5",disabled:!I,onclickAction:()=>void(()=>{try{(0,o.OO)({...null==g?void 0:g.values,phone:f.length<11?0+f:f}).then(e=>{var t;(null==e||null==(t=e.data)?void 0:t.status)&&(T(!1),k("Phone")),F(),T(!1)})}catch(e){T(!1)}})(),loading:P,id:"resend-code"})]}),(0,s.jsxs)("p",{className:"text-center text-sm font-semibold leading-[1.3rem]",children:[I?"":"Resend in ".concat(Math.floor(y/60),":").concat(y%60<10?"0".concat(y%60):y%60)," "]})]})})}}}]);
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.