PageSourceSearch

https://roagent.ai/_next/static/chunks/app/login/page-b4c8a2be902417cf.js

js roagent.ai collected 2026-10-05 12:32:07 UTC 9,724 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{63:(e,t,a)=>{"use strict";var r=a(7260);a.o(r,"usePathname")&&a.d(t,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(t,{useRouter:function(){return r.useRouter}})},550:(e,t,a)=>{"use strict";a.d(t,{db:()=>l,hJ:()=>d,j2:()=>i});var r=a(2078),s=a(3885),n=a(9708);let o=(0,r.Dk)().length?(0,r.Sx)():(0,r.Wp)({apiKey:"AIzaSyA0A6ksrWbA5EsFVPOyegqCLkxdDoVI3_0",authDomain:"doubleai-26fff.firebaseapp.com",projectId:"doubleai-26fff",storageBucket:"doubleai-26fff.firebasestorage.app",messagingSenderId:"264816559897",appId:"1:264816559897:web:598f9e8dbb275cb8456788",measurementId:"G-C5B49N77DV"}),i=(0,s.xI)(o),l=(0,n.aU)(o),d=new s.HF},1881:(e,t,a)=>{Promise.resolve().then(a.bind(a,5404))},5404:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>x});var r=a(5155),s=a(2115),n=a(63),o=a(3885),i=a(550),l=a(2619),d=a.n(l),c=a(5239);async function u(e,t){try{let t=await e.user.getIdToken(),a=new AbortController,r=setTimeout(()=>a.abort(),5e3);await fetch("/api/auth/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:t}),signal:a.signal}),clearTimeout(r)}catch(e){console.warn("Session cookie failed (non-blocking):",e)}t.push("/dashboard")}
1function x(){let e=(0,n.useRouter)(),[t,a]=(0,s.useState)(""),[l,x]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),[p,b]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[v,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(!1);async function N(){if(y(""),p&&!f)return void y("Please agree to the Terms of Service and Privacy Policy before signing up.");w(!0);try{var t,a;if(!i.j2||!(null==(a=i.j2.app)||null==(t=a.options)?void 0:t.apiKey))throw Error("Firebase is not configured. Please contact support.");let r=await (0,o.df)(i.j2,i.hJ);await u(r,e)}catch(e){if("auth/popup-closed-by-user"===e.code||"auth/cancelled-popup-request"===e.code)return void w(!1);"auth/unauthorized-domain"===e.code?y("This domain is not authorized for sign-in. Please contact support."):y(e.message||"Google sign-in failed"),w(!1)}}async function _(a){if(a.preventDefault(),y(""),p&&!f)return void y("Please agree to the Terms of Service and Privacy Policy to create an account.");w(!0);try{let a;p?(a=await (0,o.eJ)(i.j2,t,l),h&&await (0,o.r7)(a.user,{displayName:h})):a=await (0,o.x9)(i.j2,t,l),await u(a,e)}catch(t){let e=t.code||"";"auth/user-not-found"===e||"auth/invalid-credential"===e?y("Invalid email or password."):"auth/email-already-in-use"===e?y("An account with this email already exists. Try signing in."):"auth/weak-password"===e?y("Password must be at least 6 characters."):y(t.message||"Authentication failed")}finally{w(!1)}}return(0,r.jsx)("div",{className:"hero-gradient relative flex min-h-screen items-center justify-center px-4 py-12",children:(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,r.jsxs)("div",{className:"mb-8 text-center",children:[(0,r.jsx)(d(),{href:"/",className:"inline-block",children:(0,r.jsxs)("div",{className:"relative mx-auto mb-4 h-16 w-16",children:[(0,r.jsx)("div",{className:"absolute inset-0 rounded-2xl bg-[rgba(47,125,246,0.45)] blur-xl animate-pulse-glow"}),(0,r.jsx)(c.default,{src:"/logo.png",alt:"RoAgent",width:64,height:64,className:"relative rounded-2xl shadow-[0_12px_28px_-10px_rgba(11,61,130,0.6)]",priority:!0})]})}),(0,r.jsx)("h1",{className:"mt-2 text-3xl font-black tracking-tight text-[var(--text-primary)]",children:p?"Create your account":"Welcome back"}),(0,r.jsx)("p",{className:"mt-2 text-sm font-semibold text-[var(--text-secondary)]",children:p?"Start building Roblox games with AI":"Sign in to your RoAgent account"})]}),(0,r.jsxs)("div",{className:"relative isolate overflow-hidden rounded-3xl border border-[rgba(47,125,246,0.3)] bg-gradient-to-b from-[#eaf4fe] to-[#ddeefd] p-8 shadow-[0_28px_64px_-24px_rgba(11,61,130,0.45)]",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 -z-10",style:{backgroundImage:"repeating-linear-gradient(135deg, rgba(31,127,232,0.06) 0 2px, transparent 2px 16px), radial-gradient(60% 35% at 50% 0%, rgba(47,125,246,0.12) 0%, transparent 70%)"}}),p&&(0,r.jsxs)("label",{className:"mb-5 flex cursor-pointer items-start gap-2.5 rounded-xl border border-[rgba(10,56,102,0.16)] bg-white/70 px-3.5 py-3",children:[(0,r.jsx)("input",{type:"checkbox",checked:f,onChange:e=>{g(e.target.checked),e.target.checked&&y("")},className:"mt-0.5 h-4 w-4 shrink-0 cursor-pointer accent-[var(--accent)]"}),(0,r.jsxs)("span",{className:"text-xs font-semibold leading-relaxed text-[var(--text-secondary)]",children:["I agree to the"," ",(0,r.jsx)(d(),{href:"/terms",target:"_blank",className:"font-bold text-[var(--accent-deep)] underline underline-offset-2 hover:text-[var(--accent)]",children:"Terms of Service"})," ","and"," ",(0,r.jsx)(d(),{href:"/privacy",target:"_blank",className:"font-bold text-[var(--accent-deep)] underline underline-offset-2 hover:text-[var(--accent)]",children:"Privacy Policy"}),"."," ","Required to create an account."]})]}),(0,r.jsxs)("button",{onClick:N,disabled:j||p&&!f,title:p&&!f?"Agree to the Terms and Privacy Policy first":void 0,className:"flex w-full items-center justify-center gap-3 rounded-xl border border-[rgba(10,56,102,0.18)] bg-white py-3 text-sm font-bold text-[var(--text-primary)] shadow-[0_6px_16px_-8px_rgba(11,61,130,0.35)] transition-all hover:-translate-y-
1px hover:shadow-[0_10px_24px_-10px_rgba(11,61,130,0.45)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0",children:[(0,r.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),(0,r.jsx)("path",{fill:"#34A853",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"}),(0,r.jsx)("path",{fill:"#FBBC05",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"}),(0,r.jsx)("path",{fill:"#EA4335",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"})]}),"Continue with Google"]}),(0,r.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,r.jsx)("div",{className:"h-px flex-1 bg-[rgba(10,56,102,0.16)]"}),(0,r.jsx)("span",{className:"text-xs font-bold text-[var(--text-muted)]",children:"or"}),(0,r.jsx)("div",{className:"h-px flex-1 bg-[rgba(10,56,102,0.16)]"})]}),(0,r.jsxs)("form",{onSubmit:_,className:"space-y-4",children:[p&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1.5 block text-sm font-bold text-[var(--text-primary)]",children:"Name"}),(0,r.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),className:"w-full rounded-xl border border-[rgba(10,56,102,0.2)] bg-white px-4 py-3 text-sm font-medium text-[var(--text-primary)] placeholder-[#7da3c9] outline-none transition-all focus:border-[var(--accent)] focus:ring-2 focus:ring-[rgba(31,127,232,0.2)]",placeholder:"Your name"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1.5 block text-sm font-bold text-[var(--text-primary)]",children:"Email"}),(0,r.jsx)("input",{type:"email",value:t,onChange:e=>a(e.target.value),required:!0,className:"w-full rounded-xl border border-[rgba(10,56,102,0.2)] bg-white px-4 py-3 text-sm font-medium text-[var(--text-primary)] placeholder-[#7da3c9] outline-none transition-all focus:border-[var(--accent)] focus:ring-2 focus:ring-[rgba(31,127,232,0.2)]",placeholder:"[email protected]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1.5 block text-sm font-bold text-[var(--text-primary)]",children:"Password"}),(0,r.jsx)("input",{type:"password",value:l,onChange:e=>x(e.target.value),required:!0,minLength:6,className:"w-full rounded-xl border border-[rgba(10,56,102,0.2)] bg-white px-4 py-3 text-sm font-medium text-[var(--text-primary)] placeholder-[#7da3c9] outline-none transition-all focus:border-[var(--accent)] focus:ring-2 focus:ring-[rgba(31,127,232,0.2)]",placeholder:"Min. 6 characters"})]}),v&&(0,r.jsx)("div",{className:"rounded-lg border border-red-300 bg-red-50 px-4 py-3 text-sm font-semibold text-red-600",children:v}),(0,r.jsx)("button",{type:"submit",disabled:j||p&&!f,className:"w-full rounded-xl bg-gradient-to-r from-[#1f7fe8] to-[#38a3f8] py-3 text-sm font-bold text-white shadow-[0_12px_28px_-10px_rgba(31,127,232,0.7)] transition-all hover:-translate-y-0.5 hover:shadow-[0_16px_34px_-10px_rgba(31,127,232,0.8)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0",children:j?"Loading...":p?"Create Account":"Sign In"})]}),(0,r.jsxs)("p",{className:"mt-6 text-center text-sm font-semibold text-[var(--text-secondary)]",children:[p?"Already have an account?":"Don't have an account?"," ",(0,r.jsx)("button",{onClick:()=>{b(!p),y(""),g(!1)},className:"font-bold text-[var(--accent-deep)] transition-colors hover:text-[var(--accent)]",children:p?"Sign in":"Sign up"})]})]}),(0,r.jsxs)("p",{className:"mt-6 text-center text-xs font-semibold text-[var(--text-muted)]",children:["By continuing, you agree to our"," ",(0,r.jsx)(d(),{href:"/terms",className:"font-bold text-[var(--text-secondary)] underline underline-offset-2 transition-colors hover:text-[var(--accent-deep)]",children:"Terms"})," ","and"," ",(0,r.jsx)(d(),{href:"/privacy",className:"font-bold text-[var(--text-secondary)] underline underline-offset-2 transition-colors hover:text-[var(--accent-deep)]",children:"Privacy Policy"}),"."]})]})})}}},e=>{e.O(0,[2992,7811,7477,2619,5239,8441,1255,7358],()=>e(e.s=1881)),_N_E=e.O()}]);

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.