@karan171996/metricflow 0.13.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +7 -6
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +9 -9
- package/.next/required-server-files.js +9 -5
- package/.next/required-server-files.json +9 -5
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error/page/build-manifest.json +4 -3
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +4 -3
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +23 -22
- package/.next/server/app/_not-found.segments/_full.segment.rsc +23 -22
- package/.next/server/app/_not-found.segments/_index.segment.rsc +12 -11
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/analyze/route.js +1 -1
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/connect/route.js +1 -1
- package/.next/server/app/api/connect/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/lighthouse/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/lighthouse/route/build-manifest.json +12 -0
- package/.next/server/app/api/lighthouse/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/lighthouse/route.js +7 -0
- package/.next/server/app/api/lighthouse/route.js.nft.json +1 -0
- package/.next/server/app/api/lighthouse/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/metrics/route.js +3 -1
- package/.next/server/app/api/metrics/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/ai/route.js +1 -1
- package/.next/server/app/api/setup/ai/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +4 -3
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/timings/route.js.nft.json +1 -1
- package/.next/server/app/connect/page/build-manifest.json +4 -3
- package/.next/server/app/connect/page.js +1 -1
- package/.next/server/app/connect/page.js.nft.json +1 -1
- package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connect.html +2 -2
- package/.next/server/app/connect.rsc +24 -23
- package/.next/server/app/connect.segments/_full.segment.rsc +24 -23
- package/.next/server/app/connect.segments/_index.segment.rsc +12 -11
- package/.next/server/app/connect.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +12 -12
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg.body +4 -2
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +27 -26
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/index.segments/_full.segment.rsc +27 -26
- package/.next/server/app/index.segments/_index.segment.rsc +12 -11
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page/build-manifest.json +4 -3
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance/[slug]/page/build-manifest.json +4 -3
- package/.next/server/app/performance/[slug]/page.js +3 -3
- package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
- package/.next/server/app/performance/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance/page/build-manifest.json +4 -3
- package/.next/server/app/performance/page.js +1 -1
- package/.next/server/app/performance/page.js.nft.json +1 -1
- package/.next/server/app/performance/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance.html +2 -2
- package/.next/server/app/performance.rsc +32 -31
- package/.next/server/app/performance.segments/_full.segment.rsc +32 -31
- package/.next/server/app/performance.segments/_index.segment.rsc +12 -11
- package/.next/server/app/performance.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +14 -14
- package/.next/server/app/settings/page/build-manifest.json +4 -3
- package/.next/server/app/settings/page.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page/build-manifest.json +4 -3
- package/.next/server/app/setup/page.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup.html +2 -2
- package/.next/server/app/setup.rsc +25 -24
- package/.next/server/app/setup.segments/_full.segment.rsc +25 -24
- package/.next/server/app/setup.segments/_index.segment.rsc +12 -11
- package/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +13 -13
- package/.next/server/app/tools/[tool]/page/build-manifest.json +4 -3
- package/.next/server/app/tools/[tool]/page.js +2 -2
- package/.next/server/app/tools/[tool]/page.js.nft.json +1 -1
- package/.next/server/app/tools/[tool]/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/[externals]__0_9e0si._.js +3 -0
- package/.next/server/chunks/[externals]__1f7xi3d._.js +3 -0
- package/.next/server/chunks/{[externals]__0lanngu._.js → [externals]__1rfyr-i._.js} +1 -1
- package/.next/server/chunks/[externals]_chrome-launcher_1k_yki1._.js +3 -0
- package/.next/server/chunks/[externals]_lighthouse_1su6d37._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_6kr31._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0az11z3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dv0ig6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0egyynf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fkj1-q._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0vbatar._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1231g--._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12lkcy1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1mj-h97._.js +3 -0
- package/.next/server/chunks/[turbopack]_runtime.js +132 -0
- package/.next/server/chunks/_0w8wvdn._.js +1 -1
- package/.next/server/chunks/_0wct7-r._.js +1 -1
- package/.next/server/chunks/_1f80q3b._.js +2 -2
- package/.next/server/chunks/_next-internal_server_app_api_lighthouse_route_actions_1_4ee8x.js +3 -0
- package/.next/server/chunks/lib_analytics_index_ts_00-ju4e._.js +20 -0
- package/.next/server/chunks/ssr/0x0c_next_dist_0lkq344._.js +1 -1
- package/.next/server/chunks/ssr/0x0c_next_dist_1icgwks._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1nkgz3w._.js → 10ci_lucide-react_dist_esm_Icon_mjs_05sy43t._.js} +2 -2
- package/.next/server/chunks/ssr/[externals]_chrome-launcher_1k_yki1._.js +3 -0
- package/.next/server/chunks/ssr/[externals]_lighthouse_1su6d37._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__02c3m72._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0g1dtzd._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__11p3jmb._.js → [root-of-the-server]__0hifh__._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0l4t71c._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0tz50uc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xjblsu._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1r29vac._.js → [root-of-the-server]__13w6d6f._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__146cm0r._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__14_2v5e._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1cl7b4r._.js +1 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +132 -0
- package/.next/server/chunks/ssr/_0aid3rp._.js +5 -3
- package/.next/server/chunks/ssr/{_1b8x2qw._.js → _0cst0jv._.js} +2 -2
- package/.next/server/chunks/ssr/{_1-c62g-._.js → _0vl4jhl._.js} +2 -2
- package/.next/server/chunks/ssr/{_1op3e_1._.js → _1-l5u-_._.js} +2 -2
- package/.next/server/chunks/ssr/{_0r3gp17._.js → _12brazw._.js} +2 -2
- package/.next/server/chunks/ssr/_1cfwie5._.js +3 -0
- package/.next/server/chunks/ssr/_1d39141._.js +3 -0
- package/.next/server/chunks/ssr/_1h52qq9._.js +3 -0
- package/.next/server/chunks/ssr/_1n6kmjf._.js +3 -0
- package/.next/server/chunks/ssr/{_0zneont._.js → _1ni54_c._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-u65it._.js → _1vv2tlg._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules__pnpm_1gezzqr._.js +151 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_0hf3oiy._.js → node_modules__pnpm_20_uz79._.js} +2 -2
- package/.next/server/middleware-build-manifest.js +7 -6
- package/.next/server/middleware.js.nft.json +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.html +2 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.meta +1 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.rsc +41 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_full.segment.rsc +41 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_index.segment.rsc +32 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_not-found/__PAGE__.segment.rsc +20 -0
- package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/09gd7q3y6k-9o.js +1 -0
- package/.next/static/chunks/0on9boy9udzsk.js +22 -0
- package/.next/static/chunks/{3pxx39yay0ace.js → 0xrcyj-flkrl1.js} +1 -1
- package/.next/static/chunks/16dm0t9zkiz1_.js +31 -0
- package/.next/static/chunks/1qvxxmozdr7-c.js +1 -0
- package/.next/static/chunks/2wutbn1zdrzvx.js +1 -0
- package/.next/static/chunks/3somw8tkd8pzf.js +1 -0
- package/.next/static/chunks/3twacs-22zdwk.js +1 -0
- package/.next/static/chunks/{32-2bttdrtgys.js → 458nt4gshcy9x.js} +1 -1
- package/.next/static/chunks/turbopack-3icatqv27j50p.js +1 -0
- package/.next/static/media/icon.36lva-cxqp491.svg +6 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/README.md +6 -1
- package/bin/cli.mjs +14 -3
- package/bin/output.mjs +2 -0
- package/package.json +23 -16
- package/.next/server/chunks/[root-of-the-server]__0086g9z._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ui-otz._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0urnrab._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wkeqwu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xmaf60._.js +0 -18
- package/.next/server/chunks/[root-of-the-server]__0xy2rkf._.js +0 -18
- package/.next/server/chunks/ssr/[root-of-the-server]__0kik87u._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1jyq1xk._.js +0 -3
- package/.next/server/chunks/ssr/_01vg-zb._.js +0 -3
- package/.next/server/chunks/ssr/_05t4klq._.js +0 -151
- package/.next/server/chunks/ssr/_09p8bi4._.js +0 -3
- package/.next/server/chunks/ssr/_1vj5488._.js +0 -3
- package/.next/static/chunks/0y_7csdv76zje.js +0 -1
- package/.next/static/chunks/2ez5lwfhls4_u.js +0 -1
- package/.next/static/chunks/3pn7ef-_3czj3.js +0 -1
- package/.next/static/chunks/3u-yh5wnxswb0.js +0 -1
- package/.next/static/chunks/3vpvl6gwhuz4w.js +0 -22
- package/.next/static/chunks/42z_0gfabqpr_.js +0 -31
- package/.next/static/chunks/turbopack-2-umre2j9nu7o.js +0 -1
- package/.next/static/media/icon.23mz8iwcatff2.svg +0 -4
- /package/.next/static/{RRS37EvIgWi0J_47nxSZN → 8LtMJdCno9wkpYotBJePk}/_buildManifest.js +0 -0
- /package/.next/static/{RRS37EvIgWi0J_47nxSZN → 8LtMJdCno9wkpYotBJePk}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{RRS37EvIgWi0J_47nxSZN → 8LtMJdCno9wkpYotBJePk}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},12892,78910,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),s=e.i(39151),a=e.i(90218);function n(e,t=[],r=[]){let o,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)(a.default,{ref:r,icon:l,className:e,...t}));return l.name&&(i.displayName=(o=(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()+o.slice(1)),i}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let l=n(o),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=n(i);function d(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),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,d],78910);let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],u=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,h=e=>void 0===e?"—":d(e),f=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>f(e)?.count??0,E={"new-relic":{label:"New Relic",icon:l,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:d(u(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:d(u(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:d(u(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:u(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>d(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>d(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>d(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let t=e.newRelic.inp;return void 0===t?"—":d(t)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors 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)=>y(t)>(e?y(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(y).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>y(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(y(e))},{needs:"errors",header:"Latest Error",cell:e=>f(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(f(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=>h(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>h(e.byTool?.sentry?.vitals?.inp)}]}},m=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,t])=>[e,t.label])),v=Object.keys(E);e.s(["KEY_LABELS",0,m,"TOOLS",0,E,"TOOL_IDS",0,v,"mergeMetrics",0,function(e,t,r){let s={};for(let[a,n]of Object.entries(t)){let t=r.includes(n)?void 0:e[n]?.[a];void 0!==t&&(s[a]=t)}return s},"sourcesFor",0,function(e){let t={};for(let r of p){let s=v.find(t=>e.includes(t)&&E[t].capabilities.includes(r));s&&(t[r]=s)}return t}],67119);let R=v.flatMap(e=>E[e].keys.required),g="NEWRELIC_REGION",x={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"}},b={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 w(e){return process.env[e]??""}let I=e=>E[e].keys.required.every(e=>w(e));function S(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let N=/[\s\0#"'`\\$]/;class k extends Error{}e.s(["AI_PROVIDERS",0,b,"AI_PROVIDER_KEY",0,_,"EnvWriteRefused",0,k,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,g,"SETUP_KEYS",0,R,"UNSAFE",0,N,"activeAi",0,function(){let e=process.env[_];for(let t of(e&&e in b?[e]:[]).concat(Object.keys(b))){let e=process.env[b[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>v.filter(I),"env",0,w,"isToolConnected",0,I,"nrHosts",0,(e="eu"===process.env[g]?"eu":"us")=>x[e],"projectDir",0,S,"writeEnvLocal",0,function(e,s=process.env.METRICFLOW_ENV_FILE||(0,r.join)(S(),".env.local")){let a=new Set([...Object.values(E).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(b).map(e=>e.key),_]);for(let[t,r]of Object.entries(e)){if(!a.has(t))throw new k("Refused to write a key name no tool declares.");if(N.test(r))throw new k("Refused to write a value with unsafe characters.")}let n=(0,t.existsSync)(s)?(0,t.readFileSync)(s,"utf8").split("\n"):[],o=new Map(Object.entries(e)),l=n.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;l.length&&""===l[l.length-1];)l.pop();for(let[e,t]of o)l.push(`${e}=${t}`);let i=`${s}.tmp`;for(let[r,a]of((0,t.writeFileSync)(i,l.join("\n")+"\n",{mode:384}),(0,t.renameSync)(i,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(["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 n=e.headers.get("origin");try{return!n||t.has(new URL(n).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}];
|
|
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
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0dv0ig6._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
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 +1,3 @@
|
|
|
1
|
-
module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57007,e=>{"use strict";async function t(){return Response.json({status:"ok",timestamp:new Date().toISOString(),version:"0.
|
|
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
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0fkj1-q._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},70722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},83464,e=>{"use strict";var t=e.i(60756),r=e.i(12892),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
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},70722,(e,t,r)=>{t.exports=e.x("tty",()=>require("tty"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},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
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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
|
|
@@ -539,6 +539,138 @@ function applyModuleFactoryName(factory) {
|
|
|
539
539
|
value: 'module evaluation'
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
+
/// <reference path="./runtime-types.d.ts" />
|
|
543
|
+
/// <reference path="./runtime-utils.ts" />
|
|
544
|
+
/**
|
|
545
|
+
* Top-level-await / async-module machinery. This is only included in the runtime
|
|
546
|
+
* when the module graph actually contains an async module (a module with
|
|
547
|
+
* top-level await, or one that transitively depends on one). When no async
|
|
548
|
+
* module is present, the chunk items never reference `__turbopack_context__.a`,
|
|
549
|
+
* so this whole file can be omitted.
|
|
550
|
+
*
|
|
551
|
+
* everything below is adapted from webpack
|
|
552
|
+
* https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
|
|
553
|
+
*/ const turbopackQueues = Symbol('turbopack queues');
|
|
554
|
+
const turbopackExports = Symbol('turbopack exports');
|
|
555
|
+
const turbopackError = Symbol('turbopack error');
|
|
556
|
+
function isPromise(maybePromise) {
|
|
557
|
+
return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
|
|
558
|
+
}
|
|
559
|
+
function isAsyncModuleExt(obj) {
|
|
560
|
+
return turbopackQueues in obj;
|
|
561
|
+
}
|
|
562
|
+
function createPromise() {
|
|
563
|
+
let resolve;
|
|
564
|
+
let reject;
|
|
565
|
+
const promise = new Promise((res, rej)=>{
|
|
566
|
+
reject = rej;
|
|
567
|
+
resolve = res;
|
|
568
|
+
});
|
|
569
|
+
return {
|
|
570
|
+
promise,
|
|
571
|
+
resolve: resolve,
|
|
572
|
+
reject: reject
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
function resolveQueue(queue) {
|
|
576
|
+
if (queue && queue.status !== 1) {
|
|
577
|
+
queue.status = 1;
|
|
578
|
+
queue.forEach((fn)=>fn.queueCount--);
|
|
579
|
+
queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
function wrapDeps(deps) {
|
|
583
|
+
return deps.map((dep)=>{
|
|
584
|
+
if (dep !== null && typeof dep === 'object') {
|
|
585
|
+
if (isAsyncModuleExt(dep)) return dep;
|
|
586
|
+
if (isPromise(dep)) {
|
|
587
|
+
const queue = Object.assign([], {
|
|
588
|
+
status: 0
|
|
589
|
+
});
|
|
590
|
+
const obj = {
|
|
591
|
+
[turbopackExports]: {},
|
|
592
|
+
[turbopackQueues]: (fn)=>fn(queue)
|
|
593
|
+
};
|
|
594
|
+
dep.then((res)=>{
|
|
595
|
+
obj[turbopackExports] = res;
|
|
596
|
+
resolveQueue(queue);
|
|
597
|
+
}, (err)=>{
|
|
598
|
+
obj[turbopackError] = err;
|
|
599
|
+
resolveQueue(queue);
|
|
600
|
+
});
|
|
601
|
+
return obj;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
return {
|
|
605
|
+
[turbopackExports]: dep,
|
|
606
|
+
[turbopackQueues]: ()=>{}
|
|
607
|
+
};
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function asyncModule(body, hasAwait) {
|
|
611
|
+
const module = this.m;
|
|
612
|
+
const queue = hasAwait ? Object.assign([], {
|
|
613
|
+
status: -1
|
|
614
|
+
}) : undefined;
|
|
615
|
+
const depQueues = new Set();
|
|
616
|
+
const { resolve, reject, promise: rawPromise } = createPromise();
|
|
617
|
+
const promise = Object.assign(rawPromise, {
|
|
618
|
+
[turbopackExports]: module.exports,
|
|
619
|
+
[turbopackQueues]: (fn)=>{
|
|
620
|
+
queue && fn(queue);
|
|
621
|
+
depQueues.forEach(fn);
|
|
622
|
+
promise['catch'](()=>{});
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
const attributes = {
|
|
626
|
+
get () {
|
|
627
|
+
return promise;
|
|
628
|
+
},
|
|
629
|
+
set (v) {
|
|
630
|
+
// Calling `esmExport` leads to this.
|
|
631
|
+
if (v !== promise) {
|
|
632
|
+
promise[turbopackExports] = v;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
Object.defineProperty(module, 'exports', attributes);
|
|
637
|
+
Object.defineProperty(module, 'namespaceObject', attributes);
|
|
638
|
+
function handleAsyncDependencies(deps) {
|
|
639
|
+
const currentDeps = wrapDeps(deps);
|
|
640
|
+
const getResult = ()=>currentDeps.map((d)=>{
|
|
641
|
+
if (d[turbopackError]) throw d[turbopackError];
|
|
642
|
+
return d[turbopackExports];
|
|
643
|
+
});
|
|
644
|
+
const { promise, resolve } = createPromise();
|
|
645
|
+
const fn = Object.assign(()=>resolve(getResult), {
|
|
646
|
+
queueCount: 0
|
|
647
|
+
});
|
|
648
|
+
function fnQueue(q) {
|
|
649
|
+
if (q !== queue && !depQueues.has(q)) {
|
|
650
|
+
depQueues.add(q);
|
|
651
|
+
if (q && q.status === 0) {
|
|
652
|
+
fn.queueCount++;
|
|
653
|
+
q.push(fn);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
|
|
658
|
+
return fn.queueCount ? promise : getResult();
|
|
659
|
+
}
|
|
660
|
+
function asyncResult(err) {
|
|
661
|
+
if (err) {
|
|
662
|
+
reject(promise[turbopackError] = err);
|
|
663
|
+
} else {
|
|
664
|
+
resolve(promise[turbopackExports]);
|
|
665
|
+
}
|
|
666
|
+
resolveQueue(queue);
|
|
667
|
+
}
|
|
668
|
+
body(handleAsyncDependencies, asyncResult);
|
|
669
|
+
if (queue && queue.status === -1) {
|
|
670
|
+
queue.status = 0;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
contextPrototype.a = asyncModule;
|
|
542
674
|
/// <reference path="../shared/runtime/runtime-utils.ts" />
|
|
543
675
|
/// A 'base' utilities to support runtime can have externals.
|
|
544
676
|
/// Currently this is for node.js / edge runtime both.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[35907,e=>{"use strict";var t=e.i(71288),r=e.i(12892),a=e.i(
|
|
1
|
+
module.exports=[35907,e=>{"use strict";var t=e.i(71288),r=e.i(12892),a=e.i(45437),s=e.i(67119),n=e.i(24514);let o="Contains spaces or special characters (# \" ' ` $ \\). Paste the value without them.",i=s.TOOL_IDS.flatMap(e=>s.TOOLS[e].keys.optional),l=()=>Response.json({error:(0,n.REFUSAL_MESSAGE)()},{status:403}),u=e=>t.SERVER_TOOLS[e],d=(e,t)=>e instanceof r.EnvWriteRefused?Response.json({saved:!1,error:"Nothing was saved: a saved value or a key name was refused as unsafe. Check the saved values, or enter them again here."},{status:400}):Response.json({saved:!1,error:t},{status:500});async function c(e){return(0,n.isLocalRequest)(e)?Response.json({configured:(0,r.connectedTools)().length>0,tools:(0,r.connectedTools)(),keys:Object.fromEntries([...r.SETUP_KEYS,...i].map(e=>[e,!!(0,r.env)(e)]))}):l()}async function p(e){let t;if(!(0,n.isLocalRequest)(e))return l();try{t=await e.json()}catch{return Response.json({error:"Invalid request body."},{status:400})}let i=(0,n.requireJson)(e);if(i)return i;let c=s.TOOL_IDS.flatMap(e=>s.TOOLS[e].keys.optional.flatMap(r=>"string"==typeof t[r]&&t[r].trim()?[{id:e,k:r,v:t[r].trim()}]:[]));if(c.length&&r.SETUP_KEYS.every(e=>!t[e])){let e={},t={};for(let a of new Set(c.map(e=>e.id))){if(!(0,r.isToolConnected)(a))return Response.json({saved:!1,error:"Finish setup first."},{status:400});let s=Object.fromEntries(c.filter(e=>e.id===a).map(e=>[e.k,e.v])),n=Object.entries(s).filter(([,e])=>r.UNSAFE.test(e));for(let[t]of n)e[t]={ok:!1,error:o};n.length||(Object.assign(e,(await u(a)?.update(s))?.results??Object.fromEntries(Object.keys(s).map(e=>[e,{ok:!0}]))),Object.assign(t,s))}if(Object.values(e).some(e=>!e.ok))return Response.json({saved:!1,results:e},{status:400});try{(0,r.writeEnvLocal)(t)}catch(e){return d(e,".env.local could not be written. Check folder permissions.")}return Response.json({saved:!0,results:e})}let p={},h={},f={};for(let e of s.TOOL_IDS){let a=s.TOOLS[e].keys.required,n=(0,r.setupKeysOf)(e).filter(e=>"string"==typeof t[e]&&t[e].trim());if(!n.length)continue;let i=h[e]={};for(let e of n){let a=t[e].trim();r.UNSAFE.test(a)?f[e]={ok:!1,error:o}:p[e]=i[e]=a}for(let t of a.filter(e=>!n.includes(e)&&!(0,r.env)(e)))f[t]={ok:!1,error:`Add the ${s.KEY_LABELS[t]}, or clear the ${s.KEY_LABELS[n[0]]} to skip ${s.TOOLS[e].label}.`};for(let e of a.filter(e=>!n.includes(e)&&(0,r.env)(e)))p[e]=i[e]=(0,r.env)(e)}let v=Object.keys(h);if(!v.length)return Response.json({saved:!1,error:"Fill in every field for at least one tool."},{status:400});if(Object.keys(f).length)return Response.json({saved:!1,results:f},{status:400});let R=await Promise.all(v.map(async e=>({id:e,update:await u(e)?.update(h[e])}))),E=Object.assign({},...R.map(e=>e.update?.results??{}));if(Object.values(E).some(e=>!e.ok))return Response.json({saved:!1,results:E},{status:422});let m=Object.fromEntries(R.flatMap(({id:e,update:t})=>Object.entries(t?.derived??{}).filter(([t])=>s.TOOLS[e].keys.derived?.includes(t))));try{(0,r.writeEnvLocal)({...p,...m})}catch(e){return d(e,"Keys are valid but .env.local could not be written. Check folder permissions.")}return p.LIGHTHOUSE_TARGET&&(0,a.startRun)(),Response.json({saved:!0,results:E})}e.s(["GET",0,c,"POST",0,p])},97962,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),s=e.i(37892),n=e.i(54261),o=e.i(39548),i=e.i(68187),l=e.i(63984),u=e.i(88743),d=e.i(24698),c=e.i(13487),p=e.i(48776),h=e.i(29398),f=e.i(31610),v=e.i(45919),R=e.i(93695),E=e.i(12741);e.i(95315);var m=e.i(98732);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/setup/route",pathname:"/api/setup",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/setup/route.ts",nextConfigOutput:"",userland:()=>e.r(35907),...{}}),{workAsyncStorage:O,workUnitAsyncStorage:w,serverHooks:S}=g;async function y(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),g.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let O="/api/setup/route";O=O.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:O,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:S,deploymentId:y,params:T,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:j,routerServerContext:x,isOnDemandRevalidate:k,revalidateOnlyGenerated:_,resolvedPathname:P,clientReferenceManifest:N,serverActionsManifest:L}=w,q=(0,i.normalizeAppPath)(O),I=!!j.routes[P]&&(g.isDev||(0,E.isRouteCacheOwner)(P,g.cacheOwner,j.routes[P])),H=!!(j.dynamicRoutes[q]||I),M=async()=>((null==x?void 0:x.render404)?await x.render404(e,t,b,!1):t.end("This page could not be found"),null);if(H&&!A){let e=j.dynamicRoutes[q];if(e&&!1===e.fallback&&!I){if(C.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!H||g.isDev||A||(U="/index"===(U=P)?"/":U);let D=!0===g.isDev||!H,K=H&&!D;L&&N&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:N,serverActionsManifest:L});let F=e.method||"GET",$=(0,n.getTracer)(),G=$.getActiveScopeSpan(),B=!!(null==x?void 0:x.isWrappedByNextServer),V=!!(0,s.getRequestMeta)(e,"minimalMode"),Y=(0,s.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,C,j,V);null==Y||Y.resetRequestCache(),globalThis.__incrementalCache=Y;let W={params:T,previewProps:j.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:A,supportsDynamicResponse:D,incrementalCache:Y,hmrRefreshHash:(0,s.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>g.onRequestError(e,t,a,s,x)},sharedContext:{buildId:S,deploymentId:y}},X=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!V&&k&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await g.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let n=W.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let o=W.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(X,z,s,n),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);o&&(t[v.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?C.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:k})},!1,x),t}},Q=async(s,o)=>{try{var i,l;let s=await g.handleResponse({req:e,nextConfig:C,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:j,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:_,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:V});if(!H)return;if((null==s||null==(i=s.value)?void 0:i.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==s||null==(l=s.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",k?"REVALIDATED":s.isMiss?"MISS":s.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(s.value.headers);V&&H||n.delete(v.NEXT_CACHE_TAGS_HEADER),!s.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,f.getCacheControlHeader)(s.cacheControl)),await (0,p.sendResponse)(X,z,new Response(s.value.body,{headers:n,status:s.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:k})},!1,x),H)throw t;await (0,p.sendResponse)(X,z,new Response(null,{status:500}));return}finally{(()=>{if(!s)return;let e=t.statusCode;s.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(s.setStatus({code:n.SpanStatusCode.ERROR}),s.setAttribute("error.type",e.toString()));let r=$.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")||q,i=`${F} ${a}`;s.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),s.updateName(i),o&&o!==s&&(o.setAttribute("http.route",a),o.updateName(i))})()}};if(B&&G)await Q(G,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${O}`,kind:n.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Q(e,t)),void 0,!B)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,S,"workAsyncStorage",0,O,"workUnitAsyncStorage",0,w])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0w8wvdn._.js.map
|