1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,378731,e=>{"use strict";var s=e.i(843476),t=e.i(647163),a=e.i(271645),r=e.i(653145),l=e.i(994814),i=e.i(874946),o=e.i(23750),n=e.i(167881),c=e.i(470685),d=e.i(286536),m=e.i(737152),u=e.i(611053),x=e.i(672136),h=e.i(95187);let p=(0,h.createServerReference)("40eaa11da02a279d0da8c8d862e946094c393ea6cd",h.callServer,void 0,h.findSourceMapURL,"getUserByEmail");var g=e.i(618566),j=e.i(402824),b=e.i(362201),f=e.i(581949);let w=b.object({email:b.email({message:"Email is required!"})}),y=function(e){let{toggleForgotPasswordView:t}=e,d=(0,r.useForm)({resolver:(0,l.zodResolver)(w),defaultValues:{email:""}}),[m,u]=(0,a.useState)(!1),[x,h]=(0,a.useState)(void 0),[g,j]=(0,a.useTransition)(),b=async e=>{u(!0),j(()=>{p(e.email).then(async s=>{s.success&&h((await f.default.post("/api/email/password",e)).data),s.error&&(h(s),u(!1))}).catch(()=>{u(!1),h({error:"Oops! Something went wrong!"})})})};return(0,s.jsxs)("div",{className:"",children:[(0,s.jsxs)("h1",{className:"my-4 text-base pl-2 tracking-wide text-zinc-600",children:["Please enter your email address.",(0,s.jsx)("br",{})," We will send you an email to reset your password"]}),(0,s.jsx)(i.Form,{...d,children:(0,s.jsxs)("form",{onSubmit:d.handleSubmit(b),className:"space-y-2",children:[(0,s.jsx)(i.FormField,{control:d.control,disabled:m,name:"email",render:({field:e})=>(0,s.jsxs)(i.FormItem,{children:[(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"[email protected]",type:"text",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(n.Button,{type:"button",variant:"link",className:"tracking-wider text-zinc-500 text-base py-2 cursor-pointer hover:underline",onClick:()=>t(!1),children:"Back to Login"}),(0,s.jsx)(c.default,{data:x}),(0,s.jsx)(n.Button,{size:"lg",variant:"blueTheme",disabled:m,type:"submit",className:"w-full text-base tracking-widest",children:"Send email"})]})})]})},N=function(){let e=(0,r.useForm)({resolver:(0,l.zodResolver)(u.SignInSchema),defaultValues:{email:"",password:""}}),[t,h]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),[v,F]=(0,a.useState)(void 0),k=(0,g.useRouter)(),C=(0,j.useAuthModal)(),{data:S}=x.authClient.useSession(),z=()=>{h(e=>!e)},I=async s=>{if(S)return void F({error:"You are already logged in!"});N(!0),F(void 0);let t=await p(s.email);if(t.error){N(!1),F(t);return}await x.authClient.signIn.email({email:s.email,password:s.password},{onSuccess:()=>{N(!1),e.reset(),C.onClose(),k.refresh()},onError:e=>{if(403===e.error.status){F({error:"Please verify your email address"}),N(!1);return}N(!1),F({error:`${e.error.message}`})}})};return(0,s.jsx)("div",{children:b?(0,s.jsx)(y,{toggleForgotPasswordView:f}):(0,s.jsx)(i.Form,{...e,children:(0,s.jsxs)("form",{onSubmit:e.handleSubmit(I),className:"grid grid-cols-1 gap-2",children:[(0,s.jsx)(i.FormField,{control:e.control,disabled:w,name:"email",render:({field:e})=>(0,s.jsxs)(i.FormItem,{children:[(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Email",type:"text",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(i.FormField,{control:e.control,disabled:w,name:"password",render:({field:e})=>(0,s.jsxs)(i.FormItem,{className:"relative ",children:[(0,s.jsx)("span",{className:"absolute right-1 top-2 cursor-pointer z-10",onClick:z,children:t?(0,s.jsx)(d.Eye,{className:" size-5"}):(0,s.jsx)(m.EyeOffIcon,{className:" size-5"})}),(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Your password",type:t?"text":"password",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(n.Button,{type:"button",variant:"link",className:"tracking-wider w-[200px] text-zinc-800 text-sm cursor-pointer pl-0",onClick:()=>f(!0),children:"Forgot your password?"}),(0,s.jsx)(c.default,{data:v}),(0,s.jsx)(n.Button,{size:"lg",variant:"blueTheme",disabled:w,type:"submit",className:"w-full text-base tracking-widest",children:w?"Loading...":"Login"})]})})})};var v=e.i(350377);let F=function(){let e=(0,r.useForm)({resolver:(0,l.zodResolver)(u.SignUpSchema),defaultValues:{name:"",email:"",password:"",confirmPassword:""}}),[t,h]=(0,a.useState)(void 0),[p,j]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1),w=(0,g.useRouter)(),{data:y}=x.authClient.useSession(),N=()=>{j(e=>!e)},F=async s=>{h(void 0),f(!0),y&&(h({error:"You must logout first!"}),w.push("/account")),await x.authClient.signUp.email({name:s.name.trim(),email:s.email.trim(),password:s.password},{onSuccess:async s=>{e.reset(),h({success:"Success. Verification email sent, you may also want to check your spam folder if you do not find it in your inbox"}
1),await (0,v.updateUserName)(s.data.user.id,s.data.user.name,!0)},onError:e=>{f(!1),h({error:`${e.error.message}`})}})};return(0,s.jsx)("div",{children:(0,s.jsx)(i.Form,{...e,children:(0,s.jsxs)("form",{onSubmit:e.handleSubmit(F),className:"grid grid-cols-1 gap-2 tracking-wide text-base lg:text-lg",children:[(0,s.jsx)(i.FormField,{control:e.control,disabled:b,name:"email",render:({field:e})=>(0,s.jsxs)(i.FormItem,{children:[(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Email",type:"text",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(i.FormField,{control:e.control,disabled:b,name:"name",render:({field:e})=>(0,s.jsxs)(i.FormItem,{children:[(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Name",type:"text",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(i.FormField,{control:e.control,disabled:b,name:"password",render:({field:e})=>(0,s.jsxs)(i.FormItem,{className:"relative ",children:[(0,s.jsx)("span",{className:"absolute right-1 top-2 cursor-pointer z-10",onClick:N,children:p?(0,s.jsx)(d.Eye,{className:" size-5"}):(0,s.jsx)(m.EyeOffIcon,{className:" size-5"})}),(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Your password",type:p?"text":"password",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})}),(0,s.jsx)(i.FormField,{control:e.control,disabled:b,name:"confirmPassword",render:({field:e})=>(0,s.jsxs)(i.FormItem,{className:"relative",children:[(0,s.jsx)("span",{className:"absolute right-1 top-2 cursor-pointer z-10",onClick:N,children:p?(0,s.jsx)(d.Eye,{className:" size-5"}):(0,s.jsx)(m.EyeOffIcon,{className:" size-5"})}),(0,s.jsx)(i.FormControl,{className:"tracking-wider text-base lg:text-lg",children:(0,s.jsx)(o.Input,{...e,placeholder:"Confirm your password",type:p?"text":"password",className:"text-zinc-700"})}),(0,s.jsx)(i.FormMessage,{})]})})," ",(0,s.jsx)(c.default,{data:t}),(0,s.jsx)(n.Button,{disabled:b,size:"lg",variant:"blueTheme",type:"submit",className:"w-full text-base tracking-widest",children:"Sign Up"})]})})})};var k=e.i(269035),C=e.i(940141);function S(e){return(0,C.GenIcon)({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(e)}var z=e.i(846696);let I=function(){let[e,t]=(0,a.useState)(!1),{data:r}=x.authClient.useSession(),l=(0,j.useAuthModal)(),i=(0,g.usePathname)(),o=async()=>{e||r?z.toast.success("You are already logged in"):(t(!0),await x.authClient.signIn.social({provider:"google",callbackURL:i||"/",errorCallbackURL:"/auth/error",newUserCallbackURL:"/account/profile?new-user=1"},{onSuccess:()=>{l.onClose()},onError:()=>{z.toast.error("Uh oh! something went wrong"),t(!1)}}))};return(0,s.jsxs)("div",{onClick:o,className:"h-10 font-semibold md:text-base text-sm tracking-wider border rounded-md mb-5 flex items-center justify-center px-2 gap-4 border-yellow-600 cursor-pointer ",children:[(0,s.jsx)(S,{className:"w-4 h-4 a"}),(0,s.jsx)("span",{children:e?"Loading...":"Continue with Google"})]})},M=(0,e.i(475254).default)("mail-check",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);var E=e.i(71829),R=e.i(522016),U=e.i(590106);e.s(["default",0,function(){let[e,r]=(0,a.useState)(!0),l=()=>{r(e=>!e)};return(0,s.jsxs)("div",{className:"h-[80vh] pt-12 w-full overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-center h-[35px] border-b cursor-pointer mb-8",children:[(0,s.jsx)("div",{onClick:l,className:(0,t.cn)("w-full font-semibold tracking-widest text-base uppercase flex items-center justify-center border-b-2 border-b-transparent h-full text-zinc-400",e&&" border-b-sky-700 text-zinc-700"),children:"Login"}),(0,s.jsx)("div",{onClick:l,className:(0,t.cn)("w-full font-semibold tracking-widest text-base uppercase flex items-center justify-center border-b-2 border-b-transparent h-full text-zinc-400",!e&&" border-b-sky-700 text-zinc-700"),children:"Register"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(I,{}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-4 overflow-hidden mb-5 text-base tracking-wider",children:[(0,s.jsx)(k.Separator,{}),"OR",(0,s.jsx)(k.Separator,{})]}),e?(0,s.jsx)(N,{}):(0,s.jsx)(F,{}),(0,s.jsxs)("div",{className:"text-base tracking-wide pt-5 text-black font-semibold flex items-center justify-center gap-2 flex-wrap",children:[(0,s.jsx)(M,{className:"w-4 h-4"})," Contact:"," ",(0,s.jsx)(R.default,{href:"mailto:[email protected]",className:"text-yellow-700 underline underline-offset-4",prefetch:!1,children:E.CONTACT_EMAIL})]}),(0,s.jsxs)("div",{className:"text-base tracking-wide pt-2 text-black font-semibold flex items-center justify-center gap-2 flex-wrap",children:[(0,s.jsx)(U.BsWhatsapp,{className:"w-4 h-4"}),(0,s.jsxs)("p",{className:"",children:[E.CONTACT_NUMBER," / ",E.WHATSAPP_USERNAME]})]})]})]})}],378731)}]);
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.