@karan171996/metricflow 0.5.0 → 0.5.2

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 (108) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_not-found.html +2 -2
  12. package/.next/server/app/_not-found.rsc +6 -6
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
  14. package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  18. package/.next/server/app/api/connect/route.js.nft.json +1 -1
  19. package/.next/server/app/api/health/route.js.nft.json +1 -1
  20. package/.next/server/app/api/metrics/route.js.nft.json +1 -1
  21. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  22. package/.next/server/app/api/setup/ai/route.js.nft.json +1 -1
  23. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  24. package/.next/server/app/connect/page.js.nft.json +1 -1
  25. package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/connect.html +2 -2
  27. package/.next/server/app/connect.rsc +8 -8
  28. package/.next/server/app/connect.segments/_full.segment.rsc +8 -8
  29. package/.next/server/app/connect.segments/_index.segment.rsc +6 -6
  30. package/.next/server/app/connect.segments/_tree.segment.rsc +1 -1
  31. package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +6 -6
  32. package/.next/server/app/index.html +2 -2
  33. package/.next/server/app/index.rsc +8 -8
  34. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_full.segment.rsc +8 -8
  36. package/.next/server/app/index.segments/_index.segment.rsc +6 -6
  37. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  38. package/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
  41. package/.next/server/app/performance/[slug]/page_client-reference-manifest.js +1 -1
  42. package/.next/server/app/performance/page.js.nft.json +1 -1
  43. package/.next/server/app/performance/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/performance.html +2 -2
  45. package/.next/server/app/performance.rsc +9 -9
  46. package/.next/server/app/performance.segments/_full.segment.rsc +9 -9
  47. package/.next/server/app/performance.segments/_index.segment.rsc +6 -6
  48. package/.next/server/app/performance.segments/_tree.segment.rsc +1 -1
  49. package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +7 -7
  50. package/.next/server/app/settings/page.js.nft.json +1 -1
  51. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/settings.html +2 -2
  53. package/.next/server/app/settings.rsc +17 -17
  54. package/.next/server/app/settings.segments/_full.segment.rsc +17 -17
  55. package/.next/server/app/settings.segments/_index.segment.rsc +6 -6
  56. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  57. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +16 -16
  58. package/.next/server/app/setup/page.js.nft.json +1 -1
  59. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  60. package/.next/server/app/setup.html +2 -2
  61. package/.next/server/app/setup.rsc +9 -9
  62. package/.next/server/app/setup.segments/_full.segment.rsc +9 -9
  63. package/.next/server/app/setup.segments/_index.segment.rsc +6 -6
  64. package/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  65. package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +7 -7
  66. package/.next/server/app/tools/[tool]/page.js.nft.json +1 -1
  67. package/.next/server/app/tools/[tool]/page_client-reference-manifest.js +1 -1
  68. package/.next/server/chunks/[root-of-the-server]__00bbqkl._.js +1 -1
  69. package/.next/server/chunks/[root-of-the-server]__0fkj1-q._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__0rfr72x._.js +1 -1
  71. package/.next/server/chunks/[root-of-the-server]__186pj_c._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__19yigji._.js +1 -1
  73. package/.next/server/chunks/[root-of-the-server]__1igrw77._.js +1 -1
  74. package/.next/server/chunks/[root-of-the-server]__1xo4bin._.js +1 -1
  75. package/.next/server/chunks/_0w8wvdn._.js +1 -1
  76. package/.next/server/chunks/_0wct7-r._.js +1 -1
  77. package/.next/server/chunks/ssr/0x0c_next_dist_1icgwks._.js +1 -1
  78. package/.next/server/chunks/ssr/[root-of-the-server]__0o_fd5z._.js +1 -1
  79. package/.next/server/chunks/ssr/_0_02db6._.js +1 -1
  80. package/.next/server/chunks/ssr/_0bxxvzb._.js +1 -1
  81. package/.next/server/chunks/ssr/_0htqt7_._.js +1 -1
  82. package/.next/server/chunks/ssr/_0ompurr._.js +2 -2
  83. package/.next/server/chunks/ssr/_0un641_._.js +1 -1
  84. package/.next/server/chunks/ssr/_13m9nev._.js +1 -1
  85. package/.next/server/chunks/ssr/_14aoqb2._.js +1 -1
  86. package/.next/server/middleware-build-manifest.js +3 -3
  87. package/.next/server/pages/404.html +2 -2
  88. package/.next/server/pages/500.html +1 -1
  89. package/.next/static/chunks/0_xh0vh4uh0vk.js +1 -0
  90. package/.next/static/chunks/19qbz8dh8aqt6.js +1 -0
  91. package/.next/static/chunks/2-az50vi0iboz.js +5 -0
  92. package/.next/static/chunks/2wmat901j6po0.js +1 -0
  93. package/.next/static/chunks/{2p8myet8kmrgx.js → 332-owz6utwp5.js} +1 -1
  94. package/.next/static/chunks/3ab7oxjuh1asy.js +1 -0
  95. package/.next/trace +1 -1
  96. package/.next/trace-build +1 -1
  97. package/README.md +1 -0
  98. package/bin/cli.mjs +2 -2
  99. package/bin/output.mjs +1 -0
  100. package/package.json +1 -1
  101. package/.next/static/chunks/0798_gs3g5aja.js +0 -1
  102. package/.next/static/chunks/1_dhsu7ouiell.js +0 -5
  103. package/.next/static/chunks/268zd4cpgc5jh.js +0 -1
  104. package/.next/static/chunks/3ah6umj9qtdhc.js +0 -1
  105. package/.next/static/chunks/3wwhtfj-3akyd.js +0 -1
  106. /package/.next/static/{eV4px19Q3p5aL-JnEEP-F → wZ6L7QBGYuFD01WhrymMz}/_buildManifest.js +0 -0
  107. /package/.next/static/{eV4px19Q3p5aL-JnEEP-F → wZ6L7QBGYuFD01WhrymMz}/_clientMiddlewareManifest.js +0 -0
  108. /package/.next/static/{eV4px19Q3p5aL-JnEEP-F → wZ6L7QBGYuFD01WhrymMz}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
2
- globalThis.__RSC_MANIFEST["/tools/[tool]/page"] = {"moduleLoading":{"prefix":""},"clientModules":{"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/layout-router.js":{"id":46495,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":90434,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-page.js":{"id":81762,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-segment.js":{"id":90334,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":74882,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":43120,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27499,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/sidebar/Sidebar.tsx":{"id":67097,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/components/ui/sidebar.tsx":{"id":11522,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/components/header/Header.tsx":{"id":17792,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error.js":{"id":3020,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/ToolInsights/ToolInsights.tsx":{"id":98537,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs":{"id":91153,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js":{"id":3547,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false},"[project]/node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs":{"id":78393,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/3ah6umj9qtdhc.js","/_next/static/chunks/268zd4cpgc5jh.js"],"async":false}},"ssrModuleMapping":{"46495":{"*":{"id":51202,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90434":{"*":{"id":19122,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"81762":{"*":{"id":28239,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90334":{"*":{"id":57748,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"74882":{"*":{"id":41006,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"43120":{"*":{"id":22076,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"27499":{"*":{"id":69888,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"67097":{"*":{"id":30948,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"11522":{"*":{"id":14727,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"17792":{"*":{"id":72347,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"3020":{"*":{"id":17111,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/node_modules__pnpm_0hf3oiy._.js"],"async":false}},"98537":{"*":{"id":13392,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"91153":{"*":{"id":39848,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"3547":{"*":{"id":56561,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"78393":{"*":{"id":13908,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"46495":{"*":{"id":75141,"name":"*","chunks":[],"async":false}},"90434":{"*":{"id":83264,"name":"*","chunks":[],"async":false}},"81762":{"*":{"id":40645,"name":"*","chunks":[],"async":false}},"90334":{"*":{"id":12796,"name":"*","chunks":[],"async":false}},"74882":{"*":{"id":48616,"name":"*","chunks":[],"async":false}},"43120":{"*":{"id":14057,"name":"*","chunks":[],"async":false}},"27499":{"*":{"id":83139,"name":"*","chunks":[],"async":false}},"67097":{"*":{"id":24794,"name":"*","chunks":[],"async":false}},"11522":{"*":{"id":54367,"name":"*","chunks":[],"async":false}},"17792":{"*":{"id":31358,"name":"*","chunks":[],"async":false}},"3020":{"*":{"id":42038,"name":"*","chunks":[],"async":false}},"98537":{"*":{"id":57784,"name":"*","chunks":[],"async":false}},"91153":{"*":{"id":33951,"name":"*","chunks":[],"async":false}},"3547":{"*":{"id":40950,"name":"*","chunks":[],"async":false}},"78393":{"*":{"id":45603,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/app/layout":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/app/loading":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/app/tools/[tool]/page":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}]},"entryJSFiles":{"[project]/app/layout":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/loading":["static/chunks/2dpz7gbtyu5go.js","static/chunks/1habrj18124lo.js","static/chunks/268zd4cpgc5jh.js"],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/tools/[tool]/page":["static/chunks/2dpz7gbtyu5go.js","static/chunks/3ah6umj9qtdhc.js","static/chunks/268zd4cpgc5jh.js"]}};
2
+ globalThis.__RSC_MANIFEST["/tools/[tool]/page"] = {"moduleLoading":{"prefix":""},"clientModules":{"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/layout-router.js":{"id":46495,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":90434,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-page.js":{"id":81762,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-segment.js":{"id":90334,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":74882,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":43120,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27499,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/sidebar/Sidebar.tsx":{"id":67097,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/components/ui/sidebar.tsx":{"id":11522,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/components/header/Header.tsx":{"id":17792,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error.js":{"id":3020,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/ToolInsights/ToolInsights.tsx":{"id":98537,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs":{"id":91153,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js":{"id":3547,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false},"[project]/node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs":{"id":78393,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/2wmat901j6po0.js","/_next/static/chunks/3ab7oxjuh1asy.js"],"async":false}},"ssrModuleMapping":{"46495":{"*":{"id":51202,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90434":{"*":{"id":19122,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"81762":{"*":{"id":28239,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90334":{"*":{"id":57748,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"74882":{"*":{"id":41006,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"43120":{"*":{"id":22076,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"27499":{"*":{"id":69888,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"67097":{"*":{"id":30948,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"11522":{"*":{"id":14727,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"17792":{"*":{"id":72347,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"3020":{"*":{"id":17111,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/node_modules__pnpm_0hf3oiy._.js"],"async":false}},"98537":{"*":{"id":13392,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"91153":{"*":{"id":39848,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"3547":{"*":{"id":56561,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}},"78393":{"*":{"id":13908,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_14aoqb2._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"46495":{"*":{"id":75141,"name":"*","chunks":[],"async":false}},"90434":{"*":{"id":83264,"name":"*","chunks":[],"async":false}},"81762":{"*":{"id":40645,"name":"*","chunks":[],"async":false}},"90334":{"*":{"id":12796,"name":"*","chunks":[],"async":false}},"74882":{"*":{"id":48616,"name":"*","chunks":[],"async":false}},"43120":{"*":{"id":14057,"name":"*","chunks":[],"async":false}},"27499":{"*":{"id":83139,"name":"*","chunks":[],"async":false}},"67097":{"*":{"id":24794,"name":"*","chunks":[],"async":false}},"11522":{"*":{"id":54367,"name":"*","chunks":[],"async":false}},"17792":{"*":{"id":31358,"name":"*","chunks":[],"async":false}},"3020":{"*":{"id":42038,"name":"*","chunks":[],"async":false}},"98537":{"*":{"id":57784,"name":"*","chunks":[],"async":false}},"91153":{"*":{"id":33951,"name":"*","chunks":[],"async":false}},"3547":{"*":{"id":40950,"name":"*","chunks":[],"async":false}},"78393":{"*":{"id":45603,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/app/layout":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/app/loading":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}],"[project]/app/tools/[tool]/page":[{"path":"static/chunks/2bt9wtnw1g0g_.css","inlined":false}]},"entryJSFiles":{"[project]/app/layout":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/loading":["static/chunks/2dpz7gbtyu5go.js","static/chunks/1habrj18124lo.js","static/chunks/3ab7oxjuh1asy.js"],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/tools/[tool]/page":["static/chunks/2dpz7gbtyu5go.js","static/chunks/2wmat901j6po0.js","static/chunks/3ab7oxjuh1asy.js"]}};
3
3
 
@@ -1,3 +1,3 @@
1
- module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),o=e.i(39151),n=e.i(19374);function s(e,r=[],t=[]){let a,i="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,l=(0,o.forwardRef)(({className:e,...r},t)=>(0,o.createElement)(n.default,{ref:t,icon:i,className:e,...r}));return i.name&&(l.displayName=(a=(e=>{let r="",t=!1;for(let o of e){if("-"===o||"_"===o||o<=" "){t=r.length>0;continue}0===r.length?r+=o.toLowerCase():r+=t?o.toUpperCase():o,t=!1}return r})(i.name)).charAt(0).toUpperCase()+a.slice(1)),l}let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let i=s(a),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=s(l);function p(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),o=e<0?"-":"";return t<3600?`${o}${Math.floor(t/60)}m ${t%60}s`:`${o}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let u=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,d={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"]},stats:e=>[{label:"Avg Load Time",value:p(u(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(u(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(u(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:u(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{header:"Load",cell:e=>p(e.newRelic.loadTime)},{header:"LCP",cell:e=>p(e.newRelic.lcp)},{header:"TTFB",cell:e=>p(e.newRelic.ttfb)},{header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{header:"INP",cell:e=>void 0===e.newRelic.inp?"—":p(e.newRelic.inp)},{header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},h=Object.keys(d);e.s(["KEY_LABELS",0,{NEWRELIC_API_KEY:"New Relic User API key",NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:"New Relic account ID",SENTRY_API_KEY:"Sentry auth token",SENTRY_DSN:"Sentry DSN"},"TOOLS",0,d,"TOOL_IDS",0,h],67119);let x="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},f={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},m="AI_PROVIDER";function g(e){return process.env[e]??""}let y=e=>d[e].keys.required.every(e=>g(e));function _(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}e.s(["AI_PROVIDERS",0,f,"AI_PROVIDER_KEY",0,m,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,x,"SETUP_KEYS",0,["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],"activeAi",0,function(){let e=process.env[m];for(let r of(e&&e in f?[e]:[]).concat(Object.keys(f))){let e=process.env[f[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>h.filter(y),"env",0,g,"isToolConnected",0,y,"nrHosts",0,(e="eu"===process.env[x]?"eu":"us")=>E[e],"projectDir",0,_,"writeEnvLocal",0,function(e,o=process.env.METRICFLOW_ENV_FILE||(0,t.join)(_(),".env.local")){let n=(0,r.existsSync)(o)?(0,r.readFileSync)(o,"utf8").split("\n"):[],s=new Map(Object.entries(e)),a=n.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&s.has(r)){let e=s.get(r);return s.delete(r),`${r}=${e}`}return e});for(;a.length&&""===a[a.length-1];)a.pop();for(let[e,r]of s)a.push(`${e}=${r}`);let i=`${o}.tmp`;for(let[t,n]of((0,r.writeFileSync)(i,a.join("\n")+"\n",{mode:384}),(0,r.renameSync)(i,o),Object.entries(e)))process.env[t]=n}],12892)},24514,e=>{"use strict";let r=new Set(["localhost","127.0.0.1","[::1]"]),t=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let o=e.headers.get("x-forwarded-for");if(o&&!o.split(",").every(e=>t.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let n=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!r.has(n))return!1;let s=e.headers.get("origin");try{return!s||r.has(new URL(s).hostname)}catch{return!1}}])},83808,e=>{"use strict";var r=e.i(60756);async function t(e,t){let o={Authorization:`Bearer ${e}`},n=t.orgId?await r.default.get(`${t.apiBase}/organizations/`,{headers:o,timeout:8e3}):await r.default.get(`${t.apiBase}/projects/`,{headers:o,timeout:8e3}),s=Array.isArray(n.data)?n.data:[];return(t.orgId?s.find(e=>String(e.id)===t.orgId)?.slug:s.find(e=>String(e.id)===t.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,t,"parseSentryDsn",0,function(e){let r;try{r=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==r.protocol&&"http:"!==r.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(!r.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let t=r.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(t))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let o=r.host.match(/^o(\d+)\.ingest\.(.+)$/i),n=o?o[2]:r.host;return{ok:!0,projectId:t,orgId:o?o[1]:null,apiBase:`${r.protocol}//${n}/api/0`}}])},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
1
+ module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),s=e.i(39151),o=e.i(19374);function a(e,r=[],t=[]){let n,i="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,l=(0,s.forwardRef)(({className:e,...r},t)=>(0,s.createElement)(o.default,{ref:t,icon:i,className:e,...r}));return i.name&&(l.displayName=(n=(e=>{let r="",t=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){t=r.length>0;continue}0===r.length?r+=s.toLowerCase():r+=t?s.toUpperCase():s,t=!1}return r})(i.name)).charAt(0).toUpperCase()+n.slice(1)),l}let n={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};n.node;let i=a(n),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=a(l);function d(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),s=e<0?"-":"";return t<3600?`${s}${Math.floor(t/60)}m ${t%60}s`:`${s}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],u=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,h={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:d(u(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:d(u(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:d(u(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:u(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>d(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>d(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>d(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let r=e.newRelic.inp;return void 0===r?"—":d(r)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["errors"],stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{needs:"errors",header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},f=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,r])=>[e,r.label])),x=Object.keys(h);e.s(["KEY_LABELS",0,f,"TOOLS",0,h,"TOOL_IDS",0,x,"mergeMetrics",0,function(e,r,t){let s={};for(let[o,a]of Object.entries(r)){let r=t.includes(a)?void 0:e[a]?.[o];void 0!==r&&(s[o]=r)}return s},"sourcesFor",0,function(e){let r={};for(let t of p){let s=x.find(r=>e.includes(r)&&h[r].capabilities.includes(t));s&&(r[t]=s)}return r}],67119);let m=x.flatMap(e=>h[e].keys.required),y="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},g={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},v="AI_PROVIDER";function R(e){return process.env[e]??""}let b=e=>h[e].keys.required.every(e=>R(e));function S(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let I=/[\s\0#"'`\\$]/;e.s(["AI_PROVIDERS",0,g,"AI_PROVIDER_KEY",0,v,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,y,"SETUP_KEYS",0,m,"UNSAFE",0,I,"activeAi",0,function(){let e=process.env[v];for(let r of(e&&e in g?[e]:[]).concat(Object.keys(g))){let e=process.env[g[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>x.filter(b),"env",0,R,"isToolConnected",0,b,"nrHosts",0,(e="eu"===process.env[y]?"eu":"us")=>E[e],"projectDir",0,S,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,t.join)(S(),".env.local")){let o=new Set([...Object.values(h).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(g).map(e=>e.key),v]);for(let[r,t]of Object.entries(e)){if(!o.has(r))throw Error("Refused to write a key name no tool declares.");if(I.test(t))throw Error("Refused to write a value with unsafe characters.")}let a=(0,r.existsSync)(s)?(0,r.readFileSync)(s,"utf8").split("\n"):[],n=new Map(Object.entries(e)),i=a.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&n.has(r)){let e=n.get(r);return n.delete(r),`${r}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,r]of n)i.push(`${e}=${r}`);let l=`${s}.tmp`;for(let[t,o]of((0,r.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,r.renameSync)(l,s),Object.entries(e)))process.env[t]=o}],12892)},24514,e=>{"use strict";let r=new Set(["localhost","127.0.0.1","[::1]"]),t=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let s=e.headers.get("x-forwarded-for");if(s&&!s.split(",").every(e=>t.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let o=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!r.has(o))return!1;let a=e.headers.get("origin");try{return!a||r.has(new URL(a).hostname)}catch{return!1}}])},83808,e=>{"use strict";var r=e.i(60756);async function t(e,t){let s={Authorization:`Bearer ${e}`},o=t.orgId?await r.default.get(`${t.apiBase}/organizations/`,{headers:s,timeout:8e3}):await r.default.get(`${t.apiBase}/projects/`,{headers:s,timeout:8e3}),a=Array.isArray(o.data)?o.data:[];return(t.orgId?a.find(e=>String(e.id)===t.orgId)?.slug:a.find(e=>String(e.id)===t.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,t,"parseSentryDsn",0,function(e){let r;try{r=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==r.protocol&&"http:"!==r.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(!r.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let t=r.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(t))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let s=r.host.match(/^o(\d+)\.ingest\.(.+)$/i),o=s?s[2]:r.host;return{ok:!0,projectId:t,orgId:s?s[1]:null,apiBase:`${r.protocol}//${o}/api/0`}}])},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__00bbqkl._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57007,e=>{"use strict";async function t(){return Response.json({status:"ok",timestamp:new Date().toISOString(),version:"0.5.0"})}e.s(["GET",0,t],57007)},84327,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),n=e.i(37892),s=e.i(54261),i=e.i(39548),o=e.i(68187),l=e.i(63984),u=e.i(88743),d=e.i(24698),p=e.i(13487),c=e.i(48776),h=e.i(29398),x=e.i(31610),R=e.i(45919),v=e.i(93695),m=e.i(12741);e.i(95315);var g=e.i(98732);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/health/route",pathname:"/api/health",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/health/route.ts",nextConfigOutput:"",userland:()=>e.r(57007),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:E,serverHooks:C}=w;async function y(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/health/route";f=f.replace(/\/index$/,"")||"/";let E=await w.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:y,params:A,nextConfig:T,parsedUrl:b,isDraftMode:S,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:H}=E,j=(0,o.normalizeAppPath)(f),I=!!q.routes[_]&&(w.isDev||(0,m.isRouteCacheOwner)(_,w.cacheOwner,q.routes[_])),M=!!(q.dynamicRoutes[j]||I),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,b,!1):t.end("This page could not be found"),null);if(M&&!S){let e=q.dynamicRoutes[j];if(e&&!1===e.fallback&&!I){if(T.adapterPath)return await D();throw new v.NoFallbackError}}let U=null;!M||w.isDev||S||(U="/index"===(U=_)?"/":U);let F=!0===w.isDev||!M,K=M&&!F;H&&k&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:k,serverActionsManifest:H});let L=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,T,q,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:A,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!T.experimental.authInterrupts,useCacheTimeout:T.experimental.useCacheTimeout},cacheComponents:!!T.cacheComponents,validationLevel:T.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:T.cacheLife,staticPageGenerationTimeout:T.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>w.onRequestError(e,t,a,n,P)},sharedContext:{buildId:C,deploymentId:y}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&N&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=W.renderOpts.collectedTags;if(!M)return await (0,c.sendResponse)(z,Z,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[R.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==r&&r>0?T.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),t}},Y=async(n,i)=>{try{var o,l;let n=await w.handleResponse({req:e,nextConfig:T,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&M||s.delete(R.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,x.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(z,Z,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),M)throw t;await (0,c.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||j,o=`${L} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:E})},"routeModule",0,w,"serverHooks",0,C,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,E])}];
1
+ module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57007,e=>{"use strict";async function t(){return Response.json({status:"ok",timestamp:new Date().toISOString(),version:"0.5.2"})}e.s(["GET",0,t],57007)},84327,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),n=e.i(37892),s=e.i(54261),i=e.i(39548),o=e.i(68187),l=e.i(63984),u=e.i(88743),d=e.i(24698),p=e.i(13487),c=e.i(48776),h=e.i(29398),x=e.i(31610),R=e.i(45919),v=e.i(93695),m=e.i(12741);e.i(95315);var g=e.i(98732);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/health/route",pathname:"/api/health",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/health/route.ts",nextConfigOutput:"",userland:()=>e.r(57007),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:E,serverHooks:C}=w;async function y(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/health/route";f=f.replace(/\/index$/,"")||"/";let E=await w.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:y,params:A,nextConfig:T,parsedUrl:b,isDraftMode:S,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:H}=E,j=(0,o.normalizeAppPath)(f),I=!!q.routes[_]&&(w.isDev||(0,m.isRouteCacheOwner)(_,w.cacheOwner,q.routes[_])),M=!!(q.dynamicRoutes[j]||I),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,b,!1):t.end("This page could not be found"),null);if(M&&!S){let e=q.dynamicRoutes[j];if(e&&!1===e.fallback&&!I){if(T.adapterPath)return await D();throw new v.NoFallbackError}}let U=null;!M||w.isDev||S||(U="/index"===(U=_)?"/":U);let F=!0===w.isDev||!M,K=M&&!F;H&&k&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:k,serverActionsManifest:H});let L=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,T,q,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:A,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!T.experimental.authInterrupts,useCacheTimeout:T.experimental.useCacheTimeout},cacheComponents:!!T.cacheComponents,validationLevel:T.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:T.cacheLife,staticPageGenerationTimeout:T.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>w.onRequestError(e,t,a,n,P)},sharedContext:{buildId:C,deploymentId:y}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&N&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=W.renderOpts.collectedTags;if(!M)return await (0,c.sendResponse)(z,Z,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[R.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==r&&r>0?T.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),t}},Y=async(n,i)=>{try{var o,l;let n=await w.handleResponse({req:e,nextConfig:T,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&M||s.delete(R.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,x.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(z,Z,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),M)throw t;await (0,c.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||j,o=`${L} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:E})},"routeModule",0,w,"serverHooks",0,C,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,E])}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0fkj1-q._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},60780,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(24514),a=e.i(12892);let o={loadSeconds:1.5,errorPercent:2,uptimeSLA:99.9},s=()=>process.env.METRICFLOW_SETTINGS_FILE||(0,r.join)((0,a.projectDir)(),".metricflow-settings.json"),i={loadSeconds:[.1,30],errorPercent:[.1,100],uptimeSLA:[90,100]};function l(){try{return{...o,...JSON.parse((0,t.readFileSync)(s(),"utf8"))}}catch{return o}}async function u(){return Response.json(l())}async function c(e){let r;if(!(0,n.isLocalRequest)(e))return Response.json({error:(0,n.REFUSAL_MESSAGE)()},{status:403});try{r=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let a=l();for(let[e,[t,n]]of Object.entries(i)){if(void 0===r[e])continue;let o=r[e];if("number"!=typeof o||!Number.isFinite(o)||o<t||o>n)return Response.json({error:`${e} must be a number between ${t} and ${n}.`},{status:400});a[e]=o}try{let e=`${s()}.tmp`;(0,t.writeFileSync)(e,JSON.stringify(a,null,2)),(0,t.renameSync)(e,s())}catch{return Response.json({error:"Settings could not be written. Check folder permissions."},{status:500})}return Response.json(a)}e.s(["GET",0,u,"PUT",0,c],60780)},30229,e=>{"use strict";var t=e.i(12425),r=e.i(83353),n=e.i(47902),a=e.i(37892),o=e.i(54261),s=e.i(39548),i=e.i(68187),l=e.i(63984),u=e.i(88743),c=e.i(24698),d=e.i(13487),p=e.i(48776),h=e.i(29398),R=e.i(31610),E=e.i(45919),f=e.i(93695),m=e.i(12741);e.i(95315);var v=e.i(98732);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/settings/route",pathname:"/api/settings",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/settings/route.ts",nextConfigOutput:"",userland:()=>e.r(60780),...{}}),{workAsyncStorage:x,workUnitAsyncStorage:y,serverHooks:w}=g;async function C(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),g.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/settings/route";x=x.replace(/\/index$/,"")||"/";let y=await g.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:C,params:S,nextConfig:_,parsedUrl:I,isDraftMode:N,prerenderManifest:A,routerServerContext:b,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,resolvedPathname:O,clientReferenceManifest:L,serverActionsManifest:k}=y,M=(0,i.normalizeAppPath)(x),j=!!A.routes[O]&&(g.isDev||(0,m.isRouteCacheOwner)(O,g.cacheOwner,A.routes[O])),q=!!(A.dynamicRoutes[M]||j),D=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,I,!1):t.end("This page could not be found"),null);if(q&&!N){let e=A.dynamicRoutes[M];if(e&&!1===e.fallback&&!j){if(_.adapterPath)return await D();throw new f.NoFallbackError}}let $=null;!q||g.isDev||N||($="/index"===($=O)?"/":$);let F=!0===g.isDev||!q,U=q&&!F;k&&L&&(0,s.setManifestsSingleton)({page:x,clientReferenceManifest:L,serverActionsManifest:k});let K=e.method||"GET",H=(0,o.getTracer)(),Y=H.getActiveScopeSpan(),W=!!(null==b?void 0:b.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,_,A,G);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let z={params:S,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts,useCacheTimeout:_.experimental.useCacheTimeout},cacheComponents:!!_.cacheComponents,validationLevel:_.experimental.instantInsights.validationLevel,isDraftMode:N,supportsDynamicResponse:F,incrementalCache:B,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:_.cacheLife,staticPageGenerationTimeout:_.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>g.onRequestError(e,t,n,a,b)},sharedContext:{buildId:w,deploymentId:C}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!G&&T&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await g.handle(J,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let o=z.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let s=z.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(V,X,a,o),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);s&&(t[E.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=E.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,n=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=E.INFINITE_CACHE?!1!==r&&r>0?_.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,b),t}},Q=async(a,s)=>{try{var i,l;let a=await g.handleResponse({req:e,nextConfig:_,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:G});if(!q)return;if((null==a||null==(i=a.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",T?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);G&&q||o.delete(E.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,R.getCacheControlHeader)(a.cacheControl)),await (0,p.sendResponse)(V,X,new Response(a.value.body,{headers:o,status:a.value.status||200}));return}catch(t){if(t instanceof f.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,b),q)throw t;await (0,p.sendResponse)(V,X,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:o.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route")||M,i=`${K} ${n}`;a.setAttributes({"next.route":n,"http.route":n,"next.span_name":i}),a.updateName(i),s&&s!==a&&(s.setAttribute("http.route",n),s.updateName(i))})()}};if(W&&Y)await Q(Y,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(c.BaseServerSpan.handleRequest,{spanName:`${K} ${x}`,kind:o.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!W)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:y})},"routeModule",0,g,"serverHooks",0,w,"workAsyncStorage",0,x,"workUnitAsyncStorage",0,y])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(39151),a=e.i(19374);function o(e,t=[],r=[]){let s,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(a.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(s=(e=>{let t="",r=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){r=t.length>0;continue}0===t.length?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t})(i.name)).charAt(0).toUpperCase()+s.slice(1)),l}let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let i=o(s),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let u=o(l);function c(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),n=e<0?"-":"";return r<3600?`${n}${Math.floor(r/60)}m ${r%60}s`:`${n}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let d=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,p={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"]},stats:e=>[{label:"Avg Load Time",value:c(d(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:c(d(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:c(d(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:d(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{header:"Load",cell:e=>c(e.newRelic.loadTime)},{header:"LCP",cell:e=>c(e.newRelic.lcp)},{header:"TTFB",cell:e=>c(e.newRelic.ttfb)},{header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{header:"INP",cell:e=>void 0===e.newRelic.inp?"—":c(e.newRelic.inp)},{header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:u,description:"Errors captured per page over the last 24 hours.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},stats:e=>{let t=e.reduce((e,t)=>(t.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?t:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{header:"Last Seen",cell:e=>{let t=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}}]}},h=Object.keys(p);e.s(["KEY_LABELS",0,{NEWRELIC_API_KEY:"New Relic User API key",NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:"New Relic account ID",SENTRY_API_KEY:"Sentry auth token",SENTRY_DSN:"Sentry DSN"},"TOOLS",0,p,"TOOL_IDS",0,h],67119);let R="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},f={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},m="AI_PROVIDER";function v(e){return process.env[e]??""}let g=e=>p[e].keys.required.every(e=>v(e));function x(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}e.s(["AI_PROVIDERS",0,f,"AI_PROVIDER_KEY",0,m,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,R,"SETUP_KEYS",0,["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],"activeAi",0,function(){let e=process.env[m];for(let t of(e&&e in f?[e]:[]).concat(Object.keys(f))){let e=process.env[f[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>h.filter(g),"env",0,v,"isToolConnected",0,g,"nrHosts",0,(e="eu"===process.env[R]?"eu":"us")=>E[e],"projectDir",0,x,"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,r.join)(x(),".env.local")){let a=(0,t.existsSync)(n)?(0,t.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),s=a.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;s.length&&""===s[s.length-1];)s.pop();for(let[e,t]of o)s.push(`${e}=${t}`);let i=`${n}.tmp`;for(let[r,a]of((0,t.writeFileSync)(i,s.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,n),Object.entries(e)))process.env[r]=a}],12892)},24514,e=>{"use strict";let t=new Set(["localhost","127.0.0.1","[::1]"]),r=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let n=e.headers.get("x-forwarded-for");if(n&&!n.split(",").every(e=>r.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let a=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(a))return!1;let o=e.headers.get("origin");try{return!o||t.has(new URL(o).hostname)}catch{return!1}}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
1
+ module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},60780,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(24514),a=e.i(12892);let s={loadSeconds:1.5,errorPercent:2,uptimeSLA:99.9},o=()=>process.env.METRICFLOW_SETTINGS_FILE||(0,r.join)((0,a.projectDir)(),".metricflow-settings.json"),i={loadSeconds:[.1,30],errorPercent:[.1,100],uptimeSLA:[90,100]};function l(){try{return{...s,...JSON.parse((0,t.readFileSync)(o(),"utf8"))}}catch{return s}}async function c(){return Response.json(l())}async function d(e){let r;if(!(0,n.isLocalRequest)(e))return Response.json({error:(0,n.REFUSAL_MESSAGE)()},{status:403});try{r=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let a=l();for(let[e,[t,n]]of Object.entries(i)){if(void 0===r[e])continue;let s=r[e];if("number"!=typeof s||!Number.isFinite(s)||s<t||s>n)return Response.json({error:`${e} must be a number between ${t} and ${n}.`},{status:400});a[e]=s}try{let e=`${o()}.tmp`;(0,t.writeFileSync)(e,JSON.stringify(a,null,2)),(0,t.renameSync)(e,o())}catch{return Response.json({error:"Settings could not be written. Check folder permissions."},{status:500})}return Response.json(a)}e.s(["GET",0,c,"PUT",0,d],60780)},30229,e=>{"use strict";var t=e.i(12425),r=e.i(83353),n=e.i(47902),a=e.i(37892),s=e.i(54261),o=e.i(39548),i=e.i(68187),l=e.i(63984),c=e.i(88743),d=e.i(24698),u=e.i(13487),p=e.i(48776),h=e.i(29398),f=e.i(31610),R=e.i(45919),E=e.i(93695),m=e.i(12741);e.i(95315);var v=e.i(98732);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/settings/route",pathname:"/api/settings",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/settings/route.ts",nextConfigOutput:"",userland:()=>e.r(60780),...{}}),{workAsyncStorage:y,workUnitAsyncStorage:x,serverHooks:w}=g;async function S(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),g.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/settings/route";y=y.replace(/\/index$/,"")||"/";let x=await g.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:S,params:b,nextConfig:C,parsedUrl:_,isDraftMode:A,prerenderManifest:N,routerServerContext:I,isOnDemandRevalidate:T,revalidateOnlyGenerated:O,resolvedPathname:k,clientReferenceManifest:P,serverActionsManifest:j}=x,L=(0,i.normalizeAppPath)(y),M=!!N.routes[k]&&(g.isDev||(0,m.isRouteCacheOwner)(k,g.cacheOwner,N.routes[k])),q=!!(N.dynamicRoutes[L]||M),D=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,_,!1):t.end("This page could not be found"),null);if(q&&!A){let e=N.dynamicRoutes[L];if(e&&!1===e.fallback&&!M){if(C.adapterPath)return await D();throw new E.NoFallbackError}}let F=null;!q||g.isDev||A||(F="/index"===(F=k)?"/":F);let $=!0===g.isDev||!q,U=q&&!$;j&&P&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:P,serverActionsManifest:j});let K=e.method||"GET",H=(0,s.getTracer)(),W=H.getActiveScopeSpan(),Y=!!(null==I?void 0:I.isWrappedByNextServer),G=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,C,N,G);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let V={params:b,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:A,supportsDynamicResponse:$,incrementalCache:B,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>g.onRequestError(e,t,n,a,I)},sharedContext:{buildId:w,deploymentId:S}},z=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=c.NextRequestAdapter.fromNodeNextRequest(z,(0,c.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!G&&T&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await g.handle(J,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&n.waitUntil&&(n.waitUntil(s),s=void 0);let o=V.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(z,X,a,s),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);o&&(t[R.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,n=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==r&&r>0?C.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,I),t}},Q=async(a,o)=>{try{var i,l;let a=await g.handleResponse({req:e,nextConfig:C,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:O,responseGenerator:Z,waitUntil:n.waitUntil,isMinimalMode:G});if(!q)return;if((null==a||null==(i=a.value)?void 0:i.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",T?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);G&&q||s.delete(R.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,f.getCacheControlHeader)(a.cacheControl)),await (0,p.sendResponse)(z,X,new Response(a.value.body,{headers:s,status:a.value.status||200}));return}catch(t){if(t instanceof E.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,I),q)throw t;await (0,p.sendResponse)(z,X,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:s.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route")||L,i=`${K} ${n}`;a.setAttributes({"next.route":n,"http.route":n,"next.span_name":i}),a.updateName(i),o&&o!==a&&(o.setAttribute("http.route",n),o.updateName(i))})()}};if(Y&&W)await Q(W,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!Y)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:x})},"routeModule",0,g,"serverHooks",0,w,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,x])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(39151),a=e.i(19374);function s(e,t=[],r=[]){let o,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(a.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(o=(e=>{let t="",r=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){r=t.length>0;continue}0===t.length?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t})(i.name)).charAt(0).toUpperCase()+o.slice(1)),l}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let i=s(o),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=s(l);function d(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),n=e<0?"-":"";return r<3600?`${n}${Math.floor(r/60)}m ${r%60}s`:`${n}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let u=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],p=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,h={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:d(p(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:d(p(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:d(p(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:p(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>d(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>d(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>d(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let t=e.newRelic.inp;return void 0===t?"—":d(t)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["errors"],stats:e=>{let t=e.reduce((e,t)=>(t.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?t:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{needs:"errors",header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}}]}},f=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,t])=>[e,t.label])),R=Object.keys(h);e.s(["KEY_LABELS",0,f,"TOOLS",0,h,"TOOL_IDS",0,R,"mergeMetrics",0,function(e,t,r){let n={};for(let[a,s]of Object.entries(t)){let t=r.includes(s)?void 0:e[s]?.[a];void 0!==t&&(n[a]=t)}return n},"sourcesFor",0,function(e){let t={};for(let r of u){let n=R.find(t=>e.includes(t)&&h[t].capabilities.includes(r));n&&(t[r]=n)}return t}],67119);let E=R.flatMap(e=>h[e].keys.required),m="NEWRELIC_REGION",v={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},g={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},y="AI_PROVIDER";function x(e){return process.env[e]??""}let w=e=>h[e].keys.required.every(e=>x(e));function S(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let b=/[\s\0#"'`\\$]/;e.s(["AI_PROVIDERS",0,g,"AI_PROVIDER_KEY",0,y,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,m,"SETUP_KEYS",0,E,"UNSAFE",0,b,"activeAi",0,function(){let e=process.env[y];for(let t of(e&&e in g?[e]:[]).concat(Object.keys(g))){let e=process.env[g[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>R.filter(w),"env",0,x,"isToolConnected",0,w,"nrHosts",0,(e="eu"===process.env[m]?"eu":"us")=>v[e],"projectDir",0,S,"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,r.join)(S(),".env.local")){let a=new Set([...Object.values(h).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(g).map(e=>e.key),y]);for(let[t,r]of Object.entries(e)){if(!a.has(t))throw Error("Refused to write a key name no tool declares.");if(b.test(r))throw Error("Refused to write a value with unsafe characters.")}let s=(0,t.existsSync)(n)?(0,t.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),i=s.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,t]of o)i.push(`${e}=${t}`);let l=`${n}.tmp`;for(let[r,a]of((0,t.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,t.renameSync)(l,n),Object.entries(e)))process.env[r]=a}],12892)},24514,e=>{"use strict";let t=new Set(["localhost","127.0.0.1","[::1]"]),r=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let n=e.headers.get("x-forwarded-for");if(n&&!n.split(",").every(e=>r.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let a=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(a))return!1;let s=e.headers.get("origin");try{return!s||t.has(new URL(s).hostname)}catch{return!1}}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0rfr72x._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},90770,e=>{"use strict";let r=new Map;e.s(["getTimings",0,function(){return Array.from(r.entries()).map(([e,r])=>({name:e,value:r})).sort((e,r)=>r.value-e.value)},"recordTiming",0,function(e,t){r.set(e,Math.round(t))}])},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),n=e.i(39151),o=e.i(19374);function s(e,r=[],t=[]){let a,l="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,i=(0,n.forwardRef)(({className:e,...r},t)=>(0,n.createElement)(o.default,{ref:t,icon:l,className:e,...r}));return l.name&&(i.displayName=(a=(e=>{let r="",t=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){t=r.length>0;continue}0===r.length?r+=n.toLowerCase():r+=t?n.toUpperCase():n,t=!1}return r})(l.name)).charAt(0).toUpperCase()+a.slice(1)),i}let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let l=s(a),i={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};i.node;let c=s(i);function p(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),n=e<0?"-":"";return t<3600?`${n}${Math.floor(t/60)}m ${t%60}s`:`${n}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let u=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,d={"new-relic":{label:"New Relic",icon:l,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"]},stats:e=>[{label:"Avg Load Time",value:p(u(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(u(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(u(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:u(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{header:"Load",cell:e=>p(e.newRelic.loadTime)},{header:"LCP",cell:e=>p(e.newRelic.lcp)},{header:"TTFB",cell:e=>p(e.newRelic.ttfb)},{header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{header:"INP",cell:e=>void 0===e.newRelic.inp?"—":p(e.newRelic.inp)},{header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},h=Object.keys(d);e.s(["KEY_LABELS",0,{NEWRELIC_API_KEY:"New Relic User API key",NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:"New Relic account ID",SENTRY_API_KEY:"Sentry auth token",SENTRY_DSN:"Sentry DSN"},"TOOLS",0,d,"TOOL_IDS",0,h],67119);let x="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},m={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},f="AI_PROVIDER";function _(e){return process.env[e]??""}let v=e=>d[e].keys.required.every(e=>_(e));function y(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}e.s(["AI_PROVIDERS",0,m,"AI_PROVIDER_KEY",0,f,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,x,"SETUP_KEYS",0,["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],"activeAi",0,function(){let e=process.env[f];for(let r of(e&&e in m?[e]:[]).concat(Object.keys(m))){let e=process.env[m[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>h.filter(v),"env",0,_,"isToolConnected",0,v,"nrHosts",0,(e="eu"===process.env[x]?"eu":"us")=>E[e],"projectDir",0,y,"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,t.join)(y(),".env.local")){let o=(0,r.existsSync)(n)?(0,r.readFileSync)(n,"utf8").split("\n"):[],s=new Map(Object.entries(e)),a=o.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&s.has(r)){let e=s.get(r);return s.delete(r),`${r}=${e}`}return e});for(;a.length&&""===a[a.length-1];)a.pop();for(let[e,r]of s)a.push(`${e}=${r}`);let l=`${n}.tmp`;for(let[t,o]of((0,r.writeFileSync)(l,a.join("\n")+"\n",{mode:384}),(0,r.renameSync)(l,n),Object.entries(e)))process.env[t]=o}],12892)},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
1
+ module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},90770,e=>{"use strict";let r=new Map;e.s(["getTimings",0,function(){return Array.from(r.entries()).map(([e,r])=>({name:e,value:r})).sort((e,r)=>r.value-e.value)},"recordTiming",0,function(e,t){r.set(e,Math.round(t))}])},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),s=e.i(39151),n=e.i(19374);function o(e,r=[],t=[]){let a,l="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,i=(0,s.forwardRef)(({className:e,...r},t)=>(0,s.createElement)(n.default,{ref:t,icon:l,className:e,...r}));return l.name&&(i.displayName=(a=(e=>{let r="",t=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){t=r.length>0;continue}0===r.length?r+=s.toLowerCase():r+=t?s.toUpperCase():s,t=!1}return r})(l.name)).charAt(0).toUpperCase()+a.slice(1)),i}let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let l=o(a),i={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};i.node;let c=o(i);function d(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),s=e<0?"-":"";return t<3600?`${s}${Math.floor(t/60)}m ${t%60}s`:`${s}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],u=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,h={"new-relic":{label:"New Relic",icon:l,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:d(u(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:d(u(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:d(u(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:u(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>d(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>d(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>d(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let r=e.newRelic.inp;return void 0===r?"—":d(r)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["errors"],stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{needs:"errors",header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},x=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,r])=>[e,r.label])),f=Object.keys(h);e.s(["KEY_LABELS",0,x,"TOOLS",0,h,"TOOL_IDS",0,f,"mergeMetrics",0,function(e,r,t){let s={};for(let[n,o]of Object.entries(r)){let r=t.includes(o)?void 0:e[o]?.[n];void 0!==r&&(s[n]=r)}return s},"sourcesFor",0,function(e){let r={};for(let t of p){let s=f.find(r=>e.includes(r)&&h[r].capabilities.includes(t));s&&(r[t]=s)}return r}],67119);let m=f.flatMap(e=>h[e].keys.required),E="NEWRELIC_REGION",y={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},v={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},R="AI_PROVIDER";function g(e){return process.env[e]??""}let b=e=>h[e].keys.required.every(e=>g(e));function _(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let I=/[\s\0#"'`\\$]/;e.s(["AI_PROVIDERS",0,v,"AI_PROVIDER_KEY",0,R,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,E,"SETUP_KEYS",0,m,"UNSAFE",0,I,"activeAi",0,function(){let e=process.env[R];for(let r of(e&&e in v?[e]:[]).concat(Object.keys(v))){let e=process.env[v[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>f.filter(b),"env",0,g,"isToolConnected",0,b,"nrHosts",0,(e="eu"===process.env[E]?"eu":"us")=>y[e],"projectDir",0,_,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,t.join)(_(),".env.local")){let n=new Set([...Object.values(h).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(v).map(e=>e.key),R]);for(let[r,t]of Object.entries(e)){if(!n.has(r))throw Error("Refused to write a key name no tool declares.");if(I.test(t))throw Error("Refused to write a value with unsafe characters.")}let o=(0,r.existsSync)(s)?(0,r.readFileSync)(s,"utf8").split("\n"):[],a=new Map(Object.entries(e)),l=o.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&a.has(r)){let e=a.get(r);return a.delete(r),`${r}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,r]of a)l.push(`${e}=${r}`);let i=`${s}.tmp`;for(let[t,n]of((0,r.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,r.renameSync)(i,s),Object.entries(e)))process.env[t]=n}],12892)},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__186pj_c._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},66680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},90770,e=>{"use strict";let r=new Map;e.s(["getTimings",0,function(){return Array.from(r.entries()).map(([e,r])=>({name:e,value:r})).sort((e,r)=>r.value-e.value)},"recordTiming",0,function(e,t){r.set(e,Math.round(t))}])},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),n=e.i(39151),o=e.i(19374);function s(e,r=[],t=[]){let a,i="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,l=(0,n.forwardRef)(({className:e,...r},t)=>(0,n.createElement)(o.default,{ref:t,icon:i,className:e,...r}));return i.name&&(l.displayName=(a=(e=>{let r="",t=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){t=r.length>0;continue}0===r.length?r+=n.toLowerCase():r+=t?n.toUpperCase():n,t=!1}return r})(i.name)).charAt(0).toUpperCase()+a.slice(1)),l}let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let i=s(a),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=s(l);function u(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),n=e<0?"-":"";return t<3600?`${n}${Math.floor(t/60)}m ${t%60}s`:`${n}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let p=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,d={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"]},stats:e=>[{label:"Avg Load Time",value:u(p(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:u(p(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:u(p(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:p(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{header:"Load",cell:e=>u(e.newRelic.loadTime)},{header:"LCP",cell:e=>u(e.newRelic.lcp)},{header:"TTFB",cell:e=>u(e.newRelic.ttfb)},{header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{header:"INP",cell:e=>void 0===e.newRelic.inp?"—":u(e.newRelic.inp)},{header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},h=Object.keys(d);e.s(["KEY_LABELS",0,{NEWRELIC_API_KEY:"New Relic User API key",NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:"New Relic account ID",SENTRY_API_KEY:"Sentry auth token",SENTRY_DSN:"Sentry DSN"},"TOOLS",0,d,"TOOL_IDS",0,h],67119);let x="NEWRELIC_REGION",f={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},E={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},m="AI_PROVIDER";function g(e){return process.env[e]??""}let y=e=>d[e].keys.required.every(e=>g(e));function _(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}e.s(["AI_PROVIDERS",0,E,"AI_PROVIDER_KEY",0,m,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,x,"SETUP_KEYS",0,["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],"activeAi",0,function(){let e=process.env[m];for(let r of(e&&e in E?[e]:[]).concat(Object.keys(E))){let e=process.env[E[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>h.filter(y),"env",0,g,"isToolConnected",0,y,"nrHosts",0,(e="eu"===process.env[x]?"eu":"us")=>f[e],"projectDir",0,_,"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,t.join)(_(),".env.local")){let o=(0,r.existsSync)(n)?(0,r.readFileSync)(n,"utf8").split("\n"):[],s=new Map(Object.entries(e)),a=o.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&s.has(r)){let e=s.get(r);return s.delete(r),`${r}=${e}`}return e});for(;a.length&&""===a[a.length-1];)a.pop();for(let[e,r]of s)a.push(`${e}=${r}`);let i=`${n}.tmp`;for(let[t,o]of((0,r.writeFileSync)(i,a.join("\n")+"\n",{mode:384}),(0,r.renameSync)(i,n),Object.entries(e)))process.env[t]=o}],12892)},84594,e=>{"use strict";var r=e.i(60756),t=e.i(12892);async function n(e,o=()=>!1){let s,a;if(process.env[t.REGION_KEY])return e((0,t.nrHosts)());try{if(s=await e((0,t.nrHosts)("us")),!o(s))return s}catch(t){let e=r.default.isAxiosError(t)?t.response?.status:void 0;if(401!==e&&403!==e)throw t;a=t}try{let r=await e((0,t.nrHosts)("eu"));if(!o(r))return process.env[t.REGION_KEY]="eu",r}catch{}if(a)throw a;return s}async function o(e,t,o){return(await n(n=>r.default.post(n.graphql,{query:t},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:o}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,o,"withRegion",0,n])},83808,e=>{"use strict";var r=e.i(60756);async function t(e,t){let n={Authorization:`Bearer ${e}`},o=t.orgId?await r.default.get(`${t.apiBase}/organizations/`,{headers:n,timeout:8e3}):await r.default.get(`${t.apiBase}/projects/`,{headers:n,timeout:8e3}),s=Array.isArray(o.data)?o.data:[];return(t.orgId?s.find(e=>String(e.id)===t.orgId)?.slug:s.find(e=>String(e.id)===t.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,t,"parseSentryDsn",0,function(e){let r;try{r=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==r.protocol&&"http:"!==r.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(!r.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let t=r.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(t))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let n=r.host.match(/^o(\d+)\.ingest\.(.+)$/i),o=n?n[2]:r.host;return{ok:!0,projectId:t,orgId:n?n[1]:null,apiBase:`${r.protocol}//${o}/api/0`}}])},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
1
+ module.exports=[49719,(e,r,t)=>{r.exports=e.x("assert",()=>require("assert"))},54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},27699,(e,r,t)=>{r.exports=e.x("events",()=>require("events"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},21517,(e,r,t)=>{r.exports=e.x("http",()=>require("http"))},25328,(e,r,t)=>{r.exports=e.x("http2",()=>require("http2"))},24836,(e,r,t)=>{r.exports=e.x("https",()=>require("https"))},4446,(e,r,t)=>{r.exports=e.x("net",()=>require("net"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},66680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},2157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},88947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},55004,(e,r,t)=>{r.exports=e.x("tls",()=>require("tls"))},70722,(e,r,t)=>{r.exports=e.x("tty",()=>require("tty"))},92509,(e,r,t)=>{r.exports=e.x("url",()=>require("url"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},6461,(e,r,t)=>{r.exports=e.x("zlib",()=>require("zlib"))},90770,e=>{"use strict";let r=new Map;e.s(["getTimings",0,function(){return Array.from(r.entries()).map(([e,r])=>({name:e,value:r})).sort((e,r)=>r.value-e.value)},"recordTiming",0,function(e,t){r.set(e,Math.round(t))}])},12892,67119,e=>{"use strict";var r=e.i(2157),t=e.i(50227),s=e.i(39151),n=e.i(19374);function o(e,r=[],t=[]){let a,i="string"==typeof e?function(e,r,t=[]){if(null==r)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:r,...t.length>0?{aliases:t}:{}}}(e,r,t):e,l=(0,s.forwardRef)(({className:e,...r},t)=>(0,s.createElement)(n.default,{ref:t,icon:i,className:e,...r}));return i.name&&(l.displayName=(a=(e=>{let r="",t=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){t=r.length>0;continue}0===r.length?r+=s.toLowerCase():r+=t?s.toUpperCase():s,t=!1}return r})(i.name)).charAt(0).toUpperCase()+a.slice(1)),l}let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let i=o(a),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=o(l);function p(e){if(!Number.isFinite(e))return"—";let r=Math.abs(Math.round(e));if(r<1e3)return`${Math.round(e)}ms`;if(r<59950)return`${+(e/1e3).toFixed(1)}s`;let t=Math.round(r/1e3),s=e<0?"-":"";return t<3600?`${s}${Math.floor(t/60)}m ${t%60}s`:`${s}${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}let u=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],d=e=>e.length?e.reduce((e,r)=>e+r,0)/e.length:0,h={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:p(d(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(d(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(d(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:d(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>p(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>p(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>p(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let r=e.newRelic.inp;return void 0===r?"—":p(r)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors captured per page over the last 24 hours.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["errors"],stats:e=>{let r=e.reduce((e,r)=>(r.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?r:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,r)=>e+r,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:r?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{needs:"errors",header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let r=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(r)?"—":new Date(r).toLocaleString()}}]}},f=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,r])=>[e,r.label])),x=Object.keys(h);e.s(["KEY_LABELS",0,f,"TOOLS",0,h,"TOOL_IDS",0,x,"mergeMetrics",0,function(e,r,t){let s={};for(let[n,o]of Object.entries(r)){let r=t.includes(o)?void 0:e[o]?.[n];void 0!==r&&(s[n]=r)}return s},"sourcesFor",0,function(e){let r={};for(let t of u){let s=x.find(r=>e.includes(r)&&h[r].capabilities.includes(t));s&&(r[t]=s)}return r}],67119);let y=x.flatMap(e=>h[e].keys.required),m="NEWRELIC_REGION",g={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},E={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},v="AI_PROVIDER";function R(e){return process.env[e]??""}let b=e=>h[e].keys.required.every(e=>R(e));function I(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let w=/[\s\0#"'`\\$]/;e.s(["AI_PROVIDERS",0,E,"AI_PROVIDER_KEY",0,v,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,m,"SETUP_KEYS",0,y,"UNSAFE",0,w,"activeAi",0,function(){let e=process.env[v];for(let r of(e&&e in E?[e]:[]).concat(Object.keys(E))){let e=process.env[E[r].key];if(e)return{provider:r,key:e}}return null},"connectedTools",0,()=>x.filter(b),"env",0,R,"isToolConnected",0,b,"nrHosts",0,(e="eu"===process.env[m]?"eu":"us")=>g[e],"projectDir",0,I,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,t.join)(I(),".env.local")){let n=new Set([...Object.values(h).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(E).map(e=>e.key),v]);for(let[r,t]of Object.entries(e)){if(!n.has(r))throw Error("Refused to write a key name no tool declares.");if(w.test(t))throw Error("Refused to write a value with unsafe characters.")}let o=(0,r.existsSync)(s)?(0,r.readFileSync)(s,"utf8").split("\n"):[],a=new Map(Object.entries(e)),i=o.map(e=>{let r=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(r&&a.has(r)){let e=a.get(r);return a.delete(r),`${r}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,r]of a)i.push(`${e}=${r}`);let l=`${s}.tmp`;for(let[t,n]of((0,r.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,r.renameSync)(l,s),Object.entries(e)))process.env[t]=n}],12892)},84594,e=>{"use strict";var r=e.i(60756),t=e.i(12892);async function s(e,n=()=>!1){let o,a;if(process.env[t.REGION_KEY])return e((0,t.nrHosts)());try{if(o=await e((0,t.nrHosts)("us")),!n(o))return o}catch(t){let e=r.default.isAxiosError(t)?t.response?.status:void 0;if(401!==e&&403!==e)throw t;a=t}try{let r=await e((0,t.nrHosts)("eu"));if(!n(r))return process.env[t.REGION_KEY]="eu",r}catch{}if(a)throw a;return o}async function n(e,t,n){return(await s(s=>r.default.post(s.graphql,{query:t},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:n}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,n,"withRegion",0,s])},83808,e=>{"use strict";var r=e.i(60756);async function t(e,t){let s={Authorization:`Bearer ${e}`},n=t.orgId?await r.default.get(`${t.apiBase}/organizations/`,{headers:s,timeout:8e3}):await r.default.get(`${t.apiBase}/projects/`,{headers:s,timeout:8e3}),o=Array.isArray(n.data)?n.data:[];return(t.orgId?o.find(e=>String(e.id)===t.orgId)?.slug:o.find(e=>String(e.id)===t.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,t,"parseSentryDsn",0,function(e){let r;try{r=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==r.protocol&&"http:"!==r.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(!r.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let t=r.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(t))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let s=r.host.match(/^o(\d+)\.ingest\.(.+)$/i),n=s?s[2]:r.host;return{ok:!0,projectId:t,orgId:s?s[1]:null,apiBase:`${r.protocol}//${n}/api/0`}}])},27252,e=>{"use strict";e.s(["default",()=>r]);let r=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var r=e.i(27252);e.n(r)},18286,(e,r,t)=>{"use strict";r.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__19yigji._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},70722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},83464,e=>{"use strict";var t=e.i(60756),r=e.i(12892),a=e.i(24514);let n=/[\s\0#"'`\\$]/,s=()=>Response.json({error:(0,a.REFUSAL_MESSAGE)()},{status:403}),o={gemini:e=>t.default.get("https://generativelanguage.googleapis.com/v1beta/models",{params:{key:e},timeout:8e3}),claude:e=>t.default.get("https://api.anthropic.com/v1/models",{headers:{"x-api-key":e,"anthropic-version":"2023-06-01"},timeout:8e3}),openai:e=>t.default.get("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${e}`},timeout:8e3})};async function i(e){return(0,a.isLocalRequest)(e)?Response.json({provider:(0,r.activeAi)()?.provider??null,keys:Object.fromEntries(Object.entries(r.AI_PROVIDERS).map(([e,t])=>[e,!!process.env[t.key]]))}):s()}async function l(e){let i;if(!(0,a.isLocalRequest)(e))return s();try{i=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let l=i.provider;if(!("string"==typeof l&&l in r.AI_PROVIDERS))return Response.json({saved:!1,error:"Choose a provider."},{status:400});let u="string"==typeof i.key?i.key.trim():"";if(!u)return Response.json({saved:!1,error:"Required."},{status:400});if(n.test(u))return Response.json({saved:!1,error:"Contains spaces or special characters. Paste the key without them."},{status:400});try{await o[l](u)}catch(n){let e=t.default.isAxiosError(n)?n.response?.status:void 0,a=400===e||401===e||403===e?`${r.AI_PROVIDERS[l].label} rejected this key.`:`Could not reach ${r.AI_PROVIDERS[l].label} to check the key.`;return Response.json({saved:!1,error:a},{status:422})}try{(0,r.writeEnvLocal)({[r.AI_PROVIDER_KEY]:l,[r.AI_PROVIDERS[l].key]:u})}catch{return Response.json({saved:!1,error:"Key is valid but .env.local could not be written. Check folder permissions."},{status:500})}return Response.json({saved:!0,provider:l})}e.s(["GET",0,i,"POST",0,l])},9001,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),n=e.i(37892),s=e.i(54261),o=e.i(39548),i=e.i(68187),l=e.i(63984),u=e.i(88743),c=e.i(24698),p=e.i(13487),d=e.i(48776),h=e.i(29398),R=e.i(31610),E=e.i(45919),v=e.i(93695),m=e.i(12741);e.i(95315);var f=e.i(98732);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/setup/ai/route",pathname:"/api/setup/ai",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/setup/ai/route.ts",nextConfigOutput:"",userland:()=>e.r(83464),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:_}=x;async function C(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/setup/ai/route";g=g.replace(/\/index$/,"")||"/";let y=await x.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:_,deploymentId:C,params:w,nextConfig:I,parsedUrl:S,isDraftMode:A,prerenderManifest:b,routerServerContext:N,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,resolvedPathname:q,clientReferenceManifest:O,serverActionsManifest:k}=y,L=(0,i.normalizeAppPath)(g),j=!!b.routes[q]&&(x.isDev||(0,m.isRouteCacheOwner)(q,x.cacheOwner,b.routes[q])),M=!!(b.dynamicRoutes[L]||j),D=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,S,!1):t.end("This page could not be found"),null);if(M&&!A){let e=b.dynamicRoutes[L];if(e&&!1===e.fallback&&!j){if(I.adapterPath)return await D();throw new v.NoFallbackError}}let $=null;!M||x.isDev||A||($="/index"===($=q)?"/":$);let U=!0===x.isDev||!M,K=M&&!U;k&&O&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:k});let F=e.method||"GET",Y=(0,s.getTracer)(),H=Y.getActiveScopeSpan(),W=!!(null==N?void 0:N.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),B=(0,n.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,I,b,V);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:w,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!I.experimental.authInterrupts,useCacheTimeout:I.experimental.useCacheTimeout},cacheComponents:!!I.cacheComponents,validationLevel:I.experimental.instantInsights.validationLevel,isDraftMode:A,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:I.cacheLife,staticPageGenerationTimeout:I.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>x.onRequestError(e,t,a,n,N)},sharedContext:{buildId:_,deploymentId:C}},z=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:r})=>{try{if(!V&&T&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await x.handle(Z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let s=G.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let o=G.renderOpts.collectedTags;if(!M)return await (0,d.sendResponse)(z,X,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[E.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=E.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=E.INFINITE_CACHE?!1!==r&&r>0?I.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:T})},!1,N),t}},Q=async(n,o)=>{try{var i,l;let n=await x.handleResponse({req:e,nextConfig:I,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,responseGenerator:J,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==n||null==(i=n.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",T?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&M||s.delete(E.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,d.sendResponse)(z,X,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:T})},!1,N),M)throw t;await (0,d.sendResponse)(z,X,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=Y.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||L,i=`${F} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),n.updateName(i),o&&o!==n&&(o.setAttribute("http.route",a),o.updateName(i))})()}};if(W&&H)await Q(H,void 0);else{let t=Y.getActiveScopeSpan();await Y.withPropagatedContext(e.headers,()=>Y.trace(c.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Q(e,t)),void 0,!W)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,_,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),a=e.i(39151),n=e.i(19374);function s(e,t=[],r=[]){let o,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(n.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(o=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(i.name)).charAt(0).toUpperCase()+o.slice(1)),l}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let i=s(o),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let u=s(l);function c(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),a=e<0?"-":"";return r<3600?`${a}${Math.floor(r/60)}m ${r%60}s`:`${a}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let p=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,d={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"]},stats:e=>[{label:"Avg Load Time",value:c(p(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:c(p(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:c(p(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:p(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{header:"Load",cell:e=>c(e.newRelic.loadTime)},{header:"LCP",cell:e=>c(e.newRelic.lcp)},{header:"TTFB",cell:e=>c(e.newRelic.ttfb)},{header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{header:"INP",cell:e=>void 0===e.newRelic.inp?"—":c(e.newRelic.inp)},{header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:u,description:"Errors captured per page over the last 24 hours.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},stats:e=>{let t=e.reduce((e,t)=>(t.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?t:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{header:"Last Seen",cell:e=>{let t=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}}]}},h=Object.keys(d);e.s(["KEY_LABELS",0,{NEWRELIC_API_KEY:"New Relic User API key",NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:"New Relic account ID",SENTRY_API_KEY:"Sentry auth token",SENTRY_DSN:"Sentry DSN"},"TOOLS",0,d,"TOOL_IDS",0,h],67119);let R="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},v={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},m="AI_PROVIDER";function f(e){return process.env[e]??""}let x=e=>d[e].keys.required.every(e=>f(e));function g(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}e.s(["AI_PROVIDERS",0,v,"AI_PROVIDER_KEY",0,m,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,R,"SETUP_KEYS",0,["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],"activeAi",0,function(){let e=process.env[m];for(let t of(e&&e in v?[e]:[]).concat(Object.keys(v))){let e=process.env[v[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>h.filter(x),"env",0,f,"isToolConnected",0,x,"nrHosts",0,(e="eu"===process.env[R]?"eu":"us")=>E[e],"projectDir",0,g,"writeEnvLocal",0,function(e,a=process.env.METRICFLOW_ENV_FILE||(0,r.join)(g(),".env.local")){let n=(0,t.existsSync)(a)?(0,t.readFileSync)(a,"utf8").split("\n"):[],s=new Map(Object.entries(e)),o=n.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&s.has(t)){let e=s.get(t);return s.delete(t),`${t}=${e}`}return e});for(;o.length&&""===o[o.length-1];)o.pop();for(let[e,t]of s)o.push(`${e}=${t}`);let i=`${a}.tmp`;for(let[r,n]of((0,t.writeFileSync)(i,o.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,a),Object.entries(e)))process.env[r]=n}],12892)},24514,e=>{"use strict";let t=new Set(["localhost","127.0.0.1","[::1]"]),r=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let a=e.headers.get("x-forwarded-for");if(a&&!a.split(",").every(e=>r.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let n=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(n))return!1;let s=e.headers.get("origin");try{return!s||t.has(new URL(s).hostname)}catch{return!1}}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
1
+ module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},70722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},83464,e=>{"use strict";var t=e.i(60756),r=e.i(12892),a=e.i(24514);let s=/[\s\0#"'`\\$]/,n=()=>Response.json({error:(0,a.REFUSAL_MESSAGE)()},{status:403}),o={gemini:e=>t.default.get("https://generativelanguage.googleapis.com/v1beta/models",{params:{key:e},timeout:8e3}),claude:e=>t.default.get("https://api.anthropic.com/v1/models",{headers:{"x-api-key":e,"anthropic-version":"2023-06-01"},timeout:8e3}),openai:e=>t.default.get("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${e}`},timeout:8e3})};async function i(e){return(0,a.isLocalRequest)(e)?Response.json({provider:(0,r.activeAi)()?.provider??null,keys:Object.fromEntries(Object.entries(r.AI_PROVIDERS).map(([e,t])=>[e,!!process.env[t.key]]))}):n()}async function l(e){let i;if(!(0,a.isLocalRequest)(e))return n();try{i=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let l=i.provider;if(!("string"==typeof l&&l in r.AI_PROVIDERS))return Response.json({saved:!1,error:"Choose a provider."},{status:400});let u="string"==typeof i.key?i.key.trim():"";if(!u)return Response.json({saved:!1,error:"Required."},{status:400});if(s.test(u))return Response.json({saved:!1,error:"Contains spaces or special characters. Paste the key without them."},{status:400});try{await o[l](u)}catch(s){let e=t.default.isAxiosError(s)?s.response?.status:void 0,a=400===e||401===e||403===e?`${r.AI_PROVIDERS[l].label} rejected this key.`:`Could not reach ${r.AI_PROVIDERS[l].label} to check the key.`;return Response.json({saved:!1,error:a},{status:422})}try{(0,r.writeEnvLocal)({[r.AI_PROVIDER_KEY]:l,[r.AI_PROVIDERS[l].key]:u})}catch{return Response.json({saved:!1,error:"Key is valid but .env.local could not be written. Check folder permissions."},{status:500})}return Response.json({saved:!0,provider:l})}e.s(["GET",0,i,"POST",0,l])},9001,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),s=e.i(37892),n=e.i(54261),o=e.i(39548),i=e.i(68187),l=e.i(63984),u=e.i(88743),d=e.i(24698),c=e.i(13487),p=e.i(48776),h=e.i(29398),R=e.i(31610),f=e.i(45919),v=e.i(93695),m=e.i(12741);e.i(95315);var E=e.i(98732);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/setup/ai/route",pathname:"/api/setup/ai",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/setup/ai/route.ts",nextConfigOutput:"",userland:()=>e.r(83464),...{}}),{workAsyncStorage:y,workUnitAsyncStorage:g,serverHooks:w}=x;async function b(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/setup/ai/route";y=y.replace(/\/index$/,"")||"/";let g=await x.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,deploymentId:b,params:C,nextConfig:_,parsedUrl:A,isDraftMode:S,prerenderManifest:I,routerServerContext:N,isOnDemandRevalidate:k,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:q,serverActionsManifest:P}=g,j=(0,i.normalizeAppPath)(y),L=!!I.routes[O]&&(x.isDev||(0,m.isRouteCacheOwner)(O,x.cacheOwner,I.routes[O])),M=!!(I.dynamicRoutes[j]||L),D=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!S){let e=I.dynamicRoutes[j];if(e&&!1===e.fallback&&!L){if(_.adapterPath)return await D();throw new v.NoFallbackError}}let $=null;!M||x.isDev||S||($="/index"===($=O)?"/":$);let U=!0===x.isDev||!M,F=M&&!U;P&&q&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:q,serverActionsManifest:P});let K=e.method||"GET",H=(0,n.getTracer)(),Y=H.getActiveScopeSpan(),W=!!(null==N?void 0:N.isWrappedByNextServer),V=!!(0,s.getRequestMeta)(e,"minimalMode"),G=(0,s.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,_,I,V);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let z={params:C,previewProps:I.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts,useCacheTimeout:_.experimental.useCacheTimeout},cacheComponents:!!_.cacheComponents,validationLevel:_.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,s.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:_.cacheLife,staticPageGenerationTimeout:_.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>x.onRequestError(e,t,a,s,N)},sharedContext:{buildId:w,deploymentId:b}},B=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:r})=>{try{if(!V&&k&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await x.handle(Z,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let n=z.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let o=z.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(B,X,s,n),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);o&&(t[f.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?_.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:E.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:k})},!1,N),t}},Q=async(s,o)=>{try{var i,l;let s=await x.handleResponse({req:e,nextConfig:_,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:I,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:T,responseGenerator:J,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==s||null==(i=s.value)?void 0:i.kind)!==E.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==s||null==(l=s.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",k?"REVALIDATED":s.isMiss?"MISS":s.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(s.value.headers);V&&M||n.delete(f.NEXT_CACHE_TAGS_HEADER),!s.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,R.getCacheControlHeader)(s.cacheControl)),await (0,p.sendResponse)(B,X,new Response(s.value.body,{headers:n,status:s.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:k})},!1,N),M)throw t;await (0,p.sendResponse)(B,X,new Response(null,{status:500}));return}finally{(()=>{if(!s)return;let e=t.statusCode;s.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(s.setStatus({code:n.SpanStatusCode.ERROR}),s.setAttribute("error.type",e.toString()));let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||j,i=`${K} ${a}`;s.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),s.updateName(i),o&&o!==s&&(o.setAttribute("http.route",a),o.updateName(i))})()}};if(W&&Y)await Q(Y,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${y}`,kind:n.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Q(e,t)),void 0,!W)}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:g})},"routeModule",0,x,"serverHooks",0,w,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,g])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),a=e.i(39151),s=e.i(19374);function n(e,t=[],r=[]){let o,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(s.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(o=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(i.name)).charAt(0).toUpperCase()+o.slice(1)),l}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let i=n(o),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let u=n(l);function d(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),a=e<0?"-":"";return r<3600?`${a}${Math.floor(r/60)}m ${r%60}s`:`${a}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let c=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],p=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,h={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:d(p(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:d(p(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:d(p(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:p(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>d(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>d(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>d(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let t=e.newRelic.inp;return void 0===t?"—":d(t)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:u,description:"Errors captured per page over the last 24 hours.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["errors"],stats:e=>{let t=e.reduce((e,t)=>(t.sentry?.errorCount??0)>(e?.sentry?.errorCount??0)?t:e,null);return[{label:"Total Errors",value:String(e.map(e=>e.sentry?.errorCount??0).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>(e.sentry?.errorCount??0)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(e.sentry?.errorCount??0)},{needs:"errors",header:"Latest Error",cell:e=>e.sentry?.latestErrors[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(e.sentry?.latestErrors[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}}]}},R=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,t])=>[e,t.label])),f=Object.keys(h);e.s(["KEY_LABELS",0,R,"TOOLS",0,h,"TOOL_IDS",0,f,"mergeMetrics",0,function(e,t,r){let a={};for(let[s,n]of Object.entries(t)){let t=r.includes(n)?void 0:e[n]?.[s];void 0!==t&&(a[s]=t)}return a},"sourcesFor",0,function(e){let t={};for(let r of c){let a=f.find(t=>e.includes(t)&&h[t].capabilities.includes(r));a&&(t[r]=a)}return t}],67119);let v=f.flatMap(e=>h[e].keys.required),m="NEWRELIC_REGION",E={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},x={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},y="AI_PROVIDER";function g(e){return process.env[e]??""}let w=e=>h[e].keys.required.every(e=>g(e));function b(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let C=/[\s\0#"'`\\$]/;e.s(["AI_PROVIDERS",0,x,"AI_PROVIDER_KEY",0,y,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,m,"SETUP_KEYS",0,v,"UNSAFE",0,C,"activeAi",0,function(){let e=process.env[y];for(let t of(e&&e in x?[e]:[]).concat(Object.keys(x))){let e=process.env[x[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>f.filter(w),"env",0,g,"isToolConnected",0,w,"nrHosts",0,(e="eu"===process.env[m]?"eu":"us")=>E[e],"projectDir",0,b,"writeEnvLocal",0,function(e,a=process.env.METRICFLOW_ENV_FILE||(0,r.join)(b(),".env.local")){let s=new Set([...Object.values(h).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(x).map(e=>e.key),y]);for(let[t,r]of Object.entries(e)){if(!s.has(t))throw Error("Refused to write a key name no tool declares.");if(C.test(r))throw Error("Refused to write a value with unsafe characters.")}let n=(0,t.existsSync)(a)?(0,t.readFileSync)(a,"utf8").split("\n"):[],o=new Map(Object.entries(e)),i=n.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,t]of o)i.push(`${e}=${t}`);let l=`${a}.tmp`;for(let[r,s]of((0,t.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,t.renameSync)(l,a),Object.entries(e)))process.env[r]=s}],12892)},24514,e=>{"use strict";let t=new Set(["localhost","127.0.0.1","[::1]"]),r=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]);e.s(["REFUSAL_MESSAGE",0,()=>"1"===process.env.METRICFLOW_EXPOSED?"Setup and Connect are disabled because the dashboard is exposed on the network (--host). Restart without --host to use them.":"Setup is only available from localhost.","isLocalRequest",0,function(e){if("1"===process.env.METRICFLOW_EXPOSED)return!1;let a=e.headers.get("x-forwarded-for");if(a&&!a.split(",").every(e=>r.has(e.trim().replace(/^\[|\]$/g,""))))return!1;let s=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(s))return!1;let n=e.headers.get("origin");try{return!n||t.has(new URL(n).hostname)}catch{return!1}}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__1igrw77._.js.map