neural-loom 0.2.18 → 0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +0 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +2 -2
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -32
- package/.next/routes-manifest.json +0 -6
- package/.next/server/app/_global-error/page.js +6 -7
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -3
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -3
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -2
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +6 -7
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/context/aider/route.js +2 -2
- package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
- package/.next/server/app/api/context/claude/route.js +2 -2
- package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
- package/.next/server/app/api/context/route.js +2 -2
- package/.next/server/app/api/context/route.js.nft.json +1 -1
- package/.next/server/app/api/context/ssh/route.js +2 -2
- package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
- package/.next/server/app/api/files/route.js +2 -2
- package/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/server/app/api/git/route.js +2 -2
- package/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/server/app/api/recents/route.js +2 -2
- package/.next/server/app/api/recents/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/inject/route.js +2 -2
- package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/input/route.js +2 -2
- package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/launch/route.js +2 -2
- package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/scope/route.js +2 -2
- package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/start/route.js +2 -2
- package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/stats/route.js +2 -2
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/stop/route.js +2 -2
- package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page/react-loadable-manifest.json +2 -2
- package/.next/server/app/page.js +6 -7
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/{[externals]_next_dist_0arv.vj._.js → [externals]__048y_op._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0-lisav._.js → [root-of-the-server]__0-vx6-s._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0-lisav._.js.map → [root-of-the-server]__0-vx6-s._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0k6w___._.js → [root-of-the-server]__0656ruo._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0k6w___._.js.map → [root-of-the-server]__0656ruo._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0969ozy._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0l7c-gn._.js.map → [root-of-the-server]__0969ozy._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +10 -5
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0iqaxhx._.js → [root-of-the-server]__0d9_-7g._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0iqaxhx._.js.map → [root-of-the-server]__0d9_-7g._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0qz~w0~._.js → [root-of-the-server]__0fhv7.1._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0qz~w0~._.js.map → [root-of-the-server]__0fhv7.1._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0j8-xkl._.js → [root-of-the-server]__0i83~95._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0j8-xkl._.js.map → [root-of-the-server]__0i83~95._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0kn5tap._.js +4 -0
- package/.next/server/chunks/{[root-of-the-server]__0ntt3om._.js.map → [root-of-the-server]__0kn5tap._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0n-zban._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0p~u94k._.js.map → [root-of-the-server]__0n-zban._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0qqnqov._.js +15 -0
- package/.next/server/chunks/{[root-of-the-server]__0m91xif._.js.map → [root-of-the-server]__0qqnqov._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0sa_gpm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sa_gpm._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0t_~on0._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0t_~on0._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0vp8-ka._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0qyrt6_._.js.map → [root-of-the-server]__0vp8-ka._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0__9rdk._.js → [root-of-the-server]__0xr~y1f._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0__9rdk._.js.map → [root-of-the-server]__0xr~y1f._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0_2_i_q._.js → [root-of-the-server]__0zkcq9q._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0_2_i_q._.js.map → [root-of-the-server]__0zkcq9q._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0bi3d5z._.js → [root-of-the-server]__0~zauvq._.js} +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0bi3d5z._.js.map → [root-of-the-server]__0~zauvq._.js.map} +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0cbmrds._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0cbmrds._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ni-l5l._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ni-l5l._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__089dc4i._.js → [root-of-the-server]__0tcyn68._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0tcyn68._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0yj_dfr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yj_dfr._.js.map +1 -0
- package/.next/server/chunks/ssr/_0t7oqy6._.js +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -1
- package/.next/server/chunks/ssr/{node_modules_next_dist_0ppctuh._.js → node_modules_next_dist_0-g.jog._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules_next_dist_0-g.jog._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bj8dkg.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bj8dkg.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0cvrgh7.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0cvrgh7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0rc3ul_.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0rc3ul_.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/07-tub5vqy.fk.js +1 -0
- package/.next/static/chunks/0kkoif8x_kxrq.js +1 -0
- package/.next/static/chunks/{0pp.lp89pntpv.css → 0m-_sw1425nkp.css} +1 -1
- package/.next/static/chunks/0wq3_34inbzj6.js +1 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/public/logo.png +0 -0
- package/public/manifest.json +22 -0
- package/public/sw.js +12 -0
- package/src/app/api/context/aider/route.ts +6 -1
- package/src/app/api/files/route.ts +20 -8
- package/src/app/api/git/route.ts +117 -1
- package/src/app/api/sessions/route.ts +4 -1
- package/src/app/components/AiderWizard.tsx +19 -1
- package/src/app/components/IdeLayout.tsx +715 -87
- package/src/app/components/MarkdownPreview.tsx +528 -0
- package/src/app/layout.tsx +6 -0
- package/src/app/page.module.css +2 -0
- package/src/app/page.tsx +40 -10
- package/src/lib/agents/AgentRunner.ts +2 -2
- package/src/lib/agents/AiderRunner.ts +75 -36
- package/src/lib/agents/SessionManager.ts +25 -10
- package/src/lib/agents/SessionPersister.ts +10 -0
- package/src/lib/agents/ShellRunner.ts +159 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +0 -3
- package/.next/server/app/favicon.ico/route/build-manifest.json +0 -9
- package/.next/server/app/favicon.ico/route.js +0 -7
- package/.next/server/app/favicon.ico/route.js.map +0 -5
- package/.next/server/app/favicon.ico/route.js.nft.json +0 -1
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +0 -1
- package/.next/server/chunks/[externals]__1334_78._.js +0 -3
- package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0l7c-gn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0m91xif._.js +0 -15
- package/.next/server/chunks/[root-of-the-server]__0ntt3om._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p~u94k._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0qyrt6_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ty8hwz._.js +0 -15
- package/.next/server/chunks/[root-of-the-server]__0ty8hwz._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0ylcu31._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ylcu31._.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js.map +0 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js +0 -3
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__089dc4i._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_05l396c._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_05l396c._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_0ppctuh._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js.map +0 -1
- package/.next/static/chunks/0ek0280331wie.js +0 -1
- package/.next/static/chunks/0jxar8nsw_py3.js +0 -1
- package/.next/static/chunks/0whfmx9l_25d4.js +0 -1
- package/.next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
- package/src/app/favicon.ico +0 -0
- /package/.next/server/chunks/{[externals]__1334_78._.js.map → [externals]__048y_op._.js.map} +0 -0
- /package/.next/static/{OOK46QJncZAPJTv2oCT-X → 5uGIuH8oXybqivkeHIrqb}/_buildManifest.js +0 -0
- /package/.next/static/{OOK46QJncZAPJTv2oCT-X → 5uGIuH8oXybqivkeHIrqb}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{OOK46QJncZAPJTv2oCT-X → 5uGIuH8oXybqivkeHIrqb}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/workspaceParser.ts","../../../src/lib/agents/ContextManager.ts","../../../src/lib/recents.ts","../../../src/app/api/sessions/scope/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nexport function getWorkspaceFileFolders(workspaceRoot: string): string[] {\n try {\n if (!workspaceRoot || !fs.existsSync(workspaceRoot)) return [];\n \n // Normalize workspaceRoot path\n const normRoot = path.resolve(workspaceRoot).replace(/\\\\/g, \"/\");\n \n const files = fs.readdirSync(normRoot);\n const workspaceFile = files.find(f => f.endsWith(\".code-workspace\"));\n if (!workspaceFile) return [];\n\n const filePath = path.join(normRoot, workspaceFile);\n const content = fs.readFileSync(filePath, \"utf8\");\n const json = JSON.parse(content);\n \n if (!json.folders || !Array.isArray(json.folders)) return [];\n \n const folders: string[] = [];\n for (const folder of json.folders) {\n if (folder.path) {\n // Resolve relative to workspace root (where the workspace file resides)\n const resolved = path.resolve(normRoot, folder.path).replace(/\\\\/g, \"/\");\n \n // Exclude the workspace root folder itself\n if (resolved !== normRoot) {\n if (fs.existsSync(resolved)) {\n folders.push(resolved);\n }\n }\n }\n }\n return folders;\n } catch (err) {\n console.error(\"[WorkspaceParser] Failed to parse code-workspace file:\", err);\n return [];\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\nexport class ContextManager {\n private static get workspaceRoot(): string {\n return process.env.ORIGINAL_CWD || process.cwd();\n }\n\n private static ensureDirs(root: string) {\n const aiDir = path.join(root, \".ai\", \"neural-loom\");\n if (!fs.existsSync(aiDir)) {\n fs.mkdirSync(aiDir, { recursive: true });\n }\n\n const commandDir = path.join(root, \".claude\", \"commands\");\n if (!fs.existsSync(commandDir)) {\n fs.mkdirSync(commandDir, { recursive: true });\n }\n }\n\n public static initializeStaging(root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n\n // Create /ccp.md custom slash command file\n const ccpPath = path.join(root, \".claude\", \"commands\", \"ccp.md\");\n if (!fs.existsSync(ccpPath)) {\n fs.writeFileSync(\n ccpPath,\n \"Read the prompt from .ai/neural-loom/cprompt.md and execute it. This is a staged prompt from the NeuralLoom UI. Treat the contents as user instructions.\\n\"\n );\n }\n\n // Create /ccc.md custom slash command file\n const cccPath = path.join(root, \".claude\", \"commands\", \"ccc.md\");\n if (!fs.existsSync(cccPath)) {\n fs.writeFileSync(\n cccPath,\n \"Read the context from .ai/neural-loom/ccontext.md. This is persistent context from the NeuralLoom UI. Absorb it as background information for this session. Acknowledge briefly what you received.\\n\"\n );\n }\n }\n\n public static updatePrompt(promptText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n fs.writeFileSync(promptFile, promptText);\n }\n\n public static updateContext(contextText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const contextFile = path.join(root, \".ai\", \"neural-loom\", \"ccontext.md\");\n fs.writeFileSync(contextFile, contextText);\n }\n\n public static updateRules(rulesText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n fs.writeFileSync(agentsMdPath, rulesText, \"utf8\");\n }\n\n public static loadPrompt(root: string = process.env.ORIGINAL_CWD || process.cwd()): string {\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n return fs.existsSync(promptFile) ? fs.readFileSync(promptFile, \"utf8\") : \"\";\n }\n\n public static loadRules(root: string = process.env.ORIGINAL_CWD || process.cwd()): string {\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n return fs.existsSync(agentsMdPath) ? fs.readFileSync(agentsMdPath, \"utf8\") : \"\";\n }\n\n public static compileGlobalRules() {\n this.compileSessionContext();\n }\n\n public static compileSessionContext(root: string = process.env.ORIGINAL_CWD || process.cwd(), scopedDirs?: string[]) {\n this.ensureDirs(root);\n this.initializeStaging(root);\n \n // Check if AGENTS.md rules template exists\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n let agentsRules = \"\";\n if (fs.existsSync(agentsMdPath)) {\n agentsRules = fs.readFileSync(agentsMdPath, \"utf8\");\n } else {\n // Try fallback from global\n const fallbackPath = path.join(this.workspaceRoot, \"AGENTS.md\");\n if (fs.existsSync(fallbackPath)) {\n agentsRules = fs.readFileSync(fallbackPath, \"utf8\");\n }\n }\n\n // Generate maps\n let maps = `## Workspace Root Map (${root}):\\n${this.generateProjectMapFor(root)}`;\n\n if (scopedDirs && Array.isArray(scopedDirs)) {\n scopedDirs.forEach((dir) => {\n if (fs.existsSync(dir)) {\n maps += `\\n\\n## Scoped Directory Map (${dir}):\\n${this.generateProjectMapFor(dir)}`;\n }\n });\n }\n\n // Combine rules and folder map\n const compiledContext = `# System Rules & Guidelines\\n\\n${agentsRules}\\n\\n# Project File Hierarchy Map\\n\\n${maps}`;\n this.updateContext(compiledContext, root);\n\n // Write a default empty prompt staging file if missing\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n if (!fs.existsSync(promptFile)) {\n fs.writeFileSync(promptFile, \"Hello! Please review the project context (/ccc) and check for any tasks to execute.\");\n }\n }\n\n private static generateProjectMapFor(targetDir: string): string {\n try {\n const walk = (dir: string, depth = 0): string => {\n if (depth > 2) return \"\"; // Keep map depth concise to fit tokens\n let result = \"\";\n const files = fs.readdirSync(dir, { withFileTypes: true });\n for (const file of files) {\n if (\n file.name.startsWith(\".\") ||\n file.name === \"node_modules\" ||\n file.name === \"out\" ||\n file.name === \".next\"\n ) {\n continue;\n }\n const indent = \" \".repeat(depth);\n if (file.isDirectory()) {\n result += `${indent}- [Dir] ${file.name}/\\n`;\n result += walk(path.join(dir, file.name), depth + 1);\n } else {\n result += `${indent}- [File] ${file.name}\\n`;\n }\n }\n return result;\n };\n return walk(targetDir);\n } catch (err) {\n return \"Error generating project map: \" + (err instanceof Error ? err.message : String(err));\n }\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\nconst configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\nconst recentsPath = path.join(configDir, \"recents.json\");\n\nfunction ensureDir() {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n}\n\nexport function loadRecents() {\n if (fs.existsSync(recentsPath)) {\n try {\n const data = JSON.parse(fs.readFileSync(recentsPath, \"utf8\"));\n return {\n workspaces: Array.isArray(data.workspaces) ? (data.workspaces as string[]) : [],\n scopes: Array.isArray(data.scopes) ? (data.scopes as string[]) : [],\n lastSession: data.lastSession || null\n };\n } catch (e) {\n console.error(\"[Recents] Failed to parse recents.json:\", e);\n }\n }\n return { workspaces: [], scopes: [], lastSession: null };\n}\n\nexport function saveLastSession(config: {\n type: 'mock' | 'claude' | 'claude-docker' | 'claude-ssh' | 'aider' | 'aider-docker';\n name?: string;\n workspaceRoot?: string;\n scopedDirs?: string[];\n}) {\n const recents = loadRecents();\n recents.lastSession = config;\n try {\n ensureDir();\n fs.writeFileSync(recentsPath, JSON.stringify(recents, null, 2), \"utf8\");\n } catch (err) {\n console.error(\"[Recents] Failed to write recents.json:\", err);\n }\n}\n\nexport function addRecent(type: \"workspace\" | \"scope\", folderPath: string) {\n if (!folderPath) return;\n \n // Resolve absolute path and normalize slashes\n const resolvedPath = path.resolve(folderPath).replace(/\\\\/g, \"/\");\n \n // Quick safety check: only add if the directory exists\n if (!fs.existsSync(resolvedPath)) return;\n\n const recents = loadRecents();\n\n if (type === \"workspace\") {\n recents.workspaces = [\n resolvedPath,\n ...recents.workspaces.filter(p => p !== resolvedPath)\n ].slice(0, 10);\n } else if (type === \"scope\") {\n recents.scopes = [\n resolvedPath,\n ...recents.scopes.filter(p => p !== resolvedPath)\n ].slice(0, 15);\n }\n\n try {\n ensureDir();\n fs.writeFileSync(recentsPath, JSON.stringify(recents, null, 2), \"utf8\");\n } catch (err) {\n console.error(\"[Recents] Failed to write recents.json:\", err);\n }\n}\n","import { NextResponse } from \"next/server\";\nimport { SessionManager } from \"@/lib/agents/SessionManager\";\nimport { SessionPersister } from \"@/lib/agents/SessionPersister\";\nimport { ContextManager } from \"@/lib/agents/ContextManager\";\nimport { addRecent } from \"@/lib/recents\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nexport async function POST(request: Request) {\n try {\n const body = await request.json();\n const { sessionId, path: newPath, action = \"add\" } = body;\n\n if (!sessionId || !newPath) {\n return NextResponse.json({ error: \"Missing sessionId or path\" }, { status: 400 });\n }\n\n const manager = SessionManager.getInstance();\n const session = manager.getSession(sessionId);\n\n if (!session) {\n return NextResponse.json({ error: \"Session not found\" }, { status: 404 });\n }\n\n // Normalize path\n const resolvedPath = path.resolve(newPath).replace(/\\\\/g, \"/\");\n\n if (action === \"add\") {\n if (!fs.existsSync(resolvedPath)) {\n return NextResponse.json({ error: \"Path does not exist on the server\" }, { status: 400 });\n }\n\n // 1. Add to active session runner\n if (!session.scopedDirs) {\n session.scopedDirs = [];\n }\n if (!session.scopedDirs.includes(resolvedPath)) {\n session.scopedDirs.push(resolvedPath);\n SessionPersister.saveSession(session, true);\n }\n\n // 2. Carry over to global configurations for next Launch\n const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n if (session.type === \"claude\" || session.type === \"claude-docker\") {\n const claudeConfigPath = path.join(configDir, \"claude.json\");\n if (fs.existsSync(claudeConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(claudeConfigPath, \"utf8\"));\n if (!config.scopedDirs) config.scopedDirs = [];\n if (!config.scopedDirs.includes(resolvedPath)) {\n config.scopedDirs.push(resolvedPath);\n fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to update claude.json with new scoped folder:\", err);\n }\n }\n } else if (session.type === \"aider\" || session.type === \"aider-docker\") {\n const aiderConfigPath = path.join(configDir, \"aider.json\");\n if (fs.existsSync(aiderConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(aiderConfigPath, \"utf8\"));\n if (!config.scopedDirs) config.scopedDirs = [];\n if (!config.scopedDirs.includes(resolvedPath)) {\n config.scopedDirs.push(resolvedPath);\n fs.writeFileSync(aiderConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to update aider.json with new scoped folder:\", err);\n }\n }\n }\n\n // Add to recents\n addRecent(\"scope\", resolvedPath);\n\n // Re-compile context & hot-reload in runner\n const root = session.workspaceRoot || process.env.ORIGINAL_CWD || process.cwd();\n ContextManager.compileSessionContext(root, session.scopedDirs);\n if (session.status === \"running\") {\n await manager.injectCommand(sessionId, \"/ccc\");\n }\n } else if (action === \"remove\") {\n // 1. Remove from active session runner\n if (session.scopedDirs) {\n session.scopedDirs = session.scopedDirs.filter(p => p !== resolvedPath);\n SessionPersister.saveSession(session, true);\n }\n\n // 2. Remove from global configuration so it doesn't carry over\n const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n if (session.type === \"claude\" || session.type === \"claude-docker\") {\n const claudeConfigPath = path.join(configDir, \"claude.json\");\n if (fs.existsSync(claudeConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(claudeConfigPath, \"utf8\"));\n if (config.scopedDirs) {\n config.scopedDirs = config.scopedDirs.filter((p: string) => p !== resolvedPath);\n fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to remove scoped folder from claude.json:\", err);\n }\n }\n } else if (session.type === \"aider\" || session.type === \"aider-docker\") {\n const aiderConfigPath = path.join(configDir, \"aider.json\");\n if (fs.existsSync(aiderConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(aiderConfigPath, \"utf8\"));\n if (config.scopedDirs) {\n config.scopedDirs = config.scopedDirs.filter((p: string) => p !== resolvedPath);\n fs.writeFileSync(aiderConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to remove scoped folder from aider.json:\", err);\n }\n }\n }\n\n // Re-compile context & hot-reload in runner\n const root = session.workspaceRoot || process.env.ORIGINAL_CWD || process.cwd();\n ContextManager.compileSessionContext(root, session.scopedDirs);\n if (session.status === \"running\") {\n await manager.injectCommand(sessionId, \"/ccc\");\n }\n }\n\n return NextResponse.json({\n success: true,\n scopedDirs: session.scopedDirs || []\n });\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ error: errorMessage }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/sessions/scope/route\",\n pathname: \"/api/sessions/scope\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/sessions/scope/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/scope/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["getWorkspaceFileFolders","workspaceRoot","existsSync","normRoot","resolve","replace","files","readdirSync","workspaceFile","find","f","endsWith","filePath","join","content","readFileSync","json","JSON","parse","folders","Array","isArray","folder","path","resolved","push","err","console","error","ContextManager","process","env","ORIGINAL_CWD","cwd","ensureDirs","root","aiDir","mkdirSync","recursive","commandDir","initializeStaging","ccpPath","writeFileSync","cccPath","updatePrompt","promptText","promptFile","updateContext","contextText","contextFile","updateRules","rulesText","agentsMdPath","loadPrompt","loadRules","compileGlobalRules","compileSessionContext","scopedDirs","agentsRules","fallbackPath","maps","generateProjectMapFor","forEach","dir","compiledContext","targetDir","walk","depth","result","withFileTypes","file","name","startsWith","indent","repeat","isDirectory","Error","message","String","configDir","recentsPath","ensureDir","loadRecents","data","workspaces","scopes","lastSession","e","saveLastSession","config","recents","stringify","addRecent","type","folderPath","resolvedPath","filter","p","slice","POST","request","body","sessionId","newPath","action","status","manager","getInstance","session","getSession","includes","saveSession","claudeConfigPath","aiderConfigPath","injectCommand","success","errorMessage"],"mappings":"gqCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,wCAEO,SAASA,AAAwBC,CAAqB,EAC3D,GAAI,CACF,GAAI,CAACA,GAAiB,CAAC,EAAA,OAAE,CAACC,UAAU,CAACD,GAAgB,MAAO,EAAE,CAG9D,IAAME,EAAW,EAAA,OAAI,CAACC,OAAO,CAACH,GAAeI,OAAO,CAAC,MAAO,KAGtDG,EADQ,AACQF,EADR,OAAE,CAACC,WAAW,CAACJ,GACDM,IAAI,CAACC,GAAKA,EAAEC,QAAQ,CAAC,oBACjD,GAAI,CAACH,EAAe,MAAO,EAAE,CAE7B,IAAMI,EAAW,EA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S,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAY,AAAZ,EAAa,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,EACA,sBACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TAhF,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[4]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/workspaceParser.ts","../../../src/lib/agents/ContextManager.ts","../../../src/lib/recents.ts","../../../src/app/api/sessions/scope/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nexport function getWorkspaceFileFolders(workspaceRoot: string): string[] {\n try {\n if (!workspaceRoot || !fs.existsSync(workspaceRoot)) return [];\n \n // Normalize workspaceRoot path\n const normRoot = path.resolve(workspaceRoot).replace(/\\\\/g, \"/\");\n \n const files = fs.readdirSync(normRoot);\n const workspaceFile = files.find(f => f.endsWith(\".code-workspace\"));\n if (!workspaceFile) return [];\n\n const filePath = path.join(normRoot, workspaceFile);\n const content = fs.readFileSync(filePath, \"utf8\");\n const json = JSON.parse(content);\n \n if (!json.folders || !Array.isArray(json.folders)) return [];\n \n const folders: string[] = [];\n for (const folder of json.folders) {\n if (folder.path) {\n // Resolve relative to workspace root (where the workspace file resides)\n const resolved = path.resolve(normRoot, folder.path).replace(/\\\\/g, \"/\");\n \n // Exclude the workspace root folder itself\n if (resolved !== normRoot) {\n if (fs.existsSync(resolved)) {\n folders.push(resolved);\n }\n }\n }\n }\n return folders;\n } catch (err) {\n console.error(\"[WorkspaceParser] Failed to parse code-workspace file:\", err);\n return [];\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\nexport class ContextManager {\n private static get workspaceRoot(): string {\n return process.env.ORIGINAL_CWD || process.cwd();\n }\n\n private static ensureDirs(root: string) {\n const aiDir = path.join(root, \".ai\", \"neural-loom\");\n if (!fs.existsSync(aiDir)) {\n fs.mkdirSync(aiDir, { recursive: true });\n }\n\n const commandDir = path.join(root, \".claude\", \"commands\");\n if (!fs.existsSync(commandDir)) {\n fs.mkdirSync(commandDir, { recursive: true });\n }\n }\n\n public static initializeStaging(root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n\n // Create /ccp.md custom slash command file\n const ccpPath = path.join(root, \".claude\", \"commands\", \"ccp.md\");\n if (!fs.existsSync(ccpPath)) {\n fs.writeFileSync(\n ccpPath,\n \"Read the prompt from .ai/neural-loom/cprompt.md and execute it. This is a staged prompt from the NeuralLoom UI. Treat the contents as user instructions.\\n\"\n );\n }\n\n // Create /ccc.md custom slash command file\n const cccPath = path.join(root, \".claude\", \"commands\", \"ccc.md\");\n if (!fs.existsSync(cccPath)) {\n fs.writeFileSync(\n cccPath,\n \"Read the context from .ai/neural-loom/ccontext.md. This is persistent context from the NeuralLoom UI. Absorb it as background information for this session. Acknowledge briefly what you received.\\n\"\n );\n }\n }\n\n public static updatePrompt(promptText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n fs.writeFileSync(promptFile, promptText);\n }\n\n public static updateContext(contextText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const contextFile = path.join(root, \".ai\", \"neural-loom\", \"ccontext.md\");\n fs.writeFileSync(contextFile, contextText);\n }\n\n public static updateRules(rulesText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {\n this.ensureDirs(root);\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n fs.writeFileSync(agentsMdPath, rulesText, \"utf8\");\n }\n\n public static loadPrompt(root: string = process.env.ORIGINAL_CWD || process.cwd()): string {\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n return fs.existsSync(promptFile) ? fs.readFileSync(promptFile, \"utf8\") : \"\";\n }\n\n public static loadRules(root: string = process.env.ORIGINAL_CWD || process.cwd()): string {\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n return fs.existsSync(agentsMdPath) ? fs.readFileSync(agentsMdPath, \"utf8\") : \"\";\n }\n\n public static compileGlobalRules() {\n this.compileSessionContext();\n }\n\n public static compileSessionContext(root: string = process.env.ORIGINAL_CWD || process.cwd(), scopedDirs?: string[]) {\n this.ensureDirs(root);\n this.initializeStaging(root);\n \n // Check if AGENTS.md rules template exists\n const agentsMdPath = path.join(root, \"AGENTS.md\");\n let agentsRules = \"\";\n if (fs.existsSync(agentsMdPath)) {\n agentsRules = fs.readFileSync(agentsMdPath, \"utf8\");\n } else {\n // Try fallback from global\n const fallbackPath = path.join(this.workspaceRoot, \"AGENTS.md\");\n if (fs.existsSync(fallbackPath)) {\n agentsRules = fs.readFileSync(fallbackPath, \"utf8\");\n }\n }\n\n // Generate maps\n let maps = `## Workspace Root Map (${root}):\\n${this.generateProjectMapFor(root)}`;\n\n if (scopedDirs && Array.isArray(scopedDirs)) {\n scopedDirs.forEach((dir) => {\n if (fs.existsSync(dir)) {\n maps += `\\n\\n## Scoped Directory Map (${dir}):\\n${this.generateProjectMapFor(dir)}`;\n }\n });\n }\n\n // Combine rules and folder map\n const compiledContext = `# System Rules & Guidelines\\n\\n${agentsRules}\\n\\n# Project File Hierarchy Map\\n\\n${maps}`;\n this.updateContext(compiledContext, root);\n\n // Write a default empty prompt staging file if missing\n const promptFile = path.join(root, \".ai\", \"neural-loom\", \"cprompt.md\");\n if (!fs.existsSync(promptFile)) {\n fs.writeFileSync(promptFile, \"Hello! Please review the project context (/ccc) and check for any tasks to execute.\");\n }\n }\n\n private static generateProjectMapFor(targetDir: string): string {\n try {\n const walk = (dir: string, depth = 0): string => {\n if (depth > 2) return \"\"; // Keep map depth concise to fit tokens\n let result = \"\";\n const files = fs.readdirSync(dir, { withFileTypes: true });\n for (const file of files) {\n if (\n file.name.startsWith(\".\") ||\n file.name === \"node_modules\" ||\n file.name === \"out\" ||\n file.name === \".next\"\n ) {\n continue;\n }\n const indent = \" \".repeat(depth);\n if (file.isDirectory()) {\n result += `${indent}- [Dir] ${file.name}/\\n`;\n result += walk(path.join(dir, file.name), depth + 1);\n } else {\n result += `${indent}- [File] ${file.name}\\n`;\n }\n }\n return result;\n };\n return walk(targetDir);\n } catch (err) {\n return \"Error generating project map: \" + (err instanceof Error ? err.message : String(err));\n }\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\nconst configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\nconst recentsPath = path.join(configDir, \"recents.json\");\n\nfunction ensureDir() {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n}\n\nexport function loadRecents() {\n if (fs.existsSync(recentsPath)) {\n try {\n const data = JSON.parse(fs.readFileSync(recentsPath, \"utf8\"));\n return {\n workspaces: Array.isArray(data.workspaces) ? (data.workspaces as string[]) : [],\n scopes: Array.isArray(data.scopes) ? (data.scopes as string[]) : [],\n lastSession: data.lastSession || null\n };\n } catch (e) {\n console.error(\"[Recents] Failed to parse recents.json:\", e);\n }\n }\n return { workspaces: [], scopes: [], lastSession: null };\n}\n\nexport function saveLastSession(config: {\n type: 'mock' | 'claude' | 'claude-docker' | 'claude-ssh' | 'aider' | 'aider-docker';\n name?: string;\n workspaceRoot?: string;\n scopedDirs?: string[];\n}) {\n const recents = loadRecents();\n recents.lastSession = config;\n try {\n ensureDir();\n fs.writeFileSync(recentsPath, JSON.stringify(recents, null, 2), \"utf8\");\n } catch (err) {\n console.error(\"[Recents] Failed to write recents.json:\", err);\n }\n}\n\nexport function addRecent(type: \"workspace\" | \"scope\", folderPath: string) {\n if (!folderPath) return;\n \n // Resolve absolute path and normalize slashes\n const resolvedPath = path.resolve(folderPath).replace(/\\\\/g, \"/\");\n \n // Quick safety check: only add if the directory exists\n if (!fs.existsSync(resolvedPath)) return;\n\n const recents = loadRecents();\n\n if (type === \"workspace\") {\n recents.workspaces = [\n resolvedPath,\n ...recents.workspaces.filter(p => p !== resolvedPath)\n ].slice(0, 10);\n } else if (type === \"scope\") {\n recents.scopes = [\n resolvedPath,\n ...recents.scopes.filter(p => p !== resolvedPath)\n ].slice(0, 15);\n }\n\n try {\n ensureDir();\n fs.writeFileSync(recentsPath, JSON.stringify(recents, null, 2), \"utf8\");\n } catch (err) {\n console.error(\"[Recents] Failed to write recents.json:\", err);\n }\n}\n","import { NextResponse } from \"next/server\";\nimport { SessionManager } from \"@/lib/agents/SessionManager\";\nimport { SessionPersister } from \"@/lib/agents/SessionPersister\";\nimport { ContextManager } from \"@/lib/agents/ContextManager\";\nimport { addRecent } from \"@/lib/recents\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nexport async function POST(request: Request) {\n try {\n const body = await request.json();\n const { sessionId, path: newPath, action = \"add\" } = body;\n\n if (!sessionId || !newPath) {\n return NextResponse.json({ error: \"Missing sessionId or path\" }, { status: 400 });\n }\n\n const manager = SessionManager.getInstance();\n const session = manager.getSession(sessionId);\n\n if (!session) {\n return NextResponse.json({ error: \"Session not found\" }, { status: 404 });\n }\n\n // Normalize path\n const resolvedPath = path.resolve(newPath).replace(/\\\\/g, \"/\");\n\n if (action === \"add\") {\n if (!fs.existsSync(resolvedPath)) {\n return NextResponse.json({ error: \"Path does not exist on the server\" }, { status: 400 });\n }\n\n // 1. Add to active session runner\n if (!session.scopedDirs) {\n session.scopedDirs = [];\n }\n if (!session.scopedDirs.includes(resolvedPath)) {\n session.scopedDirs.push(resolvedPath);\n SessionPersister.saveSession(session, true);\n }\n\n // 2. Carry over to global configurations for next Launch\n const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n if (session.type === \"claude\" || session.type === \"claude-docker\") {\n const claudeConfigPath = path.join(configDir, \"claude.json\");\n if (fs.existsSync(claudeConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(claudeConfigPath, \"utf8\"));\n if (!config.scopedDirs) config.scopedDirs = [];\n if (!config.scopedDirs.includes(resolvedPath)) {\n config.scopedDirs.push(resolvedPath);\n fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to update claude.json with new scoped folder:\", err);\n }\n }\n } else if (session.type === \"aider\" || session.type === \"aider-docker\") {\n const aiderConfigPath = path.join(configDir, \"aider.json\");\n if (fs.existsSync(aiderConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(aiderConfigPath, \"utf8\"));\n if (!config.scopedDirs) config.scopedDirs = [];\n if (!config.scopedDirs.includes(resolvedPath)) {\n config.scopedDirs.push(resolvedPath);\n fs.writeFileSync(aiderConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to update aider.json with new scoped folder:\", err);\n }\n }\n }\n\n // Add to recents\n addRecent(\"scope\", resolvedPath);\n\n // Re-compile context & hot-reload in runner\n const root = session.workspaceRoot || process.env.ORIGINAL_CWD || process.cwd();\n ContextManager.compileSessionContext(root, session.scopedDirs);\n if (session.status === \"running\") {\n await manager.injectCommand(sessionId, \"/ccc\");\n }\n } else if (action === \"remove\") {\n // 1. Remove from active session runner\n if (session.scopedDirs) {\n session.scopedDirs = session.scopedDirs.filter(p => p !== resolvedPath);\n SessionPersister.saveSession(session, true);\n }\n\n // 2. Remove from global configuration so it doesn't carry over\n const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n if (session.type === \"claude\" || session.type === \"claude-docker\") {\n const claudeConfigPath = path.join(configDir, \"claude.json\");\n if (fs.existsSync(claudeConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(claudeConfigPath, \"utf8\"));\n if (config.scopedDirs) {\n config.scopedDirs = config.scopedDirs.filter((p: string) => p !== resolvedPath);\n fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to remove scoped folder from claude.json:\", err);\n }\n }\n } else if (session.type === \"aider\" || session.type === \"aider-docker\") {\n const aiderConfigPath = path.join(configDir, \"aider.json\");\n if (fs.existsSync(aiderConfigPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(aiderConfigPath, \"utf8\"));\n if (config.scopedDirs) {\n config.scopedDirs = config.scopedDirs.filter((p: string) => p !== resolvedPath);\n fs.writeFileSync(aiderConfigPath, JSON.stringify(config, null, 2), \"utf8\");\n }\n } catch (err) {\n console.error(\"Failed to remove scoped folder from aider.json:\", err);\n }\n }\n }\n\n // Re-compile context & hot-reload in runner\n const root = session.workspaceRoot || process.env.ORIGINAL_CWD || process.cwd();\n ContextManager.compileSessionContext(root, session.scopedDirs);\n if (session.status === \"running\") {\n await manager.injectCommand(sessionId, \"/ccc\");\n }\n }\n\n return NextResponse.json({\n success: true,\n scopedDirs: session.scopedDirs || []\n });\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ error: errorMessage }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/sessions/scope/route\",\n pathname: \"/api/sessions/scope\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/sessions/scope/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/scope/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["getWorkspaceFileFolders","workspaceRoot","existsSync","normRoot","resolve","replace","files","readdirSync","workspaceFile","find","f","endsWith","filePath","join","content","readFileSync","json","JSON","parse","folders","Array","isArray","folder","path","resolved","push","err","console","error","ContextManager","process","env","ORIGINAL_CWD","cwd","ensureDirs","root","aiDir","mkdirSync","recursive","commandDir","initializeStaging","ccpPath","writeFileSync","cccPath","updatePrompt","promptText","promptFile","updateContext","contextText","contextFile","updateRules","rulesText","agentsMdPath","loadPrompt","loadRules","compileGlobalRules","compileSessionContext","scopedDirs","agentsRules","fallbackPath","maps","generateProjectMapFor","forEach","dir","compiledContext","targetDir","walk","depth","result","withFileTypes","file","name","startsWith","indent","repeat","isDirectory","Error","message","String","configDir","recentsPath","ensureDir","loadRecents","data","workspaces","scopes","lastSession","e","saveLastSession","config","recents","stringify","addRecent","type","folderPath","resolvedPath","filter","p","slice","POST","request","body","sessionId","newPath","action","status","manager","getInstance","session","getSession","includes","saveSession","claudeConfigPath","aiderConfigPath","injectCommand","success","errorMessage"],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,wCAEO,SAASA,AAAwBC,CAAqB,EAC3D,GAAI,CACF,GAAI,CAACA,GAAiB,CAAC,EAAA,OAAE,CAACC,UAAU,CAACD,GAAgB,MAAO,EAAE,CAG9D,IAAME,EAAW,EAAA,OAAI,CAACC,OAAO,CAACH,GAAeI,OAAO,CAAC,MAAO,KAGtDG,EADQ,AACQF,EADR,OAAE,CAACC,WAAW,CAACJ,GACDM,IAAI,CAACC,GAAKA,EAAEC,QAAQ,CAAC,oBACjD,GAAI,CAACH,EAAe,MAAO,EAAE,CAE7B,IAAMI,EAAW,EAAA,OAAI,CAACC,IAAI,CAACV,EAAUK,GAC/BM,EAAU,EAAA,OAAE,CAACC,YAAY,CAACH,EAAU,QACpCI,EAAOC,KAAKC,KAAK,CAACJ,GAExB,GAAI,CAACE,EAAKG,OAAO,EAAI,CAACC,MAAMC,OAAO,CAACL,EAAKG,OAAO,EAAG,MAAO,EAAE,CAE5D,IAAMA,EAAoB,EAAE,CAC5B,IAAK,IAAMG,KAAUN,EAAKG,OAAO,CAAE,AACjC,GAAIG,EAAOC,IAAI,CAAE,CAEf,IAAMC,EAAW,EAAA,OAAI,CAACpB,OAAO,CAACD,EAAUmB,EAAOC,IAAI,EAAElB,OAAO,CAAC,MAAO,KAGhEmB,IAAarB,GACX,EAAA,KADqB,EACnB,CAACD,UAAU,CAACsB,IAChBL,EAAQM,IAAI,CADe,AACdD,EAGnB,CAEF,OAAO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,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,EACA,sBACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TAhF,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[4]}
|
|
@@ -8,6 +8,6 @@ module.exports=[61724,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/ap
|
|
|
8
8
|
`)}}class o extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class s extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}},472,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RequestCookies:function(){return i.RequestCookies},ResponseCookies:function(){return i.ResponseCookies},stringifyCookie:function(){return i.stringifyCookie}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(19481)},29666,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={INTERNALS:function(){return u},NextRequest:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(99536),o=e.r(80333),s=e.r(47389),c=e.r(472),u=Symbol("internal request");class l extends Request{constructor(e,t={}){const r="string"!=typeof e&&"url"in e?e.url:String(e);(0,o.validateURL)(r),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(r,t);const n=new i.NextURL(r,{headers:(0,o.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[u]={cookies:new c.RequestCookies(this.headers),nextUrl:n,url:n.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[u].cookies}get nextUrl(){return this[u].nextUrl}get page(){throw new s.RemovedPageError}get ua(){throw new s.RemovedUAError}get url(){return this[u].url}}},30759,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},46633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"NextResponse",{enumerable:!0,get:function(){return d}});let n=e.r(472),a=e.r(99536),i=e.r(80333),o=e.r(30759),s=e.r(472),c=Symbol("internal response"),u=new Set([301,302,303,307,308]);function l(e,t){var r;if(null==e||null==(r=e.request)?void 0:r.headers){if(!(e.request.headers instanceof Headers))throw Object.defineProperty(Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});let r=[];for(let[n,a]of e.request.headers)t.set("x-middleware-request-"+n,a),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class d extends Response{constructor(e,t={}){super(e,t);const r=this.headers,u=new Proxy(new s.ResponseCookies(r),{get(e,a,i){switch(a){case"delete":case"set":return(...i)=>{let o=Reflect.apply(e[a],e,i),c=new Headers(r);return o instanceof s.ResponseCookies&&r.set("x-middleware-set-cookie",o.getAll().map(e=>(0,n.stringifyCookie)(e)).join(",")),l(t,c),o};default:return o.ReflectAdapter.get(e,a,i)}}});this[c]={cookies:u,url:t.url?new a.NextURL(t.url,{headers:(0,i.toNodeOutgoingHttpHeaders)(r),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[c].cookies}static json(e,t){let r=Response.json(e,t);return new d(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!u.has(r))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let n="object"==typeof t?t:{},a=new Headers(null==n?void 0:n.headers);return a.set("Location",(0,i.validateURL)(e)),new d(null,{...n,headers:a,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",(0,i.validateURL)(e)),l(t,r),new d(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),l(e,t),new d(null,{...e,headers:t})}}},87963,(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'),"__NEXT_ERROR_CODE",{value:"E183",enumerable:!1,configurable:!0})}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageResponse",{enumerable:!0,get:function(){return n}})},99299,(e,t,r)=>{var n={226:function(t,r){!function(n){"use strict";var a="function",i="undefined",o="object",s="string",c="major",u="model",l="name",d="type",h="vendor",p="version",f="architecture",g="console",m="mobile",b="tablet",v="smarttv",_="wearable",y="embedded",E="Amazon",R="Apple",w="ASUS",S="BlackBerry",x="Browser",O="Chrome",P="Firefox",T="Google",N="Huawei",A="Microsoft",C="Motorola",I="Opera",D="Samsung",j="Sharp",M="Sony",L="Xiaomi",k="Zebra",$="Facebook",U="Chromium OS",B="Mac OS",H=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},G=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},X=function(e,t){return typeof e===s&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,350)},F=function(e,t){for(var r,n,i,s,c,u,l=0;l<t.length&&!c;){var d=t[l],h=t[l+1];for(r=n=0;r<d.length&&!c&&d[r];)if(c=d[r++].exec(e))for(i=0;i<h.length;i++)u=c[++n],typeof(s=h[i])===o&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=u?u.replace(s[1],s[2]):void 0:this[s[0]]=u?s[1].call(this,u,s[2]):void 0:4===s.length&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):void 0):this[s]=u||void 0;l+=2}},W=function(e,t){for(var r in t)if(typeof t[r]===o&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(X(t[r][n],e))return"?"===r?void 0:r}else if(X(t[r],e))return"?"===r?void 0:r;return e},z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,p],[/opios[\/ ]+([\w\.]+)/i],[p,[l,I+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[l,I]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],p],[/\bfocus\/([\w\.]+)/i],[p,[l,P+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[l,I+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[l,I+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[l,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[p,[l,P]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+x]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+x],p],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,$],p],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[l,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[p,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[l,P+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,p],[/(cobalt)\/([\w\.]+)/i],[l,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,q]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,D],[d,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,D],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,R],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,R],[d,b]],[/(macintosh);/i],[u,[h,R]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,j],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,N],[d,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,N],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,C],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,C],[d,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,"LG"],[d,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,"LG"],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[u,[h,T],[d,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,M],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,M],[d,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,E],[d,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,E],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,S],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,w],[d,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,w],[d,m]],[/(nexus 9)/i],[u,[h,"HTC"],[d,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[d,b]],[/(surface duo)/i],[u,[h,A],[d,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[u,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,b]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,b]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,b]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,b]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,b]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,m]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,b]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,b]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,b]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,b]],[/(sprint) (\w+)/i],[h,u,[d,m]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,k],[d,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,k],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,v]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,D],[d,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[d,v]],[/(apple) ?tv/i],[h,[u,R+" TV"],[d,v]],[/crkey/i],[[u,O+"cast"],[h,T],[d,v]],[/droid.+aft(\w)( bui|\))/i],[u,[h,E],[d,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,j],[d,v]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,M],[d,v]],[/(mitv-\w{5}) bui/i],[u,[h,L],[d,v]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[d,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,V],[u,V],[d,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,M],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/((pebble))app/i],[h,u,[d,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,R],[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,k],[d,_]],[/(quest( 2| pro)?)/i],[u,[h,$],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,y]],[/(aeobc)\b/i],[u,[h,E],[d,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[p,W,z]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[p,W,z]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,B],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,p],[/\(bb(10);/i],[p,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[l,P+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[l,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,U],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,p],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,p]]},K=function(e,t){if(typeof e===o&&(t=e,e=void 0),!(this instanceof K))return new K(e,t).getResult();var r=typeof n!==i&&n.navigator?n.navigator:void 0,g=e||(r&&r.userAgent?r.userAgent:""),v=r&&r.userAgentData?r.userAgentData:void 0,_=t?H(Y,t):Y,y=r&&r.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=void 0,t[p]=void 0,F.call(t,g,_.browser),t[c]=typeof(e=t[p])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,y&&r&&r.brave&&typeof r.brave.isBrave==a&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[f]=void 0,F.call(e,g,_.cpu),e},this.getDevice=function(){var e={};return e[h]=void 0,e[u]=void 0,e[d]=void 0,F.call(e,g,_.device),y&&!e[d]&&v&&v.mobile&&(e[d]=m),y&&"Macintosh"==e[u]&&r&&typeof r.standalone!==i&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[u]="iPad",e[d]=b),e},this.getEngine=function(){var e={};return e[l]=void 0,e[p]=void 0,F.call(e,g,_.engine),e},this.getOS=function(){var e={};return e[l]=void 0,e[p]=void 0,F.call(e,g,_.os),y&&!e[l]&&v&&"Unknown"!=v.platform&&(e[l]=v.platform.replace(/chrome os/i,U).replace(/macos/i,B)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===s&&e.length>350?V(e,350):e,this},this.setUA(g),this};if(K.VERSION="1.0.35",K.BROWSER=G([l,p,c]),K.CPU=G([f]),K.DEVICE=G([u,h,d,g,m,v,b,_,y]),K.ENGINE=K.OS=G([l,p]),typeof r!==i)t.exports&&(r=t.exports=K),r.UAParser=K;else if(typeof define===a&&define.amd)e.r,void 0!==K&&e.v(K);else typeof n!==i&&(n.UAParser=K);var J=typeof n!==i&&(n.jQuery||n.Zepto);if(J&&!J.ua){var Z=new K;J.ua=Z.getResult(),J.ua.get=function(){return Z.getUA()},J.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)J.ua[r]=t[r]}}}(this)}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},o=!0;try{n[e].call(r.exports,r,r.exports,i),o=!1}finally{o&&delete a[e]}return r.exports}i.ab="/ROOT/node_modules/next/dist/compiled/ua-parser-js/",t.exports=i(226)},4386,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,a={isBot:function(){return s},userAgent:function(){return u},userAgentFromString:function(){return c}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});let o=(n=e.r(99299))&&n.__esModule?n:{default:n};function s(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver|GPTBot/i.test(e)}function c(e){return{...(0,o.default)(e),isBot:void 0!==e&&s(e)}}function u({headers:e}){return c(e.get("user-agent")||void 0)}},79187,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"URLPattern",{enumerable:!0,get:function(){return n}});let n="u"<typeof URLPattern?void 0:URLPattern},53309,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"after",{enumerable:!0,get:function(){return a}});let n=e.r(56704);function a(e){let t=n.workAsyncStorage.getStore();if(!t)throw Object.defineProperty(Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context"),"__NEXT_ERROR_CODE",{value:"E468",enumerable:!1,configurable:!0});let{afterContext:r}=t;return r.after(e)}},81053,(e,t,r)=>{"use strict";var n,a;Object.defineProperty(r,"__esModule",{value:!0}),n=e.r(53309),a=r,Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(a,e,{enumerable:!0,get:function(){return n[e]}})})},65252,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DynamicServerError:function(){return o},isDynamicServerError:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i="DYNAMIC_SERVER_USAGE";class o extends Error{constructor(e){super(`Dynamic server usage: ${e}`),this.description=e,this.digest=i}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===i}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},97573,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={StaticGenBailoutError:function(){return o},isStaticGenBailoutError:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i="NEXT_STATIC_GEN_BAILOUT";class o extends Error{constructor(...e){super(...e),this.code=i}}function s(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===i}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},76414,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"InvariantError",{enumerable:!0,get:function(){return n}});class n extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}},8211,(e,t,r)=>{"use strict";function n(){let e,t,r=new Promise((r,n)=>{e=r,t=n});return{resolve:e,reject:t,promise:r}}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createPromiseWithResolvers",{enumerable:!0,get:function(){return n}})},18185,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,a={RenderStage:function(){return c},StagedRenderingController:function(){return u}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});let o=e.r(76414),s=e.r(8211);var c=((n={})[n.Before=1]="Before",n[n.EarlyStatic=2]="EarlyStatic",n[n.Static=3]="Static",n[n.EarlyRuntime=4]="EarlyRuntime",n[n.Runtime=5]="Runtime",n[n.Dynamic=6]="Dynamic",n[n.Abandoned=7]="Abandoned",n);class u{constructor(e,t,r){this.abortSignal=e,this.abandonController=t,this.shouldTrackSyncIO=r,this.currentStage=1,this.syncInterruptReason=null,this.staticStageEndTime=1/0,this.runtimeStageEndTime=1/0,this.staticStageListeners=[],this.earlyRuntimeStageListeners=[],this.runtimeStageListeners=[],this.dynamicStageListeners=[],this.staticStagePromise=(0,s.createPromiseWithResolvers)(),this.earlyRuntimeStagePromise=(0,s.createPromiseWithResolvers)(),this.runtimeStagePromise=(0,s.createPromiseWithResolvers)(),this.dynamicStagePromise=(0,s.createPromiseWithResolvers)(),e&&e.addEventListener("abort",()=>{let{reason:t}=e;this.staticStagePromise.promise.catch(l),this.staticStagePromise.reject(t),this.earlyRuntimeStagePromise.promise.catch(l),this.earlyRuntimeStagePromise.reject(t),this.runtimeStagePromise.promise.catch(l),this.runtimeStagePromise.reject(t),this.dynamicStagePromise.promise.catch(l),this.dynamicStagePromise.reject(t)},{once:!0}),t&&t.signal.addEventListener("abort",()=>{this.abandonRender()},{once:!0})}onStage(e,t){if(this.currentStage>=e)t();else if(3===e)this.staticStageListeners.push(t);else if(4===e)this.earlyRuntimeStageListeners.push(t);else if(5===e)this.runtimeStageListeners.push(t);else if(6===e)this.dynamicStageListeners.push(t);else throw Object.defineProperty(new o.InvariantError(`Invalid render stage: ${e}`),"__NEXT_ERROR_CODE",{value:"E881",enumerable:!1,configurable:!0})}shouldTrackSyncInterrupt(){if(!this.shouldTrackSyncIO)return!1;switch(this.currentStage){case 1:case 5:case 6:case 7:default:return!1;case 2:case 3:case 4:return!0}}syncInterruptCurrentStageWithReason(e){if(1!==this.currentStage&&7!==this.currentStage){if(this.abandonController)return void this.abandonController.abort();if(this.abortSignal){this.syncInterruptReason=e,this.currentStage=7;return}switch(this.currentStage){case 2:case 3:case 4:this.syncInterruptReason=e,this.advanceStage(6);return;case 5:return}}}getSyncInterruptReason(){return this.syncInterruptReason}getStaticStageEndTime(){return this.staticStageEndTime}getRuntimeStageEndTime(){return this.runtimeStageEndTime}abandonRender(){let{currentStage:e}=this;switch(e){case 2:this.resolveStaticStage();case 3:this.resolveEarlyRuntimeStage();case 4:this.resolveRuntimeStage();case 5:this.currentStage=7;return}}advanceStage(e){if(e<=this.currentStage)return;let t=this.currentStage;if(this.currentStage=e,t<3&&e>=3&&this.resolveStaticStage(),t<4&&e>=4&&this.resolveEarlyRuntimeStage(),t<5&&e>=5&&(this.staticStageEndTime=performance.now()+performance.timeOrigin,this.resolveRuntimeStage()),t<6&&e>=6){this.runtimeStageEndTime=performance.now()+performance.timeOrigin,this.resolveDynamicStage();return}}resolveStaticStage(){let e=this.staticStageListeners;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.staticStagePromise.resolve()}resolveEarlyRuntimeStage(){let e=this.earlyRuntimeStageListeners;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.earlyRuntimeStagePromise.resolve()}resolveRuntimeStage(){let e=this.runtimeStageListeners;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.runtimeStagePromise.resolve()}resolveDynamicStage(){let e=this.dynamicStageListeners;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.dynamicStagePromise.resolve()}getStagePromise(e){switch(e){case 3:return this.staticStagePromise.promise;case 4:return this.earlyRuntimeStagePromise.promise;case 5:return this.runtimeStagePromise.promise;case 6:return this.dynamicStagePromise.promise;default:throw Object.defineProperty(new o.InvariantError(`Invalid render stage: ${e}`),"__NEXT_ERROR_CODE",{value:"E881",enumerable:!1,configurable:!0})}}waitForStage(e){return this.getStagePromise(e)}delayUntilStage(e,t,r){var n,a,i;let o,s=(n=this.getStagePromise(e),a=t,i=r,o=new Promise((e,t)=>{n.then(e.bind(null,i),t)}),void 0!==a&&(o.displayName=a),o);return this.abortSignal&&s.catch(l),s}}function l(){}},4642,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={delayUntilRuntimeStage:function(){return f},getRuntimeStage:function(){return p},isHangingPromiseRejectionError:function(){return o},makeDevtoolsIOAwarePromise:function(){return h},makeHangingPromise:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(18185);function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===s}let s="HANGING_PROMISE_REJECTION";class c extends Error{constructor(e,t){super(`During prerendering, ${t} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${t} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${e}".`),this.route=e,this.expression=t,this.digest=s}}let u=new WeakMap;function l(e,t,r){if(e.aborted)return Promise.reject(new c(t,r));{let n=new Promise((n,a)=>{let i=a.bind(null,new c(t,r)),o=u.get(e);if(o)o.push(i);else{let t=[i];u.set(e,t),e.addEventListener("abort",()=>{for(let e=0;e<t.length;e++)t[e]()},{once:!0})}});return n.catch(d),n}}function d(){}function h(e,t,r){return t.stagedRendering?t.stagedRendering.delayUntilStage(r,void 0,e):new Promise(t=>{setTimeout(()=>{t(e)},0)})}function p(e){return e.currentStage===i.RenderStage.EarlyStatic||e.currentStage===i.RenderStage.EarlyRuntime?i.RenderStage.EarlyRuntime:i.RenderStage.Runtime}function f(e,t){let{stagedRendering:r}=e;return r?r.waitForStage(p(r)).then(()=>t):t}},96306,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={METADATA_BOUNDARY_NAME:function(){return i},OUTLET_BOUNDARY_NAME:function(){return s},ROOT_LAYOUT_BOUNDARY_NAME:function(){return c},VIEWPORT_BOUNDARY_NAME:function(){return o}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i="__next_metadata_boundary__",o="__next_viewport_boundary__",s="__next_outlet_boundary__",c="__next_root_layout_boundary__"},38244,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={atLeastOneTask:function(){return s},scheduleImmediate:function(){return o},scheduleOnNextTick:function(){return i},waitAtLeastOneReactRenderTask:function(){return c}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e=>{Promise.resolve().then(()=>{process.nextTick(e)})},o=e=>{setImmediate(e)};function s(){return new Promise(e=>o(e))}function c(){return new Promise(e=>setImmediate(e))}},31584,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={BailoutToCSRError:function(){return o},isBailoutToCSRError:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i="BAILOUT_TO_CLIENT_SIDE_RENDERING";class o extends Error{constructor(e){super(`Bail out to client-side rendering: ${e}`),this.reason=e,this.digest=i}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===i}},25412,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"INSTANT_VALIDATION_BOUNDARY_NAME",{enumerable:!0,get:function(){return n}});let n="__next_instant_validation_boundary__"},68665,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,a,i,o={DynamicHoleKind:function(){return Z},Postpone:function(){return N},PreludeState:function(){return ei},abortAndThrowOnSynchronousRequestDataAccess:function(){return T},abortOnSynchronousPlatformIOAccess:function(){return P},accessedDynamicData:function(){return k},annotateDynamicAccess:function(){return G},consumeDynamicAccess:function(){return $},createDynamicTrackingState:function(){return y},createDynamicValidationState:function(){return E},createHangingInputAbortSignal:function(){return H},createInstantValidationState:function(){return Q},createRenderInBrowserAbortSignal:function(){return B},formatDynamicAPIAccesses:function(){return U},getFirstDynamicReason:function(){return R},getNavigationDisallowedDynamicReasons:function(){return eu},getStaticShellDisallowedDynamicReasons:function(){return ec},isDynamicPostpone:function(){return I},isPrerenderInterruptedError:function(){return L},logDisallowedDynamicError:function(){return eo},markCurrentScopeAsDynamic:function(){return w},postponeWithTracking:function(){return A},throwIfDisallowedDynamic:function(){return es},throwToInterruptStaticGeneration:function(){return S},trackAllowedDynamicAccess:function(){return J},trackDynamicDataInDynamicRender:function(){return x},trackDynamicHoleInNavigation:function(){return ee},trackDynamicHoleInRuntimeShell:function(){return er},trackDynamicHoleInStaticShell:function(){return en},trackThrownErrorInNavigation:function(){return et},useDynamicRouteParams:function(){return X},useDynamicSearchParams:function(){return q}};for(var s in o)Object.defineProperty(r,s,{enumerable:!0,get:o[s]});let c=(n=e.r(47540))&&n.__esModule?n:{default:n},u=e.r(65252),l=e.r(97573),d=e.r(32319),h=e.r(56704),p=e.r(4642),f=e.r(96306),g=e.r(38244),m=e.r(31584),b=e.r(76414),v=e.r(25412),_="function"==typeof c.default.unstable_postpone;function y(e){return{isDebugDynamicAccesses:e,dynamicAccesses:[],syncDynamicErrorWithStack:null}}function E(){return{hasSuspenseAboveBody:!1,hasDynamicMetadata:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[]}}function R(e){var t;return null==(t=e.dynamicAccesses[0])?void 0:t.expression}function w(e,t,r){if(t)switch(t.type){case"cache":case"unstable-cache":case"private-cache":return}if(!e.forceDynamic&&!e.forceStatic){if(e.dynamicShouldError)throw Object.defineProperty(new l.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(t)switch(t.type){case"prerender-ppr":return A(e.route,r,t.dynamicTracking);case"prerender-legacy":t.revalidate=0;let n=Object.defineProperty(new u.DynamicServerError(`Route ${e.route} couldn't be rendered statically because it used ${r}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}function S(e,t,r){let n=Object.defineProperty(new u.DynamicServerError(`Route ${t.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw r.revalidate=0,t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}function x(e){switch(e.type){case"cache":case"unstable-cache":case"private-cache":return}}function O(e,t,r){let n=M(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let a=r.dynamicTracking;a&&a.dynamicAccesses.push({stack:a.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}function P(e,t,r,n){let a=n.dynamicTracking;O(e,t,n),a&&null===a.syncDynamicErrorWithStack&&(a.syncDynamicErrorWithStack=r)}function T(e,t,r,n){if(!1===n.controller.signal.aborted){O(e,t,n);let a=n.dynamicTracking;a&&null===a.syncDynamicErrorWithStack&&(a.syncDynamicErrorWithStack=r)}throw M(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`)}function N({reason:e,route:t}){let r=d.workUnitAsyncStorage.getStore();A(t,e,r&&"prerender-ppr"===r.type?r.dynamicTracking:null)}function A(e,t,r){(function(){if(!_)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})})(),r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),c.default.unstable_postpone(C(e,t))}function C(e,t){return`Route ${e} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function I(e){return"object"==typeof e&&null!==e&&"string"==typeof e.message&&D(e.message)}function D(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===D(C("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let j="NEXT_PRERENDER_INTERRUPTED";function M(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest=j,t}function L(e){return"object"==typeof e&&null!==e&&e.digest===j&&"name"in e&&"message"in e&&e instanceof Error}function k(e){return e.length>0}function $(e,t){return e.dynamicAccesses.push(...t.dynamicAccesses),e.dynamicAccesses}function U(e){return e.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" (<anonymous>)")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}:
|
|
9
9
|
${t}`))}function B(){let e=new AbortController;return e.abort(Object.defineProperty(new m.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),e.signal}function H(e){switch(e.type){case"prerender":case"prerender-runtime":let t=new AbortController;if(e.cacheSignal)e.cacheSignal.inputReady().then(()=>{t.abort()});else if("prerender-runtime"===e.type&&e.stagedRendering){let{stagedRendering:r}=e;r.waitForStage((0,p.getRuntimeStage)(r)).then(()=>(0,g.scheduleOnNextTick)(()=>t.abort()))}else(0,g.scheduleOnNextTick)(()=>t.abort());return t.signal;case"prerender-client":case"validation-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":case"generate-static-params":return}}function G(e,t){let r=t.dynamicTracking;r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:e})}function X(e){let t=h.workAsyncStorage.getStore(),r=d.workUnitAsyncStorage.getStore();if(t&&r)switch(r.type){case"prerender-client":case"prerender":{let n=r.fallbackRouteParams;n&&n.size>0&&c.default.use((0,p.makeHangingPromise)(r.renderSignal,t.route,e));break}case"prerender-ppr":{let n=r.fallbackRouteParams;if(n&&n.size>0)return A(t.route,e,r.dynamicTracking);break}case"validation-client":case"prerender-legacy":case"request":case"unstable-cache":break;case"prerender-runtime":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called during a runtime prerender. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called in \`generateStaticParams\`. Next.js should be preventing ${e} from being included in server component files statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1130",enumerable:!1,configurable:!0})}}function q(e){let t=h.workAsyncStorage.getStore(),r=d.workUnitAsyncStorage.getStore();if(t)switch(!r&&(0,d.throwForMissingRequestStore)(e),r.type){case"validation-client":case"request":return;case"prerender-client":c.default.use((0,p.makeHangingPromise)(r.renderSignal,t.route,e));break;case"prerender-legacy":case"prerender-ppr":if(t.forceStatic)return;throw Object.defineProperty(new m.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called from a Server Component. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"cache":case"unstable-cache":case"private-cache":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(new b.InvariantError(`\`${e}\` was called in \`generateStaticParams\`. Next.js should be preventing ${e} from being included in server component files statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1130",enumerable:!1,configurable:!0})}}let V=/\n\s+at Suspense \(<anonymous>\)/,F=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${f.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),W=RegExp(`\\n\\s+at ${f.METADATA_BOUNDARY_NAME}[\\n\\s]`),z=RegExp(`\\n\\s+at ${f.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),Y=RegExp(`\\n\\s+at ${f.OUTLET_BOUNDARY_NAME}[\\n\\s]`),K=RegExp(`\\n\\s+at ${v.INSTANT_VALIDATION_BOUNDARY_NAME}[\\n\\s]`);function J(e,t,r,n){if(!Y.test(t)){if(W.test(t)){r.hasDynamicMetadata=!0;return}if(z.test(t)){r.hasDynamicViewport=!0;return}if(F.test(t)){r.hasAllowedDynamic=!0,r.hasSuspenseAboveBody=!0;return}else if(V.test(t)){r.hasAllowedDynamic=!0;return}else{if(n.syncDynamicErrorWithStack)return void r.dynamicErrors.push(n.syncDynamicErrorWithStack);let a=ea(Object.defineProperty(Error(`Route "${e.route}": Uncached data was accessed outside of <Suspense>. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`),"__NEXT_ERROR_CODE",{value:"E1079",enumerable:!1,configurable:!0}),t,null);return void r.dynamicErrors.push(a)}}}var Z=((a={})[a.Runtime=1]="Runtime",a[a.Dynamic=2]="Dynamic",a);function Q(e){return{hasDynamicMetadata:!1,hasAllowedClientDynamicAboveBoundary:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[],validationPreventingErrors:[],thrownErrorsOutsideBoundary:[],createInstantStack:e}}function ee(e,t,r,n,a,i){if(Y.test(t))return;if(W.test(t)){let n=ea(Object.defineProperty(Error(`Route "${e.route}": ${1===a?"Runtime data such as `cookies()`, `headers()`, `params`, or `searchParams` was accessed inside `generateMetadata` or you have file-based metadata such as icons that depend on dynamic params segments.":"Uncached data or `connection()` was accessed inside `generateMetadata`."} Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),"__NEXT_ERROR_CODE",{value:"E1076",enumerable:!1,configurable:!0}),t,r.createInstantStack);r.dynamicMetadata=n;return}if(z.test(t)){let n=ea(Object.defineProperty(Error(`Route "${e.route}": ${1===a?"Runtime data such as `cookies()`, `headers()`, `params`, or `searchParams` was accessed inside `generateViewport`.":"Uncached data or `connection()` was accessed inside `generateViewport`."} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),"__NEXT_ERROR_CODE",{value:"E1086",enumerable:!1,configurable:!0}),t,r.createInstantStack);r.dynamicErrors.push(n);return}let o=K.exec(t);if(o){let e=V.exec(t);if(e&&e.index<o.index){r.hasAllowedDynamic=!0;return}}else if(i.expectedIds.size===i.renderedIds.size){r.hasAllowedClientDynamicAboveBoundary=!0,r.hasAllowedDynamic=!0;return}else{let n=ea(Object.defineProperty(Error(`Route "${e.route}": Could not validate \`unstable_instant\` because a Client Component in a parent segment prevented the page from rendering.`),"__NEXT_ERROR_CODE",{value:"E1082",enumerable:!1,configurable:!0}),t,r.createInstantStack);r.validationPreventingErrors.push(n);return}if(n.syncDynamicErrorWithStack){let e=n.syncDynamicErrorWithStack;null!==r.createInstantStack&&void 0===e.cause&&(e.cause=r.createInstantStack()),r.dynamicErrors.push(e);return}let s=ea(Object.defineProperty(Error(`Route "${e.route}": ${1===a?"Runtime data such as `cookies()`, `headers()`, `params`, or `searchParams` was accessed outside of `<Suspense>`.":"Uncached data or `connection()` was accessed outside of `<Suspense>`."} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`),"__NEXT_ERROR_CODE",{value:"E1078",enumerable:!1,configurable:!0}),t,r.createInstantStack);r.dynamicErrors.push(s)}function et(e,t,r,n){let a=K.exec(n);if(a){let i=V.exec(n);if(i&&i.index<a.index)return;let o=ea(Object.defineProperty(Error(`Route "${e.route}": Could not validate \`unstable_instant\` because an error prevented the target segment from rendering.`,{cause:r}),"__NEXT_ERROR_CODE",{value:"E1112",enumerable:!1,configurable:!0}),n,null);t.validationPreventingErrors.push(o)}else{let e=ea(Object.defineProperty(Error("An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.",{cause:r}),"__NEXT_ERROR_CODE",{value:"E1118",enumerable:!1,configurable:!0}),n,null);t.thrownErrorsOutsideBoundary.push(e)}}function er(e,t,r,n){if(Y.test(t))return;if(W.test(t)){r.dynamicMetadata=ea(Object.defineProperty(Error(`Route "${e.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),"__NEXT_ERROR_CODE",{value:"E1080",enumerable:!1,configurable:!0}),t,null);return}if(z.test(t)){let n=ea(Object.defineProperty(Error(`Route "${e.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),"__NEXT_ERROR_CODE",{value:"E1077",enumerable:!1,configurable:!0}),t,null);r.dynamicErrors.push(n);return}if(F.test(t)){r.hasAllowedDynamic=!0,r.hasSuspenseAboveBody=!0;return}if(V.test(t)){r.hasAllowedDynamic=!0;return}else if(n.syncDynamicErrorWithStack)return void r.dynamicErrors.push(n.syncDynamicErrorWithStack);let a=ea(Object.defineProperty(Error(`Route "${e.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`),"__NEXT_ERROR_CODE",{value:"E1084",enumerable:!1,configurable:!0}),t,null);r.dynamicErrors.push(a)}function en(e,t,r,n){if(!Y.test(t)){if(W.test(t)){r.dynamicMetadata=ea(Object.defineProperty(Error(`Route "${e.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),"__NEXT_ERROR_CODE",{value:"E1085",enumerable:!1,configurable:!0}),t,null);return}if(z.test(t)){let n=ea(Object.defineProperty(Error(`Route "${e.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),"__NEXT_ERROR_CODE",{value:"E1081",enumerable:!1,configurable:!0}),t,null);r.dynamicErrors.push(n);return}if(F.test(t)){r.hasAllowedDynamic=!0,r.hasSuspenseAboveBody=!0;return}else if(V.test(t)){r.hasAllowedDynamic=!0;return}else{if(n.syncDynamicErrorWithStack)return void r.dynamicErrors.push(n.syncDynamicErrorWithStack);let a=ea(Object.defineProperty(Error(`Route "${e.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`),"__NEXT_ERROR_CODE",{value:"E1083",enumerable:!1,configurable:!0}),t,null);return void r.dynamicErrors.push(a)}}}function ea(e,t,r){return null!==r&&(e.cause=r()),e.stack=e.name+": "+e.message+t,e}var ei=((i={})[i.Full=0]="Full",i[i.Empty=1]="Empty",i[i.Errored=2]="Errored",i);function eo(e,t){console.error(t),console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
|
10
10
|
- Start the app in development mode by running \`next dev\`, then open "${e.route}" in your browser to investigate the error.
|
|
11
|
-
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`)}function es(e,t,r,n){if(n.syncDynamicErrorWithStack)throw eo(e,n.syncDynamicErrorWithStack),new l.StaticGenBailoutError;if(0!==t){if(r.hasSuspenseAboveBody)return;let n=r.dynamicErrors;if(n.length>0){for(let t=0;t<n.length;t++)eo(e,n[t]);throw new l.StaticGenBailoutError}if(r.hasDynamicViewport)throw console.error(`Route "${e.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new l.StaticGenBailoutError;if(1===t)throw console.error(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new l.StaticGenBailoutError}else if(!1===r.hasAllowedDynamic&&r.hasDynamicMetadata)throw console.error(`Route "${e.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new l.StaticGenBailoutError}function ec(e,t,r,n){if(n||r.hasSuspenseAboveBody)return[];if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t)return[Object.defineProperty(new b.InvariantError(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===r.hasAllowedDynamic&&0===r.dynamicErrors.length&&r.dynamicMetadata)return[r.dynamicMetadata];return[]}function eu(e,t,r,n,a){if(n){let{missingSampleErrors:e}=n;if(e.length>0)return e}let{validationPreventingErrors:i}=r;if(i.length>0)return i;if(a.renderedIds.size<a.expectedIds.size){let{thrownErrorsOutsideBoundary:t,createInstantStack:n}=r;if(0===t.length){let t=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering for an unknown reason.`,r=null!==n?n():Error();return r.name="Error",r.message=t,[r]}if(1===t.length){let r=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to the following error.`,a=null!==n?n():Error();return a.name="Error",a.message=r,[a,t[0]]}{let r=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to one of the following errors.`,a=null!==n?n():Error();return a.name="Error",a.message=r,[a,...t]}}if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t)return r.hasAllowedClientDynamicAboveBoundary?[]:[Object.defineProperty(new b.InvariantError(`Route "${e.route}" failed to render during instant validation and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E1055",enumerable:!1,configurable:!0})]}else{let e=r.dynamicErrors;if(e.length>0)return e;if(!1===r.hasAllowedDynamic&&r.dynamicMetadata)return[r.dynamicMetadata]}return[]}},43824,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={isRequestAPICallableInsideAfter:function(){return u},throwForSearchParamsAccessInUseCache:function(){return c},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(97573),o=e.r(24725);function s(e,t){throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function c(e,t){let r=Object.defineProperty(Error(`Route ${e.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(r,t),e.invalidDynamicUsageError??=r,r}function u(){let e=o.afterTaskAsyncStorage.getStore();return(null==e?void 0:e.rootTaskSpawnPhase)==="action"}},75674,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"connection",{enumerable:!0,get:function(){return l}});let n=e.r(56704),a=e.r(32319),i=e.r(68665),o=e.r(97573),s=e.r(4642),c=e.r(43824);e.r(18185);let u=e.r(76414);function l(){let e=n.workAsyncStorage.getStore(),t=a.workUnitAsyncStorage.getStore();if(e){if(t&&"after"===t.phase&&!(0,c.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`after()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but \`after()\` executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E827",enumerable:!1,configurable:!0});if(e.forceStatic)return Promise.resolve(void 0);if(e.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E847",enumerable:!1,configurable:!0});if(t)switch(t.type){case"cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E841",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"private-cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E837",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"unstable-cache":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside a function cached with \`unstable_cache()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E840",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1125",enumerable:!1,configurable:!0});case"prerender":case"prerender-client":case"prerender-runtime":return(0,s.makeHangingPromise)(t.renderSignal,e.route,"`connection()`");case"validation-client":{let e="`connection`";throw Object.defineProperty(new u.InvariantError(`${e} must not be used within a Client Component. Next.js should be preventing ${e} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1063",enumerable:!1,configurable:!0})}case"prerender-ppr":return(0,i.postponeWithTracking)(e.route,"connection",t.dynamicTracking);case"prerender-legacy":return(0,i.throwToInterruptStaticGeneration)("connection",e,t);case"request":if((0,i.trackDynamicDataInDynamicRender)(t),t.asyncApiPromises)return t.asyncApiPromises.connection;return Promise.resolve(void 0)}}(0,a.throwForMissingRequestStore)("connection")}},89171,(e,t,r)=>{let n={NextRequest:e.r(29666).NextRequest,NextResponse:e.r(46633).NextResponse,ImageResponse:e.r(87963).ImageResponse,userAgentFromString:e.r(4386).userAgentFromString,userAgent:e.r(4386).userAgent,URLPattern:e.r(79187).URLPattern,after:e.r(81053).after,connection:e.r(75674).connection};t.exports=n,r.NextRequest=n.NextRequest,r.NextResponse=n.NextResponse,r.ImageResponse=n.ImageResponse,r.userAgentFromString=n.userAgentFromString,r.userAgent=n.userAgent,r.URLPattern=n.URLPattern,r.after=n.after,r.connection=n.connection}];
|
|
11
|
+
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`)}function es(e,t,r,n){if(n.syncDynamicErrorWithStack)throw eo(e,n.syncDynamicErrorWithStack),new l.StaticGenBailoutError;if(0!==t){if(r.hasSuspenseAboveBody)return;let n=r.dynamicErrors;if(n.length>0){for(let t=0;t<n.length;t++)eo(e,n[t]);throw new l.StaticGenBailoutError}if(r.hasDynamicViewport)throw console.error(`Route "${e.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new l.StaticGenBailoutError;if(1===t)throw console.error(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new l.StaticGenBailoutError}else if(!1===r.hasAllowedDynamic&&r.hasDynamicMetadata)throw console.error(`Route "${e.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new l.StaticGenBailoutError}function ec(e,t,r,n){if(n||r.hasSuspenseAboveBody)return[];if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t)return[Object.defineProperty(new b.InvariantError(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===r.hasAllowedDynamic&&0===r.dynamicErrors.length&&r.dynamicMetadata)return[r.dynamicMetadata];return[]}function eu(e,t,r,n,a){if(n){let{missingSampleErrors:e}=n;if(e.length>0)return e}let{validationPreventingErrors:i}=r;if(i.length>0)return i;if(a.renderedIds.size<a.expectedIds.size){let{thrownErrorsOutsideBoundary:t,createInstantStack:n}=r;if(0===t.length){let t=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering for an unknown reason.`,r=null!==n?n():Error();return r.name="Error",r.message=t,[r]}if(1===t.length){let r=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to the following error.`,a=null!==n?n():Error();return a.name="Error",a.message=r,[a,t[0]]}{let r=`Route "${e.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to one of the following errors.`,a=null!==n?n():Error();return a.name="Error",a.message=r,[a,...t]}}if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t)return r.hasAllowedClientDynamicAboveBoundary?[]:[Object.defineProperty(new b.InvariantError(`Route "${e.route}" failed to render during instant validation and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E1055",enumerable:!1,configurable:!0})]}else{let e=r.dynamicErrors;if(e.length>0)return e;if(!1===r.hasAllowedDynamic&&r.dynamicMetadata)return[r.dynamicMetadata]}return[]}},43824,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={isRequestAPICallableInsideAfter:function(){return u},throwForSearchParamsAccessInUseCache:function(){return c},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(97573),o=e.r(24725);function s(e,t){throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function c(e,t){let r=Object.defineProperty(Error(`Route ${e.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(r,t),e.invalidDynamicUsageError??=r,r}function u(){let e=o.afterTaskAsyncStorage.getStore();return(null==e?void 0:e.rootTaskSpawnPhase)==="action"}},75674,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"connection",{enumerable:!0,get:function(){return l}});let n=e.r(56704),a=e.r(32319),i=e.r(68665),o=e.r(97573),s=e.r(4642),c=e.r(43824);e.r(18185);let u=e.r(76414);function l(){let e=n.workAsyncStorage.getStore(),t=a.workUnitAsyncStorage.getStore();if(e){if(t&&"after"===t.phase&&!(0,c.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`after()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but \`after()\` executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E827",enumerable:!1,configurable:!0});if(e.forceStatic)return Promise.resolve(void 0);if(e.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E847",enumerable:!1,configurable:!0});if(t)switch(t.type){case"cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E841",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"private-cache":{let t=Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E837",enumerable:!1,configurable:!0});throw Error.captureStackTrace(t,l),e.invalidDynamicUsageError??=t,t}case"unstable-cache":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside a function cached with \`unstable_cache()\`. The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E840",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${e.route} used \`connection()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1125",enumerable:!1,configurable:!0});case"prerender":case"prerender-client":case"prerender-runtime":return(0,s.makeHangingPromise)(t.renderSignal,e.route,"`connection()`");case"validation-client":{let e="`connection`";throw Object.defineProperty(new u.InvariantError(`${e} must not be used within a Client Component. Next.js should be preventing ${e} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1063",enumerable:!1,configurable:!0})}case"prerender-ppr":return(0,i.postponeWithTracking)(e.route,"connection",t.dynamicTracking);case"prerender-legacy":return(0,i.throwToInterruptStaticGeneration)("connection",e,t);case"request":if((0,i.trackDynamicDataInDynamicRender)(t),t.asyncApiPromises)return t.asyncApiPromises.connection;return Promise.resolve(void 0)}}(0,a.throwForMissingRequestStore)("connection")}},89171,(e,t,r)=>{let n={NextRequest:e.r(29666).NextRequest,NextResponse:e.r(46633).NextResponse,ImageResponse:e.r(87963).ImageResponse,userAgentFromString:e.r(4386).userAgentFromString,userAgent:e.r(4386).userAgent,URLPattern:e.r(79187).URLPattern,after:e.r(81053).after,connection:e.r(75674).connection};t.exports=n,r.NextRequest=n.NextRequest,r.NextResponse=n.NextResponse,r.ImageResponse=n.ImageResponse,r.userAgentFromString=n.userAgentFromString,r.userAgent=n.userAgent,r.URLPattern=n.URLPattern,r.after=n.after,r.connection=n.connection},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))}];
|
|
12
12
|
|
|
13
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
13
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0i83~95._.js.map
|