(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,725622,e=>{"use strict";var t=e.i(651681);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],725622)},621591,e=>{"use strict";var t=e.i(651681);let r={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],621591)},318412,e=>{"use strict";e.s(["R",()=>ei,"v",()=>en],318412);var t=e.i(16043),r=e.i(470733),n=e.i(162474),i=e.i(8113),a=e.i(802822),l=e.i(652695),o=e.i(866901),s=e.i(422242),c=e.i(824280),u=e.i(647491),d=e.i(12091),f=e.i(553577),h=e.i(520321),p=e.i(836093),m=e.i(193710),g=e.i(478697),y=e.i(321801),v=e.i(674820),b=e.i(153407),x=(e,t,r,n)=>(0,b.lU)(e,"xAxis",t,n),w=(e,t,r,n)=>(0,b.C1)(e,"xAxis",t,n),k=(e,t,r,n)=>(0,b.lU)(e,"yAxis",r,n),S=(e,t,r,n)=>(0,b.C1)(e,"yAxis",r,n),j=(0,y.f)([m.L,x,k,w,S],(e,t,r,n,i)=>(0,u.P)(e,"xAxis")?(0,u.O)(t,n,!1):(0,u.O)(r,i,!1));function N(e){return"line"===e.type}var O=(0,y.f)([b.kG,(e,t,r,n,i)=>i],(e,t)=>e.filter(N).find(e=>e.id===t)),C=(0,y.f)([m.L,x,k,w,S,O,j,v.I],(e,t,r,n,i,a,l,o)=>{var s,{chartData:c,dataStartIndex:u,dataEndIndex:d}=o;if(null!=a&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=l){var{dataKey:f,data:h}=a;if(null!=(s=null!=h&&h.length>0?h:null==c?void 0:c.slice(u,d+1)))return en({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:l,displayedData:s})}}),E=e.i(257592),P=e.i(940357),A=e.i(556684),M=e.i(809863),R=e.i(25548),_=e.i(642165),T=e.i(700698),$=e.i(713793),L=e.i(563419),I=e.i(180898),D=e.i(173773),z=["id"],F=["type","layout","connectNulls","needClip"],V=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t"".concat(t,"px ").concat(e-t,"px");function K(e){var{clipPathId:n,points:l,props:o}=e,{dot:c,dataKey:u,needClip:d}=o;if(null==l||!c&&1!==l.length)return null;var{id:f}=o,h=B(o,z),p=(0,s.$)(c),m=(0,$.e)(h),g=(0,I.L)(c),y=l.map((e,n)=>{var a,o=U(U(U({key:"dot-".concat(n),r:3},m),g),{},{index:n,cx:e.x,cy:e.y,dataKey:u,value:e.value,payload:e.payload,points:l});if(t.isValidElement(c))a=t.cloneElement(c,o);else if("function"==typeof c)a=c(o);else{var s=(0,r.q)("recharts-line-dot","boolean"!=typeof c?c.className:"");a=t.createElement(i.f,Y({},o,{className:s}))}return a}),v={clipPath:d?"url(#clipPath-".concat(p?"":"dots-").concat(n,")"):void 0};return t.createElement(a.f,Y({className:"recharts-line-dots",key:"dots"},v),y)}function X(e){var{showLabels:r,children:n,points:i}=e,a=(0,t.useMemo)(()=>null==i?void 0:i.map(e=>{var t={x:e.x,y:e.y,width:0,height:0};return U(U({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[i]);return t.createElement(l.A,{value:r?a:null},n)}function G(e){var{clipPathId:r,pathRef:i,points:a,strokeDasharray:l,props:o}=e,{type:s,layout:c,connectNulls:u,needClip:d}=o,f=B(o,F),h=U(U({},(0,I.h)(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(r,")"):void 0,points:a,type:s,layout:c,connectNulls:u,strokeDasharray:null!=l?l:o.strokeDasharray});return t.createElement(t.Fragment,null,(null==a?void 0:a.length)>1&&t.createElement(n.f,Y({},h,{pathRef:i})),t.createElement(K,{points:a,clipPathId:r,props:o}))}function Q(e){var{clipPathId:r,props:n,pathRef:i,previousPointsRef:a,longestAnimatedLengthRef:s}=e,{points:c,strokeDasharray:u,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:p,animateNewValues:m,width:g,height:y,onAnimationEnd:v,onAnimationStart:b}=n,x=a.current,w=(0,A.f)(n,"recharts-line-"),[k,S]=(0,t.useState)(!1),j=(0,t.useCallback)(()=>{"function"==typeof v&&v(),S(!1)},[v]),N=(0,t.useCallback)(()=>{"function"==typeof b&&b(),S(!0)},[b]),O=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(i.current),C=s.current;return t.createElement(X,{points:c,showLabels:!k},n.children,t.createElement(L.f,{animationId:w,begin:f,duration:h,isActive:d,easing:p,onAnimationEnd:j,onAnimationStart:N,key:w},e=>{var l,f=Math.min((0,o.Y)(C,O+C,e),O);if(l=d?u?((e,t,r)=>{var n=r.reduce((e,t)=>e+t);if(!n)return q(t,e);for(var i=Math.floor(e/n),a=e%n,l=t-e,o=[],s=0,c=0;sa){o=[...r.slice(0,s),a-c];break}var u=o.length%2==0?[0,l]:[l];return[...function(e,t){for(var r=e.length%2!=0?[...e,0]:e,n=[],i=0;i"".concat(e,"px")).join(", ")})(f,O,"".concat(u).split(/[,\s]+/gim).map(e=>parseFloat(e))):q(O,f):null==u?void 0:String(u),x){var h=x.length/c.length,p=1===e?c:c.map((t,r)=>{var n=Math.floor(r*h);if(x[n]){var i=x[n];return U(U({},t),{},{x:(0,o.Y)(i.x,t.x,e),y:(0,o.Y)(i.y,t.y,e)})}return m?U(U({},t),{},{x:(0,o.Y)(2*g,t.x,e),y:(0,o.Y)(y/2,t.y,e)}):U(U({},t),{},{x:t.x,y:t.y})});return a.current=p,t.createElement(G,{props:n,points:p,clipPathId:r,pathRef:i,strokeDasharray:l})}return e>0&&O>0&&(a.current=c,s.current=f),t.createElement(G,{props:n,points:c,clipPathId:r,pathRef:i,strokeDasharray:l})}),t.createElement(l.x,{label:n.label}))}function Z(e){var{clipPathId:r,props:n}=e,i=(0,t.useRef)(null),a=(0,t.useRef)(0),l=(0,t.useRef)(null);return t.createElement(Q,{props:n,clipPathId:r,previousPointsRef:i,longestAnimatedLengthRef:a,pathRef:l})}var J=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:(0,u.K)(e.payload,t)});class ee extends t.Component{render(){var{hide:e,dot:n,points:i,className:l,xAxisId:o,yAxisId:c,top:u,left:f,width:m,height:g,id:y,needClip:v}=this.props;if(e)return null;var b=(0,r.q)("recharts-line",l),{r:x,strokeWidth:w}=(0,D.f)(n),k=(0,s.$)(n),S=2*x+w;return t.createElement(t.Fragment,null,t.createElement(a.f,{className:b},v&&t.createElement("defs",null,t.createElement(p.s,{clipPathId:y,xAxisId:o,yAxisId:c}),!k&&t.createElement("clipPath",{id:"clipPath-dots-".concat(y)},t.createElement("rect",{x:f-S/2,y:u-S/2,width:m+S,height:g+S}))),t.createElement(h.f,{xAxisId:o,yAxisId:c,data:i,dataPointFormatter:J,errorBarOffset:0},t.createElement(Z,{props:this.props,clipPathId:y}))),t.createElement(d.f,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var et={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!c.f.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function er(e){var r=(0,M.f)(e,et),{activeDot:n,animateNewValues:i,animationBegin:a,animationDuration:l,animationEasing:o,connectNulls:s,dot:c,hide:u,isAnimationActive:d,label:f,legendType:h,xAxisId:y,yAxisId:v,id:b}=r,x=B(r,V),{needClip:w}=(0,p.z)(y,v),k=(0,R.L)(),S=(0,m.c)(),j=(0,g.f)(),N=(0,E.g)(e=>C(e,y,v,j,b));if("horizontal"!==S&&"vertical"!==S||null==N||null==k)return null;var{height:O,width:P,x:A,y:_}=k;return t.createElement(ee,Y({},x,{id:b,connectNulls:s,dot:c,activeDot:n,animateNewValues:i,animationBegin:a,animationDuration:l,animationEasing:o,isAnimationActive:d,hide:u,label:f,legendType:h,xAxisId:y,yAxisId:v,points:N,layout:S,height:O,width:P,left:A,top:_,needClip:w}))}function en(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:l,bandSize:s,displayedData:c}=e;return c.map((e,c)=>{var d=(0,u.K)(e,l);if("horizontal"===t)return{x:(0,u.q)({axis:r,ticks:i,bandSize:s,entry:e,index:c}),y:(0,o.$)(d)?null:n.scale(d),value:d,payload:e};var f=(0,o.$)(d)?null:r.scale(d),h=(0,u.q)({axis:n,ticks:a,bandSize:s,entry:e,index:c});return null==f||null==h?null:{x:f,y:h,value:d,payload:e}}).filter(Boolean)}var ei=t.memo(function(e){var r=(0,M.f)(e,et),n=(0,g.f)();return t.createElement(_.f,{id:r.id,type:"line"},e=>t.createElement(t.Fragment,null,t.createElement(P.y,{legendPayload:(e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:(0,u.N)(r,t),payload:e}]})(r)}),t.createElement(f.f,{fn:W,args:r}),t.createElement(T.y,{type:"line",id:e,data:r.data,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,dataKey:r.dataKey,hide:r.hide,isPanorama:n}),t.createElement(er,Y({},r,{id:e}))))});ei.displayName="Line"},628309,e=>{"use strict";var t=e.i(16043),r=e.i(315661),n=e.i(6939),i=["axis"],a=(0,t.forwardRef)((e,a)=>t.createElement(n.f,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:i,tooltipPayloadSearcher:r.Y,categoricalChartProps:e,ref:a}));e.s(["f",0,a])},8113,12091,e=>{"use strict";var t=e.i(16043),r=e.i(470733),n=e.i(511676),i=e.i(713793);function a(){return(a=Object.assign.bind()).apply(null,arguments)}var l=e=>{var{cx:l,cy:o,r:s,className:c}=e,u=(0,r.q)("recharts-dot",c);return l===+l&&o===+o&&s===+s?t.createElement("circle",a({},(0,i.e)(e),(0,n.e)(e),{className:u,cx:l,cy:o,r:s})):null};e.s(["f",0,l],8113);var o=e.i(802822),s=e.i(257592),c=e.i(216750),u=e.i(25548),d=e.i(866901);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;tg.includes(e.payload));return(0,d.$)(y)?null:(e=>{var r,{point:a,childIndex:s,mainColor:c,activeDot:u,dataKey:d}=e;if(!1===u||null==a.x||null==a.y)return null;var f=h(h({index:s,dataKey:d,cx:a.x,cy:a.y,r:4,fill:null!=c?c:"none",strokeWidth:2,stroke:"#fff",payload:a.payload,value:a.value},(0,i.P)(u)),(0,n.e)(u));return r=(0,t.isValidElement)(u)?(0,t.cloneElement)(u,f):"function"==typeof u?u(f):t.createElement(l,f),t.createElement(o.f,{className:"recharts-active-dot"},r)})({point:y,childIndex:Number(m),mainColor:a,dataKey:p,activeDot:f})}],12091)},173773,e=>{"use strict";var t=e.i(713793);e.s(["f",0,function(e){var r=(0,t.P)(e);if(null!=r){var{r:n,strokeWidth:i}=r,a=Number(n),l=Number(i);return(Number.isNaN(a)||a<0)&&(a=3),(Number.isNaN(l)||l<0)&&(l=2),{r:a,strokeWidth:l}}return{r:3,strokeWidth:2}}])},133319,e=>{"use strict";var t=e.i(659350),r=e.i(27811),n=e.i(782143),i=e.i(140691),a=e.i(497214),l=e.i(368174),o=e.i(16043),s=e.i(590387),c=e.i(318412),u=e.i(628309),d=e.i(663673),f=e.i(569284),h=e.i(804599),p=e.i(836466),m=e.i(760638),g=e.i(136562),y=e.i(96724),v=e.i(535072),b=e.i(315368),x=e.i(138257),w=e.i(304903),k=e.i(261499),S=e.i(860674),j=e.i(82224),N=e.i(70294),O=e.i(707951),C=e.i(336810);let E="transparent",P={type:"number",scale:"time",domain:["dataMin","dataMax"]},A=(0,S.f)(),M=new Set;function R({dataKey:e,payload:t}){let r=(0,l.f)(t)?t[C.l]:void 0;return`${String(e)}-${String(r)}`}function _(e,t){return(0,n.f)(t||0,{locale:e,preset:"compact-significant-thousands"})??"—"}e.s(["f",0,function({data:e,className:n,height:S=C.i,yAxisLabel:T,yAxisLabelOffset:$=-10,yAxisWidth:L=32,yAxisClassName:I,yAxisLabelClassName:D,allowTooltipToRight:z=!1,hiddenSeries:F=M,highlight:V,isAnimationActive:H=!1,colorMapping:U,seriesStyleMap:B,seriesLabels:Y,yAxisMaxOnly:W,yAxisMaxLine:q,xAxisLine:K,zeroFillMissingSeries:X=!1,connectNulls:G=!0,lineType:Q="monotone",xAxisTimeScale:Z=!1,tooltipValueFormatter:J,yAxisTickFormatter:ee,yAxisDomain:et,tooltipShowZeroValues:er=!1,tooltipMaxItems:en,tooltipOverflowMode:ei,highlightDimOpacity:ea,onSeriesClick:el,highlightHandleRef:eo}){let es=(0,y.t)(),ec=(0,w.P)(es),eu=(0,x.useLocale)(),ed=(0,v.x)(),ef=(0,v.o)("(hover: hover) and (pointer: fine)"),eh=(0,o.useCallback)(e=>Y?.get(e)??e,[Y]),ep=(0,o.useRef)(void 0),em=(0,o.useRef)(null),eg=(0,o.useRef)(null),ey=(0,o.useRef)(null),ev=(0,o.useRef)(null),eb=(0,o.useRef)(null),{containerRef:ex,tooltipWrapperStyle:ew,tooltipContentClassName:ek,tooltipAllowEscapeViewBox:eS}=(0,j.f)({enabled:z&&ed}),{rechartsData:ej,containsMultipleYears:eN,containsMultipleDays:eO,yKeys:eC,isHighRes:eE,isWithinOneDay:eP}=(0,o.useMemo)(()=>{let t=(0,a.H)(e.flatMap(e=>Object.keys(e.y))),r=e.map(e=>{let r=Z?(0,b.I)(e.x).getTime():e.x;if(!X)return{[C.l]:r,...e.y};let n={[C.l]:r};for(let r of t)n[r]=e.y[r]??0;return n}),n=e.map(e=>e.x),i=e.map(e=>({[C.l]:e.x})),l=(0,C.D)(i,n),o=n.length>1?(0,b.I)(n.at(-1)??"").getTime()-(0,b.I)(n[0]??"").getTime():0,s=Z?l.isHighRes&&o<=1728e5:l.isHighRes;return{rechartsData:r,yKeys:t,...l,isHighRes:s,isWithinOneDay:o<=C.A}},[e,X,Z]),eA=(0,o.useMemo)(()=>{if(X)return new Map;let t=new Map,r=(e,r)=>{let n=t.get(e)??new Set;n.add(r),t.set(e,n)},n=new Map;for(let[t,i]of e.entries()){let a=ej[t]?.[C.l];if(void 0===a)continue;let l=String(a);for(let a of eC)if("number"==typeof i.y[a]){if(G){let e=n.get(a);n.set(a,{count:(e?.count??0)+1,pointKey:e?.pointKey??l});continue}[t-1,t+1].some(t=>"number"==typeof e[t]?.y[a])||r(a,l)}}for(let[e,{count:t,pointKey:i}]of n)1===t&&r(e,i);return t},[G,e,ej,eC,X]),eM=(0,o.useCallback)(({dataKey:e,payload:t})=>!!(0,l.f)(t)&&(eA.get(String(e))?.has(String(t[C.l]))??!1),[eA]),eR=(0,o.useCallback)(({dataKey:e,payload:r,cx:n,cy:i})=>{if("number"!=typeof n||"number"!=typeof i||!eM({dataKey:e,payload:r}))return(0,t.jsx)("g",{},R({dataKey:e,payload:r}));let a=String(e);return(0,t.jsx)("circle",{cx:n,cy:i,r:3,fill:(0,O.F)(a,U),className:"recharts-line-dot"},R({dataKey:e,payload:r}))},[U,eM]),e_=(0,o.useCallback)(e=>eM(e)&&"number"==typeof e.cx&&"number"==typeof e.cy?(0,t.jsx)("circle",{cx:e.cx,cy:e.cy,r:8,fill:"transparent",stroke:"transparent",className:"recharts-line-dot"},R(e)):(0,t.jsx)("g",{},R(e)),[eM]),eT=(0,o.useCallback)(e=>{ep.current=e,eg.current&&(eg.current.style.display="none");let t=em.current;t&&eC.forEach((r,n)=>{let i=t.querySelector(`.sl-series-${n}`);if(!i)return;let a=e===r,l=String(ea??.2);void 0===e?i.style.opacity="":i.style.opacity=a?"1":l;let o=i.querySelector("path.recharts-curve");o&&(o.style.strokeWidth=a?"3":"",o.style.strokeOpacity=a?"1":"")})},[eC,ea]),e$=(0,o.useCallback)(e=>{let t=void 0!==e&&eC.includes(e)&&!F.has(e)?e:void 0;eT(t);let r=eg.current,n=em.current;if(!r||!n)return;if(void 0===t){r.style.display="none";return}let i=eC.indexOf(t),a=n.querySelector(`.sl-series-${i} path.recharts-curve`),l=a?.getScreenCTM();if(!a||!l){r.style.display="none";return}let o=a.getPointAtLength(a.getTotalLength()),s=new DOMPoint(o.x,o.y).matrixTransform(l),c=n.getBoundingClientRect(),u=ej.findLast(e=>"number"==typeof e[t]),d=u?.[t],f=J??_.bind(null,eu);ey.current&&(ey.current.style.backgroundColor=(0,O.F)(t,U)),ev.current&&(ev.current.textContent=eh(t)),eb.current&&(eb.current.textContent="number"==typeof d?f(d):""),r.style.display="flex";let h=Math.max(0,Math.min(s.x-c.left+8,n.clientWidth-r.offsetWidth)),p=Math.max(0,s.y-c.top-r.offsetHeight-6);r.style.transform=`translate(${h}px, ${p}px)`},[eu,eT,F,eC,U,ej,J,eh]);(0,o.useEffect)(()=>{if(!eo)return;let e={setHighlightedSeries:e$};return eo.current=e,()=>{eo.current===e&&(eo.current=null)}},[eo,e$]);let eL=(0,o.useRef)(e$);(0,o.useEffect)(()=>{eL.current=e$},[e$]);let eI=(0,o.useMemo)(()=>eC.join("\0"),[eC]),eD=(0,o.useMemo)(()=>[...F].toSorted().join("\0"),[F]);(0,o.useEffect)(()=>{eL.current(void 0)},[eI,eD]);let ez=(0,o.useCallback)(e=>{em.current=e,ex(e)},[ex]),eF=(0,o.useMemo)(()=>{if(!Z)return;let e=ej.map(e=>Number(e[C.l])).filter(e=>Number.isFinite(e));if(e.length<2)return;let t=Math.min(...e),r=Math.max(...e);if(eE&&!ed){let e=(0,C.b)({minMs:t,maxMs:r,tickCount:4}).slice(0,-1);return e.length>=2?e:void 0}let n=(0,C.b)({minMs:t,maxMs:r,tickCount:ed?7:4,minStepMs:eE?void 0:C.A});return n.length>=2?n:void 0},[Z,ej,ed,eE]),eV=(0,o.useMemo)(()=>(W||q)&&0!==e.length?Math.max(...e.flatMap(e=>Object.values(e.y))):0,[e,W,q]),eH=(0,o.useRef)(0),eU=(0,o.useCallback)(()=>{eH.current=Date.now(),eT(void 0),em.current?.querySelector(".recharts-wrapper")?.dispatchEvent(new MouseEvent("mouseout",{bubbles:!0,relatedTarget:document.body}))},[eT]),eB=(0,o.useCallback)(e=>{Date.now()-eH.current<800&&e.stopPropagation()},[]);return(0,t.jsxs)("div",{ref:ez,className:(0,g.f)("relative min-w-0 touch-pan-y touch-pinch-zoom","string"==typeof S&&"h-full",n),onTouchEnd:eU,onTouchCancel:eU,onMouseOverCapture:eB,onMouseMoveCapture:eB,children:[(0,t.jsx)(f.$,{width:"100%",height:S,className:"[&_svg]:outline-hidden",children:(0,t.jsxs)(u.f,{data:ej,className:"group",syncMethod:"value",margin:{top:24,bottom:24},children:[(0,t.jsx)(p.f,{dataKey:C.l,...Z?P:{},padding:{left:24,right:24},tickLine:!1,axisLine:!!K&&{className:"text-border"},tickMargin:8,tick:A,className:"text-muted-foreground text-xs",ticks:eF,...eF?{interval:0}:{interval:"equidistantPreserveStart",minTickGap:32},tickFormatter:(e,t)=>{if(Z&&!Number.isFinite(Number(e)))return"";let r=Z?new Date(Number(e)).toISOString():String(e);return eE?(0,b.M)(eu,{timeZone:ec,value:r,shouldIncludeDay:eO&&0===t&&(ed||!eP)}):(0,b.$)(eu,r,eN&&0===t)}}),(0,t.jsx)(m.f,{width:L,type:"number",domain:et,tickLine:!1,axisLine:!1,ticks:W?[eV]:void 0,tick:A,interval:0,tickFormatter:e=>{var t,n;return ee?.(Number(e))??(t=eu,n=Number(e),(0,r.f)((0,i.I)(n),{locale:t,fractionDigits:1})??"—")??"—"},className:(0,g.f)("origin-left translate-x-6 text-xs",I),children:T&&(0,t.jsx)(s.Q,{value:T,angle:-90,position:"insideLeft",offset:$,className:(0,g.f)("fill-muted-foreground text-xs [text-anchor:middle]",D)})}),q&&eV>0&&(0,t.jsx)(d.f,{y:eV,stroke:"currentColor",strokeDasharray:"3 3",className:"text-muted-foreground",label:{value:(0,r.f)((0,i.I)(eV),{locale:eu,fractionDigits:1})??"—",position:"right",fontSize:12,className:"fill-muted-foreground"}}),(0,t.jsx)(h.f,{isAnimationActive:!1,cursor:{fill:"transparent"},wrapperStyle:ew,allowEscapeViewBox:eS,content:e=>{if(!e.active||!e.payload)return null;let r=function({payload:e,pointedSeries:t}){let r=e.filter(e=>e.color!==E);if(void 0===t)return r;let n=r.filter(e=>String(e.dataKey)===t);return n.length>0?n:null}({payload:e.payload,pointedSeries:ep.current});return null===r?null:(0,t.jsx)(N.f,{...e,payload:r,label:Z&&"number"==typeof e.label&&Number.isFinite(e.label)?new Date(e.label).toISOString():e.label,shouldShowTime:eE||Z&&"number"==typeof e.label&&Number.isFinite(e.label)&&e.label%C.A!=0,displayTimezone:es,wrapperClassName:(0,g.f)(e.wrapperClassName,ek),shouldShowTotal:!1,sortOrder:N.g.Descending,filterZeroValues:!er,maxItems:en,...ei?{overflowMode:ei}:{},...J?{valueFormatter:J}:{}})}}),eC.map((e,r)=>{let n=B?.get(e),i=V===e,a=void 0!==ea&&void 0!==V&&!i,l=i?1:n?.strokeOpacity??1;return(0,t.jsx)(c.R,{connectNulls:G,hide:F.has(e),className:(0,g.f)(`sl-series-${r}`,k.m,(void 0===ea||!V)&&"group-hover:opacity-80 group-hover:hover:opacity-100",void 0===ea&&(V&&V!==e?"opacity-20":"opacity-100")),strokeOpacity:a?ea:l,dataKey:e,name:eh(e),type:Q,stroke:(0,O.F)(e,U),strokeDasharray:n?.strokeDasharray,strokeWidth:i?3:n?.strokeWidth??2,dot:!!eA.has(e)&&eR,isAnimationActive:H},e)}),void 0!==el&&ef&&eC.map(e=>(0,t.jsx)(c.R,{connectNulls:G,hide:F.has(e),dataKey:e,name:e,type:Q,stroke:E,strokeWidth:12,activeDot:!1,tooltipType:"none",legendType:"none",dot:!!eA.has(e)&&e_,isAnimationActive:!1,className:"cursor-pointer",onMouseEnter:()=>{Date.now()-eH.current<800||eT(e)},onMouseLeave:()=>eT(void 0),onClick:()=>{Date.now()-eH.current<800||el(e)}},`${e}__hit`))]})}),(0,t.jsx)("div",{ref:eg,"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 z-10 hidden w-max flex-col overflow-hidden rounded-lg border bg-popover p-1 text-overline leading-4 text-popover-foreground shadow-md",children:(0,t.jsxs)("div",{className:"flex w-full gap-1 rounded-sm p-1",children:[(0,t.jsx)("span",{ref:ey,className:"w-1 rounded-sm"}),(0,t.jsxs)("span",{className:"grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-6",children:[(0,t.jsx)("span",{ref:ev,className:"min-w-0 truncate text-left"}),(0,t.jsx)("span",{ref:eb,className:"whitespace-nowrap text-right font-medium text-foreground"})]})]})})]})}],133319)},623578,136968,481914,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(16043);let i={CopyImage:"copy_image",Download:"download",CopyLink:"copy_link",PostOnX:"post_on_x",PostOnLinkedIn:"post_on_linkedin",NativeShare:"native_share"},a=[i.CopyImage,i.Download,i.CopyLink,i.PostOnX,i.NativeShare],l={Dialog:"dialog",Menu:"menu",Inline:"inline"},o={Card:"card",Surface:"surface"};e.s(["u",0,i,"H",0,o,"h",0,l,"W",0,a],136968);var s=e.i(535072),c=e.i(199168),u=e.i(80676),d=e.i(217411),f=e.i(10460),h=e.i(725622),p=e.i(621591),m=e.i(651681);let g={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};g.node;let y=(0,m.f)(g);var v=e.i(136562),b=e.i(139697);function x(e){let n,i,a=(0,r.c)(3),{className:l}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}),a[0]=n):n=a[0],a[1]!==l?(i=(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,className:l,children:n}),a[1]=l,a[2]=i):i=a[2],i}function w(e){let n,a,l,o,s,u,d,m=(0,r.c)(24),{share:g,layout:w}=e,k=(0,c.o)(),S=null!==g.previewUrl;if(m[0]!==k||m[1]!==S||m[2]!==w||m[3]!==g){s=Symbol.for("react.early_return_sentinel");e:{let e,r,c,u,d;m[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(f.f,{className:"size-4"}),m[9]=e):e=m[9];let j={action:i.CopyImage,label:k("Copy image"),icon:e,disabled:!S},N=g.canNativeShare?{action:i.NativeShare,label:k("Share"),icon:(0,t.jsx)(y,{className:"size-4"})}:null,O=N??j;m[10]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(x,{}),m[10]=r):r=m[10],m[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(p.f,{className:"size-4"}),m[11]=c):c=m[11],m[12]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(h.f,{className:"size-4"}),m[12]=u):u=m[12];let C=[{action:i.PostOnX,label:k("Post on X"),icon:r},...N?[j]:[],{action:i.CopyLink,label:k("Copy link"),icon:c},{action:i.Download,label:k("Download"),icon:u,disabled:!S}],E=C.length%2==1;m[13]!==g?(d=e=>()=>void g.run(e),m[13]=g,m[14]=d):d=m[14];let P=d;if("row"===w){s=(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:[O,...C].map(e=>(0,t.jsxs)(b.Button,{size:"sm",variant:e===O?"default":"outline",disabled:e.disabled,onClick:P(e.action),children:[e.icon,e.label]},e.action))});break e}l="flex flex-col gap-2",o=(0,t.jsxs)(b.Button,{variant:"default",className:"w-full",disabled:O.disabled,onClick:P(O.action),children:[O.icon,O.label]});let A=E&&"sm:grid-cols-3";m[15]!==A?(n=(0,v.f)("grid grid-cols-2 gap-2",A),m[15]=A,m[16]=n):n=m[16],a=C.map((e,r)=>(0,t.jsxs)(b.Button,{variant:"outline",className:(0,v.f)(E&&r===C.length-1&&"col-span-2 sm:col-span-1"),disabled:e.disabled,onClick:P(e.action),children:[e.icon,e.label]},e.action))}m[0]=k,m[1]=S,m[2]=w,m[3]=g,m[4]=n,m[5]=a,m[6]=l,m[7]=o,m[8]=s}else n=m[4],a=m[5],l=m[6],o=m[7],s=m[8];return s!==Symbol.for("react.early_return_sentinel")?s:(m[17]!==n||m[18]!==a?(u=(0,t.jsx)("div",{className:n,children:a}),m[17]=n,m[18]=a,m[19]=u):u=m[19],m[20]!==l||m[21]!==o||m[22]!==u?(d=(0,t.jsxs)("div",{className:l,children:[o,u]}),m[20]=l,m[21]=o,m[22]=u,m[23]=d):d=m[23],d)}var k=e.i(41277);function S(e){let i,a,l,o,s,c,u=(0,r.c)(14),{trigger:d,disabled:f,children:h}=e,p=void 0!==f&&f?null:d,[m,g]=(0,n.useState)(0);u[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>(g(N),()=>g(j)),u[0]=i):i=u[0];let y=i;u[1]!==p?(a={trigger:p,onMount:y},u[1]=p,u[2]=a):a=u[2];let v=a;return u[3]!==h?(l=(0,t.jsx)("div",{className:"isolate",children:h}),u[3]=h,u[4]=l):l=u[4],u[5]!==p||u[6]!==m?(o=0===m&&null!==p&&(0,t.jsx)("div",{className:"absolute top-0 right-0 z-above",children:p}),u[5]=p,u[6]=m,u[7]=o):o=u[7],u[8]!==l||u[9]!==o?(s=(0,t.jsxs)("div",{className:"group relative",children:[l,o]}),u[8]=l,u[9]=o,u[10]=s):s=u[10],u[11]!==v||u[12]!==s?(c=(0,t.jsx)(k.o.Provider,{value:v,children:s}),u[11]=v,u[12]=s,u[13]=c):c=u[13],c}function j(e){return e-1}function N(e){return e+1}var O=e.i(670168);function C(e){let n,i,a,l,o=(0,r.c)(26),{share:s,className:u}=e,d=(0,c.o)(),f=s.previewAspectRatio??"16 / 9";if(s.renderError){let e,r,n;return o[0]!==f?(e={"--chart-share-aspect":f},o[0]=f,o[1]=e):e=o[1],o[2]!==u?(r=(0,v.f)("flex aspect-(--chart-share-aspect) items-center justify-center rounded-lg border border-border bg-muted p-4 text-center text-body text-muted-foreground",u),o[2]=u,o[3]=r):r=o[3],o[4]!==s.renderError||o[5]!==e||o[6]!==r?(n=(0,t.jsx)("div",{role:"alert",style:e,"data-allow-inline-style":!0,className:r,children:s.renderError}),o[4]=s.renderError,o[5]=e,o[6]=r,o[7]=n):n=o[7],n}if(!s.previewUrl){let e,r,n;return o[8]!==f?(e={"--chart-share-aspect":f},o[8]=f,o[9]=e):e=o[9],o[10]!==u?(r=(0,v.f)("aspect-(--chart-share-aspect) w-full rounded-lg",u),o[10]=u,o[11]=r):r=o[11],o[12]!==e||o[13]!==r?(n=(0,t.jsx)(O.l,{style:e,"data-allow-inline-style":!0,className:r}),o[12]=e,o[13]=r,o[14]=n):n=o[14],n}let h=s.previewUrl;return o[15]!==d?(n=d("Preview of the chart image"),o[15]=d,o[16]=n):n=o[16],o[17]!==f?(i={"--chart-share-aspect":f},o[17]=f,o[18]=i):i=o[18],o[19]!==u?(a=(0,v.f)("aspect-(--chart-share-aspect) w-full rounded-lg border border-border",u),o[19]=u,o[20]=a):a=o[20],o[21]!==s.previewUrl||o[22]!==n||o[23]!==i||o[24]!==a?(l=(0,t.jsx)("img",{src:h,alt:n,style:i,"data-allow-inline-style":!0,className:a}),o[21]=s.previewUrl,o[22]=n,o[23]=i,o[24]=a,o[25]=l):l=o[25],l}function E(e){let n,i,a,l,o,s,u=(0,r.c)(13);u[0]!==e?({children:i,"aria-label":n,...a}=e,u[0]=e,u[1]=n,u[2]=i,u[3]=a):(n=u[1],i=u[2],a=u[3]);let d=(0,c.o)();return u[4]!==n||u[5]!==d?(l=n??d("Share chart"),u[4]=n,u[5]=d,u[6]=l):l=u[6],u[7]!==i?(o=i??(0,t.jsx)(y,{className:"size-4 opacity-70"}),u[7]=i,u[8]=o):o=u[8],u[9]!==a||u[10]!==l||u[11]!==o?(s=(0,t.jsx)(b.Button,{size:"icon-sm",variant:"ghost",tone:"strong",reveal:"hover","aria-label":l,...a,children:o}),u[9]=a,u[10]=l,u[11]=o,u[12]=s):s=u[12],s}function P(e){let n,i,a,l=(0,r.c)(12),{share:o,disabled:f,children:h}=e,p=(0,c.o)(),m=(0,s.W)();l[0]!==o?(n=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(C,{share:o}),(0,t.jsx)(w,{share:o,layout:"stack"})]}),l[0]=o,l[1]=n):n=l[1];let g=n;l[2]!==g||l[3]!==p||l[4]!==m||l[5]!==o.isOpen||l[6]!==o.setOpen?(i=m?(0,t.jsxs)(u.N,{open:o.isOpen,onOpenChange:o.setOpen,children:[(0,t.jsx)(u.a,{render:(0,t.jsx)(E,{})}),(0,t.jsxs)(u.d,{className:"max-w-2xl",keepMounted:!1,children:[(0,t.jsx)(u.s,{children:(0,t.jsx)(u.F,{children:p("Share")})}),g]})]}):(0,t.jsxs)(d.j,{open:o.isOpen,onOpenChange:o.setOpen,children:[(0,t.jsx)(d.V,{render:(0,t.jsx)(E,{})}),(0,t.jsxs)(d.U,{side:"bottom",className:"max-h-[85dvh] overflow-y-auto",keepMounted:!1,children:[(0,t.jsx)(d.L,{children:p("Share")}),g]})]}),l[2]=g,l[3]=p,l[4]=m,l[5]=o.isOpen,l[6]=o.setOpen,l[7]=i):i=l[7];let y=i;return l[8]!==h||l[9]!==f||l[10]!==y?(a=(0,t.jsx)(S,{trigger:y,disabled:f,children:h}),l[8]=h,l[9]=f,l[10]=y,l[11]=a):a=l[11],a}var A=e.i(612927),M=e.i(702441);function R(e){let n,i,a,l,o,s,u,d=(0,r.c)(22),{share:f,disabled:h,children:p}=e,m=(0,c.o)();d[0]!==m||d[1]!==f.isOpen?(n=f.isOpen?m("Close"):void 0,d[0]=m,d[1]=f.isOpen,d[2]=n):n=d[2],d[3]!==f?(i=()=>f.setOpen(!f.isOpen),d[3]=f,d[4]=i):i=d[4],d[5]!==f.isOpen?(a=f.isOpen?(0,t.jsx)(A.X,{className:"size-4"}):void 0,d[5]=f.isOpen,d[6]=a):a=d[6],d[7]!==f.isOpen||d[8]!==n||d[9]!==i||d[10]!==a?(l=(0,t.jsx)(E,{"aria-expanded":f.isOpen,"aria-label":n,onClick:i,children:a}),d[7]=f.isOpen,d[8]=n,d[9]=i,d[10]=a,d[11]=l):l=d[11];let g=l;return d[12]!==p||d[13]!==h||d[14]!==g?(o=(0,t.jsx)(S,{trigger:g,disabled:h,children:p}),d[12]=p,d[13]=h,d[14]=g,d[15]=o):o=d[15],d[16]!==h||d[17]!==f?(s=f.isOpen&&!h&&(0,t.jsxs)(M.N,{className:"flex w-full flex-col gap-3 p-3 sm:flex-row sm:items-center",children:[(0,t.jsx)(C,{share:f,className:"sm:w-48 sm:shrink-0"}),(0,t.jsx)(w,{share:f,layout:"row"})]}),d[16]=h,d[17]=f,d[18]=s):s=d[18],d[19]!==o||d[20]!==s?(u=(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[o,s]}),d[19]=o,d[20]=s,d[21]=u):u=d[21],u}var _=e.i(978242);function T(e){let n,i,a=(0,r.c)(3),{className:l}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.73V1.73C24 .77 23.2 0 22.22 0z"}),a[0]=n):n=a[0],a[1]!==l?(i=(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,className:l,children:n}),a[1]=l,a[2]=i):i=a[2],i}function $(e){let n,l,o,s,u,d,m,g,v,b,w,k,j,N=(0,r.c)(50),{share:O,disabled:C,actions:P,triggerReveal:A,children:M}=e,R=void 0===P?a:P,$=void 0===A?"hover":A,L=(0,c.o)();N[0]!==R?(n=e=>R.includes(e),N[0]=R,N[1]=n):n=N[1];let I=n,D=null!==O.previewUrl;return N[2]!==$?(l=(0,t.jsx)(_.X,{render:(0,t.jsx)(E,{reveal:$})}),N[2]=$,N[3]=l):l=N[3],N[4]!==M||N[5]!==C||N[6]!==l?(o=(0,t.jsx)(S,{trigger:l,disabled:C,children:M}),N[4]=M,N[5]=C,N[6]=l,N[7]=o):o=N[7],N[8]!==L||N[9]!==D||N[10]!==O||N[11]!==I?(s=I(i.CopyImage)&&(0,t.jsxs)(_.r,{disabled:!D,onClick:()=>void O.run(i.CopyImage),children:[(0,t.jsx)(f.f,{className:"size-4"}),L("Copy image")]}),N[8]=L,N[9]=D,N[10]=O,N[11]=I,N[12]=s):s=N[12],N[13]!==L||N[14]!==D||N[15]!==O||N[16]!==I?(u=I(i.Download)&&(0,t.jsxs)(_.r,{disabled:!D,onClick:()=>void O.run(i.Download),children:[(0,t.jsx)(h.f,{className:"size-4"}),L("Download image")]}),N[13]=L,N[14]=D,N[15]=O,N[16]=I,N[17]=u):u=N[17],N[18]!==O.renderError?(d=O.renderError&&(0,t.jsx)(_.P,{children:(0,t.jsx)(_.B,{role:"alert",children:O.renderError})}),N[18]=O.renderError,N[19]=d):d=N[19],N[20]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(_.U,{}),N[20]=m):m=N[20],N[21]!==L||N[22]!==O||N[23]!==I?(g=I(i.CopyLink)&&(0,t.jsxs)(_.r,{onClick:()=>void O.run(i.CopyLink),children:[(0,t.jsx)(p.f,{className:"size-4"}),L("Copy link")]}),N[21]=L,N[22]=O,N[23]=I,N[24]=g):g=N[24],N[25]!==L||N[26]!==O||N[27]!==I?(v=I(i.PostOnX)&&(0,t.jsxs)(_.r,{onClick:()=>void O.run(i.PostOnX),children:[(0,t.jsx)(x,{className:"size-4"}),L("Post on X")]}),N[25]=L,N[26]=O,N[27]=I,N[28]=v):v=N[28],N[29]!==L||N[30]!==O||N[31]!==I?(b=I(i.PostOnLinkedIn)&&(0,t.jsxs)(_.r,{onClick:()=>void O.run(i.PostOnLinkedIn),children:[(0,t.jsx)(T,{className:"size-4"}),L("Post on LinkedIn")]}),N[29]=L,N[30]=O,N[31]=I,N[32]=b):b=N[32],N[33]!==L||N[34]!==O||N[35]!==I?(w=I(i.NativeShare)&&O.canNativeShare&&(0,t.jsxs)(_.r,{onClick:()=>void O.run(i.NativeShare),children:[(0,t.jsx)(y,{className:"size-4"}),L("Share")]}),N[33]=L,N[34]=O,N[35]=I,N[36]=w):w=N[36],N[37]!==g||N[38]!==v||N[39]!==b||N[40]!==w||N[41]!==s||N[42]!==u||N[43]!==d?(k=(0,t.jsxs)(_.L,{align:"end",children:[s,u,d,m,g,v,b,w]}),N[37]=g,N[38]=v,N[39]=b,N[40]=w,N[41]=s,N[42]=u,N[43]=d,N[44]=k):k=N[44],N[45]!==O.isOpen||N[46]!==O.setOpen||N[47]!==k||N[48]!==o?(j=(0,t.jsxs)(_.G,{open:O.isOpen,onOpenChange:O.setOpen,children:[o,k]}),N[45]=O.isOpen,N[46]=O.setOpen,N[47]=k,N[48]=o,N[49]=j):j=N[49],j}var L=e.i(647204),I=e.i(960773),D=e.i(982432);let z={copy_link:"copy_link",post_on_x:"x",post_on_linkedin:"linkedin",native_share:"native"};function F({url:e,action:t,tracking:r}){let n=z[t];if(void 0===r||void 0===n)return e;let i=new URL(e);for(let e of Array.from(i.searchParams.keys()).filter(e=>e.startsWith("utm_")))i.searchParams.delete(e);return i.searchParams.set("utm_source","share"),i.searchParams.set("utm_medium",n),i.searchParams.set("utm_campaign",r.campaign),i.searchParams.set("utm_content",r.content),i.toString()}let V="image/png";async function H(e){let t=globalThis.navigator?.clipboard;if(!t?.write||"u"t.write([new ClipboardItem({[e.type]:e})]));return(0,L.V)(r)?(0,L.Y)("image copy failed"):(0,L.N)(void 0)}async function U(e){let t=globalThis.navigator?.clipboard;if(!t?.writeText)return(0,L.Y)("text clipboard is unsupported");let r=await (0,L.$)(()=>t.writeText(e));return(0,L.V)(r)?(0,L.Y)("link copy failed"):(0,L.N)(void 0)}async function B(e){let t=globalThis.navigator;if("function"!=typeof t?.share)return(0,L.Y)("native share is unsupported");let r=await (0,L.$)(()=>t.share(e));return(0,L.V)(r)?r.error instanceof DOMException&&"AbortError"===r.error.name?(0,L.N)("dismissed"):(0,L.Y)("native share failed"):(0,L.N)("shared")}function Y(e){globalThis.open(e,"_blank","noopener,noreferrer")}let W={kind:"idle",isOpen:!1,aspectRatio:null};function q(e,t){let r="recapture_pending"===e.kind?"recapture_pending":"idle";return e.kind===r&&e.isOpen===t.isOpen&&e.aspectRatio===t.aspectRatio?e:{kind:r,...t}}function K(e){return{isOpen:e.isOpen,aspectRatio:e.aspectRatio}}var X=e.i(337602);let G={width:1200,padding:56,titleFontSize:40,subtitleFontSize:24,footerFontSize:20,lineGap:12,sectionGap:32,footerHeight:36,maxChartHeight:560,logoHeight:28};function Q(e,{maxWidth:t,measure:r}){let n=e.trim().split(/\s+/).filter(Boolean),i=[];for(let e of n){let n=i.at(-1);if(void 0===n){i.push(e);continue}let a=`${n} ${e}`;r(a)<=t?i[i.length-1]=a:i.push(e)}return i}function Z(e){return new Promise(t=>{let r=new FileReader;r.onload=()=>t("string"==typeof r.result?r.result:null),r.onerror=()=>t(null),r.readAsDataURL(e)})}let J=/url\((['"]?)([^'")]+)\1\)/g,ee=new Map;async function et(e){var t;let r=function(e){let t=new Set;for(let r of[e,...e.querySelectorAll("*")])for(let e of globalThis.getComputedStyle(r).getPropertyValue("font-family").split(",")){let r=ei(e);""!==r&&t.add(r)}return t}(e);if(0===r.size)return"";let n=(await Promise.all(Array.from((t=globalThis.document).styleSheets).flatMap(e=>(function e(t,r){return t.flatMap(t=>{var n;return t instanceof CSSFontFaceRule?[{rule:t,baseUrl:r}]:(n=t)instanceof CSSGroupingRule||n instanceof CSSMediaRule||n instanceof CSSSupportsRule?e(Array.from(t.cssRules),r):[]})})(function(e){try{return Array.from(e.cssRules)}catch{return[]}}(e),e.href??t.baseURI)).filter(({rule:e})=>r.has(ei(e.style.getPropertyValue("font-family")))).map(({rule:e,baseUrl:t})=>er(e.cssText,t)))).filter(e=>null!==e).join("\n");return""===n?"":``}async function er(e,t){let r=Array.from(e.matchAll(J),e=>e[2]??""),n=await Promise.all(r.map(e=>(function(e,t){if(e.startsWith("data:"))return Promise.resolve(e);let r=function(e,t){try{return new URL(e,t).href}catch{return null}}(e,t);if(null===r)return Promise.resolve(null);let n=ee.get(r);if(void 0!==n)return n;let i=en(r).then(e=>(null===e&&ee.delete(r),e));return ee.set(r,i),i})(e,t)));if(n.some(e=>null===e))return null;let i=0;return e.replaceAll(J,()=>`url(${n[i++]??""})`)}async function en(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(5e3)});if(!t.ok)return await t.body?.cancel(),null;return await Z(await t.blob())}catch{return null}}function ei(e){return e.trim().replaceAll(/^['"]|['"]$/g,"")}let ea="http://www.w3.org/2000/svg",el=["fill","fill-opacity","stroke","stroke-width","stroke-opacity","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","font-family","font-size","font-weight","text-anchor","dominant-baseline","letter-spacing","color","visibility","display","transform","transform-origin","translate"],eo=["display","visibility","position","top","left","right","bottom","width","height","min-width","min-height","max-width","flex","flex-direction","flex-wrap","align-items","justify-content","gap","grid-template-columns","grid-column","padding","margin","border","border-radius","background-color","background-image","color","opacity","overflow","font-family","font-size","font-weight","line-height","letter-spacing","text-align","text-overflow","white-space","overflow-wrap","word-break","line-clamp","-webkit-line-clamp","-webkit-box-orient","transform","translate","rotate","scale","box-sizing","object-fit","list-style-type"],es="data-chart-share-surface",ec=new Set(["style","class","src","href","alt"]);function eu(e){let t=e.querySelector(`svg.recharts-surface, [${es}]`);return t instanceof SVGSVGElement||t instanceof HTMLElement?t:null}let ed=".recharts-tooltip-cursor, .recharts-active-bar",ef=new Set(["d","x","y","x1","y1","x2","y2","dx","dy","width","height","cx","cy","r","rx","ry","points","transform","viewBox","href","clip-path","fill","stroke","stroke-width","stroke-dasharray","font-size","font-weight","text-anchor","dominant-baseline","stop-color","stop-opacity","patternUnits","patternTransform"]),eh=new Set([...ef,...ec]);function ep(e){let t=e.cloneNode(!0);if(!(t instanceof Element))return"";for(let e of t.querySelectorAll(ed))e.remove();let r="svg"===t.localName?ef:eh;for(let e of[t,...t.querySelectorAll("*")]){let t=eO(e)?ec:r;for(let r of e.getAttributeNames())t.has(r)||e.removeAttribute(r)}return new XMLSerializer().serializeToString(t)}function em(e){let t=e.getBoundingClientRect(),r=e instanceof HTMLElement?Math.round(Math.max(t.width,e.scrollWidth)):Math.round(t.width||Number(e.getAttribute("width"))||0),n=e instanceof HTMLElement?Math.round(Math.max(t.height,e.scrollHeight)):Math.round(t.height||Number(e.getAttribute("height"))||0);return r<=0||n<=0?(0,L.Y)("chart has no size"):(0,L.N)({width:r,height:n})}async function eg(e,{inset:t=0}={}){let r=em(e);if((0,L.V)(r))return r;let{width:n,height:i}=r.data;if(e instanceof HTMLElement)return ev({element:e,width:n,height:i,inset:t});let a=e.cloneNode(!0);if(!(a instanceof SVGSVGElement))return(0,L.Y)("chart svg could not be cloned");for(let t of(eE({source:e,target:a}),await eb(e,a),a.querySelectorAll(ed)))t.remove();return a.setAttribute("xmlns",ea),a.setAttribute("width",String(n)),a.setAttribute("height",String(i)),a.getAttribute("viewBox")||a.setAttribute("viewBox",`0 0 ${n} ${i}`),(0,L.N)({markup:new XMLSerializer().serializeToString(a),width:n,height:i})}function ey(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}async function ev({element:e,width:t,height:r,inset:n}){var i;let a,l,o,s=e.cloneNode(!0);if(!(s instanceof HTMLElement))return(0,L.Y)("chart html could not be cloned");eE({source:e,target:s,declarationsFor:eS});let c=await et(e);for(let t of(await eb(e,s),s.querySelectorAll("[data-chart-share-exclude]")))t instanceof HTMLElement&&(t.style.opacity="0");let u=t+(i=e,a="[data-chart-share-expand]",l=Array.from(s.querySelectorAll(a)),o=0,Array.from(i.querySelectorAll(a)).forEach((e,t)=>{let r=l[t];e instanceof HTMLElement&&r instanceof HTMLElement&&(o=Math.max(o,e.scrollWidth-e.clientWidth),r.style.width=`${e.scrollWidth}px`,r.style.overflow="visible")}),o);s.style.width=`${u}px`,s.style.height=`${r}px`,s.style.maxHeight="none",s.style.overflow="visible",s.style.margin=`${n}px`,s.setAttribute("xmlns","http://www.w3.org/1999/xhtml");let d=new XMLSerializer().serializeToString(s),f=u+2*n,h=r+2*n,p=`${c}${d}`;return(0,L.N)({markup:p,width:f,height:h})}async function eb(e,t){let r=Array.from(e.querySelectorAll("img")),n=Array.from(t.querySelectorAll("img"));await Promise.all(n.map(async(e,t)=>{let n=r[t],i=n?await ex(n):null;null===i?e.remove():(e.setAttribute("src",i),e.removeAttribute("srcset"),e.removeAttribute("loading"))}))}async function ex(e){let t=e.currentSrc||e.src||(e.getAttribute("src")??"");return t.startsWith("data:")?t:function(e){if(!e.complete||0===e.naturalWidth)return null;try{let t=document.createElement("canvas");t.width=e.naturalWidth,t.height=e.naturalHeight;let r=t.getContext("2d");if(!r)return null;return r.drawImage(e,0,0),t.toDataURL("image/png")}catch{return null}}(e)??await ew(t)??await ew(function(e){let t=globalThis.location?.href;if(!URL.canParse(e,t))return"";let r=new URL(e,t);return r.origin===globalThis.location?.origin?"":`/_next/image?url=${encodeURIComponent(r.href)}&w=64&q=75`}(t))}async function ew(e){if(!e)return null;try{let t=await fetch(e,{signal:AbortSignal.timeout(5e3)});if(!t.ok)return await t.body?.cancel(),null;let r=await t.blob();if(!r.type.startsWith("image/"))return null;let n=await Z(r);return null!==n&&await new Promise(e=>{let t=new Image;t.onload=()=>e(!0),t.onerror=()=>e(!1),t.src=n})?n:null}catch{return null}}let ek=new Set(["normal","pre-wrap","pre-line","break-spaces"]);function eS({element:e,computed:t,declarations:r}){var n,i;let a=!function(e,t){if(!(e instanceof HTMLElement)||e.textContent?.trim()===""||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||"absolute"===t.position||"fixed"===t.position||eN(t)||!ek.has(t.whiteSpace||"normal"))return!1;let r=e.ownerDocument.createRange();return r.selectNodeContents(e),1>=Math.abs(r.getBoundingClientRect().width-(e.getBoundingClientRect().width-Number.parseFloat(t.paddingLeft||"0")-Number.parseFloat(t.paddingRight||"0")))}(e,t)?r:r.filter(e=>!ej.has(e.split(":")[0]??"")),l=eN(t)?a.map(e=>"display:flow-root"===e?"display:-webkit-box":e):a;return(n=e,i=t,n instanceof HTMLElement&&"ellipsis"===i.textOverflow&&n.scrollWidth<=n.clientWidth)?[...l,"text-overflow:clip"]:l}let ej=new Set(["width","height"]);function eN(e){return"-webkit-box"===e.display||["line-clamp","-webkit-line-clamp"].some(t=>{let r=e.getPropertyValue(t);return""!==r&&"none"!==r})}function eO(e){if("svg"===e.localName||"foreignObject"===e.localName)return!1;let t=e.parentElement?.closest("svg, foreignObject");return null==t||"foreignObject"===t.localName}let eC=[...new Set([...eo,...el])];function eE({source:e,target:t,declarationsFor:r,isRoot:n=!0}){let i=globalThis.getComputedStyle(e),a=(function(e){return eO(e)?eo:"svg"===e.localName&&null!==e.parentElement&&eO(e.parentElement)?eC:el})(e).map(e=>{let t=i.getPropertyValue(e);return t?`${e}:${t}`:null}).filter(e=>null!==e),l=n||void 0===r?a:r({element:e,computed:i,declarations:a});l.length>0&&t.setAttribute("style",l.join(";"));let o=Array.from(e.children),s=Array.from(t.children);o.forEach((e,t)=>{let n=s[t];n&&eE({source:e,target:n,declarationsFor:r,isRoot:!1})})}async function eP({svg:e,meta:t,palette:r,fontFamily:n,scale:i=2,onLayout:a,imageLayout:l=o.Card}){if(l===o.Surface)return eA({svg:e,palette:r,scale:i,onLayout:a});let s=em(e);if((0,L.V)(s))return s;let c=document.createElement("canvas"),u=c.getContext("2d");if(!u)return(0,L.Y)("canvas is unavailable");let d=(e,t)=>r=>(u.font=`${t} ${e}px ${n}`,u.measureText(r).width),f=G.width-2*G.padding,h=Q(t.title,{maxWidth:f,measure:d(G.titleFontSize,600)}),p=t.subtitle?Q(t.subtitle,{maxWidth:f,measure:d(G.subtitleFontSize,400)}):[],m=function({chartWidth:e,chartHeight:t,titleLineCount:r,subtitleLineCount:n}){let{width:i,padding:a,titleFontSize:l,subtitleFontSize:o,lineGap:s,sectionGap:c}=G,u=i-2*a,d=a+l,f=d+(Math.max(1,r)-1)*(l+s),h=n>0?f+s+o:null,p=(null===h?f:h+(n-1)*(o+s))+c,m=function({chartWidth:e,chartHeight:t,innerWidth:r}){if(e<=0||t<=0)return{width:r,height:Math.round(.5*r)};let n=Math.min(r/e,G.maxChartHeight/t);return{width:Math.round(e*n),height:Math.round(t*n)}}({chartWidth:e,chartHeight:t,innerWidth:u}),g={x:a+Math.round((u-m.width)/2),y:p,width:m.width,height:m.height},y=p+g.height+c+G.footerFontSize;return{width:i,height:Math.round(y+a-(G.footerFontSize-G.footerHeight/2)),innerWidth:u,titleBaseline:d,subtitleBaseline:h,chart:g,footerBaseline:y}}({chartWidth:s.data.width,chartHeight:s.data.height,titleLineCount:h.length,subtitleLineCount:p.length});a?.(m);let g=await eg(e);if((0,L.V)(g))return g;let[y,v]=await Promise.all([e$(ey(g.data.markup)),e$(ey(function(e){let{width:t,height:r}=X.D;return``}(r.foreground)))]);return(0,L.V)(y)?y:(0,L.V)(v)?v:(c.width=m.width*i,c.height=m.height*i,u.scale(i,i),function(e,{width:t,height:r,palette:n}){e.fillStyle=n.background,e.fillRect(0,0,t,r),e.strokeStyle=n.border,e.lineWidth=1,e.strokeRect(.5,.5,t-1,r-1)}(u,{width:m.width,height:m.height,palette:r}),eR(u,{lines:h,x:G.padding,baseline:m.titleBaseline,fontSize:G.titleFontSize,weight:600,color:r.foreground,fontFamily:n}),null!==m.subtitleBaseline&&eR(u,{lines:p,x:G.padding,baseline:m.subtitleBaseline,fontSize:G.subtitleFontSize,weight:400,color:r.mutedForeground,fontFamily:n}),u.drawImage(y.data,m.chart.x,m.chart.y,m.chart.width,m.chart.height),function(e,{baseline:t,width:r,meta:n,palette:i,fontFamily:a,logo:l}){let{padding:o,footerFontSize:s,logoHeight:c}=G,u=X.D.width/X.D.height*c;e.font=`600 ${s}px ${a}`;let d=e.measureText("OpenRouter"),f=t-(d.actualBoundingBoxAscent||s*eT)/2-G.logoHeight/2;e.drawImage(l,o,f,u,c),e.fillStyle=i.foreground,e.textAlign="left",e.fillText("OpenRouter",o+u+12,t);let h=o+u+12+d.width;e.font=`400 ${s}px ${a}`,e.fillStyle=i.mutedForeground,e.textAlign="right";let p=function(e,{maxWidth:t,measure:r}){if(r(e)<=t)return e;let n=e.length-1;for(;n>0&&r(`${e.slice(0,n)}…`)>t;)n-=1;return`${e.slice(0,n)}…`}(`${n.source} \xb7 ${n.url.replace(/^https?:\/\//,"").replace(/\/$/,"")}`,{maxWidth:r-o-h-e_,measure:t=>e.measureText(t).width});e.fillText(p,r-o,t)}(u,{baseline:m.footerBaseline,width:m.width,meta:t,palette:r,fontFamily:n,logo:v.data}),eL(c))}async function eA({svg:e,palette:t,scale:r,onLayout:n}){let i=em(e);if((0,L.V)(i))return i;let a=i.data.width+2*eM,l=i.data.height+2*eM;n?.({width:a,height:l});let o=await eg(e,{inset:eM});if((0,L.V)(o))return o;let{width:s,height:c}=o.data;(s!==a||c!==l)&&n?.({width:s,height:c});let u=await e$(ey(o.data.markup));if((0,L.V)(u))return u;let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=s*r,d.height=c*r,f.scale(r,r),f.fillStyle=t.background,f.fillRect(0,0,s,c),f.drawImage(u.data,0,0,s,c),eL(d)):(0,L.Y)("canvas is unavailable")}e.s(["g",0,es,"i",0,ep,"Y",0,eu,"P",0,em,"_",0,eg,"n",0,ey],481914);let eM=32;function eR(e,{lines:t,x:r,baseline:n,fontSize:i,weight:a,color:l,fontFamily:o}){e.font=`${a} ${i}px ${o}`,e.fillStyle=l,e.textAlign="left",e.textBaseline="alphabetic",t.forEach((t,a)=>{e.fillText(t,r,n+a*(i+G.lineGap))})}let e_=32,eT=.7;async function e$(e){let t=await (0,L.$)(()=>new Promise((t,r)=>{let n=new Image;n.decoding="async",n.onload=()=>t(n),n.onerror=()=>r(Error("chart image failed to load")),n.src=e}));return(0,L.V)(t)?(0,L.Y)("chart image failed to load"):(0,L.N)(t.data)}async function eL(e){let t=await new Promise(t=>{e.toBlob(t,"image/png")});return t?(0,L.N)(t):(0,L.Y)("png encoding failed")}let eI={background:"--background",foreground:"--foreground",mutedForeground:"--muted-foreground",border:"--border"},eD={background:"#ffffff",foreground:"#0f172a",mutedForeground:"#64748b",border:"#e2e8f0"},ez="data-chart-share-probe",eF=["class","style","data-theme"];function eV(e){let t=[...e.addedNodes,...e.removedNodes];if(t.length>0&&t.every(eH))return!1;let r=e.target instanceof Element?e.target:e.target.parentElement;return null===r||!eH(r)&&null===r.closest(".recharts-tooltip-wrapper, .recharts-tooltip-cursor, .recharts-active-bar")}function eH(e){return e instanceof Element&&e.hasAttribute(ez)}let eU={[i.CopyImage]:async({blob:e,gt:t})=>{if(!e)return(0,L.Y)(t("The image is still rendering."));let r=await H(e);return(0,L.V)(r)?(0,L.Y)(t("Your browser cannot copy images here.")):(0,L.N)(t("Image copied"))},[i.Download]:async({blob:e,filename:t,gt:r})=>{if(!e)return(0,L.Y)(r("The image is still rendering."));let n=function(e,t){if("function"!=typeof URL.createObjectURL)return(0,L.Y)("downloads are unsupported");let r=URL.createObjectURL(e),n=document.createElement("a");return n.href=r,n.download=t,n.rel="noopener",document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e3),(0,L.N)(void 0)}(e,t);return(0,L.V)(n)?(0,L.Y)(r("Your browser blocked the download.")):(0,L.N)(null)},[i.CopyLink]:async({meta:e,gt:t})=>{let r=await U(F({url:e.url,action:i.CopyLink,tracking:e.tracking}));return(0,L.V)(r)?(0,L.Y)(t("Your browser cannot copy links here.")):(0,L.N)(t("Link copied"))},[i.PostOnX]:async({blob:e,meta:t,gt:r})=>{let n=e?await H(e):null;return Y(function({text:e,url:t}){let r=new URL("https://x.com/intent/post");return r.searchParams.set("text",e),r.searchParams.set("url",t),r.toString()}({text:t.title,url:F({url:t.url,action:i.PostOnX,tracking:t.tracking})})),(0,L.N)(r(null!==n&&(0,L.C)(n)?"Image copied. Paste it into the post.":"Image not copied. Download it and attach it to the post."))},[i.PostOnLinkedIn]:async({blob:e,meta:t,gt:r})=>{let n=e?await H(e):null;return Y(function({url:e}){let t=new URL("https://www.linkedin.com/sharing/share-offsite/");return t.searchParams.set("url",e),t.toString()}({url:F({url:t.url,action:i.PostOnLinkedIn,tracking:t.tracking})})),(0,L.N)(r(null!==n&&(0,L.C)(n)?"Image copied. Paste it into the post.":"Image not copied. Download it and attach it to the post."))},[i.NativeShare]:async({blob:e,meta:t,filename:r,gt:n})=>{let a=e?[new File([e],r,{type:V})]:void 0,l=await B({title:t.title,url:F({url:t.url,action:i.NativeShare,tracking:t.tracking}),files:a});return(0,L.V)(l)?(0,L.Y)(n("Your browser cannot share here.")):(0,L.N)(null)}};function eB(e){let n=(0,r.c)(14),{variant:i,share:a,disabled:o,menuActions:s,menuTriggerReveal:c,children:u}=e;switch(i){case l.Dialog:{let e;return n[0]!==u||n[1]!==o||n[2]!==a?(e=(0,t.jsx)(P,{share:a,disabled:o,children:u}),n[0]=u,n[1]=o,n[2]=a,n[3]=e):e=n[3],e}case l.Menu:{let e;return n[4]!==u||n[5]!==o||n[6]!==s||n[7]!==c||n[8]!==a?(e=(0,t.jsx)($,{share:a,disabled:o,actions:s,triggerReveal:c,children:u}),n[4]=u,n[5]=o,n[6]=s,n[7]=c,n[8]=a,n[9]=e):e=n[9],e}case l.Inline:{let e;return n[10]!==u||n[11]!==o||n[12]!==a?(e=(0,t.jsx)(R,{share:a,disabled:o,children:u}),n[10]=u,n[11]=o,n[12]=a,n[13]=e):e=n[13],e}default:return i}}e.s(["f",0,function(e){let i,a,o,s,u,d,f=(0,r.c)(24),{children:h,meta:p,surface:m,variant:g,className:y,recaptureDelayMs:v,disabled:b,menuActions:x,menuTriggerReveal:w,imageLayout:k}=e,S=void 0===g?l.Dialog:g,j=void 0!==b&&b,[N,O]=(0,n.useState)(null);f[0]!==N||f[1]!==k||f[2]!==p||f[3]!==v||f[4]!==m||f[5]!==S?(i={chartElement:N,meta:p,surface:m,variant:S,recaptureDelayMs:v,imageLayout:k},f[0]=N,f[1]=k,f[2]=p,f[3]=v,f[4]=m,f[5]=S,f[6]=i):i=f[6];let C=function({chartElement:e,meta:t,surface:r,variant:i,recaptureDelayMs:a=300,imageLayout:l}){let o,s=(0,c.o)(),u=(0,I.Q)(),[d,f]=(0,n.useState)(W),h=(0,n.useRef)(W),p=(0,n.useCallback)(e=>{let t=function(e,t){switch(t.type){case"opened":return q(e,{isOpen:!0,aspectRatio:e.aspectRatio});case"closed":return e.isOpen?{...e,isOpen:!1}:e;case"key_changed":return q(e,{isOpen:!1,aspectRatio:null});case"render_started":return"idle"===e.kind?{...e,kind:"rendering"}:e;case"chart_missing":return"idle"===e.kind?{...K(e),kind:"failed",error:t.error}:e;case"layout_measured":return"rendering"===e.kind&&e.aspectRatio!==t.aspectRatio?{...e,aspectRatio:t.aspectRatio}:e;case"render_succeeded":return"rendering"===e.kind?{...K(e),kind:"ready",blob:t.blob,previewUrl:t.previewUrl,canNativeShare:t.canNativeShare}:e;case"render_failed":return"rendering"===e.kind?{...K(e),kind:"failed",error:t.error}:e;case"recapture_scheduled":return"recapture_pending"===e.kind?e:{...K(e),kind:"recapture_pending"};case"recapture_elapsed":case"observers_detached":return"recapture_pending"===e.kind?{...K(e),kind:"idle"}:e;default:return t}}(h.current,e);t!==h.current&&(h.current=t,f(t))},[]),m=(0,n.useRef)(0),g=(0,n.useRef)(null),{isOpen:y}=d,v="ready"===d.kind?d.blob:null,b="ready"===d.kind?d.previewUrl:null,x="rendering"===d.kind;(0,n.useEffect)(()=>{if(b)return()=>URL.revokeObjectURL(b)},[b]);let w=(0,n.useMemo)(()=>{var e,r;let n,i;return e=t.title,r=new Date,n=e.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"").slice(0,60),i=r.toISOString().slice(0,10),`openrouter-${n||"chart"}-${i}.png`},[t.title]),k=(0,n.useCallback)(()=>{var e;return{...t,url:("function"==typeof(e=t).url?e.url():e.url)??globalThis.location.href}},[t]),S=(0,n.useCallback)(e=>{m.current+=1,p(e)},[p]),j=(o="function"==typeof t.url?"":t.url,[t.title,t.subtitle,t.source,o,r].join("\0"));(0,n.useEffect)(()=>()=>S({type:"key_changed"}),[j,S]);let N=(0,n.useCallback)(async()=>{var t;let r,n,i;if("rendering"===d.kind||"ready"===d.kind||"failed"===d.kind||"recapture_pending"===h.current.kind)return;let a=e?eu(e):null;if(!e||!a)return void p({type:"chart_missing",error:s("This chart has nothing to share yet.")});let o=++m.current;g.current=ep(a),p({type:"render_started"});let c=await eP({svg:a,meta:k(),palette:((r=e.ownerDocument.createElement("span")).setAttribute(ez,""),r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.visibility="hidden",e.append(r),i={background:(n=e=>{let t=eI[e];for(let e of[`hsl(var(${t}))`,`var(${t})`]){r.style.backgroundColor=e;let t=globalThis.getComputedStyle(r).backgroundColor;if(t&&"rgba(0, 0, 0, 0)"!==t)return t}return eD[e]})("background"),foreground:n("foreground"),mutedForeground:n("mutedForeground"),border:n("border")},r.remove(),i),fontFamily:globalThis.getComputedStyle(e).fontFamily||"sans-serif",imageLayout:l,onLayout:e=>{o===m.current&&p({type:"layout_measured",aspectRatio:`${e.width} / ${e.height}`})}}).catch(()=>(0,L.Y)("chart image rendering threw"));if(o===m.current){let e;if((0,L.V)(c))return void p({type:"render_failed",error:s("The chart image could not be created.")});p({type:"render_succeeded",blob:c.data,previewUrl:URL.createObjectURL(c.data),canNativeShare:(t=new File([c.data],w,{type:V}),e=globalThis.navigator,"function"==typeof e?.canShare&&e.canShare({files:[t]}))})}},[d.kind,p,e,s,r,i,k,w,l]);(0,n.useEffect)(()=>{y&&N()},[y,N]),(0,n.useEffect)(()=>{let t;if(!y||!e)return;let r=()=>{clearTimeout(t),"recapture_pending"!==h.current.kind&&S({type:"recapture_scheduled"}),t=setTimeout(()=>{p({type:"recapture_elapsed"})},a)},n=new MutationObserver(t=>{var n,i;let a;t.some(eV)&&("recapture_pending"===h.current.kind||(n=e,i=g.current,null===(a=eu(n))||null===i||ep(a)!==i))&&r()});n.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0});let i=new MutationObserver(r);return i.observe(e.ownerDocument.documentElement,{attributes:!0,attributeFilter:eF}),()=>{clearTimeout(t),p({type:"observers_detached"}),n.disconnect(),i.disconnect()}},[y,e,S,p,a]);let O=(0,n.useCallback)(e=>{e?(S({type:"opened"}),u.capture("share_chart_open",{surface:r,variant:i,...k().analytics})):p({type:"closed"})},[u,r,i,k,S,p]),C=(0,n.useCallback)(async e=>{u.capture("share_chart_action",{surface:r,variant:i,action:e,...k().analytics});let t=await eU[e]({blob:v,meta:k(),filename:w,gt:s});return(0,L.V)(t)?((0,D.c)({title:s("Sharing failed"),description:t.error,variant:"destructive"}),!1):(t.data&&(0,D.c)({title:t.data,variant:"success"}),!0)},[u,r,i,v,k,w,s]);return{previewUrl:b,previewAspectRatio:d.aspectRatio,isRendering:x,renderError:"failed"===d.kind?d.error:null,canNativeShare:"ready"===d.kind&&d.canNativeShare,isOpen:y,setOpen:O,run:C}}(i),{isOpen:E,setOpen:P}=C;return f[7]!==j||f[8]!==E||f[9]!==P?(a=()=>{j&&E&&P(!1)},o=[j,E,P],f[7]=j,f[8]=E,f[9]=P,f[10]=a,f[11]=o):(a=f[10],o=f[11]),(0,n.useEffect)(a,o),f[12]!==h?(s=(0,t.jsx)("div",{ref:O,children:h}),f[12]=h,f[13]=s):s=f[13],f[14]!==j||f[15]!==x||f[16]!==w||f[17]!==C||f[18]!==s||f[19]!==S?(u=(0,t.jsx)(eB,{variant:S,share:C,disabled:j,menuActions:x,menuTriggerReveal:w,children:s}),f[14]=j,f[15]=x,f[16]=w,f[17]=C,f[18]=s,f[19]=S,f[20]=u):u=f[20],f[21]!==y||f[22]!==u?(d=(0,t.jsx)("div",{className:y,children:u}),f[21]=y,f[22]=u,f[23]=d):d=f[23],d}],623578)},447906,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(623578),i=e.i(199168),a=e.i(402600),l=e.i(463686),o=e.i(950008),s=e.i(369677);let c=[];e.s(["f",0,function(e){let u,d,f,h,p,m,g,y,v=(0,r.c)(30),{sectionId:b,chartId:x,title:w,filters:k,inSectionTitle:S,enabled:j,source:N,children:O}=e,C=void 0===k?c:k,E=void 0!==S&&S,P=(0,i.o)(),{model:A}=(0,s.useModelPage)(),M=(0,a.f)()??"",R=(0,l.useSearchParams)()?.toString()??"",_=""===R?"":`?${R}`;v[0]!==x||v[1]!==M||v[2]!==b||v[3]!==_?(u=function({origin:e,pathname:t,search:r,sectionId:n,chartId:i}){return{url:`${e}${t}${r}#${n}`,tracking:{campaign:"model_page_chart",content:`${n}:${i}`},analytics:{section:n,chart:i}}}({origin:globalThis.location?.origin??"",pathname:M,search:_,sectionId:b,chartId:x}),v[0]=x,v[1]=M,v[2]=b,v[3]=_,v[4]=u):u=v[4];let T=u,$=!(void 0===j||j);if(v[5]!==x||v[6]!==b)d=`model_page_${b}_${x}`,v[5]=x,v[6]=b,v[7]=d;else d=v[7];return v[8]!==P||v[9]!==A.short_name||v[10]!==w?(f=P("{modelName} — {title}",{modelName:A.short_name,title:w}),v[8]=P,v[9]=A.short_name,v[10]=w,v[11]=f):f=v[11],v[12]!==C?(h=0===C.length?void 0:C.join(" · "),v[12]=C,v[13]=h):h=v[13],v[14]!==P||v[15]!==N?(p=N??P("Source: OpenRouter"),v[14]=P,v[15]=N,v[16]=p):p=v[16],v[17]!==T||v[18]!==p||v[19]!==f||v[20]!==h?(m={title:f,subtitle:h,source:p,...T},v[17]=T,v[18]=p,v[19]=f,v[20]=h,v[21]=m):m=v[21],v[22]!==E?(g=E&&(0,t.jsx)(o.ModelSectionSharePortal,{}),v[22]=E,v[23]=g):g=v[23],v[24]!==O||v[25]!==m||v[26]!==g||v[27]!==$||v[28]!==d?(y=(0,t.jsxs)(n.f,{disabled:$,surface:d,meta:m,children:[g,O]}),v[24]=O,v[25]=m,v[26]=g,v[27]=$,v[28]=d,v[29]=y):y=v[29],y}],447906)}]); //# sourceMappingURL=3dyjx_qvwhs0_.js.map