(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{8372:function(e,t,n){Promise.resolve().then(n.bind(n,1597)),Promise.resolve().then(n.t.bind(n,231,23))},1597:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var i=n(7437),l=n(6463),s=n(998),a=n(5285),r=n(2265),d=e=>{let{provider:t}=e;return"github"===t?(0,i.jsxs)("svg",{...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"GitHub icon"}),(0,i.jsx)("path",{fill:"#fff",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}):"github-dark"===t?(0,i.jsxs)("svg",{...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"GitHub dark icon"}),(0,i.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}):"google"===t?(0,i.jsxs)("svg",{...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("title",{children:"Google icon"}),(0,i.jsx)("path",{fill:"#EA4335 ",d:"M5.26620003,9.76452941 C6.19878754,6.93863203 8.85444915,4.90909091 12,4.90909091 C13.6909091,4.90909091 15.2181818,5.50909091 16.4181818,6.49090909 L19.9090909,3 C17.7818182,1.14545455 15.0545455,0 12,0 C7.27006974,0 3.1977497,2.69829785 1.23999023,6.65002441 L5.26620003,9.76452941 Z"}),(0,i.jsx)("path",{fill:"#34A853",d:"M16.0407269,18.0125889 C14.9509167,18.7163016 13.5660892,19.0909091 12,19.0909091 C8.86648613,19.0909091 6.21911939,17.076871 5.27698177,14.2678769 L1.23746264,17.3349879 C3.19279051,21.2936293 7.26500293,24 12,24 C14.9328362,24 17.7353462,22.9573905 19.834192,20.9995801 L16.0407269,18.0125889 Z"}),(0,i.jsx)("path",{fill:"#4A90E2",d:"M19.834192,20.9995801 C22.0291676,18.9520994 23.4545455,15.903663 23.4545455,12 C23.4545455,11.2909091 23.3454545,10.5272727 23.1818182,9.81818182 L12,9.81818182 L12,14.4545455 L18.4363636,14.4545455 C18.1187732,16.013626 17.2662994,17.2212117 16.0407269,18.0125889 L19.834192,20.9995801 Z"}),(0,i.jsx)("path",{fill:"#FBBC05",d:"M5.27698177,14.2678769 C5.03832634,13.556323 4.90909091,12.7937589 4.90909091,12 C4.90909091,11.2182781 5.03443647,10.4668121 5.26620003,9.76452941 L1.23999023,6.65002441 C0.43658717,8.26043162 0,10.0753848 0,12 C0,13.9195484 0.444780743,15.7301709 1.23746264,17.3349879 L5.27698177,14.2678769 Z"})]}):null},o=()=>{let[e,t]=(0,r.useState)(""),n=(0,l.useSearchParams)(),o=n.get("mode"),c=n.get("devices"),u=n.get("callbackUrl")||`/account${o&&c?`?mode=${o}&devices=${c}`:""}`,m=n.get("error")||null,x=null;async function h(e){e.preventDefault();let n=new FormData(e.target).get("email");(0,a.vV)(n)?((0,s.signIn)("resend",{email:n,callbackUrl:u}),t("")):t("invalid-email")}return"OAuthAccountNotLinked"===m?x="This account is already linked to another provider.":m&&(x="Unable to authenticate. Try again."),(0,i.jsxs)("div",{className:"flex flex-col divide-y divide-slate-200 dark:divide-slate-800 gap-y-8",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center gap-y-8",children:[!!m&&(0,i.jsx)("div",{className:"border border-red-400 p-3 rounded-md bg-red-600 text-slate-50 text-xs font-bold",children:x||"Unable to authenticate. Try again."}),(0,i.jsx)("h2",{className:"font-black text-2xl lg:text-3xl",children:"Log in"}),(0,i.jsxs)("button",{className:"flex items-center gap-x-4 px-4 py-3 bg-slate-200 dark:bg-slate-800 rounded-lg",onClick:()=>(0,s.signIn)("google",{callbackUrl:u}),children:[(0,i.jsx)(d,{provider:"google",className:"w-4 h-4","aria-hidden":"true"}),(0,i.jsx)("span",{className:"font-bold text-sm",children:"Continue with Google"})]}),(0,i.jsxs)("button",{className:"flex items-center gap-x-4 px-4 py-3 bg-slate-200 dark:bg-slate-800 rounded-lg",onClick:()=>(0,s.signIn)("github",{callbackUrl:u}),children:[(0,i.jsx)(d,{provider:"github-dark",className:"w-4 h-4 dark:hidden","aria-hidden":"true"}),(0,i.jsx)(d,{provider:"github",className:"w-4 h-4 hidden dark:block","aria-hidden":"true"}),(0,i.jsx)("span",{className:"font-bold text-sm",children:"Continue with Github"})]})]}),(0,i.jsxs)("form",{onSubmit:h,className:"flex flex-col gap-y-3 pt-6",children:[(0,i.jsx)("label",{htmlFor:"email",className:"text-sm",children:"Email"}),(0,i.jsx)("input",{id:"email",name:"email",placeholder:"Enter your email address...",className:"text-sm border border-slate-200 dark:border-slate-800 bg-slate-100 dark:bg-slate-900 rounded-md"}),"invalid-email"===e&&(0,i.jsx)("span",{className:"text-red-400 text-sm",children:"Not a valid email address"}),(0,i.jsx)("button",{className:"font-bold text-sm text-slate-50 bg-blue-600 px-4 py-3 rounded-md ",children:"Continue with Email"})]})]})}},3146:function(e,t,n){"use strict";n.d(t,{XS:function(){return l},m_:function(){return a},pl:function(){return s},qo:function(){return i}});let i=[{id:"arm64",browser:"arm",name:"Apple Silicon",artifact:"arm64"},{id:"x64",browser:"x86",name:"Intel"}],l="clacker",s=14,a={min:1,max:5,default:1,pricing:{amount:89,schedule:[{to:3,amount:49},{to:5,amount:39},{to:999999999,amount:29}]}}},5285:function(e,t,n){"use strict";n.d(t,{x6:function(){return s},vV:function(){return i}});let i=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);var l=n(3146);let s=(e,t)=>{let n=l.m_.pricing.amount*e,i=0;for(let t=0;t<e;t+=1)i+=0===t?l.m_.pricing.amount:l.m_.pricing.schedule.find(e=>t<e.to)?.amount;return{price:(i=i%10==9?i:i+10-i%10-1)-(t?s(t)?.price:0),listPrice:n-(t?s(t)?.listPrice:0),savings:t?0:n-i}};n(4346),n(357).env.CLOUD_TOKEN_SECRET}},function(e){e.O(0,[218,231,998,132,971,23,744],function(){return e(e.s=8372)}),_N_E=e.O()}]);