1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1994],{11994:function(e,t,s){s.d(t,{Ag:function(){return g},DI:function(){return m},Pc:function(){return h},V1:function(){return p},ip:function(){return x}});var l=s(85893);s(82950);var n=s(33582);s(84897);var a=s(31484);s(25675);var r=s(67294);s(33255);var i=s(91237),o=s(64970),c=s.n(o),d=s(19221),u=s(5577),f=s(64712);let x=e=>{let{field:t,value:s,onChange:a,kycid:o}=e,[c,u]=(0,r.useState)(!1),x=async e=>{console.log(e);let s=e.target.files[0];if(!s){a("");return}if((null==t?void 0:t.questionType)==="FILE"&&"application/pdf"!==s.type){f.Am.error("Only PDF files are allowed"),e.target.value="";return}u(!0);let l=s.name.split(".").pop(),n=Date.now()+"-"+Math.random().toString(36).substring(2,8),r="".concat(s.name.replace(/\.[^/.]+$/,""),"-").concat(n,".").concat(l),c=new File([s],r,{type:s.type}),x=new FormData;x.append("files[0].file",c),x.append("files[0].identifier",null==t?void 0:t.identifier);try{let e=await d.Z.post("".concat(i.BASE_API,"/kyc/").concat(o,"/upload"),x,{headers:{"Content-Type":"multipart/form-data"}});200===e.status&&a(null==e?void 0:e.data[r])}catch(e){var m,p,h;console.error("Error uploading file:",e),f.Am.error(null!==(h=null==e?void 0:null===(p=e.response)||void 0===p?void 0:null===(m=p.data[0])||void 0===m?void 0:m.message)&&void 0!==h?h:"Something went wrong")}finally{u(!1)}},m=async()=>{try{let e=await d.Z.delete("".concat(i.BASE_API,"/kyc/").concat(o,"/document/").concat(s,"/delete"));200===e.status&&(console.log("File removed successfully"),a("")),a("")}catch(e){console.error("Error removing file:",e)}finally{u(!1)}};return(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("text",{className:"text-sm font-medium",children:[null==t?void 0:t.question," ",(null==t?void 0:t.required)&&(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 block",children:null==t?void 0:t.description}),s?(0,l.jsxs)("div",{onClick:m,className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("text",{className:"text-xs font-medium",children:"Image uploaded"}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 -mt-0.5 -mb-0.5",children:s})]}),(0,l.jsx)("text",{className:"text-xs font-medium bg-red-500 p-1.5 cursor-pointer rounded",children:"Remove"})]}):(0,l.jsx)("div",{onClick:()=>{var e;return null===(e=document.getElementById("fileInput"+(null==t?void 0:t.identifier)))||void 0===e?void 0:e.click()},className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-center",children:(0,l.jsx)("text",{className:"text-sm font-medium",children:c?"Loading...":(null==t?void 0:t.questionType)==="FILE"?"Upload File (PDF only)":"Upload File"})}),(0,l.jsx)(n.I,{id:"fileInput"+(null==t?void 0:t.identifier),type:"file",accept:(null==t?void 0:t.questionType)==="FILE"?".pdf,application/pdf":void 0,onChange:x,className:"hidden",required:null==t?void 0:t.required})]})},m=e=>{var t;let{label:s="",value:n,onChange:r,data:i,required:o,description:c}=e;return(0,l.jsxs)("div",{className:"dark",children:[(0,l.jsxs)("text",{className:"text-sm font-medium",children:[s," ",o&&(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 block",children:null!=c?c:"."}),(0,l.jsxs)(a.Ph,{value:n,onValueChange:e=>r({target:{value:e}}),required:o,children:[(0,l.jsx)(a.i4,{className:"w-full bg-[#ffffff20] h-[45px] mt-2 border-none",children:(0,l.jsx)(a.ki,{placeholder:"Select an option"})}),(0,l.jsx)(a.Bw,{className:"dark",children:null==i?void 0:null===(t=i.optionValues)||void 0===t?void 0:t.map((e,t)=>(0,l.jsx)(a.Ql,{value:null==e?void 0:e.optionValue,children:null==e?void 0:e.optionValue},t))})]})]})},p=e=>{let{field:t,kycid:s,onChange:n,value:a}=e,[o,u]=(0,r.useState)(!1),f=(0,r.useRef)(null),[x,m]=(0,r.useState)(null),[p,h]=(0,r.useState)(!1),g=(0,r.useCallback)(()=>{m(f.current.getScreenshot())},[f]),v=async e=>{if(e.preventDefault(),x){h(!0);try{let e=await fetch(x).then(e=>e.blob()),l=Date.now()+"-"+Math.random().toString(36).substring(2,8),a="webcam-image-".concat(l,".png"),r=new FormData;r.append("files[0].file",e,a),r.append("files[0].identifier",null==t?void 0:t.identifier);let o=await d.Z.post("".concat(i.BASE_API,"/kyc/").concat(s,"/upload"),r,{headers:{"Content-Type":"multipart/form-data"}});200===o.status&&(console.log("Image uploaded successfully"),n(o.data[a]))}catch(e){console.error("Error uploading image:",e)}finally{h(!1),u(!1)}}},j=async()=>{try{let e=await d.Z.delete("".concat(i.BASE_API,"/kyc/").concat(s,"/document/").concat(a,"/delete"));200===e.status&&(console.log("File removed successfully"),n(null))}catch(e){console.error("Error removing file:",e)}finally{h(!1)}};return(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("text",{className:"text-sm font-medium",children:[null==t?void 0:t.question," ",(null==t?void 0:t.required)&&(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 block",children:null==t?void 0:t.description}),a?(0,l.jsxs)("div",{onClick:j,className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("text",{className:"text-xs font-medium",children:"Image uploaded"}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 -mt-0.5 -mb-0.5",children:a})]}),(0,l.jsx)("text",{className:"text-xs font-medium bg-red-500 p-1.5 cursor-pointer rounded",children:"Remove"})]}):(0,l.jsx)("div",{onClick:()=>u(!0),className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-center",children:(0,l.jsx)("text",{className:"text-sm font-medium",children:"Open Camera"})}),o&&(0,l.jsx)("div",{className:" w-full h-screen bg-[#000000]/80 fixed z-50 top-0 left-0 flex items-center justify-center",children:(0,l.jsxs)("div",{className:"bg-zinc-900 w-[50vh] h-[50vh] rounded-xl p-5 flex flex-col",children:[(0,l.jsx)("text",{className:"text-lg font-medium",children:"Take a photo"}),(0,l.jsx)("text",{className:"text-sm text-zinc-400",children:"Make sure your face is visible and well lit"}),(0,l.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-[#ffffff10] rounded-lg mt-4 overflow-hidden",children:x?(0,l.jsx)("img",{src:x,alt:"Captured",className:"w-full h-full"}):(0,l.jsx)(c(),{audio:!1,ref:f,screenshotFormat:"image/jpeg",width:"100%",height:"100%"})}),(0,l.jsxs)("div",{className:"w-full flex justify-end mt-5 gap-4 bottom-5 right-5",children:[(0,l.jsx)("button",{onClick:()=>{x?m(null):u(!1)},className:"bg-[#ffffff20] hover:bg-[#ffffff40] text-white w-[100px] text-sm rounded-lg h-[45px] px-5",children:x?"Retake":"Cancel"}),(0,l.jsx)("button",{onClick:e=>{x?v(e):g()},className:"bg-yellow-500 hover:bg-yellow-600 w-fit text-black text-sm rounded-lg h-[45px] px-5",children:x?p?"Loadind..":"Save Picture":"Take Picture"})]})]})})]})},h=e=>{let{field:t,kycid:s,onChange:n,value:a}=e,[o,c]=(0,r.useState)(!1),[f,x]=(0,r.useState)(null),m=(0,r.useRef)(null),[p,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)({x:0,y:0});(0,r.useEffect)(()=>
1{if(m.current){let e=m.current.getContext("2d");e&&(e.strokeStyle="#000000",e.lineWidth=2,e.lineCap="round",e.lineJoin="round")}},[]);let w=e=>{if(!m.current)return{offsetX:0,offsetY:0};let t=m.current,s=t.getBoundingClientRect(),l=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY;return{offsetX:(l-s.left)*(t.width/s.width),offsetY:(n-s.top)*(t.height/s.height)}},b=e=>{e.preventDefault();let{offsetX:t,offsetY:s}=w(e);h(!0),y({x:t,y:s})},N=e=>{if(e.preventDefault(),!p||!m.current)return;let{offsetX:t,offsetY:s}=w(e),l=m.current.getContext("2d");l&&(l.beginPath(),l.moveTo(j.x,j.y),l.lineTo(t,s),l.stroke(),y({x:t,y:s}))},k=e=>{e.preventDefault(),h(!1)},S=()=>{let e=m.current;if(!e)return;let t=e.getContext("2d");t&&(t.clearRect(0,0,e.width,e.height),x(null))},C=()=>{let e=m.current;e&&x(e.toDataURL("image/png"))},I=async()=>{if(f){let e=(0,u.rw)(f);v(!0);try{let l=Date.now()+"-"+Math.random().toString(36).substring(2,8),a="signature-".concat(l,".png"),r=new FormData;r.append("files[0].file",e,a),r.append("files[0].identifier",null==t?void 0:t.identifier);let o=await d.Z.post("".concat(i.BASE_API,"/kyc/").concat(s,"/upload"),r,{headers:{"Content-Type":"multipart/form-data"}});200===o.status&&(console.log("Signature uploaded successfully",o.data),n(null==o?void 0:o.data[a]))}catch(e){console.error("Error uploading signature:",e)}finally{v(!1),c(!1)}}};return(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("text",{className:"text-sm font-medium",children:[null==t?void 0:t.question," ",(null==t?void 0:t.required)&&(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 block",children:null==t?void 0:t.description}),a?(0,l.jsxs)("div",{className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("text",{className:"text-xs font-medium",children:"Signature uploaded"}),(0,l.jsx)("text",{className:"text-xs text-zinc-400 -mt-0.5 -mb-0.5",children:a})]}),(0,l.jsx)("text",{className:"text-xs font-medium bg-red-500 p-1.5 cursor-pointer rounded",children:"Remove"})]}):(0,l.jsx)("div",{onClick:()=>c(!0),className:"cursor-pointer hover:bg-[#ffffff40] w-full bg-[#ffffff20] text-sm mt-2 rounded-lg h-[45px] px-5 flex items-center justify-center",children:(0,l.jsx)("text",{className:"text-sm font-medium",children:"Open to Sign"})}),o&&(0,l.jsx)("div",{className:"w-full h-screen bg-[#000000]/80 fixed z-50 top-0 left-0 flex items-center justify-center",children:(0,l.jsxs)("div",{className:"bg-zinc-900 w-[50vh] h-[50vh] rounded-xl p-5 flex flex-col",children:[(0,l.jsx)("text",{className:"text-lg font-medium",children:"Sign Here"}),(0,l.jsx)("text",{className:"text-sm text-zinc-400",children:"Draw signature below and click save"}),(0,l.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-white/10 rounded-lg mt-4 overflow-hidden",children:(0,l.jsx)("canvas",{ref:m,width:500,height:300,onMouseDown:b,onMouseMove:N,onMouseUp:k,onMouseOut:k,onTouchStart:b,onTouchMove:N,onTouchEnd:k,className:"cursor-crosshair touch-none"})}),(0,l.jsxs)("div",{className:"w-full flex justify-end mt-5 gap-4 bottom-5 right-5",children:[(0,l.jsx)("button",{onClick:()=>{f?(x(null),S()):c(!1)},className:"bg-[#ffffff20] hover:bg-[#ffffff40] text-white w-[100px] text-sm rounded-lg h-[45px] px-5",children:f?"Clear":"Cancel"}),(0,l.jsx)("button",{onClick:()=>{f?I():C()},className:"bg-yellow-500 hover:bg-yellow-600 w-fit text-black text-sm rounded-lg h-[45px] px-5",children:g?"Saving...":f?"Save Signature":"Next"})]})]})})]})},g=e=>{let{missing:t,onClose:s,onGoTo:n}=e;return t.length?(0,l.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 animate-fadeIn",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:s}),(0,l.jsxs)("div",{className:"relative w-full max-w-md bg-[#161616] border border-zinc-800 rounded-2xl p-5 text-white",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("div",{className:"w-9 h-9 shrink-0 rounded-full bg-red-500/15 flex items-center justify-center",children:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),(0,l.jsx)("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("h2",{className:"text-base font-medium",children:[t.length," mandatory question",t.length>
11?"s":""," unanswered"]}),(0,l.jsx)("p",{className:"text-sm text-zinc-400 mt-0.5",children:"Answer and save these before submitting your KYC."})]})]}),(0,l.jsx)("div",{className:"mt-4 max-h-[50vh] overflow-y-auto space-y-2 pr-1",children:t.map((e,t)=>(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3 bg-[#ffffff0a] border border-zinc-800 rounded-lg p-3",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("p",{className:"text-xs text-zinc-500 truncate",children:[e.sectionName," ⢠",e.subName]}),(0,l.jsx)("p",{className:"text-sm mt-0.5",children:e.question})]}),(0,l.jsx)("button",{onClick:()=>n(e),className:"shrink-0 bg-yellow-500 hover:bg-yellow-600 text-black text-xs font-medium rounded-lg px-3 h-[32px]",children:"Go to question"})]},t))}),(0,l.jsx)("div",{className:"w-full flex justify-end mt-4",children:(0,l.jsx)("button",{onClick:s,className:"bg-[#ffffff20] hover:bg-[#ffffff30] text-white text-sm rounded-lg h-[40px] px-5",children:"Close"})})]})]}):null}},31484:function(e,t,s){s.d(t,{Bw:function(){return h},Ph:function(){return u},Ql:function(){return g},i4:function(){return x},ki:function(){return f}});var l=s(85893),n=s(67294),a=s(80415),r=s(51568),i=s(54098),o=s(3785),c=s(68643),d=s(58719);let u=a.fC;a.ZA;let f=a.B4,x=n.forwardRef((e,t)=>{let{className:s,children:n,...i}=e;return(0,l.jsxs)(a.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...i,children:[n,(0,l.jsx)(a.JO,{asChild:!0,children:(0,l.jsx)(r.Z,{className:"h-4 w-4 opacity-50"})})]})});x.displayName=a.xz.displayName;let m=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,l.jsx)(a.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...n,children:(0,l.jsx)(i.Z,{className:"h-4 w-4"})})});m.displayName=a.u_.displayName;let p=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,l.jsx)(a.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...n,children:(0,l.jsx)(r.Z,{className:"h-4 w-4"})})});p.displayName=a.$G.displayName;let h=n.forwardRef((e,t)=>{let{className:s,children:n,position:r="popper",sideOffset:i=6,...o}=e,u=(0,d.gD)();return(0,l.jsx)(a.h_,{container:u,children:(0,l.jsxs)(a.VY,{ref:t,sideOffset:i,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-[0_8px_24px_-4px_rgba(0,0,0,0.18),0_2px_6px_-2px_rgba(0,0,0,0.08)] ring-1 ring-foreground/5 will-change-transform","origin-[var(--radix-select-content-transform-origin)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1","data-[state=open]:duration-200 data-[state=closed]:duration-150","data-[state=open]:ease-[cubic-bezier(0.16,1,0.3,1)] data-[state=closed]:ease-out",s),position:r,...o,children:[(0,l.jsx)(m,{}),(0,l.jsx)(a.l_,{className:(0,c.cn)("p-1","popper"===r&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,l.jsx)(p,{})]})})});h.displayName=a.VY.displayName,n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,l.jsx)(a.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...n})}).displayName=a.__.displayName;let g=n.forwardRef((e,t)=>{let{className:s,children:n,...r}=e;return(0,l.jsxs)(a.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors duration-100 ease-out focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...r,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(a.wU,{className:"data-[state=checked]:animate-in data-[state=checked]:fade-in-0 data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150",children:(0,l.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(a.eT,{children:n})]})});g.displayName=a.ck.displayName,n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,l.jsx)(a.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",s),...n})}).displayName=a.Z0.displayName},19221:function(e,t,s){s.d(t,{t:function(){return a},Z:function(){return i}});var l=s(87066);async function n(){let e=localStorage.getItem("accessToken"),t=localStorage.getItem("refreshToken");if(!e||!t){localStorage.clear(),window.open("/","_self");return}let{exp:s}=JSON.parse(atob(e.split(".")[1])),l=await fetch(a+"/public/user/refresh-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:t})}).catch(e=>{console.log("REFRESH ERROR",e)}),n=await (null==l?void 0:l.json());n.accessToken?(localStorage.setItem("accessToken",n.accessToken),localStorage.setItem("refreshToken",n.refreshToken)):(window.open("/","_self"),console.log("couldn't refresh"))}let a="https://api.gnii.ai/api",r=l.Z.create({baseURL:a});r.interceptors.request.use(async e=>{try{await n();let t=localStorage.getItem("accessToken");return t&&(e.headers.Authorization="Bearer "+t),e}catch(e){return Promise.reject(e)}},e=>(console.log("axios request error >>>",e),Promise.reject(e))),r.interceptors.response.use(e=>e,async e=>{let t=e.config;if(401===e.response.status&&!t._retry){t._retry=!0;try{await n();let e=localStorage.getItem("accessToken");return e&&(l.Z.defaults.headers.common.Authorization="Bearer "+e,t.headers.Authorization="Bearer "+e),r(t)}catch(e){return console.log("Token refresh error >>>",e),Promise.reject(e)}}return Promise.reject(e)});var i=r},91237:function(e,t,s){s.r(t),s.d(t,{BASE_API:function(){return f},default:function(){return x}});var l=s(85893),n=s(21575),a=s(65222),r=s(67294),i=s(87066),o=s(58386),c=s(11163),d=s(9008),u=s.n(d);let f=s(34155).env.NEXT_PUBLIC_API_URL||"https://api.gnii.ai/api";function x(){let e=(0,c.useRouter)(),[t,s]=(0,r.useState)("institution"),[d,x]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(""),[v,j]=(0,r.useState)(""),[y,w]=(0,r.useState)("login"),[b,N]=(0,r.useState)({referenceID:"",code:""}),k=async()=>
1{if(m&&h){var e,s,l,n;x(!0),j("");try{let l=await i.Z.post(f+"/public/user/login",{email:m,password:h,type:t});(null===(e=l.data)||void 0===e?void 0:e.data)&&(N({...b,referenceID:null===(s=l.data)||void 0===s?void 0:s.data}),w("otp"))}catch(e){console.log(e),j((null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(l=n.data[0])||void 0===l?void 0:l.message)||"An error occurred")}finally{x(!1)}}else j("Please fill in all fields")},S=async()=>{if(b.code){x(!0),j("");try{await i.Z.post(f+"/public/user/otp/validate",{...b,otp:b.code}).then(s=>{var l,n,a;(null==s?void 0:null===(l=s.data)||void 0===l?void 0:l.accessToken)&&(localStorage.setItem("user",JSON.stringify(null==s?void 0:s.data)),localStorage.setItem("accessToken",null==s?void 0:null===(n=s.data)||void 0===n?void 0:n.accessToken),localStorage.setItem("refreshToken",null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.refreshToken),setTimeout(()=>{"institution"===t?e.replace("/kyc/institution"):e.replace("/kyc/individual")},500))}).catch(e=>{var t,s,l,n;return console.log(e),j((null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data[0])||void 0===t?void 0:t.message)||"An error occurred"),null==e?void 0:null===(n=e.response)||void 0===n?void 0:null===(l=n.data[0])||void 0===l?void 0:l.message})}catch(e){var s,l;console.log(e),j((null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(s=l.data[0])||void 0===s?void 0:s.message)||"An error occurred")}finally{x(!1)}}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(u(),{children:[(0,l.jsxs)("title",{children:["Login"," - Black Star Group"]}),(0,l.jsx)("meta",{name:"description",content:"Login"}),(0,l.jsx)("meta",{property:"og:title",content:"Login- Black Star Group"}),(0,l.jsx)("meta",{property:"og:description",content:"Login- Black Star Group"}),(0,l.jsx)("meta",{property:"og:image",content:"/cover.png"}),(0,l.jsx)("meta",{property:"og:type",content:"website"}),(0,l.jsx)("meta",{property:"og:url",content:"https://blackstargroup.ai"})]}),(0,l.jsx)(n.Z,{}),(0,l.jsx)(a.Z,{children:(0,l.jsx)("div",{className:"w-full h-[88vh] text-white animate-fadeIn transition-all grid grid-cols-1 gap-5",children:(0,l.jsx)("div",{className:"px-8 flex flex-col justify-start items-center",children:"otp"===y?(0,l.jsxs)("div",{className:"w-full xl:w-[500px] flex items-center flex-col mt-5 h-full items-center justify-center",children:[(0,l.jsx)("text",{className:"text-2xl",children:"Enter OTP"}),(0,l.jsx)("text",{className:"text-sm text-zinc-400 mt-1 text-center",children:"Enter the OTP sent to your email to continue"}),(0,l.jsx)("div",{className:"w-full flex flex-col mt-5 items-center justify-center",children:(0,l.jsx)(o.Z,{value:b.code,onChange:e=>N({...b,code:e}),numInputs:6,renderSeparator:(0,l.jsx)("span",{className:"w-2.5"}),renderInput:e=>(0,l.jsx)("input",{...e,className:"text-base text-zinc-400 mt-1 w-full h-[45px] min-w-[45px] rounded-lg border border-zinc-500 bg-transparent px-3"})})}),v&&(0,l.jsx)("div",{className:"text-red-500 text-sm mt-2",children:v}),(0,l.jsx)("div",{onClick:S,className:"mt-5 w-[50%] flex justify-center px-8 ".concat(d?"bg-[#be9a2b80]":"bg-[#be9a2b]"," py-2 rounded-xl text-black cursor-pointer"),children:d?"Loading...":"Verify"})]}):(0,l.jsxs)("div",{className:"w-full xl:w-[500px] flex items-center flex-col mt-5 h-full items-center justify-center",children:[(0,l.jsx)("text",{className:"text-2xl",children:"Welcome, Login to continue!"}),(0,l.jsxs)("text",{className:"text-sm text-zinc-400 mt-1 text-center",children:["Enter your email and password to login as an ",t]}),(0,l.jsxs)("div",{className:"w-full flex flex-col mt-5",children:[(0,l.jsx)("text",{className:"text-sm text-zinc-400 mt-1",children:"Email"}),(0,l.jsx)("input",{type:"email",value:m,onChange:e=>p(e.target.value),className:"text-base text-white bg-[#ffffff10] mt-1 w-full h-[45px] rounded-lg px-3 outline-none"})]}),(0,l.jsxs)("div",{className:"w-full flex flex-col mt-2",children:[(0,l.jsx)("text",{className:"text-sm text-zinc-400 mt-1",children:"Password"}),(0,l.jsx)("input",{type:"password",value:h,onChange:e=>g(e.target.value),className:"text-base text-white bg-[#ffffff10] mt-1 w-full h-[45px] rounded-lg px-3 outline-none"})]}),v&&(0,l.jsx)("div",{className:"text-red-500 text-sm mt-2",children:v}),(0,l.jsx)("div",{onClick:k,className:"mt-3 w-[50%] flex justify-center px-8 ".concat(d?"bg-[#be9a2b80]":"bg-[#be9a2b]"," py-2 rounded-xl text-black cursor-pointer"),children:d?"Loading...":"Log In"})]})})})})]})}}}]);
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.