PageSourceSearch

https://app.forgein.ai/_next/static/chunks/app/(auth)/login/page-178065f37b124bd9.js

js forgein.ai collected 2026-10-02 01:11:18 UTC 12,166 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{7331:(e,t,o)=>{Promise.resolve().then(o.bind(o,9374))},9374:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>p});var a=o(5711),i=o(5719),s=o(5626),n=o(1545),c=o.n(n),r=o(9655);function l(){let e=(0,s.useRouter)(),t=(0,s.useSearchParams)(),[o,n]=(0,i.useState)(""),[l,p]=(0,i.useState)(""),[d,h]=(0,i.useState)(""),[m,u]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1);async function f(a){a.preventDefault(),h(""),u(null),y(!0);try{await r.F.auth.login(o,l);let a=t.get("redirect");e.push(null!=a?a:"/overview")}catch(e){var i;e instanceof r.h&&403===e.status&&"string"==typeof(null===(i=e.data)||void 0===i?void 0:i.ssoUrl)?(u(e.data.ssoUrl),h(e.message)):h(e instanceof r.h?e.message:"Login failed")}finally{y(!1)}}let S=t.get("redirect"),b="".concat("https://api.forgein.ai","/api/auth/google?next=").concat(encodeURIComponent(null!=S?S:"/overview"));return(0,a.jsxs)("div",{className:"auth-box",children:[(0,a.jsx)("h1",{className:"auth-h",children:"Welcome back"}),(0,a.jsx)("p",{className:"auth-sub",children:"Sign in to your Forgein account."}),d&&(0,a.jsxs)("div",{className:"form-error",children:[d,m&&(0,a.jsx)("a",{href:"".concat("https://api.forgein.ai").concat(m),style:{display:"block",marginTop:8,color:"var(--accent)",fontWeight:600,textDecoration:"underline"},children:"Sign in with SSO →"})]}),(0,a.jsxs)("form",{onSubmit:f,children:[(0,a.jsxs)("div",{className:"field",children:[(0,a.jsx)("label",{children:"Email"}),(0,a.jsx)("input",{type:"email",value:o,onChange:e=>n(e.target.value),placeholder:"[email protected]",required:!0,autoFocus:!0})]}),(0,a.jsxs)("div",{className:"field",children:[(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[(0,a.jsx)("label",{style:{margin:0},children:"Password"}),(0,a.jsx)(c(),{href:"/forgot-password",style:{fontSize:".72rem",color:"var(--muted)",textDecoration:"none"},children:"Forgot password?"})]}),(0,a.jsx)("input",{type:"password",value:l,onChange:e=>p(e.target.value),placeholder:"••••••••",required:!0})]}),(0,a.jsx)("button",{className:"btn btn-primary",type:"submit",disabled:g,style:{marginTop:8},children:g?"Signing in…":"Sign in"})]}),(0,a.jsx)("div",{className:"auth-divider",children:(0,a.jsx)("span",{children:"or"})}),(0,a.jsxs)("a",{href:b,className:"btn btn-ghost",style:{display:"flex",marginBottom:0},children:[(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,a.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"}),(0,a.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"}),(0,a.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"}),(0,a.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"})]}),"Continue with Google"]}),(0,a.jsxs)("p",{className:"auth-switch",children:["No account? ",(0,a.jsx)(c(),{href:"/signup",children:"Sign up free"})]})]})}function p(){return(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)("div",{className:"auth-box",children:(0,a.jsx)("p",{style:{color:"var(--muted)",fontFamily:"var(--mono)",fontSize:".82rem",marginTop:24},children:"Loading…"})}),children:(0,a.jsx)(l,{})})}},9655:(e,t,o)=>{"use strict";async function a(e){var t,o;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json",...null!==(t=a.headers)&&void 0!==t?t:{}},...a});if(!s.ok){let t=await s.json().catch(()=>({error:s.statusText}));throw 401===s.status&&"/api/auth/user"!==e&&(window.location.href="/login"),new i(s.status,null!==(o=t.error)&&void 0!==o?o:"Request failed",t)}return s.json()}o.d(t,{F:()=>s,h:()=>i});
1class i extends Error{constructor(e,t,o={}){super(t),this.status=e,this.data=o}}let s={auth:{user:()=>a("/api/auth/user"),login:(e,t)=>a("/api/auth/login",{method:"POST",body:JSON.stringify({email:e,password:t})}),signup:e=>a("/api/auth/signup",{method:"POST",body:JSON.stringify(e)}),logout:()=>a("/api/auth/logout",{method:"POST"}),deleteAccount:()=>a("/api/auth/me",{method:"DELETE"}),forgotPassword:e=>a("/api/auth/forgot-password",{method:"POST",body:JSON.stringify({email:e})}),resetPassword:(e,t)=>a("/api/auth/reset-password",{method:"POST",body:JSON.stringify({token:e,password:t})}),verifyEmail:e=>a("/api/auth/verify-email",{method:"POST",body:JSON.stringify({token:e})}),resendVerification:()=>a("/api/auth/resend-verification",{method:"POST"}),changePassword:(e,t)=>a("/api/auth/change-password",{method:"POST",body:JSON.stringify({currentPassword:e,newPassword:t})}),exportData:async()=>{let e=await fetch("/api/auth/me/export",{credentials:"include"});if(!e.ok)throw new i(e.status,"Export failed");return e.blob()}},tokens:{list:()=>a("/api/tokens"),create:(e,t)=>a("/api/tokens",{method:"POST",body:JSON.stringify({name:e,expiresInDays:t})}),revoke:e=>a("/api/tokens/".concat(e),{method:"DELETE"})},memory:{listFiles:e=>a("/api/memory/files?projectPath=".concat(encodeURIComponent(e))),listProjects:()=>a("/api/memory/projects"),stats:()=>a("/api/memory/stats"),getFile:(e,t)=>a("/api/memory/files/".concat(t,"?projectPath=").concat(encodeURIComponent(e))),updateFile:(e,t,o)=>a("/api/memory/files",{method:"PUT",body:JSON.stringify({projectPath:e,filePath:t,content:o})}),deleteFile:(e,t)=>a("/api/memory/files/".concat(t,"?projectPath=").concat(encodeURIComponent(e)),{method:"DELETE"}),history:(e,t)=>a("/api/memory/history?projectPath=".concat(encodeURIComponent(e),"&filePath=").concat(encodeURIComponent(t))),search:(e,t)=>a("/api/memory/search?q=".concat(encodeURIComponent(e)).concat(t?"&projectPath=".concat(encodeURIComponent(t)):"")),health:()=>a("/api/memory/health")},teamMemory:{shareProject:(e,t)=>a("/api/memory/team-share",{method:"POST",body:JSON.stringify({projectPath:e,name:t})}),unshare:e=>a("/api/memory/team-share/".concat(e),{method:"DELETE"}),listProjects:()=>a("/api/memory/team-projects"),listFiles:(e,t)=>a("/api/memory/team-files?ownerUserId=".concat(encodeURIComponent(e),"&projectPath=").concat(encodeURIComponent(t))),getFile:(e,t,o)=>a("/api/memory/team-file/".concat(o,"?ownerUserId=").concat(encodeURIComponent(e),"&projectPath=").concat(encodeURIComponent(t))),importFile:(e,t,o,i)=>a("/api/memory/team-import",{method:"POST",body:JSON.stringify({ownerUserId:e,projectPath:t,filePath:o,targetProjectPath:i})})},skills:{listPrivate:()=>a("/api/skills/private"),listPublic:()=>a("/api/skills/public"),install:e=>a("/api/skills/".concat(e,"/install"),{method:"POST"}),create:e=>a("/api/skills",{method:"POST",body:JSON.stringify(e)}),get:e=>a("/api/skills/".concat(e)),update:(e,t)=>a("/api/skills/".concat(e),{method:"PUT",body:JSON.stringify(t)}),delete:e=>a("/api/skills/".concat(e),{method:"DELETE"})},sso:{getConfig:e=>a("/api/sso/orgs/".concat(e)),updateConfig:(e,t)=>a("/api/sso/orgs/".concat(e),{method:"PUT",body:JSON.stringify(t)}),initiateUrl:e=>"/api/sso/".concat(e,"/initiate"),metadataUrl:e=>"/api/sso/".concat(e,"/metadata")},orgTemplates:{list:e=>a("/api/orgs/".concat(e,"/templates")),get:(e,t)=>a("/api/orgs/".concat(e,"/templates/").concat(t)),upsert:(e,t,o,i)=>a("/api/orgs/".concat(e,"/templates"),{method:"PUT",body:JSON.stringify({filePath:t,content:o,comment:i})}),delete:(e,t)=>a("/api/orgs/".concat(e,"/templates/").concat(t),{method:"DELETE"}),versions:(e,t)=>a("/api/orgs/".concat(e,"/templates/").concat(t,"/versions")),getVersion:(e,t,o)=>a("/api/orgs/".concat(e,"/templates/").concat(t,"/versions/").concat(o)),rollback:(e,t,o)=>a("/api/orgs/".concat(e,"/templates/").concat(t,"/rollback/").concat(o),{method:"POST"})},orgPolicies:{list:e=>a("/api/orgs/".concat(e,"/policies")),create:(e,t)=>a("/api/orgs/".concat(e,"/policies"),{method:"POST",body:JSON.stringify(t)}),update:(e,t,o)=>a("/api/orgs/".concat(e,"/policies/").concat(t),{method:"PATCH",body:JSON.stringify(o)}),delete:(e,t)=>
1a("/api/orgs/".concat(e,"/policies/").concat(t),{method:"DELETE"})},orgs:{me:()=>a("/api/orgs/me"),create:e=>a("/api/orgs",{method:"POST",body:JSON.stringify(e)}),members:e=>a("/api/orgs/".concat(e,"/members")),invite:(e,t,o)=>a("/api/orgs/".concat(e,"/invites"),{method:"POST",body:JSON.stringify({email:t,role:null!=o?o:"member"})}),getInvite:e=>a("/api/orgs/invites/".concat(e)),acceptInvite:e=>a("/api/orgs/invites/".concat(e,"/accept"),{method:"POST"}),listInvites:e=>a("/api/orgs/".concat(e,"/invites")),revokeInvite:(e,t)=>a("/api/orgs/".concat(e,"/invites/").concat(t),{method:"DELETE"}),removeMember:(e,t)=>a("/api/orgs/".concat(e,"/members/").concat(t),{method:"DELETE"}),analytics:e=>a("/api/orgs/".concat(e,"/analytics")),exportAuditUrl:(e,t,o,a)=>{let i=new URLSearchParams({format:t});return o&&i.set("from",o),a&&i.set("to",a),"/api/orgs/".concat(e,"/analytics/export?").concat(i.toString())}},billing:{config:()=>a("/api/billing/config"),subscription:()=>a("/api/billing/subscription"),checkout:e=>a("/api/billing/checkout",{method:"POST",body:JSON.stringify({priceId:e})}),portal:()=>a("/api/billing/portal",{method:"POST"}),invoices:()=>a("/api/billing/invoices")},ai:{generateContext:e=>a("/api/ai/generate-context",{method:"POST",body:JSON.stringify({rawText:e})}),detectConflicts:e=>a("/api/ai/detect-conflicts",{method:"POST",body:JSON.stringify({projectPath:e})}),mergeFiles:(e,t)=>a("/api/ai/merge-files",{method:"POST",body:JSON.stringify({primaryContent:e,secondaryContent:t})})},webhooks:{list:()=>a("/api/webhooks"),deliveries:e=>a("/api/webhooks/".concat(e,"/deliveries")),create:(e,t)=>a("/api/webhooks",{method:"POST",body:JSON.stringify({url:e,events:t})}),delete:e=>a("/api/webhooks/".concat(e),{method:"DELETE"}),toggle:(e,t)=>a("/api/webhooks/".concat(e),{method:"PATCH",body:JSON.stringify({isActive:t})}),ping:e=>a("/api/webhooks/".concat(e,"/ping"),{method:"POST"})},contexts:{list:()=>a("/api/contexts"),active:()=>a("/api/contexts/active"),switch:e=>a("/api/contexts/switch",{method:"POST",body:JSON.stringify({context:e})}),files:e=>a("/api/contexts/".concat(e,"/files"))},integrations:{list:()=>a("/api/integrations"),connectGitHub:(e,t)=>a("/api/integrations/github",{method:"POST",body:JSON.stringify({token:e,repos:t})}),connectLinear:e=>a("/api/integrations/linear",{method:"POST",body:JSON.stringify({apiKey:e})}),connectOpenAIAssistant:(e,t)=>a("/api/integrations/openai-assistant",{method:"POST",body:JSON.stringify({apiKey:e,assistantId:t})}),disconnect:e=>a("/api/integrations/".concat(e),{method:"DELETE"}),sync:e=>a("/api/integrations/".concat(e,"/sync"),{method:"POST"})},referrals:{me:()=>a("/api/referrals/me"),redeem:e=>a("/api/referrals/redeem",{method:"POST",body:JSON.stringify({code:e})})},adapters:{copilot:e=>fetch("/api/adapters/copilot".concat(e?"?projectPath=".concat(encodeURIComponent(e)):""),{credentials:"include"}).then(e=>e.text()),chatgpt:e=>a("/api/adapters/chatgpt".concat(e?"?projectPath=".concat(encodeURIComponent(e)):"")),gemini:e=>a("/api/adapters/gemini".concat(e?"?projectPath=".concat(encodeURIComponent(e)):"")),cursor:e=>fetch("/api/adapters/cursor".concat(e?"?projectPath=".concat(encodeURIComponent(e)):""),{credentials:"include"}).then(e=>e.text()),windsurf:e=>fetch("/api/adapters/windsurf".concat(e?"?projectPath=".concat(encodeURIComponent(e)):""),{credentials:"include"}).then(e=>e.text()),usage:()=>a("/api/adapters/usage"),usageStats:()=>a("/api/adapters/usage/stats")}}},5626:(e,t,o)=>{"use strict";var a=o(6062);o.o(a,"useParams")&&o.d(t,{useParams:function(){return a.useParams}}),o.o(a,"usePathname")&&o.d(t,{usePathname:function(){return a.usePathname}}),o.o(a,"useRouter")&&o.d(t,{useRouter:function(){return a.useRouter}}),o.o(a,"useSearchParams")&&o.d(t,{useSearchParams:function(){return a.useSearchParams}})}},e=>{var t=t=>e(e.s=t);e.O(0,[1545,3054,7839,7358],()=>t(7331)),_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.