@karan171996/metricflow 0.6.0 → 0.8.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.
Files changed (119) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +6 -6
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/_not-found.html +2 -2
  14. package/.next/server/app/_not-found.rsc +9 -9
  15. package/.next/server/app/_not-found.segments/_full.segment.rsc +9 -9
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  20. package/.next/server/app/api/connect/route.js.nft.json +1 -1
  21. package/.next/server/app/api/health/route.js.nft.json +1 -1
  22. package/.next/server/app/api/metrics/route.js.nft.json +1 -1
  23. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  24. package/.next/server/app/api/setup/ai/route.js.nft.json +1 -1
  25. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  26. package/.next/server/app/connect/page.js.nft.json +1 -1
  27. package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/connect.html +4 -4
  29. package/.next/server/app/connect.rsc +11 -11
  30. package/.next/server/app/connect.segments/_full.segment.rsc +11 -11
  31. package/.next/server/app/connect.segments/_index.segment.rsc +8 -8
  32. package/.next/server/app/connect.segments/_tree.segment.rsc +2 -2
  33. package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +6 -6
  34. package/.next/server/app/index.html +2 -2
  35. package/.next/server/app/index.rsc +11 -11
  36. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  37. package/.next/server/app/index.segments/_full.segment.rsc +11 -11
  38. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  39. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  40. package/.next/server/app/page.js.nft.json +1 -1
  41. package/.next/server/app/page_client-reference-manifest.js +1 -1
  42. package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
  43. package/.next/server/app/performance/[slug]/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/performance/page.js.nft.json +1 -1
  45. package/.next/server/app/performance/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/performance.html +2 -2
  47. package/.next/server/app/performance.rsc +12 -12
  48. package/.next/server/app/performance.segments/_full.segment.rsc +12 -12
  49. package/.next/server/app/performance.segments/_index.segment.rsc +8 -8
  50. package/.next/server/app/performance.segments/_tree.segment.rsc +2 -2
  51. package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +7 -7
  52. package/.next/server/app/settings/page.js.nft.json +1 -1
  53. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  54. package/.next/server/app/settings.html +2 -2
  55. package/.next/server/app/settings.rsc +22 -22
  56. package/.next/server/app/settings.segments/_full.segment.rsc +22 -22
  57. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  58. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  59. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +17 -17
  60. package/.next/server/app/setup/page.js.nft.json +1 -1
  61. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/setup.html +2 -2
  63. package/.next/server/app/setup.rsc +12 -12
  64. package/.next/server/app/setup.segments/_full.segment.rsc +12 -12
  65. package/.next/server/app/setup.segments/_index.segment.rsc +8 -8
  66. package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  67. package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +7 -7
  68. package/.next/server/app/tools/[tool]/page.js.nft.json +1 -1
  69. package/.next/server/app/tools/[tool]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__0fkj1-q._.js +1 -1
  71. package/.next/server/chunks/[root-of-the-server]__0o2ceqr._.js +3 -3
  72. package/.next/server/chunks/[root-of-the-server]__0pil1g6._.js +1 -1
  73. package/.next/server/chunks/[root-of-the-server]__0xmaf60._.js +3 -3
  74. package/.next/server/chunks/[root-of-the-server]__18s35pf._.js +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__1f_fo0j._.js +1 -1
  76. package/.next/server/chunks/[root-of-the-server]__1naf7j4._.js +1 -1
  77. package/.next/server/chunks/[root-of-the-server]__1rx5s6r._.js +1 -1
  78. package/.next/server/chunks/_08xo8nu._.js +4 -4
  79. package/.next/server/chunks/ssr/0x0c_next_dist_1icgwks._.js +1 -1
  80. package/.next/server/chunks/ssr/[root-of-the-server]__02c3m72._.js +1 -1
  81. package/.next/server/chunks/ssr/[root-of-the-server]__0g1dtzd._.js +1 -1
  82. package/.next/server/chunks/ssr/[root-of-the-server]__0l4t71c._.js +1 -1
  83. package/.next/server/chunks/ssr/[root-of-the-server]__1jr0qvs._.js +1 -1
  84. package/.next/server/chunks/ssr/_045bvlq._.js +1 -1
  85. package/.next/server/chunks/ssr/_0_02db6._.js +1 -1
  86. package/.next/server/chunks/ssr/_0bxxvzb._.js +1 -1
  87. package/.next/server/chunks/ssr/_0cq6qjs._.js +1 -1
  88. package/.next/server/chunks/ssr/_0htqt7_._.js +3 -3
  89. package/.next/server/chunks/ssr/_0ompurr._.js +2 -2
  90. package/.next/server/chunks/ssr/_0un641_._.js +1 -1
  91. package/.next/server/chunks/ssr/{_14aoqb2._.js → _12pw-ix._.js} +2 -2
  92. package/.next/server/chunks/ssr/_13m9nev._.js +1 -1
  93. package/.next/server/chunks/ssr/_19s4g71._.js +1 -1
  94. package/.next/server/chunks/ssr/_1n6rdd2._.js +1 -1
  95. package/.next/server/chunks/ssr/components_1_8btz1._.js +1 -1
  96. package/.next/server/middleware-build-manifest.js +3 -3
  97. package/.next/server/pages/404.html +2 -2
  98. package/.next/server/pages/500.html +1 -1
  99. package/.next/static/chunks/036zzfotyi252.js +1 -0
  100. package/.next/static/chunks/18thq9ido-jej.js +5 -0
  101. package/.next/static/chunks/{19qbz8dh8aqt6.js → 190rvtbj8tqbw.js} +1 -1
  102. package/.next/static/chunks/1kqzgl2gb6ily.js +1 -0
  103. package/.next/static/chunks/28ek7u5tf44z_.css +1 -0
  104. package/.next/static/chunks/{2jgqio91axkic.js → 2h1anqi3hzijd.js} +1 -1
  105. package/.next/static/chunks/{3dncuj6lhk80h.js → 2pf7wdwyhi6ks.js} +1 -1
  106. package/.next/static/chunks/{278--y-yo6m9v.js → 31od3fbrskb5_.js} +1 -1
  107. package/.next/static/chunks/{1wbaplet994dj.js → 3khzw5hn41lt7.js} +1 -1
  108. package/.next/static/chunks/3o4y8rhawejsr.js +1 -0
  109. package/.next/trace +1 -1
  110. package/.next/trace-build +1 -1
  111. package/package.json +2 -1
  112. package/.next/static/chunks/05xbzyep2vlp0.js +0 -1
  113. package/.next/static/chunks/0icg-e95qmpn-.css +0 -1
  114. package/.next/static/chunks/2-az50vi0iboz.js +0 -5
  115. package/.next/static/chunks/2mi013mf2pu08.js +0 -1
  116. package/.next/static/chunks/2wmat901j6po0.js +0 -1
  117. /package/.next/static/{cTCo8pLtIDkS2Pw1mc2pP → mcfvhXFqrroWY53QPmBih}/_buildManifest.js +0 -0
  118. /package/.next/static/{cTCo8pLtIDkS2Pw1mc2pP → mcfvhXFqrroWY53QPmBih}/_clientMiddlewareManifest.js +0 -0
  119. /package/.next/static/{cTCo8pLtIDkS2Pw1mc2pP → mcfvhXFqrroWY53QPmBih}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55370,e=>{"use strict";var t=e.i(40798),a=e.i(96341),r=e.i(70065),s=e.i(67881),i=e.i(23750);let n=[{id:"gemini",label:"Google Gemini",help:"Create a key at aistudio.google.com/apikey."},{id:"claude",label:"Anthropic Claude",help:"Create a key at console.anthropic.com > API keys."},{id:"openai",label:"OpenAI",help:"Create a key at platform.openai.com/api-keys."}];e.s(["AiKeyForm",0,function(){let[e,o]=(0,a.useState)(n[0].id),[l,d]=(0,a.useState)(""),[c,u]=(0,a.useState)(null),[h,m]=(0,a.useState)({}),[x,p]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1);async function v(t){t.preventDefault(),f(!0),p(null);try{let t=await fetch("/api/setup/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:l})}),a=await t.json();a.saved?(d(""),u(e),m({...h,[e]:!0}),p({ok:!0,text:"Saved. AI suggestions now use this provider. No restart needed."})):p({ok:!1,text:a.error??"Nothing was saved."})}catch{p({ok:!1,text:"Could not reach the dashboard server."})}finally{f(!1)}}(0,a.useEffect)(()=>{fetch("/api/setup/ai").then(e=>e.json()).then(e=>{e.keys&&(m(e.keys),u(e.provider),e.provider&&o(e.provider))}).catch(()=>{})},[]);let b=n.find(t=>t.id===e);return(0,t.jsxs)(r.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl mt-6",children:[(0,t.jsxs)(r.CardHeader,{children:[(0,t.jsx)(r.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"AI suggestions (optional)"}),(0,t.jsx)(r.CardDescription,{className:"text-sm text-gray-400",children:"Add a Gemini, Claude or OpenAI key to get AI insights and recommendations for your pages. Only page names, load times and error counts are sent to the provider you pick. Without a key, the dashboard shows sample suggestions."})]}),(0,t.jsx)(r.CardContent,{children:(0,t.jsxs)("form",{onSubmit:v,className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("label",{htmlFor:"ai-provider",className:"text-sm font-medium text-gray-300",children:"Provider"}),(0,t.jsx)("select",{id:"ai-provider",value:e,onChange:e=>o(e.target.value),className:"h-9 rounded-md border border-[#2d3748] bg-[#0f1419] px-3 text-sm text-gray-200",children:n.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.label,c===e.id?" (in use)":h[e.id]?" (key saved)":""]},e.id))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("label",{htmlFor:"ai-key",className:"text-sm font-medium text-gray-300",children:[b.label," API key ",h[e]&&(0,t.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,t.jsx)(i.Input,{id:"ai-key",type:"password",autoComplete:"off",spellCheck:!1,placeholder:h[e]?"•••••••• (type to replace)":"",value:l,onChange:e=>d(e.target.value),"aria-describedby":"ai-key-help",className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,t.jsx)("p",{id:"ai-key-help",className:"text-xs text-gray-400",children:b.help})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(s.Button,{type:"submit",disabled:g||!l.trim(),children:g?"Checking…":"Check and save"}),(0,t.jsx)("span",{"aria-live":"polite",className:`text-sm ${x?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:x?.text})]})]})})]})}])},4603,e=>{"use strict";var t=e.i(40798),a=e.i(96341),r=e.i(3547),s=e.i(70065),i=e.i(67881),n=e.i(23750),o=e.i(94179),l=e.i(93834);let d=l.TOOL_IDS.flatMap(e=>l.TOOLS[e].keys.required.map(t=>({name:t,tool:e,...l.KEY_FIELDS[t]})));e.s(["SetupForm",0,function(){let[e,c]=(0,a.useState)({}),[u,h]=(0,a.useState)({}),[m,x]=(0,a.useState)({}),[p,g]=(0,a.useState)(null),[f,v]=(0,a.useState)(!1),[b,y]=(0,a.useState)(!1),[k,j]=(0,a.useState)(null),N=(0,a.useRef)(null);async function w(t){t.preventDefault(),v(!0),g(null);try{let t=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json(),r=a.results??{};x(r);let s=d.find(e=>r[e.name]&&!r[e.name].ok);if(s&&setTimeout(()=>N.current?.querySelector(`#${s.name}`)?.focus(),0),a.saved){y(!0),c({});let t=new Set(d.filter(t=>e[t.name]?.trim()).map(e=>e.tool));h(e=>({...e,...Object.fromEntries(d.filter(e=>t.has(e.tool)).map(e=>[e.name,!0]))}));let a=l.TOOL_IDS.filter(e=>t.has(e)||k?.includes(e));j(a),g({ok:!0,text:`Saved. ${a.map(e=>l.TOOLS[e].label).join(" and ")} ${a.length>1?"are":"is"} connected. No restart needed.`})}else g({ok:!1,text:a.error??"Nothing was saved. Fix the fields marked below."})}catch{g({ok:!1,text:"Could not reach the dashboard server."})}finally{v(!1)}}return(0,a.useEffect)(()=>{fetch("/api/setup").then(e=>e.json()).then(e=>{e.keys&&h(e.keys),Array.isArray(e.tools)?j(e.tools):e.error&&g({ok:!1,text:e.error})}).catch(()=>{})},[]),(0,t.jsxs)(s.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl",children:[(0,t.jsxs)(s.CardHeader,{children:[(0,t.jsx)(s.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"Connect your tools"}),(0,t.jsx)(s.CardDescription,{className:"text-sm text-gray-400",children:"Add keys for the tools you use. You only need one. Keys are checked once, saved to .env.local in this folder, and never shown again."})]}),(0,t.jsx)(s.CardContent,{children:(0,t.jsxs)("form",{ref:N,onSubmit:w,className:"flex flex-col gap-5",children:[l.TOOL_IDS.map(a=>(0,t.jsxs)("fieldset",{id:a,className:"flex flex-col gap-5 rounded-lg border border-[#2d3748] p-4",children:[(0,t.jsxs)("legend",{className:"flex items-center gap-2 px-2 text-sm font-semibold text-white",children:[l.TOOLS[a].label,k?.includes(a)?(0,t.jsx)(o.Badge,{variant:"outline",className:"border-[#3ee0a1] text-[#3ee0a1] bg-[#3ee0a1]/10",children:"✓ Connected"}):(0,t.jsx)(o.Badge,{variant:"outline",className:"border-[#4a5568] text-gray-400",children:"Optional"})]}),d.filter(e=>e.tool===a).map(a=>{let r=m[a.name];return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("label",{htmlFor:a.name,className:"text-sm font-medium text-gray-300",children:[a.label," ",u[a.name]&&(0,t.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,t.jsx)(n.Input,{id:a.name,name:a.name,type:a.secret?"password":"text",autoComplete:"off",spellCheck:!1,placeholder:u[a.name]?"•••••••• (leave blank to keep, type to replace)":"",value:e[a.name]??"",onChange:t=>c({...e,[a.name]:t.target.value}),"aria-invalid":!!r&&!r.ok||void 0,"aria-describedby":`${a.name}-help ${a.name}-result`,className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,t.jsx)("p",{id:`${a.name}-help`,className:"text-xs text-gray-400",children:a.help}),(0,t.jsxs)("div",{id:`${a.name}-result`,"aria-live":"polite",children:[r&&!r.ok&&(0,t.jsxs)("p",{className:"text-xs text-[#f87171]",children:["✗ ",r.error]}),r?.ok&&(0,t.jsx)("p",{className:"text-xs text-[#3ee0a1]",children:"✓ Checked"}),r?.notice&&(0,t.jsx)("p",{className:"text-xs text-[#fbbf24]",children:r.notice})]})]},a.name)}),l.TOOLS[a].setupNote&&(0,t.jsx)("p",{className:"text-xs text-gray-400",children:l.TOOLS[a].setupNote})]},a)),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(i.Button,{type:"submit",disabled:f||!d.some(t=>e[t.name]?.trim()),children:f?"Checking…":"Check and save"}),(0,t.jsx)("span",{"aria-live":"polite",className:`text-sm ${p?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:p?.text}),!d.some(t=>e[t.name]?.trim())&&!p&&!b&&(0,t.jsx)("span",{className:"text-sm text-gray-400",children:k?.length?"Type a new key to change what is saved.":"Fill in both fields for at least one tool."}),b&&(0,t.jsx)(r.default,{href:"/connect",className:(0,i.buttonVariants)({variant:"outline"}),children:"Next: connect your app"})]})]})})]})}])},94179,e=>{"use strict";var t=e.i(46987),a=e.i(10063),r=e.i(94237),s=e.i(28603);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",render:n,...o}){return(0,a.useRender)({defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(i({variant:r}),e)},o),render:n,state:{slot:"badge",variant:r}})}])},70065,e=>{"use strict";var t=e.i(40798),a=e.i(28603);e.s(["Card",0,function({className:e,size:r="default",...s}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},91153,e=>{"use strict";var t=e.i(96341);let a=(...e)=>e.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim(),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},s=(0,t.createContext)({}),i=(0,t.forwardRef)(({color:e,size:i,width:n,height:o,strokeWidth:l,absoluteStrokeWidth:d,nonScalingStroke:c,className:u="",children:h,iconNode:m=[],icon:x={node:m,aliases:[],size:24},...p},g)=>{let{size:f=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:k="currentColor",className:j=""}=(0,t.useContext)(s)??{},N=!!h||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(p),[w,C,S=[]]=function(e,t={}){return function(e,t={}){let s=t.attributeNames??{},i=e=>s[e]??e,n=e.size??e.width??r.width,o=e.size??e.height??r.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],c=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?a(...c):a("lucide",...d,...c),h=t.absoluteStrokeWidth?Number(t.strokeWidth??r["stroke-width"])*Number(e.size??e.width??r.width)/Number(t.size??t.width??r.width):t.strokeWidth??r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,[t,a])=>(e[i(t)]=a,e),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&null!=t.size&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&null!=t.width&&{[i("width")]:t.width},..."height"in t&&null!=t.height&&{[i("height")]:t.height},[i("stroke-width")]:h,...u&&{[i("class")]:u},[i("viewBox")]:`0 0 ${n} ${o}`,...!1===t.hasA11yProp?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[a,r,s]=e,n=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...r}:r;return s?[a,n,s]:[a,n]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(x,{color:e??k,width:n??i??f,height:o??i??f,strokeWidth:l??v,absoluteStrokeWidth:d??b,nonScalingStroke:c??y,className:a(j,u),hasA11yProp:N,attributes:p});return(0,t.createElement)(w,{ref:g,...C},[...S.map(([e,a])=>(0,t.createElement)(e,a)),...Array.isArray(h)?h:[h]])});e.s(["default",0,i],91153)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55370,e=>{"use strict";var t=e.i(40798),a=e.i(96341),r=e.i(70065),s=e.i(67881),i=e.i(23750);let n=[{id:"gemini",label:"Google Gemini",help:"Create a key at aistudio.google.com/apikey."},{id:"claude",label:"Anthropic Claude",help:"Create a key at console.anthropic.com > API keys."},{id:"openai",label:"OpenAI",help:"Create a key at platform.openai.com/api-keys."}];e.s(["AiKeyForm",0,function(){let[e,o]=(0,a.useState)(n[0].id),[l,d]=(0,a.useState)(""),[c,u]=(0,a.useState)(null),[h,m]=(0,a.useState)({}),[x,p]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1);async function v(t){t.preventDefault(),f(!0),p(null);try{let t=await fetch("/api/setup/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:l})}),a=await t.json();a.saved?(d(""),u(e),m({...h,[e]:!0}),p({ok:!0,text:"Saved. AI suggestions now use this provider. No restart needed."})):p({ok:!1,text:a.error??"Nothing was saved."})}catch{p({ok:!1,text:"Could not reach the dashboard server."})}finally{f(!1)}}(0,a.useEffect)(()=>{fetch("/api/setup/ai").then(e=>e.json()).then(e=>{e.keys&&(m(e.keys),u(e.provider),e.provider&&o(e.provider))}).catch(()=>{})},[]);let b=n.find(t=>t.id===e);return(0,t.jsxs)(r.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl mt-6",children:[(0,t.jsxs)(r.CardHeader,{children:[(0,t.jsx)(r.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"AI suggestions (optional)"}),(0,t.jsx)(r.CardDescription,{className:"text-sm text-gray-400",children:"Add a Gemini, Claude or OpenAI key to get AI insights and recommendations for your pages. Only page names, load times and error counts are sent to the provider you pick. Without a key, the dashboard shows sample suggestions."})]}),(0,t.jsx)(r.CardContent,{children:(0,t.jsxs)("form",{onSubmit:v,className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("label",{htmlFor:"ai-provider",className:"text-sm font-medium text-gray-300",children:"Provider"}),(0,t.jsx)("select",{id:"ai-provider",value:e,onChange:e=>o(e.target.value),className:"h-9 rounded-md border border-[#2d3748] bg-[#0f1419] px-3 text-sm text-gray-200",children:n.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.label,c===e.id?" (in use)":h[e.id]?" (key saved)":""]},e.id))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("label",{htmlFor:"ai-key",className:"text-sm font-medium text-gray-300",children:[b.label," API key ",h[e]&&(0,t.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,t.jsx)(i.Input,{id:"ai-key",type:"password",autoComplete:"off",spellCheck:!1,placeholder:h[e]?"•••••••• (type to replace)":"",value:l,onChange:e=>d(e.target.value),"aria-describedby":"ai-key-help",className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,t.jsx)("p",{id:"ai-key-help",className:"text-xs text-gray-400",children:b.help})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(s.Button,{type:"submit",disabled:g||!l.trim(),children:g?"Checking…":"Check and save"}),(0,t.jsx)("span",{"aria-live":"polite",className:`text-sm ${x?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:x?.text})]})]})})]})}])},4603,e=>{"use strict";var t=e.i(40798),a=e.i(96341),r=e.i(3547),s=e.i(70065),i=e.i(67881),n=e.i(23750),o=e.i(94179),l=e.i(93834);let d=l.TOOL_IDS.flatMap(e=>l.TOOLS[e].keys.required.map(t=>({name:t,tool:e,...l.KEY_FIELDS[t]})));e.s(["SetupForm",0,function(){let[e,c]=(0,a.useState)({}),[u,h]=(0,a.useState)({}),[m,x]=(0,a.useState)({}),[p,g]=(0,a.useState)(null),[f,v]=(0,a.useState)(!1),[b,y]=(0,a.useState)(!1),[k,j]=(0,a.useState)(null),N=(0,a.useRef)(null);async function w(t){t.preventDefault(),v(!0),g(null);try{let t=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json(),r=a.results??{};x(r);let s=d.find(e=>r[e.name]&&!r[e.name].ok);if(s&&setTimeout(()=>N.current?.querySelector(`#${s.name}`)?.focus(),0),a.saved){y(!0),c({});let t=new Set(d.filter(t=>e[t.name]?.trim()).map(e=>e.tool));h(e=>({...e,...Object.fromEntries(d.filter(e=>t.has(e.tool)).map(e=>[e.name,!0]))}));let a=l.TOOL_IDS.filter(e=>t.has(e)||k?.includes(e));j(a),g({ok:!0,text:`Saved. ${a.map(e=>l.TOOLS[e].label).join(" and ")} ${a.length>1?"are":"is"} connected. No restart needed.`})}else g({ok:!1,text:a.error??"Nothing was saved. Fix the fields marked below."})}catch{g({ok:!1,text:"Could not reach the dashboard server."})}finally{v(!1)}}return(0,a.useEffect)(()=>{fetch("/api/setup").then(e=>e.json()).then(e=>{e.keys&&h(e.keys),Array.isArray(e.tools)?j(e.tools):e.error&&g({ok:!1,text:e.error})}).catch(()=>{})},[]),(0,t.jsxs)(s.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl",children:[(0,t.jsxs)(s.CardHeader,{children:[(0,t.jsx)(s.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"Connect your tools"}),(0,t.jsx)(s.CardDescription,{className:"text-sm text-gray-400",children:"Add keys for the tools you use. You only need one. Keys are checked once, saved to .env.local in this folder, and never shown again."})]}),(0,t.jsx)(s.CardContent,{children:(0,t.jsxs)("form",{ref:N,onSubmit:w,className:"flex flex-col gap-5",children:[l.TOOL_IDS.map(a=>(0,t.jsxs)("fieldset",{id:a,className:"flex flex-col gap-5 rounded-lg border border-[#2d3748] p-4",children:[(0,t.jsxs)("legend",{className:"flex items-center gap-2 px-2 text-sm font-semibold text-white",children:[l.TOOLS[a].label,k?.includes(a)?(0,t.jsx)(o.Badge,{variant:"outline",className:"border-[#3ee0a1] text-[#3ee0a1] bg-[#3ee0a1]/10",children:"✓ Connected"}):(0,t.jsx)(o.Badge,{variant:"outline",className:"border-[#4a5568] text-gray-400",children:"Optional"})]}),d.filter(e=>e.tool===a).map(a=>{let r=m[a.name];return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("label",{htmlFor:a.name,className:"text-sm font-medium text-gray-300",children:[a.label," ",u[a.name]&&(0,t.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,t.jsx)(n.Input,{id:a.name,name:a.name,type:a.secret?"password":"text",autoComplete:"off",spellCheck:!1,placeholder:u[a.name]?"•••••••• (leave blank to keep, type to replace)":"",value:e[a.name]??"",onChange:t=>c({...e,[a.name]:t.target.value}),"aria-invalid":!!r&&!r.ok||void 0,"aria-describedby":`${a.name}-help ${a.name}-result`,className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,t.jsx)("p",{id:`${a.name}-help`,className:"text-xs text-gray-400",children:a.help}),(0,t.jsxs)("div",{id:`${a.name}-result`,"aria-live":"polite",children:[r&&!r.ok&&(0,t.jsxs)("p",{className:"text-xs text-[#f87171]",children:["✗ ",r.error]}),r?.ok&&(0,t.jsx)("p",{className:"text-xs text-[#3ee0a1]",children:"✓ Checked"}),r?.notice&&(0,t.jsx)("p",{className:"text-xs text-[#fbbf24]",children:r.notice})]})]},a.name)}),l.TOOLS[a].setupNote&&(0,t.jsx)("p",{className:"text-xs text-gray-400",children:l.TOOLS[a].setupNote})]},a)),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(i.Button,{type:"submit",disabled:f||!d.some(t=>e[t.name]?.trim()),children:f?"Checking…":"Check and save"}),(0,t.jsx)("span",{"aria-live":"polite",className:`text-sm ${p?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:p?.text}),!d.some(t=>e[t.name]?.trim())&&!p&&!b&&(0,t.jsx)("span",{className:"text-sm text-gray-400",children:k?.length?"Type a new key to change what is saved.":"Fill in both fields for at least one tool."}),b&&(0,t.jsx)(r.default,{href:"/connect",className:(0,i.buttonVariants)({variant:"outline"}),children:"Next: connect your app"})]})]})})]})}])},94179,e=>{"use strict";var t=e.i(46987),a=e.i(10063),r=e.i(94237),s=e.i(28603);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",render:n,...o}){return(0,a.useRender)({defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(i({variant:r}),e)},o),render:n,state:{slot:"badge",variant:r}})}])},70065,e=>{"use strict";var t=e.i(40798),a=e.i(28603);e.s(["Card",0,function({className:e,size:r="default",...s}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("title-enter font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},91153,e=>{"use strict";var t=e.i(96341);let a=(...e)=>e.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim(),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},s=(0,t.createContext)({}),i=(0,t.forwardRef)(({color:e,size:i,width:n,height:o,strokeWidth:l,absoluteStrokeWidth:d,nonScalingStroke:c,className:u="",children:h,iconNode:m=[],icon:x={node:m,aliases:[],size:24},...p},g)=>{let{size:f=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:k="currentColor",className:j=""}=(0,t.useContext)(s)??{},N=!!h||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(p),[w,C,S=[]]=function(e,t={}){return function(e,t={}){let s=t.attributeNames??{},i=e=>s[e]??e,n=e.size??e.width??r.width,o=e.size??e.height??r.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],c=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?a(...c):a("lucide",...d,...c),h=t.absoluteStrokeWidth?Number(t.strokeWidth??r["stroke-width"])*Number(e.size??e.width??r.width)/Number(t.size??t.width??r.width):t.strokeWidth??r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,[t,a])=>(e[i(t)]=a,e),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&null!=t.size&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&null!=t.width&&{[i("width")]:t.width},..."height"in t&&null!=t.height&&{[i("height")]:t.height},[i("stroke-width")]:h,...u&&{[i("class")]:u},[i("viewBox")]:`0 0 ${n} ${o}`,...!1===t.hasA11yProp?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[a,r,s]=e,n=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...r}:r;return s?[a,n,s]:[a,n]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(x,{color:e??k,width:n??i??f,height:o??i??f,strokeWidth:l??v,absoluteStrokeWidth:d??b,nonScalingStroke:c??y,className:a(j,u),hasA11yProp:N,attributes:p});return(0,t.createElement)(w,{ref:g,...C},[...S.map(([e,a])=>(0,t.createElement)(e,a)),...Array.isArray(h)?h:[h]])});e.s(["default",0,i],91153)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24851,e=>{"use strict";var t=e.i(40798),r=e.i(3547),i=e.i(70065),a=e.i(67881);e.s(["EmptyState",0,function({title:e="No data yet",reason:s="Keys work, but no page events have arrived.",href:n="/connect",cta:o="Send your first events",onRetry:d}){return(0,t.jsx)(i.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:(0,t.jsxs)(i.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-white",children:e}),(0,t.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:s}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.default,{href:n,className:(0,a.buttonVariants)(),children:o}),d&&(0,t.jsx)(a.Button,{variant:"outline",onClick:d,children:"Retry"})]})]})})}])},94179,e=>{"use strict";var t=e.i(46987),r=e.i(10063),i=e.i(94237),a=e.i(28603);let s=(0,i.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:i="default",render:n,...o}){return(0,r.useRender)({defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(s({variant:i}),e)},o),render:n,state:{slot:"badge",variant:i}})}])},70065,e=>{"use strict";var t=e.i(40798),r=e.i(28603);e.s(["Card",0,function({className:e,size:i="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":i,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardContent",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...i})},"CardDescription",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...i})},"CardHeader",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...i})},"CardTitle",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...i})}])},91153,e=>{"use strict";var t=e.i(96341);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},a=(0,t.createContext)({}),s=(0,t.forwardRef)(({color:e,size:s,width:n,height:o,strokeWidth:d,absoluteStrokeWidth:c,nonScalingStroke:l,className:u="",children:h,iconNode:g=[],icon:f={node:g,aliases:[],size:24},...m},p)=>{let{size:v=24,strokeWidth:x=2,absoluteStrokeWidth:b=!1,nonScalingStroke:k=!1,color:w="currentColor",className:y=""}=(0,t.useContext)(a)??{},N=!!h||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[z,j,C=[]]=function(e,t={}){return function(e,t={}){let a=t.attributeNames??{},s=e=>a[e]??e,n=e.size??e.width??i.width,o=e.size??e.height??i.height,d=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...d],l=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?r(...l):r("lucide",...c,...l),h=t.absoluteStrokeWidth?Number(t.strokeWidth??i["stroke-width"])*Number(e.size??e.width??i.width)/Number(t.size??t.width??i.width):t.strokeWidth??i["stroke-width"];return["svg",{...Object.entries(i).reduce((e,[t,r])=>(e[s(t)]=r,e),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&null!=t.size&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&null!=t.width&&{[s("width")]:t.width},..."height"in t&&null!=t.height&&{[s("height")]:t.height},[s("stroke-width")]:h,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${n} ${o}`,...!1===t.hasA11yProp?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,i,a]=e,n=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...i}:i;return a?[r,n,a]:[r,n]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(f,{color:e??w,width:n??s??v,height:o??s??v,strokeWidth:d??x,absoluteStrokeWidth:c??b,nonScalingStroke:l??k,className:r(y,u),hasA11yProp:N,attributes:m});return(0,t.createElement)(z,{ref:p,...j},[...C.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(h)?h:[h]])});e.s(["default",0,s],91153)},62677,e=>{"use strict";var t=e.i(69948);let r={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};r.node;let i=(0,t.default)(r);e.s(["default",0,i])},71255,e=>{"use strict";var t=e.i(69948);let r={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};r.node;let i=(0,t.default)(r);e.s(["Zap",0,i],71255)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24851,e=>{"use strict";var t=e.i(40798),r=e.i(3547),i=e.i(70065),a=e.i(67881);e.s(["EmptyState",0,function({title:e="No data yet",reason:s="Keys work, but no page events have arrived.",href:n="/connect",cta:o="Send your first events",onRetry:d}){return(0,t.jsx)(i.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:(0,t.jsxs)(i.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-white",children:e}),(0,t.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:s}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.default,{href:n,className:(0,a.buttonVariants)(),children:o}),d&&(0,t.jsx)(a.Button,{variant:"outline",onClick:d,children:"Retry"})]})]})})}])},94179,e=>{"use strict";var t=e.i(46987),r=e.i(10063),i=e.i(94237),a=e.i(28603);let s=(0,i.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:i="default",render:n,...o}){return(0,r.useRender)({defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(s({variant:i}),e)},o),render:n,state:{slot:"badge",variant:i}})}])},70065,e=>{"use strict";var t=e.i(40798),r=e.i(28603);e.s(["Card",0,function({className:e,size:i="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":i,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardContent",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...i})},"CardDescription",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...i})},"CardHeader",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...i})},"CardTitle",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("title-enter font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...i})}])},91153,e=>{"use strict";var t=e.i(96341);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},a=(0,t.createContext)({}),s=(0,t.forwardRef)(({color:e,size:s,width:n,height:o,strokeWidth:d,absoluteStrokeWidth:c,nonScalingStroke:l,className:u="",children:h,iconNode:g=[],icon:f={node:g,aliases:[],size:24},...m},p)=>{let{size:v=24,strokeWidth:x=2,absoluteStrokeWidth:b=!1,nonScalingStroke:k=!1,color:w="currentColor",className:y=""}=(0,t.useContext)(a)??{},N=!!h||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[z,j,C=[]]=function(e,t={}){return function(e,t={}){let a=t.attributeNames??{},s=e=>a[e]??e,n=e.size??e.width??i.width,o=e.size??e.height??i.height,d=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...d],l=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?r(...l):r("lucide",...c,...l),h=t.absoluteStrokeWidth?Number(t.strokeWidth??i["stroke-width"])*Number(e.size??e.width??i.width)/Number(t.size??t.width??i.width):t.strokeWidth??i["stroke-width"];return["svg",{...Object.entries(i).reduce((e,[t,r])=>(e[s(t)]=r,e),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&null!=t.size&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&null!=t.width&&{[s("width")]:t.width},..."height"in t&&null!=t.height&&{[s("height")]:t.height},[s("stroke-width")]:h,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${n} ${o}`,...!1===t.hasA11yProp?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,i,a]=e,n=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...i}:i;return a?[r,n,a]:[r,n]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(f,{color:e??w,width:n??s??v,height:o??s??v,strokeWidth:d??x,absoluteStrokeWidth:c??b,nonScalingStroke:l??k,className:r(y,u),hasA11yProp:N,attributes:m});return(0,t.createElement)(z,{ref:p,...j},[...C.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(h)?h:[h]])});e.s(["default",0,s],91153)},62677,e=>{"use strict";var t=e.i(69948);let r={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};r.node;let i=(0,t.default)(r);e.s(["default",0,i])},71255,e=>{"use strict";var t=e.i(69948);let r={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};r.node;let i=(0,t.default)(r);e.s(["Zap",0,i],71255)}]);
@@ -8,4 +8,4 @@ import { init } from '@karan171996/metricflow/browser';
8
8
 
9
9
  init({
10
10
  ${i.join("\n")}
11
- });`}({tools:e?.tools,accountId:e?.accountId,applicationId:e?.setup?.applicationId,browserKey:e?.setup?.browserKey,region:e?.region,dsn:e?.dsn})}),v&&(0,t.jsx)(d,{n:2,title:"2. Send your own numbers (optional)",help:"Record a custom event from anywhere in your site after init. New Relic only.",code:l}),(0,t.jsx)(a.Card,{className:c,children:(0,t.jsxs)(a.CardHeader,{children:[(0,t.jsxs)(a.CardTitle,{className:"text-base font-bold text-white",children:[I,". Verify"]}),(0,t.jsx)(a.CardDescription,{className:"text-sm text-gray-400",children:v?(0,t.jsx)(t.Fragment,{children:'Reload your site, then watch "Events received" above turn green. Use Send test event to check the custom-event path.'}):(0,t.jsx)(t.Fragment,{children:'Cause an error on your site, then watch "Sentry errors" above turn green.'})})]})})]})}],29821)},70065,e=>{"use strict";var t=e.i(40798),s=e.i(28603);e.s(["Card",0,function({className:e,size:r="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,s.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},91153,e=>{"use strict";var t=e.i(96341);let s=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim(),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},a=(0,t.createContext)({}),n=(0,t.forwardRef)(({color:e,size:n,width:i,height:o,strokeWidth:l,absoluteStrokeWidth:c,nonScalingStroke:d,className:h="",children:u,iconNode:x=[],icon:p={node:x,aliases:[],size:24},...m},y)=>{let{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,nonScalingStroke:w=!1,color:N="currentColor",className:j=""}=(0,t.useContext)(a)??{},k=!!u||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[C,v,S=[]]=function(e,t={}){return function(e,t={}){let a=t.attributeNames??{},n=e=>a[e]??e,i=e.size??e.width??r.width,o=e.size??e.height??r.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...l],d=t.className?.split(" ").filter(Boolean)??[],h=!1===t.includeDefaultClasses?s(...d):s("lucide",...c,...d),u=t.absoluteStrokeWidth?Number(t.strokeWidth??r["stroke-width"])*Number(e.size??e.width??r.width)/Number(t.size??t.width??r.width):t.strokeWidth??r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,[t,s])=>(e[n(t)]=s,e),{}),..."color"in t&&t.color&&{[n("stroke")]:t.color},..."size"in t&&null!=t.size&&{[n("width")]:t.size,[n("height")]:t.size},..."width"in t&&null!=t.width&&{[n("width")]:t.width},..."height"in t&&null!=t.height&&{[n("height")]:t.height},[n("stroke-width")]:u,...h&&{[n("class")]:h},[n("viewBox")]:`0 0 ${i} ${o}`,...!1===t.hasA11yProp?{[n("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[s,r,a]=e,i=t.nonScalingStroke?{[n("vector-effect")]:"non-scaling-stroke",...r}:r;return a?[s,i,a]:[s,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(p,{color:e??N,width:i??n??f,height:o??n??f,strokeWidth:l??g,absoluteStrokeWidth:c??b,nonScalingStroke:d??w,className:s(j,h),hasA11yProp:k,attributes:m});return(0,t.createElement)(C,{ref:y,...v},[...S.map(([e,s])=>(0,t.createElement)(e,s)),...Array.isArray(u)?u:[u]])});e.s(["default",0,n],91153)}]);
11
+ });`}({tools:e?.tools,accountId:e?.accountId,applicationId:e?.setup?.applicationId,browserKey:e?.setup?.browserKey,region:e?.region,dsn:e?.dsn})}),v&&(0,t.jsx)(d,{n:2,title:"2. Send your own numbers (optional)",help:"Record a custom event from anywhere in your site after init. New Relic only.",code:l}),(0,t.jsx)(a.Card,{className:c,children:(0,t.jsxs)(a.CardHeader,{children:[(0,t.jsxs)(a.CardTitle,{className:"text-base font-bold text-white",children:[I,". Verify"]}),(0,t.jsx)(a.CardDescription,{className:"text-sm text-gray-400",children:v?(0,t.jsx)(t.Fragment,{children:'Reload your site, then watch "Events received" above turn green. Use Send test event to check the custom-event path.'}):(0,t.jsx)(t.Fragment,{children:'Cause an error on your site, then watch "Sentry errors" above turn green.'})})]})})]})}],29821)},70065,e=>{"use strict";var t=e.i(40798),s=e.i(28603);e.s(["Card",0,function({className:e,size:r="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,s.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("title-enter font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},91153,e=>{"use strict";var t=e.i(96341);let s=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim(),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},a=(0,t.createContext)({}),n=(0,t.forwardRef)(({color:e,size:n,width:i,height:o,strokeWidth:l,absoluteStrokeWidth:c,nonScalingStroke:d,className:h="",children:u,iconNode:x=[],icon:p={node:x,aliases:[],size:24},...m},y)=>{let{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,nonScalingStroke:w=!1,color:N="currentColor",className:j=""}=(0,t.useContext)(a)??{},k=!!u||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[C,v,S=[]]=function(e,t={}){return function(e,t={}){let a=t.attributeNames??{},n=e=>a[e]??e,i=e.size??e.width??r.width,o=e.size??e.height??r.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...l],d=t.className?.split(" ").filter(Boolean)??[],h=!1===t.includeDefaultClasses?s(...d):s("lucide",...c,...d),u=t.absoluteStrokeWidth?Number(t.strokeWidth??r["stroke-width"])*Number(e.size??e.width??r.width)/Number(t.size??t.width??r.width):t.strokeWidth??r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,[t,s])=>(e[n(t)]=s,e),{}),..."color"in t&&t.color&&{[n("stroke")]:t.color},..."size"in t&&null!=t.size&&{[n("width")]:t.size,[n("height")]:t.size},..."width"in t&&null!=t.width&&{[n("width")]:t.width},..."height"in t&&null!=t.height&&{[n("height")]:t.height},[n("stroke-width")]:u,...h&&{[n("class")]:h},[n("viewBox")]:`0 0 ${i} ${o}`,...!1===t.hasA11yProp?{[n("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[s,r,a]=e,i=t.nonScalingStroke?{[n("vector-effect")]:"non-scaling-stroke",...r}:r;return a?[s,i,a]:[s,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(p,{color:e??N,width:i??n??f,height:o??n??f,strokeWidth:l??g,absoluteStrokeWidth:c??b,nonScalingStroke:d??w,className:s(j,h),hasA11yProp:k,attributes:m});return(0,t.createElement)(C,{ref:y,...v},[...S.map(([e,s])=>(0,t.createElement)(e,s)),...Array.isArray(u)?u:[u]])});e.s(["default",0,n],91153)}]);