semiotic 3.8.8 → 3.8.9
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/CLAUDE.md +5 -4
- package/README.md +44 -44
- package/ai/schema.json +263 -1
- package/ai/surface-manifest.json +1 -1
- package/ai/system-prompt.md +1 -1
- package/dist/chunk-chunk-2X3FJCME.module.min.js +1 -0
- package/dist/{chunk-chunk-UEZ6SHW5.module.min.js → chunk-chunk-2ZHHWZQM.module.min.js} +1 -1
- package/dist/chunk-chunk-5ZON5NMV.module.min.js +2 -0
- package/dist/{chunk-chunk-L6FFYGYS.module.min.js → chunk-chunk-6S3YGYW7.module.min.js} +1 -1
- package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +2 -0
- package/dist/chunk-chunk-A3I4HBD5.module.min.js +1 -0
- package/dist/{chunk-chunk-4MLLQUGW.module.min.js → chunk-chunk-AFQHURLO.module.min.js} +1 -1
- package/dist/{chunk-chunk-OG3TTJGJ.module.min.js → chunk-chunk-DDB4TLQG.module.min.js} +1 -1
- package/dist/{chunk-chunk-W5HWGQMD.module.min.js → chunk-chunk-DTH3SUOU.module.min.js} +1 -1
- package/dist/{chunk-chunk-H5IFO6CU.module.min.js → chunk-chunk-DVCWU7MT.module.min.js} +1 -1
- package/dist/{chunk-chunk-JRHXQGEV.module.min.js → chunk-chunk-FSIHAW6L.module.min.js} +1 -1
- package/dist/{chunk-chunk-BWV55BZK.module.min.js → chunk-chunk-G2RGVEYY.module.min.js} +1 -1
- package/dist/chunk-chunk-HAJVODLO.module.min.js +2 -0
- package/dist/{chunk-chunk-BZNOAHJV.module.min.js → chunk-chunk-HIV7AW2V.module.min.js} +1 -1
- package/dist/{chunk-chunk-LJDH3WV3.module.min.js → chunk-chunk-JZAMMSQQ.module.min.js} +1 -1
- package/dist/{chunk-chunk-VUWYT7DY.module.min.js → chunk-chunk-MXMRXSCI.module.min.js} +1 -1
- package/dist/chunk-chunk-MXVBXFKW.module.min.js +2 -0
- package/dist/{chunk-chunk-7LE56WAE.module.min.js → chunk-chunk-OFAP623Y.module.min.js} +1 -1
- package/dist/{chunk-chunk-SFLUSZ73.module.min.js → chunk-chunk-OHLRAEQZ.module.min.js} +1 -1
- package/dist/{chunk-chunk-CD6PVVS3.module.min.js → chunk-chunk-PRNXOCYZ.module.min.js} +1 -1
- package/dist/chunk-chunk-RLKZVJMQ.module.min.js +2 -0
- package/dist/chunk-chunk-SK2TQMG4.module.min.js +2 -0
- package/dist/chunk-chunk-SKLYXNYW.module.min.js +2 -0
- package/dist/{chunk-chunk-57RBPDBQ.module.min.js → chunk-chunk-U4NZCU5T.module.min.js} +1 -1
- package/dist/{chunk-chunk-QQJNG23C.module.min.js → chunk-chunk-VKL6DI43.module.min.js} +1 -1
- package/dist/chunk-chunk-W62673ZE.module.min.js +1 -0
- package/dist/{chunk-chunk-WSDJFBKX.module.min.js → chunk-chunk-XCC25CZZ.module.min.js} +1 -1
- package/dist/{chunk-chunk-AF53TBSN.module.min.js → chunk-chunk-XECNOUZY.module.min.js} +1 -1
- package/dist/{chunk-chunk-FC3NZWYR.module.min.js → chunk-chunk-XYZDTYAF.module.min.js} +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +54 -1
- package/dist/components/charts/physics/chainReactionTypes.d.ts +1 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +2 -0
- package/dist/components/charts/shared/formatUtils.d.ts +40 -9
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -0
- package/dist/components/charts/shared/types.d.ts +8 -1
- package/dist/components/semiotic-utils-core.d.ts +1 -0
- package/dist/components/semiotic.d.ts +4 -3
- package/dist/components/stream/GeoTileRenderer.d.ts +1 -0
- package/dist/components/stream/canvasSetup.d.ts +15 -4
- package/dist/components/stream/geoTypes.d.ts +2 -0
- package/dist/components/stream/networkFramePaint.d.ts +8 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/ordinalTypes.d.ts +2 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -0
- package/dist/components/stream/pipelineConfig.d.ts +2 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
- package/dist/components/stream/types.d.ts +8 -1
- package/dist/components/stream/useCanvasFrameHost.d.ts +9 -0
- package/dist/components/stream/xyFrameAxisTypes.d.ts +5 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +1 -0
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic.d.ts +4 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-chunk-3GCILWPB.module.min.js +0 -2
- package/dist/chunk-chunk-46KRGJQP.module.min.js +0 -1
- package/dist/chunk-chunk-7T25U75Z.module.min.js +0 -2
- package/dist/chunk-chunk-BTZYH2IE.module.min.js +0 -1
- package/dist/chunk-chunk-FRGBMTZR.module.min.js +0 -1
- package/dist/chunk-chunk-HCNDE26Q.module.min.js +0 -2
- package/dist/chunk-chunk-JJ4BSUYL.module.min.js +0 -2
- package/dist/chunk-chunk-N3Q33XCB.module.min.js +0 -2
- package/dist/chunk-chunk-RGJ6TKAH.module.min.js +0 -2
- package/dist/chunk-chunk-WGROBM3I.module.min.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{STREAMING_PALETTE as e,createColorScale as t,distinctCategories as r,filterSparseArray as o,getCrosshairProps as n,resolveMobileInteraction as a,useCategoryColors as i,useChartLegendAndMargin as l,useChartMode as c,useChartSelection as u,useColorScale as s,useLegendInteraction as g,useThemeCategorical as d}from"./chunk-chunk-
|
|
2
|
+
import{STREAMING_PALETTE as e,createColorScale as t,distinctCategories as r,filterSparseArray as o,getCrosshairProps as n,resolveMobileInteraction as a,useCategoryColors as i,useChartLegendAndMargin as l,useChartMode as c,useChartSelection as u,useColorScale as s,useLegendInteraction as g,useThemeCategorical as d}from"./chunk-chunk-SK2TQMG4.module.min.js";import{useThemeSelector as h}from"./chunk-chunk-PMR47KRY.module.min.js";import{renderEmptyState as m,renderLoadingState as p}from"./chunk-chunk-ACLDBMRH.module.min.js";import{useMemo as y}from"react";function f(e){const t=h(e=>e.theme.colors.selectionOpacity);return y(()=>{if(void 0!==e||void 0!==t)return{name:e?.name??"",...e,unselectedOpacity:e?.unselectedOpacity??t}},[e,t])}import{useCallback as v,useMemo as L,useState as b}from"react";function k(c){const{data:h,rawData:y,colorBy:k,colorScheme:C,legendInteraction:H,legendPosition:S,selection:w,linkedHover:M,fallbackFields:D,unwrapData:I=!1,onObservation:B,chartType:R,chartId:P,showLegend:F,legend:T,legendLayout:A,userMargin:x,marginDefaults:O,onClick:W,hoverHighlight:j,mobileInteraction:G,mobileSemantics:z,loading:K,loadingContent:N,emptyContent:_,width:Q,height:V,hasTitle:Y,axisChrome:q}=c,E=void 0===y,J=L(()=>o(h),[h]),[U,X]=b([]),Z=v(e=>{X(t=>t.length===e.length&&t.every((t,r)=>t===e[r])?t:e)},[]),$="string"==typeof k?k:void 0,ee=L(()=>a(G,{width:Q,mobileSemantics:z}),[G,Q,z]),{activeSelectionHook:te,hoverSelectionHook:re,customHoverBehavior:oe,customClickBehavior:ne,crosshairSourceId:ae}=u({selection:w,linkedHover:M,fallbackFields:D,unwrapData:I,onObservation:B,chartType:R,chartId:P,onClick:W,hoverHighlight:j,colorByField:$,mobileInteraction:ee}),ie=n(M,ae),le=s(J,k,C),ce=L(()=>r(J,k),[J,k]),ue=L(()=>E&&U.length>0?U:ce,[E,U,ce]),se=g(H,k,ue),ge=L(()=>re||(se.legendSelectionHook?se.legendSelectionHook:te),[re,se.legendSelectionHook,te]),de=f(w),he=d(),me=i(),pe=L(()=>{if(le)return le;if(!k||0===ue.length)return;const r=Array.isArray(C)&&C.length>0||"string"==typeof C&&C.length>0?C:he&&he.length>0?he:e,o="__streamCat",n=ue.map(e=>({[o]:e})),a=t(n,o,r);return e=>me?.[e]||a(e)||"#999"},[le,k,ue,C,he,me]),{legend:ye,margin:fe,legendPosition:ve}=l({data:J,colorBy:k,colorScale:pe,showLegend:F,legendPosition:S,userMargin:x,defaults:O,categories:ue,additionalLegend:T,chartWidth:Q,legendLayout:A,hasTitle:Y,axisChrome:q}),Le=L(()=>{const e={};return ye&&(e.legend=ye,e.legendPosition=ve,A&&(e.legendLayout=A)),H&&"none"!==H&&(e.legendHoverBehavior=se.onLegendHover,e.legendClickBehavior=se.onLegendClick,e.legendHighlightedCategory=se.highlightedCategory,e.legendIsolatedCategories=se.isolatedCategories),E&&k&&(e.legendCategoryAccessor=k,e.onCategoriesChange=Z),e},[ye,ve,A,H,se.onLegendHover,se.onLegendClick,se.highlightedCategory,se.isolatedCategories,E,k,Z]),be=Array.isArray(y)?o(y):y,ke=p(K,Q,V,N),Ce=ke?null:m(be,Q,V,_);return{data:J,colorScale:le,allCategories:ue,legendState:se,effectiveSelectionHook:ge,activeSelectionHook:te,customHoverBehavior:oe,customClickBehavior:ne,mobileInteraction:ee,legend:ye,margin:fe,legendPosition:ve,earlyReturn:ke||Ce||null,legendBehaviorProps:Le,crosshairProps:ie,resolvedSelection:de}}import{useImperativeHandle as C,useRef as H}from"react";function S(e,t){const{variant:r,frameRef:o,overrides:n}=t,a=H(n);a.current=n,C(e,()=>{const e=function(e,t){if("xy"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.remove(t)??[],update:(t,r)=>e.current?.update(t,r)??[],replace:t=>e.current?.replace?.(t),clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getScales:()=>e.current?.getScales()??null,getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("network"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>{const r=Array.isArray(t)?t:[t],o=e.current?.getTopology()?.nodes??[],n=[];for(const t of r){const r=o.find(e=>e.id===t);r&&n.push({...r.data??{},id:t}),e.current?.removeNode(t)}return n},update:(t,r)=>(Array.isArray(t)?t:[t]).flatMap(t=>{const o=e.current?.updateNode(t,r);return o?[{...o,id:t}]:[]}),clear:()=>e.current?.clear(),getData:()=>e.current?.getTopology()?.nodes?.map(e=>e.data)??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("geo-points"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.removePoint(t)??[],update:(t,r)=>{const o=e.current?.removePoint(t)??[];for(const t of o)e.current?.push(r(t));return o},clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}const r=t;return{push:e=>r.current?.pushLine(e),pushMany:e=>r.current?.pushManyLines(e),remove:e=>r.current?.removeLine(e)??[],update:(e,t)=>{const o=r.current?.removeLine(e)??[];for(const e of o)r.current?.pushLine(t(e));return o},clear:()=>r.current?.clear(),getData:()=>r.current?.getLines()??[],getCustomLayout:()=>r.current?.getCustomLayout?.()??null,getLayoutFailure:()=>r.current?.getLayoutFailure?.()??null}}(r,o);return new Proxy(e,{get(e,t,r){if("string"==typeof t){const e=a.current?.[t];if("function"==typeof e)return e}return Reflect.get(e,t,r)},has:(e,t)=>!("string"!=typeof t||!a.current||!(t in a.current))||Reflect.has(e,t)})},[])}function w(e,t){if(!function(e){return void 0!==e.stroke||void 0!==e.strokeWidth||void 0!==e.opacity}(t))return e??((...e)=>({}));const r={};return void 0!==t.stroke&&(r.stroke=t.stroke),void 0!==t.strokeWidth&&(r.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(r.opacity=t.opacity),e?(...t)=>({...e(...t)||{},...r}):(...e)=>({...r})}function M(e){if(null==e)return;if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};const t={};return"number"==typeof e.top&&(t.top=e.top),"number"==typeof e.right&&(t.right=e.right),"number"==typeof e.bottom&&(t.bottom=e.bottom),"number"==typeof e.left&&(t.left=e.left),t}import{useMemo as D,useRef as I}from"react";function B(e){const t=I(null);return S(e.imperativeRef,{variant:e.imperativeVariant,frameRef:t}),{frameRef:t,resolved:c(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),normalizedMargin:D(()=>M(e.margin),[e.margin])}}function R(e){const t=B(e),{resolved:r,normalizedMargin:o}=t,n=k({data:e.data??[],rawData:e.data,colorBy:e.colorBy,colorScheme:e.colorScheme,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,selection:e.selection,linkedHover:e.linkedHover,hoverHighlight:e.hoverHighlight,fallbackFields:"string"==typeof e.colorBy?[e.colorBy]:[],unwrapData:e.unwrapData,onObservation:e.onObservation,onClick:e.onClick,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,chartType:e.chartTypeLabel,chartId:e.chartId,showLegend:r.showLegend,legend:e.legend,userMargin:o,marginDefaults:r.marginDefaults,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,width:r.width,height:r.height});return{...t,safeData:n.data,setup:n,earlyReturn:n.earlyReturn}}export{f as useResolvedSelection,k as useChartSetup,S as useFrameImperativeHandle,w as mergeShapeStyle,M as normalizePartialMargin,B as useCustomChartScaffold,R as useCustomChartSetup};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{buildRegressionAnnotation as e}from"./chunk-chunk-YCQYG6J5.module.min.js";import{mergeShapeStyle as t,normalizePartialMargin as o,useChartSetup as i,useCustomChartSetup as n,useFrameImperativeHandle as r,useResolvedSelection as a}from"./chunk-chunk-MXMRXSCI.module.min.js";import{validateArrayData as s}from"./chunk-chunk-J5QD4RAM.module.min.js";import{StreamXYFrame_default as l}from"./chunk-chunk-FSIHAW6L.module.min.js";import{normalizeColorGradient as c,normalizeGradient as h,normalizeSemanticGradient as d,reverseGradient as u}from"./chunk-chunk-U4NZCU5T.module.min.js";import{accessorName as m,bandTooltipFields as p,buildBaseMetadataProps as y,buildCustomBehaviorProps as f,buildDefaultTooltip as g,buildTooltipProps as x}from"./chunk-chunk-DVCWU7MT.module.min.js";import{useCustomLayoutSelection as b}from"./chunk-chunk-5UKL5W76.module.min.js";import{makeXYRuleContext as v,resolveStyleRules as A}from"./chunk-chunk-EMO5NUGE.module.min.js";import{COLOR_SCHEMES as w,DEFAULT_COLOR as k,DEFAULT_COLORS as S,DEFAULT_SELECTION_OPACITY as C,LinkedCharts as L,MultiPointTooltip as R,composeLegendConfigs as _,defaultTooltipStyle as H,filterSparseArray as I,getColor as P,getCrosshairProps as B,getSequentialInterpolator as F,getSize as D,interpolateViridis as N,normalizeLinkedBrush as M,normalizeTooltip as W,resolveDefaultFill as O,resolveMobileInteraction as T,resolveMultiCapableTooltip as E,resolveXYAxisChrome as G,useBrushSelection as j,useChartLegendAndMargin as z,useChartMode as V,useChartSelection as $,useColorScale as Q,useLegendInteraction as X,useSelection as Y,useSelectionSelector as U,useThemeCategorical as q,useThemeSequential as K,wrapStyleWithSelection as J}from"./chunk-chunk-SK2TQMG4.module.min.js";import{getMax as Z,getMinMax as ee}from"./chunk-chunk-2NVFEB7P.module.min.js";import{useTheme as te}from"./chunk-chunk-PMR47KRY.module.min.js";import{ChartError as oe,SafeRender as ie,renderEmptyState as ne,renderLoadingState as re,warnMissingField as ae}from"./chunk-chunk-ACLDBMRH.module.min.js";import*as se from"react";import{useMemo as le,useCallback as ce,forwardRef as he,useRef as de}from"react";import{useMemo as ue}from"react";function me(e){const{colorBy:o,colorScale:i,color:n,pointRadius:r=5,radiusFn:a,fillOpacity:s=1,fallbackFill:l,baseStyleExtras:c,stroke:h,strokeWidth:d,opacity:u,effectiveSelectionHook:m,resolvedSelection:p,colorDatumAccessor:y,styleRules:f,ruleContext:g}=e,x=ue(()=>e=>{const t="function"==typeof c?c(e):c,h=t?{...t}:{};if(void 0===h.fillOpacity&&(h.fillOpacity=s),void 0===h.fill)if(o){if(i){const t=y?y(e):e;h.fill=P(t,o,i)}}else h.fill=l?l(e):n||k;return void 0===h.r&&(h.r=a?a(e):r),f&&f.length>0&&Object.assign(h,A(e,f,g?g(e):{value:void 0})),h},[o,i,n,r,a,s,l,c,y,f,g]),b=ue(()=>t(x,{stroke:h,strokeWidth:d,opacity:u}),[x,h,d,u]);return ue(()=>J(b,m??null,p),[b,m,p])}import{useCallback as pe,useMemo as ye,useRef as fe,useState as ge}from"react";function xe(e){const{accessor:t,data:o,isPushMode:i}=e,n=fe(null),[r,a]=ge(0),s=pe(e=>{if(!i||!t)return;let o=!1;for(const i of e){const e="function"==typeof t?t(i):i[t];if(null==e)continue;const r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(n.current?(n.current[0]>r&&(n.current[0]=r,o=!0),r>n.current[1]&&(n.current[1]=r,o=!0)):(n.current=[r,r],o=!0))}o&&a(e=>e+1)},[i,t]),l=pe(()=>{i&&(n.current=null,a(e=>e+1))},[i]);return{domain:ye(()=>{if(i)return n.current??void 0;if(!t||0===o.length)return;const e="function"==typeof t?t:e=>e[t];let r=1/0,a=-1/0;for(const t of o){const o=e(t);if(null==o)continue;const i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(r>i&&(r=i),i>a&&(a=i))}return Number.isFinite(r)&&Number.isFinite(a)?[r,a]:void 0},[o,t,i,r]),trackPushed:s,reset:l}}import{useEffect as be,useMemo as ve,useRef as Ae,useState as we}from"react";var ke="__forecastSegment",Se=null;async function Ce(){return Se||(Se=await import("./chunk-statisticalOverlays-HMYYSGPE.module.min.js")),Se}var Le="__semiotic_resolvedX",Re="__semiotic_resolvedY";function _e(e){const{data:t,xAccessor:o,yAccessor:i,forecast:n,anomaly:r,groupBy:a}=e,s="string"==typeof o?o:Le,l="string"==typeof i?i:Re,c=ve(()=>{if(!n&&!r)return t;const e="function"==typeof o,a="function"==typeof i;return e||a?t.map(t=>{const n={...t};return e&&(n[Le]=o(t)),a&&(n[Re]=i(t)),n}):t},[t,n,r,o,i]),[h,d]=we(null),[u,m]=we([]),p=Ae(n),y=Ae(r);return be(()=>{if(!n&&!r)return void((p.current||y.current)&&(d(null),m([]),p.current=n,y.current=r));let e=!1;const t=n!==p.current||r!==y.current;if(p.current=n,y.current=r,t&&(d(null),m([])),n){const t=a&&"string"==typeof a&&"object"==typeof n?{...n,_groupBy:a}:n;(async function(...e){return(await Ce()).buildForecast(...e)})(c,s,l,t,r).then(t=>{e||(d(t),m(t.annotations))}).catch(()=>{e||(d(null),m([]))})}else r&&async function(...e){return(await Ce()).buildAnomalyAnnotations(...e)}(r).then(t=>{e||(d(null),m(t))}).catch(()=>{e||m([])});return()=>{e=!0}},[c,n,r,s,l,a]),{effectiveData:h?h.processedData:t,statisticalAnnotations:u,hasForecast:!!h,xAccessorKey:s,yAccessorKey:l}}import{jsx as He}from"react/jsx-runtime";var Ie=he(function(t,o){const n=de(null),a=V(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:c,margin:h,className:d,xFormat:u,yFormat:p,xAccessor:b="x",yAccessor:A="y",xScaleType:w,yScaleType:k,colorBy:S,colorScheme:C,styleRules:L,sizeBy:R,sizeRange:_=[3,15],symbolBy:H,symbolMap:P,pointRadius:B=5,pointOpacity:F=.8,tooltip:N,marginalGraphics:W,pointIdAccessor:O,annotations:T,regression:E,forecast:z,anomaly:$,xExtent:Q,yExtent:X,frameProps:Y={},selection:U,linkedHover:q,linkedBrush:K,onObservation:J,onClick:Z,hoverHighlight:ee,chartId:te,loading:ne,loadingContent:re,emptyContent:he,legendInteraction:ue,legendPosition:pe,color:ye,stroke:fe,strokeWidth:ge,opacity:be}=t,{width:ve,height:Ae,enableHover:we,showGrid:ke,showLegend:Se,title:Ce,description:Le,summary:Re,accessibleTable:Ie,xLabel:Pe,yLabel:Be}=a,Fe=le(()=>I(c),[c]),De=void 0===c,{domain:Ne,trackPushed:Me,reset:We}=xe({accessor:R,data:Fe,isPushMode:De}),Oe=ce(e=>{Me([e]),n.current?.push(e)},[Me]),Te=ce(e=>{Me(e),n.current?.pushMany(e)},[Me]);r(o,{variant:"xy",frameRef:n,overrides:{push:Oe,pushMany:Te,clear:()=>{We(),n.current?.clear()}}});const Ee=i({data:Fe,rawData:c,colorBy:S,colorScheme:C,legendInteraction:ue,legendPosition:pe,selection:U,linkedHover:q,fallbackFields:S?["string"==typeof S?S:""]:[],unwrapData:!1,onObservation:J,onClick:Z,hoverHighlight:ee,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"Scatterplot",chartId:te,showLegend:Se,userMargin:h,marginDefaults:a.marginDefaults,loading:ne,loadingContent:re,emptyContent:he,width:ve,height:Ae,hasTitle:!!Ce,axisChrome:G({showAxes:a.showAxes,xLabel:Pe})}),Ge=M(K),je=j({name:Ge?.name||"__unused_brush__",xField:Ge?.xField||("string"==typeof b?b:void 0),yField:Ge?.yField||("string"==typeof A?A:void 0)}),ze=Ge?"xyBrush"===je.brushInteraction.brush?"xy":"xBrush"===je.brushInteraction.brush?"x":"y":void 0,Ve=se.useRef(je.brushInteraction);Ve.current=je.brushInteraction;const $e=ce(e=>{const t=Ve.current;t.end(e?"xyBrush"===t.brush?[[e.x[0],e.y[0]],[e.x[1],e.y[1]]]:"xBrush"===t.brush?e.x:e.y:null)},[]);ae("Scatterplot",Fe,"xAccessor",b),ae("Scatterplot",Fe,"yAccessor",A);const Qe=le(()=>R?Ne??[0,1]:void 0,[R,Ne]),Xe=le(()=>R?e=>D(e,R,_,Qe):void 0,[R,_,Qe]),Ye=le(()=>v(b,A),[b,A]),Ue=me({colorBy:S,colorScale:Ee.colorScale,color:ye,pointRadius:B,fillOpacity:F,radiusFn:Xe,stroke:fe,strokeWidth:ge,opacity:be,styleRules:L,ruleContext:Ye,effectiveSelectionHook:Ee.effectiveSelectionHook,resolvedSelection:Ee.resolvedSelection}),qe=le(()=>g([{label:Pe||m(b),accessor:b,role:"x",format:u},{label:Be||m(A),accessor:A,role:"y",format:p},...S?[{label:m(S),accessor:S,role:"color"}]:[],...R?[{label:m(R),accessor:R,role:"size"}]:[]]),[b,A,Pe,Be,S,R,u,p]),{effectiveData:Ke,statisticalAnnotations:Je}=_e({data:Fe,xAccessor:b,yAccessor:A,forecast:z,anomaly:$}),Ze=le(()=>{const t=e(E);return t||0!==Je.length?[...t?[t]:[],...T||[],...Je]:T},[E,T,Je]);if(Ee.earlyReturn)return Ee.earlyReturn;const et=s({componentName:"Scatterplot",data:c,accessors:{xAccessor:b,yAccessor:A}});if(et)return He(oe,{componentName:"Scatterplot",message:et,width:ve,height:Ae});const tt={chartType:"scatter",...null!=c&&{data:Ke},xAccessor:b,yAccessor:A,xScaleType:w,yScaleType:k,colorAccessor:S||void 0,sizeAccessor:R||void 0,...H&&{symbolAccessor:H},...P&&{symbolMap:P},sizeRange:_,pointStyle:Ue,colorScheme:C,size:[ve,Ae],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:Ee.margin,showAxes:a.showAxes,xLabel:Pe,yLabel:Be,xFormat:u,yFormat:p,enableHover:we,showGrid:ke,...Ee.legendBehaviorProps,...y({title:Ce,description:Le,summary:Re,accessibleTable:Ie,className:d,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...x({tooltip:N,defaultTooltipContent:qe}),...f({linkedHover:q,selection:U,onObservation:J,onClick:Z,hoverHighlight:ee,mobileInteraction:Ee.mobileInteraction,customHoverBehavior:Ee.customHoverBehavior,customClickBehavior:Ee.customClickBehavior}),...W&&{marginalGraphics:W},...O&&{pointIdAccessor:O},...Ze&&Ze.length>0&&{annotations:Ze},...Q&&{xExtent:Q},...X&&{yExtent:X},...Ge&&{brush:{dimension:ze},onBrush:$e},...Ee.crosshairProps,...Y};return He(ie,{componentName:"Scatterplot",width:ve,height:Ae,children:He(l,{ref:n,...tt})})});Ie.displayName="Scatterplot";import{useMemo as Pe,forwardRef as Be,useRef as Fe}from"react";import{Fragment as De,jsx as Ne}from"react/jsx-runtime";function Me(e,t){return N(1===t?.5:e/(t-1))}var We=Be(function(t,o){const n=Fe(null);r(o,{variant:"xy",frameRef:n});const a=V(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:c,margin:h,className:d,xFormat:u,yFormat:p,xAccessor:b="x",yAccessor:A="y",orderAccessor:w,orderLabel:k,styleRules:S,pointRadius:L=4,tooltip:R,pointIdAccessor:_,annotations:H,regression:I,forecast:P,anomaly:B,xExtent:F,yExtent:D,frameProps:N={},selection:M,linkedHover:W,onObservation:O,onClick:T,hoverHighlight:E,chartId:j,loading:z,loadingContent:$,emptyContent:Q,legendInteraction:X,stroke:Y,strokeWidth:U,opacity:q}=t,{width:K,height:J,enableHover:Z,showGrid:ee,title:te,description:ne,summary:re,accessibleTable:se,xLabel:le,yLabel:ce}=a,{safeData:he,orderMap:de}=Pe(()=>{const e=c||[],t="function"==typeof b?b:e=>e[b],o="function"==typeof A?A:e=>e[A];let i=e;if(w&&e.length>0){const t="function"==typeof w?w:e=>e[w];i=[...e].sort((e,o)=>{const i=t(e),n=t(o);return(i instanceof Date?i.getTime():+i)-(n instanceof Date?n.getTime():+n)})}const n=new WeakMap;let r=0;for(const e of i){const i=t(e),n=o(e);null!=i&&null!=n&&isFinite(i)&&isFinite(n)&&r++}let a=0;for(const e of i){const i=t(e),s=o(e);null!=i&&null!=s&&isFinite(i)&&isFinite(s)&&n.set(e,{idx:a++,total:r})}return{safeData:i,orderMap:n}},[c,w,b,A]);ae("ConnectedScatterplot",he,"xAccessor",b),ae("ConnectedScatterplot",he,"yAccessor",A);const ue=i({data:he,rawData:c,colorBy:void 0,colorScheme:void 0,legendInteraction:X,selection:M,linkedHover:W,fallbackFields:[],unwrapData:!1,onObservation:O,onClick:T,hoverHighlight:E,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"ConnectedScatterplot",chartId:j,showLegend:void 0,userMargin:h,marginDefaults:a.marginDefaults,loading:z,loadingContent:$,emptyContent:Q,width:K,height:J,hasTitle:!!te,axisChrome:G({showAxes:a.showAxes,xLabel:le})}),pe=ue.resolvedSelection?.unselectedOpacity??C,ye=Pe(()=>(e,t)=>{const o=t.filter(e=>"point"===e.type);if(2>o.length)return;const i=ue.effectiveSelectionHook?.isActive,n=ue.effectiveSelectionHook?.predicate,r=100>o.length,a=o.length;e.lineCap="round";for(let t=0;a-1>t;t++){const s=o[t],l=o[t+1],c=Me(t,a),h=!i||!n||n(s.datum??s)||n(l.datum??l),d=i?h?1:pe:1;r&&(e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(l.x,l.y),e.strokeStyle="white",e.lineWidth=L+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(l.x,l.y),e.strokeStyle=c,e.lineWidth=L,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[L,ue.effectiveSelectionHook,pe]),fe=Pe(()=>[ye],[ye]),ge=Pe(()=>(e,t,o)=>{const i=e.filter(e=>"point"===e.type);if(2>i.length)return null;const n=i.length,r=100>n,a=[];for(let e=0;n-1>e;e++){const t=i[e],o=i[e+1],s=Me(e,n),l=Math.min("number"==typeof t.style?.opacity?t.style.opacity:1,"number"==typeof o.style?.opacity?o.style.opacity:1);r&&a.push(Ne("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:"white",strokeWidth:L+2,strokeLinecap:"round",opacity:.5*l},"halo-"+e)),a.push(Ne("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:s,strokeWidth:L,strokeLinecap:"round",opacity:l},"seg-"+e))}return Ne(De,{children:a})},[L]),xe=Pe(()=>[ge],[ge]),be=me({colorScale:void 0,baseStyleExtras:Pe(()=>e=>{const t=de.get(e),o=t?.idx??0,i=t?.total??1;return{fill:i>0?Me(o,i):"#6366f1",stroke:"white",strokeWidth:1,r:L,fillOpacity:1}},[L,de]),stroke:Y,strokeWidth:U,opacity:q,styleRules:S,ruleContext:Pe(()=>v(b,A),[b,A]),effectiveSelectionHook:ue.effectiveSelectionHook,resolvedSelection:ue.resolvedSelection}),ve=k||("string"==typeof w?w:"Order"),Ae=Pe(()=>g([{label:le||m(b),accessor:b,role:"x",format:u},{label:ce||m(A),accessor:A,role:"y",format:p},...w?[{label:ve,accessor:w,role:"group"}]:[]]),[b,A,le,ce,w,ve,u,p]),we=s({componentName:"ConnectedScatterplot",data:c,accessors:{xAccessor:b,yAccessor:A}}),{effectiveData:ke,statisticalAnnotations:Se}=_e({data:he,xAccessor:b,yAccessor:A,forecast:P,anomaly:B});if(ue.earlyReturn)return ue.earlyReturn;const Ce=e(I),Le=Ce||Se.length>0?[...Ce?[Ce]:[],...H||[],...Se]:H,Re={chartType:"scatter",...null!=c&&{data:ke},xAccessor:b,yAccessor:A,pointStyle:be,size:[K,J],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:ue.margin,showAxes:a.showAxes,xLabel:le,yLabel:ce,xFormat:u,yFormat:p,enableHover:Z,showGrid:ee,...y({title:te,description:ne,summary:re,accessibleTable:se,className:d,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...x({tooltip:R,defaultTooltipContent:Ae}),...f({linkedHover:W,selection:M,onObservation:O,onClick:T,hoverHighlight:E,mobileInteraction:ue.mobileInteraction,customHoverBehavior:ue.customHoverBehavior,customClickBehavior:ue.customClickBehavior}),..._&&{pointIdAccessor:_},canvasPreRenderers:fe,svgPreRenderers:xe,...Le&&Le.length>0&&{annotations:Le},...F&&{xExtent:F},...D&&{yExtent:D},...ue.crosshairProps,...N};return we?Ne(oe,{componentName:"ConnectedScatterplot",message:we,width:K,height:J}):Ne(ie,{componentName:"ConnectedScatterplot",width:K,height:J,children:Ne(l,{ref:n,...Re})})});We.displayName="ConnectedScatterplot";import{useMemo as Oe,useCallback as Te,useState as Ee,useEffect as Ge,forwardRef as je,useRef as ze}from"react";import{useMemo as Ve}from"react";function $e(e){const{lineWidth:o=2,colorBy:i,colorScale:n,color:r,resolveStroke:a,fillArea:s,areaOpacity:l=.3,stroke:c,strokeWidth:h,opacity:d,effectiveSelectionHook:u,resolvedSelection:m,styleRules:p,ruleContext:y}=e,f=Ve(()=>function(e){const{lineWidth:t=2,colorBy:o,colorScale:i,color:n,resolveStroke:r,fillArea:a,areaOpacity:s=.3,styleRules:l,ruleContext:c}=e;return(e,h)=>{const d={strokeWidth:t},u=!0===a||Array.isArray(a)&&null!=h&&a.includes(h);let m;return r?m=r(e,h):o?i&&(m=P(e,o,i)):m=n||k,void 0!==m&&(d.stroke=m,u&&(d.fill=m,d.fillOpacity=s)),l?.length&&Object.assign(d,A(e,l,c?c(e,h):{value:void 0,category:h})),d}}({lineWidth:o,colorBy:i,colorScale:n,color:r,resolveStroke:a,fillArea:s,areaOpacity:l,styleRules:p,ruleContext:y}),[o,i,n,r,a,s,l,p,y]),g=Ve(()=>t(f,{stroke:c,strokeWidth:h,opacity:d}),[f,c,h,d]);return Ve(()=>J(g,u??null,m),[g,u,m])}import{jsx as Qe}from"react/jsx-runtime";var Xe="__lineObjectSeries",Ye=je(function(e,t){const o=ze(null);r(t,{variant:"xy",frameRef:o});const n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:h,className:d,xFormat:u,yFormat:y,axisExtent:x,xAccessor:b="x",yAccessor:A="y",lineBy:w,lineDataAccessor:S="coordinates",colorBy:C,colorScheme:L,styleRules:H,curve:B="linear",showPoints:F=!1,pointRadius:D=3,fillArea:N=!1,areaOpacity:M=.3,lineWidth:W=2,lineGradient:O,tooltip:T,pointIdAccessor:j,annotations:z,directLabel:$,gapStrategy:Q="break",anomaly:X,forecast:Y,band:U,xExtent:q,yExtent:K,frameProps:J={},selection:Z,linkedHover:ee,onObservation:te,onClick:ne,hoverHighlight:re,hoverRadius:se,chartId:le,loading:ce,loadingContent:he,emptyContent:de,legendInteraction:ue,legendPosition:me,legend:pe,xScaleType:ye,yScaleType:fe,color:ge,stroke:xe,strokeWidth:be,opacity:ve}=e,{legend:Ae,...we}=J,Se=Oe(()=>_(Ae,pe),[Ae,pe]),{width:Le,height:Re,enableHover:He,showGrid:Ie,showLegend:Pe,title:Be,description:Fe,summary:De,accessibleTable:Ne,xLabel:Me,yLabel:We}=n,je=Oe(()=>I(a),[a]),Ve=Array.isArray(je[0]?.[S])?je[0][S]:je;ae("LineChart",Ve,"xAccessor",b),ae("LineChart",Ve,"yAccessor",A);const{effectiveData:Ye,statisticalAnnotations:Ue}=_e({data:je,xAccessor:b,yAccessor:A,forecast:Y,anomaly:X,groupBy:w}),qe="__compoundGroup",Ke=!(!Y||!w),Je=Ke?qe:Y?ke:w,Ze=Oe(()=>{if(!Ke)return Ye;const e="function"==typeof w?w:e=>e[w];return Ye.map(t=>{const o={...t};return o[qe]=`${e(t)}__${t[ke]||"observed"}`,o})},[Ye,Ke,w]),et=Ke?Ze:Ye,tt=C||w,ot=Oe(()=>{if(!Y)return;const e=Y.upperBounds,t=Y.lowerBounds;if(!e&&!t)return;const o="function"==typeof e?e:"string"==typeof e?t=>t[e]:null,i="function"==typeof t?t:"string"==typeof t?e=>e[t]:null;let n=1/0,r=-1/0;const a=Ye;for(const e of a){const t="function"==typeof A?A(e):+e[A];if(isFinite(t)&&(n>t&&(n=t),t>r&&(r=t)),o){const t=o(e);null!=t&&isFinite(t)&&(t>r&&(r=t),n>t&&(n=t))}if(i){const t=i(e);null!=t&&isFinite(t)&&(n>t&&(n=t),t>r&&(r=t))}}return isFinite(n)&&isFinite(r)?[n,r]:void 0},[Y,Ye,A]),it=Te(e=>{const t="function"==typeof b?b(e):e[b],o="function"==typeof A?A(e):e[A];return null==t||null==o||Number.isNaN(t)||Number.isNaN(o)},[b,A]),nt=void 0!==et[0]?.[S],rt=nt?Xe:Je,at=Oe(()=>{if(nt)return et.map((e,t)=>{const o="function"==typeof w?w(e):"string"==typeof w?e[w]:void 0,i=null==o?"line-"+t:o+"",n=Array.isArray(e[S])?e[S]:[];return{...e,[Xe]:i,[S]:n.map(t=>({...t,[Xe]:i,parentLine:e,..."string"==typeof w&&void 0!==e[w]?{[w]:e[w]}:{}}))}});if(Je){const e=et.reduce((e,t)=>{const o="function"==typeof Je?Je(t):t[Je];if(!e[o]){const i={[S]:[]};"string"==typeof Je&&(i[Je]=o),Ke&&(i[ke]=t[ke],"string"==typeof w&&(i[w]=t[w])),e[o]=i}return e[o][S].push(t),e},{});return Object.values(e)}return[{[S]:et}]},[nt,Je,S,et,w,Ke]),{gapProcessedLineData:st,hasGaps:lt}=Oe(()=>{if("interpolate"===Q){let e=!1;const t=[];for(const o of at){const i=(o[S]||[]).filter(t=>!it(t)||(e=!0,!1));i.length>0&&t.push({...o,[S]:i})}return{gapProcessedLineData:t,hasGaps:e}}if("break"===Q){let e=!1;const t=[];for(const o of at){const i=o[S]||[];let n=[],r=0;const a=rt&&"string"==typeof rt?o[rt]:void 0;for(const s of i)if(it(s))e=!0,n.length>0&&(t.push({...o,[S]:n}),n=[],r++);else{const e=null!=a?`${a}__seg${r}`:"__seg"+r;n.push({...s,_gapSegment:e})}n.length>0&&t.push({...o,[S]:n})}return{gapProcessedLineData:t,hasGaps:e}}if("zero"===Q){let e=!1;const t="string"==typeof A?A:"y",o=[];for(const i of at){const n=i[S]||[],r=[];for(const o of n)it(o)?(e=!0,r.push({...o,[t]:0})):r.push(o);o.push({...i,[S]:r})}return{gapProcessedLineData:o,hasGaps:e}}return{gapProcessedLineData:at,hasGaps:!1}},[at,Q,S,it,rt,A]),ct="object"==typeof $?$:{},ht=ct.position||"end",dt=ct.fontSize||11,ut=Oe(()=>{if(!$||!tt)return[];const e="function"==typeof tt?tt:e=>e[tt],t=new Set;for(const o of st){const i=o[S]||[];if(0===i.length)continue;const n=e("end"===ht?i[i.length-1]:i[0])??e(o);if(null==n)continue;const r=n+"";""!==r&&t.add(r)}return Array.from(t)},[$,tt,st,S,ht]),mt=Oe(()=>{if(!$)return n.marginDefaults;const e=ut.reduce((e,t)=>Math.max(e,t.length*(.6*dt)),0)+10,t="end"===ht?"right":"left";return{...n.marginDefaults,[t]:Math.max(n.marginDefaults[t]||0,e)}},[$,ut,dt,ht,n.marginDefaults]),pt=i({data:Ye,rawData:a,colorBy:tt,colorScheme:L,legendInteraction:ue,legendPosition:me,selection:Z,linkedHover:ee,fallbackFields:tt?["string"==typeof tt?tt:""]:[],unwrapData:!1,onObservation:te,onClick:ne,hoverHighlight:re,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"LineChart",chartId:le,showLegend:(!$||void 0!==Pe)&&Pe,legend:Se,userMargin:h,marginDefaults:mt,loading:ce,loadingContent:he,emptyContent:de,width:Le,height:Re,hasTitle:!!Be,axisChrome:G({showAxes:n.showAxes,xLabel:Me})}),yt=pt.colorScale,ft=pt.effectiveSelectionHook,gt=pt.resolvedSelection,xt=pt.customHoverBehavior,bt=pt.customClickBehavior,vt=pt.crosshairProps,At=Oe(()=>{if(tt)return nt?e=>{const t=e.parentLine||e;return"function"==typeof tt?tt(t):t[tt]}:tt},[tt,nt]),wt=Oe(()=>v(b,A),[b,A]),kt=$e({lineWidth:W,colorBy:At,colorScale:yt,color:ge,fillArea:N,areaOpacity:M,stroke:xe,strokeWidth:be,opacity:ve,effectiveSelectionHook:ft,resolvedSelection:gt,styleRules:H,ruleContext:wt}),[St,Ct]=Ee(null);Ge(()=>{if(!Y)return void Ct(null);let e=!1;return async function(...e){return(await Ce()).createSegmentLineStyle(...e)}(kt,Y).then(t=>{e||Ct(()=>t)}).catch(()=>{e||Ct(null)}),()=>{e=!0}},[kt,Y]);const Lt=St||kt,Rt=Oe(()=>{if(F)return e=>{const t={r:D,fillOpacity:1};return tt?yt&&(t.fill=P(e.parentLine||e,tt,yt)):t.fill=ge||k,t}},[F,D,tt,yt,ge]),_t=Array.isArray(N)?"mixed":N?"area":"line",Ht=Oe(()=>{if(!$||!tt)return[];const e="function"==typeof b?b:e=>e[b],t="function"==typeof A?A:e=>e[A],o="function"==typeof tt?tt:e=>e[tt],i=new Map;for(const e of st){const t=e[S]||[];if(0===t.length)continue;const n="end"===ht?t[t.length-1]:t[0],r=o(n)??o(e);if(null==r)continue;const a=r+"";""===a||i.has(a)||i.set(a,n)}const n=Array.from(i.entries()).map(([o,i])=>({type:"text",label:o,["string"==typeof b?b:"x"]:e(i),["string"==typeof A?A:"y"]:t(i),dx:"end"===ht?6:-6,dy:0,color:yt?yt(o):k,fontSize:dt}));n.sort((e,t)=>{const o="string"==typeof A?A:"y";return e[o]-t[o]});for(let e=1;n.length>e;e++){const t="string"==typeof A?A:"y",o=n[e-1],i=n[e];dt+2>Math.abs(i[t]+i.dy-(o[t]+o.dy))&&(i.dy+=dt+2)}return n},[$,tt,yt,st,S,b,A,ht,dt]),It=pt.margin,Pt=w||C,Bt=Oe(()=>g([{label:Me||m(b),accessor:b,role:"x",format:u},{label:We||m(A),accessor:A,role:"y",format:y},...Pt?[{label:m(Pt),accessor:Pt,role:"group"}]:[],...p(U,y)]),[b,A,Me,We,Pt,u,y,U]),Ft=s({componentName:"LineChart",data:nt?Ye[0]?.[S]||[]:a,accessors:{xAccessor:b,yAccessor:A}}),Dt=Oe(()=>nt||rt||lt?st.flatMap(e=>{const t=e[S]||[];return rt&&"string"==typeof rt?t.map(t=>({...t,[rt]:t[rt]??e[rt]})):t}):et,[st,S,nt,rt,et,lt]),Nt=c(O),Mt={chartType:_t,...Array.isArray(N)&&{areaGroups:N},...Nt&&{lineGradient:Nt},...null!=a&&{data:Dt},xAccessor:b,yAccessor:A,xScaleType:ye,yScaleType:fe,...q&&{xExtent:q},...!K||null==K[0]&&null==K[1]?ot?{yExtent:ot}:{}:{yExtent:K},groupAccessor:"break"===Q&<?"_gapSegment":rt||void 0,...U&&{band:U},curve:B,lineStyle:Lt,...F&&{pointStyle:Rt},size:[Le,Re],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:It,showAxes:n.showAxes,xLabel:Me,yLabel:We,xFormat:u,yFormat:y,...void 0!==x&&{axisExtent:x},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},enableHover:He,showGrid:Ie,...pt.legendBehaviorProps,...Be&&{title:Be},...Fe&&{description:Fe},...De&&{summary:De},...void 0!==Ne&&{accessibleTable:Ne},...d&&{className:d},...null!=e.animate&&{animate:e.animate},...E({tooltip:T,defaultTooltipContent:Bt,multiDefaultContent:R()}),...f({linkedHover:ee,selection:Z,onObservation:te,onClick:ne,hoverRadius:se,hoverHighlight:re,mobileInteraction:pt.mobileInteraction,customHoverBehavior:xt,customClickBehavior:bt}),...j&&{pointIdAccessor:j},...(z?.length||Ue.length||Ht.length)&&{annotations:[...z||[],...Ue,...Ht]},...vt,...we};return pt.earlyReturn?pt.earlyReturn:Ft?Qe(oe,{componentName:"LineChart",message:Ft,width:Le,height:Re}):Qe(ie,{componentName:"LineChart",width:Le,height:Re,children:Qe(l,{ref:o,...Mt})})});Ye.displayName="LineChart";import{forwardRef as Ue,useMemo as qe}from"react";import{jsx as Ke}from"react/jsx-runtime";var Je=Ue(function(e,t){const{data:o,layout:i,layoutConfig:r,onLayoutError:a,xExtent:s,yExtent:c,showAxes:h=!1,margin:d,className:u,annotations:m,onObservation:p,onClick:g,selection:x,linkedHover:b,hoverHighlight:v,chartId:A,loading:w,loadingContent:k,emptyContent:S,colorBy:C,colorScheme:L,legend:R,legendInteraction:H,legendPosition:I,frameProps:P={}}=e,{legend:B,...F}=P,D=qe(()=>_(B,R),[B,R]),{frameRef:N,resolved:M,safeData:W,setup:O,earlyReturn:T}=n({imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:C,colorScheme:L,legend:D,legendInteraction:H,legendPosition:I,selection:x,linkedHover:b,hoverHighlight:v,onObservation:p,onClick:g,chartId:A,loading:w,loadingContent:k,emptyContent:S,margin:d,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules,xLabel:e.xLabel,yLabel:e.yLabel}),E=O.effectiveSelectionHook,G=qe(()=>E?.isActive?{isActive:!0,predicate:E.predicate}:null,[E?.isActive,E?.predicate]);if(T)return T;const{width:j,height:z,enableHover:V,showGrid:$,title:Q,description:X,summary:Y,accessibleTable:U,xLabel:q,yLabel:K}=M,J={chartType:"custom",...null!=o&&{data:W},customLayout:i,layoutConfig:r,onLayoutError:a,...G&&{layoutSelection:G},xExtent:s,yExtent:c,colorAccessor:C,colorScheme:L,size:[j,z],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:O.margin,showAxes:h,xLabel:q,yLabel:K,enableHover:V,showGrid:$,...O.legendBehaviorProps,...y({title:Q,description:X,summary:Y,accessibleTable:U,className:u,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...null!=e.tooltip&&{tooltipContent:e.tooltip},...f({linkedHover:b,selection:x,onObservation:p,onClick:g,hoverRadius:e.hoverRadius,hoverHighlight:v,mobileInteraction:O.mobileInteraction,customHoverBehavior:O.customHoverBehavior,customClickBehavior:O.customClickBehavior}),...m&&m.length>0&&{annotations:m},...O.crosshairProps,...F};return Ke(ie,{componentName:"XYCustomChart",width:j,height:z,children:Ke(l,{ref:N,...J})})});Je.displayName="XYCustomChart";import{forwardRef as Ze,useCallback as et,useMemo as tt}from"react";function ot(e,t,o,i,n){const r=1-n;return r*r*r*e+3*r*r*n*t+3*r*n*n*o+n*n*n*i}function it(e,t,o,i,n){const r=1-n;return 3*r*r*(t-e)+6*r*n*(o-t)+3*n*n*(i-o)}function nt(e,t,o,i,n){const r=[],a=(e.x+t.x)/2;for(let s=0;n>=s;s++){const l=s/n;let c,h,d,u;"linear"===i?(c=e.x+(t.x-e.x)*l,h=e.y+(t.y-e.y)*l,d=t.x-e.x,u=t.y-e.y):(c=ot(e.x,a,a,t.x,l),h=ot(e.y,e.y,t.y,t.y,l),d=it(e.x,a,a,t.x,l),u=it(e.y,e.y,t.y,t.y,l)),r.push({x:c,y:h,dx:d,dy:u,radius:e.radius+(t.radius-e.radius)*l,datumIndex:.5>l?o:o+1})}return r}function rt(e,t={}){const o=[],i=[],n=[];if(2>e.length)return{topPath:o,bottomPath:i,datumIndices:n};const r=t.curve??"smooth",a=Math.max(2,Math.floor(t.samplesPerSegment??12));for(let t=0;e.length-1>t;t++){const s=nt(e[t],e[t+1],t,r,a);for(let e=0===t?0:1;s.length>e;e++){const t=s[e],r=Math.hypot(t.dx,t.dy)||1,a=-t.dy/r,l=t.dx/r,c=Math.max(0,t.radius);o.push([t.x+a*c,t.y+l*c]),i.push([t.x-a*c,t.y-l*c]),n.push(t.datumIndex)}}return{topPath:o,bottomPath:i,datumIndices:n}}import{jsx as at,jsxs as st}from"react/jsx-runtime";function lt(e,t,o){return"function"==typeof e?e(t,o):t[e]}function ct(e){return e instanceof Date?"date:"+e.getTime():`${typeof e}:${e+""}`}function ht(e,t={}){const o=t.xAccessor??"x",i=t.yAccessor??"y",n=t.lineBy??"series",r=t.rankDirection??"descending",a=[],s=new Map,l=new Map,c=[],h=new Map;let d=1/0,u=-1/0;e.forEach((e,t)=>{const r=lt(o,e,t),m=ct(r);let p=s.get(m);null==p&&(p=a.length,s.set(m,p),a.push(r),l.set(p,[]));const y=lt(n,e,t)+"";h.has(y)||(h.set(y,c.length),c.push(y));const f=Number(lt(i,e,t));Number.isFinite(f)&&(d=Math.min(d,f),u=Math.max(u,f),l.get(p)?.push({datum:e,inputIndex:t,series:y,value:f}))});const m=[],p=new Map,y=new Map;for(let e=0;a.length>e;e++){const t=l.get(e)??[];t.sort((e,t)=>("descending"===r?t.value-e.value:e.value-t.value)||(h.get(e.series)??0)-(h.get(t.series)??0)),t.forEach((t,o)=>{const i=o+1;m.push({datum:t.datum,xIndex:e,xValue:a[e],series:t.series,value:t.value,rank:i}),p.set(t.series,(p.get(t.series)??0)+i),y.set(t.series,(y.get(t.series)??0)+1)})}const f=c.length+1,g=[...c].sort((e,t)=>{const o=y.get(e)??0,i=y.get(t)??0;return((p.get(e)??0)+(a.length-o)*f)/Math.max(1,a.length)-((p.get(t)??0)+(a.length-i)*f)/Math.max(1,a.length)||(h.get(e)??0)-(h.get(t)??0)}),x=new Set(g.slice(0,null==t.highlightTop?g.length:Math.max(0,Math.floor(t.highlightTop))));return{data:m.map(e=>{const t=x.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:"Other",__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:a,seriesOrder:c,overallOrder:g,valueExtent:d===1/0?[0,0]:[d,u]}}function dt({datum:e,x:t,y:o,side:i,color:n,highlighted:r,labelStyle:a}){const s=b(),l=s.isActive&&!s.predicate(e),c="function"==typeof a?a(e.__bumpRaw):a;return at("text",{className:"semiotic-bump-label",x:t+("end"===i?8:-8),y:o,dy:"0.35em",textAnchor:"end"===i?"start":"end",fill:n,fillOpacity:l?.16:1,fontWeight:r?650:450,fontSize:12,style:{pointerEvents:"none",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-axis-label-font-size, 12px)",...c},children:e.__bumpSeries})}function ut(e,t,o){const[i,n]=t,[r,a]=o;return n===i?(r+a)/2:r+(a-r)*Math.max(0,Math.min(1,(e-i)/(n-i)))}function mt(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:void 0}function pt(e){return{value:e.__bumpValue,x:mt(e.__bumpXValue),y:e.__bumpValue,category:e.__bumpSeries}}function yt(e){const t=e.config,o=new Map;for(const t of e.data){const e=o.get(t.__bumpSeries)??[];e.push(t),o.set(t.__bumpSeries,e)}const i=t.seriesOrder.filter(e=>o.has(e)).sort((e,i)=>(o.get(e)?.[0]?.__bumpHighlighted?1:0)-(o.get(i)?.[0]?.__bumpHighlighted?1:0)||t.seriesOrder.indexOf(e)-t.seriesOrder.indexOf(i)),n=[],r=[];for(const a of i){const i=(o.get(a)??[]).sort((e,t)=>e.x-t.x);if(2>i.length)continue;const s=i[0].__bumpHighlighted,l=e.resolveColor(i[0].__bumpSeries,i[0]),c=t.color??(s?l:t.neutralColor??e.theme.semantic.textSecondary??e.theme.semantic.border??l),h=i.map(o=>({x:e.scales.x(o.x),y:e.scales.y(o.y),radius:t.ribbon?ut(o.__bumpValue,t.valueExtent,t.ribbonSizeRange)/2:Math.max(.5,t.lineWidth/2)})),d=rt(h,{curve:t.curve,samplesPerSegment:t.samplesPerSegment}),u=d.datumIndices.map(e=>i[e]),m={fill:c,fillOpacity:1,opacity:s?t.ribbon?t.ribbonOpacity:t.lineOpacity:Math.min(t.ribbon?t.ribbonOpacity:t.lineOpacity,.58)};t.styleRules?.length&&Object.assign(m,A(i[0].__bumpRaw,t.styleRules,pt(i[0]))),t.areaStyle&&Object.assign(m,t.areaStyle(i[0].__bumpRaw)??{}),void 0!==t.stroke&&(m.stroke=t.stroke),void 0!==t.strokeWidth&&(m.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(m.opacity=t.opacity),n.push({type:"area",topPath:d.topPath,bottomPath:d.bottomPath,style:m,datum:u,accessibleDatum:i.map(e=>e.__bumpRaw),accessibility:{label:a+" ranking trajectory",tableFields:i.map(e=>e.__bumpRaw)},group:a,interactive:!0}),t.showPoints&&i.forEach((e,o)=>{const i={fill:c,stroke:"none",opacity:s?1:.75};t.styleRules?.length&&Object.assign(i,A(e.__bumpRaw,t.styleRules,pt(e))),t.pointStyle&&Object.assign(i,t.pointStyle(e.__bumpRaw)??{}),void 0!==t.stroke&&(i.stroke=t.stroke),void 0!==t.strokeWidth&&(i.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(i.opacity=t.opacity),n.push({type:"point",x:h[o].x,y:h[o].y,r:i.r??t.pointRadius,style:i,datum:e,accessibleDatum:e.__bumpRaw,accessibility:{label:`${a}, rank ${e.__bumpRank}, value ${e.__bumpValue}`},pointId:`${a}:${e.x}`})});const p=!0===t.showLabels?"end":t.showLabels,y=(e,o,i)=>{r.push(at(dt,{datum:e,x:h[o].x,y:h[o].y,side:i,color:"string"==typeof m.fill?m.fill:c,highlighted:s,labelStyle:t.labelStyle},`${a}-${i}`))};"start"!==p&&"both"!==p||y(i[0],0,"start"),"end"!==p&&"both"!==p||y(i.at(-1),i.length-1,"end")}return{nodes:n,overlays:r.length?at("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{const o=function(e){const t=Array.isArray(e.datum)?e.datum[0]:e.datum;return t&&"object"==typeof t&&"__bumpSeries"in t?t:void 0}(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}var ft=Ze(function(e,t){const o=q(),i=te(),{data:n,xAccessor:r,yAccessor:a,lineBy:s,rankDirection:l="descending",ribbon:c=!1,curve:h="smooth",ribbonSizeRange:d=[4,28],samplesPerSegment:u=12,lineWidth:m=3,highlightTop:p,neutralColor:y,styleRules:f,labelStyle:g,colorScheme:x,ribbonOpacity:b=.82,lineOpacity:v=.9,showPoints:A=!1,pointRadius:w=3,showLabels:k=!0,showAxes:S=!0,showGrid:C=!0,showLegend:L=!1,enableHover:R=!0,hoverHighlight:_=!0,tooltip:I,frameProps:P={},xFormat:B,yFormat:F,onClick:D}=e,N=tt(()=>ht(n,{xAccessor:r,yAccessor:a,lineBy:s,rankDirection:l,highlightTop:p}),[n,r,a,s,l,p]),{axes:M,areaStyle:T,pointStyle:E,...G}=P,j=tt(()=>function(e){const{seriesOrder:t,overallOrder:o,highlightTop:i,color:n,colorScheme:r,neutralColor:a,themeCategorical:s,themeNeutral:l}=e;if(null==i&&null==n)return r;const c=new Set(o.slice(0,null==i?o.length:Math.max(0,Math.floor(i)))),h=new Map,d={};for(const e of t)d[e]=n??(c.has(e)?O(void 0,s,r,e,h):a??l??"#b8bec8");return d}({seriesOrder:N.seriesOrder,overallOrder:N.overallOrder,highlightTop:p,color:e.color,colorScheme:x,neutralColor:y,themeCategorical:o,themeNeutral:i.colors.textSecondary}),[N.seriesOrder,N.overallOrder,p,e.color,x,y,o,i.colors.textSecondary]),z=tt(()=>({ribbon:c,curve:h,samplesPerSegment:u,ribbonSizeRange:d,valueExtent:N.valueExtent,seriesOrder:N.seriesOrder,lineWidth:m,ribbonOpacity:b,lineOpacity:v,neutralColor:y,color:e.color,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:f,areaStyle:T,pointStyle:E,labelStyle:g,showPoints:A,pointRadius:w,showLabels:k}),[c,h,u,d,N.valueExtent,N.seriesOrder,m,b,v,y,e.color,e.stroke,e.strokeWidth,e.opacity,f,T,E,g,A,w,k]),V=et((e,t)=>{if(0===N.xValues.length)return"";const o=N.xValues[Math.max(0,Math.min(N.xValues.length-1,Math.round(Number(e))))];return B?B(o,t):(o instanceof Date?o.toLocaleDateString():o)+""},[N.xValues,B]),$=et(e=>F?F(e):e.toLocaleString(),[F]),Q=tt(()=>"multi"===I?void 0:W(I),[I]),X=et(e=>{const t=e?.data??e;return t?!1===I?null:Q?Q({...e,data:t.__bumpRaw,__semioticHoverData:!0}):st("div",{className:"semiotic-tooltip",style:H,children:[at("div",{style:{fontWeight:700},children:t.__bumpSeries}),st("div",{children:[V(t.x)," · Rank ",t.__bumpRank]}),st("div",{children:["Value: ",$(t.__bumpValue)]})]}):null},[$,V,Q,I]),Y=tt(()=>{if(D)return(e,t)=>{D(e.__bumpRaw??e,t)}},[D]),U=Math.max(1,N.seriesOrder.length),K=N.xValues.map((e,t)=>t),J=Array.from({length:U},(e,t)=>t+1),Z=M??[{orient:"left",tickValues:J,tickFormat:e=>e+"",label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:K,tickFormat:V,label:e.xLabel,tickAnchor:"edges"}],ee=tt(()=>function(e,t){if(!e?.length)return;const o=new Map(t.map((e,t)=>[ct(e),t]));return e.map(e=>{const t={...e},i=i=>{if(!(i in e))return;const n=o.get(ct(e[i]));void 0!==n&&(t[i]=n)};return i("x"),i("x0"),i("x1"),"string"!=typeof e.type||"x-threshold"!==e.type&&"x"!==e.type||i("value"),t})}(e.annotations,N.xValues),[e.annotations,N.xValues]);return at(Je,{ref:t,data:N.data,layout:yt,layoutConfig:z,xExtent:[0,Math.max(1,N.xValues.length-1)],yExtent:[U+.5,.5],showAxes:S,showGrid:C,showLegend:L,enableHover:R,hoverHighlight:_,colorBy:"__bumpSeries",colorScheme:j,tooltip:X,onClick:Y,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:e.margin??{top:20,right:k?110:24,bottom:48,left:48},className:e.className,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,selection:e.selection,linkedHover:e.linkedHover,legend:e.legend,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,onObservation:e.onObservation,chartId:e.chartId,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,animate:e.animate,autoPlaceAnnotations:e.autoPlaceAnnotations,annotations:ee,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:Z,axisExtent:"exact",...G}})});ft.displayName="BumpChart";import{useMemo as gt,forwardRef as xt,useRef as bt}from"react";import{useMemo as vt}from"react";function At(e){const{safeData:o,data:i,areaBy:n,lineDataAccessor:r,colorBy:a,colorScale:s,color:l,stroke:c,strokeWidth:h,opacity:d,effectiveSelectionHook:u,resolvedSelection:y,areaOpacity:f,showLine:x,lineWidth:b,showPoints:v,pointRadius:w,xAccessor:S,yAccessor:C,xLabel:L,yLabel:R,xFormat:_,yFormat:H,groupField:I,styleRules:B,ruleContext:F}=e,D=vt(()=>function({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];const n=void 0!==t[0]?.[i];if(!n&&!o)return t;let r;if(n)r=t;else{const e=t.reduce((e,t)=>{const n="function"==typeof o?o(t):t[o],r=n+"";if(!e[r]){const t={[i]:[]};"string"==typeof o&&(t[o]=n),e[r]=t}return e[r][i].push(t),e},{});r=Object.values(e)}return r.flatMap(e=>{const t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}({data:i,safeData:o,areaBy:n,lineDataAccessor:r}),[i,o,n,r]),N=vt(()=>e=>{const t={};if(a){if(s){const o=P(e,a,s);t.fill=o,x?(t.stroke=o,t.strokeWidth=b):t.stroke="none"}}else{const e=l||k;t.fill=e,x?(t.stroke=e,t.strokeWidth=b):t.stroke="none"}return t.fillOpacity=f,B&&B.length>0&&Object.assign(t,A(e,B,F?F(e):{value:void 0})),t},[a,s,l,f,x,b,B,F]),M=vt(()=>t(N,{stroke:c,strokeWidth:h,opacity:d}),[N,c,h,d]);return{flattenedData:D,lineStyle:vt(()=>J(M,u??null,y),[M,u,y]),pointStyle:vt(()=>{if(v)return e=>{const t={r:w,fillOpacity:1};return a?s&&(t.fill=P(e.parentLine||e,a,s)):t.fill=l||k,t}},[v,w,a,s,l]),defaultTooltipContent:vt(()=>g([{label:L||m(S),accessor:S,role:"x",format:_},{label:R||m(C),accessor:C,role:"y",format:H},...I?[{label:m(I),accessor:I,role:"group"}]:[],...p(e.band,H)]),[S,C,L,R,I,_,H,e.band])}}import{jsx as wt}from"react/jsx-runtime";var kt=xt(function(e,t){const o=bt(null);r(t,{variant:"xy",frameRef:o});const n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:m,className:p,xFormat:g,yFormat:x,xAccessor:b="x",yAccessor:A="y",areaBy:w,y0Accessor:k,gradientFill:S=!1,semanticGradient:C,semanticLine:L=!0,lineDataAccessor:_="coordinates",colorBy:H,colorScheme:P,styleRules:B,curve:F="monotoneX",areaOpacity:D=.7,lineGradient:N,showLine:M=!0,lineWidth:W=2,showPoints:O=!1,pointRadius:T=3,tooltip:j,annotations:z,forecast:$,anomaly:Q,band:X,xExtent:Y,yExtent:U,frameProps:q={},selection:K,linkedHover:J,onObservation:Z,onClick:ee,hoverHighlight:te,chartId:ne,loading:re,loadingContent:se,emptyContent:le,legendInteraction:ce,legendPosition:he,color:de,stroke:ue,strokeWidth:me,opacity:pe}=e,{width:ye,height:fe,enableHover:ge,showGrid:xe,showLegend:be,title:ve,description:Ae,summary:we,accessibleTable:ke,xLabel:Se,yLabel:Ce}=n,Le=gt(()=>I(a),[a]),Re=H||w,He=gt(()=>d(C),[C]),Ie=gt(()=>He?.stops.length?u(He):h(S),[He,S]),Pe=gt(()=>c(N),[N]),Be=gt(()=>L&&He?.stops.length?He.stops.flatMap(({offset:e,color:t})=>t?[{offset:e,color:t}]:[]):void 0,[He,L]);ae("AreaChart",Le,"xAccessor",b),ae("AreaChart",Le,"yAccessor",A);const Fe=i({data:Le,rawData:a,colorBy:Re,colorScheme:P,legendInteraction:ce,legendPosition:he,selection:K,linkedHover:J,fallbackFields:Re?["string"==typeof Re?Re:""]:[],unwrapData:!1,onObservation:Z,onClick:ee,hoverHighlight:te,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"AreaChart",chartId:ne,showLegend:be,userMargin:m,marginDefaults:n.marginDefaults,loading:re,loadingContent:se,emptyContent:le,width:ye,height:fe,hasTitle:!!ve,axisChrome:G({showAxes:n.showAxes,xLabel:Se})}),{effectiveData:De,statisticalAnnotations:Ne}=_e({data:Le,xAccessor:b,yAccessor:A,forecast:$,anomaly:Q,groupBy:w}),Me=gt(()=>v(b,A),[b,A]),{flattenedData:We,lineStyle:Oe,pointStyle:Te,defaultTooltipContent:Ee}=At({safeData:De,data:a,areaBy:w,lineDataAccessor:_,colorBy:Re,colorScale:Fe.colorScale,color:de,stroke:ue,strokeWidth:me,opacity:pe,effectiveSelectionHook:Fe.effectiveSelectionHook,resolvedSelection:Fe.resolvedSelection,areaOpacity:D,showLine:M,lineWidth:W,showPoints:O,pointRadius:T,xAccessor:b,yAccessor:A,xLabel:Se,yLabel:Ce,xFormat:g,yFormat:x,groupField:w||H,band:X,styleRules:B,ruleContext:Me}),Ge=s({componentName:"AreaChart",data:a,accessors:{xAccessor:b,yAccessor:A}}),je={chartType:"area",...null!=a&&{data:We},xAccessor:b,yAccessor:A,groupAccessor:w||void 0,...k&&{y0Accessor:k},...X&&{band:X},...Ie&&{gradientFill:Ie},...Pe&&{lineGradient:Pe},...Be&&{semanticLineStops:Be},curve:F,lineStyle:Oe,...O&&Te&&{pointStyle:Te},size:[ye,fe],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Fe.margin,showAxes:n.showAxes,xLabel:Se,yLabel:Ce,xFormat:g,yFormat:x,enableHover:ge,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:xe,...Fe.legendBehaviorProps,...y({title:ve,description:Ae,summary:we,accessibleTable:ke,className:p,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...E({tooltip:j,defaultTooltipContent:Ee,multiDefaultContent:R()}),...f({linkedHover:J,selection:K,onObservation:Z,onClick:ee,hoverHighlight:te,mobileInteraction:Fe.mobileInteraction,customHoverBehavior:Fe.customHoverBehavior,customClickBehavior:Fe.customClickBehavior}),...(z&&z.length>0||Ne.length>0)&&{annotations:[...z||[],...Ne]},...Y&&{xExtent:Y},...U&&{yExtent:U},...Fe.crosshairProps,...q};return Fe.earlyReturn?Fe.earlyReturn:Ge?wt(oe,{componentName:"AreaChart",message:Ge,width:ye,height:fe}):wt(ie,{componentName:"AreaChart",width:ye,height:fe,children:wt(l,{ref:o,...je})})});kt.displayName="AreaChart";import{useMemo as St,forwardRef as Ct,useRef as Lt,useState as Rt,useImperativeHandle as _t,useCallback as Ht}from"react";import{jsx as It,jsxs as Pt}from"react/jsx-runtime";function Bt(e){if(null==e)return NaN;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){if(""===e.trim())return NaN;const t=+e;return Number.isFinite(t)?t:NaN}return NaN}var Ft=Ct(function(e,t){const o=Lt(null),n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:r,margin:a,className:s,xFormat:c,yFormat:d,xAccessor:u="x",seriesAAccessor:m="a",seriesBAccessor:p="b",seriesALabel:g="A",seriesBLabel:x="B",seriesAColor:b="var(--semiotic-danger, #dc2626)",seriesBColor:v="var(--semiotic-info, #2563eb)",showLines:A=!0,lineWidth:w=1.5,showPoints:k=!1,pointRadius:S=3,curve:C="linear",areaOpacity:L=.6,gradientFill:R,tooltip:_,annotations:P,xExtent:B,yExtent:F,frameProps:D={},selection:N,linkedHover:M,onObservation:W,onClick:O,hoverHighlight:T,chartId:j,loading:z,loadingContent:$,emptyContent:Q,legendInteraction:X,legendPosition:Y,pointIdAccessor:U,windowSize:q}=e,{width:K,height:J,enableHover:Z,showGrid:ee,showLegend:te,title:oe,description:ne,summary:re,accessibleTable:ae,xLabel:se,yLabel:le}=n,ce=St(()=>"function"==typeof u?e=>Bt(u(e)):e=>Bt(e[u]),[u]),he=St(()=>"function"==typeof m?e=>Bt(m(e)):e=>Bt(e[m]),[m]),de=St(()=>"function"==typeof p?e=>Bt(p(e)):e=>Bt(e[p]),[p]),[ue,me]=Rt([]),pe=Lt([]),ye=null==r,fe=St(()=>I(ye?ue:r),[ye,ue,r]),ge=St(()=>function(e,t,o,i){if(!e.length)return[];const n=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];let a=0,s=null,l=null,c=[];const h=(e,t)=>e>t?"A":t>e?"B":null,d=e=>`seg-${a}-${e}`,u=e=>r.push(e),m=(e,t)=>{u({__x:e.x,__y:e.y,__y0:e.y,__diffSegment:d(t),__diffWinner:t,__valA:e.y,__valB:e.y,__sourceDatum:e.datum})};for(let e=0;n.length>e;e++){const r=n[e],p=t(r),y=o(r),f=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(f))continue;const g=h(y,f);if(null!==g)if(null!=s){if(l&&l.w!==g){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{const o=y-l.a-(f-l.b);if(0!==o){const i=Math.max(0,Math.min(1,(l.b-l.a)/o));e=l.x+i*(p-l.x),t=l.a+i*(y-l.a)}else e=l.x,t=l.a}u({__x:e,__y:t,__y0:t,__diffSegment:d(s),__diffWinner:s,__valA:t,__valB:t}),a++,s=g,u({__x:e,__y:t,__y0:t,__diffSegment:d(s),__diffWinner:s,__valA:t,__valB:t});for(let e=1;c.length>e;e++)m(c[e],s)}else for(const e of c)m(e,s);c=[],u({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:d(s),__diffWinner:s,__valA:y,__valB:f,__sourceDatum:r}),l={x:p,a:y,b:f,w:g}}else{s=g;for(const e of c)m(e,s);c=[],u({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:d(s),__diffWinner:s,__valA:y,__valB:f,__sourceDatum:r}),l={x:p,a:y,b:f,w:g}}else c.push({x:p,y:y,datum:r})}for(const e of c)m(e,s??"A");return r}(fe,ce,he,de),[fe,ce,he,de]),xe=St(()=>A?function(e,t,o,i){if(!e.length)return[];const n=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(const e of n){const n=t(e),a=o(e),s=i(e);Number.isFinite(a)&&r.push({__x:n,__y:a,__diffSegment:"line-A"}),Number.isFinite(s)&&r.push({__x:n,__y:s,__diffSegment:"line-B"})}return r}(fe,ce,he,de):[],[A,fe,ce,he,de]),be=St(()=>[...ge,...xe],[ge,xe]),ve=St(()=>{const e=new Set;for(const t of ge)e.add(t.__diffSegment);return Array.from(e)},[ge]);_t(t,()=>{const e=e=>{const t=q&&e.length>q?e.slice(e.length-q):e;pe.current=t,me(t)},t=U?"function"==typeof U?U:e=>e[U]:null;return{push:t=>e([...pe.current,t]),pushMany:t=>e([...pe.current,...t]),remove:o=>{if(!t)return[];const i=Array.isArray(o)?o:[o],n=[],r=[];for(const e of pe.current)i.includes(t(e))?n.push(e):r.push(e);return e(r),n},update:(o,i)=>{if(!t)return[];const n=Array.isArray(o)?o:[o],r=[],a=pe.current.map(e=>{if(n.includes(t(e))){const t=i(e);return r.push(t),t}return e});return e(a),r},clear:()=>e([]),getData:()=>ye?pe.current:fe,getScales:()=>o.current?.getScales()??null}},[ye,fe,U,q]);const Ae=i({data:fe,rawData:r,colorBy:"__diffWinner",colorScheme:[b,v],legendInteraction:X,legendPosition:Y,selection:N,linkedHover:M,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:W,onClick:O,hoverHighlight:T,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"DifferenceChart",chartId:j,showLegend:te,userMargin:a,marginDefaults:n.marginDefaults,loading:z,loadingContent:$,emptyContent:Q,width:K,height:J,hasTitle:!!oe,axisChrome:G({showAxes:n.showAxes,xLabel:se})}),we=St(()=>{if(!1!==te)return{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:g,color:b},{label:x,color:v}]}]}},[te,g,x,b,v]),ke=Ht(e=>{const t=e.__diffSegment;return{fill:"A"==(t?.endsWith("-A")?"A":"B")?b:v,stroke:"none",fillOpacity:L}},[b,v,L]),Se=Ht(e=>({stroke:"A"==("line-A"===e.__diffSegment?"A":"B")?b:v,strokeWidth:w,fill:"none"}),[b,v,w]),Ce=Ht(e=>({fill:"A"==("line-A"===e.__diffSegment?"A":"B")?b:v,r:S}),[b,v,S]),Le=Ht(e=>{const t=e.data,o=e.allSeries,i=e.xValue??t?.__x;let n=t?.__valA,r=t?.__valB;if(o&&o.length>0){const e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(n=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==n||null==r)){const e=fe.find(e=>ce(e)===i);e&&(null==n&&(n=he(e)),null==r&&(r=de(e)))}const a=e=>null!=e&&Number.isFinite(e)?""+Math.round(100*e)/100:"—",s=c&&null!=i?c(i):null!=i?i+"":"";return Pt("div",{className:"semiotic-tooltip",style:H,children:[s&&It("div",{style:{fontWeight:600,marginBottom:4},children:s}),Pt("div",{style:{display:"flex",alignItems:"center",gap:6},children:[It("span",{style:{width:10,height:10,background:b,display:"inline-block",borderRadius:2}}),Pt("span",{children:[g,": ",a(n)]})]}),Pt("div",{style:{display:"flex",alignItems:"center",gap:6},children:[It("span",{style:{width:10,height:10,background:v,display:"inline-block",borderRadius:2}}),Pt("span",{children:[x,": ",a(r)]})]}),null!=n&&null!=r&&Number.isFinite(n)&&Number.isFinite(r)&&Pt("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",a(n-r)]})]})},[fe,ce,he,de,c,b,v,g,x]),{tooltipContent:Re,tooltipMode:_e}=St(()=>E({tooltip:_,defaultTooltipContent:Le,multiDefaultContent:Le}),[_,Le]),He=St(()=>h(R,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[R]);if(Ae.earlyReturn)return Ae.earlyReturn;const Ie={chartType:"mixed",data:be,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:ve,curve:C,areaStyle:ke,lineStyle:Se,...k&&{pointStyle:Ce},size:[K,J],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ae.margin,showAxes:n.showAxes,xLabel:se,yLabel:le,xFormat:c,yFormat:d,enableHover:Z,showGrid:ee,...He&&{gradientFill:He},...we&&{legend:we,legendPosition:Ae.legendPosition},...y({title:oe,description:ne,summary:re,accessibleTable:ae,className:s,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:Re,..."multi"===_e&&{tooltipMode:"multi"},...f({linkedHover:M,selection:N,onObservation:W,onClick:O,hoverHighlight:T,mobileInteraction:Ae.mobileInteraction,customHoverBehavior:Ae.customHoverBehavior,customClickBehavior:Ae.customClickBehavior}),...P&&P.length>0&&{annotations:P},...B&&{xExtent:B},...F&&{yExtent:F},...Ae.crosshairProps,...D};return It(ie,{componentName:"DifferenceChart",width:K,height:J,children:It(l,{ref:o,...Ie})})});"function"==typeof Ft&&(Ft.displayName="DifferenceChart");import{useMemo as Dt,forwardRef as Nt,useRef as Mt}from"react";import{jsx as Wt}from"react/jsx-runtime";var Ot=Nt(function(e,t){const o=Mt(null),n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:c,className:h,xFormat:d,yFormat:u,xAccessor:m="x",yAccessor:p="y",areaBy:g,lineDataAccessor:x="coordinates",colorBy:b,colorScheme:A,styleRules:w,curve:k="monotoneX",areaOpacity:S=.7,showLine:C=!0,lineWidth:L=2,showPoints:_=!1,pointRadius:H=3,normalize:P=!1,baseline:B="zero",stackOrder:F,tooltip:D,annotations:N,xExtent:M,yExtent:W,frameProps:O={},selection:T,linkedHover:j,onObservation:z,onClick:$,hoverHighlight:Q,chartId:X,loading:Y,loadingContent:U,emptyContent:q,legendInteraction:K,legendPosition:J,color:Z,stroke:ee,strokeWidth:te,opacity:ne}=e,{width:re,height:ae,enableHover:se,showGrid:le,showLegend:ce,title:he,description:de,summary:ue,accessibleTable:me,xLabel:pe,yLabel:ye}=n,fe=Dt(()=>I(a),[a]),ge=b||g;r(t,{variant:"xy",frameRef:o});const xe=i({data:fe,rawData:a,colorBy:ge,colorScheme:A,legendInteraction:K,legendPosition:J,selection:T,linkedHover:j,fallbackFields:ge?["string"==typeof ge?ge:""]:[],unwrapData:!1,onObservation:z,onClick:$,hoverHighlight:Q,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"StackedAreaChart",chartId:X,showLegend:ce,userMargin:c,marginDefaults:n.marginDefaults,loading:Y,loadingContent:U,emptyContent:q,width:re,height:ae,hasTitle:!!he,axisChrome:G({showAxes:n.showAxes,xLabel:pe})}),be=Dt(()=>v(m,p),[m,p]),{flattenedData:ve,lineStyle:Ae,pointStyle:we,defaultTooltipContent:ke}=At({safeData:fe,data:a,areaBy:g,lineDataAccessor:x,colorBy:ge,colorScale:xe.colorScale,color:Z,stroke:ee,strokeWidth:te,opacity:ne,effectiveSelectionHook:xe.effectiveSelectionHook,resolvedSelection:xe.resolvedSelection,areaOpacity:S,showLine:C,lineWidth:L,showPoints:_,pointRadius:H,xAccessor:m,yAccessor:p,xLabel:pe,yLabel:ye,xFormat:d,yFormat:u,groupField:g||b,styleRules:w,ruleContext:be}),Se=s({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:m,yAccessor:p}}),Ce={chartType:"stackedarea",...null!=a&&{data:ve},xAccessor:m,yAccessor:p,groupAccessor:g||void 0,curve:k,normalize:P,baseline:P?"zero":B,stackOrder:F,lineStyle:Ae,..._&&we&&{pointStyle:we},size:[re,ae],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:xe.margin,showAxes:n.showAxes,xLabel:pe,yLabel:ye,xFormat:d,yFormat:u,enableHover:se,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:le,...xe.legendBehaviorProps,...y({title:he,description:de,summary:ue,accessibleTable:me,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...E({tooltip:D,defaultTooltipContent:ke,multiDefaultContent:R()}),...f({linkedHover:j,selection:T,onObservation:z,onClick:$,hoverHighlight:Q,mobileInteraction:xe.mobileInteraction,customHoverBehavior:xe.customHoverBehavior,customClickBehavior:xe.customClickBehavior}),...N&&N.length>0&&{annotations:N},...M&&{xExtent:M},...W&&{yExtent:W},...xe.crosshairProps,...O};return xe.earlyReturn?xe.earlyReturn:Se?Wt(oe,{componentName:"StackedAreaChart",message:Se,width:re,height:ae}):Wt(ie,{componentName:"StackedAreaChart",width:re,height:ae,children:Wt(l,{ref:o,...Ce})})});Ot.displayName="StackedAreaChart";import{useMemo as Tt,forwardRef as Et,useRef as Gt}from"react";import{scaleSequential as jt}from"d3-scale";import{jsx as zt}from"react/jsx-runtime";var Vt=Et(function(e,t){const o=Gt(null);r(t,{variant:"xy",frameRef:o});const i=V(e.mode,{width:e.width,height:e.height,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:n,margin:c,className:h,xAccessor:d="x",yAccessor:u="y",valueAccessor:p="value",xFormat:b,yFormat:v,colorScheme:A,customColorScale:w,showValues:k=!1,valueFormat:S,cellBorderColor:C="#fff",cellBorderWidth:L=1,tooltip:R,annotations:_,xExtent:H,yExtent:P,frameProps:D={},selection:N,linkedHover:M,onObservation:W,onClick:O,hoverHighlight:T,chartId:E,loading:G,loadingContent:j,emptyContent:Q,showLegend:Y,legendPosition:U,legend:q,legendInteraction:J}=e,{width:Z,height:te,enableHover:ae,title:se,description:le,summary:ce,accessibleTable:he,xLabel:de,yLabel:ue}=i,me=re(G,Z,te,j),pe=me?null:ne(n,Z,te,Q),ye=Tt(()=>I(n),[n]),fe=K(),ge=A??fe??"blues",xe=Y??!1,be=U??"right",{customHoverBehavior:ve,customClickBehavior:Ae,crosshairSourceId:we}=$({selection:N,linkedHover:M,fallbackFields:[],onObservation:W,onClick:O,chartType:"Heatmap",chartId:E,hoverHighlight:T,colorByField:void 0,mobileInteraction:i.mobileInteraction});a(N);const ke=B(M,we);X(J,void 0,[]);const Se=Tt(()=>"function"==typeof p?e=>p(e):e=>e[p],[p]),Ce=Tt(()=>{const e=ye.map(Se);return ee(e)},[ye,Se]),Le=Tt(()=>{if("custom"===ge&&w)return w;const e=F(ge);return jt(e).domain(Ce)},[ge,w,Ce]),Re=Tt(()=>{const e=Number.isFinite(L)?Math.max(0,L):1;return()=>({stroke:C,strokeWidth:e})},[C,L]),_e=Tt(()=>g([{label:de||m(d),accessor:d,role:"x",format:b},{label:ue||m(u),accessor:u,role:"y",format:v},{label:m(p),accessor:p,role:"value",format:S}]),[d,u,de,ue,p,b,v,S]),He=s({componentName:"Heatmap",data:n,accessors:{xAccessor:d,yAccessor:u,valueAccessor:p}}),Ie=Tt(()=>{if(xe)return{gradient:{colorFn:e=>Le(e),domain:Ce,label:"string"==typeof p?p:"value",format:S},legendDistance:q?.legendDistance}},[xe,Le,Ce,p,S,q?.legendDistance]),{margin:Pe}=z({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:be,userMargin:c,defaults:i.marginDefaults,additionalLegend:Ie,chartWidth:Z,legendLayout:D.legendLayout,hasTitle:!!se,axisChrome:{hasAxis:!1!==i.showAxes,hasAxisLabel:!!de}}),Be={chartType:"heatmap",...null!=n&&{data:ye},xAccessor:d,yAccessor:u,valueAccessor:p,colorScheme:"custom"!==ge?ge:void 0,areaStyle:Re,showValues:k,heatmapValueFormat:S,size:[Z,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Pe,showAxes:i.showAxes,xLabel:de,yLabel:ue,xFormat:b,yFormat:v,enableHover:ae,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Ie&&{legend:Ie,legendPosition:be},...y({title:se,description:le,summary:ce,accessibleTable:he,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...x({tooltip:R,defaultTooltipContent:_e}),...f({linkedHover:M,selection:N,onObservation:W,onClick:O,hoverHighlight:T,mobileInteraction:i.mobileInteraction,customHoverBehavior:ve,customClickBehavior:Ae}),..._&&_.length>0&&{annotations:_},...H&&{xExtent:H},...P&&{yExtent:P},...ke,...D};return me||pe||(He?zt(oe,{componentName:"Heatmap",message:He,width:Z,height:te}):zt(ie,{componentName:"Heatmap",width:Z,height:te,children:zt(l,{ref:o,...Be})}))});Vt.displayName="Heatmap";import{useMemo as $t,useCallback as Qt,forwardRef as Xt,useRef as Yt}from"react";import{jsx as Ut}from"react/jsx-runtime";var qt=Xt(function(t,o){const n=Yt(null),a=V(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:c,margin:h,className:d,xFormat:u,yFormat:p,xAccessor:b="x",yAccessor:A="y",sizeBy:w,sizeRange:k=[5,40],colorBy:S,colorScheme:C,styleRules:L,bubbleOpacity:R=.6,bubbleStrokeWidth:_=1,bubbleStrokeColor:H="white",tooltip:P,marginalGraphics:B,pointIdAccessor:F,annotations:N,regression:W,xExtent:O,yExtent:T,frameProps:E={},selection:z,linkedHover:$,linkedBrush:Q,onObservation:X,onClick:Y,hoverHighlight:U,chartId:q,loading:K,loadingContent:J,emptyContent:Z,legendInteraction:ee,legendPosition:te,color:ne,stroke:re,strokeWidth:ae,opacity:se}=t,{width:le,height:ce,enableHover:he,showGrid:de,showLegend:ue,title:pe,description:ye,summary:fe,accessibleTable:ge,xLabel:be,yLabel:ve}=a,Ae=$t(()=>I(c),[c]),we=void 0===c,ke=i({data:Ae,rawData:c,colorBy:S,colorScheme:C,legendInteraction:ee,legendPosition:te,selection:z,linkedHover:$,fallbackFields:S?["string"==typeof S?S:""]:[],unwrapData:!1,onObservation:X,onClick:Y,hoverHighlight:U,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"BubbleChart",chartId:q,showLegend:ue,userMargin:h,marginDefaults:a.marginDefaults,loading:K,loadingContent:J,emptyContent:Z,width:le,height:ce,hasTitle:!!pe,axisChrome:G({showAxes:a.showAxes,xLabel:be})}),{domain:Se,trackPushed:Ce,reset:Le}=xe({accessor:w,data:Ae,isPushMode:we}),Re=Qt(e=>{Ce([e]),n.current?.push(e)},[Ce]),_e=Qt(e=>{Ce(e),n.current?.pushMany(e)},[Ce]);r(o,{variant:"xy",frameRef:n,overrides:{push:Re,pushMany:_e,clear:()=>{Le(),n.current?.clear()}}});const He=M(Q),Ie=(j({name:He?.name||"__unused_brush__",xField:He?.xField||("string"==typeof b?b:void 0),yField:He?.yField||("string"==typeof A?A:void 0)}),$t(()=>({stroke:H,strokeWidth:_}),[H,_])),Pe=$t(()=>Se??[0,1],[Se]),Be=Qt(e=>D(e,w,k,Pe),[w,k,Pe]),Fe=$t(()=>v(b,A),[b,A]),De=me({colorBy:S,colorScale:ke.colorScale,color:ne,fillOpacity:R,radiusFn:Be,baseStyleExtras:Ie,stroke:re,strokeWidth:ae,opacity:se,styleRules:L,ruleContext:Fe,effectiveSelectionHook:ke.effectiveSelectionHook,resolvedSelection:ke.resolvedSelection}),Ne=$t(()=>g([{label:be||m(b),accessor:b,role:"x",format:u},{label:ve||m(A),accessor:A,role:"y",format:p},{label:m(w),accessor:w,role:"size"},...S?[{label:m(S),accessor:S,role:"color"}]:[]]),[b,A,be,ve,w,S,u,p]);if(ke.earlyReturn)return ke.earlyReturn;const Me=s({componentName:"BubbleChart",data:c,accessors:{xAccessor:b,yAccessor:A},requiredProps:{sizeBy:w}});if(Me)return Ut(oe,{componentName:"BubbleChart",message:Me,width:le,height:ce});const We=e(W),Oe=We?[We,...N||[]]:N,Te={chartType:"bubble",...null!=c&&{data:Ae},xAccessor:b,yAccessor:A,colorAccessor:S||void 0,sizeAccessor:w,sizeRange:k,pointStyle:De,colorScheme:C,size:[le,ce],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:ke.margin,showAxes:a.showAxes,xLabel:be,yLabel:ve,xFormat:u,yFormat:p,enableHover:he,showGrid:de,...ke.legendBehaviorProps,...y({title:pe,description:ye,summary:fe,accessibleTable:ge,className:d,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...x({tooltip:P,defaultTooltipContent:Ne}),...f({linkedHover:$,selection:z,onObservation:X,onClick:Y,hoverHighlight:U,mobileInteraction:ke.mobileInteraction,customHoverBehavior:ke.customHoverBehavior,customClickBehavior:ke.customClickBehavior}),...B&&{marginalGraphics:B},...F&&{pointIdAccessor:F},...Oe&&Oe.length>0&&{annotations:Oe},...O&&{xExtent:O},...T&&{yExtent:T},...ke.crosshairProps,...E};return Ut(ie,{componentName:"BubbleChart",width:le,height:ce,children:Ut(l,{ref:n,...Te})})});qt.displayName="BubbleChart";import*as Kt from"react";import{useMemo as Jt,useCallback as Zt,useState as eo,useRef as to}from"react";import*as oo from"react";import{jsx as io}from"react/jsx-runtime";var no=null,ro=null;function ao(e){const[t,o]=oo.useState(()=>no);return oo.useEffect(()=>{if(t)return;let e=!1;return(no?Promise.resolve(no):(ro||(ro=import("./chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js").then(e=>no=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw ro=null,e})),ro)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?io(t,{...e}):null}import{jsx as so,jsxs as lo}from"react/jsx-runtime";var co="__splomIdx",ho={top:4,bottom:4,left:4,right:4};function uo({data:e,xField:t,yField:o,cellSize:i,pointRadius:n,pointOpacity:r,colorBy:a,colorScale:s,brushSelectionName:c,hoverSelectionName:h,unselectedOpacity:d,maxDevicePixelRatio:u,mobileInteraction:m,mode:p,onPointHover:y,onPointClick:g}){const x=to(null),b=Y({name:c,clientId:`splom-${t}-${o}`,fields:[t,o]}),v=j({name:c,xField:t,yField:o}),A=Y({name:h,clientId:"splom-hover-source",fields:[co]}),w=A.selectPoints,S=Zt(e=>{e?v.brushInteraction.during(e):v.brushInteraction.end(null)},[v.brushInteraction]),C=Zt(e=>{if(!e)return void y?.(null);const t=e.data,o=t?.[co];void 0!==o&&(w({[co]:[o]}),y?.(t,e.x+ho.left,e.y+ho.top))},[w,y]),L=Zt(e=>{if(!e)return void g?.(null);const t=e.data;t&&g?.(t,e.x+ho.left,e.y+ho.top)},[g]),R=Zt(e=>{const t={opacity:r,r:n};return t.fill=a?P(e,a,s):k,"hover"===p?A.isActive&&A.predicate(e)?(t.opacity=1,t.r=2.5*n,t.stroke="#333",t.strokeWidth=1.5):A.isActive&&(t.opacity=.6*r):b.isActive&&!b.predicate(e)&&(t.opacity=d),t},[r,n,a,p,s,A,b,d]);return lo("div",{style:{position:"relative",width:i,height:i},children:[so(l,{ref:x,chartType:"scatter",data:e,size:[i,i],xAccessor:t,yAccessor:o,pointStyle:R,margin:ho,showAxes:!1,maxDevicePixelRatio:u,enableHover:"hover"===p,...f({forceHoverBehavior:"hover"===p,forceClickBehavior:!!g,mobileInteraction:m,customHoverBehavior:C,customClickBehavior:L}),tooltipContent:"hover"===p?()=>null:void 0}),"brush"===p&&so(ao,{frameRef:x,cellSize:i,onBrush:S})]})}function mo({data:e,field:t,label:o,cellSize:i,bins:n,colorBy:r,colorScale:a,brushSelectionName:s,hoverSelectionName:l,mode:c}){const h=Y({name:s,clientId:"splom-diag-"+t,fields:[t]}),d=Y({name:l,clientId:`splom-diag-${t}-hover`,fields:[co]}),u="hover"===c?d:h,m=u.isActive,p=u.predicate,y=Jt(()=>{const o="string"==typeof r?r:null,a=[],s=new Set;for(const i of e){const e=i[t];if(null==e||isNaN(e)||a.push(Number(e)),o){const e=i[o];null!=e&&s.add(e+"")}}if(0===a.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};const[l,c]=ee(a),h=(c-l)/n||1,d=Array.from(s),u=new Map(d.map((e,t)=>[e,t])),y=Array(n).fill(0),f=Array(n).fill(0),g=Array.from({length:n},()=>Array(d.length).fill(0)),x=Array.from({length:n},()=>Array(d.length).fill(0));for(const i of e){const e=i[t];if(null==e||isNaN(e))continue;const r=Math.min(Math.floor((e-l)/h),n-1);if(y[r]++,m&&!p(i)||f[r]++,o){const e=u.get(i[o]+"");void 0!==e&&(g[r][e]++,m&&!p(i)||x[r][e]++)}}const b=Z(y,1),v=g.map((e,t)=>{let o=0;return e.map((e,r)=>{const a=e/b*(i-24),s={x:t/n*i,w:i/n-1,h:a,y0:o,category:d[r]};return o+=a,s})}),A=x.map((e,t)=>{let o=0;return e.map((e,r)=>{const a=e/b*(i-24),s={x:t/n*i,w:i/n-1,h:a,y0:o,category:d[r]};return o+=a,s})});return{bars:y.map((e,t)=>({x:t/n*i,w:i/n-1,h:e/b*(i-24),count:e})),selectedBars:f.map((e,t)=>({x:t/n*i,w:i/n-1,h:e/b*(i-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:b,categories:d}},[e,t,n,i,m,p,r]);return lo("svg",{width:i,height:i,style:{overflow:"hidden"},children:[so("text",{x:i/2,y:14,textAnchor:"middle",fontSize:11,fontWeight:"bold",fill:"#333",children:o}),y.categories.length>0?y.categoryBars.map((e,t)=>e.map((e,o)=>so("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:a?a(e.category):k,opacity:m?.3:.6},`bg-${t}-${o}`))):y.bars.map((e,t)=>so("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:k,opacity:m?.3:.6},"bg-"+t)),m&&(y.categories.length>0?y.selectedCategoryBars.map((e,t)=>e.map((e,o)=>so("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:a?a(e.category):k,opacity:.7},`sel-${t}-${o}`))):y.selectedBars.map((e,t)=>so("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:k,opacity:.7},"sel-"+t)))]})}function po({label:e,cellSize:t}){return so("svg",{width:t,height:t,children:so("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"#333",children:e})})}function yo(e){const{data:t,fields:o,fieldLabels:i={},colorBy:n,colorScheme:r,cellSize:a=150,cellGap:s=4,pointRadius:l=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:d=20,brushMode:u="crossfilter",hoverMode:m=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:f,tooltip:g,showLegend:x,idAccessor:b,width:v,className:A,onObservation:w,onClick:S,chartId:C}=e,L="splom",R="splom-hover",_=T(e.mobileInteraction,{mode:e.mode,width:v??o.length*a,mobileSemantics:e.mobileSemantics}),H=m?"hover":u?"brush":"hover",I=U(e=>e.clearSelection),[P,B]=eo(null),F=Zt(()=>{I(R),B(null)},[I,R]),D=Jt(()=>(t||[]).map((e,t)=>void 0!==e[co]?e:{...e,[co]:t}),[t]),N=Q(D,n,r),M=Zt((e,t,o,i)=>[40+e*(a+s)+(o??0),t*(a+s)+(i??0)],[40,a,s]),W=void 0!==x?x:!!n,O=Jt(()=>{if(!W||!n)return null;const e="string"==typeof n?n:null;return e?Array.from(new Set(D.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:e+"",color:N?N(e+""):k})):null},[W,n,D,N]),E=Jt(()=>({display:"grid",gridTemplateColumns:"40px "+o.map(()=>a+"px").join(" "),gridTemplateRows:o.map(()=>a+"px").join(" ")+" 40px",gap:s+"px",width:"fit-content"}),[o,a,s,40]);return lo("div",{className:A,style:{position:"relative"},children:[O&&so("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:O.map(e=>lo("div",{style:{display:"flex",alignItems:"center",gap:4},children:[so("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e.color}}),so("span",{style:{fontSize:11},children:e.label})]},e.label))}),lo("div",{style:E,onMouseLeave:"hover"===H?F:void 0,children:[o.map((e,t)=>lo(Kt.Fragment,{children:[so("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"#333"},children:i[e]||e}),o.map((o,r)=>t===r?"label"===h?so(po,{label:i[e]||e,cellSize:a},"diag-"+e):so(mo,{data:D,field:e,label:i[e]||e,cellSize:a,bins:d,colorBy:n,colorScale:N,brushSelectionName:L,hoverSelectionName:R,unselectedOpacity:p,mode:H},"diag-"+e):so(uo,{data:D,xField:o,yField:e,fieldLabels:i,cellSize:a,pointRadius:l,pointOpacity:c,colorBy:n,colorScale:N,brushSelectionName:L,hoverSelectionName:R,unselectedOpacity:p,showGrid:y,maxDevicePixelRatio:f,tooltip:g,mobileInteraction:_,mode:H,onPointHover:"hover"===H?(i,n,a)=>{if(i){if(B({datum:i,xField:o,yField:e,colIndex:r,rowIndex:t,px:n??0,py:a??0}),w){const[e,o]=M(r,t,n,a);w({type:"hover",datum:i,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:C})}}else B(null),w&&w({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:C})}:void 0,onPointClick:S||w?(e,o,i)=>{if(!e)return;const[n,a]=M(r,t,o,i);S&&S(e,{x:n,y:a}),w&&w({type:"click",datum:e,x:n,y:a,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:C})}:void 0},`cell-${e}-${o}`))]},"row-"+e)),so("div",{})," ",o.map(e=>so("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:i[e]||e},"col-label-"+e))]}),P&&"hover"===H&&(()=>{const e=P.datum,t=i[P.xField]||P.xField,o=i[P.yField]||P.yField,r=n?"function"==typeof n?n(e):e[n]:null,l=b?"function"==typeof b?b(e):e[b]:"Row "+e[co];return lo("div",{style:{position:"absolute",left:40+P.colIndex*(a+s)+P.px,top:P.rowIndex*(a+s)+P.py-8,transform:"translate(-50%, -100%)",color:"#333",background:"rgba(255,255,255,0.95)",border:"1px solid #ddd",borderRadius:3,padding:"4px 8px",fontSize:11,lineHeight:1.4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:10},children:[so("div",{style:{fontWeight:"bold",marginBottom:2},children:l+""}),lo("div",{children:[t,": ",null!=e[P.xField]?Number(e[P.xField]).toFixed(1):"–"]}),lo("div",{children:[o,": ",null!=e[P.yField]?Number(e[P.yField]).toFixed(1):"–"]}),null!=r&&lo("div",{style:{opacity:.8},children:["string"==typeof n?n:"group",": ",r+""]})]})})()]})}function fo(e){const{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}),so(L,{selections:i,children:so(yo,{...e})})}fo.displayName="ScatterplotMatrix";import{useState as go,useRef as xo,useEffect as bo,useMemo as vo,useCallback as Ao}from"react";import*as wo from"react";import{jsx as ko}from"react/jsx-runtime";var So=null,Co=null;function Lo(e){const[t,o]=wo.useState(()=>So);return wo.useEffect(()=>{if(t)return;let e=!1;return(So?Promise.resolve(So):(Co||(Co=import("./chunk-minimapBrushOverlay-JU57U7NM.module.min.js").then(e=>So=e.MinimapBrushOverlay).catch(e=>{throw Co=null,e})),Co)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?ko(t,{...e}):null}import{jsx as Ro,jsxs as _o}from"react/jsx-runtime";function Ho(e){const{data:t,width:o=600,height:i=400,margin:n,className:r,title:a,description:c,summary:h,xLabel:d,yLabel:u,xFormat:p,yFormat:y,xAccessor:f="x",yAccessor:x="y",lineBy:b,lineDataAccessor:v="coordinates",colorBy:A,colorScheme:w,curve:S="linear",lineWidth:C=2,fillArea:L=!1,areaOpacity:R=.3,showPoints:_=!1,pointRadius:H=3,enableHover:B=!0,showGrid:F=!1,showLegend:D,legendPosition:N,tooltip:M,minimap:O={},renderBefore:T=!1,onBrush:E,brushExtent:G,yExtent:j,frameProps:V={},loading:$,loadingContent:X,emptyContent:Y}=e,U=re($,o,i,X),q=U?null:ne(t,o,i,Y),K=vo(()=>I(t),[t]),[J,Z]=go(null),ee=G??J,te=Ao(e=>{G||Z(e),E?.(e)},[G,E]),ae=xo(null),[se,le]=go(null);bo(()=>{let e=0,t=!1;const o=()=>{if(t)return;const i=ae.current?.getScales?.();i?le(i):e=requestAnimationFrame(o)};return e=requestAnimationFrame(o),()=>{t=!0,e&&cancelAnimationFrame(e)}},[t]);const ce=void 0!==K[0]?.[v],he=vo(()=>{if(ce)return K;if(b){const e=K.reduce((e,t)=>{const o="function"==typeof b?b(t):t[b];if(!e[o]){const t={[v]:[]};"string"==typeof b&&(t[b]=o),e[o]=t}return e[o][v].push(t),e},{});return Object.values(e)}return[{[v]:K}]},[K,b,v,ce]),de=vo(()=>ce||b?he.flatMap(e=>{const t=e[v]||[];return b&&"string"==typeof b?t.map(t=>({...t,[b]:e[b]})):t}):K,[he,v,ce,b,K]),ue=Q(K,A,w),me=$e({lineWidth:C,colorBy:A,colorScale:ue,fillArea:L,areaOpacity:R}),pe=vo(()=>{if(O.lineStyle)return O.lineStyle},[O.lineStyle]),ye=$e({lineWidth:1,colorBy:A,colorScale:ue}),fe=pe??ye,ge=vo(()=>{if(_)return e=>{const t={r:H,fillOpacity:1};return t.fill=A?P(e.parentLine||e,A,ue):k,t}},[_,H,A,ue]),{legend:xe,margin:be,legendPosition:ve}=z({data:he,colorBy:A,colorScale:ue,showLegend:D,legendPosition:N,userMargin:n,chartWidth:o,hasTitle:!!a,axisChrome:{hasAxis:!0,hasAxisLabel:!!d}}),Ae=O.height||60,we=vo(()=>({top:O.margin?.top??0,bottom:O.margin?.bottom??20,left:O.margin?.left??be.left,right:O.margin?.right??be.right}),[O.margin,be]),ke=O.brushDirection||"x",Se=vo(()=>g([{label:d||m(f),accessor:f,role:"x",format:p},{label:u||m(x),accessor:x,role:"y",format:y}]),[f,x,d,u,p,y]),Ce=s({componentName:"MinimapChart",data:t,accessors:{xAccessor:f,yAccessor:x}});if(Ce)return Ro(oe,{componentName:"MinimapChart",message:Ce,width:o,height:i});const Le=L?"area":"line",Re={chartType:Le,data:de,xAccessor:f,yAccessor:x,groupAccessor:b||void 0,curve:S,lineStyle:me,..._&&{pointStyle:ge},size:[o,i],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:be,showAxes:!0,xLabel:d,yLabel:u,xFormat:p,yFormat:y,enableHover:B,showGrid:F,...xe&&{legend:xe,legendPosition:ve},...a&&{title:a},...c&&{description:c},...h&&{summary:h},tooltipContent:!1===M?()=>null:W(M)||Se,...ee&&{xExtent:ee},...j&&{yExtent:j},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...V},_e={chartType:Le,data:de,xAccessor:f,yAccessor:x,groupAccessor:b||void 0,curve:S,lineStyle:fe,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[o,Ae+we.top+we.bottom],margin:we,showAxes:O.showAxes??!1,background:O.background,enableHover:!1,...j&&{yExtent:j}},He=_o("div",{style:{position:"relative",width:o,overflow:"hidden"},children:[Ro(l,{ref:ae,..._e}),Ro(Lo,{width:o-we.left-we.right,height:Ae,margin:we,scales:se,brushDirection:ke,extent:ee,onBrush:te})]},"minimap"),Ie=Ro("div",{style:{overflow:"hidden"},children:Ro(l,{...Re})},"main");return U||q||Ro(ie,{componentName:"MinimapChart",width:o,height:i,children:_o("div",{className:"minimap-chart"+(r?" "+r:""),children:[T?He:Ie,T?Ie:He]})})}Ho.displayName="MinimapChart";import{useMemo as Io,forwardRef as Po,useRef as Bo}from"react";var Fo={topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}};import{Fragment as Do,jsx as No,jsxs as Mo}from"react/jsx-runtime";function Wo(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}var Oo=Po(function(e,t){const o=Bo(null);r(t,{variant:"xy",frameRef:o});const n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:c,className:h,xFormat:d,yFormat:u,xAccessor:p="x",yAccessor:y="y",xCenter:x,yCenter:b,quadrants:A,centerlineStyle:w={},showQuadrantLabels:S=!0,quadrantLabelSize:C=12,colorBy:L,colorScheme:R,styleRules:_,sizeBy:H,sizeRange:P=[3,15],pointRadius:B=5,pointOpacity:F=.8,tooltip:N,pointIdAccessor:M,annotations:O,frameProps:T={},selection:E,linkedHover:j,onObservation:z,onClick:$,hoverHighlight:Q,chartId:X,loading:Y,loadingContent:U,emptyContent:q,legendInteraction:K,legendPosition:J,color:Z,stroke:te,strokeWidth:ne,opacity:re}=e,{width:se,height:le,enableHover:ce,showGrid:he,showLegend:de,title:ue,description:pe,summary:ye,accessibleTable:fe,xLabel:ge,yLabel:xe}=n,be=Io(()=>({topLeft:Wo(Fo.topLeft,A?.topLeft),topRight:Wo(Fo.topRight,A?.topRight),bottomLeft:Wo(Fo.bottomLeft,A?.bottomLeft),bottomRight:Wo(Fo.bottomRight,A?.bottomRight)}),[A]),ve=Io(()=>I(a),[a]),Ae=i({data:ve,rawData:a,colorBy:L,colorScheme:R,legendInteraction:K,legendPosition:J,selection:E,linkedHover:j,fallbackFields:"string"==typeof L?[L]:[],unwrapData:!1,onObservation:z,onClick:$,hoverHighlight:Q,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"QuadrantChart",chartId:X,showLegend:de,userMargin:c,marginDefaults:n.marginDefaults,loading:Y,loadingContent:U,emptyContent:q,width:se,height:le,hasTitle:!!ue,axisChrome:G({showAxes:n.showAxes,xLabel:ge})});ae("QuadrantChart",ve,"xAccessor",p),ae("QuadrantChart",ve,"yAccessor",y);const we=Io(()=>{if(!ve.length)return;const e="function"==typeof p?p:e=>+e[p],t="function"==typeof y?y:e=>+e[y];let o=1/0,i=-1/0,n=1/0,r=-1/0;for(const a of ve){const s=e(a),l=t(a);isFinite(s)&&(o>s&&(o=s),s>i&&(i=s)),isFinite(l)&&(n>l&&(n=l),l>r&&(r=l))}if(null!=x&&isFinite(x)&&(o>x&&(o=x),x>i&&(i=x)),null!=b&&isFinite(b)&&(n>b&&(n=b),b>r&&(r=b)),o===1/0)return;const a=.1*(i-o)||1,s=.1*(r-n)||1;return{xExtent:[o-a,i+a],yExtent:[n-s,r+s]}},[ve,p,y,x,b]),ke=Io(()=>{if(!H||0===ve.length)return;const e=ve.map(e=>"function"==typeof H?H(e):e[H]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?ee(e):void 0},[ve,H]),Se=Io(()=>"function"==typeof p?p:e=>+e[p],[p]),Ce=Io(()=>"function"==typeof y?y:e=>+e[y],[y]),Le=Io(()=>e=>{const t=Se(e),o=Ce(e),i=null!=x?t>=x:void 0,n=null!=b?o>=b:void 0;return void 0===n||void 0===i?Z||k:n&&i?be.topRight.color:n&&!i?be.topLeft.color:!n&&i?be.bottomRight.color:be.bottomLeft.color},[Se,Ce,x,b,be,Z]),Re=Io(()=>H?e=>D(e,H,P,ke):void 0,[H,P,ke]),_e=Io(()=>v(p,y),[p,y]),He=me({colorBy:L,colorScale:Ae.colorScale,color:Z,pointRadius:B,fillOpacity:F,radiusFn:Re,fallbackFill:Le,stroke:te,strokeWidth:ne,opacity:re,styleRules:_,ruleContext:_e,effectiveSelectionHook:Ae.effectiveSelectionHook,resolvedSelection:Ae.resolvedSelection}),Ie=Io(()=>{if(!ve.length)return;const e=new Set;"string"==typeof p&&e.add(p),"string"==typeof y&&e.add(y),"string"==typeof L&&e.add(L),"string"==typeof H&&e.add(H);const t=ve[0];for(const o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[ve,p,y,L,H]),Pe=Io(()=>g([...Ie?[{label:Ie,accessor:Ie,role:"title"}]:[],{label:ge||m(p),accessor:p,role:"x",format:d},{label:xe||m(y),accessor:y,role:"y",format:u},...L?[{label:m(L),accessor:L,role:"color"}]:[],...H?[{label:m(H),accessor:H,role:"size"}]:[]]),[Ie,p,y,ge,xe,L,H,d,u]),Be=s({componentName:"QuadrantChart",data:a,accessors:{xAccessor:p,yAccessor:y}}),Fe=Io(()=>{const e={stroke:w.stroke||"#999",strokeWidth:w.strokeWidth??1,dashArray:w.strokeDasharray||[]};return[(t,o,i,n)=>{if(!i?.x||!i?.y)return;const r=n.width,a=n.height,s=null!=x?i.x(x):r/2,l=null!=b?i.y(b):a/2;if(null!=x&&!isFinite(s))return;if(null!=b&&!isFinite(l))return;const c=Math.max(0,Math.min(r,s)),h=Math.max(0,Math.min(a,l)),d=[{config:be.topLeft,x:0,y:0,w:c,h:h},{config:be.topRight,x:c,y:0,w:r-c,h:h},{config:be.bottomLeft,x:0,y:h,w:c,h:a-h},{config:be.bottomRight,x:c,y:h,w:r-c,h:a-h}];for(const e of d)e.w>0&&e.h>0&&(t.fillStyle=e.config.color,t.globalAlpha=e.config.opacity??.08,t.fillRect(e.x,e.y,e.w,e.h));t.globalAlpha=1,t.strokeStyle=e.stroke,t.lineWidth=e.strokeWidth,e.dashArray.length>0&&t.setLineDash(e.dashArray),t.beginPath(),t.moveTo(c,0),t.lineTo(c,a),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[x,b,be,w]),De=Io(()=>S?[...Fe,(e,t,o,i)=>{if(!o?.x||!o?.y)return;const n=i.width,r=i.height,a=null!=x?o.x(x):n/2,s=null!=b?o.y(b):r/2;(null==x||isFinite(a))&&(null==b||isFinite(s))&&(e.font=`600 ${C}px sans-serif`,e.globalAlpha=.5,e.fillStyle=be.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(be.topLeft.label,8,8),e.fillStyle=be.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(be.topRight.label,n-8,8),e.fillStyle=be.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(be.bottomLeft.label,8,r-8),e.fillStyle=be.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(be.bottomRight.label,n-8,r-8),e.globalAlpha=1)}]:Fe,[Fe,S,C,be,x,b]),Ne=Io(()=>{const e=T.canvasPreRenderers||[];return[...De,...e]},[De,T.canvasPreRenderers]),Me=Io(()=>{const e={stroke:w.stroke||"#999",strokeWidth:w.strokeWidth??1,dashArray:w.strokeDasharray?Array.isArray(w.strokeDasharray)?w.strokeDasharray.join(","):w.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;const n=i.width,r=i.height,a=null!=x?o.x(x):n/2,s=null!=b?o.y(b):r/2;if(null!=x&&!isFinite(a))return null;if(null!=b&&!isFinite(s))return null;const l=Math.max(0,Math.min(n,a)),c=Math.max(0,Math.min(r,s));return Mo(Do,{children:[[{config:be.topLeft,x:0,y:0,w:l,h:c},{config:be.topRight,x:l,y:0,w:n-l,h:c},{config:be.bottomLeft,x:0,y:c,w:l,h:r-c},{config:be.bottomRight,x:l,y:c,w:n-l,h:r-c}].map((e,t)=>e.w>0&&e.h>0?No("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:e.config.color,opacity:e.config.opacity??.08},"qf-"+t):null),No("line",{x1:l,y1:0,x2:l,y2:r,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),No("line",{x1:0,y1:c,x2:n,y2:c,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),S&&Mo(Do,{children:[No("text",{x:8,y:8+C,fill:be.topLeft.color,fontWeight:600,fontSize:C,opacity:.5,children:be.topLeft.label}),No("text",{x:n-8,y:8+C,fill:be.topRight.color,fontWeight:600,fontSize:C,opacity:.5,textAnchor:"end",children:be.topRight.label}),No("text",{x:8,y:r-8,fill:be.bottomLeft.color,fontWeight:600,fontSize:C,opacity:.5,children:be.bottomLeft.label}),No("text",{x:n-8,y:r-8,fill:be.bottomRight.color,fontWeight:600,fontSize:C,opacity:.5,textAnchor:"end",children:be.bottomRight.label})]})]})}]},[x,b,be,w,S,C]);if(Ae.earlyReturn)return Ae.earlyReturn;const We={chartType:"scatter",...null!=a&&{data:ve},xAccessor:p,yAccessor:y,colorAccessor:L||void 0,sizeAccessor:H||void 0,sizeRange:P,pointStyle:He,colorScheme:R,size:[se,le],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:Ae.margin,showAxes:n.showAxes,xLabel:ge,yLabel:xe,xFormat:d,yFormat:u,enableHover:ce,showGrid:he,...we&&{xExtent:we.xExtent,yExtent:we.yExtent},...Ae.legendBehaviorProps,...ue&&{title:ue},...pe&&{description:pe},...ye&&{summary:ye},...void 0!==fe&&{accessibleTable:fe},...h&&{className:h},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===N?()=>null:!0===N||void 0===N?Pe:W(N)||Pe,...f({linkedHover:j,selection:E,onObservation:z,onClick:$,hoverHighlight:Q,mobileInteraction:Ae.mobileInteraction,customHoverBehavior:Ae.customHoverBehavior,customClickBehavior:Ae.customClickBehavior}),...M&&{pointIdAccessor:M},...O&&O.length>0&&{annotations:O},canvasPreRenderers:Ne,...Ae.crosshairProps,...T,...Ne.length>0&&{canvasPreRenderers:Ne},svgPreRenderers:Me};return Be?No(oe,{componentName:"QuadrantChart",message:Be,width:se,height:le}):No(ie,{componentName:"QuadrantChart",width:se,height:le,children:No(l,{ref:o,...We})})});Oo.displayName="QuadrantChart";import*as To from"react";import{useMemo as Eo,useCallback as Go,forwardRef as jo,useRef as zo,useImperativeHandle as Vo}from"react";import{jsx as $o}from"react/jsx-runtime";var Qo="__ma_unitized",Xo="__ma_series";function Yo(e,t){const o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function Uo(e,t){return t[0]+e*(t[1]-t[0])}var qo=jo(function(e,t){const o=zo(null),n=zo([]),r=zo(e.series);r.current=e.series,Vo(t,()=>{const e=()=>(r.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;const i=e(),r=t;for(let e=0;i.length>e&&2>e;e++){const t=i[e],a=t.extent||n.current[e];if(!a)continue;const s=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null!=s&&isFinite(s)&&o.current.push({...r,[Qo]:Yo(s,a),[Xo]:t.label||"Series "+(e+1)})}},pushMany:t=>{if(!o.current)return;const i=e(),r=[];for(const e of t)for(let t=0;i.length>t&&2>t;t++){const o=i[t],a=o.extent||n.current[t];if(!a)continue;const s=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null!=s&&isFinite(s)&&r.push({...e,[Qo]:Yo(s,a),[Xo]:o.label||"Series "+(t+1)})}o.current.pushMany(r)},remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],clear:()=>o.current?.clear(),getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}},[]);const a=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},{width:800,height:400}),{data:c,margin:h,className:d,xFormat:u,xAccessor:m="x",series:p,colorScheme:y,curve:g="monotoneX",lineWidth:x=2,tooltip:b,annotations:v,frameProps:A={},selection:k,linkedHover:C,onObservation:L,onClick:R,hoverHighlight:_,chartId:H,loading:P,loadingContent:B,emptyContent:F,legendInteraction:D,legendPosition:N,stroke:M,strokeWidth:O,opacity:T}=e,{width:E,height:j,enableHover:z,showGrid:$,showLegend:Q=!0,title:X,description:Y,summary:U,accessibleTable:K,xLabel:J}=a,Z=Eo(()=>I(c),[c]),ee=Eo(()=>I(p),[p]),te=ee,ae=2===ee.length,se=Eo(()=>ae?{...A.legendLayout,sideGutter:A.legendLayout?.sideGutter??70}:A.legendLayout,[A.legendLayout,ae]);"undefined"==typeof process||"production"===process.env?.NODE_ENV||ae||console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${ee.length}. Rendering as a standard multi-line chart.`);const le=re(P,E,j,B),ce=le?null:ne(c,E,j,F),he=q(),de=Eo(()=>{let e;if(Array.isArray(y))e=y;else if(he&&he.length>0)e=he;else{const t=w[y];e=Array.isArray(t)?t:S}return te.map((t,o)=>t.color||e[o%e.length])},[te,y,he]),ue=Eo(()=>ee.map((e,t)=>e.label||"Series "+(t+1)),[ee]),{unitizedData:me,extents:pe}=Eo(()=>{if(0===Z.length){const e=ee.map(e=>e.extent||null).filter(Boolean);return e.length===ee.length&&(n.current=e),{unitizedData:[],extents:e.length===ee.length?e:[]}}const e=ee.map(e=>e.extent||function(e,t){let o=1/0,i=-1/0;const n="function"==typeof t?t:e=>e[t];for(const t of e){const e=n(t);null!=e&&isFinite(e)&&(o>e&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){const e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}(Z,e.yAccessor));if(n.current=e,!ae){const t=[];for(const e of Z)for(let o=0;ee.length>o;o++){const i=ee[o],n=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=n&&t.push({...e,[Qo]:n,[Xo]:ue[o]})}return{unitizedData:t,extents:e}}const t=[];for(const o of Z)for(let i=0;2>i;i++){const n=ee[i],r=("function"==typeof n.yAccessor?n.yAccessor:e=>e[n.yAccessor])(o);null!=r&&t.push({...o,[Qo]:Yo(r,e[i]),[Xo]:ue[i]})}return{unitizedData:t,extents:e}},[Z,ee,ae,ue]),ye=Eo(()=>{if(ae&&pe.length>=2)return[{orient:"left",label:ue[0],tickFormat:ee[0].format||(e=>{const t=Uo(e,pe[0]);return Number.isInteger(t)?t+"":t.toFixed(1)})},{orient:"right",label:ue[1],tickFormat:ee[1].format||(e=>{const t=Uo(e,pe[1]);return Number.isInteger(t)?t+"":t.toFixed(1)})},{orient:"bottom"}]},[ae,pe,ee,ue]),fe=Eo(()=>me.length>0?me:ue.map(e=>({[Xo]:e})),[me,ue]),ge=i({data:fe,rawData:c,colorBy:Xo,colorScheme:de,legendInteraction:D,legendPosition:N,selection:k,linkedHover:C,fallbackFields:[Xo],unwrapData:!1,onObservation:L,onClick:R,hoverHighlight:_,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"MultiAxisLineChart",chartId:H,showLegend:Q,legendLayout:se,userMargin:h,marginDefaults:ae?{...a.marginDefaults,left:70,right:70}:a.marginDefaults,loading:P,loadingContent:B,emptyContent:F,width:E,height:j,hasTitle:!!X,axisChrome:G({showAxes:a.showAxes,xLabel:J})}),xe=Eo(()=>{const e=new Map;return ue.forEach((t,o)=>e.set(t,de[o])),e},[ue,de]),be=$e({lineWidth:x,resolveStroke:Go(e=>xe.get(e[Xo])||de[0],[xe,de]),stroke:M,strokeWidth:O,opacity:T,effectiveSelectionHook:ge.effectiveSelectionHook,resolvedSelection:ge.resolvedSelection}),ve=Eo(()=>{if(!1===b)return()=>null;return W(b)||(e=>{const t=e.data||e,o=t[Xo],i=ue.indexOf(o),n=t[Qo],r=ae&&i>=0&&pe[i]?Uo(n,pe[i]):n,a=i>=0&&ee[i]?.format?ee[i].format:e=>Number.isInteger(e)?e+"":e.toFixed(2),s="function"==typeof m?m(t):t[m];return To.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},To.createElement("div",{style:{fontWeight:600,marginBottom:4,color:de[i]||"inherit"}},o),To.createElement("div",null,`${"string"==typeof m?m:"x"}: ${s}`),To.createElement("div",null,`${o}: ${a(r)}`))})},[b,ue,de,pe,ae,ee,m]);if(ge.earlyReturn)return ge.earlyReturn;const Ae=s({componentName:"MultiAxisLineChart",data:c,accessors:{xAccessor:m}}),we=ae?[0,1]:void 0,ke={chartType:"line",...null!=c&&{data:me},xAccessor:m,yAccessor:Qo,groupAccessor:Xo,lineStyle:be,colorScheme:de,size:[E,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ge.margin,showAxes:a.showAxes,...ye&&{axes:ye},xLabel:J,...ae?{}:{yLabel:ue[0]},xFormat:u,...ae&&we&&{yExtent:we},enableHover:z,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:$,curve:g,...ge.legendBehaviorProps,...X&&{title:X},...Y&&{description:Y},...U&&{summary:U},...void 0!==K&&{accessibleTable:K},...d&&{className:d},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:ve,...v&&{annotations:v},...f({linkedHover:C,selection:k,onObservation:L,onClick:R,hoverHighlight:_,mobileInteraction:ge.mobileInteraction,customHoverBehavior:ge.customHoverBehavior,customClickBehavior:ge.customClickBehavior}),...ge.crosshairProps,...A,...se&&{legendLayout:se}};return le||ce||(Ae?$o(oe,{componentName:"MultiAxisLineChart",message:Ae,width:E,height:j}):$o(ie,{componentName:"MultiAxisLineChart",width:E,height:j,children:$o(l,{ref:o,...ke})}))});qo.displayName="MultiAxisLineChart";import{useMemo as Ko,forwardRef as Jo,useRef as Zo}from"react";import{jsx as ei}from"react/jsx-runtime";var ti=Jo(function(e,t){const i=Zo(null);r(t,{variant:"xy",frameRef:i});const n=V(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:c,className:h,xFormat:d,yFormat:u,xAccessor:p="x",highAccessor:b="high",lowAccessor:v="low",openAccessor:A,closeAccessor:w,candlestickStyle:k,tooltip:S,annotations:C,xExtent:L,yExtent:R,frameProps:_={},selection:H,linkedHover:P,onObservation:F,onClick:D,chartId:N,loading:M,loadingContent:W,emptyContent:O}=e,{width:T,height:E,enableHover:G,showGrid:j,title:z,description:Q,summary:X,accessibleTable:Y,xLabel:U,yLabel:q}=n,K=re(M,T,E,W),J=K?null:ne(a,T,E,O),Z=Ko(()=>I(a),[a]),ee=null==A||null==w;ae("CandlestickChart",Z,"xAccessor",p),ae("CandlestickChart",Z,"highAccessor",b),ae("CandlestickChart",Z,"lowAccessor",v),ee||(ae("CandlestickChart",Z,"openAccessor",A),ae("CandlestickChart",Z,"closeAccessor",w));const{customHoverBehavior:te,customClickBehavior:se,crosshairSourceId:le}=$({selection:H,linkedHover:P,onObservation:F,onClick:D,chartType:"CandlestickChart",chartId:N,mobileInteraction:n.mobileInteraction}),ce=B(P,le),he=Ko(()=>{const e=n.marginDefaults,t="sparkline"===n.mode?{...e,top:0,bottom:0}:e;return null==c?t:{...t,...o(c)}},[c,n.marginDefaults,n.mode]),de=Ko(()=>{const e=[{label:U||m(p),accessor:p,role:"x",format:d}];return ee?(e.push({label:"High",accessor:b,role:"y",format:u}),e.push({label:"Low",accessor:v,format:u})):(e.push({label:"Open",accessor:A,format:u}),e.push({label:"High",accessor:b,format:u}),e.push({label:"Low",accessor:v,format:u}),e.push({label:"Close",accessor:w,format:u})),g(e)},[p,U,d,u,b,v,A,w,ee]),ue=s({componentName:"CandlestickChart",data:a,accessors:{xAccessor:p,highAccessor:b,lowAccessor:v,...!ee&&{openAccessor:A,closeAccessor:w}}}),me={chartType:"candlestick",...null!=a&&{data:Z},xAccessor:p,yAccessor:b,highAccessor:b,lowAccessor:v,...!ee&&{openAccessor:A,closeAccessor:w},...k&&{candlestickStyle:k},scalePadding:Math.max(2,Math.min(12,Math.round(T/40))),extentPadding:T>200?.1:.02,size:[T,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:he,showAxes:n.showAxes,xLabel:U,yLabel:q,xFormat:d,yFormat:u,enableHover:G,showGrid:j,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...y({title:z,description:Q,summary:X,accessibleTable:Y,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...x({tooltip:S,defaultTooltipContent:de}),...f({linkedHover:P,selection:H,onObservation:F,onClick:D,mobileInteraction:n.mobileInteraction,customHoverBehavior:te,customClickBehavior:se}),...C&&C.length>0&&{annotations:C},...L&&{xExtent:L},...R&&{yExtent:R},...ce,..._};return K||J||(ue?ei(oe,{componentName:"CandlestickChart",message:ue,width:T,height:E}):ei(ie,{componentName:"CandlestickChart",width:T,height:E,children:ei(l,{ref:i,...me})}))});ti.displayName="CandlestickChart";export{Ie as Scatterplot,We as ConnectedScatterplot,Ye as LineChart,Je as XYCustomChart,ht as rankBumpData,ft as BumpChart,kt as AreaChart,Ft as DifferenceChart,Ot as StackedAreaChart,Vt as Heatmap,qt as BubbleChart,fo as ScatterplotMatrix,Ho as MinimapChart,Fo as DEFAULT_QUADRANTS,Oo as QuadrantChart,qo as MultiAxisLineChart,ti as CandlestickChart};
|