PageSourceSearch

https://app.snapglyph.com/_next/static/immutable/chunks/1kincjrlggrb3.js

js snapglyph.com collected 2026-10-02 00:56:10 UTC 16,045 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="2a57fd8f-6ad1-5d89-b28d-08b2b6f83ff3")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,885894,e=>{"use strict";let s=(0,e.i(380227).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",0,s],885894)},298742,e=>{"use strict";let s=(0,e.i(380227).default)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);e.s(["Mail",0,s],298742)},882085,e=>{"use strict";let s=(0,e.i(380227).default)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,s],882085)},519491,e=>{"use strict";var s=e.i(307987),t=e.i(687740),a=e.i(264626),r=e.i(578938),l=e.i(882973),i=e.i(299322),n=e.i(984618),c=e.i(519455),o=e.i(793479),d=e.i(110204),u=e.i(515288),h=e.i(298742),m=e.i(982020),x=e.i(342302),p=e.i(882085),f=e.i(622177),j=e.i(885894),g=e.i(820917),w=e.i(575242),y=e.i(444131),v=e.i(604888),N=e.i(857034);function C(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),C=(0,n.useTranslations)("auth.login"),b=(0,n.useTranslations)("auth.errors"),k=(0,n.useTranslations)("auth.twoFactor"),S=(0,n.useTranslations)("footer"),F=t.get("callbackUrl")||"/dashboard",L=t.get("error"),A="code"===t.get("response_type")&&t.get("sig")?`/api/auth/oauth2/authorize?${t.toString()}`:null,[I,R]=(0,a.useState)(""),[T,B]=(0,a.useState)(""),[E,_]=(0,a.useState)(""),[M,P]=(0,a.useState)(!1),[z,U]=(0,a.useState)(null),[D,H]=(0,a.useState)(!1),[G,K]=(0,a.useState)(null),[q,O]=(0,a.useState)(!1),[V,W]=(0,a.useState)(!1),[Z,Q]=(0,a.useState)(!1),[$,Y]=(0,a.useState)(!1),J="0x4AAAAAACF7zGLuo-Fx-ZF5",X=()=>(0,N.safeInternalRedirect)(F,"/dashboard"),ee=()=>{if(A){window.location.href=A;return}e.push(X())};(0,a.useEffect)(()=>{if(!window.PublicKeyCredential)return;let e=!1;return r.authClient.signIn.passkey({autoFill:!0}).then(s=>{e||!s||s.error||ee()}).catch(()=>{}),()=>{e=!0}},[]);let es=async()=>{Q(!0),U(null);try{let{error:e}=await r.authClient.signIn.passkey();e?U(C("passkeyFailed")):ee()}catch(e){console.error("Passkey sign-in exception:",e),U(C("passkeyFailed"))}finally{Q(!1)}},et=async()=>{if(!I)return void U(C("magicLinkNeedEmail"));O(!0),U(null);try{let{error:e}=await r.authClient.signIn.magicLink({email:I,callbackURL:A??X()},{headers:G?{"x-captcha-response":G}:{}});e?.status===429?U(C("tooManyRequests")):e?.code==="SSO_REQUIRED"?U(C("ssoRequired")):e&&e.message?.toLowerCase().includes("captcha")?U(C("captchaFailed")):W(!0)}catch(e){console.error("Magic link exception:",e),W(!0)}finally{O(!1)}},ea=async()=>{if(!I)return void U(C("ssoNeedEmail"));Y(!0),U(null);try{let{error:e}=await r.authClient.signIn.sso({email:I,callbackURL:A??X()});e&&U(C("ssoNoProvider"))}catch(e){console.error("SSO sign-in exception:",e),U(C("ssoNoProvider"))}finally{Y(!1)}},er=async e=>{e.preventDefault(),P(!0),U(null);try{if(D){let e=E.trim(),{error:s}=/^\d{6}$/.test(e)?await r.authClient.twoFactor.verifyTotp({code:e}):await r.authClient.twoFactor.verifyBackupCode({code:e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase()});s?U(429===s.status?k("tooManyAttempts"):k("invalidCode")):ee();return}let{data:e,error:s}=await r.authClient.signIn.email({email:I,password:T},{headers:G?{"x-captcha-response":G}:{}});if(s){let e=s.message??"";"SSO_REQUIRED"===s.code?U(C("ssoRequired")):"BANNED_USER"===s.code||e.includes("disabled")||e.includes("locked")?U(e):e.toLowerCase().includes("captcha")?U("Security verification failed. Please try again."):U(b("invalidCredentials"))}else e&&"twoFactorRedirect"in e&&e.twoFactorRedirect?(H(!0),U(null)):ee()}catch(e){console.error("SignIn exception:",e),U("An error occurred. Please try again.")}finally{P(!1)}},el=z||function(e){switch(e){case"CredentialsSignin":return"Invalid email or password";case"OAuthAccountNotLinked":return"This email is already registered with a different sign-in method";case"AccessDenied":return"Access denied. Please try again.";default:return e?"An error occurred during sign in":null}}(L);return V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.CardHeader,{className:"space-y-1 text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-primary/10",children:(0,s.jsx)(h.Mail,{className:"h-8 w-8 text-primary"})})}),(0,s.jsx)(u.CardTitle,{className:"text-2xl",children:C("magicLinkSentTitle")}),(0,s.jsx)(u.CardDescription,{children:C("magicLinkSentDescription",{email:I})})]}),(0,s.jsx)(u.CardContent,{children:(0,s.jsx)("p",{className:"text-sm text-center text-muted-foreground",children:C("magicLinkSentHint")})}),(0,s.jsx)(u.CardFooter,{children:(0,s.jsxs)(c.Button,{variant:"ghost",className:"w-full",onClick:()=>{W(!1),U(null)},children:[(0,s.jsx)(f.ArrowLeft,{className:"mr-2 h-4 w-4"}),C("backToSignIn")]})})]}):D?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.CardHeader,{className:"space-y-1 text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-primary/10",children:(0,s.jsx)(p.ShieldCheck,{className:"h-8 w-8 text-primary"})})}),(0,s.jsx)(u.CardTitle,{className:"text-2xl",children:k("title")}),(0,s.jsx)(u.CardDescription,{children:k("description")})]}),(0,s.jsxs)(u.CardContent,{className:"space-y-4",children:[el&&(0,s.jsxs)("div",{className:"flex items-center gap-2 p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:[(0,s.jsx)(x.AlertCircle,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:el})]}),(0,s.jsxs)("form",{onSubmit:er,className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(d.Label,{htmlFor:"totpCode",children:k("code")}),(0,s.jsx)(o.Input,{id:"totpCode",type:"text",inputMode:"numeric",pattern:"[0-9A-Za-z]*",placeholder:k("codePlaceholder"),value:E,onChange:e=>_(e.target.value),required:!0,autoComplete:"one-time-code",disabled:M,autoFocus:!0,className:"text-center text-lg tracking-widest"})]}),(0,s.jsx)(c.Button,{type:"submit",className:"w-full",disabled:M||!E,children:M?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),k("verify"),"..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.ShieldCheck,{className:"mr-2 h-4 w-4"}),k("verify")]})})]})]}),(0,s.jsx)(u.CardFooter,{children:(0,s.jsxs)(c.Button,{variant:"ghost",className:"w-full",onClick:()=>{H(!1),_(""),U(null)},disabled:M,children:[(0,s.jsx)(f.ArrowLeft,{className:"mr-2 h-4 w-4"}),C("signIn")]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.CardHeader,{className:"space-y-1 text-center",children:[(0,s.jsx)("div",{className:"flex justify-center mb-4",children:(0,s.jsx)(y.default,{src:"/logo.svg",alt:"SnapGlyph",width:180,height:44,priority:!0})}),(0,s.jsx)(u.CardTitle,{className:"text-2xl",children:C("title")}),(0,s.jsx)(u.CardDescription,{children:C("title")})]}),(0,s.jsxs)(u.CardContent,{className:"space-y-4",children:[el&&(0,s.jsxs)("div",{className:"flex items-center gap-2 p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:[(0,s.jsx)(x.AlertCircle,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:el})]}),(0,s.jsxs)("form",{onSubmit:er,className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(d.Label,{htmlFor:"email",children:C("email")}),(0,s.jsx)(o.Input,{id:"email",type:"email",placeholder:"[email protected]",value:I,onChange:e=>R(e.target.value),required:!0,autoComplete:"email webauthn",disabled:M})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(d.Label,{htmlFor:"password",children:C("password")}),(0,s.jsx)(i.default,{href:"/auth/forgot-password",className:"text-sm text-muted-foreground hover:text-primary",children:C("forgotPassword")})]}),(0,s.jsx)(o.Input,{id:"password",type:"password",placeholder:C("password"),value:T,onChange:e=>B(e.target.value),required:!0,autoComplete:"current-password",disabled:M})]}),J&&(0,s.jsx)(v.Turnstile,{siteKey:J,onVerify:K,onExpire:()=>K(null),onError:()=>K(null),theme:"light"}),(0,s.jsx)(c.Button,{type:"submit",className:"w-full",disabled:M||!!(J&&!G),children:M?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),C("signIn"),"..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.Mail,{className:"mr-2 h-4 w-4"}),C("signIn")]})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,s.jsx)("span",{className:"w-full border-t"})}),(0,s.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,s.jsx)("span",{className:"bg-card px-2 text-muted-foreground",children:C("orContinueWith")})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)(c.Button,{variant:"outline",className:"w-full",onClick:()=>r.authClient.signIn.social({provider:"google",callbackURL:A??X()}),disabled:M,children:[(0,s.jsx)(g.GoogleIcon,{className:"mr-2 h-4 w-4"}),"Google"]}),(0,s.jsxs)(c.Button,{variant:"outline",className:"w-full",onClick:()=>r.authClient.signIn.social({provider:"github",callbackURL:A??X()}),disabled:M,children:[(0,s.jsx)(w.GitHubIcon,{className:"mr-2 h-4 w-4"}),"GitHub"]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)(c.Button,{type:"button",variant:"outline",className:"w-full",onClick:es,disabled:M||Z,children:[Z?(0,s.jsx)(m.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):(0,s.jsx)(j.KeyRound,{className:"mr-2 h-4 w-4"}),C("signInWithPasskey")]}),(0,s.jsxs)(c.Button,{type:"button",variant:"outline",className:"w-full",onClick:et,disabled:M||q||!!(J&&!G),children:[q?(0,s.jsx)(m.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):(0,s.jsx)(h.Mail,{className:"mr-2 h-4 w-4"}),C("signInWithEmailLink")]}),(0,s.jsxs)(c.Button,{type:"button",variant:"outline",className:"w-full",onClick:ea,disabled:M||$,children:[$?(0,s.jsx)(m.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):(0,s.jsx)(p.ShieldCheck,{className:"mr-2 h-4 w-4"}),C("signInWithSso")]})]})]}),(0,s.jsxs)(u.CardFooter,{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"w-full p-4 bg-muted/50 rounded-lg border border-border/50",children:[(0,s.jsx)("p",{className:"text-sm text-center text-muted-foreground mb-3",children:C("noAccount")}
2),(0,s.jsx)(i.default,{href:"/auth/signup",className:"block",children:(0,s.jsx)(c.Button,{variant:"outline",className:"w-full",children:C("signUp")})})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:S("copyright",{year:new Date().getFullYear()})})]})]})}function b(){let e,a=(0,t.c)(1);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsx)(m.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),a[0]=e):e=a[0],e}e.s(["default",0,function(){let e,r=(0,t.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:(0,s.jsx)(u.Card,{className:"w-full max-w-md",children:(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(b,{}),children:(0,s.jsx)(C,{})})})}),r[0]=e):e=r[0],e}])},604888,e=>{"use strict";var s=e.i(307987),t=e.i(687740),a=e.i(264626);let r="idle";e.s(["Turnstile",0,function(e){let l,i,n,c,o,d=(0,t.c)(12),{siteKey:u,onVerify:h,onError:m,onExpire:x,theme:p,size:f,appearance:j}=e,g=void 0===p?"auto":p,w=void 0===f?"normal":f,y=void 0===j?"always":j,v=(0,a.useRef)(null),N=(0,a.useRef)(null),C=(0,a.useRef)(h),b=(0,a.useRef)(m),k=(0,a.useRef)(x);return d[0]!==m||d[1]!==x||d[2]!==h?(l=()=>{C.current=h,b.current=m,k.current=x},i=[h,m,x],d[0]=m,d[1]=x,d[2]=h,d[3]=l,d[4]=i):(l=d[3],i=d[4]),(0,a.useEffect)(l,i),d[5]!==y||d[6]!==u||d[7]!==w||d[8]!==g?(n=()=>{let e=!0;return new Promise(e=>{if(window.turnstile){r="loaded",e();return}if("loading"===r){window.turnstileCallbacks=window.turnstileCallbacks||[],window.turnstileCallbacks.push(e);return}r="loading",window.turnstileCallbacks=[e],window.onTurnstileLoad=()=>{r="loaded";let e=window.turnstileCallbacks||[];window.turnstileCallbacks=[],e.forEach(e=>e())};let s=document.createElement("script");s.src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onTurnstileLoad",s.async=!0,s.defer=!0,document.head.appendChild(s)}).then(()=>{if(!e||!v.current||!window.turnstile)return;if(N.current){try{window.turnstile.remove(N.current)}catch{}N.current=null}let s={sitekey:u,callback:e=>C.current(e),theme:g,size:w,appearance:y};s["error-callback"]=()=>b.current?.(),s["expired-callback"]=()=>k.current?.();try{N.current=window.turnstile.render(v.current,s)}catch(e){console.error("Failed to render Turnstile widget:",e)}}),()=>{if(e=!1,N.current&&window.turnstile){try{window.turnstile.remove(N.current)}catch{}N.current=null}}},c=[u,g,w,y],d[5]=y,d[6]=u,d[7]=w,d[8]=g,d[9]=n,d[10]=c):(n=d[9],c=d[10]),(0,a.useEffect)(n,c),d[11]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("div",{ref:v,className:"flex justify-center"}),d[11]=o):o=d[11],o}])},575242,e=>{"use strict";var s=e.i(307987),t=e.i(687740);e.s(["GitHubIcon",0,function(e){let a,r,l=(0,t.c)(3),{className:i}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}),l[0]=a):a=l[0],l[1]!==i?(r=(0,s.jsx)("svg",{className:i,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:a}),l[1]=i,l[2]=r):r=l[2],r}])},820917,e=>{"use strict";var s=e.i(307987),t=e.i(687740);e.s(["GoogleIcon",0,function(e){let a,r,l,i,n,c=(0,t.c)(6),{className:o}=e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),r=(0,s.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),l=(0,s.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),i=(0,s.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),c[0]=a,c[1]=r,c[2]=l,c[3]=i):(a=c[0],r=c[1],l=c[2],i=c[3]),c[4]!==o?(n=(0,s.jsxs)("svg",{className:o,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[a,r,l,i]}),c[4]=o,c[5]=n):n=c[5],n}])}]);
3
4//# debugId=2a57fd8f-6ad1-5d89-b28d-08b2b6f83ff3

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.