PageSourceSearch

https://figur.africa/_next/static/chunks/pages/auth/signup-3923d0f8f1c75a2a.js

js figur.africa collected 2026-10-02 01:11:31 UTC 8,882 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5613],{66700:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/signup",function(){return c(30135)}])},79524:function(a,b,c){"use strict";var d=c(26042),e=c(69396),f=c(99534),g=c(85893);c(67294);var h=function(a){var b=a.label,c=a.className,h=(0,f.Z)(a,["label","className"]);return(0,g.jsx)("div",(0,e.Z)((0,d.Z)({className:"rounded-3xl py-2 px-3 text-primary inline-block bg-badge text-sm ".concat(c)},h),{children:b}))};b.Z=h},84099:function(a,b,c){"use strict";c.d(b,{Z:function(){return i}});var d=c(26042),e=c(69396),f=c(99534),g=c(85893);c(67294);var h=c(92004);function i(a){var b=a.icon,c=a.label,i=a.active,j=a.isAvailable,k=(0,f.Z)(a,["icon","label","active","isAvailable"]);return(0,g.jsxs)("div",(0,e.Z)((0,d.Z)({className:"".concat(i?"border-secondary ":"border-bordergray"," ").concat(!j&&"opacity-40"," flex  sm:flex-1 gap-1 items-center justify-between rounded-full border-2 hover:border-secondary px-3  py-2 cursor-pointer  relative")},k),{children:[b&&(0,g.jsx)(h.Z,{icon:b,className:"w-6 h-6"}),(0,g.jsx)("span",{className:"text-xs font-semibold",children:c}),i?(0,g.jsx)(h.Z,{icon:"BlueCircleTick",className:"w-5 h-5 right-2 fill-secondary"}):(0,g.jsx)("span",{})]}))}},94914:function(a,b,c){"use strict";var d=c(85893);c(67294);var e=c(84099),f=function(a){var b=a.options,c=a.setData,f=a.selectedOption,g=a.deactivateOption,h=a.label,i=a.classname,j=function(a){return g!==a+1};return(0,d.jsxs)("div",{className:"".concat(i),children:[(0,d.jsx)("p",{className:"text-sm pb-2",children:h}),(0,d.jsx)("div",{className:"grid items-center grid-cols-2 gap-4 w-full",children:b.map(function(a,b){return(0,d.jsx)("div",{children:(0,d.jsx)(e.Z,{isAvailable:j(b),onClick:function(){j(b)&&c(a)},label:a,active:a===f},b)},b)})})]})};b.Z=f},70016:function(a,b,c){"use strict";c.d(b,{r:function(){return n}});var d,e=c(47568),f=c(34051),g=c.n(f),h=c(86180),i=(d=(0,e.Z)(g().mark(function a(){var b;return g().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,h.Z.get("/store/settings");case 2:return b=a.sent,a.abrupt("return",b);case 4:case"end":return a.stop()}},a)})),function(){return d.apply(this,arguments)}),j=c(52767),k=c(15826),l=c(36492),m=c(67294),n=function(){var a,b=(0,k.pm)().addToast,c=(0,m.useContext)(j.ZP).setSettings;return(0,l.a)(["settings"],i,{onSuccess:(a=(0,e.Z)(g().mark(function a(b){var d;return g().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:c((d=b.data).data);case 2:case"end":return a.stop()}},a)})),function(b){return a.apply(this,arguments)}),onError:function(a){var c,d=a;d.response?b({msg:(null===(c=d.response.data)|| void 0===c?void 0:c.message)||"An error occurred",type:"error"}):b({msg:"".concat(d)||"An Error has occurred",type:"error"})}})}},30135:function(a,b,c){"use strict";c.r(b),c.d(b,{default:function(){return y}});var d,e=c(26042),f=c(69396),g=c(85893),h=c(41664),i=c.n(h),j=c(67294);c(86408);var k,l=c(84024),m=c(15826),n=c(10419),o=c(48324);(k=d||(d={})).PHONE="PHONE",k.EMAIL="EMAIL",k.PASSWORD="PASSWORD",k.PIN="PIN";var p=c(53992),q=c(76810),r=c(21377),s=c(92004),t=c(79524),u=c(69052),v=c(70016),w=c(94914),x=function(){var a=(0,j.useContext)(p.ZP).setSteps,b=(0,j.useState)(!1),c=b[0],h=b[1],k=(0,j.useState)(""),x=k[0],y=k[1],z=(0,j.useState)(""),A=z[0],B=z[1],C=(0,j.useContext)(p.ZP).steps,D=(0,l.pt)(),E=D.mutate,F=D.isLoading,G=(0,l.Ge)(),H=G.mutate,I=G.isLoading,J=(0,l.T4)(),K=J.mutate,L=J.isLoading,M=(0,m.pm)().addToast,N=(0,v.r)(),O=N.data,P=N.isLoading,Q=null==O?void 0:O.data.data.figur.emailVerification,R=(0,j.useState)("No"),S=R[0],T=R[1],U=function(b){if(null==b||b.preventDefault(),!(0,n.o)(x)){M({msg:"Invalid email address",type:"error"});return}E({email:x},{onSuccess:function(){if(Q){a("VERIFY");return}a("SETUP")}})},V=function(a){if(a.preventDefault(),!A){M({msg:"Invalid verification code",type:"error"});return}H({email:x,otp:Number(A),reason:d.EMAIL})},W=function(){var a;if(Y.firstName&&Y.lastName&&(null===(a=Y.phone)|| void 0===a?void 0:a.length)>10&&Y.password){K((0,f.Z)((0,e.Z)({},Y),{email:x,country:"NG",dialCode:"+234",referrer:"Yes"===S?Y.referrer:""}));return}if(Y.firstName){if(Y.lastName){if(!Y.phone||Y.phone.length<10)M({msg:"Please enter a valid phone number",type:"error"});else{if(Y.password)return;M({msg:"Please enter password",type:"error"})}}else M({msg:"Please enter last name",type:"error"})}else M({msg:"Please enter first name",type:"error"})},X=(0,o.Z)({},W),Y=X.inputs,Z=X.handleChange,$=X.handleSubmit;return(0,g.jsxs)(u.Z,{title:"Signup",children:["VALIDATE"===C&&(0,g.jsxs)("div",{className:"my-8",children:[(0,g.jsx)("p",{className:"text-primary",children:"Let’s start"}),(0,g.jsx)("h3",{className:"text-primary font-semibold text-xl",children:"We’ll make this fast & simple"}),(0,g.jsxs)("form",{onSubmit:U,className:"pt-10 flex flex-col gap-4",children:[(0,g.jsx)(r.Z,{label:"Email",type:"email",onChange:function(a){return y(a.target.value)}}),(0,g.jsx)(q.Z,{label:"Continue",loading:F,disabled:P,customclassname:"text-white font-bold mt-8",isrounded:!0})]})]}),"VERIFY"===C&&(0,g.jsxs)("div",{className:"my-8",children:[(0,g.jsx)("p",{className:"text-primary",children:"OTP Verification"}),(0,g.jsx)("h3",{className:"text-primary font-semibold text-xl",children:"A verification code has been sent to"}),(0,g.jsx)("div",{className:"mt-2",children:(0,g.jsx)(t.Z,{label:(0,g.jsx)("span",{children:(0,g.jsx)("b",{children:x})}),className:"mt-4"})}),(0,g.jsxs)("form",{onSubmit:V,className:"pt-10 flex flex-col gap-4",children:[(0,g.jsx)(r.Z,{label:"Enter Verification Code",type:"text",onCh
1ange:function(a){return B(a.target.value)}}),(0,g.jsx)(q.Z,{label:"Continue",loading:I,disabled:F,customclassname:"text-white font-bold mt-8",isrounded:!0})]}),(0,g.jsx)("div",{className:"mt-4 w-full",children:(0,g.jsx)("div",{onClick:function(){return!F&&U()},className:"".concat(F&&"opacity-50"," flex text-primary justify-center font-semibold md:font-bold"),children:"Resend OTP"})})]}),"SETUP"===C&&(0,g.jsxs)("div",{className:"md:my-8",children:[(0,g.jsx)("p",{className:"text-primary",children:"Let’s start"}),(0,g.jsx)("h3",{className:"text-primary font-semibold text-xl",children:"Tell us about you"}),(0,g.jsx)("div",{className:"mt-2",children:(0,g.jsx)(t.Z,{label:(0,g.jsxs)("span",{children:["Please use of your Legal ",(0,g.jsx)("b",{children:"First Name"})," and"," ",(0,g.jsx)("b",{children:"Last Name"})]}),className:"mt-4"})}),(0,g.jsxs)("form",{className:"pt-10 flex flex-col gap-4",onSubmit:$,children:[(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,g.jsx)(r.Z,{label:"First Name",type:"text",name:"firstName",onChange:Z}),(0,g.jsx)(r.Z,{label:"Last Name",type:"text",name:"lastName",onChange:Z})]}),(0,g.jsx)(r.Z,{label:"phone",type:"number",name:"phone",onChange:Z}),(0,g.jsx)(r.Z,{label:"Password",type:c?"text":"password",name:"password",onChange:Z,trailing:(0,g.jsx)("span",{onClick:function(){return h(!c)},children:(0,g.jsx)(s.Z,{icon:"Eye"})})}),(0,g.jsx)(w.Z,{label:"Do you have a referral code?",options:["Yes","No"],selectedOption:S,classname:" !max-w-[350px] w-full ",setData:function(a){return T(a)}}),"Yes"===S&&(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"text-xs",children:"Optional"}),(0,g.jsx)(r.Z,{label:"Referrer's number",type:"number",name:"referrer",onChange:Z})]}),(0,g.jsxs)("small",{className:"text-body",children:["By clicking sign up, you agree to our terms"," ",(0,g.jsx)(i(),{href:"/terms-and-conditions",legacyBehavior:!0,children:(0,g.jsxs)("a",{target:"_blank",className:"text-primary text-sm font-semibold",children:["Terms"," "]})}),"and"," ",(0,g.jsx)(i(),{href:"/privacy-policy",legacyBehavior:!0,children:(0,g.jsxs)("a",{target:"_blank",className:"text-primary text-sm font-semibold",children:["Policies"," "]})})]}),(0,g.jsx)(q.Z,{label:"Sign up",loading:L,customclassname:"text-white font-bold mt-4 w-full",isrounded:!0})]})]}),(0,g.jsx)("div",{className:"mt-4 w-full",children:(0,g.jsx)(i(),{href:"/auth/login",className:"flex text-primary justify-center font-semibold md:font-bold",children:"I already have an account"})})]})},y=x},10419:function(a,b,c){"use strict";c.d(b,{o:function(){return d}});var d=function(a){return!!a.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/)}},86408:function(){},99534:function(a,b,c){"use strict";function d(a,b){if(null==a)return{};var c,d,e=function(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],b.indexOf(c)>=0||(e[c]=a[c]);return e}(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],!(b.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}c.d(b,{Z:function(){return d}})}},function(a){a.O(0,[3996,6492,5675,6380,2996,2004,6017,9052,9774,2888,179],function(){var b;return a(a.s=66700)}),_N_E=a.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.