@karan171996/metricflow 0.2.2 → 0.4.0
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/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +6 -6
- 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.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 +9 -9
- package/.next/server/app/_not-found.segments/_full.segment.rsc +9 -9
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- 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/settings/route.js.nft.json +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 +4 -2
- package/.next/server/app/connect.rsc +11 -11
- package/.next/server/app/connect.segments/_full.segment.rsc +11 -11
- package/.next/server/app/connect.segments/_index.segment.rsc +8 -8
- package/.next/server/app/connect.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +11 -11
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +11 -11
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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.js.nft.json +1 -1
- package/.next/server/app/performance/[slug]/page_client-reference-manifest.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 +12 -12
- package/.next/server/app/performance.segments/_full.segment.rsc +12 -12
- package/.next/server/app/performance.segments/_index.segment.rsc +8 -8
- package/.next/server/app/performance.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +7 -7
- 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/settings.html +2 -2
- package/.next/server/app/settings.rsc +27 -28
- package/.next/server/app/settings.segments/_full.segment.rsc +27 -28
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +29 -30
- 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 +12 -12
- package/.next/server/app/setup.segments/_full.segment.rsc +12 -12
- package/.next/server/app/setup.segments/_index.segment.rsc +8 -8
- package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +7 -7
- 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/chunks/[root-of-the-server]__0fkj1-q._.js +1 -1
- package/.next/server/chunks/_1l9d64o._.js +4 -1
- package/.next/server/chunks/ssr/_02_o-ya._.js +2 -2
- package/.next/server/chunks/ssr/_0initzv._.js +151 -0
- package/.next/server/chunks/ssr/{_1idvrlk._.js → _0q0a6th._.js} +2 -2
- package/.next/server/chunks/ssr/{_1qy3_r5._.js → _1bk0z6l._.js} +2 -2
- package/.next/server/chunks/ssr/_1t7ag6f._.js +1 -1
- package/.next/server/chunks/ssr/_1tpe22e._.js +22 -20
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{06qwhmc60u5rw.js → 0cpw50mf8n-fl.js} +2 -2
- package/.next/static/chunks/0lyc9tdvuc1n0.js +4 -0
- package/.next/static/chunks/3gx5w553rdjfv.js +1 -0
- package/.next/static/chunks/3k7zn53z9c7_r.css +1 -0
- package/.next/static/chunks/{2rz3rt3tdd_p4.js → 3ptt1nvmavhqg.js} +1 -1
- package/.next/static/chunks/3s-0xgj-1d8cp.js +64 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/bin/cli.mjs +29 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/_09540a5._.js +0 -151
- package/.next/static/chunks/0jdi9z-36r704.js +0 -62
- package/.next/static/chunks/1-4lacz2t2rmw.js +0 -4
- package/.next/static/chunks/21u8jjtcbrv86.css +0 -1
- package/.next/static/chunks/23d4pgenwzdj5.js +0 -1
- /package/.next/static/{CmDtpnmDTN7yCAeLoO8pb → wxoN5sme_nnxf8fLQMX1S}/_buildManifest.js +0 -0
- /package/.next/static/{CmDtpnmDTN7yCAeLoO8pb → wxoN5sme_nnxf8fLQMX1S}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{CmDtpnmDTN7yCAeLoO8pb → wxoN5sme_nnxf8fLQMX1S}/_ssgManifest.js +0 -0
|
@@ -2,6 +2,6 @@ module.exports=[92994,a=>{"use strict";var b=a.i(47350),c=a.i(56561),d=a.i(3130)
|
|
|
2
2
|
${"Healthy"===a.status?"border-[#3ee0a1] text-[#3ee0a1] bg-[#3ee0a1]/10":""}
|
|
3
3
|
${"Warning"===a.status?"border-[#f59e0b] text-[#f59e0b] bg-[#f59e0b]/10":""}
|
|
4
4
|
${"Critical"===a.status?"border-[#ef4444] text-[#ef4444] bg-[#ef4444]/10":""}
|
|
5
|
-
`,children:a.status}):(0,b.jsx)(f.Badge,{variant:"outline",className:"border-[#4a5568] text-gray-400",children:"No data yet"})})]},a.slug)})})]})})})]})}])},48097,a=>{"use strict";var b=a.i(47350),c=a.i(92994),d=a.i(50463),e=a.i(62191),f=a.i(77083),g=a.i(28185);a.s(["PerformanceHub",0,function(){let{state:a,retry:h}=(0,e.useMetrics)();return"loading"===a.status?(0,b.jsx)(d.Skeleton,{className:"mt-6 h-64 w-full bg-[#2d3748]"}):"error"===a.status?(0,b.jsx)(c.EmptyState,{title:"Could not load metrics",reason:a.message,onRetry:h}):a.configured?a.pages.length&&a.pages.some(e.hasData)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.HubMetrics,{pages:a.pages}),(0,b.jsx)(g.HubTable,{pages:a.pages})]}):(0,b.jsx)(c.EmptyState,{}):(0,b.jsx)(c.EmptyState,{title:"Connect your data",reason:"Add your New Relic and Sentry keys to see real numbers.",href:"/setup",cta:"Set up keys"})}])},54161,a=>{"use strict";var b=a.i(18915),c=a.i(68228),d=a.i(42261),e=a.i(85198);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){return(0,c.useRender)({defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},88237,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",a),...d})}])},88595,a=>{"use strict";var b=a.i(98485);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.default)(c);a.s(["Clock",0,d],88595)},
|
|
5
|
+
`,children:a.status}):(0,b.jsx)(f.Badge,{variant:"outline",className:"border-[#4a5568] text-gray-400",children:"No data yet"})})]},a.slug)})})]})})})]})}])},48097,a=>{"use strict";var b=a.i(47350),c=a.i(92994),d=a.i(50463),e=a.i(62191),f=a.i(77083),g=a.i(28185);a.s(["PerformanceHub",0,function(){let{state:a,retry:h}=(0,e.useMetrics)();return"loading"===a.status?(0,b.jsx)(d.Skeleton,{className:"mt-6 h-64 w-full bg-[#2d3748]"}):"error"===a.status?(0,b.jsx)(c.EmptyState,{title:"Could not load metrics",reason:a.message,onRetry:h}):a.configured?a.pages.length&&a.pages.some(e.hasData)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.HubMetrics,{pages:a.pages}),(0,b.jsx)(g.HubTable,{pages:a.pages})]}):(0,b.jsx)(c.EmptyState,{}):(0,b.jsx)(c.EmptyState,{title:"Connect your data",reason:"Add your New Relic and Sentry keys to see real numbers.",href:"/setup",cta:"Set up keys"})}])},54161,a=>{"use strict";var b=a.i(18915),c=a.i(68228),d=a.i(42261),e=a.i(85198);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){return(0,c.useRender)({defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},88237,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",a),...d})}])},88595,a=>{"use strict";var b=a.i(98485);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.default)(c);a.s(["Clock",0,d],88595)},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=_0q0a6th._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[92994,a=>{"use strict";var b=a.i(47350),c=a.i(56561),d=a.i(3130),e=a.i(40695);a.s(["EmptyState",0,function({title:a="No data yet",reason:f="Keys work, but no page events have arrived.",href:g="/connect",cta:h="Send your first events",onRetry:i}){return(0,b.jsx)(d.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:(0,b.jsxs)(d.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:a}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:f}),(0,b.jsxs)("div",{className:"flex gap-3",children:[(0,b.jsx)(c.default,{href:g,className:(0,e.buttonVariants)(),children:h}),i&&(0,b.jsx)(e.Button,{variant:"outline",onClick:i,children:"Retry"})]})]})})}])},54161,a=>{"use strict";var b=a.i(18915),c=a.i(68228),d=a.i(42261),e=a.i(85198);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){return(0,c.useRender)({defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},13485,a=>{"use strict";var b=a.i(98485);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["default",0,d])},
|
|
1
|
+
module.exports=[92994,a=>{"use strict";var b=a.i(47350),c=a.i(56561),d=a.i(3130),e=a.i(40695);a.s(["EmptyState",0,function({title:a="No data yet",reason:f="Keys work, but no page events have arrived.",href:g="/connect",cta:h="Send your first events",onRetry:i}){return(0,b.jsx)(d.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:(0,b.jsxs)(d.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:a}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:f}),(0,b.jsxs)("div",{className:"flex gap-3",children:[(0,b.jsx)(c.default,{href:g,className:(0,e.buttonVariants)(),children:h}),i&&(0,b.jsx)(e.Button,{variant:"outline",onClick:i,children:"Retry"})]})]})})}])},54161,a=>{"use strict";var b=a.i(18915),c=a.i(68228),d=a.i(42261),e=a.i(85198);let f=(0,d.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"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){return(0,c.useRender)({defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},13485,a=>{"use strict";var b=a.i(98485);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["default",0,d])},93341,a=>{"use strict";var b=a.i(98485);let c={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"}]]};c.node;let d=(0,b.default)(c);a.s(["Zap",0,d],93341)},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_1bk0z6l._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[40602,a=>{"use strict";a.s(["ExportSettings",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ExportSettings() from the server but ExportSettings is 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]/components/Settings/ExportSettings.tsx","ExportSettings")},61057,a=>{"use strict";var b=a.i(40602);a.n(b)},46280,a=>{"use strict";a.s(["NotificationPrefs",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call NotificationPrefs() from the server but NotificationPrefs is 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]/components/Settings/NotificationPrefs.tsx","NotificationPrefs")},62807,a=>{"use strict";var b=a.i(46280);a.n(b)},44063,a=>{"use strict";a.s(["TeamMembers",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call TeamMembers() from the server but TeamMembers is 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]/components/Settings/TeamMembers.tsx","TeamMembers")},40321,a=>{"use strict";var b=a.i(44063);a.n(b)},72017,a=>{"use strict";let b,c;var d=a.i(91396);a.i(90103);var e=a.i(24084),f=a.i(97728);a.i(59682);var g=a.i(22381),h=a.i(96690),i=a.i(78720),j=a.i(29171);a.i(38182);let k=a=>"boolean"==typeof a?`${a}`:0===a?"0":a,l=function(){for(var a,b,c=0,d="",e=arguments.length;c<e;c++)(a=arguments[c])&&(b=function a(b){var c,d,e="";if("string"==typeof b||"number"==typeof b)e+=b;else if("object"==typeof b)if(Array.isArray(b)){var f=b.length;for(c=0;c<f;c++)b[c]&&(d=a(b[c]))&&(e&&(e+=" "),e+=d)}else for(d in b)b[d]&&(e&&(e+=" "),e+=d);return e}(a))&&(d&&(d+=" "),d+=b);return d};a.i(67913);let m=(b="group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",c={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}},a=>{var d;if((null==c?void 0:c.variants)==null)return l(b,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:e,defaultVariants:f}=c,g=Object.keys(e).map(b=>{let c=null==a?void 0:a[b],d=null==f?void 0:f[b];if(null===c)return null;let g=k(c)||k(d);return e[b][g]}),h=a&&Object.entries(a).reduce((a,b)=>{let[c,d]=b;return void 0===d||(a[c]=d),a},{});return l(b,g,null==c||null==(d=c.compoundVariants)?void 0:d.reduce((a,b)=>{let{class:c,className:d,...e}=b;return Object.entries(e).every(a=>{let[b,c]=a;return Array.isArray(c)?c.includes({...f,...h}[b]):({...f,...h})[b]===c})?[...a,c,d]:a},[]),null==a?void 0:a.class,null==a?void 0:a.className)});var n=a.i(7969);let o={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};o.node;let p=(0,n.default)(o);function q(){return(0,d.jsxs)(j.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:[(0,d.jsxs)(j.CardHeader,{children:[(0,d.jsxs)(j.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight flex items-center gap-2",children:[(0,d.jsx)(p,{className:"h-5 w-5 text-gray-400"}),"API Keys"]}),(0,d.jsx)(j.CardDescription,{className:"text-sm text-gray-400",children:"Your New Relic and Sentry keys are stored in .env.local on this machine and are never shown here."})]}),(0,d.jsx)(j.CardContent,{children:(0,d.jsx)(i.default,{href:"/setup",className:m({variant:"outline"}),children:"Manage keys"})})]})}a.s(["ApiKeys",0,q],81327);var r=a.i(61057),s=a.i(86645),t=a.i(62807),u=a.i(40321);a.s([],34144),a.i(34144),a.i(81327),a.s([],72841,!0),a.j(r,72841),a.j(s,72841),a.j(t,72841),a.j(u,72841);var v=a.i(72841);a.s(["default",0,function(){return(0,d.jsxs)(f.SidebarProvider,{children:[(0,d.jsx)(e.AppSidebar,{}),(0,d.jsxs)(f.SidebarInset,{className:"bg-dash-surface",children:[(0,d.jsx)(g.Header,{}),(0,d.jsxs)("div",{className:"flex flex-1 flex-col p-6 md:p-8 max-w-[1200px] mx-auto w-full",children:[(0,d.jsxs)("div",{className:"mb-8",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Settings"}),(0,d.jsx)("p",{className:"text-sm text-gray-400",children:"Manage your account, team, and dashboard preferences."})]}),(0,d.jsxs)(h.Tabs,{defaultValue:"general",className:"w-full",children:[(0,d.jsxs)(h.TabsList,{className:"bg-[#0f1419] border border-[#2d3748] mb-8 p-1 h-auto",children:[(0,d.jsx)(h.TabsTrigger,{value:"general",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"General & API"}),(0,d.jsx)(h.TabsTrigger,{value:"thresholds",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"Performance Thresholds"}),(0,d.jsx)(h.TabsTrigger,{value:"team",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"Notifications & Team"})]}),(0,d.jsxs)(h.TabsContent,{value:"general",className:"space-y-6 mt-0",children:[(0,d.jsx)(q,{}),(0,d.jsx)(v.ExportSettings,{})]}),(0,d.jsx)(h.TabsContent,{value:"thresholds",className:"mt-0",children:(0,d.jsx)(v.ThresholdSettings,{})}),(0,d.jsxs)(h.TabsContent,{value:"team",className:"space-y-6 mt-0",children:[(0,d.jsx)(v.NotificationPrefs,{}),(0,d.jsx)(v.TeamMembers,{})]})]})]})]})]})}],72017)},51425,function(a){a.n(a.i(72017))},90336,a=>{"use strict";a.s(["ThresholdSettings",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ThresholdSettings() from the server but ThresholdSettings is 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]/components/Settings/ThresholdSettings.tsx","ThresholdSettings")},86645,a=>{"use strict";var b=a.i(90336);a.n(b)},45362,a=>{"use strict";a.s(["Tabs",()=>c,"TabsContent",()=>d,"TabsList",()=>e,"TabsTrigger",()=>f,"tabsListVariants",()=>g]);var b=a.i(18060);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Tabs() from the server but Tabs is 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]/components/ui/tabs.tsx","Tabs"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsContent() from the server but TabsContent is 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]/components/ui/tabs.tsx","TabsContent"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsList() from the server but TabsList is 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]/components/ui/tabs.tsx","TabsList"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsTrigger() from the server but TabsTrigger is 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]/components/ui/tabs.tsx","TabsTrigger"),g=(0,b.registerClientReference)(function(){throw Error("Attempted to call tabsListVariants() from the server but tabsListVariants is 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]/components/ui/tabs.tsx","tabsListVariants")},96690,a=>{"use strict";var b=a.i(45362);a.n(b)},25809,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},45603,a=>{"use strict";a.s(["Button",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call Button() from the server but Button is 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/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs","Button")},38182,a=>{"use strict";var b=a.i(45603);a.n(b)},40950,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(18060);a.n(d("[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js"))},53824,a=>{"use strict";var b=a.i(40950);a.n(b)},78720,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(25809),g=a.r(91396),h=f._(a.r(53824));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
1
|
+
module.exports=[40602,a=>{"use strict";a.s(["ExportSettings",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ExportSettings() from the server but ExportSettings is 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]/components/Settings/ExportSettings.tsx","ExportSettings")},61057,a=>{"use strict";var b=a.i(40602);a.n(b)},46280,a=>{"use strict";a.s(["NotificationPrefs",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call NotificationPrefs() from the server but NotificationPrefs is 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]/components/Settings/NotificationPrefs.tsx","NotificationPrefs")},62807,a=>{"use strict";var b=a.i(46280);a.n(b)},44063,a=>{"use strict";a.s(["TeamMembers",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call TeamMembers() from the server but TeamMembers is 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]/components/Settings/TeamMembers.tsx","TeamMembers")},40321,a=>{"use strict";var b=a.i(44063);a.n(b)},72017,a=>{"use strict";let b,c;var d=a.i(91396);a.i(90103);var e=a.i(24084),f=a.i(97728);a.i(59682);var g=a.i(22381),h=a.i(96690),i=a.i(78720),j=a.i(29171);a.i(38182);let k=a=>"boolean"==typeof a?`${a}`:0===a?"0":a,l=function(){for(var a,b,c=0,d="",e=arguments.length;c<e;c++)(a=arguments[c])&&(b=function a(b){var c,d,e="";if("string"==typeof b||"number"==typeof b)e+=b;else if("object"==typeof b)if(Array.isArray(b)){var f=b.length;for(c=0;c<f;c++)b[c]&&(d=a(b[c]))&&(e&&(e+=" "),e+=d)}else for(d in b)b[d]&&(e&&(e+=" "),e+=d);return e}(a))&&(d&&(d+=" "),d+=b);return d};a.i(67913);let m=(b="group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",c={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}},a=>{var d;if((null==c?void 0:c.variants)==null)return l(b,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:e,defaultVariants:f}=c,g=Object.keys(e).map(b=>{let c=null==a?void 0:a[b],d=null==f?void 0:f[b];if(null===c)return null;let g=k(c)||k(d);return e[b][g]}),h=a&&Object.entries(a).reduce((a,b)=>{let[c,d]=b;return void 0===d||(a[c]=d),a},{});return l(b,g,null==c||null==(d=c.compoundVariants)?void 0:d.reduce((a,b)=>{let{class:c,className:d,...e}=b;return Object.entries(e).every(a=>{let[b,c]=a;return Array.isArray(c)?c.includes({...f,...h}[b]):({...f,...h})[b]===c})?[...a,c,d]:a},[]),null==a?void 0:a.class,null==a?void 0:a.className)});var n=a.i(7969);let o={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};o.node;let p=(0,n.default)(o);function q(){return(0,d.jsxs)(j.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md",children:[(0,d.jsxs)(j.CardHeader,{children:[(0,d.jsxs)(j.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight flex items-center gap-2",children:[(0,d.jsx)(p,{className:"h-5 w-5 text-gray-400"}),"API Keys"]}),(0,d.jsx)(j.CardDescription,{className:"text-sm text-gray-400",children:"Your New Relic and Sentry keys are stored in .env.local on this machine and are never shown here."})]}),(0,d.jsx)(j.CardContent,{children:(0,d.jsx)(i.default,{href:"/setup",className:m({variant:"outline"}),children:"Manage keys"})})]})}a.s(["ApiKeys",0,q],81327);var r=a.i(61057),s=a.i(86645),t=a.i(62807),u=a.i(40321);a.s([],34144),a.i(34144),a.i(81327),a.s([],72841,!0),a.j(r,72841),a.j(s,72841),a.j(t,72841),a.j(u,72841);var v=a.i(72841);a.s(["default",0,function(){return(0,d.jsxs)(f.SidebarProvider,{children:[(0,d.jsx)(e.AppSidebar,{}),(0,d.jsxs)(f.SidebarInset,{className:"bg-dash-surface",children:[(0,d.jsx)(g.Header,{}),(0,d.jsxs)("div",{className:"flex flex-1 flex-col p-6 md:p-8 max-w-[1200px] mx-auto w-full",children:[(0,d.jsxs)("div",{className:"mb-8",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Settings"}),(0,d.jsx)("p",{className:"text-sm text-gray-400",children:"Manage your account, team, and dashboard preferences."})]}),(0,d.jsxs)(h.Tabs,{defaultValue:"general",className:"w-full",children:[(0,d.jsxs)(h.TabsList,{className:"bg-[#0f1419] border border-[#2d3748] mb-8 p-1 h-auto",children:[(0,d.jsx)(h.TabsTrigger,{value:"general",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"General & API"}),(0,d.jsx)(h.TabsTrigger,{value:"thresholds",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"Performance Thresholds"}),(0,d.jsx)(h.TabsTrigger,{value:"team",className:"data-[state=active]:bg-[#1a202c] data-[state=active]:text-white text-gray-400",children:"Notifications & Team"})]}),(0,d.jsxs)(h.TabsContent,{value:"general",className:"space-y-6 mt-0",children:[(0,d.jsx)(q,{}),(0,d.jsx)(v.ExportSettings,{})]}),(0,d.jsx)(h.TabsContent,{value:"thresholds",className:"mt-0",children:(0,d.jsx)(v.ThresholdSettings,{})}),(0,d.jsx)(h.TabsContent,{value:"team",className:"space-y-6 mt-0",children:(0,d.jsx)(v.NotificationPrefs,{})})]})]})]})]})}],72017)},51425,function(a){a.n(a.i(72017))},90336,a=>{"use strict";a.s(["ThresholdSettings",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ThresholdSettings() from the server but ThresholdSettings is 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]/components/Settings/ThresholdSettings.tsx","ThresholdSettings")},86645,a=>{"use strict";var b=a.i(90336);a.n(b)},45362,a=>{"use strict";a.s(["Tabs",()=>c,"TabsContent",()=>d,"TabsList",()=>e,"TabsTrigger",()=>f,"tabsListVariants",()=>g]);var b=a.i(18060);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Tabs() from the server but Tabs is 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]/components/ui/tabs.tsx","Tabs"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsContent() from the server but TabsContent is 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]/components/ui/tabs.tsx","TabsContent"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsList() from the server but TabsList is 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]/components/ui/tabs.tsx","TabsList"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call TabsTrigger() from the server but TabsTrigger is 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]/components/ui/tabs.tsx","TabsTrigger"),g=(0,b.registerClientReference)(function(){throw Error("Attempted to call tabsListVariants() from the server but tabsListVariants is 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]/components/ui/tabs.tsx","tabsListVariants")},96690,a=>{"use strict";var b=a.i(45362);a.n(b)},25809,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},45603,a=>{"use strict";a.s(["Button",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call Button() from the server but Button is 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/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs","Button")},38182,a=>{"use strict";var b=a.i(45603);a.n(b)},40950,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(18060);a.n(d("[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js"))},53824,a=>{"use strict";var b=a.i(40950);a.n(b)},78720,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(25809),g=a.r(91396),h=f._(a.r(53824));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_1t7ag6f._.js.map
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
module.exports=[11510,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(56561),e=a.i(3130),f=a.i(40695),g=a.i(5522);let h=`//
|
|
1
|
+
module.exports=[11510,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(56561),e=a.i(3130),f=a.i(40695),g=a.i(5522);let h=`// emitMetric.ts - sends a custom event through the New Relic browser agent (no key in your code)
|
|
2
|
+
// Needs a recent @newrelic/browser-agent (recordCustomEvent). Using New Relic's copy-paste snippet instead? Call window.newrelic.recordCustomEvent the same way.
|
|
3
|
+
import { getAgent } from './newrelic'; // from snippet 1
|
|
4
|
+
|
|
5
|
+
export function emitMetric(name: string, value: number, attrs: Record<string, string | number | boolean> = {}) {
|
|
6
|
+
// No-op until <NewRelicAgent /> has mounted, so this is safe to call anywhere.
|
|
7
|
+
getAgent()?.recordCustomEvent('MetricFlowEvent', { name, value, page: location.pathname, ...attrs });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// emitMetric('checkout_step', 2, { step: 'payment' });`,i=`// npm i @sentry/browser
|
|
11
|
+
import * as Sentry from '@sentry/browser';
|
|
12
|
+
|
|
13
|
+
Sentry.init({
|
|
14
|
+
dsn: '<YOUR_SENTRY_DSN>', // Sentry > Project settings > Client Keys (DSN)
|
|
15
|
+
tracesSampleRate: 0.1,
|
|
16
|
+
});`,j="border-[#2d3748] bg-[#1a202c] shadow-md";function k({n:a,title:d,help:g,code:h}){let[i,l]=(0,c.useState)(null);return(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:d}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:g})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[(0,b.jsx)("pre",{tabIndex:0,"aria-label":`Code snippet ${a}`,className:"overflow-x-auto rounded-md border border-[#2d3748] bg-[#0f1419] p-3 text-xs text-gray-300",children:h}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(f.Button,{variant:"outline","aria-label":`Copy snippet ${a}: ${d.replace(/^\d+\. /,"")}`,onClick:()=>{navigator.clipboard.writeText(h).then(()=>l("ok"),()=>l("fail")),setTimeout(()=>l(null),2500)},children:"Copy"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${"fail"===i?"text-[#f87171]":"text-[#3ee0a1]"}`,children:"ok"===i?"Copied":"fail"===i?"Copy failed, select the text and copy manually":""})]})]})]})}function l({label:a,state:c,detail:d}){let e="ok"===c?"text-[#3ee0a1]":"bad"===c?"text-[#f87171]":"text-gray-400";return(0,b.jsxs)("div",{className:"flex items-start gap-3 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:`font-mono text-sm ${e}`,"aria-hidden":!0,children:"ok"===c?"✓":"bad"===c?"✗":"…"}),(0,b.jsx)("span",{className:"sr-only",children:"ok"===c?"working":"bad"===c?"not working":"checking"}),(0,b.jsx)("span",{className:"text-sm text-gray-300 w-56 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 text-sm ${e}`,children:d})]})}function m({label:a,s:c}){let d="Checking…",e="text-gray-400";if(c?.error)d=c.error,e="text-[#f87171]";else if(c){let a=null!==c.recent&&c.recent>0;d=a?`Receiving data${c.lastEventAt?` \xb7 last event ${new Date(c.lastEventAt).toLocaleTimeString()}`:""}`:c.lastEventAt?`None in the last 5 minutes \xb7 last event ${new Date(c.lastEventAt).toLocaleString()}`:"None yet",e=a?"text-[#3ee0a1]":"text-[#f59e0b]"}return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:"text-sm text-gray-300 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 break-words text-right text-sm ${e}`,children:d})]})}a.s(["ConnectPage",0,function(){let[a,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(!1),w=(0,c.useCallback)(()=>{fetch("/api/connect").then(a=>a.json()).then(n).catch(()=>{})},[]);async function x(){t(!0),r(null);try{let a=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({NEWRELIC_INSERT_KEY:o})}),b=await a.json();b.saved?(p(""),v(!1),r({ok:!0,text:"Insert key saved."}),w()):r({ok:!1,text:b.error??b.results?.NEWRELIC_INSERT_KEY?.error??"Could not save the key."})}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}async function y(){t(!0),r(null);try{let a=await fetch("/api/connect",{method:"POST"}),b=await a.json();r(b.sent?{ok:!0,text:"Test event sent. It can take up to a minute to show below."}:{ok:!1,text:b.error??"Failed."}),w()}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}return((0,c.useEffect)(()=>{w();let a=setInterval(()=>{document.hidden||w()},5e3);return()=>clearInterval(a)},[w]),a?.error)?(0,b.jsx)(e.Card,{className:j,children:(0,b.jsx)(e.CardContent,{className:"p-10 text-center","aria-live":"polite",children:(0,b.jsx)("p",{className:"text-sm text-[#f87171]",children:a.error})})}):a&&!a.configured?(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Set up your keys first"}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:"Add your New Relic and Sentry keys, then come back to connect your site."}),(0,b.jsx)(d.default,{href:"/setup",className:(0,f.buttonVariants)(),children:"Go to setup"})]})}):(0,b.jsxs)("div",{className:"flex flex-col gap-6 max-w-3xl",children:[(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Connection"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:"Each link in the chain from your site to this dashboard. Fix the first \\u2717."})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[(0,b.jsx)(l,{label:"Keys for reading",state:a?"ok":"wait",detail:a?.accountId?`Reading New Relic account ${a.accountId}`:"Checking…"}),(0,b.jsx)(l,{label:"Browser app in New Relic",state:a?.setup?a.setup.error?"bad":a.setup.appCount>0?"ok":"bad":"wait",detail:a?.setup?a.setup.error?a.setup.error:a.setup.appCount>0?`${a.setup.appName} \u00b7 application ID ${a.setup.applicationId}`:"None yet. Create one: New Relic > Add data > Browser monitoring. Until then your site has no application ID to send to.":"Checking…"}),(0,b.jsx)(l,{label:"Browser key",state:a?.setup?a.setup.browserKey?"ok":"bad":"wait",detail:a?.setup?a.setup.browserKey?`${a.setup.browserKey} \u00b7 already filled into snippet 1 below`:"Could not read it. Copy the key VALUE from New Relic > API keys (type Ingest - Browser), not the ID beside it.":"Checking…"}),(0,b.jsx)(l,{label:"Your site sending data",state:a?.browser?(a.browser.recent??0)>0?"ok":"bad":"wait",detail:a?.browser?(a.browser.recent??0)>0?"New Relic is receiving page views":"No page views yet. Load your site, then check for blocked requests to nr-data.net - ad and privacy blockers drop them silently.":"Checking…"})]})]}),(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Events received (last 5 minutes)"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[a?.accountId?(0,b.jsxs)(b.Fragment,{children:["Querying New Relic account ",(0,b.jsx)("span",{className:"font-mono text-gray-200",children:a.accountId}),". "]}):null,"Updates every few seconds. All rows empty? Check this is the account your site sends to."]})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[(0,b.jsx)(m,{label:"Browser agent (page views)",s:a?.browser}),(0,b.jsx)(m,{label:"Custom events (emitMetric / test event)",s:a?.custom}),(0,b.jsx)(m,{label:"Sentry errors",s:a?.sentry})]})]}),(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Two different New Relic keys"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[(0,b.jsx)("strong",{className:"text-gray-200",children:"User API key"})," (set on Setup): lets this dashboard ",(0,b.jsx)("em",{children:"read"})," your data."," ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - License key"})," (below): lets a script ",(0,b.jsx)("em",{children:"send"})," events. Only the Insert key is used by the test button. The Browser agent snippet uses a third key, the ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - Browser"})," key. Dashboards for US New Relic accounts only."]})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[a?.insertKeySet&&!u?(0,b.jsxs)("p",{className:"text-sm text-[#3ee0a1]",children:["✓ Insert key is set"," ",(0,b.jsx)("button",{type:"button",className:"ml-2 text-gray-300 underline",onClick:()=>v(!0),children:"Replace"})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"insert-key",className:"text-sm font-medium text-gray-300",children:"Insert key · sends test events"}),(0,b.jsx)("p",{id:"insert-key-help",className:"text-xs text-gray-400",children:'Only needed for the test button and custom events. Different from the User key. Create it as type "Ingest - License".'}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{id:"insert-key","aria-describedby":"insert-key-help",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"Ingest - License key",value:o,onChange:a=>p(a.target.value),className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)(f.Button,{onClick:x,disabled:s||!o.trim(),children:"Save"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{onClick:y,disabled:s||!a?.insertKeySet,children:"Send test event"}),!a?.insertKeySet&&(0,b.jsx)("span",{className:"text-sm text-gray-400",children:"Add an Insert key first"}),q&&(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${q.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:q.text})]})]})]}),(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Snippet 1 runs in the browser, so its key is public."})," Use the ",(0,b.jsx)("strong",{children:"Ingest - Browser"})," key (starts ",(0,b.jsx)("span",{className:"font-mono",children:"NRJS-"}),"), never your ",(0,b.jsx)("span",{className:"font-mono",children:"NRAK-"})," User key from Setup - that one would hand every visitor full read/write access to your account. The application ID is also not your account ID."]})}),(0,b.jsx)(k,{n:1,title:"1. New Relic Browser agent",help:"Gives page views, load timing and Core Web Vitals. Create the Browser app in New Relic first (Add data > Browser monitoring) - that is where the NRJS- key and the application ID come from.",code:(({accountId:a,applicationId:b,browserKey:c}={})=>`// Step 0 - create the Browser app first: New Relic > Add data > Browser monitoring.
|
|
2
17
|
// Without it there is no ingest key and no application ID to copy.
|
|
3
18
|
// That page gives you both:
|
|
4
19
|
// ingest key starts with NRJS- (NOT your NRAK- User API key from Setup)
|
|
5
20
|
// application ID a plain number (NOT your account ID - they look identical)
|
|
21
|
+
// Copy the key VALUE, not the ID shown beside it in the key list: an ID is
|
|
22
|
+
// accepted by the form but rejected by the beacon, and nothing is logged.
|
|
6
23
|
// npm i @newrelic/browser-agent
|
|
7
24
|
|
|
8
25
|
// .env.local - NEXT_PUBLIC_* values are inlined into your public JavaScript.
|
|
9
26
|
// Only the NRJS- ingest key belongs here. An NRAK- User key would be published
|
|
10
27
|
// to every visitor as a full-account read/write credential.
|
|
11
|
-
// NEXT_PUBLIC_NEWRELIC_BROWSER_KEY
|
|
12
|
-
// NEXT_PUBLIC_NEWRELIC_APP_ID
|
|
13
|
-
// NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID
|
|
28
|
+
// NEXT_PUBLIC_NEWRELIC_BROWSER_KEY=${c??"NRJS-xxxxxxxxxxxxxxxxxxx"}
|
|
29
|
+
// NEXT_PUBLIC_NEWRELIC_APP_ID=${b??"123456789"}
|
|
30
|
+
// NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID=${a??"1234567"}
|
|
14
31
|
|
|
15
32
|
// newrelic.ts
|
|
16
33
|
import { BrowserAgent } from '@newrelic/browser-agent/loaders/browser-agent';
|
|
@@ -44,21 +61,6 @@ export function NewRelicAgent() {
|
|
|
44
61
|
useEffect(() => { import('./newrelic').then(m => m.startAgent()); }, []);
|
|
45
62
|
return null;
|
|
46
63
|
}
|
|
47
|
-
// That alone gives you PageView, load timing, Core Web Vitals and JS errors
|
|
48
|
-
// Needs a recent @newrelic/browser-agent (recordCustomEvent). Using New Relic's copy-paste snippet instead? Call window.newrelic.recordCustomEvent the same way.
|
|
49
|
-
import { getAgent } from './newrelic'; // from snippet 1
|
|
50
|
-
|
|
51
|
-
export function emitMetric(name: string, value: number, attrs: Record<string, string | number | boolean> = {}) {
|
|
52
|
-
// No-op until <NewRelicAgent /> has mounted, so this is safe to call anywhere.
|
|
53
|
-
getAgent()?.recordCustomEvent('MetricFlowEvent', { name, value, page: location.pathname, ...attrs });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// emitMetric('checkout_step', 2, { step: 'payment' });`,j=`// npm i @sentry/browser
|
|
57
|
-
import * as Sentry from '@sentry/browser';
|
|
58
|
-
|
|
59
|
-
Sentry.init({
|
|
60
|
-
dsn: '<YOUR_SENTRY_DSN>', // Sentry > Project settings > Client Keys (DSN)
|
|
61
|
-
tracesSampleRate: 0.1,
|
|
62
|
-
});`,k="border-[#2d3748] bg-[#1a202c] shadow-md";function l({n:a,title:d,help:g,code:h}){let[i,j]=(0,c.useState)(null);return(0,b.jsxs)(e.Card,{className:k,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:d}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:g})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[(0,b.jsx)("pre",{tabIndex:0,"aria-label":`Code snippet ${a}`,className:"overflow-x-auto rounded-md border border-[#2d3748] bg-[#0f1419] p-3 text-xs text-gray-300",children:h}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(f.Button,{variant:"outline","aria-label":`Copy snippet ${a}: ${d.replace(/^\d+\. /,"")}`,onClick:()=>{navigator.clipboard.writeText(h).then(()=>j("ok"),()=>j("fail")),setTimeout(()=>j(null),2500)},children:"Copy"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${"fail"===i?"text-[#f87171]":"text-[#3ee0a1]"}`,children:"ok"===i?"Copied":"fail"===i?"Copy failed, select the text and copy manually":""})]})]})]})}function m({label:a,s:c}){let d="Checking…",e="text-gray-400";if(c?.error)d=c.error,e="text-[#f87171]";else if(c){let a=null!==c.recent&&c.recent>0;d=a?`Receiving data${c.lastEventAt?` \xb7 last event ${new Date(c.lastEventAt).toLocaleTimeString()}`:""}`:c.lastEventAt?`None in the last 5 minutes \xb7 last event ${new Date(c.lastEventAt).toLocaleString()}`:"None yet",e=a?"text-[#3ee0a1]":"text-[#f59e0b]"}return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:"text-sm text-gray-300 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 break-words text-right text-sm ${e}`,children:d})]})}a.s(["ConnectPage",0,function(){let[a,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(!1),w=(0,c.useCallback)(()=>{fetch("/api/connect").then(a=>a.json()).then(n).catch(()=>{})},[]);async function x(){t(!0),r(null);try{let a=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({NEWRELIC_INSERT_KEY:o})}),b=await a.json();b.saved?(p(""),v(!1),r({ok:!0,text:"Insert key saved."}),w()):r({ok:!1,text:b.error??b.results?.NEWRELIC_INSERT_KEY?.error??"Could not save the key."})}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}async function y(){t(!0),r(null);try{let a=await fetch("/api/connect",{method:"POST"}),b=await a.json();r(b.sent?{ok:!0,text:"Test event sent. It can take up to a minute to show below."}:{ok:!1,text:b.error??"Failed."}),w()}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}return((0,c.useEffect)(()=>{w();let a=setInterval(()=>{document.hidden||w()},5e3);return()=>clearInterval(a)},[w]),a?.error)?(0,b.jsx)(e.Card,{className:k,children:(0,b.jsx)(e.CardContent,{className:"p-10 text-center","aria-live":"polite",children:(0,b.jsx)("p",{className:"text-sm text-[#f87171]",children:a.error})})}):a&&!a.configured?(0,b.jsx)(e.Card,{className:k,children:(0,b.jsxs)(e.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Set up your keys first"}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:"Add your New Relic and Sentry keys, then come back to connect your site."}),(0,b.jsx)(d.default,{href:"/setup",className:(0,f.buttonVariants)(),children:"Go to setup"})]})}):(0,b.jsxs)("div",{className:"flex flex-col gap-6 max-w-3xl",children:[(0,b.jsxs)(e.Card,{className:k,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Events received (last 5 minutes)"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[a?.accountId?(0,b.jsxs)(b.Fragment,{children:["Querying New Relic account ",(0,b.jsx)("span",{className:"font-mono text-gray-200",children:a.accountId}),". "]}):null,"Updates every few seconds. All rows empty? Check this is the account your site sends to."]})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[(0,b.jsx)(m,{label:"Browser agent (page views)",s:a?.browser}),(0,b.jsx)(m,{label:"Custom events (emitMetric / test event)",s:a?.custom}),(0,b.jsx)(m,{label:"Sentry errors",s:a?.sentry})]})]}),(0,b.jsxs)(e.Card,{className:k,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Two different New Relic keys"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[(0,b.jsx)("strong",{className:"text-gray-200",children:"User API key"})," (set on Setup): lets this dashboard ",(0,b.jsx)("em",{children:"read"})," your data."," ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - License key"})," (below): lets a script ",(0,b.jsx)("em",{children:"send"})," events. Only the Insert key is used by the test button. The Browser agent snippet uses a third key, the ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - Browser"})," key. Dashboards for US New Relic accounts only."]})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[a?.insertKeySet&&!u?(0,b.jsxs)("p",{className:"text-sm text-[#3ee0a1]",children:["✓ Insert key is set"," ",(0,b.jsx)("button",{type:"button",className:"ml-2 text-gray-300 underline",onClick:()=>v(!0),children:"Replace"})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"insert-key",className:"text-sm font-medium text-gray-300",children:"Insert key · sends test events"}),(0,b.jsx)("p",{id:"insert-key-help",className:"text-xs text-gray-400",children:'Only needed for the test button and custom events. Different from the User key. Create it as type "Ingest - License".'}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{id:"insert-key","aria-describedby":"insert-key-help",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"Ingest - License key",value:o,onChange:a=>p(a.target.value),className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)(f.Button,{onClick:x,disabled:s||!o.trim(),children:"Save"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{onClick:y,disabled:s||!a?.insertKeySet,children:"Send test event"}),!a?.insertKeySet&&(0,b.jsx)("span",{className:"text-sm text-gray-400",children:"Add an Insert key first"}),q&&(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${q.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:q.text})]})]})]}),(0,b.jsx)(e.Card,{className:k,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Snippet 1 runs in the browser, so its key is public."})," Use the ",(0,b.jsx)("strong",{children:"Ingest - Browser"})," key (starts ",(0,b.jsx)("span",{className:"font-mono",children:"NRJS-"}),"), never your ",(0,b.jsx)("span",{className:"font-mono",children:"NRAK-"})," User key from Setup - that one would hand every visitor full read/write access to your account. The application ID is also not your account ID."]})}),(0,b.jsx)(l,{n:1,title:"1. New Relic Browser agent",help:"Gives page views, load timing and Core Web Vitals. Create the Browser app in New Relic first (Add data > Browser monitoring) - that is where the NRJS- key and the application ID come from.",code:h}),(0,b.jsx)(l,{n:2,title:"2. emitMetric() helper",help:"Send your own numbers from your site. Uses the agent from snippet 1, so no key goes in your code.",code:i}),(0,b.jsx)(l,{n:3,title:"3. Sentry errors",help:"Send JavaScript errors to Sentry. Use your project's DSN.",code:j}),(0,b.jsx)(e.Card,{className:k,children:(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"4. Verify"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:'Reload your site, then watch "Events received" above turn green. Use Send test event to check the custom-event path.'})]})})]})}],11510)},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
64
|
+
// That alone gives you PageView, load timing, Core Web Vitals and JS errors.`)({accountId:a?.accountId,applicationId:a?.setup?.applicationId,browserKey:a?.setup?.browserKey})}),(0,b.jsx)(k,{n:2,title:"2. emitMetric() helper",help:"Send your own numbers from your site. Uses the agent from snippet 1, so no key goes in your code.",code:h}),(0,b.jsx)(k,{n:3,title:"3. Sentry errors",help:"Send JavaScript errors to Sentry. Use your project's DSN.",code:i}),(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"4. Verify"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:'Reload your site, then watch "Events received" above turn green. Use Send test event to check the custom-event path.'})]})})]})}],11510)},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.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",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
|
|
63
65
|
|
|
64
66
|
//# sourceMappingURL=_1tpe22e._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/wxoN5sme_nnxf8fLQMX1S/_buildManifest.js",
|
|
11
|
+
"static/wxoN5sme_nnxf8fLQMX1S/_ssgManifest.js",
|
|
12
|
+
"static/wxoN5sme_nnxf8fLQMX1S/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/42z_0gfabqpr_.js",
|