!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a090e3-1791-7993-b499-575683f5c257")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,354022,e=>{"use strict";var t=e.i(270401);let a=t.forwardRef(function({title:e,titleId:a,...r},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},r),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M18.75 12.75h1.5a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5ZM12 6a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 12 6ZM12 18a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 12 18ZM3.75 6.75h1.5a.75.75 0 1 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5ZM5.25 18.75h-1.5a.75.75 0 0 1 0-1.5h1.5a.75.75 0 0 1 0 1.5ZM3 12a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 3 12ZM9 3.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5ZM12.75 12a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0ZM9 15.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"}))});e.s(["AdjustmentsHorizontalIcon",0,a],354022)},913998,e=>{"use strict";var t=e.i(270401);let a=t.forwardRef(function({title:e,titleId:a,...r},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},r),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875h-.75ZM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 0 1-1.875-1.875V8.625ZM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 0 1 3 19.875v-6.75Z"}))});e.s(["ChartBarIcon",0,a],913998)},453380,e=>{"use strict";var t=e.i(270401),a=e.i(470733),r=e.i(989419),n=e.i(853976),i=e.i(691221),l=e.i(320012),s=e.i(690218),o=e.i(317918),c=e.i(557059),u=e.i(824845),d=e.i(478880),m=e.i(937917),f=e.i(74114);function p(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,r)}return a}function h(e){for(var t=1;t(a((0,o.addArea)(e)),()=>{a((0,o.removeArea)(e))})),null}function y(e){var o,{x1:p,x2:g,y1:v,y2:y,className:b,shape:w,xAxisId:j,yAxisId:C}=e,M=(0,m.useClipPathId)(),T=(0,d.useIsPanorama)(),O=(0,c.useAppSelector)(e=>(0,u.selectAxisScale)(e,"xAxis",j,T)),A=(0,c.useAppSelector)(e=>(0,u.selectAxisScale)(e,"yAxis",C,T));if(null==O||null==!A)return null;var N=(0,l.isNumOrStr)(p),E=(0,l.isNumOrStr)(g),R=(0,l.isNumOrStr)(v),L=(0,l.isNumOrStr)(y);if(!N&&!E&&!R&&!L&&!w)return null;var S=((e,t,a,r,n,l,s)=>{var{x1:o,x2:c,y1:u,y2:d}=s;if(null==n||null==l)return null;var m=(0,i.createLabeledScales)({x:n,y:l}),f={x:e?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:a?m.y.apply(u,{position:"start"}):m.y.rangeMin},p={x:t?m.x.apply(c,{position:"end"}):m.x.rangeMax,y:r?m.y.apply(d,{position:"end"}):m.y.rangeMax};return"discard"!==s.ifOverflow||m.isInRange(f)&&m.isInRange(p)?(0,i.rectWithPoints)(f,p):null})(N,E,R,L,O,A,e);if(!S&&!w)return null;var k="hidden"===e.ifOverflow;return t.createElement(r.Layer,{className:(0,a.clsx)("recharts-reference-area",b)},(o=h(h({clipPath:k?"url(#".concat(M,")"):void 0},(0,f.svgPropertiesAndEvents)(e)),S),t.isValidElement(w)?t.cloneElement(w,o):"function"==typeof w?w(o):t.createElement(s.Rectangle,x({},o,{className:"recharts-reference-area-rect"}))),t.createElement(n.CartesianLabelContextProvider,S,t.createElement(n.CartesianLabelFromLabelProp,{label:e.label}),e.children))}function b(e){return t.createElement(t.Fragment,null,t.createElement(v,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}),t.createElement(y,e))}class w extends t.Component{render(){return t.createElement(b,this.props)}}g(w,"displayName","ReferenceArea"),g(w,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),e.s(["ReferenceArea",0,w])},303312,e=>{"use strict";var t=e.i(222666),a=e.i(505962),r=e.i(452473),n=e.i(779100),i=e.i(370066),l=e.i(61291),s=e.i(956302);e.s(["ChartLegendRow",0,function(e){let o,c,u,d,m,f,p,h,g,x,v,y,b,w,j,C,M=(0,a.c)(113),{data:T,index:O,offset:A,onLabel:N,onIcon:E,isHighlighted:R,onMouseEnter:L,onMouseLeave:S,isRanking:k,showPercentage:P,valueFormatter:U}=e,H=void 0===k||k,D=void 0===P||P,F=(0,n.useLocale)();M[0]!==F||M[1]!==U?(o=U??(e=>(0,i.formatNumber)(e,{locale:F,preset:"compact-rounded-thousands"})??"—"),M[0]=F,M[1]=U,M[2]=o):o=M[2];let _=o;if(E){let e,a,n,i,o,c,u,d,m,f,p,h,g,x,v,y,b,w,j,C,k=T.name;M[3]!==O||M[4]!==H||M[5]!==A?(e=H&&(0,t.jsxs)("div",{className:"text-muted-foreground col-span-1 text-left",children:[O+A,"."]}),M[3]=O,M[4]=H,M[5]=A,M[6]=e):e=M[6];let P=H?"col-span-7":"col-span-8";return M[7]!==P?(a=(0,r.cn)("text-left",P),M[7]=P,M[8]=a):a=M[8],M[9]!==R?(n=(0,r.cn)("shrink-0",(0,s.getChartHighlightOpacity)(R)),M[9]=R,M[10]=n):n=M[10],M[11]!==T.name||M[12]!==E?(i=E(T.name),M[11]=T.name,M[12]=E,M[13]=i):i=M[13],M[14]!==n||M[15]!==i?(o=(0,t.jsx)("div",{className:n,children:i}),M[14]=n,M[15]=i,M[16]=o):o=M[16],M[17]!==R?(c=(0,r.cn)("flex min-w-0 flex-col transition-opacity",(0,s.getChartHighlightOpacity)(R)),M[17]=R,M[18]=c):c=M[18],M[19]!==T.name||M[20]!==N?(u=N?N(T.name):T.name,M[19]=T.name,M[20]=N,M[21]=u):u=M[21],M[22]!==c||M[23]!==u?(d=(0,t.jsx)("div",{className:c,children:u}),M[22]=c,M[23]=u,M[24]=d):d=M[24],M[25]!==o||M[26]!==d?(m=(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[o,d]}),M[25]=o,M[26]=d,M[27]=m):m=M[27],M[28]!==m||M[29]!==a?(f=(0,t.jsx)("div",{className:a,children:m}),M[28]=m,M[29]=a,M[30]=f):f=M[30],M[31]!==R?(p=(0,r.cn)("size-3 shrink-0 rounded-full transition-all",(0,s.getChartHighlightOpacity)(R)),M[31]=R,M[32]=p):p=M[32],M[33]!==T.color?(h={backgroundColor:T.color},M[33]=T.color,M[34]=h):h=M[34],M[35]!==p||M[36]!==h?(g=(0,t.jsx)("div",{className:p,style:h}),M[35]=p,M[36]=h,M[37]=g):g=M[37],M[38]!==R?(x=(0,r.cn)("text-right text-xs transition-opacity text-muted-foreground",(0,s.getChartHighlightOpacity)(R)),M[38]=R,M[39]=x):x=M[39],M[40]!==T.value||M[41]!==_?(v=null===T.value?"N/A":_(T.value),M[40]=T.value,M[41]=_,M[42]=v):v=M[42],M[43]!==v?(y=(0,t.jsx)("div",{children:v}),M[43]=v,M[44]=y):y=M[44],M[45]!==T.percentage||M[46]!==F||M[47]!==D?(b=D&&void 0!==T.percentage&&(0,t.jsx)("div",{className:"mt-1 text-xs text-faint",children:(0,l.formatPercentPoints)(T.percentage,{locale:F,preset:"native-fixed-1"})??"—"}),M[45]=T.percentage,M[46]=F,M[47]=D,M[48]=b):b=M[48],M[49]!==x||M[50]!==y||M[51]!==b?(w=(0,t.jsxs)("div",{className:x,children:[y,b]}),M[49]=x,M[50]=y,M[51]=b,M[52]=w):w=M[52],M[53]!==g||M[54]!==w?(j=(0,t.jsxs)("div",{className:"col-span-4 flex items-center justify-end gap-3",children:[g,w]}),M[53]=g,M[54]=w,M[55]=j):j=M[55],M[56]!==T.name||M[57]!==O||M[58]!==L||M[59]!==S||M[60]!==f||M[61]!==j||M[62]!==e?(C=(0,t.jsxs)("div",{role:"button",tabIndex:O,className:"grid grid-cols-12 items-center transition-opacity w-full cursor-default",onMouseEnter:L,onMouseLeave:S,"aria-label":k,children:[e,f,j]}),M[56]=T.name,M[57]=O,M[58]=L,M[59]=S,M[60]=f,M[61]=j,M[62]=e,M[63]=C):C=M[63],C}let I=T.name;M[64]!==O||M[65]!==H||M[66]!==A?(c=H&&(0,t.jsxs)("div",{className:"text-muted-foreground col-span-1 text-left",children:[O+A,"."]}),M[64]=O,M[65]=H,M[66]=A,M[67]=c):c=M[67],M[68]!==R?(u=(0,r.cn)("size-3 rounded-full transition-all",(0,s.getChartHighlightOpacity)(R)),M[68]=R,M[69]=u):u=M[69],M[70]!==T.color?(d={backgroundColor:T.color},M[70]=T.color,M[71]=d):d=M[71],M[72]!==u||M[73]!==d?(m=(0,t.jsx)("div",{className:"col-span-1 pl-2",children:(0,t.jsx)("div",{className:u,style:d})}),M[72]=u,M[73]=d,M[74]=m):m=M[74];let B=H?"col-span-8":"col-span-9";M[75]!==B?(f=(0,r.cn)("pl-2 text-left",B),M[75]=B,M[76]=f):f=M[76];let Z=!1===R&&"text-muted-foreground";return M[77]!==R||M[78]!==Z?(p=(0,r.cn)("font-medium truncate transition-opacity text-foreground",Z,(0,s.getChartHighlightOpacity)(R)),M[77]=R,M[78]=Z,M[79]=p):p=M[79],M[80]!==T.name||M[81]!==N?(h=N?N(T.name):T.name,M[80]=T.name,M[81]=N,M[82]=h):h=M[82],M[83]!==p||M[84]!==h?(g=(0,t.jsx)("div",{className:p,children:h}),M[83]=p,M[84]=h,M[85]=g):g=M[85],M[86]!==f||M[87]!==g?(x=(0,t.jsx)("div",{className:f,children:g}),M[86]=f,M[87]=g,M[88]=x):x=M[88],M[89]!==R?(v=(0,r.cn)("col-span-2 text-right text-xs transition-opacity text-muted-foreground",(0,s.getChartHighlightOpacity)(R)),M[89]=R,M[90]=v):v=M[90],M[91]!==T.value||M[92]!==_?(y=null===T.value?"N/A":_(T.value),M[91]=T.value,M[92]=_,M[93]=y):y=M[93],M[94]!==y?(b=(0,t.jsx)("div",{children:y}),M[94]=y,M[95]=b):b=M[95],M[96]!==T.percentage||M[97]!==F||M[98]!==D?(w=D&&void 0!==T.percentage&&(0,t.jsx)("div",{className:"mt-1 text-xs text-faint",children:(0,l.formatPercentPoints)(T.percentage,{locale:F,preset:"native-fixed-1"})??"—"}),M[96]=T.percentage,M[97]=F,M[98]=D,M[99]=w):w=M[99],M[100]!==v||M[101]!==b||M[102]!==w?(j=(0,t.jsxs)("div",{className:v,children:[b,w]}),M[100]=v,M[101]=b,M[102]=w,M[103]=j):j=M[103],M[104]!==T.name||M[105]!==O||M[106]!==L||M[107]!==S||M[108]!==x||M[109]!==j||M[110]!==c||M[111]!==m?(C=(0,t.jsxs)("div",{role:"button",tabIndex:O,className:"grid grid-cols-12 items-center transition-opacity w-full cursor-default",onMouseEnter:L,onMouseLeave:S,"aria-label":I,children:[c,m,x,j]}),M[104]=T.name,M[105]=O,M[106]=L,M[107]=S,M[108]=x,M[109]=j,M[110]=c,M[111]=m,M[112]=C):C=M[112],C}])},536582,e=>{"use strict";var t=e.i(222666),a=e.i(505962),r=e.i(354022),n=e.i(913998),i=e.i(270401);let l=i.forwardRef(function({title:e,titleId:t,...a},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M2.25 13.5a8.25 8.25 0 0 1 8.25-8.25.75.75 0 0 1 .75.75v6.75H18a.75.75 0 0 1 .75.75 8.25 8.25 0 0 1-16.5 0Z",clipRule:"evenodd"}),i.createElement("path",{fillRule:"evenodd",d:"M12.75 3a.75.75 0 0 1 .75-.75 8.25 8.25 0 0 1 8.25 8.25.75.75 0 0 1-.75.75h-7.5a.75.75 0 0 1-.75-.75V3Z",clipRule:"evenodd"}))}),s=i.forwardRef(function({title:e,titleId:t,...a},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}),o=i.forwardRef(function({title:e,titleId:t,...a},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M3 6a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3V6ZM3 15.75a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-2.25Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3v-2.25Z",clipRule:"evenodd"}))});var c=e.i(452473);let u={bar:(0,t.jsx)(n.ChartBarIcon,{className:"size-10 text-border"}),pie:(0,t.jsx)(l,{className:"size-10 text-border"}),app:(0,t.jsx)(o,{className:"size-10 text-border"}),uptime:(0,t.jsx)(s,{className:"size-10 text-border"}),parameters:(0,t.jsx)(r.AdjustmentsHorizontalIcon,{className:"size-10 text-border"})};e.s(["EmptyAnalyticsData",0,function(e){let r,n,i,l,s=(0,a.c)(11),{message:o,className:d,icon:m,height:f}=e,p=void 0===o?"Not enough data to display yet.":o;s[0]!==d?(r=(0,c.cn)("flex w-full flex-col items-center justify-center gap-2 p-6 text-center","text-muted-foreground",d),s[0]=d,s[1]=r):r=s[1],s[2]!==f?(n={height:f},s[2]=f,s[3]=n):n=s[3];let h=u[void 0===m?"bar":m];return s[4]!==p?(i=(0,t.jsx)("h3",{children:p}),s[4]=p,s[5]=i):i=s[5],s[6]!==r||s[7]!==n||s[8]!==h||s[9]!==i?(l=(0,t.jsxs)("div",{"data-slot":"empty-analytics-data",className:r,style:n,children:[h,i]}),s[6]=r,s[7]=n,s[8]=h,s[9]=i,s[10]=l):l=s[10],l}],536582)},758665,e=>{"use strict";var t=e.i(222666),a=e.i(505962),r=e.i(779100),n=e.i(230953),i=e.i(370066),l=e.i(379165),s=e.i(150049);e.s(["SimpleChartTooltip",0,function(e){let o,c,u,d,m,f,p,h=(0,a.c)(45),{coordinate:g,active:x,label:v,payload:y,totalConfig:b,chartHeight:w,isHighRes:j,displayTimezone:C}=e,M=(0,r.useLocale)(),T=(0,s.useResolvedDisplayTimeZone)(void 0===C?"utc":C);if(!x||!g||void 0===g.x||!v)return null;let O="string"==typeof v?v:"";if(h[0]!==w||h[1]!==g.x||h[2]!==O||h[3]!==j||h[4]!==M||h[5]!==y||h[6]!==T||h[7]!==b){c=Symbol.for("react.early_return_sentinel");e:{let e=(0,l.parseDateStringAsUTC)(O);if(b){var A;let a,r,l,s,o,u,d,m;if(h[10]!==M||h[11]!==y){let e=y?y.reduce((e,t)=>e+(Number(t.value)||0),0):0;a=(0,i.formatNumber)(e,{locale:M,preset:"decimal-3"})??"—",h[10]=M,h[11]=y,h[12]=a}else a=h[12];let f=a,p=j?(0,n.formatTime)(e,{locale:M,timeZone:T,preset:"numeric"})??"—":void 0,x=(0,n.formatDate)(e,{locale:M,timeZone:T,preset:"weekday-day-month"})??"—";if(h[13]!==b.bucketMs)r=b.bucketMs?(A=b.bucketMs,A<6e4?`${A/1e3}s`:A<36e5?`${A/6e4}m`:A<864e5?`${A/36e5}h`:`${A/864e5}d`):void 0,h[13]=b.bucketMs,h[14]=r;else r=h[14];let v=r,C=w??0;h[15]!==g.x?(l={left:g.x,top:-28,transform:"translateX(-50%)"},h[15]=g.x,h[16]=l):l=h[16],h[17]!==f||h[18]!==b.suffix?(s=(0,t.jsxs)("span",{className:"rounded-sm bg-base-3 px-1.5 py-0.5 text-xs font-medium text-base-12 whitespace-nowrap",children:["~",f,b.suffix]}),h[17]=f,h[18]=b.suffix,h[19]=s):s=h[19],h[20]!==l||h[21]!==s?(o=(0,t.jsx)("div",{className:"absolute pointer-events-none z-overlay",style:l,children:s}),h[20]=l,h[21]=s,h[22]=o):o=h[22];let O=C-26;h[23]!==g.x||h[24]!==O?(u={left:g.x,top:O,transform:"translateX(-50%)"},h[23]=g.x,h[24]=O,h[25]=u):u=h[25],h[26]!==v?(d=v&&(0,t.jsx)("span",{className:"rounded-sm bg-base-5 px-1 py-px font-semibold text-base-12",children:v}),h[26]=v,h[27]=d):d=h[27];let N=(0,t.jsx)("div",{className:"absolute pointer-events-none z-overlay",style:u,children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-sm shadow-md border border-base-6 bg-background px-1.5 py-0.5 text-2xs text-base-11 whitespace-nowrap",children:[d,p&&`${p} `,x]})});h[28]!==N||h[29]!==o?(m=(0,t.jsxs)(t.Fragment,{children:[o,N]}),h[28]=N,h[29]=o,h[30]=m):m=h[30],c=m;break e}o=j?(0,n.formatTime)(e,{locale:M,timeZone:T,preset:"numeric"})??"—":(0,n.formatDate)(e,{locale:M,timeZone:T,preset:"medium"})??"—"}h[0]=w,h[1]=g.x,h[2]=O,h[3]=j,h[4]=M,h[5]=y,h[6]=T,h[7]=b,h[8]=o,h[9]=c}else o=h[8],c=h[9];if(c!==Symbol.for("react.early_return_sentinel"))return c;let N=o,E=g.x>200,R=g.x+(E?2.5:-2.5),L=E?"translateX(-100%)":"translateX(0%)";return h[31]!==R||h[32]!==L?(u={left:R,top:-20,transform:L},h[31]=R,h[32]=L,h[33]=u):u=h[33],h[34]!==N||h[35]!==E?(d=E&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:N}),h[34]=N,h[35]=E,h[36]=d):d=h[36],h[37]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("div",{className:"size-1 md:size-2 rounded-full bg-border"}),h[37]=m):m=h[37],h[38]!==N||h[39]!==E?(f=!E&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:N}),h[38]=N,h[39]=E,h[40]=f):f=h[40],h[41]!==u||h[42]!==d||h[43]!==f?(p=(0,t.jsxs)("div",{className:"absolute pointer-events-none z-overlay flex items-center gap-2",style:u,children:[d,m,f]}),h[41]=u,h[42]=d,h[43]=f,h[44]=p):p=h[44],p}])},128066,e=>{"use strict";var t=e.i(222666),a=e.i(452473),r=e.i(897575),n=e.i(779100),i=e.i(150049),l=e.i(370066),s=e.i(61291),o=e.i(270401),c=e.i(307425),u=e.i(853976),d=e.i(5353),m=e.i(690218),f=e.i(453380),p=e.i(537457),h=e.i(487154),g=e.i(429088),x=e.i(287172),v=e.i(839539),y=e.i(379165);let b=[.1431,.1483,.1525,.1515,.1484,.1257,.1305];var w=e.i(691038),j=e.i(203599),C=e.i(303312),M=e.i(440409),T=e.i(20629),O=e.i(536582),A=e.i(956302),N=e.i(758665);function E(e){return Object.values(e).reduce((e,t)=>e+t,0)}function R(e){let{row:t,allKeys:a,project:r}=e;return{[A.RECHART_X_LABEL]:t.x,...Object.fromEntries([...a].map(e=>[e,r(t.ys[e]??0)]))}}function L(e,t){return e.map(e=>Object.entries(e.ys).reduce((e,[a,r])=>t?.has(a)?e:e+r,0))}function S(e,t){let a=L(e,t).filter(e=>e>0);return 0===a.length?1:10**Math.floor(Math.log10(Math.min(...a)))}let k=[3,3,0,0];e.s(["StackedBarChart",0,function({data:e,colors:P=A.defaultColors,height:U=A.RECHART_DEFAULT_HEIGHT,barSize:H=50,maxBarSize:D,hideZeroTotalTooltip:F=!1,yAxisLabel:_,yAxisLabelClassName:I,yAxisHidden:B,yAxisWidth:Z,yAxisMaxOnly:z,yAxisRightSide:X,onClick:W,onBarClick:K,getIsSeriesClickable:V,onLabel:Y,onTooltipLabel:$,onIcon:G,isPercentage:q=!1,hiddenSeries:J,highlight:Q,forecast:ee,forecastFromTimestamp:et,isAnimationActive:ea=!1,legendConfig:er,"data-testid":en,displayTimezone:ei="local",tooltipTotalConfig:el,roundedBars:es=!1,valueFormatter:eo,yAxisTickFormatter:ec,referenceArea:eu,colorMapping:ed,showPercentage:em,showLogScaleToggle:ef=!1,headerControl:ep,allowTooltipToRight:eh=!1,useRichTooltip:eg=!1,renderBarHoverContent:ex}){let ev=(0,i.useResolvedDisplayTimeZone)(ei),ey=(0,n.useLocale)(),[eb,ew]=(0,o.useState)(null),[ej,eC]=(0,o.useState)(null),[eM,eT]=(0,o.useState)(),[eO,eA]=(0,o.useState)(!1),eN=Q??eM,eE=(0,o.useDeferredValue)(eN),eR=(0,o.useDeferredValue)(eb),eL=em??q,eS=function({yAxisWidth:e,yAxisLabel:t}){return void 0!==e?e:t?72:void 0}({yAxisWidth:Z,yAxisLabel:_}),ek=(0,w.useMediaMd)(),{containerRef:eP,tooltipWrapperStyle:eU,tooltipContentStyle:eH,tooltipAllowEscapeViewBox:eD}=(0,j.useRightMarginTooltipPlacement)({enabled:eh&&ek,hasBlockingLegend:void 0!==er}),eF=(0,o.useMemo)(()=>eo??(e=>(function(e,{locale:t,isPercentage:a}){return a?`${(0,s.formatPercentPoints)(e,{locale:t,preset:"native-fixed-1"})??"—"}`:(0,l.formatNumber)(e,{locale:t,preset:"compact-chart-thousands"})??"—"})(e,{locale:ey,isPercentage:eL})),[ey,eo,eL]),e_=er?.position==="right"&&ek,eI=(0,o.useMemo)(()=>new Set(e.flatMap(e=>Object.keys(e.ys))),[e]),eB=(0,o.useMemo)(()=>{var t;return eL?e.map(e=>{let t=E(e.ys);return R({row:e,allKeys:eI,project:e=>t>0?e/t*100:0})}):ee?(t=function({data:e,rollup:t,forecastFromTimestamp:a}){if(0===e.length)return[];let r=a?new Date(a):new Date,n=[];for(let a of e){let i={x:a.x,ys:{...a.ys}};if(!function(e,t){if(0===e.length)return!1;let a=(0,y.parseDateStringAsUTC)(e.at(-1)?.x||""),r=(0,y.parseDateStringAsUTC)(t.x);return a.getTime()===r.getTime()}(e,a)||!function({dataPointX:e,now:t,rollup:a}){let r=(0,y.parseDateStringAsUTC)(e);switch(a){case v.ForecastWindow.OneMinute:return r.getUTCFullYear()===t.getUTCFullYear()&&r.getUTCMonth()===t.getUTCMonth()&&r.getUTCDate()===t.getUTCDate()&&r.getUTCHours()===t.getUTCHours()&&r.getUTCMinutes()===t.getUTCMinutes();case v.ForecastWindow.OneHour:return r.getUTCFullYear()===t.getUTCFullYear()&&r.getUTCMonth()===t.getUTCMonth()&&r.getUTCDate()===t.getUTCDate()&&r.getUTCHours()===t.getUTCHours();case v.ForecastWindow.OneDay:return r.getUTCFullYear()===t.getUTCFullYear()&&r.getUTCMonth()===t.getUTCMonth()&&r.getUTCDate()===t.getUTCDate();case v.ForecastWindow.OneWeek:{let e=e=>{let t=e.getUTCDay();return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+(0===t?-6:1-t))};return e(r)===e(t)}case v.ForecastWindow.OneMonth:return r.getUTCFullYear()===t.getUTCFullYear()&&r.getUTCMonth()===t.getUTCMonth();default:return!1}}({dataPointX:a.x,now:r,rollup:t})){n.push(i);continue}let l=function(e,t){switch(t){case v.ForecastWindow.OneMinute:return 60/Math.max(1,e.getUTCSeconds());case v.ForecastWindow.OneHour:return 60/Math.max(1,e.getUTCMinutes());case v.ForecastWindow.OneDay:return 24/Math.max(1,e.getUTCHours());case v.ForecastWindow.OneWeek:{let t=(e.getUTCDay()||7)-1,a=e.getUTCHours()/24,r=0;for(let e=0;ee+t,0),o=e.findIndex(e=>e.x===a.x),c=o>0?e[o-1]:null,u=c?Object.values(c.ys).reduce((e,t)=>e+t,0):s,d=s*(l-1),m=Math.min(d,1.1*u);s>u&&u>0?i.forecast={total:d}:m>0&&(i.forecast={total:m}),n.push(i)}return n}({data:e,rollup:ee,forecastFromTimestamp:et}),t.map(e=>{let t={__RECHARTS_X_LABEL__:e.x};if(Object.assign(t,e.ys),void 0!==e.forecast){let a="number"==typeof e.forecast?e.forecast:Object.values(e.forecast).reduce((e,t)=>e+t,0);a>0&&(t[ee]=a)}return t})):e.map(e=>R({row:e,allKeys:eI,project:e=>e}))},[e,eL,ee,et,eI]),eZ=(0,o.useMemo)(()=>{if(!eO||eL)return eB;let t=S(e,J),a=ee?[...eI,ee]:[...eI];return eB.map(e=>(function({entry:e,seriesKeys:t,lowerBound:a,hiddenSeries:r}){let n=t.flatMap(t=>{let a=e[t];return"number"!=typeof a||r?.has(t)?[]:[[t,a]]}),i=n.reduce((e,[,t])=>e+t,0);if(i<=a)return e;let l=i/a,s={...e},o=0,c=0;for(let[e,t]of n){o+=t;let r=a*l**(o/i);s[e]=r-c,c=r}return s})({entry:e,seriesKeys:a,lowerBound:t,hiddenSeries:J}))},[eB,eO,eL,e,J,eI,ee]),ez=(0,o.useMemo)(()=>(function(e){let{data:t,isPercentage:a,yAxisMaxOnly:r}=e;return r&&0!==t.length?a?100:Math.max(...t.map(e=>E(e.ys))):0})({data:e,isPercentage:eL,yAxisMaxOnly:z??!1}),[e,eL,z]),eX=(0,o.useMemo)(()=>{let t,a,r;return eO?(t=S(e,J),a=Math.max(0,...L(e,J)),Array.from({length:Math.max(r=Math.round(Math.log10(t)),Math.ceil(Math.log10(a)))-r+1},(e,t)=>10**(r+t))):void 0},[eO,e,J]),eW=(0,o.useMemo)(()=>{if(ed)return ed;if(!e||0===e.length)return new Map;let t=[...new Set(e.flatMap(e=>Object.keys(e.ys)))],a=new Map;return t.forEach((e,t)=>{a.set(e,P[t%P.length]||A.Colors.Slate400)}),a},[e,P,ed]),eK=(0,o.useMemo)(()=>{if(!e||0===e.length||void 0===er)return new Map;let t=new Map;return e.forEach(e=>{let a=Object.values(e.ys).reduce((e,t)=>e+t,0),r=Object.entries(e.ys).map(([e,t])=>({name:e,value:t,percentage:a>0?t/a*100:0,color:eW.get(e)||A.Colors.Slate400})),n=r.findIndex(e=>"others"===e.name.toLowerCase()),i=-1!==n?r.splice(n,1)[0]:void 0;r.sort((e,t)=>(t.value??-1/0)-(e.value??-1/0)),i&&r.push(i),t.set(e.x,r)}),t},[e,eW,er]),eV=(0,o.useMemo)(()=>{if(void 0===er)return[];let t=[];if(eR)t=eK.get(eR.x)||[];else if(e&&e.length>0){let a=e.at(-1);t=eK.get(a.x)||[]}return void 0!==er.maxItems&&t.length>er.maxItems?t.slice(0,er.maxItems):t},[eR,eK,e,er]),eY=(0,o.useCallback)(e=>{ew(e)},[]),e$=(0,o.useRef)(new Set),eG=(0,o.useCallback)(e=>{e$.current.add(e),void 0!==ex&&eC(e)},[ex]),eq=(0,o.useCallback)(e=>{e$.current.delete(e),void 0!==ex&&eC(t=>t===e?null:t)},[ex]),eJ=(0,o.useCallback)(e=>{void 0===Q&&eT(e)},[Q]),eQ=(0,o.useCallback)(()=>{void 0===Q&&eT(void 0)},[Q]),e0=(0,o.useMemo)(()=>es?function(e){let{rows:t,allKeys:a,hiddenSeries:r}=e,n=[...a].reverse().filter(e=>!r?.has(e)),i=new Map;for(let e of t){let t=e[A.RECHART_X_LABEL];if("string"!=typeof t&&"number"!=typeof t)continue;let a=n.find(t=>{let a=e[t];return"number"==typeof a&&a>0});void 0!==a&&i.set(t,a)}return i}({rows:eB,allKeys:eI,hiddenSeries:J}):new Map,[es,eI,eB,J]),e1=!eB.some(e=>Object.values(e).some(Boolean)),e5=(0,o.useMemo)(()=>ee?`${ee}:${[...eI].join("\0")}`:void 0,[eI,ee]),{containsMultipleYears:e2,containsMultipleDays:e7,isHighRes:e3}=(0,o.useMemo)(()=>{let t=e.map(e=>e.x);return(0,A.getChartAxesDetails)(eB,t)},[eB,e]),e8=Math.ceil(eV.length/2),e4=eV.slice(0,e8),e6=eV.slice(e8),e9=(0,o.useMemo)(()=>{var r;return e1?null:(0,t.jsx)(p.ResponsiveContainer,{ref:eP,width:"100%",height:U,className:"relative z-10 w-full [&_svg]:outline-hidden",children:(0,t.jsxs)(d.BarChart,{data:eZ,className:"group",margin:{left:void 0===eS?-18:0},barSize:void 0===D?H:void 0,maxBarSize:D,onMouseMove:(t,a)=>{t?.activeLabel&&eY(e.find(e=>e.x===t.activeLabel)||null)},onTouchMove:(t,a)=>{t?.activeLabel&&eY(e.find(e=>e.x===t.activeLabel)||null)},onMouseLeave:()=>{(er?.dismissTooltipOnLeave||eg)&&eY(null)},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("pattern",{id:"forecastStripes",patternUnits:"userSpaceOnUse",width:"6",height:"6",patternTransform:"rotate(45)",children:[(0,t.jsx)("rect",{width:"6",height:"6",className:"fill-chart-tokens-uncached"}),(0,t.jsx)("rect",{width:"3",height:"6",className:"fill-background",fillOpacity:"0.15"})]})}),(0,t.jsx)("style",{children:` @keyframes glowPulse { 0% { opacity: 0.7; } 50% { opacity: 0.9; } 100% { opacity: 0.7; } } .forecast-bar { transition: opacity 0.3s ease-in-out; opacity: 0.8; } .forecast-bar:hover { animation: glowPulse 3s ease-in-out infinite; } `}),(0,t.jsx)(g.XAxis,{dataKey:A.RECHART_X_LABEL,padding:{left:(r=!!(_||B),X?r?5:48:r?32:5),right:5},fontSize:12,tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32,interval:"equidistantPreserveStart",tickFormatter:(e,t)=>e3?(0,y.formatXAxisTickHighRes)(ey,{value:e,shouldIncludeDay:e7,timeZone:ev}):(0,y.formatXAxisTick)(ey,e,e2&&0===t)}),(0,t.jsx)(x.YAxis,{hide:B,width:eS,fontSize:12,orientation:X?"right":void 0,tickLine:!1,axisLine:!1,scale:eO?"log":"auto",allowDataOverflow:eO||void 0,ticks:eX??(z?[0,ez]:void 0),padding:z?{top:15}:void 0,tickFormatter:e=>z||0!==e?eL?(0,s.formatPercentPoints)(Math.round(e),{locale:ey,preset:"fee"})??"—":ec?.(Number(e))??(0,l.formatNumber)(e,{locale:ey,preset:"compact-rounded-thousands"})??"—":"",domain:eX?[eX[0],eX.at(-1)]:eL?[0,100]:z&&void 0!==ez?[0,ez]:void 0,className:(0,a.cn)(_?"origin-left translate-x-4 md:translate-x-6 text-xs":""),children:_&&(0,t.jsx)(u.Label,{value:_,angle:-90,position:"insideLeft",offset:-10,style:{textAnchor:"middle"},className:(0,a.cn)("fill-muted-foreground text-xs",I)})}),(0,t.jsx)(h.Tooltip,{active:void 0!==er&&!er.dismissTooltipOnLeave&&!eg||void 0,isAnimationActive:!1,wrapperStyle:eU,allowEscapeViewBox:eD,cursor:{fill:"currentColor",className:"text-muted"},content:e=>{if(!e.active||!e.payload||er?.hideTooltip||F&&!e.payload.some(e=>"number"==typeof e.value&&e.value>0))return null;if(void 0!==ex&&null!==ej&&"string"==typeof e.label){let t=ex({x:e.label,seriesKey:ej});if(null!==t)return t}let a=eO?eB.find(t=>t[A.RECHART_X_LABEL]===e.label):void 0,r=e.payload.map(e=>{let t=a&&"string"==typeof e.dataKey?a[e.dataKey]:void 0;return"number"==typeof t?{...e,value:t}:e});return void 0===er||eg?(0,t.jsx)(M.ChartTooltip,{...e,payload:r,shouldShowTime:e3,displayTimezone:ei,style:eH,wrapperClassName:e.wrapperClassName,onLabel:$??Y,sortOrder:M.SortOrder.Descending,highlightedRef:e$,forecast:ee,valueFormatter:eF,...eg?{maxItems:Math.max(1,Math.floor((U-M.CHART_TOOLTIP_HEADER_PX)/M.CHART_TOOLTIP_ROW_PX))}:{}}):(0,t.jsx)(N.SimpleChartTooltip,{...e,payload:r,totalConfig:el,chartHeight:U,isHighRes:e3,displayTimezone:ei})}}),[...eI].map(e=>(0,t.jsx)(c.Bar,{hide:J?J.has(e):void 0,onClick:t=>{if(V?.(e)===!1)return;W?.(e);let a=t?.payload,r=a?.[A.RECHART_X_LABEL];"string"==typeof r&&K?.({x:r,seriesKey:e})},onMouseEnter:()=>eG(e),onMouseLeave:()=>eq(e),className:(0,a.cn)("transition-opacity",void 0!==eE&&(0,A.getChartHighlightOpacity)(eE===e),"group-hover:opacity-100 group-hover:hover:opacity-80",(!!W||!!K)&&V?.(e)!==!1&&"cursor-pointer"),dataKey:e,fill:(0,T.getColorForSeries)(e,eW),stackId:"a",isAnimationActive:ea,shape:es?function({barKey:e,topBarKeyByX:a,xLabelKey:r}){return function(n){let i=n.payload,l=i?.[r],s=("string"==typeof l||"number"==typeof l)&&a.get(l)===e;return(0,t.jsx)(m.Rectangle,{...n,radius:s?k:0})}}({barKey:e,topBarKeyByX:e0,xLabelKey:A.RECHART_X_LABEL}):void 0},e)),ee&&(0,t.jsx)(c.Bar,{hide:!1,className:"forecast-bar",dataKey:ee,fill:"url(#forecastStripes)",stackId:"a",isAnimationActive:ea},e5),eu&&(0,t.jsx)(f.ReferenceArea,{x1:eu.x1,x2:eu.x2,fill:"currentColor",fillOpacity:.12,stroke:"none",ifOverflow:"visible"})]})})},[ey,eI,H,D,F,eW,P,eP,es,e0,e7,e2,e,ei,ee,e5,y.formatXAxisTick,y.formatXAxisTickHighRes,A.getChartHighlightOpacity,eY,eG,eq,e1,U,J,eE,e$,ea,e3,eL,V,W,K,Y,$,A.RECHART_X_LABEL,eB,eZ,er,eF,_,I,B,eS,ec,z,X,ez,eu,el,eO,eX,eD,eH,eU,eg,ex,ej,ev]),te=ef||ep?(0,t.jsxs)("div",{className:"flex items-center gap-2 self-end",children:[ep,ef&&(0,t.jsxs)(r.SegmentedControl,{"aria-label":"Y-axis scale",size:"sm",value:eO?"log":"linear",onValueChange:e=>{eA("log"===e)},children:[(0,t.jsx)(r.SegmentedControlItem,{value:"linear",children:"Linear"}),(0,t.jsx)(r.SegmentedControlItem,{value:"log",children:"Log"})]})]}):null;if(e1)return te?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[te,(0,t.jsx)(O.EmptyAnalyticsData,{height:U})]}):(0,t.jsx)(O.EmptyAnalyticsData,{height:U});let tt=te?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[te,e9]}):e9;if(void 0===er)return en?(0,t.jsx)("div",{"data-testid":en,style:{display:"contents"},children:tt}):tt;let ta=e_||er?.forceSingleColumn,tr=!!G,tn=(0,a.cn)("grid grid-cols-1 md:grid-cols-2 gap-5",tr?"md:gap-20":"md:gap-16"),ti=eV.length>0&&(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-5",e_?"w-64 shrink-0 pb-8":!er?.forceSingleColumn&&!tr&&"px-2 md:px-16"),children:[(0,t.jsx)("div",{className:(0,a.cn)(ta?"flex flex-col gap-3":tn),children:ta?eV.map((e,a)=>(0,t.jsx)(C.ChartLegendRow,{data:e,index:a,offset:1,onLabel:Y,onIcon:G,isHighlighted:void 0===eN?void 0:eN===e.name,onMouseEnter:()=>eJ(e.name),onMouseLeave:eQ,isRanking:er?.isRanking??!0,showPercentage:er?.showPercentage??!0,valueFormatter:er?.valueFormatter},e.name)):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex flex-col gap-y-5",children:e4.map((e,a)=>(0,t.jsx)(C.ChartLegendRow,{data:e,index:a,offset:1,onLabel:Y,onIcon:G,isHighlighted:void 0===eN?void 0:eN===e.name,onMouseEnter:()=>eJ(e.name),onMouseLeave:eQ,isRanking:er?.isRanking??!0,showPercentage:er?.showPercentage??!0,valueFormatter:er?.valueFormatter},e.name))}),(0,t.jsx)("div",{className:"flex flex-col gap-y-5",children:e6.map((e,a)=>(0,t.jsx)(C.ChartLegendRow,{data:e,index:a,offset:e8+1,onLabel:Y,onIcon:G,isHighlighted:void 0===eN?void 0:eN===e.name,onMouseEnter:()=>eJ(e.name),onMouseLeave:eQ,isRanking:er?.isRanking??!0,showPercentage:er?.showPercentage??!0,valueFormatter:er?.valueFormatter},e.name))})]})}),er?.description&&(0,t.jsx)("p",{className:"text-muted-foreground text-sm pt-3",children:er.description})]});return(0,t.jsxs)("div",{"data-testid":en,className:(0,a.cn)("relative",e_?"flex flex-row gap-6 items-center":"flex flex-col gap-10"),children:[(0,t.jsx)("div",{className:e_?"flex-1 min-w-0":void 0,children:tt}),ti]})}],128066)}]); //# sourceMappingURL=3eoag7z1uq6zj.js.map //# chunkId=01a090e3-1791-7993-b499-575683f5c257