@karan171996/metricflow 0.15.1 → 0.17.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 (349) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build/chunks/{[root-of-the-server]__05i36w1._.js → [root-of-the-server]__05i36w1t4lzaf._.js} +20 -18
  3. package/.next/build/chunks/{[root-of-the-server]__1kki86f._.js → [root-of-the-server]__1kki86fknkq7y._.js} +26 -41
  4. package/.next/build/chunks/{[turbopack-node]_transforms_postcss_ts_1gfkiq9._.js → [turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js} +2 -2
  5. package/.next/build/chunks/[turbopack]_runtime.js +146 -16
  6. package/.next/build/chunks/{node_modules__pnpm_1x2anb_._.js → node_modules__pnpm_1x2anb_hbin35._.js} +96 -94
  7. package/.next/build/chunks/{pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2v._.js → pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js} +3 -3
  8. package/.next/build-manifest.json +109 -9
  9. package/.next/fallback-build-manifest.json +3 -3
  10. package/.next/next-minimal-server.js.nft.json +1 -1
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +9 -9
  13. package/.next/required-server-files.js +20 -2
  14. package/.next/required-server-files.json +20 -2
  15. package/.next/server/app/_global-error/page/build-manifest.json +8 -6
  16. package/.next/server/app/_global-error/page.js +9 -8
  17. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  18. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_global-error.html +1 -1
  20. package/.next/server/app/_global-error.rsc +17 -13
  21. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +19 -15
  22. package/.next/server/app/_global-error.segments/_full.segment.rsc +17 -13
  23. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -1
  24. package/.next/server/app/_not-found/page/build-manifest.json +8 -6
  25. package/.next/server/app/_not-found/page.js +15 -14
  26. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  27. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/_not-found.html +2 -2
  29. package/.next/server/app/_not-found.rsc +49 -41
  30. package/.next/server/app/_not-found.segments/_full.segment.rsc +49 -41
  31. package/.next/server/app/_not-found.segments/_index.segment.rsc +36 -32
  32. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -19
  33. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
  34. package/.next/server/app/api/analyze/route.js +8 -7
  35. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  36. package/.next/server/app/api/connect/route.js +8 -7
  37. package/.next/server/app/api/connect/route.js.nft.json +1 -1
  38. package/.next/server/app/api/health/route.js +6 -5
  39. package/.next/server/app/api/health/route.js.nft.json +1 -1
  40. package/.next/server/app/api/lighthouse/route.js +8 -6
  41. package/.next/server/app/api/lighthouse/route.js.nft.json +1 -1
  42. package/.next/server/app/api/metrics/route.js +11 -9
  43. package/.next/server/app/api/metrics/route.js.nft.json +1 -1
  44. package/.next/server/app/api/settings/route.js +7 -6
  45. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  46. package/.next/server/app/api/setup/ai/route.js +8 -6
  47. package/.next/server/app/api/setup/ai/route.js.nft.json +1 -1
  48. package/.next/server/app/api/setup/route.js +11 -9
  49. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  50. package/.next/server/app/api/timings/route.js +7 -5
  51. package/.next/server/app/api/timings/route.js.nft.json +1 -1
  52. package/.next/server/app/connect/page/build-manifest.json +8 -6
  53. package/.next/server/app/connect/page.js +16 -15
  54. package/.next/server/app/connect/page.js.nft.json +1 -1
  55. package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
  56. package/.next/server/app/connect.html +2 -2
  57. package/.next/server/app/connect.rsc +50 -42
  58. package/.next/server/app/connect.segments/_full.segment.rsc +50 -42
  59. package/.next/server/app/connect.segments/_index.segment.rsc +36 -32
  60. package/.next/server/app/connect.segments/_tree.segment.rsc +4 -2
  61. package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +32 -25
  62. package/.next/server/app/icon.svg/route.js +6 -6
  63. package/.next/server/app/icon.svg/route.js.nft.json +1 -1
  64. package/.next/server/app/index.html +2 -2
  65. package/.next/server/app/index.rsc +51 -42
  66. package/.next/server/app/index.segments/__PAGE__.segment.rsc +25 -18
  67. package/.next/server/app/index.segments/_full.segment.rsc +51 -42
  68. package/.next/server/app/index.segments/_index.segment.rsc +36 -32
  69. package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
  70. package/.next/server/app/page/build-manifest.json +8 -6
  71. package/.next/server/app/page.js +16 -15
  72. package/.next/server/app/page.js.nft.json +1 -1
  73. package/.next/server/app/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/performance/[slug]/page/build-manifest.json +8 -6
  75. package/.next/server/app/performance/[slug]/page.js +20 -19
  76. package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
  77. package/.next/server/app/performance/[slug]/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app/performance/page/build-manifest.json +8 -6
  79. package/.next/server/app/performance/page.js +18 -16
  80. package/.next/server/app/performance/page.js.nft.json +1 -1
  81. package/.next/server/app/performance/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/performance.html +2 -2
  83. package/.next/server/app/performance.rsc +57 -49
  84. package/.next/server/app/performance.segments/_full.segment.rsc +57 -49
  85. package/.next/server/app/performance.segments/_index.segment.rsc +36 -32
  86. package/.next/server/app/performance.segments/_tree.segment.rsc +4 -2
  87. package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +42 -35
  88. package/.next/server/app/settings/page/build-manifest.json +8 -6
  89. package/.next/server/app/settings/page.js +19 -17
  90. package/.next/server/app/settings/page.js.nft.json +1 -1
  91. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  92. package/.next/server/app/setup/page/build-manifest.json +8 -6
  93. package/.next/server/app/setup/page.js +16 -15
  94. package/.next/server/app/setup/page.js.nft.json +1 -1
  95. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/setup.html +2 -2
  97. package/.next/server/app/setup.rsc +51 -43
  98. package/.next/server/app/setup.segments/_full.segment.rsc +51 -43
  99. package/.next/server/app/setup.segments/_index.segment.rsc +36 -32
  100. package/.next/server/app/setup.segments/_tree.segment.rsc +4 -2
  101. package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +33 -26
  102. package/.next/server/app/tools/[tool]/page/build-manifest.json +8 -6
  103. package/.next/server/app/tools/[tool]/page.js +19 -16
  104. package/.next/server/app/tools/[tool]/page.js.nft.json +1 -1
  105. package/.next/server/app/tools/[tool]/page_client-reference-manifest.js +1 -1
  106. package/.next/server/chunks/[externals]__034cn-2lv9fc5._.js +3 -0
  107. package/.next/server/chunks/[externals]__0m-k585k1ynvq._.js +3 -0
  108. package/.next/server/chunks/[externals]__0m1eyv0382orw._.js +3 -0
  109. package/.next/server/chunks/{[externals]__1rfyr-i._.js → [externals]__1rfyr-i_6_4of._.js} +1 -1
  110. package/.next/server/chunks/[externals]__1z442xhqm4-q4._.js +3 -0
  111. package/.next/server/chunks/{[externals]_chrome-launcher_1k_yki1._.js → [externals]_chrome-launcher_1k_yki1d1gvqj._.js} +1 -1
  112. package/.next/server/chunks/{[externals]_lighthouse_1su6d37._.js → [externals]_lighthouse_1su6d37ybt6tk._.js} +1 -1
  113. package/.next/server/chunks/[root-of-the-server]__021zfu6-7cc23._.js +3 -0
  114. package/.next/server/chunks/[root-of-the-server]__06wfj6ibmc2nc._.js +3 -0
  115. package/.next/server/chunks/[root-of-the-server]__07-t7hocjiwp-._.js +3 -0
  116. package/.next/server/chunks/[root-of-the-server]__07qwm-ol7lj-f._.js +3 -0
  117. package/.next/server/chunks/{[externals]__0k9wda_._.js → [root-of-the-server]__08dump-5r93r3._.js} +2 -2
  118. package/.next/server/chunks/[root-of-the-server]__09fryu78vrxh2._.js +10 -0
  119. package/.next/server/chunks/[root-of-the-server]__0unt2gweawji4._.js +5 -0
  120. package/.next/server/chunks/[root-of-the-server]__1180bcvq825ef._.js +3 -0
  121. package/.next/server/chunks/[root-of-the-server]__1lt0tsd3d01sd._.js +3 -0
  122. package/.next/server/chunks/[turbopack]_runtime.js +146 -16
  123. package/.next/server/chunks/_0gf6dylf3zjfv._.js +3 -0
  124. package/.next/server/chunks/_0osv2v2oxu5cl._.js +22 -0
  125. package/.next/server/chunks/_0rxn0u4e1o4b3._.js +3 -0
  126. package/.next/server/chunks/_0rzna9d4n439r._.js +3 -0
  127. package/.next/server/chunks/_0s9eekzfwdkl-._.js +3 -0
  128. package/.next/server/chunks/_0soa3p92n2fo7._.js +3 -0
  129. package/.next/server/chunks/_0y45n89gcozoo._.js +61 -0
  130. package/.next/server/chunks/_1-tdo5u11b168._.js +3 -0
  131. package/.next/server/chunks/_10k_8ykwywloj._.js +3 -0
  132. package/.next/server/chunks/_1_v0zb-qciv_j._.js +3 -0
  133. package/.next/server/chunks/_1luopd-0ilby5._.js +6 -0
  134. package/.next/server/chunks/_1z5i56hgk-jwq._.js +3 -0
  135. package/.next/server/chunks/{_next-internal_server_app_api_analyze_route_actions_0lx-23h.js → _next-internal_server_app_api_analyze_route_actions_0lx-23h7r4czj.js} +1 -1
  136. package/.next/server/chunks/{_next-internal_server_app_api_connect_route_actions_1r5w03m.js → _next-internal_server_app_api_connect_route_actions_1r5w03mk355_9.js} +1 -1
  137. package/.next/server/chunks/{_next-internal_server_app_api_health_route_actions_1ryftkb.js → _next-internal_server_app_api_health_route_actions_1ryftkbeskq31.js} +1 -1
  138. package/.next/server/chunks/{_next-internal_server_app_api_lighthouse_route_actions_1_4ee8x.js → _next-internal_server_app_api_lighthouse_route_actions_1_4ee8xkkof6q.js} +1 -1
  139. package/.next/server/chunks/{_next-internal_server_app_api_metrics_route_actions_0qn5q3s.js → _next-internal_server_app_api_metrics_route_actions_0qn5q3sml2oxr.js} +1 -1
  140. package/.next/server/chunks/{_next-internal_server_app_api_settings_route_actions_1bpm9ac.js → _next-internal_server_app_api_settings_route_actions_1bpm9acuq1z18.js} +1 -1
  141. package/.next/server/chunks/{_next-internal_server_app_api_setup_ai_route_actions_0-ay8t8.js → _next-internal_server_app_api_setup_ai_route_actions_0-ay8t8qf99q5.js} +1 -1
  142. package/.next/server/chunks/{_next-internal_server_app_api_setup_route_actions_0txsuev.js → _next-internal_server_app_api_setup_route_actions_0txsuev7wlgqs.js} +1 -1
  143. package/.next/server/chunks/{_next-internal_server_app_api_timings_route_actions_1tsq7j6.js → _next-internal_server_app_api_timings_route_actions_1tsq7j6wf3hxu.js} +1 -1
  144. package/.next/server/chunks/{_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js → _next-internal_server_app_icon_svg_route_actions_1r2h_ubdhjtcp.js} +1 -1
  145. package/.next/server/chunks/lib_analytics_index_ts_00-ju4e5xwlcg._.js +20 -0
  146. package/.next/server/chunks/lib_hosted-stub_proxy_ts_17ed5vy81u-ak._.js +3 -0
  147. package/.next/server/chunks/lib_lighthouseRun_ts_1mjhbdn7ve63z._.js +3 -0
  148. package/.next/server/chunks/node_modules__pnpm_0in3pkq9pbn4f._.js +8 -0
  149. package/.next/server/chunks/ssr/0hs5_cn_dist_index_1l1fs8y5rr27h.js +3 -0
  150. package/.next/server/chunks/ssr/{10ci_lucide-react_dist_esm_Icon_mjs_05sy43t._.js → 10ci_lucide-react_dist_esm_Icon_mjs_05sy43tai5etd._.js} +2 -2
  151. package/.next/server/chunks/ssr/10ci_lucide-react_dist_esm_icons_zap_mjs_1e_yn93pbl2or._.js +3 -0
  152. package/.next/server/chunks/ssr/1mf__next_dist_03us230sc4s0h._.js +3 -0
  153. package/.next/server/chunks/ssr/1mf__next_dist_1vwwe2eezpy_7._.js +32 -0
  154. package/.next/server/chunks/ssr/1mf__next_dist_20egvxrcd7_ds._.js +6 -0
  155. package/.next/server/chunks/ssr/1mf__next_dist_client_components_1x7wpramfovhf._.js +3 -0
  156. package/.next/server/chunks/ssr/1mf__next_dist_client_components_builtin_forbidden_1502kx65fl78d.js +3 -0
  157. package/.next/server/chunks/ssr/1mf__next_dist_client_components_builtin_global-error_0kfn1fe4yos5o.js +3 -0
  158. package/.next/server/chunks/ssr/1mf__next_dist_client_components_builtin_unauthorized_177yqp0_cu2ez.js +3 -0
  159. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_00afil-v8lomb.js +3 -0
  160. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_07vwo673qz7bv.js +3 -0
  161. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_0urvugn9l2jex.js +3 -0
  162. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1ex5k-ovn8oo7.js +3 -0
  163. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1frvip0wwhdua.js +3 -0
  164. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1k42o4ycmnm1d.js +3 -0
  165. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1ugswt9vavizo.js +3 -0
  166. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1uzrphmi_cdb_.js +3 -0
  167. package/.next/server/chunks/ssr/1mf__next_dist_esm_build_templates_app-page_1z3poc4gqjwz-.js +3 -0
  168. package/.next/server/chunks/ssr/{[externals]_chrome-launcher_1k_yki1._.js → [externals]_chrome-launcher_1k_yki1d1gvqj._.js} +1 -1
  169. package/.next/server/chunks/ssr/{[externals]_lighthouse_1su6d37._.js → [externals]_lighthouse_1su6d37ybt6tk._.js} +1 -1
  170. package/.next/server/chunks/ssr/[externals]_next_dist_server_app-render_1m3jdi0t8hc-e._.js +3 -0
  171. package/.next/server/chunks/ssr/[root-of-the-server]__045sn1hct_tin._.js +3 -0
  172. package/.next/server/chunks/ssr/[root-of-the-server]__06lsjfhk7q07d._.js +3 -0
  173. package/.next/server/chunks/ssr/[root-of-the-server]__06x7snv1kcukh._.js +3 -0
  174. package/.next/server/chunks/ssr/[root-of-the-server]__07t859l_zmk0y._.js +3 -0
  175. package/.next/server/chunks/ssr/[root-of-the-server]__0_-9rlragciyf._.js +3 -0
  176. package/.next/server/chunks/ssr/[root-of-the-server]__0ge_a6b3kff2i._.js +3 -0
  177. package/.next/server/chunks/ssr/[root-of-the-server]__0p5esqtz_gjsm._.js +3 -0
  178. package/.next/server/chunks/ssr/[root-of-the-server]__0x-gl_3kv4dvu._.js +14 -0
  179. package/.next/server/chunks/ssr/[root-of-the-server]__0zj7u9hi7p069._.js +3 -0
  180. package/.next/server/chunks/ssr/[root-of-the-server]__1j747xcnawxvq._.js +3 -0
  181. package/.next/server/chunks/ssr/[root-of-the-server]__1pvl_-x1p353o._.js +3 -0
  182. package/.next/server/chunks/ssr/[root-of-the-server]__1q0s-a72-963f._.js +3 -0
  183. package/.next/server/chunks/ssr/[root-of-the-server]__1tt4fc9o1flme._.js +3 -0
  184. package/.next/server/chunks/ssr/[root-of-the-server]__1tw35y2g9muco._.js +3 -0
  185. package/.next/server/chunks/ssr/[turbopack]_runtime.js +146 -16
  186. package/.next/server/chunks/ssr/_04dkb8_-u70c9._.js +3 -0
  187. package/.next/server/chunks/ssr/_05048jmmcpbt_._.js +25 -0
  188. package/.next/server/chunks/ssr/_05g2g4e1n40vo._.js +3 -0
  189. package/.next/server/chunks/ssr/_0lyj2fhh-71bs._.js +3 -0
  190. package/.next/server/chunks/ssr/_0oigw1lf_-al4._.js +3 -0
  191. package/.next/server/chunks/ssr/_0x410-rr056-t._.js +23 -0
  192. package/.next/server/chunks/ssr/_13m9nev1lpq46._.js +3 -0
  193. package/.next/server/chunks/ssr/_14i08_i-23tuv._.js +3 -0
  194. package/.next/server/chunks/ssr/_18i8t72qyqvj2._.js +3 -0
  195. package/.next/server/chunks/ssr/_19n6wbo1l46do._.js +3 -0
  196. package/.next/server/chunks/ssr/_1lcqytrznpg6z._.js +3 -0
  197. package/.next/server/chunks/ssr/_1ncvmplpjc121._.js +3 -0
  198. package/.next/server/chunks/ssr/_1qf8b2zwn1vs4._.js +3 -0
  199. package/.next/server/chunks/ssr/_1ykoks44xsk1-._.js +3 -0
  200. package/.next/server/chunks/ssr/_20ize_amjuoiv._.js +3 -0
  201. package/.next/server/chunks/ssr/{_next-internal_server_app__global-error_page_actions_0zi5s8-.js → _next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js} +1 -1
  202. package/.next/server/chunks/ssr/{_next-internal_server_app__not-found_page_actions_0pt47yr.js → _next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js} +1 -1
  203. package/.next/server/chunks/ssr/{_next-internal_server_app_connect_page_actions_1g-s_3i.js → _next-internal_server_app_connect_page_actions_1g-s_3iey9c04.js} +1 -1
  204. package/.next/server/chunks/ssr/{_next-internal_server_app_page_actions_0hhsz1j.js → _next-internal_server_app_page_actions_0hhsz1jew5ls7.js} +1 -1
  205. package/.next/server/chunks/ssr/{_next-internal_server_app_performance_[slug]_page_actions_1pzv3w1.js → _next-internal_server_app_performance_[slug]_page_actions_1pzv3w11cuux3.js} +1 -1
  206. package/.next/server/chunks/ssr/{_next-internal_server_app_performance_page_actions_0vi13cc.js → _next-internal_server_app_performance_page_actions_0vi13ccve174w.js} +1 -1
  207. package/.next/server/chunks/ssr/{_next-internal_server_app_settings_page_actions_11x4dq5.js → _next-internal_server_app_settings_page_actions_11x4dq5dxd520.js} +1 -1
  208. package/.next/server/chunks/ssr/{_next-internal_server_app_setup_page_actions_0u1sm0s.js → _next-internal_server_app_setup_page_actions_0u1sm0sllb5ji.js} +1 -1
  209. package/.next/server/chunks/ssr/{_next-internal_server_app_tools_[tool]_page_actions_0-u-_p-.js → _next-internal_server_app_tools_[tool]_page_actions_0-u-_p-s2s4kf.js} +1 -1
  210. package/.next/server/chunks/ssr/{app_performance_[slug]_loading_tsx_0d5z78a._.js → app_performance_[slug]_loading_tsx_0d5z78aya8__5._.js} +2 -2
  211. package/.next/server/chunks/ssr/{app_performance_loading_tsx_1bq2nq9._.js → app_performance_loading_tsx_1bq2nq9lqcbph._.js} +2 -2
  212. package/.next/server/chunks/ssr/app_settings_loading_tsx_0nv_78vvetpph._.js +3 -0
  213. package/.next/server/chunks/ssr/components_18w8egp7qpjjt._.js +3 -0
  214. package/.next/server/chunks/ssr/components_1riaczrknh270._.js +3 -0
  215. package/.next/server/chunks/ssr/components_Analytics_10du3pppo4ase._.js +3 -0
  216. package/.next/server/chunks/ssr/components_Connect_ConnectPage_tsx_0b0vsklxlkki5._.js +13 -0
  217. package/.next/server/chunks/ssr/components_EmptyState_tsx_14lsjecfunxtu._.js +3 -0
  218. package/.next/server/chunks/ssr/components_Setup_15a--oq28y7ah._.js +3 -0
  219. package/.next/server/chunks/ssr/components_Skeletons_index_tsx_0u35wgc1zx7_r._.js +3 -0
  220. package/.next/server/chunks/ssr/components_ToolInsights_1f6cy0p-ah6w8._.js +3 -0
  221. package/.next/server/chunks/ssr/components_ui_0fae3sxyejqkf._.js +3 -0
  222. package/.next/server/chunks/ssr/components_ui_0ow-v6i1pfvwb._.js +3 -0
  223. package/.next/server/chunks/ssr/components_ui_1eqtkk6j8c1wg._.js +3 -0
  224. package/.next/server/chunks/ssr/components_ui_card_tsx_1ijgg6979qdv1._.js +3 -0
  225. package/.next/server/chunks/ssr/lib_useNotificationPrefs_ts_1pc6xgs7erjti._.js +3 -0
  226. package/.next/server/chunks/ssr/node_modules__pnpm_0qyyzor7935s5._.js +32 -0
  227. package/.next/server/chunks/ssr/node_modules__pnpm_15uzg3c048r_s._.js +33 -0
  228. package/.next/server/chunks/ssr/node_modules__pnpm_1qq__y4frffjg._.js +33 -0
  229. package/.next/server/functions-config-manifest.json +4 -0
  230. package/.next/server/middleware-build-manifest.js +109 -9
  231. package/.next/server/middleware.js +4 -4
  232. package/.next/server/middleware.js.nft.json +1 -1
  233. package/.next/server/pages/404.html +2 -2
  234. package/.next/server/pages/500.html +1 -1
  235. package/.next/server/preview-props.json +5 -0
  236. package/.next/server/server-reference-manifest.js +1 -1
  237. package/.next/server/server-reference-manifest.json +1 -1
  238. package/.next/static/{8LtMJdCno9wkpYotBJePk → 3alXH6OUWpk3y4gpD18yo}/_clientMiddlewareManifest.js +4 -0
  239. package/.next/{server/chunks/ssr/node_modules__pnpm_20_uz79._.js → static/chunks/02d29qi4_pbbu.js} +2 -4
  240. package/.next/static/chunks/05l-4yyvaol7z.js +1 -0
  241. package/.next/static/chunks/0qo0f4cebeqml.js +1 -0
  242. package/.next/static/chunks/1_5l4q55pqn4k.js +1 -0
  243. package/.next/static/chunks/{2gp4docstg2a8.js → 1h07paelwfasb.js} +1 -1
  244. package/.next/static/chunks/{3eqgnx_zoya2q.css → 1yu174qlyg0sr.css} +1 -1
  245. package/.next/static/chunks/1ze1mg9mb0rxm.js +1 -0
  246. package/.next/static/chunks/21aqw71jtdbyt.js +1 -0
  247. package/.next/static/chunks/2q28qc_voku-m.js +1 -0
  248. package/.next/static/chunks/2seflj_4e3fgy.js +22 -0
  249. package/.next/static/chunks/2wje_rdg6693f.js +1 -0
  250. package/.next/static/chunks/35qv7olver6_f.js +1 -0
  251. package/.next/static/chunks/35s3suo7qypsf.js +11 -0
  252. package/.next/static/chunks/396lmbjx9ezjw.js +1 -0
  253. package/.next/static/chunks/3dq6tq6lvwk0p.js +1 -0
  254. package/.next/static/chunks/3k6gx3lp7rf1u.js +1 -0
  255. package/.next/static/chunks/3y20fa9od78jj.js +1 -0
  256. package/.next/static/chunks/3y4u-f4g35u_2.js +1 -0
  257. package/.next/static/chunks/turbopack-2c3mg3r-05n1w.js +1 -0
  258. package/.next/trace +1 -1
  259. package/.next/trace-build +1 -1
  260. package/bin/cli.mjs +2 -0
  261. package/package.json +10 -5
  262. package/.next/server/chunks/[externals]__0_9e0si._.js +0 -3
  263. package/.next/server/chunks/[externals]__1f7xi3d._.js +0 -3
  264. package/.next/server/chunks/[root-of-the-server]__05mqvyo._.js +0 -3
  265. package/.next/server/chunks/[root-of-the-server]__0_6kr31._.js +0 -3
  266. package/.next/server/chunks/[root-of-the-server]__0az11z3._.js +0 -3
  267. package/.next/server/chunks/[root-of-the-server]__0dv0ig6._.js +0 -3
  268. package/.next/server/chunks/[root-of-the-server]__0egyynf._.js +0 -3
  269. package/.next/server/chunks/[root-of-the-server]__0fkj1-q._.js +0 -3
  270. package/.next/server/chunks/[root-of-the-server]__0vbatar._.js +0 -3
  271. package/.next/server/chunks/[root-of-the-server]__1231g--._.js +0 -3
  272. package/.next/server/chunks/[root-of-the-server]__12lkcy1._.js +0 -3
  273. package/.next/server/chunks/[root-of-the-server]__1mj-h97._.js +0 -3
  274. package/.next/server/chunks/[root-of-the-server]__1o9k4jf._.js +0 -10
  275. package/.next/server/chunks/[root-of-the-server]__1wcikrf._.js +0 -5
  276. package/.next/server/chunks/_08xo8nu._.js +0 -22
  277. package/.next/server/chunks/_0j7t8f9._.js +0 -3
  278. package/.next/server/chunks/_0w8wvdn._.js +0 -3
  279. package/.next/server/chunks/_0wct7-r._.js +0 -3
  280. package/.next/server/chunks/_1f80q3b._.js +0 -158
  281. package/.next/server/chunks/_1l9d64o._.js +0 -6
  282. package/.next/server/chunks/lib_analytics_index_ts_00-ju4e._.js +0 -20
  283. package/.next/server/chunks/node_modules__pnpm_1qoj6e0._.js +0 -8
  284. package/.next/server/chunks/ssr/0hs5_cn_dist_index_1l1fs8y.js +0 -3
  285. package/.next/server/chunks/ssr/0x0c_next_dist_03da18h._.js +0 -6
  286. package/.next/server/chunks/ssr/0x0c_next_dist_0lkq344._.js +0 -3
  287. package/.next/server/chunks/ssr/0x0c_next_dist_1icgwks._.js +0 -151
  288. package/.next/server/chunks/ssr/0x0c_next_dist_client_components_1z4ahr3._.js +0 -3
  289. package/.next/server/chunks/ssr/0x0c_next_dist_client_components_builtin_forbidden_0pm41ij.js +0 -3
  290. package/.next/server/chunks/ssr/0x0c_next_dist_client_components_builtin_global-error_1-wtk5-.js +0 -3
  291. package/.next/server/chunks/ssr/0x0c_next_dist_client_components_builtin_unauthorized_0v3_y-3.js +0 -3
  292. package/.next/server/chunks/ssr/[root-of-the-server]__02c3m72._.js +0 -3
  293. package/.next/server/chunks/ssr/[root-of-the-server]__0g1dtzd._.js +0 -3
  294. package/.next/server/chunks/ssr/[root-of-the-server]__0hifh__._.js +0 -3
  295. package/.next/server/chunks/ssr/[root-of-the-server]__0l4t71c._.js +0 -3
  296. package/.next/server/chunks/ssr/[root-of-the-server]__0tikq3c._.js +0 -14
  297. package/.next/server/chunks/ssr/[root-of-the-server]__0tz50uc._.js +0 -3
  298. package/.next/server/chunks/ssr/[root-of-the-server]__0xjblsu._.js +0 -3
  299. package/.next/server/chunks/ssr/[root-of-the-server]__1-0b897._.js +0 -3
  300. package/.next/server/chunks/ssr/[root-of-the-server]__13w6d6f._.js +0 -33
  301. package/.next/server/chunks/ssr/[root-of-the-server]__146cm0r._.js +0 -3
  302. package/.next/server/chunks/ssr/[root-of-the-server]__14_2v5e._.js +0 -3
  303. package/.next/server/chunks/ssr/[root-of-the-server]__1cl7b4r._.js +0 -3
  304. package/.next/server/chunks/ssr/[root-of-the-server]__1mydt_n._.js +0 -33
  305. package/.next/server/chunks/ssr/_0aid3rp._.js +0 -25
  306. package/.next/server/chunks/ssr/_0cst0jv._.js +0 -3
  307. package/.next/server/chunks/ssr/_0vl4jhl._.js +0 -13
  308. package/.next/server/chunks/ssr/_0zly58v._.js +0 -3
  309. package/.next/server/chunks/ssr/_1-l5u-_._.js +0 -3
  310. package/.next/server/chunks/ssr/_12brazw._.js +0 -3
  311. package/.next/server/chunks/ssr/_13m9nev._.js +0 -3
  312. package/.next/server/chunks/ssr/_19n6wbo._.js +0 -3
  313. package/.next/server/chunks/ssr/_1cfwie5._.js +0 -3
  314. package/.next/server/chunks/ssr/_1d39141._.js +0 -3
  315. package/.next/server/chunks/ssr/_1h52qq9._.js +0 -3
  316. package/.next/server/chunks/ssr/_1lcqytr._.js +0 -6
  317. package/.next/server/chunks/ssr/_1n6kmjf._.js +0 -3
  318. package/.next/server/chunks/ssr/_1ni54_c._.js +0 -3
  319. package/.next/server/chunks/ssr/_1vv2tlg._.js +0 -3
  320. package/.next/server/chunks/ssr/app_loading_tsx_0a1flg9._.js +0 -3
  321. package/.next/server/chunks/ssr/app_settings_loading_tsx_0nv_78v._.js +0 -3
  322. package/.next/server/chunks/ssr/components_1_8btz1._.js +0 -3
  323. package/.next/server/chunks/ssr/node_modules__pnpm_1gezzqr._.js +0 -151
  324. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.html +0 -2
  325. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.meta +0 -1
  326. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.rsc +0 -41
  327. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_full.segment.rsc +0 -41
  328. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_index.segment.rsc +0 -32
  329. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -20
  330. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_tree.segment.rsc +0 -2
  331. package/.next/static/chunks/04rlo5538j7rr.js +0 -4
  332. package/.next/static/chunks/09gd7q3y6k-9o.js +0 -1
  333. package/.next/static/chunks/0_gj-5u7ifqf4.js +0 -1
  334. package/.next/static/chunks/0hi47ko7gli7r.js +0 -1
  335. package/.next/static/chunks/0on9boy9udzsk.js +0 -22
  336. package/.next/static/chunks/0vpb-2i9p8zhe.js +0 -11
  337. package/.next/static/chunks/0xrcyj-flkrl1.js +0 -1
  338. package/.next/static/chunks/16dm0t9zkiz1_.js +0 -31
  339. package/.next/static/chunks/1qvxxmozdr7-c.js +0 -1
  340. package/.next/static/chunks/21q5shbghrpvd.js +0 -1
  341. package/.next/static/chunks/287u55qyslbe_.js +0 -1
  342. package/.next/static/chunks/2wutbn1zdrzvx.js +0 -1
  343. package/.next/static/chunks/3q6xawepb9y62.js +0 -1
  344. package/.next/static/chunks/3somw8tkd8pzf.js +0 -1
  345. package/.next/static/chunks/3twacs-22zdwk.js +0 -1
  346. package/.next/static/chunks/458nt4gshcy9x.js +0 -1
  347. package/.next/static/chunks/turbopack-3icatqv27j50p.js +0 -1
  348. /package/.next/static/{8LtMJdCno9wkpYotBJePk → 3alXH6OUWpk3y4gpD18yo}/_buildManifest.js +0 -0
  349. /package/.next/static/{8LtMJdCno9wkpYotBJePk → 3alXH6OUWpk3y4gpD18yo}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karan171996/metricflow",
3
- "version": "0.15.1",
3
+ "version": "0.17.2",
4
4
  "description": "Local performance dashboard: New Relic page metrics and Sentry errors per page, with AI suggestions. Run with one npx command.",
5
5
  "keywords": [
6
6
  "performance",
@@ -55,12 +55,13 @@
55
55
  "start": "next start -H 127.0.0.1",
56
56
  "lint": "eslint",
57
57
  "send-test-data": "node scripts/send-test-data.mjs",
58
- "cy:open": "cypress open",
59
- "cy:run": "cypress run",
58
+ "e2e": "playwright test",
59
+ "e2e:ui": "playwright test --ui",
60
60
  "prepublishOnly": "pnpm run build",
61
61
  "test:cli": "node --experimental-test-module-mocks --import ./test/register.mjs --test test/*.test.mjs",
62
62
  "test:basic": "node scripts/test-env.mjs basic",
63
63
  "test:real": "node scripts/test-env.mjs real",
64
+ "test:ui": "PW_UI=1 node scripts/test-env.mjs basic",
64
65
  "test": "pnpm run test:basic",
65
66
  "release:bump": "node scripts/bump-version.mjs",
66
67
  "build:browser": "tsc -p tsconfig.browser.json"
@@ -69,26 +70,30 @@
69
70
  "@newrelic/browser-agent": "1.323.0",
70
71
  "@sentry/browser": "10.76.1",
71
72
  "axios": "^1.20.0",
72
- "next": "16.3.8",
73
+ "next": "16.4.3",
73
74
  "react": "19.2.8",
74
75
  "react-dom": "19.2.8"
75
76
  },
76
77
  "devDependencies": {
77
78
  "@base-ui/react": "^1.9.0",
79
+ "@better-auth/infra": "0.4.25",
80
+ "@playwright/test": "^1.64.1",
78
81
  "@sentry/node": "^10.76.2",
79
82
  "@tailwindcss/postcss": "^4.3.3",
80
83
  "@types/node": "^20.19.43",
84
+ "@types/pg": "8.23.1",
81
85
  "@types/react": "^19.3.0",
82
86
  "@types/react-dom": "^19.3.0",
83
87
  "@vercel/analytics": "2.0.1",
88
+ "better-auth": "1.7.14",
84
89
  "class-variance-authority": "^0.7.1",
85
90
  "cn": "^0.3.3",
86
- "cypress": "^16.1.1",
87
91
  "dotenv": "^18.0.6",
88
92
  "eslint": "^9.39.5",
89
93
  "eslint-config-next": "^16.4.0",
90
94
  "lucide-react": "^1.54.0",
91
95
  "motion": "^14.0.0",
96
+ "pg": "8.23.1",
92
97
  "recharts": "^3.10.1",
93
98
  "shadcn": "^4.21.4",
94
99
  "tailwindcss": "^4.3.3",
@@ -1,3 +0,0 @@
1
- module.exports=[94329,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_chrome-launcher_1k_yki1._.js"].map(s=>e.l(s))).then(()=>s(87009)))},84977,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_lighthouse_1su6d37._.js"].map(s=>e.l(s))).then(()=>s(68208)))}];
2
-
3
- //# sourceMappingURL=%5Bexternals%5D__0_9e0si._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[94329,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_chrome-launcher_1k_yki1._.js"].map(s=>e.l(s))).then(()=>s(87009)))},84977,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_lighthouse_1su6d37._.js"].map(s=>e.l(s))).then(()=>s(68208)))}];
2
-
3
- //# sourceMappingURL=%5Bexternals%5D__1f7xi3d._.js.map
@@ -1,3 +0,0 @@
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"))},34199,e=>{"use strict";var t=e.i(90770);async function r(){return Response.json({items:(0,t.getTimings)()})}e.s(["GET",0,r])},78570,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),n=e.i(37892),i=e.i(54261),s=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 f=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/timings/route",pathname:"/api/timings",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/timings/route.ts",nextConfigOutput:"",userland:()=>e.r(34199),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:E,serverHooks:C}=f;async function y(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),f.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/timings/route";w=w.replace(/\/index$/,"")||"/";let E=await f.prepare(e,t,{srcPage:w,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:T,nextConfig:A,parsedUrl:b,isDraftMode:q,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:H}=E,j=(0,o.normalizeAppPath)(w),M=!!P.routes[_]&&(f.isDev||(0,m.isRouteCacheOwner)(_,f.cacheOwner,P.routes[_])),I=!!(P.dynamicRoutes[j]||M),U=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,b,!1):t.end("This page could not be found"),null);if(I&&!q){let e=P.dynamicRoutes[j];if(e&&!1===e.fallback&&!M){if(A.adapterPath)return await U();throw new v.NoFallbackError}}let D=null;!I||f.isDev||q||(D="/index"===(D=_)?"/":D);let F=!0===f.isDev||!I,K=I&&!F;H&&k&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:H});let L=e.method||"GET",$=(0,i.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await f.getIncrementalCache(e,A,P,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:T,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,isDraftMode:q,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>f.onRequestError(e,t,a,n,S)},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 f.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let s=W.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(z,Z,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);s&&(t[R.NEXT_CACHE_TAGS_HEADER]=s),!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?A.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 f.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,S),t}},Y=async(n,s)=>{try{var o,l;let n=await f.handleResponse({req:e,nextConfig:A,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!I)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"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&I||i.delete(R.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,x.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(z,Z,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await f.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,S),I)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:i.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),s&&s!==n&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${w}`,kind:i.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:w,workUnitAsyncStorage:E})},"routeModule",0,f,"serverHooks",0,C,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,E])},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__05mqvyo._.js.map
@@ -1,3 +0,0 @@
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"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},95879,(e,t,r)=>{t.exports=e.x("node:dns",()=>require("node:dns"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},47299,(e,t,r)=>{t.exports=e.x("node:http",()=>require("node:http"))},43698,(e,t,r)=>{t.exports=e.x("node:https",()=>require("node:https"))},61095,(e,t,r)=>{t.exports=e.x("node:net",()=>require("node:net"))},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"))},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),o=e.i(39151),s=e.i(90218);function a(e,t=[],r=[]){let n,l="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,i=(0,o.forwardRef)(({className:e,...t},r)=>(0,o.createElement)(s.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(e=>{let t="",r=!1;for(let o of e){if("-"===o||"_"===o||o<=" "){r=t.length>0;continue}0===t.length?t+=o.toLowerCase():t+=r?o.toUpperCase():o,r=!1}return t})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=a(n),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=a(i),u={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};u.node;let d=a(u);function h(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),o=e<0?"-":"";return r<3600?`${o}${Math.floor(r/60)}m ${r%60}s`:`${o}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,h],78910);let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,g=e=>void 0===e?"—":h(e),m=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>e.byTool?.lighthouse?.lighthouse,w=(e,t)=>{let r=[];for(let o of e){let e=y(o),s=void 0===e?void 0:t(e);void 0!==s&&r.push(s)}return r.length?f(r):void 0},b=e=>void 0===e?"—":String(Math.round(e)),v=e=>void 0===e?"—":e.toFixed(2),E=e=>m(e)?.count??0,R={"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:h(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:h(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:h(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>h(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>h(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(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?"—":h(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>E(t)>(e?E(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(E).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>E(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(E(e))},{needs:"errors",header:"Latest Error",cell:e=>m(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(m(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>g(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>g(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>g(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:d,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:b(w(e,e=>e.score))},{label:"Avg LCP",value:g(w(e,e=>e.lcp))},{label:"Avg CLS",value:v(w(e,e=>e.cls))},{label:"Avg TBT",value:g(w(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>b(y(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>g(y(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>v(y(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>g(y(e)?.tbt)}]}},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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),L=Object.keys(R);e.s(["KEY_LABELS",0,x,"TOOLS",0,R,"TOOL_IDS",0,L,"mergeMetrics",0,function(e,t,r){let o={};for(let[s,a]of Object.entries(t)){let t=r.includes(a)?void 0:e[a]?.[s];void 0!==t&&(o[s]=t)}return o},"sourcesFor",0,function(e){let t={};for(let r of p){let o=L.find(t=>e.includes(t)&&R[t].capabilities.includes(r));o&&(t[r]=o)}return t}],67119);let S=e=>{let t=R[e].keys;return[...t.required,...t.anyOf??[]]},T=L.flatMap(S),A="NEWRELIC_REGION",k={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"}},I={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},_="AI_PROVIDER";function N(e){return process.env[e]??""}let C=e=>{let{required:t,anyOf:r}=R[e].keys;return t.every(e=>N(e))&&(!r||r.some(e=>N(e)))};function O(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let j=/[\s\0#"'`\\$]/;class q extends Error{}e.s(["AI_PROVIDERS",0,I,"AI_PROVIDER_KEY",0,_,"EnvWriteRefused",0,q,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,A,"SETUP_KEYS",0,T,"UNSAFE",0,j,"activeAi",0,function(){let e=process.env[_];for(let t of(e&&e in I?[e]:[]).concat(Object.keys(I))){let e=process.env[I[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>L.filter(C),"env",0,N,"isToolConnected",0,C,"nrHosts",0,(e="eu"===process.env[A]?"eu":"us")=>k[e],"projectDir",0,O,"setupKeysOf",0,S,"writeEnvLocal",0,function(e,o=process.env.METRICFLOW_ENV_FILE||(0,r.join)(O(),".env.local")){let s=new Set([...Object.values(R).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(I).map(e=>e.key),_]);for(let[t,r]of Object.entries(e)){if(!s.has(t))throw new q("Refused to write a key name no tool declares.");if(j.test(r))throw new q("Refused to write a value with unsafe characters.")}let a=(0,t.existsSync)(o)?(0,t.readFileSync)(o,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=a.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${o}.tmp`;for(let[r,s]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,o),Object.entries(e)))process.env[r]=s}],12892)},45437,39445,32254,e=>{"use strict";var t=e.i(66680);function r(e){let t;if("string"!=typeof e||!e.trim())return null;try{t=new URL(e,"http://placeholder").pathname}catch{return null}try{t=decodeURIComponent(t)}catch{}return(t=t.toLowerCase().replace(/\/{2,}/g,"/")).length>1&&(t=t.replace(/\/+$/,"")),t.startsWith("/")?t:null}function o(e){return"/"===e?"home":e.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60).replace(/-+$/,"")||"page"}e.s(["LOCAL_ONLY_NRQL",0,"WHERE (pageUrl LIKE 'http%://localhost%' OR pageUrl LIKE 'http%://127.0.0.1%')","MAX_PAGES",0,20,"buildPages",0,function(e){let s=new Map;for(let{url:t,views:o}of e){let e=r(t);null!==e&&s.set(e,(s.get(e)??0)+(Number.isFinite(o)?o:0))}let a=[...s].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,20),n=new Map;for(let[e]of a)n.set(o(e),(n.get(o(e))??0)+1);return a.map(([e,r])=>{let s=o(e),a=n.get(s)>1?`${s}-${(0,t.createHash)("sha1").update(e).digest("hex").slice(0,6)}`:s;return{url:e,slug:a,name:"/"===e?"Homepage":e.split("/").filter(Boolean).map(e=>e.replace(/[-_]+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase())||e).join(" / "),views:r}})},"isLocalUrl",0,function(e){try{return["localhost","127.0.0.1"].includes(new URL(e).hostname)}catch{return!1}},"normalizePath",0,r],39445);var s=e.i(12892);let a=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),n=e=>"number"==typeof e&&Number.isFinite(e);function l(e){let t=(Array.isArray(e)?e:[e]).slice(0,500),o={};for(let e of t){let t=function(e){if(!a(e)||!a(e.categories)||!a(e.audits))return null;let t=e.categories.performance;if(!a(t)||e.runtimeError||!n(t.score))return null;let o=[e.finalDisplayedUrl,e.finalUrl,e.requestedUrl].find(e=>"string"==typeof e&&e),s=o?r(o):null;if(null===s)return null;let l={score:Math.min(100,Math.max(0,Math.round(100*t.score)))};for(let[t,r]of[["lcp","largest-contentful-paint"],["cls","cumulative-layout-shift"],["tbt","total-blocking-time"]]){let o=function(e,t){let r=e[t];return a(r)&&n(r.numericValue)?r.numericValue:void 0}(e.audits,r);void 0!==o&&(l[t]=o)}return{path:s,fetchTime:"string"==typeof e.fetchTime?e.fetchTime:"",score:l.score,lighthouse:l}}(e);t&&(o[t.path]??=[]).push(t)}return Object.fromEntries(Object.entries(o).map(([e,t])=>(t.sort((e,t)=>e.score-t.score||(e.fetchTime<t.fetchTime?-1:+(e.fetchTime>t.fetchTime))),[e,{lighthouse:t[Math.floor((t.length-1)/2)].lighthouse}])))}e.s(["parseLighthouse",0,l],32254);let i="Lighthouse is not installed. Reinstall MetricFlow to add it.",c="Lighthouse needs Google Chrome installed on this machine.",u="The Lighthouse run failed. Check that the site is running, then Run now.",d="Running Lighthouse needs Node 22.19 or newer.",h=new Set([i,c,d,u]),p=e=>Object.assign(Error(e),{fatal:!0}),f={fetcher:async e=>{let t=await fetch(e,{redirect:"manual",signal:AbortSignal.timeout(1e4)});if(t.status>=300&&t.status<400)return await t.body?.cancel(),{status:t.status,location:t.headers.get("location")??void 0,body:""};let r=[],o=0,s=t.body?.getReader();for(let e=await s?.read();e&&!e.done;e=await s.read()){if((o+=e.value.length)>5242880)throw await s.cancel(),Error("too large");r.push(e.value)}return{status:t.status,body:Buffer.concat(r).toString("utf8")}},runner:async(e,t)=>{let r,o;if((e=>{let[t,r]=e.split(".").map(Number);return t<22||22===t&&r<19})(f.nodeVersion))throw p(d);try{r=await f.load()}catch(t){let e=t.code;throw p("ERR_MODULE_NOT_FOUND"===e||"MODULE_NOT_FOUND"===e?i:u)}try{o=await r.launch({chromeFlags:["--headless=new","--disable-gpu"],logLevel:"silent"})}catch{throw p(c)}let s=()=>{try{return Promise.resolve(o.kill()).catch(()=>{})}catch{return Promise.resolve()}};if(t.aborted)throw await s(),Error("aborted");t.addEventListener("abort",s,{once:!0});try{return(await r.lighthouse(e,{port:o.port,output:"json",logLevel:"silent",onlyCategories:["performance"]}))?.lhr}finally{t.removeEventListener("abort",s),await s()}},nodeVersion:process.versions.node,load:async()=>{let[t,r]=await Promise.all([e.A(84977),e.A(94329)]);return{lighthouse:t.default,launch:r.launch}}};function g(e){let t;try{t=new URL(e)}catch{return null}return"http:"!==t.protocol&&"https:"!==t.protocol||t.username||t.password?null:t}async function m(e,t,r){try{for(let o=0;o<=3;o++){let o=await r(e);if(o.status<300||o.status>=400)return o;if(!o.location)break;let s=new URL(o.location,e);if(s.origin!==t)break;e=s.href}}catch{}return null}let y=e=>!!e&&e.status>=200&&e.status<300;async function w(e,t=f.fetcher){let r=g(e);return r?y(await m(`${r.origin}/`,r.origin,t))?{ok:!0}:{ok:!1,error:"The project address did not answer with a page within 10 seconds."}:{ok:!1,error:"The project address must be an http(s) URL with no user name or password in it."}}let b=e=>e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'");function v(e,t,o){for(let s of t){let t;if(e.size>=20)break;try{t=new URL(s,`${o}/`)}catch{continue}if(t.origin!==o)continue;let a=t.pathname.split("/").pop()??"";if(/\.[a-z0-9]+$/i.test(a)&&!/\.html$/i.test(a))continue;let n=r(t.pathname);n&&!e.has(n)&&e.set(n,o+t.pathname)}}async function E(e,t=f.fetcher){let r=new URL(e).origin,o=new Map([["/",`${r}/`]]),s=await m(`${r}/sitemap.xml`,r,t);if(y(s)&&v(o,[...s.body.matchAll(/<loc>([^<]*)<\/loc>/gi)].map(e=>b(e[1].trim())),r),1===o.size){let e=await m(`${r}/`,r,t);y(e)&&v(o,[...e.body.matchAll(/<a\s[^<>]*?href\s*=\s*["']([^"']+)["']/gi)].map(e=>b(e[1])),r)}return[...o].map(([e,t])=>({path:e,url:t}))}let R={status:{state:"idle",done:0,total:0,lastRunAt:null},target:"",byPath:{},finishedAt:0,current:null};function x(e={}){if(R.current)return R.current;let t=(0,s.env)("LIGHTHOUSE_TARGET");return t?(R.status={state:"running",done:0,total:0,lastRunAt:R.status.lastRunAt},R.current=L(R,t,e).finally(()=>{R.current=null}),R.current):Promise.resolve()}async function L(e,t,r){let o,{fetcher:s=f.fetcher,runner:a=f.runner,pageMs:n=6e4,totalMs:i=6e5}=r,c=Date.now()+i,d=[],p={};try{let r=g(t)?.origin;if(!r)throw Error("bad target");let i=await E(t,s);for(let{url:t}of(e.status.total=i.length,i)){let s=c-Date.now();if(s<=0)break;try{let e=await function(e,t){let r,o=new AbortController,s=new Promise((e,s)=>{r=setTimeout(()=>{o.abort(),s(Error("timeout"))},t)});return Promise.race([e(o.signal),s]).finally(()=>clearTimeout(r))}(e=>a(t,e),Math.min(n,s));(function(e,t){let r=e??{},o=[r.finalDisplayedUrl,r.finalUrl,r.requestedUrl].find(e=>"string"==typeof e&&e);try{return!!o&&new URL(o).origin===t}catch{return!1}})(e,r)&&d.push(e)}catch(e){if(e.fatal){let t=e.message;o=h.has(t)?t:u;break}}e.status.done++}p=l(d),o||Object.keys(p).length||(o="No page could be measured. Check that the site is running, then Run now.")}catch{o=u}let m=Object.keys(p).length>0,y=e.target===t;e.target=t,e.finishedAt=Date.now(),(m||!y)&&(e.byPath=p);let w=m?new Date(e.finishedAt).toISOString():y?e.status.lastRunAt:null;e.status={state:o?"error":"idle",done:e.status.done,total:e.status.total,lastRunAt:w,...o?{error:o}:{}}}e.s(["checkTarget",0,w,"getResults",0,e=>R.target===e?R.byPath:{},"getStatus",0,()=>({...R.status}),"maybeStartRun",0,function(e=Date.now()){let t=(0,s.env)("LIGHTHOUSE_TARGET");t&&!R.current&&(R.target===t&&e-R.finishedAt<=36e5||x())},"startRun",0,x],45437)},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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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=>r.has(e.trim().replace(/^\[|\]$/g,"")))||"cross-site"===e.headers.get("sec-fetch-site"))return!1;let s=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(s))return!1;let a=e.headers.get("origin");try{return!a||t.has(new URL(a).hostname)}catch{return!1}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function o(e,s=()=>!1){let a,n;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(a=await e((0,r.nrHosts)("us")),!s(a))return a}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;n=r}try{let t=await e((0,r.nrHosts)("eu"));if(!s(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(n)throw n;return a}async function s(e,r,s){return(await o(o=>t.default.post(o.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:s}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,s,"withRegion",0,o])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function o(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let o=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(o))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let s=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),a=s?s[2]:t.host;return{ok:!0,projectId:o,orgId:s?s[1]:null,apiBase:`${t.protocol}//${a}/api/0`}}async function s(e,r){let o={Authorization:`Bearer ${e}`},s=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:o,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:o,timeout:8e3}),a=Array.isArray(s.data)?s.data:[];return(r.orgId?a.find(e=>String(e.id)===r.orgId)?.slug:a.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,s,"parseSentryDsn",0,o,"publicDsn",0,function(e){let t=o(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0_6kr31._.js.map
@@ -1,3 +0,0 @@
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"))},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),s=e.i(39151),o=e.i(90218);function a(e,t=[],r=[]){let n,l="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,i=(0,s.forwardRef)(({className:e,...t},r)=>(0,s.createElement)(o.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(e=>{let t="",r=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){r=t.length>0;continue}0===t.length?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=a(n),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=a(i),d={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};d.node;let u=a(d);function p(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),s=e<0?"-":"";return r<3600?`${s}${Math.floor(r/60)}m ${r%60}s`:`${s}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,p],78910);let h=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,y=e=>void 0===e?"—":p(e),g=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),m=e=>e.byTool?.lighthouse?.lighthouse,v=(e,t)=>{let r=[];for(let s of e){let e=m(s),o=void 0===e?void 0:t(e);void 0!==o&&r.push(o)}return r.length?f(r):void 0},x=e=>void 0===e?"—":String(Math.round(e)),E=e=>void 0===e?"—":e.toFixed(2),b=e=>g(e)?.count??0,R={"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:p(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(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 t=e.newRelic.inp;return void 0===t?"—":p(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>b(t)>(e?b(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(b).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>b(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(b(e))},{needs:"errors",header:"Latest Error",cell:e=>g(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(g(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>y(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>y(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>y(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:u,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:x(v(e,e=>e.score))},{label:"Avg LCP",value:y(v(e,e=>e.lcp))},{label:"Avg CLS",value:E(v(e,e=>e.cls))},{label:"Avg TBT",value:y(v(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>x(m(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>y(m(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>E(m(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>y(m(e)?.tbt)}]}},S=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),w=Object.keys(R);e.s(["KEY_LABELS",0,S,"TOOLS",0,R,"TOOL_IDS",0,w,"mergeMetrics",0,function(e,t,r){let s={};for(let[o,a]of Object.entries(t)){let t=r.includes(a)?void 0:e[a]?.[o];void 0!==t&&(s[o]=t)}return s},"sourcesFor",0,function(e){let t={};for(let r of h){let s=w.find(t=>e.includes(t)&&R[t].capabilities.includes(r));s&&(t[r]=s)}return t}],67119);let I=e=>{let t=R[e].keys;return[...t.required,...t.anyOf??[]]},L=w.flatMap(I),k="NEWRELIC_REGION",_={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"}},N={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},T="AI_PROVIDER";function C(e){return process.env[e]??""}let A=e=>{let{required:t,anyOf:r}=R[e].keys;return t.every(e=>C(e))&&(!r||r.some(e=>C(e)))};function j(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let O=/[\s\0#"'`\\$]/;class q extends Error{}e.s(["AI_PROVIDERS",0,N,"AI_PROVIDER_KEY",0,T,"EnvWriteRefused",0,q,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,k,"SETUP_KEYS",0,L,"UNSAFE",0,O,"activeAi",0,function(){let e=process.env[T];for(let t of(e&&e in N?[e]:[]).concat(Object.keys(N))){let e=process.env[N[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>w.filter(A),"env",0,C,"isToolConnected",0,A,"nrHosts",0,(e="eu"===process.env[k]?"eu":"us")=>_[e],"projectDir",0,j,"setupKeysOf",0,I,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,r.join)(j(),".env.local")){let o=new Set([...Object.values(R).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(N).map(e=>e.key),T]);for(let[t,r]of Object.entries(e)){if(!o.has(t))throw new q("Refused to write a key name no tool declares.");if(O.test(r))throw new q("Refused to write a value with unsafe characters.")}let a=(0,t.existsSync)(s)?(0,t.readFileSync)(s,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=a.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${s}.tmp`;for(let[r,o]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,s),Object.entries(e)))process.env[r]=o}],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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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=>r.has(e.trim().replace(/^\[|\]$/g,"")))||"cross-site"===e.headers.get("sec-fetch-site"))return!1;let o=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(o))return!1;let a=e.headers.get("origin");try{return!a||t.has(new URL(a).hostname)}catch{return!1}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function s(e,o=()=>!1){let a,n;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(a=await e((0,r.nrHosts)("us")),!o(a))return a}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;n=r}try{let t=await e((0,r.nrHosts)("eu"));if(!o(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(n)throw n;return a}async function o(e,r,o){return(await s(s=>t.default.post(s.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:o}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,o,"withRegion",0,s])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function s(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let s=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(s))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let o=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),a=o?o[2]:t.host;return{ok:!0,projectId:s,orgId:o?o[1]:null,apiBase:`${t.protocol}//${a}/api/0`}}async function o(e,r){let s={Authorization:`Bearer ${e}`},o=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:s,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:s,timeout:8e3}),a=Array.isArray(o.data)?o.data:[];return(r.orgId?a.find(e=>String(e.id)===r.orgId)?.slug:a.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,o,"parseSentryDsn",0,s,"publicDsn",0,function(e){let t=s(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0az11z3._.js.map
@@ -1,3 +0,0 @@
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"))},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),s=e.i(39151),o=e.i(90218);function a(e,t=[],r=[]){let n,l="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,i=(0,s.forwardRef)(({className:e,...t},r)=>(0,s.createElement)(o.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(e=>{let t="",r=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){r=t.length>0;continue}0===t.length?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=a(n),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=a(i),d={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};d.node;let p=a(d);function h(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),s=e<0?"-":"";return r<3600?`${s}${Math.floor(r/60)}m ${r%60}s`:`${s}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,h],78910);let u=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,g=e=>void 0===e?"—":h(e),m=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),v=e=>e.byTool?.lighthouse?.lighthouse,y=(e,t)=>{let r=[];for(let s of e){let e=v(s),o=void 0===e?void 0:t(e);void 0!==o&&r.push(o)}return r.length?f(r):void 0},E=e=>void 0===e?"—":String(Math.round(e)),b=e=>void 0===e?"—":e.toFixed(2),R=e=>m(e)?.count??0,x={"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:h(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:h(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:h(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>h(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>h(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(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?"—":h(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>R(t)>(e?R(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(R).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>R(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(R(e))},{needs:"errors",header:"Latest Error",cell:e=>m(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(m(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>g(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>g(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>g(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:p,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:E(y(e,e=>e.score))},{label:"Avg LCP",value:g(y(e,e=>e.lcp))},{label:"Avg CLS",value:b(y(e,e=>e.cls))},{label:"Avg TBT",value:g(y(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>E(v(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>g(v(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>b(v(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>g(v(e)?.tbt)}]}},S=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),L=Object.keys(x);e.s(["KEY_LABELS",0,S,"TOOLS",0,x,"TOOL_IDS",0,L,"mergeMetrics",0,function(e,t,r){let s={};for(let[o,a]of Object.entries(t)){let t=r.includes(a)?void 0:e[a]?.[o];void 0!==t&&(s[o]=t)}return s},"sourcesFor",0,function(e){let t={};for(let r of u){let s=L.find(t=>e.includes(t)&&x[t].capabilities.includes(r));s&&(t[r]=s)}return t}],67119);let _=e=>{let t=x[e].keys;return[...t.required,...t.anyOf??[]]},w=L.flatMap(_),I="NEWRELIC_REGION",T={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"}},C={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},k="AI_PROVIDER";function N(e){return process.env[e]??""}let A=e=>{let{required:t,anyOf:r}=x[e].keys;return t.every(e=>N(e))&&(!r||r.some(e=>N(e)))};function O(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let j=/[\s\0#"'`\\$]/;class P extends Error{}e.s(["AI_PROVIDERS",0,C,"AI_PROVIDER_KEY",0,k,"EnvWriteRefused",0,P,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,I,"SETUP_KEYS",0,w,"UNSAFE",0,j,"activeAi",0,function(){let e=process.env[k];for(let t of(e&&e in C?[e]:[]).concat(Object.keys(C))){let e=process.env[C[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>L.filter(A),"env",0,N,"isToolConnected",0,A,"nrHosts",0,(e="eu"===process.env[I]?"eu":"us")=>T[e],"projectDir",0,O,"setupKeysOf",0,_,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,r.join)(O(),".env.local")){let o=new Set([...Object.values(x).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(C).map(e=>e.key),k]);for(let[t,r]of Object.entries(e)){if(!o.has(t))throw new P("Refused to write a key name no tool declares.");if(j.test(r))throw new P("Refused to write a value with unsafe characters.")}let a=(0,t.existsSync)(s)?(0,t.readFileSync)(s,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=a.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${s}.tmp`;for(let[r,o]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,s),Object.entries(e)))process.env[r]=o}],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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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=>r.has(e.trim().replace(/^\[|\]$/g,"")))||"cross-site"===e.headers.get("sec-fetch-site"))return!1;let o=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(o))return!1;let a=e.headers.get("origin");try{return!a||t.has(new URL(a).hostname)}catch{return!1}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0dv0ig6._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[94329,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_chrome-launcher_1k_yki1._.js"].map(t=>e.l(t))).then(()=>t(87009)))},84977,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_lighthouse_1su6d37._.js"].map(t=>e.l(t))).then(()=>t(68208)))},85996,e=>{"use strict";var t=e.i(12892),a=e.i(45437),r=e.i(24514);let n=()=>Response.json({error:r.PROXY_REFUSAL},{status:403});async function s(e){return(0,r.isLocalRequest)(e)?Response.json({...(0,a.getStatus)(),target:!!(0,t.env)("LIGHTHOUSE_TARGET")}):n()}async function i(e){if(!(0,r.isLocalRequest)(e))return n();let s=(0,r.requireJson)(e);return s||((0,t.env)("LIGHTHOUSE_TARGET")?((0,a.startRun)(),Response.json({...(0,a.getStatus)(),target:!0},{status:202})):Response.json({error:"Add a project address on the setup page first."},{status:409}))}e.s(["GET",0,s,"POST",0,i])},24763,e=>{"use strict";var t=e.i(12425),a=e.i(83353),r=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),c=e.i(13487),p=e.i(48776),h=e.i(29398),R=e.i(31610),v=e.i(45919),g=e.i(93695),m=e.i(12741);e.i(95315);var E=e.i(98732);let f=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/lighthouse/route",pathname:"/api/lighthouse",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/lighthouse/route.ts",nextConfigOutput:"",userland:()=>e.r(85996),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:C,serverHooks:T}=f;async function x(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),f.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/lighthouse/route";w=w.replace(/\/index$/,"")||"/";let C=await f.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!C)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:T,deploymentId:x,params:A,nextConfig:S,parsedUrl:_,isDraftMode:y,prerenderManifest:P,routerServerContext:O,isOnDemandRevalidate:b,revalidateOnlyGenerated:N,resolvedPathname:H,clientReferenceManifest:q,serverActionsManifest:I}=C,U=(0,o.normalizeAppPath)(w),k=!!P.routes[H]&&(f.isDev||(0,m.isRouteCacheOwner)(H,f.cacheOwner,P.routes[H])),M=!!(P.dynamicRoutes[U]||k),j=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,_,!1):t.end("This page could not be found"),null);if(M&&!y){let e=P.dynamicRoutes[U];if(e&&!1===e.fallback&&!k){if(S.adapterPath)return await j();throw new g.NoFallbackError}}let D=null;!M||f.isDev||y||(D="/index"===(D=H)?"/":D);let L=!0===f.isDev||!M,G=M&&!L;I&&q&&(0,i.setManifestsSingleton)({page:w,clientReferenceManifest:q,serverActionsManifest:I});let F=e.method||"GET",K=(0,s.getTracer)(),$=K.getActiveScopeSpan(),B=!!(null==O?void 0:O.isWrappedByNextServer),X=!!(0,n.getRequestMeta)(e,"minimalMode"),V=(0,n.getRequestMeta)(e,"incrementalCache")||await f.getIncrementalCache(e,S,P,X);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:A,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts,useCacheTimeout:S.experimental.useCacheTimeout},cacheComponents:!!S.cacheComponents,validationLevel:S.experimental.instantInsights.validationLevel,isDraftMode:y,supportsDynamicResponse:L,incrementalCache:V,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:S.cacheLife,staticPageGenerationTimeout:S.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>f.onRequestError(e,t,r,n,O)},sharedContext:{buildId:T,deploymentId:x}},z=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!X&&b&&N&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await f.handle(Y,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let i=W.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(z,J,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?S.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:E.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await f.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:G,isOnDemandRevalidate:b})},!1,O),t}},Q=async(n,i)=>{try{var o,l;let n=await f.handleResponse({req:e,nextConfig:S,cacheKey:D,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:X});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==E.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});X||t.setHeader("x-nextjs-cache",b?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),y&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);X&&M||s.delete(v.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,p.sendResponse)(z,J,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await f.onRequestError(e,t,{routerKind:"App Router",routePath:U,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:G,isOnDemandRevalidate:b})},!1,O),M)throw t;await (0,p.sendResponse)(z,J,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 a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||U,o=`${F} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",r),i.updateName(o))})()}};if(B&&$)await Q($,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Q(e,t)),void 0,!B)}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:C})},"routeModule",0,f,"serverHooks",0,T,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,C])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0egyynf._.js.map
@@ -1,3 +0,0 @@
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.15.1"})}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
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0fkj1-q._.js.map
@@ -1,3 +0,0 @@
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"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},95879,(e,t,r)=>{t.exports=e.x("node:dns",()=>require("node:dns"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},47299,(e,t,r)=>{t.exports=e.x("node:http",()=>require("node:http"))},43698,(e,t,r)=>{t.exports=e.x("node:https",()=>require("node:https"))},61095,(e,t,r)=>{t.exports=e.x("node:net",()=>require("node:net"))},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"))},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),o=e.i(39151),a=e.i(90218);function s(e,t=[],r=[]){let n,l="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,i=(0,o.forwardRef)(({className:e,...t},r)=>(0,o.createElement)(a.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(e=>{let t="",r=!1;for(let o of e){if("-"===o||"_"===o||o<=" "){r=t.length>0;continue}0===t.length?t+=o.toLowerCase():t+=r?o.toUpperCase():o,r=!1}return t})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=s(n),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),u={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};u.node;let d=s(u);function p(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),o=e<0?"-":"";return r<3600?`${o}${Math.floor(r/60)}m ${r%60}s`:`${o}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,p],78910);let h=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,g=e=>void 0===e?"—":p(e),m=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>e.byTool?.lighthouse?.lighthouse,b=(e,t)=>{let r=[];for(let o of e){let e=y(o),a=void 0===e?void 0:t(e);void 0!==a&&r.push(a)}return r.length?f(r):void 0},w=e=>void 0===e?"—":String(Math.round(e)),v=e=>void 0===e?"—":e.toFixed(2),x=e=>m(e)?.count??0,R={"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:p(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(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 t=e.newRelic.inp;return void 0===t?"—":p(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>x(t)>(e?x(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(x).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>x(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(x(e))},{needs:"errors",header:"Latest Error",cell:e=>m(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(m(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>g(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>g(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>g(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:d,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:w(b(e,e=>e.score))},{label:"Avg LCP",value:g(b(e,e=>e.lcp))},{label:"Avg CLS",value:v(b(e,e=>e.cls))},{label:"Avg TBT",value:g(b(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>w(y(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>g(y(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>v(y(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>g(y(e)?.tbt)}]}},E=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),L=Object.keys(R);e.s(["KEY_LABELS",0,E,"TOOLS",0,R,"TOOL_IDS",0,L,"mergeMetrics",0,function(e,t,r){let o={};for(let[a,s]of Object.entries(t)){let t=r.includes(s)?void 0:e[s]?.[a];void 0!==t&&(o[a]=t)}return o},"sourcesFor",0,function(e){let t={};for(let r of h){let o=L.find(t=>e.includes(t)&&R[t].capabilities.includes(r));o&&(t[r]=o)}return t}],67119);let S=e=>{let t=R[e].keys;return[...t.required,...t.anyOf??[]]},T=L.flatMap(S),k="NEWRELIC_REGION",A={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"}},I={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},N="AI_PROVIDER";function _(e){return process.env[e]??""}let C=e=>{let{required:t,anyOf:r}=R[e].keys;return t.every(e=>_(e))&&(!r||r.some(e=>_(e)))};function O(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let j=/[\s\0#"'`\\$]/;class q extends Error{}e.s(["AI_PROVIDERS",0,I,"AI_PROVIDER_KEY",0,N,"EnvWriteRefused",0,q,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,k,"SETUP_KEYS",0,T,"UNSAFE",0,j,"activeAi",0,function(){let e=process.env[N];for(let t of(e&&e in I?[e]:[]).concat(Object.keys(I))){let e=process.env[I[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>L.filter(C),"env",0,_,"isToolConnected",0,C,"nrHosts",0,(e="eu"===process.env[k]?"eu":"us")=>A[e],"projectDir",0,O,"setupKeysOf",0,S,"writeEnvLocal",0,function(e,o=process.env.METRICFLOW_ENV_FILE||(0,r.join)(O(),".env.local")){let a=new Set([...Object.values(R).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(I).map(e=>e.key),N]);for(let[t,r]of Object.entries(e)){if(!a.has(t))throw new q("Refused to write a key name no tool declares.");if(j.test(r))throw new q("Refused to write a value with unsafe characters.")}let s=(0,t.existsSync)(o)?(0,t.readFileSync)(o,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=s.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${o}.tmp`;for(let[r,a]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,o),Object.entries(e)))process.env[r]=a}],12892)},45437,39445,32254,e=>{"use strict";var t=e.i(66680);function r(e){let t;if("string"!=typeof e||!e.trim())return null;try{t=new URL(e,"http://placeholder").pathname}catch{return null}try{t=decodeURIComponent(t)}catch{}return(t=t.toLowerCase().replace(/\/{2,}/g,"/")).length>1&&(t=t.replace(/\/+$/,"")),t.startsWith("/")?t:null}function o(e){return"/"===e?"home":e.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60).replace(/-+$/,"")||"page"}e.s(["LOCAL_ONLY_NRQL",0,"WHERE (pageUrl LIKE 'http%://localhost%' OR pageUrl LIKE 'http%://127.0.0.1%')","MAX_PAGES",0,20,"buildPages",0,function(e){let a=new Map;for(let{url:t,views:o}of e){let e=r(t);null!==e&&a.set(e,(a.get(e)??0)+(Number.isFinite(o)?o:0))}let s=[...a].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,20),n=new Map;for(let[e]of s)n.set(o(e),(n.get(o(e))??0)+1);return s.map(([e,r])=>{let a=o(e),s=n.get(a)>1?`${a}-${(0,t.createHash)("sha1").update(e).digest("hex").slice(0,6)}`:a;return{url:e,slug:s,name:"/"===e?"Homepage":e.split("/").filter(Boolean).map(e=>e.replace(/[-_]+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase())||e).join(" / "),views:r}})},"isLocalUrl",0,function(e){try{return["localhost","127.0.0.1"].includes(new URL(e).hostname)}catch{return!1}},"normalizePath",0,r],39445);var a=e.i(12892);let s=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),n=e=>"number"==typeof e&&Number.isFinite(e);function l(e){let t=(Array.isArray(e)?e:[e]).slice(0,500),o={};for(let e of t){let t=function(e){if(!s(e)||!s(e.categories)||!s(e.audits))return null;let t=e.categories.performance;if(!s(t)||e.runtimeError||!n(t.score))return null;let o=[e.finalDisplayedUrl,e.finalUrl,e.requestedUrl].find(e=>"string"==typeof e&&e),a=o?r(o):null;if(null===a)return null;let l={score:Math.min(100,Math.max(0,Math.round(100*t.score)))};for(let[t,r]of[["lcp","largest-contentful-paint"],["cls","cumulative-layout-shift"],["tbt","total-blocking-time"]]){let o=function(e,t){let r=e[t];return s(r)&&n(r.numericValue)?r.numericValue:void 0}(e.audits,r);void 0!==o&&(l[t]=o)}return{path:a,fetchTime:"string"==typeof e.fetchTime?e.fetchTime:"",score:l.score,lighthouse:l}}(e);t&&(o[t.path]??=[]).push(t)}return Object.fromEntries(Object.entries(o).map(([e,t])=>(t.sort((e,t)=>e.score-t.score||(e.fetchTime<t.fetchTime?-1:+(e.fetchTime>t.fetchTime))),[e,{lighthouse:t[Math.floor((t.length-1)/2)].lighthouse}])))}e.s(["parseLighthouse",0,l],32254);let i="Lighthouse is not installed. Reinstall MetricFlow to add it.",c="Lighthouse needs Google Chrome installed on this machine.",u="The Lighthouse run failed. Check that the site is running, then Run now.",d="Running Lighthouse needs Node 22.19 or newer.",p=new Set([i,c,d,u]),h=e=>Object.assign(Error(e),{fatal:!0}),f={fetcher:async e=>{let t=await fetch(e,{redirect:"manual",signal:AbortSignal.timeout(1e4)});if(t.status>=300&&t.status<400)return await t.body?.cancel(),{status:t.status,location:t.headers.get("location")??void 0,body:""};let r=[],o=0,a=t.body?.getReader();for(let e=await a?.read();e&&!e.done;e=await a.read()){if((o+=e.value.length)>5242880)throw await a.cancel(),Error("too large");r.push(e.value)}return{status:t.status,body:Buffer.concat(r).toString("utf8")}},runner:async(e,t)=>{let r,o;if((e=>{let[t,r]=e.split(".").map(Number);return t<22||22===t&&r<19})(f.nodeVersion))throw h(d);try{r=await f.load()}catch(t){let e=t.code;throw h("ERR_MODULE_NOT_FOUND"===e||"MODULE_NOT_FOUND"===e?i:u)}try{o=await r.launch({chromeFlags:["--headless=new","--disable-gpu"],logLevel:"silent"})}catch{throw h(c)}let a=()=>{try{return Promise.resolve(o.kill()).catch(()=>{})}catch{return Promise.resolve()}};if(t.aborted)throw await a(),Error("aborted");t.addEventListener("abort",a,{once:!0});try{return(await r.lighthouse(e,{port:o.port,output:"json",logLevel:"silent",onlyCategories:["performance"]}))?.lhr}finally{t.removeEventListener("abort",a),await a()}},nodeVersion:process.versions.node,load:async()=>{let[t,r]=await Promise.all([e.A(84977),e.A(94329)]);return{lighthouse:t.default,launch:r.launch}}};function g(e){let t;try{t=new URL(e)}catch{return null}return"http:"!==t.protocol&&"https:"!==t.protocol||t.username||t.password?null:t}async function m(e,t,r){try{for(let o=0;o<=3;o++){let o=await r(e);if(o.status<300||o.status>=400)return o;if(!o.location)break;let a=new URL(o.location,e);if(a.origin!==t)break;e=a.href}}catch{}return null}let y=e=>!!e&&e.status>=200&&e.status<300;async function b(e,t=f.fetcher){let r=g(e);return r?y(await m(`${r.origin}/`,r.origin,t))?{ok:!0}:{ok:!1,error:"The project address did not answer with a page within 10 seconds."}:{ok:!1,error:"The project address must be an http(s) URL with no user name or password in it."}}let w=e=>e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'");function v(e,t,o){for(let a of t){let t;if(e.size>=20)break;try{t=new URL(a,`${o}/`)}catch{continue}if(t.origin!==o)continue;let s=t.pathname.split("/").pop()??"";if(/\.[a-z0-9]+$/i.test(s)&&!/\.html$/i.test(s))continue;let n=r(t.pathname);n&&!e.has(n)&&e.set(n,o+t.pathname)}}async function x(e,t=f.fetcher){let r=new URL(e).origin,o=new Map([["/",`${r}/`]]),a=await m(`${r}/sitemap.xml`,r,t);if(y(a)&&v(o,[...a.body.matchAll(/<loc>([^<]*)<\/loc>/gi)].map(e=>w(e[1].trim())),r),1===o.size){let e=await m(`${r}/`,r,t);y(e)&&v(o,[...e.body.matchAll(/<a\s[^<>]*?href\s*=\s*["']([^"']+)["']/gi)].map(e=>w(e[1])),r)}return[...o].map(([e,t])=>({path:e,url:t}))}let R={status:{state:"idle",done:0,total:0,lastRunAt:null},target:"",byPath:{},finishedAt:0,current:null};function E(e={}){if(R.current)return R.current;let t=(0,a.env)("LIGHTHOUSE_TARGET");return t?(R.status={state:"running",done:0,total:0,lastRunAt:R.status.lastRunAt},R.current=L(R,t,e).finally(()=>{R.current=null}),R.current):Promise.resolve()}async function L(e,t,r){let o,{fetcher:a=f.fetcher,runner:s=f.runner,pageMs:n=6e4,totalMs:i=6e5}=r,c=Date.now()+i,d=[],h={};try{let r=g(t)?.origin;if(!r)throw Error("bad target");let i=await x(t,a);for(let{url:t}of(e.status.total=i.length,i)){let a=c-Date.now();if(a<=0)break;try{let e=await function(e,t){let r,o=new AbortController,a=new Promise((e,a)=>{r=setTimeout(()=>{o.abort(),a(Error("timeout"))},t)});return Promise.race([e(o.signal),a]).finally(()=>clearTimeout(r))}(e=>s(t,e),Math.min(n,a));(function(e,t){let r=e??{},o=[r.finalDisplayedUrl,r.finalUrl,r.requestedUrl].find(e=>"string"==typeof e&&e);try{return!!o&&new URL(o).origin===t}catch{return!1}})(e,r)&&d.push(e)}catch(e){if(e.fatal){let t=e.message;o=p.has(t)?t:u;break}}e.status.done++}h=l(d),o||Object.keys(h).length||(o="No page could be measured. Check that the site is running, then Run now.")}catch{o=u}let m=Object.keys(h).length>0,y=e.target===t;e.target=t,e.finishedAt=Date.now(),(m||!y)&&(e.byPath=h);let b=m?new Date(e.finishedAt).toISOString():y?e.status.lastRunAt:null;e.status={state:o?"error":"idle",done:e.status.done,total:e.status.total,lastRunAt:b,...o?{error:o}:{}}}e.s(["checkTarget",0,b,"getResults",0,e=>R.target===e?R.byPath:{},"getStatus",0,()=>({...R.status}),"maybeStartRun",0,function(e=Date.now()){let t=(0,a.env)("LIGHTHOUSE_TARGET");t&&!R.current&&(R.target===t&&e-R.finishedAt<=36e5||E())},"startRun",0,E],45437)},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function o(e,a=()=>!1){let s,n;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(s=await e((0,r.nrHosts)("us")),!a(s))return s}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;n=r}try{let t=await e((0,r.nrHosts)("eu"));if(!a(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(n)throw n;return s}async function a(e,r,a){return(await o(o=>t.default.post(o.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:a}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,a,"withRegion",0,o])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function o(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let o=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(o))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let a=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),s=a?a[2]:t.host;return{ok:!0,projectId:o,orgId:a?a[1]:null,apiBase:`${t.protocol}//${s}/api/0`}}async function a(e,r){let o={Authorization:`Bearer ${e}`},a=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:o,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:o,timeout:8e3}),s=Array.isArray(a.data)?a.data:[];return(r.orgId?s.find(e=>String(e.id)===r.orgId)?.slug:s.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,a,"parseSentryDsn",0,o,"publicDsn",0,function(e){let t=o(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0vbatar._.js.map
@@ -1,3 +0,0 @@
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),s=e.i(24514);let a=()=>Response.json({error:(0,s.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 n(e){return(0,s.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]]))}):a()}async function i(e){let n;if(!(0,s.isLocalRequest)(e))return a();try{n=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let i=(0,s.requireJson)(e);if(i)return i;let l=n.provider;if(!("string"==typeof l&&l in r.AI_PROVIDERS))return Response.json({saved:!1,error:"Choose a provider."},{status:400});let d="string"==typeof n.key?n.key.trim():"";if(!d)return Response.json({saved:!1,error:"Required."},{status:400});if(r.UNSAFE.test(d))return Response.json({saved:!1,error:"Contains spaces or special characters. Paste the key without them."},{status:400});try{await o[l](d)}catch(a){let e=t.default.isAxiosError(a)?a.response?.status:void 0,s=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:s},{status:422})}try{(0,r.writeEnvLocal)({[r.AI_PROVIDER_KEY]:l,[r.AI_PROVIDERS[l].key]:d})}catch(e){if(e instanceof r.EnvWriteRefused)return Response.json({saved:!1,error:"Nothing was saved: the key or its name was refused as unsafe."},{status:400});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,n,"POST",0,i])},9001,e=>{"use strict";var t=e.i(12425),r=e.i(83353),s=e.i(47902),a=e.i(37892),o=e.i(54261),n=e.i(39548),i=e.i(68187),l=e.i(63984),d=e.i(88743),c=e.i(24698),u=e.i(13487),p=e.i(48776),h=e.i(29398),f=e.i(31610),v=e.i(45919),R=e.i(93695),g=e.i(12741);e.i(95315);var m=e.i(98732);let E=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:x,serverHooks:b}=E;async function w(e,t,s){s.requestMeta&&(0,a.setRequestMeta)(e,s.requestMeta),E.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/setup/ai/route";y=y.replace(/\/index$/,"")||"/";let x=await E.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:b,deploymentId:w,params:S,nextConfig:C,parsedUrl:A,isDraftMode:T,prerenderManifest:_,routerServerContext:I,isOnDemandRevalidate:N,revalidateOnlyGenerated:k,resolvedPathname:O,clientReferenceManifest:L,serverActionsManifest:P}=x,j=(0,i.normalizeAppPath)(y),q=!!_.routes[O]&&(E.isDev||(0,g.isRouteCacheOwner)(O,E.cacheOwner,_.routes[O])),M=!!(_.dynamicRoutes[j]||q),D=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,A,!1):t.end("This page could not be found"),null);if(M&&!T){let e=_.dynamicRoutes[j];if(e&&!1===e.fallback&&!q){if(C.adapterPath)return await D();throw new R.NoFallbackError}}let U=null;!M||E.isDev||T||(U="/index"===(U=O)?"/":U);let F=!0===E.isDev||!M,$=M&&!F;P&&L&&(0,n.setManifestsSingleton)({page:y,clientReferenceManifest:L,serverActionsManifest:P});let H=e.method||"GET",K=(0,o.getTracer)(),G=K.getActiveScopeSpan(),Y=!!(null==I?void 0:I.isWrappedByNextServer),W=!!(0,a.getRequestMeta)(e,"minimalMode"),V=(0,a.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,C,_,W);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let B={params:S,previewProps:_.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:T,supportsDynamicResponse:F,incrementalCache:V,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,a)=>E.onRequestError(e,t,s,a,I)},sharedContext:{buildId:b,deploymentId:w}},z=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=d.NextRequestAdapter.fromNodeNextRequest(z,(0,d.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!W&&N&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await E.handle(J,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let n=B.renderOpts.collectedTags;if(!M)return await (0,p.sendResponse)(z,X,a,o),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);n&&(t[v.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,s=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?C.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,I),t}},Q=async(a,n)=>{try{var i,l;let a=await E.handleResponse({req:e,nextConfig:C,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:k,responseGenerator:Z,waitUntil:s.waitUntil,isMinimalMode:W});if(!M)return;if((null==a||null==(i=a.value)?void 0:i.kind)!==m.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});W||t.setHeader("x-nextjs-cache",N?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);W&&M||o.delete(v.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,f.getCacheControlHeader)(a.cacheControl)),await (0,p.sendResponse)(z,X,new Response(a.value.body,{headers:o,status:a.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,I),M)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:o.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=K.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 s=r.get("next.route")||j,i=`${H} ${s}`;a.setAttributes({"next.route":s,"http.route":s,"next.span_name":i}),a.updateName(i),n&&n!==a&&(n.setAttribute("http.route",s),n.updateName(i))})()}};if(Y&&G)await Q(G,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(c.BaseServerSpan.handleRequest,{spanName:`${H} ${y}`,kind:o.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},e=>Q(e,t)),void 0,!Y)}}e.s(["handler",0,w,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:x})},"routeModule",0,E,"serverHooks",0,b,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,x])},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),s=e.i(39151),a=e.i(90218);function o(e,t=[],r=[]){let n,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,s.forwardRef)(({className:e,...t},r)=>(0,s.createElement)(a.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(n=(e=>{let t="",r=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){r=t.length>0;continue}0===t.length?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t})(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=o(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 d=o(l),c={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};c.node;let u=o(c);function p(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),s=e<0?"-":"";return r<3600?`${s}${Math.floor(r/60)}m ${r%60}s`:`${s}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,p],78910);let h=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,v=e=>void 0===e?"—":p(e),R=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),g=e=>e.byTool?.lighthouse?.lighthouse,m=(e,t)=>{let r=[];for(let s of e){let e=g(s),a=void 0===e?void 0:t(e);void 0!==a&&r.push(a)}return r.length?f(r):void 0},E=e=>void 0===e?"—":String(Math.round(e)),y=e=>void 0===e?"—":e.toFixed(2),x=e=>R(e)?.count??0,b={"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(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:p(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:p(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(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 t=e.newRelic.inp;return void 0===t?"—":p(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:d,description:"Errors per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>x(t)>(e?x(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(x).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>x(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(x(e))},{needs:"errors",header:"Latest Error",cell:e=>R(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(R(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>v(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>v(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>v(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:u,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:E(m(e,e=>e.score))},{label:"Avg LCP",value:v(m(e,e=>e.lcp))},{label:"Avg CLS",value:y(m(e,e=>e.cls))},{label:"Avg TBT",value:v(m(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>E(g(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>v(g(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>y(g(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>v(g(e)?.tbt)}]}},w=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),S=Object.keys(b);e.s(["KEY_LABELS",0,w,"TOOLS",0,b,"TOOL_IDS",0,S,"mergeMetrics",0,function(e,t,r){let s={};for(let[a,o]of Object.entries(t)){let t=r.includes(o)?void 0:e[o]?.[a];void 0!==t&&(s[a]=t)}return s},"sourcesFor",0,function(e){let t={};for(let r of h){let s=S.find(t=>e.includes(t)&&b[t].capabilities.includes(r));s&&(t[r]=s)}return t}],67119);let C=e=>{let t=b[e].keys;return[...t.required,...t.anyOf??[]]},A=S.flatMap(C),T="NEWRELIC_REGION",_={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"}},I={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},N="AI_PROVIDER";function k(e){return process.env[e]??""}let O=e=>{let{required:t,anyOf:r}=b[e].keys;return t.every(e=>k(e))&&(!r||r.some(e=>k(e)))};function L(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let P=/[\s\0#"'`\\$]/;class j extends Error{}e.s(["AI_PROVIDERS",0,I,"AI_PROVIDER_KEY",0,N,"EnvWriteRefused",0,j,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,T,"SETUP_KEYS",0,A,"UNSAFE",0,P,"activeAi",0,function(){let e=process.env[N];for(let t of(e&&e in I?[e]:[]).concat(Object.keys(I))){let e=process.env[I[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>S.filter(O),"env",0,k,"isToolConnected",0,O,"nrHosts",0,(e="eu"===process.env[T]?"eu":"us")=>_[e],"projectDir",0,L,"setupKeysOf",0,C,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,r.join)(L(),".env.local")){let a=new Set([...Object.values(b).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(I).map(e=>e.key),N]);for(let[t,r]of Object.entries(e)){if(!a.has(t))throw new j("Refused to write a key name no tool declares.");if(P.test(r))throw new j("Refused to write a value with unsafe characters.")}let o=(0,t.existsSync)(s)?(0,t.readFileSync)(s,"utf8").split("\n"):[],n=new Map(Object.entries(e)),i=o.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,t]of n)i.push(`${e}=${t}`);let l=`${s}.tmp`;for(let[r,a]of((0,t.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,t.renameSync)(l,s),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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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=>r.has(e.trim().replace(/^\[|\]$/g,"")))||"cross-site"===e.headers.get("sec-fetch-site"))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}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1231g--._.js.map
@@ -1,3 +0,0 @@
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"))},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),s=e.i(39151),o=e.i(90218);function a(e,t=[],r=[]){let n,l="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,i=(0,s.forwardRef)(({className:e,...t},r)=>(0,s.createElement)(o.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(e=>{let t="",r=!1;for(let s of e){if("-"===s||"_"===s||s<=" "){r=t.length>0;continue}0===t.length?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=a(n),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=a(i),d={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};d.node;let p=a(d);function u(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),s=e<0?"-":"";return r<3600?`${s}${Math.floor(r/60)}m ${r%60}s`:`${s}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}e.s(["formatDuration",0,u],78910);let h=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,g=e=>void 0===e?"—":u(e),m=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),v=e=>e.byTool?.lighthouse?.lighthouse,y=(e,t)=>{let r=[];for(let s of e){let e=v(s),o=void 0===e?void 0:t(e);void 0!==o&&r.push(o)}return r.length?f(r):void 0},x=e=>void 0===e?"—":String(Math.round(e)),E=e=>void 0===e?"—":e.toFixed(2),b=e=>m(e)?.count??0,R={"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:u(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:u(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:u(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>u(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>u(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>u(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?"—":u(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>b(t)>(e?b(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(b).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>b(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(b(e))},{needs:"errors",header:"Latest Error",cell:e=>m(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(m(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>g(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>g(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>g(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:p,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:x(y(e,e=>e.score))},{label:"Avg LCP",value:g(y(e,e=>e.lcp))},{label:"Avg CLS",value:E(y(e,e=>e.cls))},{label:"Avg TBT",value:g(y(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>x(v(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>g(v(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>E(v(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>g(v(e)?.tbt)}]}},S=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),L=Object.keys(R);e.s(["KEY_LABELS",0,S,"TOOLS",0,R,"TOOL_IDS",0,L,"mergeMetrics",0,function(e,t,r){let s={};for(let[o,a]of Object.entries(t)){let t=r.includes(a)?void 0:e[a]?.[o];void 0!==t&&(s[o]=t)}return s},"sourcesFor",0,function(e){let t={};for(let r of h){let s=L.find(t=>e.includes(t)&&R[t].capabilities.includes(r));s&&(t[r]=s)}return t}],67119);let T=e=>{let t=R[e].keys;return[...t.required,...t.anyOf??[]]},w=L.flatMap(T),_="NEWRELIC_REGION",I={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"}},C={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},k="AI_PROVIDER";function A(e){return process.env[e]??""}let N=e=>{let{required:t,anyOf:r}=R[e].keys;return t.every(e=>A(e))&&(!r||r.some(e=>A(e)))};function O(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let j=/[\s\0#"'`\\$]/;class q extends Error{}e.s(["AI_PROVIDERS",0,C,"AI_PROVIDER_KEY",0,k,"EnvWriteRefused",0,q,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,_,"SETUP_KEYS",0,w,"UNSAFE",0,j,"activeAi",0,function(){let e=process.env[k];for(let t of(e&&e in C?[e]:[]).concat(Object.keys(C))){let e=process.env[C[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>L.filter(N),"env",0,A,"isToolConnected",0,N,"nrHosts",0,(e="eu"===process.env[_]?"eu":"us")=>I[e],"projectDir",0,O,"setupKeysOf",0,T,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,r.join)(O(),".env.local")){let o=new Set([...Object.values(R).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(C).map(e=>e.key),k]);for(let[t,r]of Object.entries(e)){if(!o.has(t))throw new q("Refused to write a key name no tool declares.");if(j.test(r))throw new q("Refused to write a value with unsafe characters.")}let a=(0,t.existsSync)(s)?(0,t.readFileSync)(s,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=a.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${s}.tmp`;for(let[r,o]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,s),Object.entries(e)))process.env[r]=o}],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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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=>r.has(e.trim().replace(/^\[|\]$/g,"")))||"cross-site"===e.headers.get("sec-fetch-site"))return!1;let o=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(o))return!1;let a=e.headers.get("origin");try{return!a||t.has(new URL(a).hostname)}catch{return!1}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__12lkcy1._.js.map
@@ -1,3 +0,0 @@
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"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},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"))},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),a=e.i(39151),o=e.i(90218);function s(e,t=[],r=[]){let n,l="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,i=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(o.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(n=(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})(l.name)).charAt(0).toUpperCase()+n.slice(1)),i}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 l=s(n),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),u={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};u.node;let d=s(u);function h(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`}e.s(["formatDuration",0,h],78910);let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors","lighthouse"],f=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,g=e=>void 0===e?"—":h(e),m=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>e.byTool?.lighthouse?.lighthouse,b=(e,t)=>{let r=[];for(let a of e){let e=y(a),o=void 0===e?void 0:t(e);void 0!==o&&r.push(o)}return r.length?f(r):void 0},v=e=>void 0===e?"—":String(Math.round(e)),w=e=>void 0===e?"—":e.toFixed(2),E=e=>m(e)?.count??0,R={"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:h(f(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:h(f(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:h(f(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:f(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>h(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>h(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(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?"—":h(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 per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>E(t)>(e?E(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(E).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>E(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(E(e))},{needs:"errors",header:"Latest Error",cell:e=>m(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(m(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>g(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>g(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>g(e.byTool?.sentry?.vitals?.inp)}]},lighthouse:{label:"Lighthouse CI",icon:d,description:"Lab scores per page, from Lighthouse runs on your project or a Lighthouse CI report: performance score, LCP, CLS and total blocking time.",connectReason:"Add your project's address and MetricFlow runs Lighthouse on its pages, or add the path or URL of a Lighthouse CI JSON report.",setupNote:"Fill in one of the two. If both are set, the project address is used and the report is ignored.",keys:{required:[],optional:[],anyOf:["LIGHTHOUSE_REPORT","LIGHTHOUSE_TARGET"]},capabilities:["pages","lighthouse"],stats:e=>[{label:"Avg Score",value:v(b(e,e=>e.score))},{label:"Avg LCP",value:g(b(e,e=>e.lcp))},{label:"Avg CLS",value:w(b(e,e=>e.cls))},{label:"Avg TBT",value:g(b(e,e=>e.tbt))}],columns:[{needs:"lighthouse",header:"Score",cell:e=>v(y(e)?.score)},{needs:"lighthouse",header:"LCP",cell:e=>g(y(e)?.lcp)},{needs:"lighthouse",header:"CLS",cell:e=>w(y(e)?.cls)},{needs:"lighthouse",header:"TBT",cell:e=>g(y(e)?.tbt)}]}},L=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."},LIGHTHOUSE_REPORT:{label:"Lighthouse report",secret:!1,help:"A Lighthouse CI JSON report, or a folder of them. A relative path starts from the project folder. URLs must be public http(s); for a report on localhost, use its file path. Spaces, #, $, quotes and backslashes are not accepted.",placeholder:".lighthouseci/ or https://example.com/lhr.json"},LIGHTHOUSE_TARGET:{label:"Project address",secret:!1,help:"Your dev server or site, such as http://localhost:3001. MetricFlow finds up to 20 pages (sitemap.xml, or the links on the home page) and runs Lighthouse on each in headless Chrome, again every hour while the dashboard is open. About 10-30 seconds per page. Needs Google Chrome and Node 22.19 or newer on this machine.",placeholder:"http://localhost:3001"}}).map(([e,t])=>[e,t.label])),T=Object.keys(R);e.s(["KEY_LABELS",0,L,"TOOLS",0,R,"TOOL_IDS",0,T,"mergeMetrics",0,function(e,t,r){let a={};for(let[o,s]of Object.entries(t)){let t=r.includes(s)?void 0:e[s]?.[o];void 0!==t&&(a[o]=t)}return a},"sourcesFor",0,function(e){let t={};for(let r of p){let a=T.find(t=>e.includes(t)&&R[t].capabilities.includes(r));a&&(t[r]=a)}return t}],67119);let S=e=>{let t=R[e].keys;return[...t.required,...t.anyOf??[]]},A=T.flatMap(S),x="NEWRELIC_REGION",_={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"}},k={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},I="AI_PROVIDER";function C(e){return process.env[e]??""}let N=e=>{let{required:t,anyOf:r}=R[e].keys;return t.every(e=>C(e))&&(!r||r.some(e=>C(e)))};function O(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let j=/[\s\0#"'`\\$]/;class P extends Error{}e.s(["AI_PROVIDERS",0,k,"AI_PROVIDER_KEY",0,I,"EnvWriteRefused",0,P,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,x,"SETUP_KEYS",0,A,"UNSAFE",0,j,"activeAi",0,function(){let e=process.env[I];for(let t of(e&&e in k?[e]:[]).concat(Object.keys(k))){let e=process.env[k[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>T.filter(N),"env",0,C,"isToolConnected",0,N,"nrHosts",0,(e="eu"===process.env[x]?"eu":"us")=>_[e],"projectDir",0,O,"setupKeysOf",0,S,"writeEnvLocal",0,function(e,a=process.env.METRICFLOW_ENV_FILE||(0,r.join)(O(),".env.local")){let o=new Set([...Object.values(R).flatMap(e=>[...e.keys.required,...e.keys.anyOf??[],...e.keys.optional,...e.keys.derived??[]]),...Object.values(k).map(e=>e.key),I]);for(let[t,r]of Object.entries(e)){if(!o.has(t))throw new P("Refused to write a key name no tool declares.");if(j.test(r))throw new P("Refused to write a value with unsafe characters.")}let s=(0,t.existsSync)(a)?(0,t.readFileSync)(a,"utf8").split("\n"):[],n=new Map(Object.entries(e)),l=s.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&n.has(t)){let e=n.get(t);return n.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of n)l.push(`${e}=${t}`);let i=`${a}.tmp`;for(let[r,o]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,a),Object.entries(e)))process.env[r]=o}],12892)},45437,39445,32254,e=>{"use strict";var t=e.i(66680);function r(e){let t;if("string"!=typeof e||!e.trim())return null;try{t=new URL(e,"http://placeholder").pathname}catch{return null}try{t=decodeURIComponent(t)}catch{}return(t=t.toLowerCase().replace(/\/{2,}/g,"/")).length>1&&(t=t.replace(/\/+$/,"")),t.startsWith("/")?t:null}function a(e){return"/"===e?"home":e.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60).replace(/-+$/,"")||"page"}e.s(["LOCAL_ONLY_NRQL",0,"WHERE (pageUrl LIKE 'http%://localhost%' OR pageUrl LIKE 'http%://127.0.0.1%')","MAX_PAGES",0,20,"buildPages",0,function(e){let o=new Map;for(let{url:t,views:a}of e){let e=r(t);null!==e&&o.set(e,(o.get(e)??0)+(Number.isFinite(a)?a:0))}let s=[...o].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,20),n=new Map;for(let[e]of s)n.set(a(e),(n.get(a(e))??0)+1);return s.map(([e,r])=>{let o=a(e),s=n.get(o)>1?`${o}-${(0,t.createHash)("sha1").update(e).digest("hex").slice(0,6)}`:o;return{url:e,slug:s,name:"/"===e?"Homepage":e.split("/").filter(Boolean).map(e=>e.replace(/[-_]+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase())||e).join(" / "),views:r}})},"isLocalUrl",0,function(e){try{return["localhost","127.0.0.1"].includes(new URL(e).hostname)}catch{return!1}},"normalizePath",0,r],39445);var o=e.i(12892);let s=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),n=e=>"number"==typeof e&&Number.isFinite(e);function l(e){let t=(Array.isArray(e)?e:[e]).slice(0,500),a={};for(let e of t){let t=function(e){if(!s(e)||!s(e.categories)||!s(e.audits))return null;let t=e.categories.performance;if(!s(t)||e.runtimeError||!n(t.score))return null;let a=[e.finalDisplayedUrl,e.finalUrl,e.requestedUrl].find(e=>"string"==typeof e&&e),o=a?r(a):null;if(null===o)return null;let l={score:Math.min(100,Math.max(0,Math.round(100*t.score)))};for(let[t,r]of[["lcp","largest-contentful-paint"],["cls","cumulative-layout-shift"],["tbt","total-blocking-time"]]){let a=function(e,t){let r=e[t];return s(r)&&n(r.numericValue)?r.numericValue:void 0}(e.audits,r);void 0!==a&&(l[t]=a)}return{path:o,fetchTime:"string"==typeof e.fetchTime?e.fetchTime:"",score:l.score,lighthouse:l}}(e);t&&(a[t.path]??=[]).push(t)}return Object.fromEntries(Object.entries(a).map(([e,t])=>(t.sort((e,t)=>e.score-t.score||(e.fetchTime<t.fetchTime?-1:+(e.fetchTime>t.fetchTime))),[e,{lighthouse:t[Math.floor((t.length-1)/2)].lighthouse}])))}e.s(["parseLighthouse",0,l],32254);let i="Lighthouse is not installed. Reinstall MetricFlow to add it.",c="Lighthouse needs Google Chrome installed on this machine.",u="The Lighthouse run failed. Check that the site is running, then Run now.",d="Running Lighthouse needs Node 22.19 or newer.",h=new Set([i,c,d,u]),p=e=>Object.assign(Error(e),{fatal:!0}),f={fetcher:async e=>{let t=await fetch(e,{redirect:"manual",signal:AbortSignal.timeout(1e4)});if(t.status>=300&&t.status<400)return await t.body?.cancel(),{status:t.status,location:t.headers.get("location")??void 0,body:""};let r=[],a=0,o=t.body?.getReader();for(let e=await o?.read();e&&!e.done;e=await o.read()){if((a+=e.value.length)>5242880)throw await o.cancel(),Error("too large");r.push(e.value)}return{status:t.status,body:Buffer.concat(r).toString("utf8")}},runner:async(e,t)=>{let r,a;if((e=>{let[t,r]=e.split(".").map(Number);return t<22||22===t&&r<19})(f.nodeVersion))throw p(d);try{r=await f.load()}catch(t){let e=t.code;throw p("ERR_MODULE_NOT_FOUND"===e||"MODULE_NOT_FOUND"===e?i:u)}try{a=await r.launch({chromeFlags:["--headless=new","--disable-gpu"],logLevel:"silent"})}catch{throw p(c)}let o=()=>{try{return Promise.resolve(a.kill()).catch(()=>{})}catch{return Promise.resolve()}};if(t.aborted)throw await o(),Error("aborted");t.addEventListener("abort",o,{once:!0});try{return(await r.lighthouse(e,{port:a.port,output:"json",logLevel:"silent",onlyCategories:["performance"]}))?.lhr}finally{t.removeEventListener("abort",o),await o()}},nodeVersion:process.versions.node,load:async()=>{let[t,r]=await Promise.all([e.A(84977),e.A(94329)]);return{lighthouse:t.default,launch:r.launch}}};function g(e){let t;try{t=new URL(e)}catch{return null}return"http:"!==t.protocol&&"https:"!==t.protocol||t.username||t.password?null:t}async function m(e,t,r){try{for(let a=0;a<=3;a++){let a=await r(e);if(a.status<300||a.status>=400)return a;if(!a.location)break;let o=new URL(a.location,e);if(o.origin!==t)break;e=o.href}}catch{}return null}let y=e=>!!e&&e.status>=200&&e.status<300;async function b(e,t=f.fetcher){let r=g(e);return r?y(await m(`${r.origin}/`,r.origin,t))?{ok:!0}:{ok:!1,error:"The project address did not answer with a page within 10 seconds."}:{ok:!1,error:"The project address must be an http(s) URL with no user name or password in it."}}let v=e=>e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'");function w(e,t,a){for(let o of t){let t;if(e.size>=20)break;try{t=new URL(o,`${a}/`)}catch{continue}if(t.origin!==a)continue;let s=t.pathname.split("/").pop()??"";if(/\.[a-z0-9]+$/i.test(s)&&!/\.html$/i.test(s))continue;let n=r(t.pathname);n&&!e.has(n)&&e.set(n,a+t.pathname)}}async function E(e,t=f.fetcher){let r=new URL(e).origin,a=new Map([["/",`${r}/`]]),o=await m(`${r}/sitemap.xml`,r,t);if(y(o)&&w(a,[...o.body.matchAll(/<loc>([^<]*)<\/loc>/gi)].map(e=>v(e[1].trim())),r),1===a.size){let e=await m(`${r}/`,r,t);y(e)&&w(a,[...e.body.matchAll(/<a\s[^<>]*?href\s*=\s*["']([^"']+)["']/gi)].map(e=>v(e[1])),r)}return[...a].map(([e,t])=>({path:e,url:t}))}let R={status:{state:"idle",done:0,total:0,lastRunAt:null},target:"",byPath:{},finishedAt:0,current:null};function L(e={}){if(R.current)return R.current;let t=(0,o.env)("LIGHTHOUSE_TARGET");return t?(R.status={state:"running",done:0,total:0,lastRunAt:R.status.lastRunAt},R.current=T(R,t,e).finally(()=>{R.current=null}),R.current):Promise.resolve()}async function T(e,t,r){let a,{fetcher:o=f.fetcher,runner:s=f.runner,pageMs:n=6e4,totalMs:i=6e5}=r,c=Date.now()+i,d=[],p={};try{let r=g(t)?.origin;if(!r)throw Error("bad target");let i=await E(t,o);for(let{url:t}of(e.status.total=i.length,i)){let o=c-Date.now();if(o<=0)break;try{let e=await function(e,t){let r,a=new AbortController,o=new Promise((e,o)=>{r=setTimeout(()=>{a.abort(),o(Error("timeout"))},t)});return Promise.race([e(a.signal),o]).finally(()=>clearTimeout(r))}(e=>s(t,e),Math.min(n,o));(function(e,t){let r=e??{},a=[r.finalDisplayedUrl,r.finalUrl,r.requestedUrl].find(e=>"string"==typeof e&&e);try{return!!a&&new URL(a).origin===t}catch{return!1}})(e,r)&&d.push(e)}catch(e){if(e.fatal){let t=e.message;a=h.has(t)?t:u;break}}e.status.done++}p=l(d),a||Object.keys(p).length||(a="No page could be measured. Check that the site is running, then Run now.")}catch{a=u}let m=Object.keys(p).length>0,y=e.target===t;e.target=t,e.finishedAt=Date.now(),(m||!y)&&(e.byPath=p);let b=m?new Date(e.finishedAt).toISOString():y?e.status.lastRunAt:null;e.status={state:a?"error":"idle",done:e.status.done,total:e.status.total,lastRunAt:b,...a?{error:a}:{}}}e.s(["checkTarget",0,b,"getResults",0,e=>R.target===e?R.byPath:{},"getStatus",0,()=>({...R.status}),"maybeStartRun",0,function(e=Date.now()){let t=(0,o.env)("LIGHTHOUSE_TARGET");t&&!R.current&&(R.target===t&&e-R.finishedAt<=36e5||L())},"startRun",0,L],45437)},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(["PROXY_REFUSAL",0,"This dashboard only answers requests from this machine.","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,"")))||"cross-site"===e.headers.get("sec-fetch-site"))return!1;let o=(e.headers.get("host")??"").replace(/:\d+$/,"");if(!t.has(o))return!1;let s=e.headers.get("origin");try{return!s||t.has(new URL(s).hostname)}catch{return!1}},"requireJson",0,function(e){return/^application\/json\s*(;|$)/i.test(e.headers.get("content-type")??"")?null:Response.json({error:"Send the request as application/json."},{status:415})}])},49196,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.54.0_@types+react@19.3.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.54.0_@types+react@19.3.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},90218,e=>{"use strict";var t=e.i(49196);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1mj-h97._.js.map