dev3000 0.0.83 → 0.0.85

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.
Files changed (156) hide show
  1. package/dist/dev-environment.d.ts.map +1 -1
  2. package/dist/dev-environment.js +37 -192
  3. package/dist/dev-environment.js.map +1 -1
  4. package/dist/src/tui-interface-impl.tsx +1 -1
  5. package/dist/tui-interface-impl.js +1 -1
  6. package/dist/tui-interface-impl.js.map +1 -1
  7. package/mcp-server/.next/BUILD_ID +1 -1
  8. package/mcp-server/.next/app-path-routes-manifest.json +1 -0
  9. package/mcp-server/.next/build-manifest.json +5 -6
  10. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  11. package/mcp-server/.next/next-server.js.nft.json +1 -1
  12. package/mcp-server/.next/prerender-manifest.json +3 -3
  13. package/mcp-server/.next/server/app/_global-error/page/build-manifest.json +3 -4
  14. package/mcp-server/.next/server/app/_global-error/page.js +1 -1
  15. package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
  16. package/mcp-server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  17. package/mcp-server/.next/server/app/_global-error.html +2 -2
  18. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  19. package/mcp-server/.next/server/app/_not-found/page/build-manifest.json +3 -4
  20. package/mcp-server/.next/server/app/_not-found/page.js +1 -1
  21. package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/mcp-server/.next/server/app/_not-found.html +1 -1
  24. package/mcp-server/.next/server/app/_not-found.rsc +2 -2
  25. package/mcp-server/.next/server/app/api/jank/[session]/route.js +1 -1
  26. package/mcp-server/.next/server/app/api/jank/[session]/route.js.nft.json +1 -1
  27. package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
  28. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  29. package/mcp-server/.next/server/app/api/logs/rotate/route.js +1 -1
  30. package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
  31. package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
  32. package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
  33. package/mcp-server/.next/server/app/api/orchestrator/route/app-paths-manifest.json +3 -0
  34. package/mcp-server/.next/server/app/api/orchestrator/route/build-manifest.json +11 -0
  35. package/mcp-server/.next/server/app/api/orchestrator/route/server-reference-manifest.json +4 -0
  36. package/mcp-server/.next/server/app/api/orchestrator/route.js +8 -0
  37. package/mcp-server/.next/server/app/api/orchestrator/route.js.map +5 -0
  38. package/mcp-server/.next/server/app/api/orchestrator/route.js.nft.json +1 -0
  39. package/mcp-server/.next/server/app/api/orchestrator/route_client-reference-manifest.js +2 -0
  40. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js +1 -1
  41. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
  42. package/mcp-server/.next/server/app/api/screenshots/list/route.js +1 -1
  43. package/mcp-server/.next/server/app/api/screenshots/list/route.js.nft.json +1 -1
  44. package/mcp-server/.next/server/app/index.html +1 -1
  45. package/mcp-server/.next/server/app/index.rsc +3 -3
  46. package/mcp-server/.next/server/app/logs/page/build-manifest.json +3 -4
  47. package/mcp-server/.next/server/app/logs/page.js +1 -1
  48. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  49. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  50. package/mcp-server/.next/server/app/mcp/route.js +4 -3
  51. package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
  52. package/mcp-server/.next/server/app/page/build-manifest.json +3 -4
  53. package/mcp-server/.next/server/app/page.js +1 -1
  54. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  55. package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
  56. package/mcp-server/.next/server/app/video/[session]/page/build-manifest.json +3 -4
  57. package/mcp-server/.next/server/app/video/[session]/page.js +1 -1
  58. package/mcp-server/.next/server/app/video/[session]/page.js.nft.json +1 -1
  59. package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
  60. package/mcp-server/.next/server/app-paths-manifest.json +1 -0
  61. package/mcp-server/.next/server/chunks/[externals]_node:crypto_c20cce38._.js +3 -0
  62. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js +3 -0
  63. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js.map +1 -0
  64. package/mcp-server/.next/server/chunks/{[root-of-the-server]__6ee9a99f._.js → [root-of-the-server]__3130ceec._.js} +2 -2
  65. package/mcp-server/.next/server/chunks/[root-of-the-server]__4637d3dd._.js +3 -0
  66. package/mcp-server/.next/server/chunks/{[root-of-the-server]__bc773251._.js → [root-of-the-server]__5114419d._.js} +2 -2
  67. package/mcp-server/.next/server/chunks/[root-of-the-server]__5248c9ff._.js +3 -0
  68. package/mcp-server/.next/server/chunks/[root-of-the-server]__5248c9ff._.js.map +1 -0
  69. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js +7 -0
  70. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js.map +1 -0
  71. package/mcp-server/.next/server/chunks/{[root-of-the-server]__55c04517._.js → [root-of-the-server]__a004a307._.js} +2 -2
  72. package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js +91 -0
  73. package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js.map +1 -0
  74. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js +7 -0
  75. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js.map +1 -0
  76. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js +17 -0
  77. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js.map +1 -0
  78. package/mcp-server/.next/server/chunks/mcp-server__next-internal_server_app_api_orchestrator_route_actions_c6fba9ec.js +3 -0
  79. package/mcp-server/.next/server/chunks/mcp-server__next-internal_server_app_api_orchestrator_route_actions_c6fba9ec.js.map +1 -0
  80. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__61c905ce._.js +3 -0
  81. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__bf771f7e._.js.map → [root-of-the-server]__61c905ce._.js.map} +1 -1
  82. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js +3 -0
  83. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js.map +1 -0
  84. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9bc632fa._.js +3 -0
  85. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__c4e78a20._.js.map → [root-of-the-server]__9bc632fa._.js.map} +1 -1
  86. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__a4bb31a6._.js +3 -0
  87. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__a4bb31a6._.js.map +1 -0
  88. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__cf17e26a._.js → [root-of-the-server]__aed64cd3._.js} +2 -2
  89. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__aed64cd3._.js.map +1 -0
  90. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cf030fda._.js +3 -0
  91. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cf030fda._.js.map +1 -0
  92. package/mcp-server/.next/server/chunks/ssr/{_96ba1d8e._.js → _74bf5366._.js} +2 -2
  93. package/mcp-server/.next/server/chunks/ssr/_74bf5366._.js.map +1 -0
  94. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js +3 -0
  95. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js.map +1 -0
  96. package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js +3 -0
  97. package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js.map +1 -0
  98. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js +3 -0
  99. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js.map +1 -0
  100. package/mcp-server/.next/server/middleware-build-manifest.js +3 -4
  101. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  102. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  103. package/mcp-server/.next/static/chunks/{55cedb1a993e951c.js → 1d2676338b51bbcf.js} +1 -1
  104. package/mcp-server/.next/static/chunks/312a4c1c7f6436ef.js +1 -0
  105. package/mcp-server/.next/static/chunks/8364b81221aabb64.js +1 -0
  106. package/mcp-server/.next/static/chunks/a42830291751fe48.js +1 -0
  107. package/mcp-server/.next/static/chunks/bb2e6ac36794beea.css +1 -0
  108. package/mcp-server/.next/static/chunks/c578923146856601.js +1 -0
  109. package/mcp-server/.next/static/chunks/turbopack-22a9e2c19fd12b04.js +3 -0
  110. package/mcp-server/app/api/orchestrator/route.ts +73 -0
  111. package/mcp-server/app/globals.css +0 -1
  112. package/mcp-server/app/logs/LogsClient.infinite-loop.test.tsx +1 -1
  113. package/mcp-server/app/mcp/client-manager.ts +281 -0
  114. package/mcp-server/app/mcp/route.ts +166 -0
  115. package/mcp-server/app/mcp/tools.ts +71 -18
  116. package/mcp-server/app/page.tsx +79 -65
  117. package/mcp-server/package.json +7 -9
  118. package/package.json +3 -8
  119. package/src/tui-interface-impl.tsx +1 -1
  120. package/mcp-server/.next/server/chunks/[root-of-the-server]__00592d3f._.js +0 -91
  121. package/mcp-server/.next/server/chunks/[root-of-the-server]__00592d3f._.js.map +0 -1
  122. package/mcp-server/.next/server/chunks/[root-of-the-server]__177c72c6._.js +0 -17
  123. package/mcp-server/.next/server/chunks/[root-of-the-server]__177c72c6._.js.map +0 -1
  124. package/mcp-server/.next/server/chunks/[root-of-the-server]__2942c072._.js +0 -3
  125. package/mcp-server/.next/server/chunks/[root-of-the-server]__e6dcd8bf._.js +0 -3
  126. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__22d96eb1._.js +0 -3
  127. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__22d96eb1._.js.map +0 -1
  128. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__63dd19ce._.js +0 -3
  129. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__63dd19ce._.js.map +0 -1
  130. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__94d8e211._.js +0 -3
  131. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__94d8e211._.js.map +0 -1
  132. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__bf771f7e._.js +0 -3
  133. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__c4e78a20._.js +0 -3
  134. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cf17e26a._.js.map +0 -1
  135. package/mcp-server/.next/server/chunks/ssr/_28084f73._.js +0 -3
  136. package/mcp-server/.next/server/chunks/ssr/_28084f73._.js.map +0 -1
  137. package/mcp-server/.next/server/chunks/ssr/_96ba1d8e._.js.map +0 -1
  138. package/mcp-server/.next/server/chunks/ssr/_aa32a659._.js +0 -3
  139. package/mcp-server/.next/server/chunks/ssr/_aa32a659._.js.map +0 -1
  140. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_b2368b47._.js +0 -3
  141. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_b2368b47._.js.map +0 -1
  142. package/mcp-server/.next/static/chunks/0cf268b98f36b0b5.css +0 -1
  143. package/mcp-server/.next/static/chunks/571fbcba7786c174.js +0 -1
  144. package/mcp-server/.next/static/chunks/5fdb882fe407a798.js +0 -1
  145. package/mcp-server/.next/static/chunks/98e04adc8a00688a.js +0 -1
  146. package/mcp-server/.next/static/chunks/db42008ac1e97815.js +0 -1
  147. package/mcp-server/.next/static/chunks/dbbdc51e76f4cea4.js +0 -1
  148. package/mcp-server/.next/static/chunks/turbopack-7112e6b6aee1d84f.js +0 -3
  149. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__2942c072._.js.map → [externals]_node:crypto_c20cce38._.js.map} +0 -0
  150. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__6ee9a99f._.js.map → [root-of-the-server]__3130ceec._.js.map} +0 -0
  151. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__e6dcd8bf._.js.map → [root-of-the-server]__4637d3dd._.js.map} +0 -0
  152. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__bc773251._.js.map → [root-of-the-server]__5114419d._.js.map} +0 -0
  153. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__55c04517._.js.map → [root-of-the-server]__a004a307._.js.map} +0 -0
  154. /package/mcp-server/.next/static/{jEIKNmPAC0p1vOw5j9cTy → 5ZNPgBUtuG6HhHaBXqChL}/_buildManifest.js +0 -0
  155. /package/mcp-server/.next/static/{jEIKNmPAC0p1vOw5j9cTy → 5ZNPgBUtuG6HhHaBXqChL}/_clientMiddlewareManifest.json +0 -0
  156. /package/mcp-server/.next/static/{jEIKNmPAC0p1vOw5j9cTy → 5ZNPgBUtuG6HhHaBXqChL}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/querystring.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/format-url.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/utils.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/parse-path.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/add-path-prefix.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/remove-trailing-slash.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/normalize-trailing-slash.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/add-base-path.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/components/segment-cache.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/components/links.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/has-base-path.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/shared/lib/router/utils/is-local-url.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/src/client/app-dir/link.tsx","turbopack:///[project]/mcp-server/app/page.tsx"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n runtimeConfig?: { [key: string]: any }\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n /**\n * Object of `query` values from url\n */\n query: Partial<{\n [key: string]: string | string[]\n }>\n /**\n * Object of `cookies` from header\n */\n cookies: Partial<{\n [key: string]: string\n }>\n\n body: any\n\n env: Env\n\n draftMode?: boolean\n\n preview?: boolean\n /**\n * Preview data set on the request, if any\n * */\n previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n /**\n * Send data `any` data in response\n */\n send: Send<Data>\n /**\n * Send data `json` data in response\n */\n json: Send<Data>\n status: (statusCode: number) => NextApiResponse<Data>\n redirect(url: string): NextApiResponse<Data>\n redirect(status: number, url: string): NextApiResponse<Data>\n\n /**\n * Set draft mode\n */\n setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n /**\n * Set preview data for Next.js' prerender mode\n */\n setPreviewData: (\n data: object | string,\n options?: {\n /**\n * Specifies the number (in seconds) for the preview session to last for.\n * The given number will be converted to an integer by rounding down.\n * By default, no maximum age is set and the preview session finishes\n * when the client shuts down (browser is closed).\n */\n maxAge?: number\n /**\n * Specifies the path for the preview session to work under. By default,\n * the path is considered the \"default path\", i.e., any pages under \"/\".\n */\n path?: string\n }\n ) => NextApiResponse<Data>\n\n /**\n * Clear preview data for Next.js' prerender mode\n */\n clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n /**\n * Revalidate a specific page and regenerate it using On-Demand Incremental\n * Static Regeneration.\n * The path should be an actual path, not a rewritten path. E.g. for\n * \"/blog/[slug]\" this should be \"/blog/post-1\".\n * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n */\n revalidate: (\n urlPath: string,\n opts?: {\n unstable_onlyGenerated?: boolean\n }\n ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n req: NextApiRequest,\n res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n fn: T\n): T {\n let used = false\n let result: ReturnType<T>\n\n return ((...args: any[]) => {\n if (!used) {\n used = true\n result = fn(...args)\n }\n return result\n }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location\n return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n const { href } = window.location\n const origin = getLocationOrigin()\n return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n return typeof Component === 'string'\n ? Component\n : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n const urlParts = url.split('?')\n const urlNoQuery = urlParts[0]\n\n return (\n urlNoQuery\n // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/')\n .replace(/\\/\\/+/g, '/') +\n (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n )\n}\n\nexport async function loadGetInitialProps<\n C extends BaseContext,\n IP = {},\n P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n throw new Error(message)\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n }\n }\n return {} as IP\n }\n\n const props = await App.getInitialProps(ctx)\n\n if (res && isResSent(res)) {\n return props\n }\n\n if (!props) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n throw new Error(message)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\n `${getDisplayName(\n App\n )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n )\n }\n }\n\n return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n SP &&\n (['mark', 'measure', 'getEntriesByName'] as const).every(\n (method) => typeof performance[method] === 'function'\n )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n code: string\n\n constructor(page: string) {\n super()\n this.code = 'ENOENT'\n this.name = 'PageNotFoundError'\n this.message = `Cannot find module for page: ${page}`\n }\n}\n\nexport class MissingStaticPage extends Error {\n constructor(page: string, message: string) {\n super()\n this.message = `Failed to load static file for page: ${page} ${message}`\n }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n code: string\n constructor() {\n super()\n this.code = 'ENOENT'\n this.message = `Cannot find the middleware module`\n }\n}\n\nexport interface CacheFs {\n existsSync: typeof fs.existsSync\n readFile: typeof fs.promises.readFile\n readFileSync: typeof fs.readFileSync\n writeFile(f: string, d: any): Promise<void>\n mkdir(dir: string): Promise<void | string>\n stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n if (process.env.__NEXT_TRAILING_SLASH) {\n if (/\\.[^/]+\\/?$/.test(pathname)) {\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n } else if (pathname.endsWith('/')) {\n return `${pathname}${query}${hash}`\n } else {\n return `${pathname}/${query}${hash}`\n }\n }\n\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n return normalizePathTrailingSlash(\n process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n ? path\n : addPathPrefix(path, basePath)\n )\n}\n","/**\n * Entry point to the Segment Cache implementation.\n *\n * All code related to the Segment Cache lives `segment-cache-impl` directory.\n * Callers access it through this indirection.\n *\n * This is to ensure the code is dead code eliminated from the bundle if the\n * flag is disabled.\n *\n * TODO: This is super tedious. Since experimental flags are an essential part\n * of our workflow, we should establish a better pattern for dead code\n * elimination. Ideally it would be done at the bundler level, like how React's\n * build process works. In the React repo, you don't even need to add any extra\n * configuration per experiment — if the code is not reachable, it gets stripped\n * from the build automatically by Rollup. Or, shorter term, we could stub out\n * experimental modules at build time by updating the build config, i.e. a more\n * automated version of what I'm doing manually in this file.\n */\n\nexport type { NavigationResult } from './segment-cache-impl/navigation'\nexport type { PrefetchTask } from './segment-cache-impl/scheduler'\nexport type { NormalizedSearch } from './segment-cache-impl/cache-key'\n\nconst notEnabled: any = () => {\n throw new Error(\n 'Segment Cache experiment is not enabled. This is a bug in Next.js.'\n )\n}\n\nexport const prefetch: typeof import('./segment-cache-impl/prefetch').prefetch =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/prefetch') as typeof import('./segment-cache-impl/prefetch')\n ).prefetch(...args)\n }\n : notEnabled\n\nexport const navigate: typeof import('./segment-cache-impl/navigation').navigate =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/navigation') as typeof import('./segment-cache-impl/navigation')\n ).navigate(...args)\n }\n : notEnabled\n\nexport const revalidateEntireCache: typeof import('./segment-cache-impl/cache').revalidateEntireCache =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/cache') as typeof import('./segment-cache-impl/cache')\n ).revalidateEntireCache(...args)\n }\n : notEnabled\n\nexport const getCurrentCacheVersion: typeof import('./segment-cache-impl/cache').getCurrentCacheVersion =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/cache') as typeof import('./segment-cache-impl/cache')\n ).getCurrentCacheVersion(...args)\n }\n : notEnabled\n\nexport const schedulePrefetchTask: typeof import('./segment-cache-impl/scheduler').schedulePrefetchTask =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/scheduler') as typeof import('./segment-cache-impl/scheduler')\n ).schedulePrefetchTask(...args)\n }\n : notEnabled\n\nexport const cancelPrefetchTask: typeof import('./segment-cache-impl/scheduler').cancelPrefetchTask =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/scheduler') as typeof import('./segment-cache-impl/scheduler')\n ).cancelPrefetchTask(...args)\n }\n : notEnabled\n\nexport const reschedulePrefetchTask: typeof import('./segment-cache-impl/scheduler').reschedulePrefetchTask =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/scheduler') as typeof import('./segment-cache-impl/scheduler')\n ).reschedulePrefetchTask(...args)\n }\n : notEnabled\n\nexport const isPrefetchTaskDirty: typeof import('./segment-cache-impl/scheduler').isPrefetchTaskDirty =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/scheduler') as typeof import('./segment-cache-impl/scheduler')\n ).isPrefetchTaskDirty(...args)\n }\n : notEnabled\n\nexport const createCacheKey: typeof import('./segment-cache-impl/cache-key').createCacheKey =\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ? function (...args) {\n return (\n require('./segment-cache-impl/cache-key') as typeof import('./segment-cache-impl/cache-key')\n ).createCacheKey(...args)\n }\n : notEnabled\n\n/**\n * Below are public constants. They're small enough that we don't need to\n * DCE them.\n */\n\nexport const enum NavigationResultTag {\n MPA,\n Success,\n NoOp,\n Async,\n}\n\n/**\n * The priority of the prefetch task. Higher numbers are higher priority.\n */\nexport const enum PrefetchPriority {\n /**\n * Assigned to the most recently hovered/touched link. Special network\n * bandwidth is reserved for this task only. There's only ever one Intent-\n * priority task at a time; when a new Intent task is scheduled, the previous\n * one is bumped down to Default.\n */\n Intent = 2,\n /**\n * The default priority for prefetch tasks.\n */\n Default = 1,\n /**\n * Assigned to tasks when they spawn non-blocking background work, like\n * revalidating a partially cached entry to see if more data is available.\n */\n Background = 0,\n}\n\nexport const enum FetchStrategy {\n // Deliberately ordered so we can easily compare two segments\n // and determine if one segment is \"more specific\" than another\n // (i.e. if it's likely that it contains more data)\n LoadingBoundary = 0,\n PPR = 1,\n PPRRuntime = 2,\n Full = 3,\n}\n\n/**\n * A subset of fetch strategies used for prefetch tasks.\n * A prefetch task can't know if it should use `PPR` or `LoadingBoundary`\n * until we complete the initial tree prefetch request, so we use `PPR` to signal both cases\n * and adjust it based on the route when actually fetching.\n * */\nexport type PrefetchTaskFetchStrategy =\n | FetchStrategy.PPR\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_PREFETCH = 'prefetch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n prefetchCache?: AppRouterState['prefetchCache']\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n origin: Location['origin']\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n origin: Location['origin']\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n allowAliasing: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n tree: FlightRouterState | undefined\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n * - Only triggered in layout-router.\n * - Creates a new cache and router state with the Flight data applied.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n navigatedAt: number\n serverResponse: FetchServerResponseResult\n previousTree: FlightRouterState\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n * - `temporary` - a temporary prefetch entry is added to the cache, this is used when prefetch={false} is used in next/link or when you push a route programmatically.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n TEMPORARY = 'temporary',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\nexport interface PrefetchAction {\n type: typeof ACTION_PREFETCH\n url: URL\n kind: PrefetchKind\n}\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\nexport type PrefetchCacheEntry = {\n treeAtTimeOfPrefetch: FlightRouterState\n data: Promise<FetchServerResponseResult>\n kind: PrefetchKind\n prefetchTime: number\n staleTime: number\n lastUsedTime: number | null\n key: string\n status: PrefetchCacheEntryStatus\n url: URL\n}\n\nexport enum PrefetchCacheEntryStatus {\n fresh = 'fresh',\n reusable = 'reusable',\n expired = 'expired',\n stale = 'stale',\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n * Prefetched data is stored separately in `prefetchCache`, that is applied during ACTION_NAVIGATE.\n */\n cache: CacheNode\n /**\n * Cache that holds prefetched Flight responses keyed by url.\n */\n prefetchCache: Map<string, PrefetchCacheEntry>\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState = Promise<AppRouterState> | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | PrefetchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n FetchStrategy,\n isPrefetchTaskDirty,\n type PrefetchTaskFetchStrategy,\n} from './segment-cache'\nimport { createCacheKey } from './segment-cache'\nimport {\n type PrefetchTask,\n PrefetchPriority,\n schedulePrefetchTask as scheduleSegmentPrefetchTask,\n cancelPrefetchTask,\n reschedulePrefetchTask,\n} from './segment-cache'\nimport { startTransition } from 'react'\nimport { PrefetchKind } from './router-reducer/router-reducer-types'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\ntype Element = HTMLAnchorElement | HTMLFormElement\n\n// Properties that are shared between Link and Form instances. We use the same\n// shape for both to prevent a polymorphic de-opt in the VM.\ntype LinkOrFormInstanceShared = {\n router: AppRouterInstance\n fetchStrategy: PrefetchTaskFetchStrategy\n\n isVisible: boolean\n\n // The most recently initiated prefetch task. It may or may not have\n // already completed. The same prefetch task object can be reused across\n // multiple prefetches of the same link.\n prefetchTask: PrefetchTask | null\n}\n\nexport type FormInstance = LinkOrFormInstanceShared & {\n prefetchHref: string\n setOptimisticLinkStatus: null\n}\n\ntype PrefetchableLinkInstance = LinkOrFormInstanceShared & {\n prefetchHref: string\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {\n prefetchHref: null\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype PrefetchableInstance = PrefetchableLinkInstance | FormInstance\n\nexport type LinkInstance =\n | PrefetchableLinkInstance\n | NonPrefetchableLinkInstance\n\n// Tracks the most recently navigated link instance. When null, indicates\n// the current navigation was not initiated by a link click.\nlet linkForMostRecentNavigation: LinkInstance | null = null\n\n// Status object indicating link is pending\nexport const PENDING_LINK_STATUS = { pending: true }\n\n// Status object indicating link is idle\nexport const IDLE_LINK_STATUS = { pending: false }\n\n// Updates the loading state when navigating between links\n// - Resets the previous link's loading state\n// - Sets the new link's loading state\n// - Updates tracking of current navigation\nexport function setLinkForCurrentNavigation(link: LinkInstance | null) {\n startTransition(() => {\n linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS)\n link?.setOptimisticLinkStatus(PENDING_LINK_STATUS)\n linkForMostRecentNavigation = link\n })\n}\n\n// Unmounts the current link instance from navigation tracking\nexport function unmountLinkForCurrentNavigation(link: LinkInstance) {\n if (linkForMostRecentNavigation === link) {\n linkForMostRecentNavigation = null\n }\n}\n\n// Use a WeakMap to associate a Link instance with its DOM element. This is\n// used by the IntersectionObserver to track the link's visibility.\nconst prefetchable:\n | WeakMap<Element, PrefetchableInstance>\n | Map<Element, PrefetchableInstance> =\n typeof WeakMap === 'function' ? new WeakMap() : new Map()\n\n// A Set of the currently visible links. We re-prefetch visible links after a\n// cache invalidation, or when the current URL changes. It's a separate data\n// structure from the WeakMap above because only the visible links need to\n// be enumerated.\nconst prefetchableAndVisible: Set<PrefetchableInstance> = new Set()\n\n// A single IntersectionObserver instance shared by all <Link> components.\nconst observer: IntersectionObserver | null =\n typeof IntersectionObserver === 'function'\n ? new IntersectionObserver(handleIntersect, {\n rootMargin: '200px',\n })\n : null\n\nfunction observeVisibility(element: Element, instance: PrefetchableInstance) {\n const existingInstance = prefetchable.get(element)\n if (existingInstance !== undefined) {\n // This shouldn't happen because each <Link> component should have its own\n // anchor tag instance, but it's defensive coding to avoid a memory leak in\n // case there's a logical error somewhere else.\n unmountPrefetchableInstance(element)\n }\n // Only track prefetchable links that have a valid prefetch URL\n prefetchable.set(element, instance)\n if (observer !== null) {\n observer.observe(element)\n }\n}\n\nfunction coercePrefetchableUrl(href: string): URL | null {\n if (typeof window !== 'undefined') {\n const { createPrefetchURL } =\n require('./app-router-utils') as typeof import('./app-router-utils')\n\n try {\n return createPrefetchURL(href)\n } catch {\n // createPrefetchURL sometimes throws an error if an invalid URL is\n // provided, though I'm not sure if it's actually necessary.\n // TODO: Consider removing the throw from the inner function, or change it\n // to reportError. Or maybe the error isn't even necessary for automatic\n // prefetches, just navigations.\n const reportErrorFn =\n typeof reportError === 'function' ? reportError : console.error\n reportErrorFn(\n `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n )\n return null\n }\n } else {\n return null\n }\n}\n\nexport function mountLinkInstance(\n element: HTMLAnchorElement,\n href: string,\n router: AppRouterInstance,\n fetchStrategy: PrefetchTaskFetchStrategy,\n prefetchEnabled: boolean,\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n): LinkInstance {\n if (prefetchEnabled) {\n const prefetchURL = coercePrefetchableUrl(href)\n if (prefetchURL !== null) {\n const instance: PrefetchableLinkInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: prefetchURL.href,\n setOptimisticLinkStatus,\n }\n // We only observe the link's visibility if it's prefetchable. For\n // example, this excludes links to external URLs.\n observeVisibility(element, instance)\n return instance\n }\n }\n // If the link is not prefetchable, we still create an instance so we can\n // track its optimistic state (i.e. useLinkStatus).\n const instance: NonPrefetchableLinkInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: null,\n setOptimisticLinkStatus,\n }\n return instance\n}\n\nexport function mountFormInstance(\n element: HTMLFormElement,\n href: string,\n router: AppRouterInstance,\n fetchStrategy: PrefetchTaskFetchStrategy\n): void {\n const prefetchURL = coercePrefetchableUrl(href)\n if (prefetchURL === null) {\n // This href is not prefetchable, so we don't track it.\n // TODO: We currently observe/unobserve a form every time its href changes.\n // For Links, this isn't a big deal because the href doesn't usually change,\n // but for forms it's extremely common. We should optimize this.\n return\n }\n const instance: FormInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: prefetchURL.href,\n setOptimisticLinkStatus: null,\n }\n observeVisibility(element, instance)\n}\n\nexport function unmountPrefetchableInstance(element: Element) {\n const instance = prefetchable.get(element)\n if (instance !== undefined) {\n prefetchable.delete(element)\n prefetchableAndVisible.delete(instance)\n const prefetchTask = instance.prefetchTask\n if (prefetchTask !== null) {\n cancelPrefetchTask(prefetchTask)\n }\n }\n if (observer !== null) {\n observer.unobserve(element)\n }\n}\n\nfunction handleIntersect(entries: Array<IntersectionObserverEntry>) {\n for (const entry of entries) {\n // Some extremely old browsers or polyfills don't reliably support\n // isIntersecting so we check intersectionRatio instead. (Do we care? Not\n // really. But whatever this is fine.)\n const isVisible = entry.intersectionRatio > 0\n onLinkVisibilityChanged(entry.target as HTMLAnchorElement, isVisible)\n }\n}\n\nexport function onLinkVisibilityChanged(element: Element, isVisible: boolean) {\n if (process.env.NODE_ENV !== 'production') {\n // Prefetching on viewport is disabled in development for performance\n // reasons, because it requires compiling the target page.\n // TODO: Investigate re-enabling this.\n return\n }\n\n const instance = prefetchable.get(element)\n if (instance === undefined) {\n return\n }\n\n instance.isVisible = isVisible\n if (isVisible) {\n prefetchableAndVisible.add(instance)\n } else {\n prefetchableAndVisible.delete(instance)\n }\n rescheduleLinkPrefetch(instance, PrefetchPriority.Default)\n}\n\nexport function onNavigationIntent(\n element: HTMLAnchorElement,\n unstable_upgradeToDynamicPrefetch: boolean\n) {\n const instance = prefetchable.get(element)\n if (instance === undefined) {\n return\n }\n // Prefetch the link on hover/touchstart.\n if (instance !== undefined) {\n if (\n process.env.__NEXT_DYNAMIC_ON_HOVER &&\n unstable_upgradeToDynamicPrefetch\n ) {\n // Switch to a full prefetch\n instance.fetchStrategy = FetchStrategy.Full\n }\n rescheduleLinkPrefetch(instance, PrefetchPriority.Intent)\n }\n}\n\nfunction rescheduleLinkPrefetch(\n instance: PrefetchableInstance,\n priority: PrefetchPriority.Default | PrefetchPriority.Intent\n) {\n // Ensures that app-router-instance is not compiled in the server bundle\n if (typeof window !== 'undefined') {\n const existingPrefetchTask = instance.prefetchTask\n\n if (!instance.isVisible) {\n // Cancel any in-progress prefetch task. (If it already finished then this\n // is a no-op.)\n if (existingPrefetchTask !== null) {\n cancelPrefetchTask(existingPrefetchTask)\n }\n // We don't need to reset the prefetchTask to null upon cancellation; an\n // old task object can be rescheduled with reschedulePrefetchTask. This is a\n // micro-optimization but also makes the code simpler (don't need to\n // worry about whether an old task object is stale).\n return\n }\n\n if (!process.env.__NEXT_CLIENT_SEGMENT_CACHE) {\n // The old prefetch implementation does not have different priority levels.\n // Just schedule a new prefetch task.\n prefetchWithOldCacheImplementation(instance)\n return\n }\n\n const { getCurrentAppRouterState } =\n require('./app-router-instance') as typeof import('./app-router-instance')\n\n const appRouterState = getCurrentAppRouterState()\n if (appRouterState !== null) {\n const treeAtTimeOfPrefetch = appRouterState.tree\n if (existingPrefetchTask === null) {\n // Initiate a prefetch task.\n const nextUrl = appRouterState.nextUrl\n const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n instance.prefetchTask = scheduleSegmentPrefetchTask(\n cacheKey,\n treeAtTimeOfPrefetch,\n instance.fetchStrategy,\n priority,\n null\n )\n } else {\n // We already have an old task object that we can reschedule. This is\n // effectively the same as canceling the old task and creating a new one.\n reschedulePrefetchTask(\n existingPrefetchTask,\n treeAtTimeOfPrefetch,\n instance.fetchStrategy,\n priority\n )\n }\n }\n }\n}\n\nexport function pingVisibleLinks(\n nextUrl: string | null,\n tree: FlightRouterState\n) {\n // For each currently visible link, cancel the existing prefetch task (if it\n // exists) and schedule a new one. This is effectively the same as if all the\n // visible links left and then re-entered the viewport.\n //\n // This is called when the Next-Url or the base tree changes, since those\n // may affect the result of a prefetch task. It's also called after a\n // cache invalidation.\n for (const instance of prefetchableAndVisible) {\n const task = instance.prefetchTask\n if (task !== null && !isPrefetchTaskDirty(task, nextUrl, tree)) {\n // The cache has not been invalidated, and none of the inputs have\n // changed. Bail out.\n continue\n }\n // Something changed. Cancel the existing prefetch task and schedule a\n // new one.\n if (task !== null) {\n cancelPrefetchTask(task)\n }\n const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n instance.prefetchTask = scheduleSegmentPrefetchTask(\n cacheKey,\n tree,\n instance.fetchStrategy,\n PrefetchPriority.Default,\n null\n )\n }\n}\n\nfunction prefetchWithOldCacheImplementation(instance: PrefetchableInstance) {\n // This is the path used when the Segment Cache is not enabled.\n if (typeof window === 'undefined') {\n return\n }\n\n const doPrefetch = async () => {\n // note that `appRouter.prefetch()` is currently sync,\n // so we have to wrap this call in an async function to be able to catch() errors below.\n\n let prefetchKind: PrefetchKind\n switch (instance.fetchStrategy) {\n case FetchStrategy.PPR: {\n prefetchKind = PrefetchKind.AUTO\n break\n }\n case FetchStrategy.Full: {\n prefetchKind = PrefetchKind.FULL\n break\n }\n case FetchStrategy.PPRRuntime: {\n // We can only get here if Client Segment Cache is off, and in that case\n // it shouldn't be possible for a link to request a runtime prefetch.\n throw new InvariantError(\n 'FetchStrategy.PPRRuntime should never be used when `experimental.clientSegmentCache` is disabled'\n )\n }\n default: {\n instance.fetchStrategy satisfies never\n // Unreachable, but otherwise typescript will consider the variable unassigned\n prefetchKind = undefined!\n }\n }\n\n return instance.router.prefetch(instance.prefetchHref, {\n kind: prefetchKind,\n })\n }\n\n // Prefetch the page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n doPrefetch().catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n return pathHasPrefix(path, basePath)\n}\n","import { isAbsoluteUrl, getLocationOrigin } from '../../utils'\nimport { hasBasePath } from '../../../../client/has-base-path'\n\n/**\n * Detects whether a given url is routable by the Next.js router (browser only).\n */\nexport function isLocalURL(url: string): boolean {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!isAbsoluteUrl(url)) return true\n try {\n // absolute urls can be local if they are on the same origin\n const locationOrigin = getLocationOrigin()\n const resolved = new URL(url, locationOrigin)\n return resolved.origin === locationOrigin && hasBasePath(resolved.pathname)\n } catch (_) {\n return false\n }\n}\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null | 'unstable_forceStale'\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent<HTMLAnchorElement>): boolean {\n const eventTarget = event.currentTarget\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent<HTMLAnchorElement>,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n if (isModifiedEvent(e) || e.currentTarget.hasAttribute('download')) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children,\n prefetch: prefetchProp = null,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto' &&\n props[key] !== 'unstable_forceStale'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\" | \"unstable_forceStale\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, forwardedRef)\n\n const anchorProps: React.DetailedHTMLProps<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n > = {\n ref: mergedRef,\n onClick(e) {\n if (typeof onClick === 'function') {\n onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (!router) {\n return\n }\n\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(e.currentTarget, upgradeToDynamicPrefetch)\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (!router) {\n return\n }\n\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(e.currentTarget, upgradeToDynamicPrefetch)\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n anchorProps.href = as\n } else {\n anchorProps.href = addBasePath(as)\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n <a {...restProps} {...anchorProps}>\n {children}\n </a>\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (\n process.env.__NEXT_CACHE_COMPONENTS &&\n process.env.__NEXT_CLIENT_SEGMENT_CACHE\n ) {\n // In the new implementation:\n // - `prefetch={true}` is a runtime prefetch\n // (includes cached IO + params + cookies, with dynamic holes for uncached IO).\n // - `unstable_forceStale` is a \"full\" prefetch\n // (forces inclusion of all dynamic data, i.e. the old behavior of `prefetch={true}`)\n if (prefetchProp === true) {\n return FetchStrategy.PPRRuntime\n }\n if (prefetchProp === 'unstable_forceStale') {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n // In `clientSegmentCache`, we default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n // If we're not using `clientSegmentCache`, this will be converted into a `PrefetchKind.AUTO`.\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // In `clientSegmentCache`, we default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n // If we're not using `clientSegmentCache`, this will be converted into a `PrefetchKind.AUTO`.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","\"use client\"\n\nimport Link from \"next/link\"\nimport { useEffect, useState } from \"react\"\nimport { DarkModeToggle } from \"@/components/dark-mode-toggle\"\nimport { useDarkMode } from \"@/hooks/use-dark-mode\"\n\ninterface MCPTool {\n name: string\n description: string\n category: string\n parameters: Array<{\n name: string\n type: string\n optional?: boolean\n description: string\n }>\n}\n\ninterface ToolsResponse {\n tools: MCPTool[]\n endpoint: string\n totalTools: number\n categories: string[]\n}\n\n// Format tool descriptions by parsing markdown-style sections\nfunction formatToolDescription(description: string) {\n const slugify = (value: string) =>\n value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/(^-|-$)/g, \"\")\n\n // Split by double newline to get sections\n const sections = description.split(\"\\n\\n\").filter((section) => section.trim())\n const keyCounts = new Map<string, number>()\n\n const getUniqueKey = (base: string) => {\n const count = keyCounts.get(base) ?? 0\n keyCounts.set(base, count + 1)\n return count === 0 ? base : `${base}-${count}`\n }\n\n return sections.map((rawSection, _idx) => {\n const normalizedKey = getUniqueKey(slugify(rawSection) || \"section\")\n let section = rawSection\n\n // Remove excessive emojis\n // Simple emoji reduction - just remove most emojis except the first in sequences\n section = section.replace(/(\\u{1F300}-\\u{1F9FF}|\\u{2600}-\\u{26FF}|\\u{1F900}-\\u{1F9FF})+/gu, (match) => {\n // Keep only the first emoji in a sequence\n return match.charAt(0)\n })\n\n // Handle different section types\n if (section.includes(\"**\") && section.includes(\":\")) {\n // This is a header with content\n const [header, ...contentParts] = section.split(\":\")\n const cleanHeader = header.replace(/\\*\\*/g, \"\").trim()\n const content = contentParts.join(\":\").trim()\n\n // Check if content has bullet points\n if (content.includes(\"•\")) {\n const items = content.split(\"•\").filter((item) => item.trim())\n const sectionKey = `${normalizedKey}-bullets`\n return (\n <div key={sectionKey}>\n <h5 className=\"font-semibold mb-2\">{cleanHeader}</h5>\n <ul className=\"space-y-1 ml-4\">\n {items.map((item) => {\n const itemKey = getUniqueKey(`${sectionKey}-item-${slugify(item).slice(0, 40) || \"bullet\"}`)\n return (\n <li key={itemKey} className=\"flex items-start\">\n <span className=\"text-muted-foreground mr-2\">•</span>\n <span className=\"text-muted-foreground text-sm\">{item.trim()}</span>\n </li>\n )\n })}\n </ul>\n </div>\n )\n }\n\n return (\n <div key={`${normalizedKey}-content`}>\n <h5 className=\"font-semibold mb-1\">{cleanHeader}</h5>\n <p className=\"text-muted-foreground text-sm ml-4\">{content}</p>\n </div>\n )\n }\n\n // Handle numbered lists (like workflow steps)\n if (section.match(/^\\d+[\\ud83c-\\ud83e][\\udc00-\\udfff]|^\\d+\\./m)) {\n const items = section.split(/\\n/).filter((item) => item.trim())\n return (\n <ol className=\"space-y-1 ml-4\" key={`${normalizedKey}-steps`}>\n {items.map((item, itemIdx) => {\n // Clean up the item text\n const cleanItem = item\n .replace(/^\\d+[\\ud83c-\\ud83e][\\udc00-\\udfff]\\s*/, \"\")\n .replace(/^\\d+\\.\\s*/, \"\")\n .trim()\n return (\n <li\n key={getUniqueKey(`${normalizedKey}-step-${slugify(cleanItem).slice(0, 40) || \"step\"}`)}\n className=\"text-muted-foreground text-sm\"\n >\n {itemIdx + 1}. {cleanItem}\n </li>\n )\n })}\n </ol>\n )\n }\n\n // Default paragraph\n return (\n <p key={`${normalizedKey}-paragraph`} className=\"text-muted-foreground text-sm leading-relaxed\">\n {section}\n </p>\n )\n })\n}\n\nexport default function HomePage() {\n const [tools, setTools] = useState<ToolsResponse | null>(null)\n const [loading, setLoading] = useState(true)\n const [darkMode, setDarkMode] = useDarkMode()\n\n useEffect(() => {\n fetch(\"/api/tools\")\n .then((res) => res.json())\n .then((data) => {\n setTools(data)\n setLoading(false)\n })\n .catch(() => {\n setLoading(false)\n })\n }, [])\n\n return (\n <div className=\"min-h-screen bg-background text-foreground\">\n {/* Header */}\n <header className=\"bg-muted/30 border-b border-border\">\n <div className=\"max-w-7xl mx-auto px-6 py-8\">\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-4 mb-3\">\n <div className=\"w-12 h-12 bg-foreground rounded flex items-center justify-center\">\n <span className=\"text-background font-mono font-bold\">d3k</span>\n </div>\n <div>\n <h1 className=\"text-3xl font-bold\">dev3000 MCP Server</h1>\n <div className=\"flex items-center gap-3 mt-2\">\n <span className=\"inline-flex items-center gap-2 text-sm text-green-600 font-medium\">\n <span className=\"w-2 h-2 bg-green-500 rounded-full\"></span>\n Server Running\n </span>\n <span className=\"text-muted-foreground\">•</span>\n <span className=\"text-sm text-muted-foreground\">Port {process.env.PORT || \"3684\"}</span>\n </div>\n </div>\n </div>\n </div>\n <div className=\"flex items-center gap-4\">\n <Link\n href=\"/logs\"\n className=\"inline-flex items-center gap-2 px-5 py-3 bg-primary text-primary-foreground text-sm font-medium rounded hover:bg-primary/90 transition-colors\"\n >\n 📊 View Logs\n </Link>\n <a\n href=\"https://github.com/vercel-labs/dev3000#setup\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-2 px-5 py-3 border border-border text-foreground text-sm font-medium rounded hover:bg-accent hover:text-accent-foreground transition-colors\"\n >\n 📖 Setup Guide\n </a>\n <DarkModeToggle darkMode={darkMode} setDarkMode={setDarkMode} />\n </div>\n </div>\n </div>\n </header>\n\n {/* Main Content - no sidebar needed with only 2 tools */}\n <main className=\"max-w-7xl mx-auto px-6 py-8\">\n {/* Quick Start */}\n <section className=\"mb-16\">\n <div className=\"bg-primary/10 border border-primary/20 rounded p-8\">\n <h2 className=\"text-xl font-semibold mb-4\">🚀 Quick Start</h2>\n <div className=\"space-y-4\">\n <div>\n <span className=\"text-sm font-medium\">MCP Endpoint:</span>\n <code className=\"ml-3 px-4 py-2 bg-primary/20 text-foreground text-sm font-mono rounded\">\n {tools?.endpoint || \"http://localhost:3684/mcp\"}\n </code>\n </div>\n <div className=\"text-sm\">\n <p className=\"mb-3\">Connect your AI tools to this MCP server for real-time development debugging:</p>\n <div className=\"flex gap-6\">\n <a\n href=\"https://github.com/vercel-labs/dev3000#claude-desktop\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-primary hover:text-primary/80 font-medium\"\n >\n Claude Desktop Setup →\n </a>\n <a\n href=\"https://github.com/vercel-labs/dev3000#cursor\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-primary hover:text-primary/80 font-medium\"\n >\n Cursor Setup →\n </a>\n </div>\n </div>\n </div>\n </div>\n </section>\n\n {/* Tools Documentation */}\n <section>\n <div className=\"mb-12\">\n <div>\n <h2 className=\"text-3xl font-bold mb-3\">Available Tools</h2>\n <p className=\"text-muted-foreground text-lg\">\n {loading\n ? \"Loading MCP tools...\"\n : `${tools?.totalTools || 0} tools across ${\n tools?.categories.length || 0\n } categories for AI-powered development debugging`}\n </p>\n </div>\n </div>\n\n {loading ? (\n <div className=\"text-center py-16\">\n <div className=\"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary\"></div>\n <p className=\"mt-6 text-muted-foreground\">Loading tool documentation...</p>\n </div>\n ) : tools ? (\n <div className=\"grid gap-6 lg:grid-cols-2\">\n {tools.tools.map((tool) => (\n <div\n key={tool.name}\n id={tool.name}\n className=\"border border-border rounded-lg p-6 hover:border-muted-foreground/50 transition-colors\"\n >\n <div className=\"mb-4\">\n <h4 className=\"text-xl font-semibold font-mono mb-3\">{tool.name}</h4>\n <div className=\"text-muted-foreground space-y-3\">{formatToolDescription(tool.description)}</div>\n </div>\n {tool.parameters.length > 0 && (\n <div>\n <h5 className=\"text-sm font-semibold mb-3\">Parameters:</h5>\n <div className=\"space-y-2\">\n {tool.parameters.map((param) => (\n <div key={param.name} className=\"text-sm\">\n <div className=\"flex items-start gap-2\">\n <span className=\"font-mono text-primary font-medium\">{param.name}</span>\n <span className=\"text-muted-foreground text-xs\">\n {param.optional ? \"(optional)\" : \"(required)\"}\n </span>\n <span className=\"text-muted-foreground/70 text-xs\">- {param.type}</span>\n </div>\n {param.description && (\n <div className=\"text-muted-foreground ml-1 mt-1 text-sm\">{param.description}</div>\n )}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n ))}\n </div>\n ) : (\n <div className=\"text-center py-16\">\n <p className=\"text-destructive mb-6\">Failed to load tool documentation</p>\n <button\n onClick={() => window.location.reload()}\n className=\"px-6 py-3 bg-primary text-primary-foreground text-sm rounded hover:bg-primary/90 transition-colors\"\n type=\"button\"\n >\n Retry\n </button>\n </div>\n )}\n </section>\n\n {/* Magic Workflow */}\n <section className=\"mt-20 bg-gradient-to-r from-primary/10 to-secondary/10 border border-border rounded-lg p-10\">\n <h2 className=\"text-2xl font-semibold mb-6 flex items-center gap-3\">🪄 The Magic Workflow</h2>\n <div className=\"grid md:grid-cols-3 gap-8\">\n <div className=\"text-center\">\n <div className=\"w-16 h-16 bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4 shadow-md\">\n <span className=\"text-primary font-bold text-2xl\">1</span>\n </div>\n <h3 className=\"font-semibold mb-3 text-lg\">AI Finds Issues</h3>\n <p className=\"text-muted-foreground leading-relaxed\">\n fix_my_app automatically detects all types of errors and problems in your app\n </p>\n </div>\n <div className=\"text-center\">\n <div className=\"w-16 h-16 bg-accent/20 rounded-full flex items-center justify-center mx-auto mb-4 shadow-md\">\n <span className=\"text-accent-foreground font-bold text-2xl\">2</span>\n </div>\n <h3 className=\"font-semibold mb-3 text-lg\">AI Fixes Code</h3>\n <p className=\"text-muted-foreground leading-relaxed\">\n AI analyzes errors and edits your code files to resolve issues\n </p>\n </div>\n <div className=\"text-center\">\n <div className=\"w-16 h-16 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-4 shadow-md\">\n <span className=\"text-green-600 dark:text-green-400 font-bold text-2xl\">3</span>\n </div>\n <h3 className=\"font-semibold mb-3 text-lg\">AI Verifies Fixes</h3>\n <p className=\"text-muted-foreground leading-relaxed\">\n execute_browser_action tests the fixes in real-time with screenshots\n </p>\n </div>\n </div>\n </section>\n </main>\n\n {/* Footer */}\n <footer className=\"border-t border-border mt-20\">\n <div className=\"max-w-7xl mx-auto px-6 py-8\">\n <div className=\"flex items-center justify-between text-sm text-muted-foreground\">\n <div>\n <span className=\"font-semibold\">dev3000 MCP Server</span> - AI-powered development monitoring\n </div>\n <div className=\"flex items-center gap-8\">\n <a\n href=\"https://github.com/vercel-labs/dev3000\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"hover:text-foreground transition-colors\"\n >\n GitHub\n </a>\n <a\n href=\"https://dev3000.ai\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"hover:text-foreground transition-colors\"\n >\n Homepage\n </a>\n <Link href=\"/logs\" className=\"hover:text-gray-900 transition-colors\">\n Logs\n </Link>\n </div>\n </div>\n </div>\n </footer>\n </div>\n )\n}\n"],"names":["assign","searchParamsToUrlQuery","urlQueryToSearchParams","searchParams","query","key","value","entries","existing","Array","isArray","push","stringifyUrlQueryParam","param","isNaN","String","URLSearchParams","Object","item","append","set","target","searchParamsList","keys","delete","formatUrl","formatWithValidation","urlObjectKeys","slashedProtocols","urlObj","auth","hostname","protocol","pathname","hash","host","encodeURIComponent","replace","indexOf","port","querystring","search","endsWith","slashes","test","url","process","env","NODE_ENV","forEach","includes","console","warn","DecodeError","MiddlewareNotFoundError","MissingStaticPage","NormalizeError","PageNotFoundError","SP","ST","WEB_VITALS","execOnce","getDisplayName","getLocationOrigin","getURL","isAbsoluteUrl","isResSent","loadGetInitialProps","normalizeRepeatedSlashes","stringifyError","fn","used","result","args","ABSOLUTE_URL_REGEX","window","location","href","origin","substring","length","Component","displayName","name","res","finished","headersSent","urlParts","split","urlNoQuery","slice","join","App","ctx","prototype","getInitialProps","message","Error","pageProps","props","performance","every","method","constructor","page","code","error","JSON","stringify","stack","parsePath","path","hashIndex","queryIndex","hasQuery","undefined","addPathPrefix","prefix","startsWith","removeTrailingSlash","route","normalizePathTrailingSlash","__NEXT_MANUAL_TRAILING_SLASH","__NEXT_TRAILING_SLASH","addBasePath","basePath","__NEXT_ROUTER_BASEPATH","required","__NEXT_MANUAL_CLIENT_BASE_PATH","FetchStrategy","NavigationResultTag","PrefetchPriority","cancelPrefetchTask","createCacheKey","getCurrentCacheVersion","isPrefetchTaskDirty","navigate","prefetch","reschedulePrefetchTask","revalidateEntireCache","schedulePrefetchTask","notEnabled","__NEXT_CLIENT_SEGMENT_CACHE","require","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_PREFETCH","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchCacheEntryStatus","PrefetchKind","IDLE_LINK_STATUS","PENDING_LINK_STATUS","mountFormInstance","mountLinkInstance","onLinkVisibilityChanged","onNavigationIntent","pingVisibleLinks","setLinkForCurrentNavigation","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","linkForMostRecentNavigation","pending","link","startTransition","setOptimisticLinkStatus","prefetchable","WeakMap","Map","prefetchableAndVisible","Set","observer","IntersectionObserver","handleIntersect","rootMargin","observeVisibility","element","instance","existingInstance","get","observe","coercePrefetchableUrl","createPrefetchURL","reportErrorFn","reportError","router","fetchStrategy","prefetchEnabled","prefetchURL","isVisible","prefetchTask","prefetchHref","unobserve","entry","intersectionRatio","add","rescheduleLinkPrefetch","Default","unstable_upgradeToDynamicPrefetch","__NEXT_DYNAMIC_ON_HOVER","Full","Intent","priority","existingPrefetchTask","prefetchWithOldCacheImplementation","getCurrentAppRouterState","appRouterState","treeAtTimeOfPrefetch","tree","nextUrl","cacheKey","scheduleSegmentPrefetchTask","task","doPrefetch","prefetchKind","PPR","AUTO","FULL","PPRRuntime","InvariantError","kind","catch","err","pathHasPrefix","hasBasePath","isLocalURL","locationOrigin","resolved","URL","_","LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","as","linkInstanceRef","scroll","onNavigate","hasAttribute","preventDefault","isDefaultPrevented","dispatchNavigateAction","React","current","formatStringOrUrl","urlObjOrString","linkStatus","useOptimistic","useRef","hrefProp","asProp","children","prefetchProp","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","ref","forwardedRef","unstable_dynamicOnHover","restProps","useContext","AppRouterContext","getFetchStrategyFromPrefetchProp","createPropError","expected","actual","requiredPropsGuard","requiredProps","optionalPropsGuard","optionalProps","valType","locale","warnOnce","hasDynamicSegment","some","segment","useMemo","resolvedHref","type","observeLinkVisibilityOnMount","useCallback","mergedRef","useMergedRef","anchorProps","defaultPrevented","upgradeToDynamicPrefetch","__NEXT_LINK_NO_TOUCH_START","LinkStatusContext","Provider","a","createContext","__NEXT_CACHE_COMPONENTS"],"mappings":"6CAEO,SAASC,EACdE,CAA6B,EAE7B,IAAMC,EAAwB,CAAC,EAC/B,IAAK,GAAM,CAACC,EAAKC,EAAM,GAAIH,EAAaI,OAAO,GAAI,CACjD,IAAMC,EAAWJ,CAAK,CAACC,EAAI,AACvB,MAAoB,IAAbG,EACTJ,CAAK,CAACC,EAAI,CAAGC,EACJG,AAF0B,MAEpBC,OAAO,CAACF,GACvBA,EAASG,IAAI,CAACL,CADoB,EAGlCF,CAAK,CAACC,EAAI,CAAG,CAACG,EAAUF,EAAM,AAElC,CACA,OAAOF,CACT,CAEA,SAASQ,EAAuBC,CAAc,QAC5C,AAAqB,UAAjB,AAA2B,OAApBA,EACFA,GAIW,UAAjB,EAA6B,KAAtBA,GAAuBC,MAAMD,EAAAA,GACpB,WAAjB,AACA,OADOA,EAIA,GAFAE,OAAOF,EAIlB,CAEO,SAASX,EAAuBE,CAAqB,EAC1D,IAAMD,EAAe,IAAIa,gBACzB,IAAK,GAAM,CAACX,EAAKC,EAAM,GAAIW,OAAOV,OAAO,CAACH,GACxC,GAAIK,CAD4C,KACtCC,OAAO,CAACJ,GAChB,IAAK,CADmB,GACbY,KAAQZ,EACjBH,EAAagB,EADW,IACL,CAACd,EAAKO,EAAuBM,SAGlDf,EAAaiB,GAAG,CAACf,EAAKO,EAAuBN,IAGjD,OAAOH,CACT,CAEO,SAASH,EACdqB,CAAuB,EACvB,IAAA,IAAA,EAAA,UAAA,MAAA,CAAGC,EAAH,MAAA,EAAA,EAAA,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,EAAA,IAAGA,CAAAA,CAAH,CAAA,CAAA,EAAA,CAAA,SAA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