(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[577],{61008:function(e,l,n){"use strict";var s,a,i,t,c=n(67294);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var n=arguments[l];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}l.Z=function(e){return c.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16"},e),s||(s=c.createElement("path",{fill:"#4285F4",d:"M15.5 8.155c0-.575-.047-.995-.15-1.43H8.644v2.597h3.936c-.08.646-.508 1.618-1.46 2.271l-.014.087 2.12 1.61.148.014c1.349-1.22 2.127-3.017 2.127-5.149"})),a||(a=c.createElement("path",{fill:"#34A853",d:"M8.643 15c1.929 0 3.548-.622 4.73-1.696l-2.254-1.71c-.603.412-1.412.7-2.476.7a4.29 4.29 0 0 1-4.063-2.91l-.084.007-2.205 1.673-.029.078A7.15 7.15 0 0 0 8.643 15"})),i||(i=c.createElement("path",{fill:"#FBBC05",d:"M4.58 9.384A4.2 4.2 0 0 1 4.342 8c0-.482.087-.949.23-1.384l-.004-.093-2.232-1.7-.073.035A6.9 6.9 0 0 0 1.5 8c0 1.128.278 2.193.762 3.142z"})),t||(t=c.createElement("path",{fill:"#EB4335",d:"M8.643 3.707c1.341 0 2.246.567 2.762 1.042l2.016-1.929C12.183 1.692 10.57 1 8.643 1a7.15 7.15 0 0 0-6.38 3.858l2.309 1.758a4.31 4.31 0 0 1 4.071-2.91"})))}},70149:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/sign-in",function(){return n(5119)}])},5119:function(e,l,n){"use strict";n.r(l),n.d(l,{__N_SSP:function(){return v}});var s=n(85893),a=n(71672),i=n(56312),t=n(33793),c=n(9008),r=n.n(c),u=n(11163),o=n(87536),d=n(1604),h=n(61008),m=n(44753),f=n(10996),x=n(72666),g=n(65644),j=n(30938),p=n(3372);let w=d.z.object({email:d.z.string().email().max(50,{message:"Email must be less than 50 characters"})});var v=!0;l.default=()=>{let e=(0,u.useRouter)(),l=p.h.authProcedureRouter.SignInWithMagicLink.useMutation(),n=(0,o.cI)({resolver:(0,i.F)(w),defaultValues:{email:""}}),c=async n=>{await l.mutateAsync({email:n.email}).catch(e=>(0,g.Eo)(null==e?void 0:e.message))&&e.push({pathname:j.S.CheckEmail.url,query:{email:n.email}})},d=async()=>await t.g.federatedSignIn({provider:a.JG.Google});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r(),{children:(0,s.jsx)("title",{children:"Sign-in"})}),(0,s.jsxs)("div",{className:"bg-theme flex flex-row",children:[(0,s.jsx)("div",{className:"hidden w-1/2 flex-col md:flex",children:(0,s.jsx)(m.HG,{})}),(0,s.jsxs)("div",{className:"flex h-screen w-full flex-col md:w-1/2",children:[(0,s.jsx)("div",{className:"flex justify-end pr-9 pt-8",children:(0,s.jsx)(x.zx,{variant:"ghost",onClick:()=>e.push(j.S.SignUp.url),children:"Sign up"})}),(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1 text-center",children:[(0,s.jsx)("h3",{children:"Sign in"}),(0,s.jsx)("p",{className:"muted",children:"Please sign-in below using your Google account or via a magic link."})]}),(0,s.jsxs)("div",{className:"flex w-full max-w-[360px] flex-col items-center justify-center gap-6",children:[(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(f.l0,{...n,children:(0,s.jsxs)("form",{onSubmit:n.handleSubmit(c),className:"flex flex-col gap-2",children:[(0,s.jsx)(x.II,{placeholder:"Enter your email address",name:"email"}),(0,s.jsx)(x.zx,{type:"submit",isLoading:l.isPending,children:"Get magic link"}),(0,s.jsx)("p",{className:"muted text-center",children:"We'll email you a magic link to sign-in."})]})})}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3 self-stretch overflow-hidden",children:[(0,s.jsx)(x.Z0,{orientation:"horizontal",className:"m-auto flex-auto self-stretch"}),(0,s.jsx)("p",{className:"muted whitespace-nowrap",children:"Or continue with"}),(0,s.jsx)(x.Z0,{orientation:"horizontal",className:"m-auto flex-auto self-stretch"})]}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsxs)(x.zx,{variant:"outline",className:"flex w-full gap-2",size:"default",onClick:()=>d(),children:[(0,s.jsx)(h.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Google"})]})})]})]})]})]})]})}},56249:function(){}},function(e){e.O(0,[14,888,774,179],function(){return e(e.s=70149)}),_N_E=e.O()}]);