semiotic 3.8.5 → 3.8.7
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 +37 -10
- package/README.md +83 -56
- package/ai/behaviorContracts.cjs +88 -3
- package/ai/componentMetadata.cjs +5 -10
- package/ai/dist/mcp-server.js +99 -10
- package/ai/examples.md +198 -9
- package/ai/schema.json +2002 -165
- package/ai/surface-manifest.json +14 -10
- package/ai/system-prompt.md +9 -3
- package/dist/{chunk-chartContainerDataAudit-74TLKIP6.module.min.js → chunk-chartContainerDataAudit-JDSVSKGM.module.min.js} +1 -1
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +1 -0
- package/dist/chunk-chunk-2YAZHXL4.module.min.js +2 -0
- package/dist/chunk-chunk-3NGIKFD6.module.min.js +1 -0
- package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
- package/dist/chunk-chunk-5SD6BHVW.module.min.js +2 -0
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
- package/dist/chunk-chunk-7TTBHSAG.module.min.js +2 -0
- package/dist/chunk-chunk-7ZDJSYKI.module.min.js +2 -0
- package/dist/chunk-chunk-BGHPD3RA.module.min.js +1 -0
- package/dist/chunk-chunk-BMRZ2SPU.module.min.js +2 -0
- package/dist/chunk-chunk-BNGBEY7N.module.min.js +2 -0
- package/dist/chunk-chunk-C7APLVQD.module.min.js +2 -0
- package/dist/chunk-chunk-DGWFBOGB.module.min.js +1 -0
- package/dist/chunk-chunk-DIVE2DRA.module.min.js +2 -0
- package/dist/chunk-chunk-FBUNUIPV.module.min.js +2 -0
- package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
- package/dist/chunk-chunk-FRO4TRXK.module.min.js +2 -0
- package/dist/chunk-chunk-G7QVPZUD.module.min.js +2 -0
- package/dist/chunk-chunk-GBPYV4FP.module.min.js +2 -0
- package/dist/chunk-chunk-GU2EJIDJ.module.min.js +2 -0
- package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
- package/dist/{chunk-chunk-LJLS6DY7.module.min.js → chunk-chunk-JWXLNZSM.module.min.js} +1 -1
- package/dist/chunk-chunk-KXAFCCDB.module.min.js +2 -0
- package/dist/chunk-chunk-LG7YKJAK.module.min.js +2 -0
- package/dist/{chunk-chunk-I36PJ4OC.module.min.js → chunk-chunk-LVHDZAT3.module.min.js} +1 -1
- package/dist/chunk-chunk-LWITSR2O.module.min.js +2 -0
- package/dist/chunk-chunk-MX35T6RX.module.min.js +2 -0
- package/dist/chunk-chunk-NH4MEAKP.module.min.js +2 -0
- package/dist/chunk-chunk-NJETWX42.module.min.js +2 -0
- package/dist/chunk-chunk-NW25WGLS.module.min.js +2 -0
- package/dist/{chunk-chunk-TMWIZL3K.module.min.js → chunk-chunk-OI7R7EJB.module.min.js} +1 -1
- package/dist/chunk-chunk-ONMLEXHR.module.min.js +2 -0
- package/dist/chunk-chunk-OY66GCE6.module.min.js +1 -0
- package/dist/chunk-chunk-PZFT457G.module.min.js +1 -0
- package/dist/chunk-chunk-Q3WW6JGR.module.min.js +1 -0
- package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +1 -0
- package/dist/chunk-chunk-RJRM2E6P.module.min.js +1 -0
- package/dist/chunk-chunk-RPL7WYXI.module.min.js +1 -0
- package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
- package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
- package/dist/chunk-chunk-V3OAKG32.module.min.js +1 -0
- package/dist/chunk-chunk-WLOIUMWG.module.min.js +2 -0
- package/dist/chunk-chunk-XEGXX4F7.module.min.js +1 -0
- package/dist/chunk-chunk-XFRBLXYM.module.min.js +1 -0
- package/dist/chunk-chunk-Z2AJERX5.module.min.js +2 -0
- package/dist/chunk-chunk-ZXYDYAB7.module.min.js +2 -0
- package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
- package/dist/components/ai/chartCapabilities.d.ts +5 -3
- package/dist/components/ai/conversationArc.d.ts +2 -176
- package/dist/components/ai/conversationArcTypes.d.ts +202 -0
- package/dist/components/ai/readerGrounding.d.ts +12 -0
- package/dist/components/ai/vacpAdapter.d.ts +13 -0
- package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
- package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
- package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
- package/dist/components/ai/vacpAdapterState.d.ts +3 -0
- package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
- package/dist/components/ai/vacpTypes.d.ts +160 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +1 -1
- package/dist/components/charts/index.d.ts +7 -4
- package/dist/components/charts/ordinal/BarChart.d.ts +7 -14
- package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -14
- package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
- package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
- package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
- package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
- package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
- package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
- package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
- package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +2 -4
- package/dist/components/charts/shared/gaugeGradient.d.ts +4 -8
- package/dist/components/charts/shared/gradient.d.ts +35 -0
- package/dist/components/charts/shared/hatchFill.d.ts +3 -10
- package/dist/components/charts/shared/hooks.d.ts +2 -50
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -2
- package/dist/components/charts/shared/useChartLegend.d.ts +65 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +12 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +6 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -0
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +25 -42
- package/dist/components/charts/xy/BumpChart.capability.d.ts +11 -0
- package/dist/components/charts/xy/BumpChart.d.ts +161 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +3 -10
- package/dist/components/charts/xy/Heatmap.d.ts +3 -0
- package/dist/components/charts/xy/LineChart.d.ts +6 -8
- package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
- package/dist/components/data/portability/index.d.ts +2 -0
- package/dist/components/geometry/bumpRibbonGeometry.d.ts +36 -0
- package/dist/components/legendLayout.d.ts +75 -1
- package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
- package/dist/components/recipes/geographicGrid.d.ts +100 -0
- package/dist/components/recipes/physics.d.ts +2 -0
- package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
- package/dist/components/semiotic-ai.d.ts +6 -4
- package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/components/semiotic-experimental.d.ts +6 -3
- package/dist/components/semiotic-geo.d.ts +5 -0
- package/dist/components/semiotic-network.d.ts +1 -0
- package/dist/components/semiotic-ordinal.d.ts +2 -0
- package/dist/components/semiotic-physics.d.ts +10 -6
- package/dist/components/semiotic-realtime-core.d.ts +1 -0
- package/dist/components/semiotic-recipes-core.d.ts +6 -1
- package/dist/components/semiotic-server-edge.d.ts +1 -1
- package/dist/components/semiotic-server.d.ts +1 -1
- package/dist/components/semiotic-xy.d.ts +4 -0
- package/dist/components/semiotic.d.ts +4 -4
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +2 -1
- package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
- package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
- package/dist/components/server/serverChartConfigShared.d.ts +16 -0
- package/dist/components/server/serverChartConfigs.d.ts +3 -2
- package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
- package/dist/components/server/serverChartConfigsXY.d.ts +1 -1
- package/dist/components/server/staticLegend.d.ts +10 -2
- package/dist/components/server/staticSVGChrome.d.ts +14 -6
- package/dist/components/server/staticValue.d.ts +8 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +4 -10
- package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -6
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -6
- package/dist/components/stream/SVGOverlay.d.ts +2 -6
- package/dist/components/stream/StalenessBadge.d.ts +2 -6
- package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
- package/dist/components/stream/geoTypes.d.ts +3 -6
- package/dist/components/stream/legendRenderer.d.ts +10 -6
- package/dist/components/stream/ordinalTypes.d.ts +7 -31
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +1 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +2 -6
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -6
- package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
- package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
- package/dist/components/stream/pipelineConfig.d.ts +7 -15
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +9 -69
- package/dist/components/stream/renderers/cornerRadii.d.ts +2 -9
- package/dist/components/stream/renderers/thresholdLineSegments.d.ts +12 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +3 -5
- package/dist/components/stream/types.d.ts +34 -56
- package/dist/components/stream/xySceneBuilders/areaGradient.d.ts +4 -20
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -6
- package/dist/components/types/legendTypes.d.ts +31 -6
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- 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/physicsWorker.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.d.ts +6 -4
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -0
- package/dist/semiotic-experimental-vacp.module.min.js +1 -0
- package/dist/semiotic-experimental.d.ts +6 -3
- package/dist/semiotic-experimental.min.js +2 -1
- package/dist/semiotic-experimental.module.min.js +2 -1
- package/dist/semiotic-geo.d.ts +5 -0
- package/dist/semiotic-network.d.ts +1 -0
- package/dist/semiotic-ordinal.d.ts +2 -0
- package/dist/semiotic-physics.d.ts +10 -6
- package/dist/semiotic-realtime-core.d.ts +1 -0
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +6 -1
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.d.ts +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-server.d.ts +1 -1
- 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-xy.d.ts +4 -0
- package/dist/semiotic.d.ts +4 -4
- 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 +18 -2
- package/spec/README.md +94 -2
- package/spec/bindings/README.md +14 -3
- package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
- package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
- package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
- package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
- package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
- package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
- package/dist/chunk-chunk-4AANPFOX.module.min.js +0 -2
- package/dist/chunk-chunk-5I3UZV4Q.module.min.js +0 -2
- package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
- package/dist/chunk-chunk-74CCPVXB.module.min.js +0 -1
- package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
- package/dist/chunk-chunk-ANYDWOZF.module.min.js +0 -1
- package/dist/chunk-chunk-AVBI6GDT.module.min.js +0 -1
- package/dist/chunk-chunk-BANTPINB.module.min.js +0 -2
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
- package/dist/chunk-chunk-C57LR3YG.module.min.js +0 -1
- package/dist/chunk-chunk-CKMD5NV3.module.min.js +0 -2
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
- package/dist/chunk-chunk-CWQ5YIHX.module.min.js +0 -2
- package/dist/chunk-chunk-E6TXX6MI.module.min.js +0 -1
- package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
- package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
- package/dist/chunk-chunk-K3DMEW22.module.min.js +0 -1
- package/dist/chunk-chunk-KT2VAZMZ.module.min.js +0 -1
- package/dist/chunk-chunk-L6EA5V3G.module.min.js +0 -2
- package/dist/chunk-chunk-LJPCLYSC.module.min.js +0 -2
- package/dist/chunk-chunk-LRIFN2HK.module.min.js +0 -1
- package/dist/chunk-chunk-N5DDKCCF.module.min.js +0 -1
- package/dist/chunk-chunk-NEVE562N.module.min.js +0 -1
- package/dist/chunk-chunk-NLO44TOS.module.min.js +0 -2
- package/dist/chunk-chunk-PZJ2SBLL.module.min.js +0 -2
- package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
- package/dist/chunk-chunk-QUJ6TTLY.module.min.js +0 -1
- package/dist/chunk-chunk-RBIDBUT4.module.min.js +0 -2
- package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
- package/dist/chunk-chunk-RFLAG356.module.min.js +0 -1
- package/dist/chunk-chunk-RPU4IZAV.module.min.js +0 -2
- package/dist/chunk-chunk-SKMBCFIL.module.min.js +0 -2
- package/dist/chunk-chunk-TAE7W424.module.min.js +0 -2
- package/dist/chunk-chunk-TUBMTZMU.module.min.js +0 -2
- package/dist/chunk-chunk-UFFEXJQY.module.min.js +0 -1
- package/dist/chunk-chunk-XSCHTS4D.module.min.js +0 -2
- package/dist/chunk-chunk-XXWSHGPL.module.min.js +0 -2
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +0 -1
- package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +0 -1
package/ai/surface-manifest.json
CHANGED
|
@@ -7,16 +7,17 @@
|
|
|
7
7
|
"src/components/semiotic-ai.ts",
|
|
8
8
|
"ai/mcp-server.ts"
|
|
9
9
|
],
|
|
10
|
-
"version": "3.8.
|
|
10
|
+
"version": "3.8.7",
|
|
11
11
|
"components": {
|
|
12
|
-
"schema":
|
|
13
|
-
"aiChartExports":
|
|
14
|
-
"mcpRenderable":
|
|
15
|
-
"browserOnly":
|
|
12
|
+
"schema": 57,
|
|
13
|
+
"aiChartExports": 54,
|
|
14
|
+
"mcpRenderable": 52,
|
|
15
|
+
"browserOnly": 5,
|
|
16
16
|
"categories": {
|
|
17
17
|
"xy": [
|
|
18
18
|
"AreaChart",
|
|
19
19
|
"BubbleChart",
|
|
20
|
+
"BumpChart",
|
|
20
21
|
"CandlestickChart",
|
|
21
22
|
"ConnectedScatterplot",
|
|
22
23
|
"DifferenceChart",
|
|
@@ -71,14 +72,15 @@
|
|
|
71
72
|
"TemporalHistogram"
|
|
72
73
|
],
|
|
73
74
|
"physics": [
|
|
75
|
+
"ChainReactionChart",
|
|
74
76
|
"CollisionSwarmChart",
|
|
75
77
|
"CrucibleChart",
|
|
76
78
|
"EventDropChart",
|
|
77
79
|
"GaltonBoardChart",
|
|
78
80
|
"GauntletChart",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
81
|
+
"PacketFlowChart",
|
|
82
|
+
"ProcessFlowChart",
|
|
83
|
+
"UnitPileChart"
|
|
82
84
|
],
|
|
83
85
|
"value": [
|
|
84
86
|
"BigNumber"
|
|
@@ -90,7 +92,9 @@
|
|
|
90
92
|
"BigNumber",
|
|
91
93
|
"BoxPlot",
|
|
92
94
|
"BubbleChart",
|
|
95
|
+
"BumpChart",
|
|
93
96
|
"CandlestickChart",
|
|
97
|
+
"ChainReactionChart",
|
|
94
98
|
"ChordDiagram",
|
|
95
99
|
"CirclePack",
|
|
96
100
|
"CollisionSwarmChart",
|
|
@@ -113,9 +117,8 @@
|
|
|
113
117
|
"MinimapChart",
|
|
114
118
|
"MultiAxisLineChart",
|
|
115
119
|
"OrbitDiagram",
|
|
116
|
-
"
|
|
120
|
+
"PacketFlowChart",
|
|
117
121
|
"PhysicsCustomChart",
|
|
118
|
-
"PhysicsPileChart",
|
|
119
122
|
"PieChart",
|
|
120
123
|
"ProcessFlowChart",
|
|
121
124
|
"ProcessSankey",
|
|
@@ -136,6 +139,7 @@
|
|
|
136
139
|
"TemporalHistogram",
|
|
137
140
|
"TreeDiagram",
|
|
138
141
|
"Treemap",
|
|
142
|
+
"UnitPileChart",
|
|
139
143
|
"ViolinPlot"
|
|
140
144
|
],
|
|
141
145
|
"geoExcludedFromAIExports": [
|
package/ai/system-prompt.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- semiotic-bundle-sizes:start -->
|
|
4
4
|
<!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
|
|
5
|
-
**Use sub-path imports** — `semiotic/xy` (
|
|
5
|
+
**Use sub-path imports** — `semiotic/xy` (145KB gz), `semiotic/ordinal` (120KB gz), `semiotic/network` (126KB gz), `semiotic/geo` (103KB gz), `semiotic/realtime` (153KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (210KB gz), `semiotic/server/node` (210KB gz), `semiotic/server/edge` (224KB gz), `semiotic/utils` (83KB gz), `semiotic/utils/core` (82KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (88KB gz), `semiotic/recipes/core` (87KB gz), `semiotic/recipes/react` (2KB gz), `semiotic/themes` (7KB gz), `semiotic/themes/core` (7KB gz), `semiotic/themes/react` (6KB gz), `semiotic/data` (4KB gz), `semiotic/value` (8KB gz), `semiotic/physics` (160KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (486KB gz), `semiotic/ai/core` (80KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 389KB gz.
|
|
6
6
|
<!-- semiotic-bundle-sizes:end -->
|
|
7
7
|
|
|
8
8
|
## Flat Array Data (`data: object[]`)
|
|
@@ -60,7 +60,7 @@ Use only when motion maps to the data semantics; the settled projection is what
|
|
|
60
60
|
|
|
61
61
|
- **GaltonBoardChart** — `data`, `valueAccessor` ("value"), `bins`, `mode` ("sample"|"mechanical"), `pegRows`, `mechanicalCount`, `branchProbability`, `colorBy`, `seed`, `size`. Distribution/sampling drop that settles into bins; mechanical mode can generate a seeded no-data demonstration.
|
|
62
62
|
- **EventDropChart** — `data`, `timeAccessor` ("time"), `arrivalAccessor` ("arrivalTime"), `windows={{size}}`, `watermark={{delay}}`, `timeScale`, `colorBy`, `size`. Event-time arrival replay and late/watermark windows.
|
|
63
|
-
- **
|
|
63
|
+
- **UnitPileChart** — `data`, `categoryAccessor` ("category"), `valueAccessor` ("value"), `mode` ("sample"|"mechanical"), `mechanicalCount`, `mechanicalCategories`, `unitValue`, `colorBy`, `showProjection`, `size`. Unitized category piles; mechanical mode can generate a seeded no-data capacity sketch; default projection overlay keeps exact totals readable; raise `unitValue` for large values.
|
|
64
64
|
- **CollisionSwarmChart** — `data`, `xAccessor` ("x"), optional `groupAccessor`, `radiusAccessor`, `xExtent`, `collisionIterations`, `settle`, `showProjection`, `colorBy`, `size`. Collision-relaxed dot-strip/swarm chart that preserves quantitative axis position and optional group lanes.
|
|
65
65
|
- **PhysicsCustomChart** — `data`, `layout(ctx)`, `layoutConfig`, `config`, `colorBy`, `size`. Escape hatch for bespoke physics scenes; layouts return bodies/colliders/sensors plus optional SVG overlays.
|
|
66
66
|
|
|
@@ -150,10 +150,16 @@ These rules are generated from `ai/behaviorContracts.cjs` and are consumed by `s
|
|
|
150
150
|
- **Data required by usage mode** (`props.data-required-by-usage-mode`): Static usage (`renderChart`, MCP previews, SSR snapshots, and copy/paste examples with immediate data) requires data in props. React push mode selects live ingestion by omitting data and mutating through a ref.
|
|
151
151
|
- **Categorical color precedence** (`color.category-precedence`): When colorBy is set, CategoryColorProvider/LinkedCharts category maps win for mapped categories. Unmapped categories fall back to explicit colorScheme, then ThemeProvider colors.categorical, then the built-in categorical fallback.
|
|
152
152
|
- **Required prop combinations** (`props.required-combinations`): Some chart families need semantic props beyond data. These combinations are enforced by validation/schema for static configs and remain required in push mode unless explicitly noted.
|
|
153
|
-
Required combinations: StackedAreaChart: static data + areaBy; push areaBy. Stacked areas need a flat data array plus areaBy to identify the stacked series. BubbleChart: static data + sizeBy; push sizeBy. Bubbles need sizeBy in addition to x/y accessors so radius encodes data rather than a constant point size. StackedBarChart: static data + stackBy; push stackBy. Stacked bars need stackBy to split each category into stack segments. GroupedBarChart: static data + groupBy; push groupBy. Grouped bars need groupBy to split each category into side-by-side bars. SwimlaneChart: static data + subcategoryAccessor; push subcategoryAccessor. Swimlanes need subcategoryAccessor; colorBy defaults to the same field when not provided. GaugeChart: static value; push not supported. GaugeChart is value-only. thresholds,
|
|
153
|
+
Required combinations: StackedAreaChart: static data + areaBy; push areaBy. Stacked areas need a flat data array plus areaBy to identify the stacked series. BubbleChart: static data + sizeBy; push sizeBy. Bubbles need sizeBy in addition to x/y accessors so radius encodes data rather than a constant point size. StackedBarChart: static data + stackBy; push stackBy. Stacked bars need stackBy to split each category into stack segments. GroupedBarChart: static data + groupBy; push groupBy. Grouped bars need groupBy to split each category into side-by-side bars. SwimlaneChart: static data + subcategoryAccessor; push subcategoryAccessor. Swimlanes need subcategoryAccessor; colorBy defaults to the same field when not provided. GaugeChart: static value; push not supported. GaugeChart is value-only. Its thresholds use { value, color, label? }; BigNumber thresholds use the distinct { at, level, color?, label? } vocabulary. ForceDirectedGraph: static nodes + edges; push nodes + edges. ForceDirectedGraph schema/rendering requires nodes and edges. If an agent infers nodes from edge endpoints, it must materialize a nodes array before returning code.
|
|
154
154
|
- **Push mode omits data** (`streaming.push-mode-data`): HOC push mode is selected by omitting the data prop entirely. Passing data={[]} is static empty data and can clear/reinitialize the frame on render.
|
|
155
|
+
- **Serialized proposals keep the initial snapshot** (`streaming.serialized-proposal-snapshot`): A JSON component/props proposal for MCP, SSR, or evaluation is a static snapshot even when the request mentions future pushes. Keep the supplied initial rows in the component's real data prop and do not invent pushRows, pushRequirement, ref, or method props.
|
|
155
156
|
- **Ref mutations need stable IDs** (`streaming.ref-mutations-require-id-accessors`): push() and pushMany() can append without IDs, but remove(id) and update(id, updater) require a stable ID accessor: pointIdAccessor for XY/realtime charts, dataIdAccessor for ordinal charts, and nodeIDAccessor/edgeIdAccessor for network operations.
|
|
156
157
|
- **renderChart uses static props only** (`rendering.renderchart-static-props`): MCP renderChart and semiotic/server renderChart render a single static SVG/PNG snapshot. Browser-only realtime components and future ref pushes are not renderable through that path.
|
|
158
|
+
- **Axis formatters are React callbacks** (`serialization.formatters-are-react-callbacks`): xFormat, yFormat, categoryFormat, and valueFormat are callback props, not d3 format strings or axis-title strings. They are intentionally absent from JSON/MCP schemas and string values fail validation.
|
|
159
|
+
- **Value components do not inherit chart-HOC props** (`value.bignumber-wire-contract`): BigNumber is a value component, not a chart HOC, so it does not inherit the common chart-HOC prop list. It uses label as its visible heading and supports description and summary; title and accessibleTable are invalid. Its percent format expects a ratio such as 0.97 and renders it as 97%.
|
|
160
|
+
- **Proportional symbol maps use geographic props** (`geo.proportional-symbol-wire-shape`): ProportionalSymbolMap reads point rows from points, longitude from xAccessor (default lon), latitude from yAccessor (default lat), and radius from sizeBy. sizeRange is the two-number pixel-radius range.
|
|
161
|
+
- **Physics charts separate chart mode from simulation input** (`physics.sample-and-mechanical-inputs`): Sample simulations use data plus the chart's accessors. Seeded no-data demonstrations use simulationMode="mechanical" (legacy mode="mechanical" remains accepted); mode otherwise carries chart display modes such as primary or sparkline.
|
|
162
|
+
- **Physics push methods ingest source records** (`physics.push-uses-source-records`): Physics HOC refs push source records through the chart's accessors. pushRows and dataIdAccessor are not component props; stable source id fields are retained on spawned bodies without an invented accessor.
|
|
157
163
|
|
|
158
164
|
<!-- semiotic-behavior-contracts:end -->
|
|
159
165
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-
|
|
2
|
+
import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-DIVE2DRA.module.min.js";import"./chunk-chunk-6V5VQVCT.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
function t(t,r=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!a)return t;const n=Math.round(parseInt(a[1],16)*(1-r)),o=Math.round(parseInt(a[2],16)*(1-r)),e=Math.round(parseInt(a[3],16)*(1-r));return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}function r(t,r=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!a)return t;const n=Math.round(parseInt(a[1],16)+(255-parseInt(a[1],16))*r),o=Math.round(parseInt(a[2],16)+(255-parseInt(a[2],16))*r),e=Math.round(parseInt(a[3],16)+(255-parseInt(a[3],16))*r);return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}export{t as darkenColor,r as lightenColor};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{renderRectPulse as t}from"./chunk-chunk-NH4MEAKP.module.min.js";import{buildLinearFillGradient as e,clampCornerRadii as s,filterSparseArray as n,hasAnyCornerRadius as o,resolveCSSColor as i,resolveCanvasFill as r,symbolPathString as l}from"./chunk-chunk-7ZDJSYKI.module.min.js";var a=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const s of t){const t=e?e(s):s;Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},c=class{constructor(t,e){this.lastBoundedData=null,this.chunkTimer=0,this.pushBuffer=[],this.flushScheduled=!1,this.callback=t,this.chunkThreshold=e?.chunkThreshold??5e3,this.chunkSize=e?.chunkSize??5e3}updateChunkOptions(t){null!=t.chunkThreshold&&(this.chunkThreshold=t.chunkThreshold),null!=t.chunkSize&&(this.chunkSize=t.chunkSize)}clearLastData(){this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0)}setBoundedData(t){if(t=n(t),this.lastBoundedData===t)return;if(this.lastBoundedData=t,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.chunkThreshold>=t.length)return void this.callback({inserts:t,bounded:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,totalSize:t.length});let e=this.chunkSize;const s=()=>{if(e>=t.length)return void(this.chunkTimer=0);if(t!==this.lastBoundedData)return void(this.chunkTimer=0);const n=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,n),bounded:!1}),e=n,this.chunkTimer=t.length>e?requestAnimationFrame(s):0};this.chunkTimer=requestAnimationFrame(s)}setReplacementData(t){if(t=n(t),this.lastBoundedData=t,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.pushBuffer=[],this.flushScheduled=!1,this.chunkThreshold>=t.length)return void this.callback({inserts:t,bounded:!0,preserveCategoryOrder:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,preserveCategoryOrder:!0,totalSize:t.length});let e=this.chunkSize;const s=()=>{if(e>=t.length)return void(this.chunkTimer=0);if(t!==this.lastBoundedData)return void(this.chunkTimer=0);const n=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,n),bounded:!1}),e=n,this.chunkTimer=t.length>e?requestAnimationFrame(s):0};this.chunkTimer=requestAnimationFrame(s)}flushPushBuffer(){if(this.flushScheduled=!1,0===this.pushBuffer.length)return;const t=this.pushBuffer;this.pushBuffer=[],this.callback({inserts:t,bounded:!1})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flushPushBuffer()))}push(t){null!=t&&"object"==typeof t&&(this.pushBuffer.push(t),this.scheduleFlush())}pushMany(t){if(0===t.length)return;let e=0;for(let s=0;t.length>s;s++){const n=t[s];null!=n&&"object"==typeof n&&(this.pushBuffer.push(n),e++)}0!==e&&this.scheduleFlush()}flush(){this.flushPushBuffer()}clear(){this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1}},h={stops:[{offset:0,opacity:.8},{offset:1,opacity:.05}]};function u(t,e=h){if(t)return!0===t?e:"stops"in t?Array.isArray(t.stops)?t:void 0:"colorStops"in t?Array.isArray(t.colorStops)?{stops:t.colorStops.map(({offset:t,color:e})=>({offset:t,color:e}))}:void 0:{stops:[{offset:0,opacity:t.topOpacity??e.stops[0]?.opacity??.8},{offset:1,opacity:t.bottomOpacity??e.stops.at(-1)?.opacity??.05}]}}function f(t){return t?u(t):void 0}function y(t){if(t)return Array.isArray(t)?{stops:t.map(({at:t,color:e,opacity:s})=>({offset:t/100,color:e,...null!=s&&{opacity:s}}))}:Array.isArray(t.stops)?t:void 0}function d(t){return{stops:t.stops.map(t=>({...t,offset:1-t.offset})).sort((t,e)=>t.offset-e.offset)}}function p(t,e,s,n){return"function"==typeof t?t({size:e,margin:s,scales:n}):t}function m(t,e,s,n){return"string"==typeof t?{key:t,fn:null}:"function"==typeof t?{key:s,fn:t}:"string"==typeof e?{key:e,fn:null}:"function"==typeof e?{key:n,fn:e}:{key:void 0,fn:null}}function k(t,e,s){return n=>{if(!n||!s||!t.fn&&!e.fn)return n;let o=!1;const i=n.map(s=>{const n=t.fn&&t.key&&!(t.key in s),i=e.fn&&e.key&&!(e.key in s);if(!n&&!i)return s;o=!0;const r={...s};return n&&(r[t.key]=t.fn(s)),i&&(r[e.key]=e.fn(s)),r});return o?i:n}}function g(t){return new Set(Array.isArray(t)?t:[t])}function T(t,e,s){return"exact"===s?function(t,e){const s=t.domain(),n=s[0],o=s[s.length-1],i=n instanceof Date,r=n instanceof Date?n.getTime():n,l=o instanceof Date?o.getTime():o;if(2>e||r===l)return i?[new Date(r),new Date(l)]:[r,l];const a=(l-r)/(e-1),c=Array(e);for(let t=0;e>t;t++){const s=t===e-1?l:r+t*a;c[t]=i?new Date(s):s}return c}(t,e):t.ticks(e)}var x=new Map;function b(t){try{if(t.path)return new Path2D(t.path);const e=`${t.symbolType??"circle"}:${Math.round(t.size)}`;let s=x.get(e);return s||(s=new Path2D(l(t.symbolType,t.size)),x.size>256&&x.clear(),x.set(e,s)),s}catch{return null}}var w=(t,e)=>{const s=t.globalAlpha;for(const n of e){if("symbol"!==n.type)continue;const e=n;if(0>=e.size)continue;const o=b(e);if(!o)continue;t.save(),t.translate(e.x,e.y),e.rotation&&t.rotate(e.rotation);const i=(e.style.opacity??1)*(e._decayOpacity??1);e.style.fill&&(t.globalAlpha=s*i*(e.style.fillOpacity??1),t.fillStyle=r(t,e.style.fill,"#4e79a7"),t.fill(o)),e.style.stroke&&"none"!==e.style.stroke&&(t.globalAlpha=s*i,t.strokeStyle=r(t,e.style.stroke,e.style.stroke),t.lineWidth=e.style.strokeWidth??1,t.stroke(o)),t.restore()}t.globalAlpha=s};function v(t,e){const{x:n,y:o,w:i,h:r}=e,{tl:l,tr:a,br:c,bl:h}=s(e);t.beginPath(),t.moveTo(n+l,o),t.lineTo(n+i-a,o),a>0&&t.arcTo(n+i,o,n+i,o+a,a),t.lineTo(n+i,o+r-c),c>0&&t.arcTo(n+i,o+r,n+i-c,o+r,c),t.lineTo(n+h,o+r),h>0&&t.arcTo(n,o+r,n,o+r-h,h),t.lineTo(n,o+l),l>0&&t.arcTo(n,o,n+l,o,l),t.closePath()}function S(t){switch(t.roundedEdge){case"bottom":return{x0:t.x,y0:t.y+t.h,x1:t.x,y1:t.y};case"right":return{x0:t.x+t.w,y0:t.y,x1:t.x,y1:t.y};case"left":return{x0:t.x,y0:t.y,x1:t.x+t.w,y1:t.y};default:return{x0:t.x,y0:t.y,x1:t.x,y1:t.y+t.h}}}var A=(s,n,l,a)=>{const c=n.filter(t=>"rect"===t.type);for(const n of c){if(null!=n.style.opacity&&(s.globalAlpha=n.style.opacity),n.style.icon)F(s,n);else if(n.cornerRadii&&o(n.cornerRadii)){const t=r(s,n.style.fill,i(s,"var(--semiotic-primary, #007bff)")),o=S(n),l=n.fillGradient&&"string"==typeof t?e(s,n.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;s.fillStyle=l||t,v(s,n),s.fill(),n.style.stroke&&"none"!==n.style.stroke&&(s.strokeStyle=i(s,n.style.stroke)||n.style.stroke,s.lineWidth=n.style.strokeWidth||1,s.stroke())}else if(n.roundedTop&&n.roundedTop>0){const t=r(s,n.style.fill,i(s,"var(--semiotic-primary, #007bff)")),o=S(n),l=n.fillGradient&&"string"==typeof t?e(s,n.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;s.fillStyle=l||t;const a=Math.min(n.roundedTop,n.w/2,n.h/2);s.beginPath();const{x:c,y:h,w:u,h:f}=n;switch(n.roundedEdge){case"right":s.moveTo(c,h),s.lineTo(c+u-a,h),s.arcTo(c+u,h,c+u,h+a,a),s.lineTo(c+u,h+f-a),s.arcTo(c+u,h+f,c+u-a,h+f,a),s.lineTo(c,h+f);break;case"left":s.moveTo(c+u,h),s.lineTo(c+a,h),s.arcTo(c,h,c,h+a,a),s.lineTo(c,h+f-a),s.arcTo(c,h+f,c+a,h+f,a),s.lineTo(c+u,h+f);break;case"bottom":s.moveTo(c,h),s.lineTo(c+u,h),s.lineTo(c+u,h+f-a),s.arcTo(c+u,h+f,c+u-a,h+f,a),s.lineTo(c+a,h+f),s.arcTo(c,h+f,c,h+f-a,a);break;default:s.moveTo(c,h+f),s.lineTo(c,h+a),s.arcTo(c,h,c+a,h,a),s.lineTo(c+u-a,h),s.arcTo(c+u,h,c+u,h+a,a),s.lineTo(c+u,h+f)}s.closePath(),s.fill(),n.style.stroke&&"none"!==n.style.stroke&&(s.strokeStyle=i(s,n.style.stroke)||n.style.stroke,s.lineWidth=n.style.strokeWidth||1,s.stroke())}else{const t=r(s,n.style.fill,i(s,"var(--semiotic-primary, #007bff)")),o=S(n),l=n.fillGradient&&"string"==typeof t?e(s,n.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;s.fillStyle=l||t,s.fillRect(n.x,n.y,n.w,n.h),n.style.stroke&&"none"!==n.style.stroke&&(s.strokeStyle=i(s,n.style.stroke)||n.style.stroke,s.lineWidth=n.style.strokeWidth||1,s.strokeRect(n.x,n.y,n.w,n.h))}t(s,n),s.globalAlpha=1}};function F(t,e){const s=e.style.icon,n=e.style.iconPadding||2,o=Math.min(e.w,e.h)-n;if(0>=o)return;const i=e.h>e.w;if(t.save(),t.beginPath(),t.rect(e.x,e.y,e.w,e.h),t.clip(),i){const i=o+n,r=e.x+(e.w-o)/2;for(let n=e.y+e.h-o;n>=e.y-o;n-=i)t.drawImage(s,r,n,o,o)}else{const i=o+n,r=e.y+(e.h-o)/2;for(let n=e.x;e.x+e.w>n;n+=i)t.drawImage(s,n,r,o,o)}t.restore()}function _(t,e,s,n,o,i){const r=[];for(const o of t){const t=s(o),i=n(o);Number.isFinite(t)&&Number.isFinite(i)&&r.push({px:e.x(t),py:e.y(i),rawY:i,d:o})}r.sort((t,e)=>t.px-e.px);const l=Array(r.length),a=Array(r.length),c=Array(r.length);for(let t=0;r.length>t;t++){const e=r[t];l[t]=[e.px,e.py],a[t]=e.rawY,c[t]=e.d}return{type:"line",path:l,rawValues:a,style:o,datum:c,group:i}}function B(t,e,s,n,o,i,r,l){const a=[];for(const i of t){const t=s(i),r=n(i);if(!Number.isFinite(t)||!Number.isFinite(r))continue;const c=e.x(t),h=l?l(i):o;a.push({px:c,topY:e.y(r),botY:e.y(h),rawY:r})}a.sort((t,e)=>t.px-e.px);const c=Array(a.length),h=Array(a.length),u=Array(a.length);for(let t=0;a.length>t;t++){const e=a[t];c[t]=[e.px,e.topY],h[t]=[e.px,e.botY],u[t]=e.rawY}return{type:"area",topPath:c,bottomPath:h,rawValues:u,style:i,datum:t,group:r}}function z(t,e,s,n){const o=new Map;if("silhouette"===n)for(const n of t){let t=0;for(const o of e)t+=s(o,n)||0;o.set(n,-t/2)}else if("wiggle"===n){t.length>0&&o.set(t[0],0);for(let n=1;t.length>n;n++){const i=t[n-1],r=t[n];let l=0,a=0,c=0;for(const t of e){const e=s(t,r)||0;l+=(2*c+e)*(e-(s(t,i)||0)),a+=e,c+=e}const h=o.get(i)??0;o.set(r,h-(a>0?l/(2*a):0))}if(t.length>0){let n=0;for(const i of t){let t=0;for(const n of e)t+=s(n,i)||0;n+=(o.get(i)??0)+t/2}const i=n/t.length;for(const e of t)o.set(e,(o.get(e)??0)-i)}}else for(const e of t)o.set(e,0);return o}function D(t,e,s){let n=0,o=0;for(const i of t){let t=0,r=0;for(const n of e){const e=s(n,i)||0;0>e?r+=e:t+=e}n>r&&(n=r),t>o&&(o=t)}return[n,o]}function M(t,e,s,n,o,i,r,l="zero"){const a=new Set;for(const e of t)for(const t of e.data){const e=s(t);Number.isFinite(e)&&a.add(e)}const c=Array.from(a).sort((t,e)=>t-e),h=new Map;for(const e of t){const t=new Map;for(const o of e.data){const e=s(o),i=n(o);Number.isFinite(e)&&Number.isFinite(i)&&t.set(e,(t.get(e)||0)+i)}h.set(e.key,t)}let u;if(i){u=new Map;for(const e of c){let s=0;for(const n of t)s+=h.get(n.key)?.get(e)||0;u.set(e,s||1)}}const f=z(c,t.map(t=>t.key),(t,e)=>h.get(t)?.get(e)||0,l),y="diverging"===l&&!i,d=[],p=new Map,m=new Map,k=new Map,g=new Map;for(const t of c)m.set(t,f.get(t)??0),k.set(t,0),g.set(t,0);for(const s of t){const t=h.get(s.key),n=new Map;let l=[],a=[];const f=()=>{if(l.length>=2){const t={type:"area",topPath:l,bottomPath:a,style:o(s.key,s.data[0]),datum:s.data,group:s.key};r&&(t.curve=r),d.push(t)}l=[],a=[]};for(const s of c){const o=t.has(s);let r,c,h=o?t.get(s):0;if(i&&o&&(h/=u.get(s)),!o||!Number.isFinite(h)||0===h){f();continue}y?h>0?(r=k.get(s),c=r+h,k.set(s,c)):(r=g.get(s),c=r+h,g.set(s,c)):(r=m.get(s),c=r+h,m.set(s,c));const d=e.x(s);a.push([d,e.y(r)]),l.push([d,e.y(c)]),n.set(s,c)}f(),p.set(s.key,n)}return{nodes:d,stackedTops:p}}function P(t,e,s,n,o,i,r){const l=s(t),a=n(t);if(!Number.isFinite(l)||!Number.isFinite(a))return null;const c={type:"point",x:e.x(l),y:e.y(a),r:o,style:i,datum:t};return void 0!==r&&(c.pointId=r),c}function N(t,e,s,n,o,i,r,l){const a=s(t),c=n(t);if(!Number.isFinite(a)||!Number.isFinite(c))return null;const h={type:"symbol",x:e.x(a),y:e.y(c),size:o,symbolType:i,style:r,datum:t};return void 0!==l&&(h.pointId=l),h}function Y(t,e,s,n,o,i,r){return{type:"rect",x:t,y:e,w:s,h:n,style:o,datum:i,group:r}}function W(t,e,s,n,o,i,r){const l={type:"heatcell",x:t,y:e,w:s,h:n,fill:o,datum:i};return r?.showValues&&(l.showValues=!0,l.value=r.value,r.valueFormat&&(l.valueFormat=r.valueFormat)),l}export{c as DataSourceAdapter,a as IncrementalExtent,g as toIdSet,_ as buildLineNode,B as buildAreaNode,z as computeStackOffsets,D as computeDivergingStackExtent,M as buildStackedAreaNodes,P as buildPointNode,N as buildSymbolNode,Y as buildRectNode,W as buildHeatcellNode,u as normalizeGradient,f as normalizeColorGradient,y as normalizeSemanticGradient,d as reverseGradient,T as ticksForMode,p as resolveFrameGraphics,m as resolveAnnotationAccessor,k as buildEnrichAnnotationData,w as symbolCanvasRenderer,A as barCanvasRenderer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function e(e,n,r=e.responsiveRules){if(!Array.isArray(r)||0===r.length)return{props:e,matches:[]};const o=r.map((t,e)=>({rule:t,index:e})).filter(t=>function(t,e){const{when:n}=t,r=e.width,o=e.height,i=function(t){if("number"==typeof t.height&&t.height>0)return t.width/t.height}(e),a=function(t){if("number"==typeof t.height&&t.height>0)return t.height>t.width?"portrait":"landscape"}(e);return!("number"==typeof n.minWidth&&n.minWidth>r||"number"==typeof n.maxWidth&&r>n.maxWidth||"number"==typeof n.minHeight&&("number"!=typeof o||n.minHeight>o)||"number"==typeof n.maxHeight&&("number"!=typeof o||o>n.maxHeight)||"number"==typeof n.minAspectRatio&&("number"!=typeof i||n.minAspectRatio>i)||"number"==typeof n.maxAspectRatio&&("number"!=typeof i||i>n.maxAspectRatio)||n.orientation&&a!==n.orientation)}(t.rule,n)).sort((t,e)=>("number"==typeof t.rule.priority?t.rule.priority:t.index)-("number"==typeof e.rule.priority?e.rule.priority:e.index));return{props:o.reduce((e,n)=>function(e,n){const r={...e,...n};for(const o of["margin","frameProps","mobileSemantics","style"])t(e[o])&&t(n[o])&&(r[o]={...e[o],...n[o]});return"string"==typeof e.className&&"string"==typeof n.className&&(r.className=`${e.className} ${n.className}`),r}(e,n.rule.transform),e),matches:o}}function n(t,e){return t===e}function r(t,e){if("function"==typeof t)return e=>+t(e);const n=t||e;return t=>+t[n]}function o(t,e){if("function"==typeof t)return t;const n=t||e;return t=>t[n]}function i(t,e){return"function"==typeof t?t:t?e=>e[t]+"":e?t=>t[e]+"":void 0}var a=/^\d{4}-\d{1,2}$/;function s(t){const e=t.trim();if(!e||!Number.isNaN(Number(e)))return NaN;const n=a.test(e)?e+"-01":e;if(n===e&&10>e.length)return NaN;const r=Date.parse(n);return Number.isFinite(r)?r:NaN}function u(t){return t instanceof Date?t.getTime():"string"==typeof t?s(t):+t}var c=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),f=new Set(["label","callout","callout-circle","callout-rect"]);function l(t){return"string"==typeof t?.type?t.type:""}function m(t){return!!t&&"object"==typeof t&&c.has(l(t))}function h(t){return f.has(l(t))&&!function(t){return Array.isArray(t?.disable)&&t.disable.includes("connector")}(t)}function p(t,e,n={}){return Number.isFinite(e)&&e>0?Number.isNaN(t)?"fresh":t===1/0?"expired":0>t||e*(n.fresh??1)>t?"fresh":e*(n.aging??1.5)>t?"aging":e*(n.stale??3)>t?"stale":"expired":"fresh"}function d(t,e={}){const n=!0===e.showRetractedAnnotations,r=!0===e.showSupersededAnnotations,o=new Set;for(const e of t){const t=e?.lifecycle?.supersedes;t&&"retracted"!==e?.lifecycle?.status&&o.add(t)}return t.filter(t=>{if("retracted"===t?.lifecycle?.status&&!n)return!1;const e=t?.provenance?.stableId;return!(e&&o.has(e)&&!r)})}import{createContext as b,useCallback as y,useContext as g,useMemo as v,useRef as x,useSyncExternalStore as N}from"react";import{jsx as A}from"react/jsx-runtime";function w(t){let e=null;const n=()=>(e||(e=b(null)),e),r=M(t);return[function({children:e,initialState:r}){const o=x(r),i=v(()=>M(t,o.current),[]),a=n();return A(a.Provider,{value:i,children:e})},(t,e)=>{const o=n(),i=g(o)??r,a=x(t);a.current=t;const s=x({hasValue:!1,value:void 0}),u=y(()=>{const t=a.current(i.getState()),n=s.current;return n.hasValue&&e&&e(n.value,t)?n.value:(s.current={hasValue:!0,value:t},t)},[i,e]),c=y(()=>a.current(i.getState()),[i]);return N(i.subscribe,u,c)}]}function M(t,e){const n=new Set;let r={...t(function(t){const e=t(r);if(function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}(e)){r={...r,...e};for(const t of n)t()}}),...e??{}};return{getState:()=>r,subscribe:function(t){return n.add(t),()=>{n.delete(t)}}}}import*as O from"react";var[S,I]=w(t=>({observations:[],maxObservations:100,version:0,pushObservation(e){t(t=>{const n=t.observations;return n.push(e),n.length>t.maxObservations&&n.shift(),{version:t.version+1}})},clearObservations(){t(()=>({observations:[],version:0}))}}));function k(t){const e=I(t=>t.pushObservation),n=O.useCallback(n=>{t.onObservation?.(n),e?.(n)},[t,e]);return O.useMemo(()=>({...t,onObservation:n}),[n,t])}function P(t){const e=t.provenance,n=t.id??t.stableId??e?.stableId;return null==n||""===n?void 0:n+""}function R(t,e={}){const n=P(t);return{"data-semiotic-annotation-widget":"",...n?{"data-semiotic-annotation-id":n}:{},onClickCapture(r){const o=function(t){const e=t.nativeEvent;return"touch"===e.pointerType?"touch":0===e.detail?"keyboard":"pointer"}(r);e.onAnnotationActivate?.({annotation:t,annotationId:n,chartId:e.chartId,inputType:o}),n&&e.onObservation&&e.onObservation({type:"annotation-activate",annotationId:n,inputType:o,timestamp:Date.now(),chartType:e.chartType??"unknown",chartId:e.chartId})}}}function T(t){return t instanceof Element&&null!=t.closest("[data-semiotic-annotation-widget]")}function j(t){return"primary"===t?.emphasis||!0===t?.defensive}function F(t,e,n={}){return"number"==typeof n.maxAnnotations&&Number.isFinite(n.maxAnnotations)?Math.max(0,Math.floor(n.maxAnnotations)):t>0&&e>0?Math.max(1,Math.round(t*e/(n.areaPerAnnotation&&n.areaPerAnnotation>0?n.areaPerAnnotation:2e4))):1/0}function H(t){let e;const n=t?.emphasis;e="primary"===n?100:"secondary"===n?10:50;const r=t?.provenance?.confidence;switch("number"==typeof r&&Number.isFinite(r)&&(e+=15*Math.max(0,Math.min(1,r))),t?.lifecycle?.freshness){case"fresh":e+=8;break;case"aging":e+=4;break;case"stale":e+=1;break;case"expired":e-=200}return e}function V(t){const{annotations:e,width:n,height:r}=t,o=Math.max(0,t.minVisible??1),i=F(n,r,t),a=e.map((t,e)=>{return{annotation:t,index:e,note:(n=t,m(n))};var n}),s=a.filter(t=>t.note);if(0===s.length||i>=s.length)return{visible:e.slice(),deferred:[],budget:i};const u=s.filter(t=>j(t.annotation)),c=s.filter(t=>!j(t.annotation)).sort((t,e)=>H(e.annotation)-H(t.annotation)||t.index-e.index),f=Math.min(c.length,Math.max(Math.max(0,i-u.length),Math.max(0,o-u.length))),l=new Set([...u.map(t=>t.index),...c.slice(0,f).map(t=>t.index)]),h=[],p=[];for(const{annotation:t,index:e,note:n}of a)!n||l.has(e)?h.push(t):p.push(t);return{visible:h,deferred:p,budget:i}}function W(t){let e=t>>>0;return function(){e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}export{e as resolveResponsiveRules,w as createStore,n as accessorsEquivalent,r as resolveAccessor,o as resolveRawAccessor,i as resolveStringAccessor,s as parseDateLikeString,u as coerceDateLikeValue,p as bandFromAge,I as useObservationSelector,k as useAnnotationActivationOptions,P as annotationStableId,R as annotationActivationProps,T as isAnnotationActivationTarget,l as annotationType,m as isNoteAnnotation,h as annotationDrawsConnector,F as annotationBudget,V as annotationDensity,d as filterAnnotationsByStatus,W as mulberry32};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{createControlObservationAdapter as e}from"./chunk-chunk-
|
|
2
|
+
import{createControlObservationAdapter as e}from"./chunk-chunk-FQPKOAIH.module.min.js";import{useRef as t}from"react";var r=2*Math.PI;function n(e,t,r){const n=r?.center?.x??0,a=r?.center?.y??0;return{x:n+Math.sin(e)*t,y:a-Math.cos(e)*t}}function a(e,t,a,i,l){const c=l?.center,s=(e,t)=>{const{x:r,y:a}=n(e,t,{center:c});return`${o(r)},${o(a)}`},u=Math.max(0,a),d=Math.max(u,i),p=Math.abs(t-e),m=e>t?0:1;if(p>=r-1e-6){const e=c?.x??0,t=c?.y??0,r=`${o(e)},${o(t-d)}`,n=`${o(e)},${o(t+d)}`;let a=`M${r} A${o(d)},${o(d)} 0 1 1 ${n} A${o(d)},${o(d)} 0 1 1 ${r} Z`;if(u>0){const r=`${o(e)},${o(t-u)}`,n=`${o(e)},${o(t+u)}`;a+=` M${r} A${o(u)},${o(u)} 0 1 0 ${n} A${o(u)},${o(u)} 0 1 0 ${r} Z`}return a}const h=p>Math.PI?1:0,f=s(e,d),$=s(t,d);if(0>=u){const e=c?.x??0,t=c?.y??0;return`M${o(e)},${o(t)} L${f} A${o(d)},${o(d)} 0 ${h} ${m} ${$} Z`}const y=s(t,u),x=s(e,u);return`M${f} A${o(d)},${o(d)} 0 ${h} ${m} ${$} L${y} A${o(u)},${o(u)} 0 ${h} ${1===m?0:1} ${x} Z`}function o(e){return Math.round(1e3*e)/1e3}function i(e,t,r=0){return t>0?((e-r)%t+t)%t+r:e}import{jsx as l,jsxs as c}from"react/jsx-runtime";function s({value:e,onChange:o,period:s=365,radius:u=180,innerRadius:d=14,width:p,height:m,step:h=1,largeStep:f=7,label:$="Range",formatValue:y,arcFill:x="var(--semiotic-primary, #4e79a7)",stroke:g="var(--semiotic-bg, #ffffff)",className:v,style:b}){const w=p??2*u+40,k=m??2*u+40,P=w/2,M=k/2,I=function(e){const[t,n]=e,a=n-t||1,o=r;return e=>0+(e-t)/a*(o-0)}([0,s]),A=t(null),C=e=>{const t=e.currentTarget.ownerSVGElement??e.currentTarget,n=t.getBoundingClientRect(),a=t.viewBox?.baseVal;return Math.round((Math.atan2((a?.width||w)/(n.width||1)*(e.clientX-n.left)-P-0,-((a?.height||k)/(n.height||1)*(e.clientY-n.top)-M-0))+r)%r/r*s)%s},D=(e,t)=>{e.preventDefault(),e.stopPropagation();const r=e.currentTarget.ownerSVGElement;r?.setPointerCapture?.(e.pointerId),A.current={mode:t,lastValue:C(e)}},T=e=>{const t=e.currentTarget.ownerSVGElement??e.currentTarget;t?.hasPointerCapture?.(e.pointerId)&&t.releasePointerCapture(e.pointerId),A.current=null},N=(e,t)=>{o("range"===e?e=>({start:i(e.start+t,s),end:i(e.end+t,s)}):r=>({...r,[e]:i(r[e]+t,s)}))},V=e=>t=>{const r=t.shiftKey?f:h;"ArrowRight"===t.key||"ArrowUp"===t.key?(t.preventDefault(),N(e,r)):"ArrowLeft"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),N(e,-r))},j=e.start>e.end?[[e.start,s],[0,e.end]]:[[e.start,e.end]],E=e=>y?y(e):e+"";return l("svg",{viewBox:`0 0 ${w} ${k}`,width:w,height:k,className:v,onPointerMove:e=>{const t=A.current;if(!t)return;const r=C(e);if("range"===t.mode){const e=function(e,t,r){if(0>=r)return t-e;let n=(t-e)%r;return n>r/2?n-=r:-r/2>n&&(n+=r),n}(t.lastValue,r,s);if(0===e)return;return t.lastValue=r,void o(t=>({start:i(t.start+e,s),end:i(t.end+e,s)}))}o(e=>({...e,[t.mode]:r}))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,style:{touchAction:"none",...b},"aria-label":$+" brush",children:c("g",{transform:`translate(${P},${M})`,children:[l("g",{role:"slider",tabIndex:0,"aria-label":$+" (move both ends)","aria-valuemin":0,"aria-valuemax":s-1,"aria-valuenow":e.start,"aria-valuetext":`${E(e.start)} to ${E(e.end)}`,onPointerDown:e=>D(e,"range"),onKeyDown:V("range"),style:{cursor:"grab"},children:j.map(([e,t],r)=>l("path",{d:a(I(e),I(t),d,u),fill:x,fillOpacity:.35,stroke:g,strokeWidth:1},r))}),["start","end"].map(t=>{const r=e[t],a=(e=>n(I(e),d))(r),o=(e=>n(I(e),u+8))(r);return c("g",{role:"slider",tabIndex:0,"aria-label":`${$} ${t}`,"aria-valuemin":0,"aria-valuemax":s-1,"aria-valuenow":r,"aria-valuetext":E(r),onPointerDown:e=>D(e,t),onKeyDown:V(t),style:{cursor:"grab"},children:[l("line",{x1:a.x,y1:a.y,x2:o.x,y2:o.y,stroke:"transparent",strokeWidth:20}),l("line",{x1:a.x,y1:a.y,x2:o.x,y2:o.y,stroke:g,strokeWidth:1.5}),l("circle",{cx:o.x,cy:o.y,r:4.5,fill:g,stroke:x,strokeWidth:1})]},t)})]})})}import*as u from"react";import{useRef as d}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";function h(e,t,r,n){return Math.min(r,Math.max(t,Number((t+Math.round((Math.min(r,Math.max(t,e))-t)/n)*n).toFixed(12))))}function f({value:t,onChange:r,pointerToValue:n,min:a,max:o,step:i=1,largeStep:l=5*i,x:c,y:s,controlType:f="value",controlId:$,label:y,valueText:x,radius:g=12,fill:v="var(--semiotic-bg, #ffffff)",stroke:b="var(--semiotic-primary, #4e79a7)",strokeWidth:w=4,labelText:k,labelDx:P=16,labelDy:M=-16,labelClassName:I,className:A,disabled:C=!1,onChangeStart:D,onChangeEnd:T,onObservation:N,chartId:V,chartType:j}){const E=d(null),K=d(t);K.current=t;const L=u.useMemo(()=>e({controlType:f,controlId:$,chartId:V,chartType:j,onObservation:N}),[V,j,$,f,N]),R=e=>{if(C)return;const t=n(e);if(null==t||!Number.isFinite(t))return;const l=h(t,a,o,i);K.current=l,r(l),L("control-change",l,"pointer")},S=e=>{e.stopPropagation(),E.current===e.pointerId&&(e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture?.(e.pointerId),E.current=null,T?.(K.current),L("control-end",K.current,"pointer"))},W=["semiotic-direct-manipulation-control",A].filter(Boolean).join(" ");return m("g",{className:W,role:"slider",tabIndex:C?-1:0,"aria-disabled":C||void 0,"aria-label":y,"aria-valuemin":a,"aria-valuemax":o,"aria-valuenow":t,"aria-valuetext":x??`${y}: ${t}`,"aria-roledescription":"visualization control","data-viz-control":f,"data-viz-control-id":$,"data-viz-control-state":"controlled",pointerEvents:"all",onPointerDown:e=>{C||(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),E.current=e.pointerId,D?.(K.current),L("control-start",K.current,"pointer"),R(e))},onPointerMove:e=>{e.stopPropagation(),E.current===e.pointerId&&R(e)},onPointerUp:S,onPointerCancel:S,onLostPointerCapture:S,onKeyDown:e=>{if(C)return;const t=e.shiftKey?l:i,n=K.current;let c=null;if("ArrowLeft"!==e.key&&"ArrowDown"!==e.key||(c=n-t),"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(c=n+t),"Home"===e.key&&(c=a),"End"===e.key&&(c=o),null===c)return;e.preventDefault();const s=h(c,a,o,i);K.current=s,r(s),L("control-change",s,"keyboard")},style:{cursor:C?"default":"grab",touchAction:"none"},children:[p("circle",{className:"semiotic-direct-manipulation-control__hit",cx:c,cy:s,r:g+10,fill:"transparent"}),p("circle",{className:"semiotic-direct-manipulation-control__handle",cx:c,cy:s,r:g,fill:v,stroke:b,strokeWidth:w}),k?p("text",{className:I,x:c+P,y:s+M,fill:b,children:k}):null]})}export{s as CircularBrush,f as DirectManipulationControl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{bandFromAge as e}from"./chunk-chunk-7ZDJSYKI.module.min.js";function t(e,t,i){if(null!=e)return"function"==typeof e?e(t,i):"object"==typeof e&&null!==e&&"constant"in e?e.constant:t[e]}function i(e){const{data:i,encoding:n}=e,o=[],c=new Map;return i.forEach((e,i)=>{const r=t(n.id,e,i);if(null==r||""===r)throw Error(`[semiotic] Motion encoding row ${i} resolved an empty id.`);const s=r+"";if(c.has(s))throw Error(`[semiotic] Duplicate motion encoding id "${s}".`);const a=t(n.process?.group,e,i),l=t(n.process?.stage,e,i),u=t(n.accessible?.group,e,i)??(null!=a?a+"":null!=l?l+"":void 0),m={};for(const o of Object.keys(n.evidence??{}))m[o]=t(n.evidence?.[o],e,i);const p={id:s,datum:e,time:{arrival:t(n.time?.arrival,e,i),basis:n.time?.basis,unit:n.time?.unit},placement:{x:t(n.placement?.x,e,i),y:t(n.placement?.y,e,i),lane:t(n.placement?.lane,e,i),space:n.placement?.space},kinematics:{velocityX:t(n.kinematics?.velocityX,e,i),velocityY:t(n.kinematics?.velocityY,e,i),space:n.kinematics?.space},process:{group:a,stage:l,target:t(n.process?.target,e,i),work:t(n.process?.work,e,i)},evidence:m,accessible:{description:t(n.accessible?.description,e,i),group:u,label:t(n.accessible?.label,e,i)??s}};o.push(p),c.set(s,p)}),{rows:o,byId:c}}function n(t){const i=t.now-t.arrival;return{age:i,progress:Number.isFinite(i)&&Number.isFinite(t.ttl)&&t.ttl>0?Math.max(0,i)/t.ttl:i===1/0&&Number.isFinite(t.ttl)&&t.ttl>0?1/0:0,lifecycle:e(i,t.ttl,t.thresholds)}}function o(e){const t=Math.max(0,Math.min(1,e.minOpacity??.1));if(Number.isNaN(e.age))return 1;if(e.age===1/0)return t;if(!Number.isFinite(e.extent)||0>=e.extent)return 1;const i=Math.max(0,e.age);if("step"===e.type)return(e.threshold??.5*e.extent)>i?1:t;if("exponential"===e.type){const n=e.halfLife??e.extent/2;return t+Math.pow(.5,i/(n>0?n:e.extent/2))*(1-t)}return t+Math.max(0,Math.min(1,1-i/e.extent))*(1-t)}function c(e,t){const i=Number.isFinite(e)?e:0,n=Number.isFinite(t)?t:0;return{velocityX:i,velocityY:n,speed:Math.hypot(i,n),direction:Math.atan2(n,i)}}function r(e,t,i){return Number.isFinite(i)&&i>0?c((t.x-e.x)/i,(t.y-e.y)/i):c(0,0)}export{t as resolveMotionAccessor,i as compileMotionEncoding,n as resolveMotionAge,o as opacityFromAge,c as resolveMotionVector,r as deriveMotionVector};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var t=/^\d{4}-\d{1,2}$/;function e(e){const n=e.trim();if(!n||!Number.isNaN(Number(n)))return NaN;const r=t.test(n)?n+"-01":n;if(r===n&&10>n.length)return NaN;const i=Date.parse(r);return Number.isFinite(i)?i:NaN}function n(t){return t instanceof Date?t.getTime():"string"==typeof t?e(t):+t}function r(t,n){if(!t||!n)return{data:t,failed:!1};let r=!1,i=!1;const a=t.map(t=>{const a=t[n];if("string"!=typeof a)return t;const u=e(a);return r=!0,Number.isFinite(u)?{...t,[n]:u}:(i=!0,{...t,[n]:NaN})});return{data:r?a:t,failed:i}}export{e as parseDateLikeString,n as coerceDateLikeValue,r as coerceTemporalStringRows};
|
|
@@ -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 n,useCustomChartSetup as i,useFrameImperativeHandle as r,useResolvedSelection as a}from"./chunk-chunk-FBUNUIPV.module.min.js";import{validateArrayData as s}from"./chunk-chunk-J5QD4RAM.module.min.js";import{StreamXYFrame_default as l}from"./chunk-chunk-KXAFCCDB.module.min.js";import{normalizeColorGradient as c,normalizeGradient as h,normalizeSemanticGradient as d,reverseGradient as u}from"./chunk-chunk-2YAZHXL4.module.min.js";import{accessorName as m,bandTooltipFields as p,buildBaseMetadataProps as y,buildCustomBehaviorProps as f,buildDefaultTooltip as g,buildTooltipProps as b}from"./chunk-chunk-NH4MEAKP.module.min.js";import{useCustomLayoutSelection as x}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 _,composeLegendConfigs as H,defaultTooltipStyle as R,filterSparseArray as I,getColor as B,getCrosshairProps as F,getSequentialInterpolator as P,getSize as N,interpolateViridis as M,normalizeLinkedBrush as O,normalizeTooltip as W,resolveDefaultFill as D,resolveMobileInteraction as T,resolveXYAxisChrome as E,useBrushSelection as G,useChartLegendAndMargin as j,useChartMode as z,useChartSelection as V,useColorScale as $,useLegendInteraction as X,useSelection as Q,useSelectionSelector as Y,useThemeCategorical as K,useThemeSequential as U,wrapStyleWithSelection as q}from"./chunk-chunk-7ZDJSYKI.module.min.js";import{getMax as J,getMinMax as Z}from"./chunk-chunk-JJ2OOIET.module.min.js";import{useTheme as ee}from"./chunk-chunk-WCX6U47H.module.min.js";import{ChartError as te,SafeRender as oe,renderEmptyState as ne,renderLoadingState as ie,warnMissingField as re}from"./chunk-chunk-ACLDBMRH.module.min.js";import*as ae from"react";import{useMemo as se,useCallback as le,forwardRef as ce,useRef as he}from"react";import{useMemo as de}from"react";function ue(e){const{colorBy:o,colorScale:n,color:i,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,b=de(()=>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(n){const t=y?y(e):e;h.fill=B(t,o,n)}}else h.fill=l?l(e):i||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,n,i,r,a,s,l,c,y,f,g]),x=de(()=>t(b,{stroke:h,strokeWidth:d,opacity:u}),[b,h,d,u]);return de(()=>q(x,m??null,p),[x,m,p])}import{useCallback as me,useMemo as pe,useRef as ye,useState as fe}from"react";function ge(e){const{accessor:t,data:o,isPushMode:n}=e,i=ye(null),[r,a]=fe(0),s=me(e=>{if(!n||!t)return;let o=!1;for(const n of e){const e="function"==typeof t?t(n):n[t];if(null==e)continue;const r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(i.current?(i.current[0]>r&&(i.current[0]=r,o=!0),r>i.current[1]&&(i.current[1]=r,o=!0)):(i.current=[r,r],o=!0))}o&&a(e=>e+1)},[n,t]),l=me(()=>{n&&(i.current=null,a(e=>e+1))},[n]);return{domain:pe(()=>{if(n)return i.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 n="number"==typeof o?o:Number(o);Number.isFinite(n)&&(r>n&&(r=n),n>a&&(a=n))}return Number.isFinite(r)&&Number.isFinite(a)?[r,a]:void 0},[o,t,n,r]),trackPushed:s,reset:l}}import{useEffect as be,useMemo as xe,useRef as ve,useState as Ae}from"react";var we="__forecastSegment",ke=null;async function Se(){return ke||(ke=await import("./chunk-statisticalOverlays-6MVAK5RW.module.min.js")),ke}var Ce="__semiotic_resolvedX",Le="__semiotic_resolvedY";function _e(e){const{data:t,xAccessor:o,yAccessor:n,forecast:i,anomaly:r,groupBy:a}=e,s="string"==typeof o?o:Ce,l="string"==typeof n?n:Le,c=xe(()=>{if(!i&&!r)return t;const e="function"==typeof o,a="function"==typeof n;return e||a?t.map(t=>{const i={...t};return e&&(i[Ce]=o(t)),a&&(i[Le]=n(t)),i}):t},[t,i,r,o,n]),[h,d]=Ae(null),[u,m]=Ae([]),p=ve(i),y=ve(r);return be(()=>{if(!i&&!r)return void((p.current||y.current)&&(d(null),m([]),p.current=i,y.current=r));let e=!1;const t=i!==p.current||r!==y.current;if(p.current=i,y.current=r,t&&(d(null),m([])),i){const t=a&&"string"==typeof a&&"object"==typeof i?{...i,_groupBy:a}:i;(async function(...e){return(await Se()).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 Se()).buildAnomalyAnnotations(...e)}(r).then(t=>{e||(d(null),m(t))}).catch(()=>{e||m([])});return()=>{e=!0}},[c,i,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 Re=ce(function(t,o){const i=he(null),a=z(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:x="x",yAccessor:A="y",xScaleType:w,yScaleType:k,colorBy:S,colorScheme:C,styleRules:L,sizeBy:_,sizeRange:H=[3,15],symbolBy:R,symbolMap:B,pointRadius:F=5,pointOpacity:P=.8,tooltip:M,marginalGraphics:W,pointIdAccessor:D,annotations:T,regression:j,forecast:V,anomaly:$,xExtent:X,yExtent:Q,frameProps:Y={},selection:K,linkedHover:U,linkedBrush:q,onObservation:J,onClick:Z,hoverHighlight:ee,chartId:ne,loading:ie,loadingContent:ce,emptyContent:de,legendInteraction:me,legendPosition:pe,color:ye,stroke:fe,strokeWidth:be,opacity:xe}=t,{width:ve,height:Ae,enableHover:we,showGrid:ke,showLegend:Se,title:Ce,description:Le,summary:Re,accessibleTable:Ie,xLabel:Be,yLabel:Fe}=a,Pe=se(()=>I(c),[c]),Ne=void 0===c,{domain:Me,trackPushed:Oe,reset:We}=ge({accessor:_,data:Pe,isPushMode:Ne}),De=le(e=>{Oe([e]),i.current?.push(e)},[Oe]),Te=le(e=>{Oe(e),i.current?.pushMany(e)},[Oe]);r(o,{variant:"xy",frameRef:i,overrides:{push:De,pushMany:Te,clear:()=>{We(),i.current?.clear()}}});const Ee=n({data:Pe,rawData:c,colorBy:S,colorScheme:C,legendInteraction:me,legendPosition:pe,selection:K,linkedHover:U,fallbackFields:S?["string"==typeof S?S:""]:[],unwrapData:!1,onObservation:J,onClick:Z,hoverHighlight:ee,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"Scatterplot",chartId:ne,showLegend:Se,userMargin:h,marginDefaults:a.marginDefaults,loading:ie,loadingContent:ce,emptyContent:de,width:ve,height:Ae,hasTitle:!!Ce,axisChrome:E({showAxes:a.showAxes,xLabel:Be})}),Ge=O(q),je=G({name:Ge?.name||"__unused_brush__",xField:Ge?.xField||("string"==typeof x?x: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=ae.useRef(je.brushInteraction);Ve.current=je.brushInteraction;const $e=le(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)},[]);re("Scatterplot",Pe,"xAccessor",x),re("Scatterplot",Pe,"yAccessor",A);const Xe=se(()=>_?Me??[0,1]:void 0,[_,Me]),Qe=se(()=>_?e=>N(e,_,H,Xe):void 0,[_,H,Xe]),Ye=se(()=>v(x,A),[x,A]),Ke=ue({colorBy:S,colorScale:Ee.colorScale,color:ye,pointRadius:F,fillOpacity:P,radiusFn:Qe,stroke:fe,strokeWidth:be,opacity:xe,styleRules:L,ruleContext:Ye,effectiveSelectionHook:Ee.effectiveSelectionHook,resolvedSelection:Ee.resolvedSelection}),Ue=se(()=>g([{label:Be||m(x),accessor:x,role:"x",format:u},{label:Fe||m(A),accessor:A,role:"y",format:p},...S?[{label:m(S),accessor:S,role:"color"}]:[],..._?[{label:m(_),accessor:_,role:"size"}]:[]]),[x,A,Be,Fe,S,_,u,p]),{effectiveData:qe,statisticalAnnotations:Je}=_e({data:Pe,xAccessor:x,yAccessor:A,forecast:V,anomaly:$}),Ze=se(()=>{const t=e(j);return t||0!==Je.length?[...t?[t]:[],...T||[],...Je]:T},[j,T,Je]);if(Ee.earlyReturn)return Ee.earlyReturn;const et=s({componentName:"Scatterplot",data:c,accessors:{xAccessor:x,yAccessor:A}});if(et)return He(te,{componentName:"Scatterplot",message:et,width:ve,height:Ae});const tt={chartType:"scatter",...null!=c&&{data:qe},xAccessor:x,yAccessor:A,xScaleType:w,yScaleType:k,colorAccessor:S||void 0,sizeAccessor:_||void 0,...R&&{symbolAccessor:R},...B&&{symbolMap:B},sizeRange:H,pointStyle:Ke,colorScheme:C,size:[ve,Ae],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:Ee.margin,showAxes:a.showAxes,xLabel:Be,yLabel:Fe,xFormat:u,yFormat:p,enableHover:we,showGrid:ke,...Ee.legendBehaviorProps,...y({title:Ce,description:Le,summary:Re,accessibleTable:Ie,className:d,animate:t.animate,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...b({tooltip:M,defaultTooltipContent:Ue}),...f({linkedHover:U,selection:K,onObservation:J,onClick:Z,hoverHighlight:ee,mobileInteraction:Ee.mobileInteraction,customHoverBehavior:Ee.customHoverBehavior,customClickBehavior:Ee.customClickBehavior}),...W&&{marginalGraphics:W},...D&&{pointIdAccessor:D},...Ze&&Ze.length>0&&{annotations:Ze},...X&&{xExtent:X},...Q&&{yExtent:Q},...Ge&&{brush:{dimension:ze},onBrush:$e},...Ee.crosshairProps,...Y};return He(oe,{componentName:"Scatterplot",width:ve,height:Ae,children:He(l,{ref:i,...tt})})});Re.displayName="Scatterplot";import{useMemo as Ie,forwardRef as Be,useRef as Fe}from"react";import{Fragment as Pe,jsx as Ne}from"react/jsx-runtime";function Me(e,t){return M(1===t?.5:e/(t-1))}var Oe=Be(function(t,o){const i=Fe(null);r(o,{variant:"xy",frameRef:i});const a=z(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:x="x",yAccessor:A="y",orderAccessor:w,orderLabel:k,styleRules:S,pointRadius:L=4,tooltip:_,pointIdAccessor:H,annotations:R,regression:I,forecast:B,anomaly:F,xExtent:P,yExtent:N,frameProps:M={},selection:O,linkedHover:W,onObservation:D,onClick:T,hoverHighlight:G,chartId:j,loading:V,loadingContent:$,emptyContent:X,legendInteraction:Q,stroke:Y,strokeWidth:K,opacity:U}=t,{width:q,height:J,enableHover:Z,showGrid:ee,title:ne,description:ie,summary:ae,accessibleTable:se,xLabel:le,yLabel:ce}=a,{safeData:he,orderMap:de}=Ie(()=>{const e=c||[],t="function"==typeof x?x:e=>e[x],o="function"==typeof A?A:e=>e[A];let n=e;if(w&&e.length>0){const t="function"==typeof w?w:e=>e[w];n=[...e].sort((e,o)=>{const n=t(e),i=t(o);return(n instanceof Date?n.getTime():+n)-(i instanceof Date?i.getTime():+i)})}const i=new WeakMap;let r=0;for(const e of n){const n=t(e),i=o(e);null!=n&&null!=i&&isFinite(n)&&isFinite(i)&&r++}let a=0;for(const e of n){const n=t(e),s=o(e);null!=n&&null!=s&&isFinite(n)&&isFinite(s)&&i.set(e,{idx:a++,total:r})}return{safeData:n,orderMap:i}},[c,w,x,A]);re("ConnectedScatterplot",he,"xAccessor",x),re("ConnectedScatterplot",he,"yAccessor",A);const me=n({data:he,rawData:c,colorBy:void 0,colorScheme:void 0,legendInteraction:Q,selection:O,linkedHover:W,fallbackFields:[],unwrapData:!1,onObservation:D,onClick:T,hoverHighlight:G,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"ConnectedScatterplot",chartId:j,showLegend:void 0,userMargin:h,marginDefaults:a.marginDefaults,loading:V,loadingContent:$,emptyContent:X,width:q,height:J,hasTitle:!!ne,axisChrome:E({showAxes:a.showAxes,xLabel:le})}),pe=me.resolvedSelection?.unselectedOpacity??C,ye=Ie(()=>(e,t)=>{const o=t.filter(e=>"point"===e.type);if(2>o.length)return;const n=me.effectiveSelectionHook?.isActive,i=me.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=!n||!i||i(s.datum??s)||i(l.datum??l),d=n?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,me.effectiveSelectionHook,pe]),fe=Ie(()=>[ye],[ye]),ge=Ie(()=>(e,t,o)=>{const n=e.filter(e=>"point"===e.type);if(2>n.length)return null;const i=n.length,r=100>i,a=[];for(let e=0;i-1>e;e++){const t=n[e],o=n[e+1],s=Me(e,i),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(Pe,{children:a})},[L]),be=Ie(()=>[ge],[ge]),xe=ue({colorScale:void 0,baseStyleExtras:Ie(()=>e=>{const t=de.get(e),o=t?.idx??0,n=t?.total??1;return{fill:n>0?Me(o,n):"#6366f1",stroke:"white",strokeWidth:1,r:L,fillOpacity:1}},[L,de]),stroke:Y,strokeWidth:K,opacity:U,styleRules:S,ruleContext:Ie(()=>v(x,A),[x,A]),effectiveSelectionHook:me.effectiveSelectionHook,resolvedSelection:me.resolvedSelection}),ve=k||("string"==typeof w?w:"Order"),Ae=Ie(()=>g([{label:le||m(x),accessor:x,role:"x",format:u},{label:ce||m(A),accessor:A,role:"y",format:p},...w?[{label:ve,accessor:w,role:"group"}]:[]]),[x,A,le,ce,w,ve,u,p]),we=s({componentName:"ConnectedScatterplot",data:c,accessors:{xAccessor:x,yAccessor:A}}),{effectiveData:ke,statisticalAnnotations:Se}=_e({data:he,xAccessor:x,yAccessor:A,forecast:B,anomaly:F});if(me.earlyReturn)return me.earlyReturn;const Ce=e(I),Le=Ce||Se.length>0?[...Ce?[Ce]:[],...R||[],...Se]:R,He={chartType:"scatter",...null!=c&&{data:ke},xAccessor:x,yAccessor:A,pointStyle:xe,size:[q,J],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:me.margin,showAxes:a.showAxes,xLabel:le,yLabel:ce,xFormat:u,yFormat:p,enableHover:Z,showGrid:ee,...y({title:ne,description:ie,summary:ae,accessibleTable:se,className:d,animate:t.animate,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...b({tooltip:_,defaultTooltipContent:Ae}),...f({linkedHover:W,selection:O,onObservation:D,onClick:T,hoverHighlight:G,mobileInteraction:me.mobileInteraction,customHoverBehavior:me.customHoverBehavior,customClickBehavior:me.customClickBehavior}),...H&&{pointIdAccessor:H},canvasPreRenderers:fe,svgPreRenderers:be,...Le&&Le.length>0&&{annotations:Le},...P&&{xExtent:P},...N&&{yExtent:N},...me.crosshairProps,...M};return we?Ne(te,{componentName:"ConnectedScatterplot",message:we,width:q,height:J}):Ne(oe,{componentName:"ConnectedScatterplot",width:q,height:J,children:Ne(l,{ref:i,...He})})});Oe.displayName="ConnectedScatterplot";import{useMemo as We,useCallback as De,useState as Te,useEffect as Ee,forwardRef as Ge,useRef as je}from"react";import{useMemo as ze}from"react";function Ve(e){const{lineWidth:o=2,colorBy:n,colorScale:i,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=ze(()=>function(e){const{lineWidth:t=2,colorBy:o,colorScale:n,color:i,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?n&&(m=B(e,o,n)):m=i||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:n,colorScale:i,color:r,resolveStroke:a,fillArea:s,areaOpacity:l,styleRules:p,ruleContext:y}),[o,n,i,r,a,s,l,p,y]),g=ze(()=>t(f,{stroke:c,strokeWidth:h,opacity:d}),[f,c,h,d]);return ze(()=>q(g,u??null,m),[g,u,m])}import{jsx as $e}from"react/jsx-runtime";var Xe="__lineObjectSeries",Qe=Ge(function(e,t){const o=je(null);r(t,{variant:"xy",frameRef:o});const i=z(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:b,xAccessor:x="x",yAccessor:A="y",lineBy:w,lineDataAccessor:S="coordinates",colorBy:C,colorScheme:L,styleRules:R,curve:F="linear",showPoints:P=!1,pointRadius:N=3,fillArea:M=!1,areaOpacity:O=.3,lineWidth:D=2,lineGradient:T,tooltip:G,pointIdAccessor:j,annotations:V,directLabel:$,gapStrategy:X="break",anomaly:Q,forecast:Y,band:K,xExtent:U,yExtent:q,frameProps:J={},selection:Z,linkedHover:ee,onObservation:ne,onClick:ie,hoverHighlight:ae,hoverRadius:se,chartId:le,loading:ce,loadingContent:he,emptyContent:de,legendInteraction:ue,legendPosition:me,legend:pe,xScaleType:ye,yScaleType:fe,color:ge,stroke:be,strokeWidth:xe,opacity:ve}=e,{legend:Ae,...ke}=J,Ce=We(()=>H(Ae,pe),[Ae,pe]),{width:Le,height:He,enableHover:Re,showGrid:Ie,showLegend:Be,title:Fe,description:Pe,summary:Ne,accessibleTable:Me,xLabel:Oe,yLabel:Ge}=i,ze=We(()=>I(a),[a]),Qe=Array.isArray(ze[0]?.[S])?ze[0][S]:ze;re("LineChart",Qe,"xAccessor",x),re("LineChart",Qe,"yAccessor",A);const{effectiveData:Ye,statisticalAnnotations:Ke}=_e({data:ze,xAccessor:x,yAccessor:A,forecast:Y,anomaly:Q,groupBy:w}),Ue="__compoundGroup",qe=!(!Y||!w),Je=qe?Ue:Y?we:w,Ze=We(()=>{if(!qe)return Ye;const e="function"==typeof w?w:e=>e[w];return Ye.map(t=>{const o={...t};return o[Ue]=`${e(t)}__${t[we]||"observed"}`,o})},[Ye,qe,w]),et=qe?Ze:Ye,tt=C||w,ot=We(()=>{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,n="function"==typeof t?t:"string"==typeof t?e=>e[t]:null;let i=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)&&(i>t&&(i=t),t>r&&(r=t)),o){const t=o(e);null!=t&&isFinite(t)&&(t>r&&(r=t),i>t&&(i=t))}if(n){const t=n(e);null!=t&&isFinite(t)&&(i>t&&(i=t),t>r&&(r=t))}}return isFinite(i)&&isFinite(r)?[i,r]:void 0},[Y,Ye,A]),nt=De(e=>{const t="function"==typeof x?x(e):e[x],o="function"==typeof A?A(e):e[A];return null==t||null==o||Number.isNaN(t)||Number.isNaN(o)},[x,A]),it=void 0!==et[0]?.[S],rt=it?Xe:Je,at=We(()=>{if(it)return et.map((e,t)=>{const o="function"==typeof w?w(e):"string"==typeof w?e[w]:void 0,n=null==o?"line-"+t:o+"",i=Array.isArray(e[S])?e[S]:[];return{...e,[Xe]:n,[S]:i.map(t=>({...t,[Xe]:n,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 n={[S]:[]};"string"==typeof Je&&(n[Je]=o),qe&&(n[we]=t[we],"string"==typeof w&&(n[w]=t[w])),e[o]=n}return e[o][S].push(t),e},{});return Object.values(e)}return[{[S]:et}]},[it,Je,S,et,w,qe]),{gapProcessedLineData:st,hasGaps:lt}=We(()=>{if("interpolate"===X){let e=!1;const t=[];for(const o of at){const n=(o[S]||[]).filter(t=>!nt(t)||(e=!0,!1));n.length>0&&t.push({...o,[S]:n})}return{gapProcessedLineData:t,hasGaps:e}}if("break"===X){let e=!1;const t=[];for(const o of at){const n=o[S]||[];let i=[],r=0;const a=rt&&"string"==typeof rt?o[rt]:void 0;for(const s of n)if(nt(s))e=!0,i.length>0&&(t.push({...o,[S]:i}),i=[],r++);else{const e=null!=a?`${a}__seg${r}`:"__seg"+r;i.push({...s,_gapSegment:e})}i.length>0&&t.push({...o,[S]:i})}return{gapProcessedLineData:t,hasGaps:e}}if("zero"===X){let e=!1;const t="string"==typeof A?A:"y",o=[];for(const n of at){const i=n[S]||[],r=[];for(const o of i)nt(o)?(e=!0,r.push({...o,[t]:0})):r.push(o);o.push({...n,[S]:r})}return{gapProcessedLineData:o,hasGaps:e}}return{gapProcessedLineData:at,hasGaps:!1}},[at,X,S,nt,rt,A]),ct="object"==typeof $?$:{},ht=ct.position||"end",dt=ct.fontSize||11,ut=We(()=>{if(!$||!tt)return[];const e="function"==typeof tt?tt:e=>e[tt],t=new Set;for(const o of st){const n=o[S]||[];if(0===n.length)continue;const i=e("end"===ht?n[n.length-1]:n[0])??e(o);if(null==i)continue;const r=i+"";""!==r&&t.add(r)}return Array.from(t)},[$,tt,st,S,ht]),mt=We(()=>{if(!$)return i.marginDefaults;const e=ut.reduce((e,t)=>Math.max(e,t.length*(.6*dt)),0)+10,t="end"===ht?"right":"left";return{...i.marginDefaults,[t]:Math.max(i.marginDefaults[t]||0,e)}},[$,ut,dt,ht,i.marginDefaults]),pt=n({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:ne,onClick:ie,hoverHighlight:ae,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"LineChart",chartId:le,showLegend:(!$||void 0!==Be)&&Be,legend:Ce,userMargin:h,marginDefaults:mt,loading:ce,loadingContent:he,emptyContent:de,width:Le,height:He,hasTitle:!!Fe,axisChrome:E({showAxes:i.showAxes,xLabel:Oe})}),yt=pt.colorScale,ft=pt.effectiveSelectionHook,gt=pt.resolvedSelection,bt=pt.customHoverBehavior,xt=pt.customClickBehavior,vt=pt.crosshairProps,At=We(()=>{if(tt)return it?e=>{const t=e.parentLine||e;return"function"==typeof tt?tt(t):t[tt]}:tt},[tt,it]),wt=We(()=>v(x,A),[x,A]),kt=Ve({lineWidth:D,colorBy:At,colorScale:yt,color:ge,fillArea:M,areaOpacity:O,stroke:be,strokeWidth:xe,opacity:ve,effectiveSelectionHook:ft,resolvedSelection:gt,styleRules:R,ruleContext:wt}),[St,Ct]=Te(null);Ee(()=>{if(!Y)return void Ct(null);let e=!1;return async function(...e){return(await Se()).createSegmentLineStyle(...e)}(kt,Y).then(t=>{e||Ct(()=>t)}).catch(()=>{e||Ct(null)}),()=>{e=!0}},[kt,Y]);const Lt=St||kt,_t=We(()=>{if(P)return e=>{const t={r:N,fillOpacity:1};return tt?yt&&(t.fill=B(e.parentLine||e,tt,yt)):t.fill=ge||k,t}},[P,N,tt,yt,ge]),Ht=Array.isArray(M)?"mixed":M?"area":"line",Rt=We(()=>{if(!$||!tt)return[];const e="function"==typeof x?x:e=>e[x],t="function"==typeof A?A:e=>e[A],o="function"==typeof tt?tt:e=>e[tt],n=new Map;for(const e of st){const t=e[S]||[];if(0===t.length)continue;const i="end"===ht?t[t.length-1]:t[0],r=o(i)??o(e);if(null==r)continue;const a=r+"";""===a||n.has(a)||n.set(a,i)}const i=Array.from(n.entries()).map(([o,n])=>({type:"text",label:o,["string"==typeof x?x:"x"]:e(n),["string"==typeof A?A:"y"]:t(n),dx:"end"===ht?6:-6,dy:0,color:yt?yt(o):k,fontSize:dt}));i.sort((e,t)=>{const o="string"==typeof A?A:"y";return e[o]-t[o]});for(let e=1;i.length>e;e++){const t="string"==typeof A?A:"y",o=i[e-1],n=i[e];dt+2>Math.abs(n[t]+n.dy-(o[t]+o.dy))&&(n.dy+=dt+2)}return i},[$,tt,yt,st,S,x,A,ht,dt]),It=pt.margin,Bt=w||C,Ft=We(()=>g([{label:Oe||m(x),accessor:x,role:"x",format:u},{label:Ge||m(A),accessor:A,role:"y",format:y},...Bt?[{label:m(Bt),accessor:Bt,role:"group"}]:[],...p(K,y)]),[x,A,Oe,Ge,Bt,u,y,K]),Pt=s({componentName:"LineChart",data:it?Ye[0]?.[S]||[]:a,accessors:{xAccessor:x,yAccessor:A}}),Nt=We(()=>it||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,it,rt,et,lt]),Mt=c(T),Ot={chartType:Ht,...Array.isArray(M)&&{areaGroups:M},...Mt&&{lineGradient:Mt},...null!=a&&{data:Nt},xAccessor:x,yAccessor:A,xScaleType:ye,yScaleType:fe,...U&&{xExtent:U},...!q||null==q[0]&&null==q[1]?ot?{yExtent:ot}:{}:{yExtent:q},groupAccessor:"break"===X&<?"_gapSegment":rt||void 0,...K&&{band:K},curve:F,lineStyle:Lt,...P&&{pointStyle:_t},size:[Le,He],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:It,showAxes:i.showAxes,xLabel:Oe,yLabel:Ge,xFormat:u,yFormat:y,...void 0!==b&&{axisExtent:b},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},enableHover:Re,showGrid:Ie,...pt.legendBehaviorProps,...Fe&&{title:Fe},...Pe&&{description:Pe},...Ne&&{summary:Ne},...void 0!==Me&&{accessibleTable:Me},...d&&{className:d},...null!=e.animate&&{animate:e.animate},tooltipContent:!1===G?()=>null:"multi"===G?_():W(G)||Ft,..."multi"===G&&{tooltipMode:"multi"},...f({linkedHover:ee,selection:Z,onObservation:ne,onClick:ie,hoverRadius:se,hoverHighlight:ae,mobileInteraction:pt.mobileInteraction,customHoverBehavior:bt,customClickBehavior:xt}),...j&&{pointIdAccessor:j},...(V?.length||Ke.length||Rt.length)&&{annotations:[...V||[],...Ke,...Rt]},...vt,...ke};return pt.earlyReturn?pt.earlyReturn:Pt?$e(te,{componentName:"LineChart",message:Pt,width:Le,height:He}):$e(oe,{componentName:"LineChart",width:Le,height:He,children:$e(l,{ref:o,...Ot})})});Qe.displayName="LineChart";import{forwardRef as Ye,useMemo as Ke}from"react";import{jsx as Ue}from"react/jsx-runtime";var qe=Ye(function(e,t){const{data:o,layout:n,layoutConfig:r,onLayoutError:a,xExtent:s,yExtent:c,showAxes:h=!1,margin:d,className:u,annotations:m,onObservation:p,onClick:g,selection:b,linkedHover:x,hoverHighlight:v,chartId:A,loading:w,loadingContent:k,emptyContent:S,colorBy:C,colorScheme:L,legend:_,legendInteraction:R,legendPosition:I,frameProps:B={}}=e,{legend:F,...P}=B,N=Ke(()=>H(F,_),[F,_]),{frameRef:M,resolved:O,safeData:W,setup:D,earlyReturn:T}=i({imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:C,colorScheme:L,legend:N,legendInteraction:R,legendPosition:I,selection:b,linkedHover:x,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=D.effectiveSelectionHook,G=Ke(()=>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:X,description:Q,summary:Y,accessibleTable:K,xLabel:U,yLabel:q}=O,J={chartType:"custom",...null!=o&&{data:W},customLayout:n,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:D.margin,showAxes:h,xLabel:U,yLabel:q,enableHover:V,showGrid:$,...D.legendBehaviorProps,...y({title:X,description:Q,summary:Y,accessibleTable:K,className:u,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...null!=e.tooltip&&{tooltipContent:e.tooltip},...f({linkedHover:x,selection:b,onObservation:p,onClick:g,hoverRadius:e.hoverRadius,hoverHighlight:v,mobileInteraction:D.mobileInteraction,customHoverBehavior:D.customHoverBehavior,customClickBehavior:D.customClickBehavior}),...m&&m.length>0&&{annotations:m},...D.crosshairProps,...P};return Ue(oe,{componentName:"XYCustomChart",width:j,height:z,children:Ue(l,{ref:M,...J})})});qe.displayName="XYCustomChart";import{forwardRef as Je,useCallback as Ze,useMemo as et}from"react";function tt(e,t,o,n,i){const r=1-i;return r*r*r*e+3*r*r*i*t+3*r*i*i*o+i*i*i*n}function ot(e,t,o,n,i){const r=1-i;return 3*r*r*(t-e)+6*r*i*(o-t)+3*i*i*(n-o)}function nt(e,t,o,n,i){const r=[],a=(e.x+t.x)/2;for(let s=0;i>=s;s++){const l=s/i;let c,h,d,u;"linear"===n?(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=tt(e.x,a,a,t.x,l),h=tt(e.y,e.y,t.y,t.y,l),d=ot(e.x,a,a,t.x,l),u=ot(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 it(e,t={}){const o=[],n=[],i=[];if(2>e.length)return{topPath:o,bottomPath:n,datumIndices:i};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]),n.push([t.x-a*c,t.y-l*c]),i.push(t.datumIndex)}}return{topPath:o,bottomPath:n,datumIndices:i}}import{jsx as rt,jsxs as at}from"react/jsx-runtime";function st(e,t,o){return"function"==typeof e?e(t,o):t[e]}function lt(e){return e instanceof Date?"date:"+e.getTime():`${typeof e}:${e+""}`}function ct(e,t={}){const o=t.xAccessor??"x",n=t.yAccessor??"y",i=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=st(o,e,t),m=lt(r);let p=s.get(m);null==p&&(p=a.length,s.set(m,p),a.push(r),l.set(p,[]));const y=st(i,e,t)+"";h.has(y)||(h.set(y,c.length),c.push(y));const f=Number(st(n,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 n=o+1;m.push({datum:t.datum,xIndex:e,xValue:a[e],series:t.series,value:t.value,rank:n}),p.set(t.series,(p.get(t.series)??0)+n),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,n=y.get(t)??0;return((p.get(e)??0)+(a.length-o)*f)/Math.max(1,a.length)-((p.get(t)??0)+(a.length-n)*f)/Math.max(1,a.length)||(h.get(e)??0)-(h.get(t)??0)}),b=new Set(g.slice(0,null==t.highlightTop?g.length:Math.max(0,Math.floor(t.highlightTop))));return{data:m.map(e=>{const t=b.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 ht({datum:e,x:t,y:o,side:n,color:i,highlighted:r,labelStyle:a}){const s=x(),l=s.isActive&&!s.predicate(e),c="function"==typeof a?a(e.__bumpRaw):a;return rt("text",{className:"semiotic-bump-label",x:t+("end"===n?8:-8),y:o,dy:"0.35em",textAnchor:"end"===n?"start":"end",fill:i,fillOpacity:l?.16:1,fontWeight:r?650:450,style:{pointerEvents:"none",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-axis-label-font-size, 11px)",...c},children:e.__bumpSeries})}function dt(e,t,o){const[n,i]=t,[r,a]=o;return i===n?(r+a)/2:r+(a-r)*Math.max(0,Math.min(1,(e-n)/(i-n)))}function ut(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:void 0}function mt(e){return{value:e.__bumpValue,x:ut(e.__bumpXValue),y:e.__bumpValue,category:e.__bumpSeries}}function pt(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 n=t.seriesOrder.filter(e=>o.has(e)).sort((e,n)=>(o.get(e)?.[0]?.__bumpHighlighted?1:0)-(o.get(n)?.[0]?.__bumpHighlighted?1:0)||t.seriesOrder.indexOf(e)-t.seriesOrder.indexOf(n)),i=[],r=[];for(const a of n){const n=(o.get(a)??[]).sort((e,t)=>e.x-t.x);if(2>n.length)continue;const s=n[0].__bumpHighlighted,l=e.resolveColor(n[0].__bumpSeries,n[0]),c=t.color??(s?l:t.neutralColor??e.theme.semantic.textSecondary??e.theme.semantic.border??l),h=n.map(o=>({x:e.scales.x(o.x),y:e.scales.y(o.y),radius:t.ribbon?dt(o.__bumpValue,t.valueExtent,t.ribbonSizeRange)/2:Math.max(.5,t.lineWidth/2)})),d=it(h,{curve:t.curve,samplesPerSegment:t.samplesPerSegment}),u=d.datumIndices.map(e=>n[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(n[0].__bumpRaw,t.styleRules,mt(n[0]))),t.areaStyle&&Object.assign(m,t.areaStyle(n[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),i.push({type:"area",topPath:d.topPath,bottomPath:d.bottomPath,style:m,datum:u,accessibleDatum:n.map(e=>e.__bumpRaw),accessibility:{label:a+" ranking trajectory",tableFields:n.map(e=>e.__bumpRaw)},group:a,interactive:!0}),t.showPoints&&n.forEach((e,o)=>{const n={fill:c,stroke:"none",opacity:s?1:.75};t.styleRules?.length&&Object.assign(n,A(e.__bumpRaw,t.styleRules,mt(e))),t.pointStyle&&Object.assign(n,t.pointStyle(e.__bumpRaw)??{}),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity),i.push({type:"point",x:h[o].x,y:h[o].y,r:n.r??t.pointRadius,style:n,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,n)=>{r.push(rt(ht,{datum:e,x:h[o].x,y:h[o].y,side:n,color:"string"==typeof m.fill?m.fill:c,highlighted:s,labelStyle:t.labelStyle},`${a}-${n}`))};"start"!==p&&"both"!==p||y(n[0],0,"start"),"end"!==p&&"both"!==p||y(n.at(-1),n.length-1,"end")}return{nodes:i,overlays:r.length?rt("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 yt=Je(function(e,t){const o=K(),n=ee(),{data:i,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:b,ribbonOpacity:x=.82,lineOpacity:v=.9,showPoints:A=!1,pointRadius:w=3,showLabels:k=!0,showAxes:S=!0,showGrid:C=!0,showLegend:L=!1,enableHover:_=!0,hoverHighlight:H=!0,tooltip:I,frameProps:B={},xFormat:F,yFormat:P,onClick:N}=e,M=et(()=>ct(i,{xAccessor:r,yAccessor:a,lineBy:s,rankDirection:l,highlightTop:p}),[i,r,a,s,l,p]),{axes:O,areaStyle:T,pointStyle:E,...G}=B,j=et(()=>function(e){const{seriesOrder:t,overallOrder:o,highlightTop:n,color:i,colorScheme:r,neutralColor:a,themeCategorical:s,themeNeutral:l}=e;if(null==n&&null==i)return r;const c=new Set(o.slice(0,null==n?o.length:Math.max(0,Math.floor(n)))),h=new Map,d={};for(const e of t)d[e]=i??(c.has(e)?D(void 0,s,r,e,h):a??l??"#b8bec8");return d}({seriesOrder:M.seriesOrder,overallOrder:M.overallOrder,highlightTop:p,color:e.color,colorScheme:b,neutralColor:y,themeCategorical:o,themeNeutral:n.colors.textSecondary}),[M.seriesOrder,M.overallOrder,p,e.color,b,y,o,n.colors.textSecondary]),z=et(()=>({ribbon:c,curve:h,samplesPerSegment:u,ribbonSizeRange:d,valueExtent:M.valueExtent,seriesOrder:M.seriesOrder,lineWidth:m,ribbonOpacity:x,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,M.valueExtent,M.seriesOrder,m,x,v,y,e.color,e.stroke,e.strokeWidth,e.opacity,f,T,E,g,A,w,k]),V=Ze((e,t)=>{if(0===M.xValues.length)return"";const o=M.xValues[Math.max(0,Math.min(M.xValues.length-1,Math.round(Number(e))))];return F?F(o,t):(o instanceof Date?o.toLocaleDateString():o)+""},[M.xValues,F]),$=Ze(e=>P?P(e):e.toLocaleString(),[P]),X=et(()=>"multi"===I?void 0:W(I),[I]),Q=Ze(e=>{const t=e?.data??e;return t?!1===I?null:X?X({...e,data:t.__bumpRaw,__semioticHoverData:!0}):at("div",{className:"semiotic-tooltip",style:R,children:[rt("div",{style:{fontWeight:700},children:t.__bumpSeries}),at("div",{children:[V(t.x)," · Rank ",t.__bumpRank]}),at("div",{children:["Value: ",$(t.__bumpValue)]})]}):null},[$,V,X,I]),Y=et(()=>{if(N)return(e,t)=>{N(e.__bumpRaw??e,t)}},[N]),U=Math.max(1,M.seriesOrder.length),q=M.xValues.map((e,t)=>t),J=Array.from({length:U},(e,t)=>t+1),Z=O??[{orient:"left",tickValues:J,tickFormat:e=>e+"",label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:q,tickFormat:V,label:e.xLabel,tickAnchor:"edges"}],te=et(()=>function(e,t){if(!e?.length)return;const o=new Map(t.map((e,t)=>[lt(e),t]));return e.map(e=>{const t={...e},n=n=>{if(!(n in e))return;const i=o.get(lt(e[n]));void 0!==i&&(t[n]=i)};return n("x"),n("x0"),n("x1"),"string"!=typeof e.type||"x-threshold"!==e.type&&"x"!==e.type||n("value"),t})}(e.annotations,M.xValues),[e.annotations,M.xValues]);return rt(qe,{ref:t,data:M.data,layout:pt,layoutConfig:z,xExtent:[0,Math.max(1,M.xValues.length-1)],yExtent:[U+.5,.5],showAxes:S,showGrid:C,showLegend:L,enableHover:_,hoverHighlight:H,colorBy:"__bumpSeries",colorScheme:j,tooltip:Q,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:te,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:Z,axisExtent:"exact",...G}})});yt.displayName="BumpChart";import{useMemo as ft,forwardRef as gt,useRef as bt}from"react";import{useMemo as xt}from"react";function vt(e){const{safeData:o,data:n,areaBy:i,lineDataAccessor:r,colorBy:a,colorScale:s,color:l,stroke:c,strokeWidth:h,opacity:d,effectiveSelectionHook:u,resolvedSelection:y,areaOpacity:f,showLine:b,lineWidth:x,showPoints:v,pointRadius:w,xAccessor:S,yAccessor:C,xLabel:L,yLabel:_,xFormat:H,yFormat:R,groupField:I,styleRules:F,ruleContext:P}=e,N=xt(()=>function({data:e,safeData:t,areaBy:o,lineDataAccessor:n}){if(null==e)return[];const i=void 0!==t[0]?.[n];if(!i&&!o)return t;let r;if(i)r=t;else{const e=t.reduce((e,t)=>{const i="function"==typeof o?o(t):t[o],r=i+"";if(!e[r]){const t={[n]:[]};"string"==typeof o&&(t[o]=i),e[r]=t}return e[r][n].push(t),e},{});r=Object.values(e)}return r.flatMap(e=>{const t=Array.isArray(e[n])?e[n]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}({data:n,safeData:o,areaBy:i,lineDataAccessor:r}),[n,o,i,r]),M=xt(()=>e=>{const t={};if(a){if(s){const o=B(e,a,s);t.fill=o,b?(t.stroke=o,t.strokeWidth=x):t.stroke="none"}}else{const e=l||k;t.fill=e,b?(t.stroke=e,t.strokeWidth=x):t.stroke="none"}return t.fillOpacity=f,F&&F.length>0&&Object.assign(t,A(e,F,P?P(e):{value:void 0})),t},[a,s,l,f,b,x,F,P]),O=xt(()=>t(M,{stroke:c,strokeWidth:h,opacity:d}),[M,c,h,d]);return{flattenedData:N,lineStyle:xt(()=>q(O,u??null,y),[O,u,y]),pointStyle:xt(()=>{if(v)return e=>{const t={r:w,fillOpacity:1};return a?s&&(t.fill=B(e.parentLine||e,a,s)):t.fill=l||k,t}},[v,w,a,s,l]),defaultTooltipContent:xt(()=>g([{label:L||m(S),accessor:S,role:"x",format:H},{label:_||m(C),accessor:C,role:"y",format:R},...I?[{label:m(I),accessor:I,role:"group"}]:[],...p(e.band,R)]),[S,C,L,_,I,H,R,e.band])}}import{jsx as At}from"react/jsx-runtime";var wt=gt(function(e,t){const o=bt(null);r(t,{variant:"xy",frameRef:o});const i=z(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:A="x",yAccessor:w="y",areaBy:k,y0Accessor:S,gradientFill:C=!1,semanticGradient:L,semanticLine:H=!0,lineDataAccessor:R="coordinates",colorBy:B,colorScheme:F,styleRules:P,curve:N="monotoneX",areaOpacity:M=.7,lineGradient:O,showLine:W=!0,lineWidth:D=2,showPoints:T=!1,pointRadius:G=3,tooltip:j,annotations:V,forecast:$,anomaly:X,band:Q,xExtent:Y,yExtent:K,frameProps:U={},selection:q,linkedHover:J,onObservation:Z,onClick:ee,hoverHighlight:ne,chartId:ie,loading:ae,loadingContent:se,emptyContent:le,legendInteraction:ce,legendPosition:he,color:de,stroke:ue,strokeWidth:me,opacity:pe}=e,{width:ye,height:fe,enableHover:ge,showGrid:be,showLegend:xe,title:ve,description:Ae,summary:we,accessibleTable:ke,xLabel:Se,yLabel:Ce}=i,Le=ft(()=>I(a),[a]),He=B||k,Re=ft(()=>d(L),[L]),Ie=ft(()=>Re?.stops.length?u(Re):h(C),[Re,C]),Be=ft(()=>c(O),[O]),Fe=ft(()=>H&&Re?.stops.length?Re.stops.flatMap(({offset:e,color:t})=>t?[{offset:e,color:t}]:[]):void 0,[Re,H]);re("AreaChart",Le,"xAccessor",A),re("AreaChart",Le,"yAccessor",w);const Pe=n({data:Le,rawData:a,colorBy:He,colorScheme:F,legendInteraction:ce,legendPosition:he,selection:q,linkedHover:J,fallbackFields:He?["string"==typeof He?He:""]:[],unwrapData:!1,onObservation:Z,onClick:ee,hoverHighlight:ne,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:ie,showLegend:xe,userMargin:m,marginDefaults:i.marginDefaults,loading:ae,loadingContent:se,emptyContent:le,width:ye,height:fe,hasTitle:!!ve,axisChrome:E({showAxes:i.showAxes,xLabel:Se})}),{effectiveData:Ne,statisticalAnnotations:Me}=_e({data:Le,xAccessor:A,yAccessor:w,forecast:$,anomaly:X,groupBy:k}),Oe=ft(()=>v(A,w),[A,w]),{flattenedData:We,lineStyle:De,pointStyle:Te,defaultTooltipContent:Ee}=vt({safeData:Ne,data:a,areaBy:k,lineDataAccessor:R,colorBy:He,colorScale:Pe.colorScale,color:de,stroke:ue,strokeWidth:me,opacity:pe,effectiveSelectionHook:Pe.effectiveSelectionHook,resolvedSelection:Pe.resolvedSelection,areaOpacity:M,showLine:W,lineWidth:D,showPoints:T,pointRadius:G,xAccessor:A,yAccessor:w,xLabel:Se,yLabel:Ce,xFormat:g,yFormat:x,groupField:k||B,band:Q,styleRules:P,ruleContext:Oe}),Ge=s({componentName:"AreaChart",data:a,accessors:{xAccessor:A,yAccessor:w}}),je={chartType:"area",...null!=a&&{data:We},xAccessor:A,yAccessor:w,groupAccessor:k||void 0,...S&&{y0Accessor:S},...Q&&{band:Q},...Ie&&{gradientFill:Ie},...Be&&{lineGradient:Be},...Fe&&{semanticLineStops:Fe},curve:N,lineStyle:De,...T&&Te&&{pointStyle:Te},size:[ye,fe],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Pe.margin,showAxes:i.showAxes,xLabel:Se,yLabel:Ce,xFormat:g,yFormat:x,enableHover:ge,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:be,...Pe.legendBehaviorProps,...y({title:ve,description:Ae,summary:we,accessibleTable:ke,className:p,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),..."multi"===j?{tooltipContent:_(),tooltipMode:"multi"}:b({tooltip:j,defaultTooltipContent:Ee}),...f({linkedHover:J,selection:q,onObservation:Z,onClick:ee,hoverHighlight:ne,mobileInteraction:Pe.mobileInteraction,customHoverBehavior:Pe.customHoverBehavior,customClickBehavior:Pe.customClickBehavior}),...(V&&V.length>0||Me.length>0)&&{annotations:[...V||[],...Me]},...Y&&{xExtent:Y},...K&&{yExtent:K},...Pe.crosshairProps,...U};return Pe.earlyReturn?Pe.earlyReturn:Ge?At(te,{componentName:"AreaChart",message:Ge,width:ye,height:fe}):At(oe,{componentName:"AreaChart",width:ye,height:fe,children:At(l,{ref:o,...je})})});wt.displayName="AreaChart";import{useMemo as kt,forwardRef as St,useRef as Ct,useState as Lt,useImperativeHandle as _t,useCallback as Ht}from"react";import{jsx as Rt,jsxs as It}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=St(function(e,t){const o=Ct(null),i=z(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:b="B",seriesAColor:x="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:_,tooltip:H,annotations:B,xExtent:F,yExtent:P,frameProps:N={},selection:M,linkedHover:O,onObservation:D,onClick:T,hoverHighlight:G,chartId:j,loading:V,loadingContent:$,emptyContent:X,legendInteraction:Q,legendPosition:Y,pointIdAccessor:K,windowSize:U}=e,{width:q,height:J,enableHover:Z,showGrid:ee,showLegend:te,title:ne,description:ie,summary:re,accessibleTable:ae,xLabel:se,yLabel:le}=i,ce=kt(()=>"function"==typeof u?e=>Bt(u(e)):e=>Bt(e[u]),[u]),he=kt(()=>"function"==typeof m?e=>Bt(m(e)):e=>Bt(e[m]),[m]),de=kt(()=>"function"==typeof p?e=>Bt(p(e)):e=>Bt(e[p]),[p]),[ue,me]=Lt([]),pe=Ct([]),ye=null==r,fe=kt(()=>I(ye?ue:r),[ye,ue,r]),ge=kt(()=>function(e,t,o,n){if(!e.length)return[];const i=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;i.length>e;e++){const r=i[e],p=t(r),y=o(r),f=n(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 n=Math.max(0,Math.min(1,(l.b-l.a)/o));e=l.x+n*(p-l.x),t=l.a+n*(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]),be=kt(()=>A?function(e,t,o,n){if(!e.length)return[];const i=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(const e of i){const i=t(e),a=o(e),s=n(e);Number.isFinite(a)&&r.push({__x:i,__y:a,__diffSegment:"line-A"}),Number.isFinite(s)&&r.push({__x:i,__y:s,__diffSegment:"line-B"})}return r}(fe,ce,he,de):[],[A,fe,ce,he,de]),xe=kt(()=>[...ge,...be],[ge,be]),ve=kt(()=>{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=U&&e.length>U?e.slice(e.length-U):e;pe.current=t,me(t)},t=K?"function"==typeof K?K:e=>e[K]:null;return{push:t=>e([...pe.current,t]),pushMany:t=>e([...pe.current,...t]),remove:o=>{if(!t)return[];const n=Array.isArray(o)?o:[o],i=[],r=[];for(const e of pe.current)n.includes(t(e))?i.push(e):r.push(e);return e(r),i},update:(o,n)=>{if(!t)return[];const i=Array.isArray(o)?o:[o],r=[],a=pe.current.map(e=>{if(i.includes(t(e))){const t=n(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,K,U]);const Ae=n({data:fe,rawData:r,colorBy:"__diffWinner",colorScheme:[x,v],legendInteraction:Q,legendPosition:Y,selection:M,linkedHover:O,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:D,onClick:T,hoverHighlight:G,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:j,showLegend:te,userMargin:a,marginDefaults:i.marginDefaults,loading:V,loadingContent:$,emptyContent:X,width:q,height:J,hasTitle:!!ne,axisChrome:E({showAxes:i.showAxes,xLabel:se})}),we=kt(()=>{if(!1!==te)return{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:g,color:x},{label:b,color:v}]}]}},[te,g,b,x,v]),ke=Ht(e=>{const t=e.__diffSegment;return{fill:"A"==(t?.endsWith("-A")?"A":"B")?x:v,stroke:"none",fillOpacity:L}},[x,v,L]),Se=Ht(e=>({stroke:"A"==("line-A"===e.__diffSegment?"A":"B")?x:v,strokeWidth:w,fill:"none"}),[x,v,w]),Ce=Ht(e=>({fill:"A"==("line-A"===e.__diffSegment?"A":"B")?x:v,r:S}),[x,v,S]),Le=Ht(e=>{const t=e.data,o=e.allSeries,n=e.xValue??t?.__x;let i=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)&&(i=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=n&&(null==i||null==r)){const e=fe.find(e=>ce(e)===n);e&&(null==i&&(i=he(e)),null==r&&(r=de(e)))}const a=e=>null!=e&&Number.isFinite(e)?""+Math.round(100*e)/100:"—",s=c&&null!=n?c(n):null!=n?n+"":"";return It("div",{className:"semiotic-tooltip",style:R,children:[s&&Rt("div",{style:{fontWeight:600,marginBottom:4},children:s}),It("div",{style:{display:"flex",alignItems:"center",gap:6},children:[Rt("span",{style:{width:10,height:10,background:x,display:"inline-block",borderRadius:2}}),It("span",{children:[g,": ",a(i)]})]}),It("div",{style:{display:"flex",alignItems:"center",gap:6},children:[Rt("span",{style:{width:10,height:10,background:v,display:"inline-block",borderRadius:2}}),It("span",{children:[b,": ",a(r)]})]}),null!=i&&null!=r&&Number.isFinite(i)&&Number.isFinite(r)&&It("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",a(i-r)]})]})},[fe,ce,he,de,c,x,v,g,b]),_e="multi"===H,He=kt(()=>!1===H?()=>null:_e?Le:W(H)||Le,[H,_e,Le]),Re=kt(()=>h(_,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[_]);if(Ae.earlyReturn)return Ae.earlyReturn;const Ie={chartType:"mixed",data:xe,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:ve,curve:C,areaStyle:ke,lineStyle:Se,...k&&{pointStyle:Ce},size:[q,J],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ae.margin,showAxes:i.showAxes,xLabel:se,yLabel:le,xFormat:c,yFormat:d,enableHover:Z,showGrid:ee,...Re&&{gradientFill:Re},...we&&{legend:we,legendPosition:Ae.legendPosition},...y({title:ne,description:ie,summary:re,accessibleTable:ae,className:s,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:He,..._e&&{tooltipMode:"multi"},...f({linkedHover:O,selection:M,onObservation:D,onClick:T,hoverHighlight:G,mobileInteraction:Ae.mobileInteraction,customHoverBehavior:Ae.customHoverBehavior,customClickBehavior:Ae.customClickBehavior}),...B&&B.length>0&&{annotations:B},...F&&{xExtent:F},...P&&{yExtent:P},...Ae.crosshairProps,...N};return Rt(oe,{componentName:"DifferenceChart",width:q,height:J,children:Rt(l,{ref:o,...Ie})})});"function"==typeof Ft&&(Ft.displayName="DifferenceChart");import{useMemo as Pt,forwardRef as Nt,useRef as Mt}from"react";import{jsx as Ot}from"react/jsx-runtime";var Wt=Nt(function(e,t){const o=Mt(null),i=z(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:A,colorScheme:w,styleRules:k,curve:S="monotoneX",areaOpacity:C=.7,showLine:L=!0,lineWidth:H=2,showPoints:R=!1,pointRadius:B=3,normalize:F=!1,baseline:P="zero",stackOrder:N,tooltip:M,annotations:O,xExtent:W,yExtent:D,frameProps:T={},selection:G,linkedHover:j,onObservation:V,onClick:$,hoverHighlight:X,chartId:Q,loading:Y,loadingContent:K,emptyContent:U,legendInteraction:q,legendPosition:J,color:Z,stroke:ee,strokeWidth:ne,opacity:ie}=e,{width:re,height:ae,enableHover:se,showGrid:le,showLegend:ce,title:he,description:de,summary:ue,accessibleTable:me,xLabel:pe,yLabel:ye}=i,fe=Pt(()=>I(a),[a]),ge=A||g;r(t,{variant:"xy",frameRef:o});const be=n({data:fe,rawData:a,colorBy:ge,colorScheme:w,legendInteraction:q,legendPosition:J,selection:G,linkedHover:j,fallbackFields:ge?["string"==typeof ge?ge:""]:[],unwrapData:!1,onObservation:V,onClick:$,hoverHighlight:X,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:Q,showLegend:ce,userMargin:c,marginDefaults:i.marginDefaults,loading:Y,loadingContent:K,emptyContent:U,width:re,height:ae,hasTitle:!!he,axisChrome:E({showAxes:i.showAxes,xLabel:pe})}),xe=Pt(()=>v(m,p),[m,p]),{flattenedData:ve,lineStyle:Ae,pointStyle:we,defaultTooltipContent:ke}=vt({safeData:fe,data:a,areaBy:g,lineDataAccessor:x,colorBy:ge,colorScale:be.colorScale,color:Z,stroke:ee,strokeWidth:ne,opacity:ie,effectiveSelectionHook:be.effectiveSelectionHook,resolvedSelection:be.resolvedSelection,areaOpacity:C,showLine:L,lineWidth:H,showPoints:R,pointRadius:B,xAccessor:m,yAccessor:p,xLabel:pe,yLabel:ye,xFormat:d,yFormat:u,groupField:g||A,styleRules:k,ruleContext:xe}),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:S,normalize:F,baseline:F?"zero":P,stackOrder:N,lineStyle:Ae,...R&&we&&{pointStyle:we},size:[re,ae],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:be.margin,showAxes:i.showAxes,xLabel:pe,yLabel:ye,xFormat:d,yFormat:u,enableHover:se,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:le,...be.legendBehaviorProps,...y({title:he,description:de,summary:ue,accessibleTable:me,className:h,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),..."multi"===M?{tooltipContent:_(),tooltipMode:"multi"}:b({tooltip:M,defaultTooltipContent:ke}),...f({linkedHover:j,selection:G,onObservation:V,onClick:$,hoverHighlight:X,mobileInteraction:be.mobileInteraction,customHoverBehavior:be.customHoverBehavior,customClickBehavior:be.customClickBehavior}),...O&&O.length>0&&{annotations:O},...W&&{xExtent:W},...D&&{yExtent:D},...be.crosshairProps,...T};return be.earlyReturn?be.earlyReturn:Se?Ot(te,{componentName:"StackedAreaChart",message:Se,width:re,height:ae}):Ot(oe,{componentName:"StackedAreaChart",width:re,height:ae,children:Ot(l,{ref:o,...Ce})})});Wt.displayName="StackedAreaChart";import{useMemo as Dt,forwardRef as Tt,useRef as Et}from"react";import{scaleSequential as Gt}from"d3-scale";import{jsx as jt}from"react/jsx-runtime";var zt=Tt(function(e,t){const o=Et(null);r(t,{variant:"xy",frameRef:o});const n=z(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:i,margin:c,className:h,xAccessor:d="x",yAccessor:u="y",valueAccessor:p="value",xFormat:x,yFormat:v,colorScheme:A,customColorScale:w,showValues:k=!1,valueFormat:S,cellBorderColor:C="#fff",cellBorderWidth:L=1,tooltip:_,annotations:H,xExtent:R,yExtent:B,frameProps:N={},selection:M,linkedHover:O,onObservation:W,onClick:D,hoverHighlight:T,chartId:E,loading:G,loadingContent:$,emptyContent:Q,showLegend:Y,legendPosition:K,legend:q,legendInteraction:J}=e,{width:ee,height:re,enableHover:ae,title:se,description:le,summary:ce,accessibleTable:he,xLabel:de,yLabel:ue}=n,me=ie(G,ee,re,$),pe=me?null:ne(i,ee,re,Q),ye=Dt(()=>I(i),[i]),fe=U(),ge=A??fe??"blues",be=Y??!1,xe=K??"right",{customHoverBehavior:ve,customClickBehavior:Ae,crosshairSourceId:we}=V({selection:M,linkedHover:O,fallbackFields:[],onObservation:W,onClick:D,chartType:"Heatmap",chartId:E,hoverHighlight:T,colorByField:void 0,mobileInteraction:n.mobileInteraction});a(M);const ke=F(O,we);X(J,void 0,[]);const Se=Dt(()=>"function"==typeof p?e=>p(e):e=>e[p],[p]),Ce=Dt(()=>{const e=ye.map(Se);return Z(e)},[ye,Se]),Le=Dt(()=>{if("custom"===ge&&w)return w;const e=P(ge);return Gt(e).domain(Ce)},[ge,w,Ce]),_e=Dt(()=>{const e=Number.isFinite(L)?Math.max(0,L):1;return()=>({stroke:C,strokeWidth:e})},[C,L]),He=Dt(()=>g([{label:de||m(d),accessor:d,role:"x",format:x},{label:ue||m(u),accessor:u,role:"y",format:v},{label:m(p),accessor:p,role:"value",format:S}]),[d,u,de,ue,p,x,v,S]),Re=s({componentName:"Heatmap",data:i,accessors:{xAccessor:d,yAccessor:u,valueAccessor:p}}),Ie=Dt(()=>{if(be)return{gradient:{colorFn:e=>Le(e),domain:Ce,label:"string"==typeof p?p:"value",format:S},legendDistance:q?.legendDistance}},[be,Le,Ce,p,S,q?.legendDistance]),{margin:Be}=j({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:xe,userMargin:c,defaults:n.marginDefaults,additionalLegend:Ie,chartWidth:ee,legendLayout:N.legendLayout,hasTitle:!!se,axisChrome:{hasAxis:!1!==n.showAxes,hasAxisLabel:!!de}}),Fe={chartType:"heatmap",...null!=i&&{data:ye},xAccessor:d,yAccessor:u,valueAccessor:p,colorScheme:"custom"!==ge?ge:void 0,areaStyle:_e,showValues:k,heatmapValueFormat:S,size:[ee,re],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Be,showAxes:n.showAxes,xLabel:de,yLabel:ue,xFormat:x,yFormat:v,enableHover:ae,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Ie&&{legend:Ie,legendPosition:xe},...y({title:se,description:le,summary:ce,accessibleTable:he,className:h,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...b({tooltip:_,defaultTooltipContent:He}),...f({linkedHover:O,selection:M,onObservation:W,onClick:D,hoverHighlight:T,mobileInteraction:n.mobileInteraction,customHoverBehavior:ve,customClickBehavior:Ae}),...H&&H.length>0&&{annotations:H},...R&&{xExtent:R},...B&&{yExtent:B},...ke,...N};return me||pe||(Re?jt(te,{componentName:"Heatmap",message:Re,width:ee,height:re}):jt(oe,{componentName:"Heatmap",width:ee,height:re,children:jt(l,{ref:o,...Fe})}))});zt.displayName="Heatmap";import{useMemo as Vt,useCallback as $t,forwardRef as Xt,useRef as Qt}from"react";import{jsx as Yt}from"react/jsx-runtime";var Kt=Xt(function(t,o){const i=Qt(null),a=z(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:x="x",yAccessor:A="y",sizeBy:w,sizeRange:k=[5,40],colorBy:S,colorScheme:C,styleRules:L,bubbleOpacity:_=.6,bubbleStrokeWidth:H=1,bubbleStrokeColor:R="white",tooltip:B,marginalGraphics:F,pointIdAccessor:P,annotations:M,regression:W,xExtent:D,yExtent:T,frameProps:j={},selection:V,linkedHover:$,linkedBrush:X,onObservation:Q,onClick:Y,hoverHighlight:K,chartId:U,loading:q,loadingContent:J,emptyContent:Z,legendInteraction:ee,legendPosition:ne,color:ie,stroke:re,strokeWidth:ae,opacity:se}=t,{width:le,height:ce,enableHover:he,showGrid:de,showLegend:me,title:pe,description:ye,summary:fe,accessibleTable:be,xLabel:xe,yLabel:ve}=a,Ae=Vt(()=>I(c),[c]),we=void 0===c,ke=n({data:Ae,rawData:c,colorBy:S,colorScheme:C,legendInteraction:ee,legendPosition:ne,selection:V,linkedHover:$,fallbackFields:S?["string"==typeof S?S:""]:[],unwrapData:!1,onObservation:Q,onClick:Y,hoverHighlight:K,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"BubbleChart",chartId:U,showLegend:me,userMargin:h,marginDefaults:a.marginDefaults,loading:q,loadingContent:J,emptyContent:Z,width:le,height:ce,hasTitle:!!pe,axisChrome:E({showAxes:a.showAxes,xLabel:xe})}),{domain:Se,trackPushed:Ce,reset:Le}=ge({accessor:w,data:Ae,isPushMode:we}),_e=$t(e=>{Ce([e]),i.current?.push(e)},[Ce]),He=$t(e=>{Ce(e),i.current?.pushMany(e)},[Ce]);r(o,{variant:"xy",frameRef:i,overrides:{push:_e,pushMany:He,clear:()=>{Le(),i.current?.clear()}}});const Re=O(X),Ie=(G({name:Re?.name||"__unused_brush__",xField:Re?.xField||("string"==typeof x?x:void 0),yField:Re?.yField||("string"==typeof A?A:void 0)}),Vt(()=>({stroke:R,strokeWidth:H}),[R,H])),Be=Vt(()=>Se??[0,1],[Se]),Fe=$t(e=>N(e,w,k,Be),[w,k,Be]),Pe=Vt(()=>v(x,A),[x,A]),Ne=ue({colorBy:S,colorScale:ke.colorScale,color:ie,fillOpacity:_,radiusFn:Fe,baseStyleExtras:Ie,stroke:re,strokeWidth:ae,opacity:se,styleRules:L,ruleContext:Pe,effectiveSelectionHook:ke.effectiveSelectionHook,resolvedSelection:ke.resolvedSelection}),Me=Vt(()=>g([{label:xe||m(x),accessor:x,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"}]:[]]),[x,A,xe,ve,w,S,u,p]);if(ke.earlyReturn)return ke.earlyReturn;const Oe=s({componentName:"BubbleChart",data:c,accessors:{xAccessor:x,yAccessor:A},requiredProps:{sizeBy:w}});if(Oe)return Yt(te,{componentName:"BubbleChart",message:Oe,width:le,height:ce});const We=e(W),De=We?[We,...M||[]]:M,Te={chartType:"bubble",...null!=c&&{data:Ae},xAccessor:x,yAccessor:A,colorAccessor:S||void 0,sizeAccessor:w,sizeRange:k,pointStyle:Ne,colorScheme:C,size:[le,ce],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:ke.margin,showAxes:a.showAxes,xLabel:xe,yLabel:ve,xFormat:u,yFormat:p,enableHover:he,showGrid:de,...ke.legendBehaviorProps,...y({title:pe,description:ye,summary:fe,accessibleTable:be,className:d,animate:t.animate,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...b({tooltip:B,defaultTooltipContent:Me}),...f({linkedHover:$,selection:V,onObservation:Q,onClick:Y,hoverHighlight:K,mobileInteraction:ke.mobileInteraction,customHoverBehavior:ke.customHoverBehavior,customClickBehavior:ke.customClickBehavior}),...F&&{marginalGraphics:F},...P&&{pointIdAccessor:P},...De&&De.length>0&&{annotations:De},...D&&{xExtent:D},...T&&{yExtent:T},...ke.crosshairProps,...j};return Yt(oe,{componentName:"BubbleChart",width:le,height:ce,children:Yt(l,{ref:i,...Te})})});Kt.displayName="BubbleChart";import*as Ut from"react";import{useMemo as qt,useCallback as Jt,useState as Zt,useRef as eo}from"react";import*as to from"react";import{jsx as oo}from"react/jsx-runtime";var no=null,io=null;function ro(e){const[t,o]=to.useState(()=>no);return to.useEffect(()=>{if(t)return;let e=!1;return(no?Promise.resolve(no):(io||(io=import("./chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js").then(e=>no=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw io=null,e})),io)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?oo(t,{...e}):null}import{jsx as ao,jsxs as so}from"react/jsx-runtime";var lo="__splomIdx",co={top:4,bottom:4,left:4,right:4};function ho({data:e,xField:t,yField:o,cellSize:n,pointRadius:i,pointOpacity:r,colorBy:a,colorScale:s,brushSelectionName:c,hoverSelectionName:h,unselectedOpacity:d,mobileInteraction:u,mode:m,onPointHover:p,onPointClick:y}){const g=eo(null),b=Q({name:c,clientId:`splom-${t}-${o}`,fields:[t,o]}),x=G({name:c,xField:t,yField:o}),v=Q({name:h,clientId:"splom-hover-source",fields:[lo]}),A=v.selectPoints,w=Jt(e=>{e?x.brushInteraction.during(e):x.brushInteraction.end(null)},[x.brushInteraction]),S=Jt(e=>{if(!e)return void p?.(null);const t=e.data,o=t?.[lo];void 0!==o&&(A({[lo]:[o]}),p?.(t,e.x+co.left,e.y+co.top))},[A,p]),C=Jt(e=>{if(!e)return void y?.(null);const t=e.data;t&&y?.(t,e.x+co.left,e.y+co.top)},[y]),L=Jt(e=>{const t={opacity:r,r:i};return t.fill=a?B(e,a,s):k,"hover"===m?v.isActive&&v.predicate(e)?(t.opacity=1,t.r=2.5*i,t.stroke="#333",t.strokeWidth=1.5):v.isActive&&(t.opacity=.6*r):b.isActive&&!b.predicate(e)&&(t.opacity=d),t},[r,i,a,m,s,v,b,d]);return so("div",{style:{position:"relative",width:n,height:n},children:[ao(l,{ref:g,chartType:"scatter",data:e,size:[n,n],xAccessor:t,yAccessor:o,pointStyle:L,margin:co,showAxes:!1,enableHover:"hover"===m,...f({forceHoverBehavior:"hover"===m,forceClickBehavior:!!y,mobileInteraction:u,customHoverBehavior:S,customClickBehavior:C}),tooltipContent:"hover"===m?()=>null:void 0}),"brush"===m&&ao(ro,{frameRef:g,cellSize:n,onBrush:w})]})}function uo({data:e,field:t,label:o,cellSize:n,bins:i,colorBy:r,colorScale:a,brushSelectionName:s,hoverSelectionName:l,mode:c}){const h=Q({name:s,clientId:"splom-diag-"+t,fields:[t]}),d=Q({name:l,clientId:`splom-diag-${t}-hover`,fields:[lo]}),u="hover"===c?d:h,m=u.isActive,p=u.predicate,y=qt(()=>{const o="string"==typeof r?r:null,a=[],s=new Set;for(const n of e){const e=n[t];if(null==e||isNaN(e)||a.push(Number(e)),o){const e=n[o];null!=e&&s.add(e+"")}}if(0===a.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};const[l,c]=Z(a),h=(c-l)/i||1,d=Array.from(s),u=new Map(d.map((e,t)=>[e,t])),y=Array(i).fill(0),f=Array(i).fill(0),g=Array.from({length:i},()=>Array(d.length).fill(0)),b=Array.from({length:i},()=>Array(d.length).fill(0));for(const n of e){const e=n[t];if(null==e||isNaN(e))continue;const r=Math.min(Math.floor((e-l)/h),i-1);if(y[r]++,m&&!p(n)||f[r]++,o){const e=u.get(n[o]+"");void 0!==e&&(g[r][e]++,m&&!p(n)||b[r][e]++)}}const x=J(y,1),v=g.map((e,t)=>{let o=0;return e.map((e,r)=>{const a=e/x*(n-24),s={x:t/i*n,w:n/i-1,h:a,y0:o,category:d[r]};return o+=a,s})}),A=b.map((e,t)=>{let o=0;return e.map((e,r)=>{const a=e/x*(n-24),s={x:t/i*n,w:n/i-1,h:a,y0:o,category:d[r]};return o+=a,s})});return{bars:y.map((e,t)=>({x:t/i*n,w:n/i-1,h:e/x*(n-24),count:e})),selectedBars:f.map((e,t)=>({x:t/i*n,w:n/i-1,h:e/x*(n-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:x,categories:d}},[e,t,i,n,m,p,r]);return so("svg",{width:n,height:n,style:{overflow:"hidden"},children:[ao("text",{x:n/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)=>ao("rect",{x:e.x,y:n-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)=>ao("rect",{x:e.x,y:n-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)=>ao("rect",{x:e.x,y:n-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)=>ao("rect",{x:e.x,y:n-e.h,width:Math.max(e.w,1),height:e.h,fill:k,opacity:.7},"sel-"+t)))]})}function mo({label:e,cellSize:t}){return ao("svg",{width:t,height:t,children:ao("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"#333",children:e})})}function po(e){const{data:t,fields:o,fieldLabels:n={},colorBy:i,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,tooltip:f,showLegend:g,idAccessor:b,width:x,className:v,onObservation:A,onClick:w,chartId:S}=e,C="splom",L="splom-hover",_=T(e.mobileInteraction,{mode:e.mode,width:x??o.length*a,mobileSemantics:e.mobileSemantics}),H=m?"hover":u?"brush":"hover",R=Y(e=>e.clearSelection),[I,B]=Zt(null),F=Jt(()=>{R(L),B(null)},[R,L]),P=qt(()=>(t||[]).map((e,t)=>void 0!==e[lo]?e:{...e,[lo]:t}),[t]),N=$(P,i,r),M=Jt((e,t,o,n)=>[40+e*(a+s)+(o??0),t*(a+s)+(n??0)],[40,a,s]),O=void 0!==g?g:!!i,W=qt(()=>{if(!O||!i)return null;const e="string"==typeof i?i:null;return e?Array.from(new Set(P.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:e+"",color:N?N(e+""):k})):null},[O,i,P,N]),D=qt(()=>({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 so("div",{className:v,style:{position:"relative"},children:[W&&ao("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:W.map(e=>so("div",{style:{display:"flex",alignItems:"center",gap:4},children:[ao("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e.color}}),ao("span",{style:{fontSize:11},children:e.label})]},e.label))}),so("div",{style:D,onMouseLeave:"hover"===H?F:void 0,children:[o.map((e,t)=>so(Ut.Fragment,{children:[ao("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"#333"},children:n[e]||e}),o.map((o,r)=>t===r?"label"===h?ao(mo,{label:n[e]||e,cellSize:a},"diag-"+e):ao(uo,{data:P,field:e,label:n[e]||e,cellSize:a,bins:d,colorBy:i,colorScale:N,brushSelectionName:C,hoverSelectionName:L,unselectedOpacity:p,mode:H},"diag-"+e):ao(ho,{data:P,xField:o,yField:e,fieldLabels:n,cellSize:a,pointRadius:l,pointOpacity:c,colorBy:i,colorScale:N,brushSelectionName:C,hoverSelectionName:L,unselectedOpacity:p,showGrid:y,tooltip:f,mobileInteraction:_,mode:H,onPointHover:"hover"===H?(n,i,a)=>{if(n){if(B({datum:n,xField:o,yField:e,colIndex:r,rowIndex:t,px:i??0,py:a??0}),A){const[e,o]=M(r,t,i,a);A({type:"hover",datum:n,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:S})}}else B(null),A&&A({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:S})}:void 0,onPointClick:w||A?(e,o,n)=>{if(!e)return;const[i,a]=M(r,t,o,n);w&&w(e,{x:i,y:a}),A&&A({type:"click",datum:e,x:i,y:a,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:S})}:void 0},`cell-${e}-${o}`))]},"row-"+e)),ao("div",{})," ",o.map(e=>ao("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:n[e]||e},"col-label-"+e))]}),I&&"hover"===H&&(()=>{const e=I.datum,t=n[I.xField]||I.xField,o=n[I.yField]||I.yField,r=i?"function"==typeof i?i(e):e[i]:null,l=b?"function"==typeof b?b(e):e[b]:"Row "+e[lo];return so("div",{style:{position:"absolute",left:40+I.colIndex*(a+s)+I.px,top:I.rowIndex*(a+s)+I.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:[ao("div",{style:{fontWeight:"bold",marginBottom:2},children:l+""}),so("div",{children:[t,": ",null!=e[I.xField]?Number(e[I.xField]).toFixed(1):"–"]}),so("div",{children:[o,": ",null!=e[I.yField]?Number(e[I.yField]).toFixed(1):"–"]}),null!=r&&so("div",{style:{opacity:.8},children:["string"==typeof i?i:"group",": ",r+""]})]})})()]})}function yo(e){const{brushMode:t="crossfilter",hoverMode:o=!0}=e,n={};return!o&&t&&(n.splom={resolution:t}),o&&(n["splom-hover"]={resolution:"union"}),ao(L,{selections:n,children:ao(po,{...e})})}yo.displayName="ScatterplotMatrix";import{useState as fo,useRef as go,useEffect as bo,useMemo as xo,useCallback as vo}from"react";import*as Ao from"react";import{jsx as wo}from"react/jsx-runtime";var ko=null,So=null;function Co(e){const[t,o]=Ao.useState(()=>ko);return Ao.useEffect(()=>{if(t)return;let e=!1;return(ko?Promise.resolve(ko):(So||(So=import("./chunk-minimapBrushOverlay-JU57U7NM.module.min.js").then(e=>ko=e.MinimapBrushOverlay).catch(e=>{throw So=null,e})),So)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?wo(t,{...e}):null}import{jsx as Lo,jsxs as _o}from"react/jsx-runtime";function Ho(e){const{data:t,width:o=600,height:n=400,margin:i,className:r,title:a,description:c,summary:h,xLabel:d,yLabel:u,xFormat:p,yFormat:y,xAccessor:f="x",yAccessor:b="y",lineBy:x,lineDataAccessor:v="coordinates",colorBy:A,colorScheme:w,curve:S="linear",lineWidth:C=2,fillArea:L=!1,areaOpacity:_=.3,showPoints:H=!1,pointRadius:R=3,enableHover:F=!0,showGrid:P=!1,showLegend:N,legendPosition:M,tooltip:O,minimap:D={},renderBefore:T=!1,onBrush:E,brushExtent:G,yExtent:z,frameProps:V={},loading:X,loadingContent:Q,emptyContent:Y}=e,K=ie(X,o,n,Q),U=K?null:ne(t,o,n,Y),q=xo(()=>I(t),[t]),[J,Z]=fo(null),ee=G??J,re=vo(e=>{G||Z(e),E?.(e)},[G,E]),ae=go(null),[se,le]=fo(null);bo(()=>{let e=0,t=!1;const o=()=>{if(t)return;const n=ae.current?.getScales?.();n?le(n):e=requestAnimationFrame(o)};return e=requestAnimationFrame(o),()=>{t=!0,e&&cancelAnimationFrame(e)}},[t]);const ce=void 0!==q[0]?.[v],he=xo(()=>{if(ce)return q;if(x){const e=q.reduce((e,t)=>{const o="function"==typeof x?x(t):t[x];if(!e[o]){const t={[v]:[]};"string"==typeof x&&(t[x]=o),e[o]=t}return e[o][v].push(t),e},{});return Object.values(e)}return[{[v]:q}]},[q,x,v,ce]),de=xo(()=>ce||x?he.flatMap(e=>{const t=e[v]||[];return x&&"string"==typeof x?t.map(t=>({...t,[x]:e[x]})):t}):q,[he,v,ce,x,q]),ue=$(q,A,w),me=Ve({lineWidth:C,colorBy:A,colorScale:ue,fillArea:L,areaOpacity:_}),pe=xo(()=>{if(D.lineStyle)return D.lineStyle},[D.lineStyle]),ye=Ve({lineWidth:1,colorBy:A,colorScale:ue}),fe=pe??ye,ge=xo(()=>{if(H)return e=>{const t={r:R,fillOpacity:1};return t.fill=A?B(e.parentLine||e,A,ue):k,t}},[H,R,A,ue]),{legend:be,margin:xe,legendPosition:ve}=j({data:he,colorBy:A,colorScale:ue,showLegend:N,legendPosition:M,userMargin:i,chartWidth:o,hasTitle:!!a,axisChrome:{hasAxis:!0,hasAxisLabel:!!d}}),Ae=D.height||60,we=xo(()=>({top:D.margin?.top??0,bottom:D.margin?.bottom??20,left:D.margin?.left??xe.left,right:D.margin?.right??xe.right}),[D.margin,xe]),ke=D.brushDirection||"x",Se=xo(()=>g([{label:d||m(f),accessor:f,role:"x",format:p},{label:u||m(b),accessor:b,role:"y",format:y}]),[f,b,d,u,p,y]),Ce=s({componentName:"MinimapChart",data:t,accessors:{xAccessor:f,yAccessor:b}});if(Ce)return Lo(te,{componentName:"MinimapChart",message:Ce,width:o,height:n});const Le=L?"area":"line",_e={chartType:Le,data:de,xAccessor:f,yAccessor:b,groupAccessor:x||void 0,curve:S,lineStyle:me,...H&&{pointStyle:ge},size:[o,n],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:xe,showAxes:!0,xLabel:d,yLabel:u,xFormat:p,yFormat:y,enableHover:F,showGrid:P,...be&&{legend:be,legendPosition:ve},...a&&{title:a},...c&&{description:c},...h&&{summary:h},tooltipContent:!1===O?()=>null:W(O)||Se,...ee&&{xExtent:ee},...z&&{yExtent:z},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...V},He={chartType:Le,data:de,xAccessor:f,yAccessor:b,groupAccessor:x||void 0,curve:S,lineStyle:fe,size:[o,Ae+we.top+we.bottom],margin:we,showAxes:D.showAxes??!1,background:D.background,enableHover:!1,...z&&{yExtent:z}},Re=_o("div",{style:{position:"relative",width:o,overflow:"hidden"},children:[Lo(l,{ref:ae,...He}),Lo(Co,{width:o-we.left-we.right,height:Ae,margin:we,scales:se,brushDirection:ke,extent:ee,onBrush:re})]},"minimap"),Ie=Lo("div",{style:{overflow:"hidden"},children:Lo(l,{..._e})},"main");return K||U||Lo(oe,{componentName:"MinimapChart",width:o,height:n,children:_o("div",{className:"minimap-chart"+(r?" "+r:""),children:[T?Re:Ie,T?Ie:Re]})})}Ho.displayName="MinimapChart";import{useMemo as Ro,forwardRef as Io,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 Po,jsx as No,jsxs as Mo}from"react/jsx-runtime";function Oo(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}var Wo=Io(function(e,t){const o=Bo(null);r(t,{variant:"xy",frameRef:o});const i=z(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:b,yCenter:x,quadrants:A,centerlineStyle:w={},showQuadrantLabels:S=!0,quadrantLabelSize:C=12,colorBy:L,colorScheme:_,styleRules:H,sizeBy:R,sizeRange:B=[3,15],pointRadius:F=5,pointOpacity:P=.8,tooltip:M,pointIdAccessor:O,annotations:D,frameProps:T={},selection:G,linkedHover:j,onObservation:V,onClick:$,hoverHighlight:X,chartId:Q,loading:Y,loadingContent:K,emptyContent:U,legendInteraction:q,legendPosition:J,color:ee,stroke:ne,strokeWidth:ie,opacity:ae}=e,{width:se,height:le,enableHover:ce,showGrid:he,showLegend:de,title:me,description:pe,summary:ye,accessibleTable:fe,xLabel:ge,yLabel:be}=i,xe=Ro(()=>({topLeft:Oo(Fo.topLeft,A?.topLeft),topRight:Oo(Fo.topRight,A?.topRight),bottomLeft:Oo(Fo.bottomLeft,A?.bottomLeft),bottomRight:Oo(Fo.bottomRight,A?.bottomRight)}),[A]),ve=Ro(()=>I(a),[a]),Ae=n({data:ve,rawData:a,colorBy:L,colorScheme:_,legendInteraction:q,legendPosition:J,selection:G,linkedHover:j,fallbackFields:"string"==typeof L?[L]:[],unwrapData:!1,onObservation:V,onClick:$,hoverHighlight:X,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:Q,showLegend:de,userMargin:c,marginDefaults:i.marginDefaults,loading:Y,loadingContent:K,emptyContent:U,width:se,height:le,hasTitle:!!me,axisChrome:E({showAxes:i.showAxes,xLabel:ge})});re("QuadrantChart",ve,"xAccessor",p),re("QuadrantChart",ve,"yAccessor",y);const we=Ro(()=>{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,n=-1/0,i=1/0,r=-1/0;for(const a of ve){const s=e(a),l=t(a);isFinite(s)&&(o>s&&(o=s),s>n&&(n=s)),isFinite(l)&&(i>l&&(i=l),l>r&&(r=l))}if(null!=b&&isFinite(b)&&(o>b&&(o=b),b>n&&(n=b)),null!=x&&isFinite(x)&&(i>x&&(i=x),x>r&&(r=x)),o===1/0)return;const a=.1*(n-o)||1,s=.1*(r-i)||1;return{xExtent:[o-a,n+a],yExtent:[i-s,r+s]}},[ve,p,y,b,x]),ke=Ro(()=>{if(!R||0===ve.length)return;const e=ve.map(e=>"function"==typeof R?R(e):e[R]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Z(e):void 0},[ve,R]),Se=Ro(()=>"function"==typeof p?p:e=>+e[p],[p]),Ce=Ro(()=>"function"==typeof y?y:e=>+e[y],[y]),Le=Ro(()=>e=>{const t=Se(e),o=Ce(e),n=null!=b?t>=b:void 0,i=null!=x?o>=x:void 0;return void 0===i||void 0===n?ee||k:i&&n?xe.topRight.color:i&&!n?xe.topLeft.color:!i&&n?xe.bottomRight.color:xe.bottomLeft.color},[Se,Ce,b,x,xe,ee]),_e=Ro(()=>R?e=>N(e,R,B,ke):void 0,[R,B,ke]),He=Ro(()=>v(p,y),[p,y]),Re=ue({colorBy:L,colorScale:Ae.colorScale,color:ee,pointRadius:F,fillOpacity:P,radiusFn:_e,fallbackFill:Le,stroke:ne,strokeWidth:ie,opacity:ae,styleRules:H,ruleContext:He,effectiveSelectionHook:Ae.effectiveSelectionHook,resolvedSelection:Ae.resolvedSelection}),Ie=Ro(()=>{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 R&&e.add(R);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,R]),Be=Ro(()=>g([...Ie?[{label:Ie,accessor:Ie,role:"title"}]:[],{label:ge||m(p),accessor:p,role:"x",format:d},{label:be||m(y),accessor:y,role:"y",format:u},...L?[{label:m(L),accessor:L,role:"color"}]:[],...R?[{label:m(R),accessor:R,role:"size"}]:[]]),[Ie,p,y,ge,be,L,R,d,u]),Fe=s({componentName:"QuadrantChart",data:a,accessors:{xAccessor:p,yAccessor:y}}),Pe=Ro(()=>{const e={stroke:w.stroke||"#999",strokeWidth:w.strokeWidth??1,dashArray:w.strokeDasharray||[]};return[(t,o,n,i)=>{if(!n?.x||!n?.y)return;const r=i.width,a=i.height,s=null!=b?n.x(b):r/2,l=null!=x?n.y(x):a/2;if(null!=b&&!isFinite(s))return;if(null!=x&&!isFinite(l))return;const c=Math.max(0,Math.min(r,s)),h=Math.max(0,Math.min(a,l)),d=[{config:xe.topLeft,x:0,y:0,w:c,h:h},{config:xe.topRight,x:c,y:0,w:r-c,h:h},{config:xe.bottomLeft,x:0,y:h,w:c,h:a-h},{config:xe.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([])}]},[b,x,xe,w]),Ne=Ro(()=>S?[...Pe,(e,t,o,n)=>{if(!o?.x||!o?.y)return;const i=n.width,r=n.height,a=null!=b?o.x(b):i/2,s=null!=x?o.y(x):r/2;(null==b||isFinite(a))&&(null==x||isFinite(s))&&(e.font=`600 ${C}px sans-serif`,e.globalAlpha=.5,e.fillStyle=xe.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(xe.topLeft.label,8,8),e.fillStyle=xe.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(xe.topRight.label,i-8,8),e.fillStyle=xe.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(xe.bottomLeft.label,8,r-8),e.fillStyle=xe.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(xe.bottomRight.label,i-8,r-8),e.globalAlpha=1)}]:Pe,[Pe,S,C,xe,b,x]),Me=Ro(()=>{const e=T.canvasPreRenderers||[];return[...Ne,...e]},[Ne,T.canvasPreRenderers]),Oe=Ro(()=>{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,n)=>{if(!o?.x||!o?.y)return null;const i=n.width,r=n.height,a=null!=b?o.x(b):i/2,s=null!=x?o.y(x):r/2;if(null!=b&&!isFinite(a))return null;if(null!=x&&!isFinite(s))return null;const l=Math.max(0,Math.min(i,a)),c=Math.max(0,Math.min(r,s));return Mo(Po,{children:[[{config:xe.topLeft,x:0,y:0,w:l,h:c},{config:xe.topRight,x:l,y:0,w:i-l,h:c},{config:xe.bottomLeft,x:0,y:c,w:l,h:r-c},{config:xe.bottomRight,x:l,y:c,w:i-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:i,y2:c,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),S&&Mo(Po,{children:[No("text",{x:8,y:8+C,fill:xe.topLeft.color,fontWeight:600,fontSize:C,opacity:.5,children:xe.topLeft.label}),No("text",{x:i-8,y:8+C,fill:xe.topRight.color,fontWeight:600,fontSize:C,opacity:.5,textAnchor:"end",children:xe.topRight.label}),No("text",{x:8,y:r-8,fill:xe.bottomLeft.color,fontWeight:600,fontSize:C,opacity:.5,children:xe.bottomLeft.label}),No("text",{x:i-8,y:r-8,fill:xe.bottomRight.color,fontWeight:600,fontSize:C,opacity:.5,textAnchor:"end",children:xe.bottomRight.label})]})]})}]},[b,x,xe,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:R||void 0,sizeRange:B,pointStyle:Re,colorScheme:_,size:[se,le],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ae.margin,showAxes:i.showAxes,xLabel:ge,yLabel:be,xFormat:d,yFormat:u,enableHover:ce,showGrid:he,...we&&{xExtent:we.xExtent,yExtent:we.yExtent},...Ae.legendBehaviorProps,...me&&{title:me},...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===M?()=>null:!0===M||void 0===M?Be:W(M)||Be,...f({linkedHover:j,selection:G,onObservation:V,onClick:$,hoverHighlight:X,mobileInteraction:Ae.mobileInteraction,customHoverBehavior:Ae.customHoverBehavior,customClickBehavior:Ae.customClickBehavior}),...O&&{pointIdAccessor:O},...D&&D.length>0&&{annotations:D},canvasPreRenderers:Me,...Ae.crosshairProps,...T,...Me.length>0&&{canvasPreRenderers:Me},svgPreRenderers:Oe};return Fe?No(te,{componentName:"QuadrantChart",message:Fe,width:se,height:le}):No(oe,{componentName:"QuadrantChart",width:se,height:le,children:No(l,{ref:o,...We})})});Wo.displayName="QuadrantChart";import*as Do from"react";import{useMemo as To,useCallback as Eo,forwardRef as Go,useRef as jo,useImperativeHandle as zo}from"react";import{jsx as Vo}from"react/jsx-runtime";var $o="__ma_unitized",Xo="__ma_series";function Qo(e,t){const o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function Yo(e,t){return t[0]+e*(t[1]-t[0])}var Ko=Go(function(e,t){const o=jo(null),i=jo([]),r=jo(e.series);r.current=e.series,zo(t,()=>{const e=()=>(r.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;const n=e(),r=t;for(let e=0;n.length>e&&2>e;e++){const t=n[e],a=t.extent||i.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,[$o]:Qo(s,a),[Xo]:t.label||"Series "+(e+1)})}},pushMany:t=>{if(!o.current)return;const n=e(),r=[];for(const e of t)for(let t=0;n.length>t&&2>t;t++){const o=n[t],a=o.extent||i.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,[$o]:Qo(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=z(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:b=2,tooltip:x,annotations:v,frameProps:A={},selection:k,linkedHover:C,onObservation:L,onClick:_,hoverHighlight:H,chartId:R,loading:B,loadingContent:F,emptyContent:P,legendInteraction:N,legendPosition:M,stroke:O,strokeWidth:D,opacity:T}=e,{width:G,height:j,enableHover:V,showGrid:$,showLegend:X=!0,title:Q,description:Y,summary:U,accessibleTable:q,xLabel:J}=a,Z=To(()=>I(c),[c]),ee=To(()=>I(p),[p]),re=ee,ae=2===ee.length,se=To(()=>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=ie(B,G,j,F),ce=le?null:ne(c,G,j,P),he=K(),de=To(()=>{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 re.map((t,o)=>t.color||e[o%e.length])},[re,y,he]),ue=To(()=>ee.map((e,t)=>e.label||"Series "+(t+1)),[ee]),{unitizedData:me,extents:pe}=To(()=>{if(0===Z.length){const e=ee.map(e=>e.extent||null).filter(Boolean);return e.length===ee.length&&(i.current=e),{unitizedData:[],extents:e.length===ee.length?e:[]}}const e=ee.map(e=>e.extent||function(e,t){let o=1/0,n=-1/0;const i="function"==typeof t?t:e=>e[t];for(const t of e){const e=i(t);null!=e&&isFinite(e)&&(o>e&&(o=e),e>n&&(n=e))}if(!isFinite(o)||!isFinite(n))return[0,1];if(o===n){const e=0===o?1:.1*Math.abs(o);return[o-e,n+e]}return[o,n]}(Z,e.yAccessor));if(i.current=e,!ae){const t=[];for(const e of Z)for(let o=0;ee.length>o;o++){const n=ee[o],i=("function"==typeof n.yAccessor?n.yAccessor:e=>e[n.yAccessor])(e);null!=i&&t.push({...e,[$o]:i,[Xo]:ue[o]})}return{unitizedData:t,extents:e}}const t=[];for(const o of Z)for(let n=0;2>n;n++){const i=ee[n],r=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(o);null!=r&&t.push({...o,[$o]:Qo(r,e[n]),[Xo]:ue[n]})}return{unitizedData:t,extents:e}},[Z,ee,ae,ue]),ye=To(()=>{if(ae&&pe.length>=2)return[{orient:"left",label:ue[0],tickFormat:ee[0].format||(e=>{const t=Yo(e,pe[0]);return Number.isInteger(t)?t+"":t.toFixed(1)})},{orient:"right",label:ue[1],tickFormat:ee[1].format||(e=>{const t=Yo(e,pe[1]);return Number.isInteger(t)?t+"":t.toFixed(1)})},{orient:"bottom"}]},[ae,pe,ee,ue]),fe=To(()=>me.length>0?me:ue.map(e=>({[Xo]:e})),[me,ue]),ge=n({data:fe,rawData:c,colorBy:Xo,colorScheme:de,legendInteraction:N,legendPosition:M,selection:k,linkedHover:C,fallbackFields:[Xo],unwrapData:!1,onObservation:L,onClick:_,hoverHighlight:H,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"MultiAxisLineChart",chartId:R,showLegend:X,legendLayout:se,userMargin:h,marginDefaults:ae?{...a.marginDefaults,left:70,right:70}:a.marginDefaults,loading:B,loadingContent:F,emptyContent:P,width:G,height:j,hasTitle:!!Q,axisChrome:E({showAxes:a.showAxes,xLabel:J})}),be=To(()=>{const e=new Map;return ue.forEach((t,o)=>e.set(t,de[o])),e},[ue,de]),xe=Ve({lineWidth:b,resolveStroke:Eo(e=>be.get(e[Xo])||de[0],[be,de]),stroke:O,strokeWidth:D,opacity:T,effectiveSelectionHook:ge.effectiveSelectionHook,resolvedSelection:ge.resolvedSelection}),ve=To(()=>{if(!1===x)return()=>null;return W(x)||(e=>{const t=e.data||e,o=t[Xo],n=ue.indexOf(o),i=t[$o],r=ae&&n>=0&&pe[n]?Yo(i,pe[n]):i,a=n>=0&&ee[n]?.format?ee[n].format:e=>Number.isInteger(e)?e+"":e.toFixed(2),s="function"==typeof m?m(t):t[m];return Do.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},Do.createElement("div",{style:{fontWeight:600,marginBottom:4,color:de[n]||"inherit"}},o),Do.createElement("div",null,`${"string"==typeof m?m:"x"}: ${s}`),Do.createElement("div",null,`${o}: ${a(r)}`))})},[x,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:$o,groupAccessor:Xo,lineStyle:xe,colorScheme:de,size:[G,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ge.margin,showAxes:a.showAxes,...ye&&{axes:ye},xLabel:J,...ae?{}:{yLabel:ue[0]},xFormat:u,...ae&&we&&{yExtent:we},enableHover:V,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:$,curve:g,...ge.legendBehaviorProps,...Q&&{title:Q},...Y&&{description:Y},...U&&{summary:U},...void 0!==q&&{accessibleTable:q},...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:_,hoverHighlight:H,mobileInteraction:ge.mobileInteraction,customHoverBehavior:ge.customHoverBehavior,customClickBehavior:ge.customClickBehavior}),...ge.crosshairProps,...A,...se&&{legendLayout:se}};return le||ce||(Ae?Vo(te,{componentName:"MultiAxisLineChart",message:Ae,width:G,height:j}):Vo(oe,{componentName:"MultiAxisLineChart",width:G,height:j,children:Vo(l,{ref:o,...ke})}))});Ko.displayName="MultiAxisLineChart";import{useMemo as Uo,forwardRef as qo,useRef as Jo}from"react";import{jsx as Zo}from"react/jsx-runtime";var en=qo(function(e,t){const n=Jo(null);r(t,{variant:"xy",frameRef:n});const i=z(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:x="high",lowAccessor:v="low",openAccessor:A,closeAccessor:w,candlestickStyle:k,tooltip:S,annotations:C,xExtent:L,yExtent:_,frameProps:H={},selection:R,linkedHover:B,onObservation:P,onClick:N,chartId:M,loading:O,loadingContent:W,emptyContent:D}=e,{width:T,height:E,enableHover:G,showGrid:j,title:$,description:X,summary:Q,accessibleTable:Y,xLabel:K,yLabel:U}=i,q=ie(O,T,E,W),J=q?null:ne(a,T,E,D),Z=Uo(()=>I(a),[a]),ee=null==A||null==w;re("CandlestickChart",Z,"xAccessor",p),re("CandlestickChart",Z,"highAccessor",x),re("CandlestickChart",Z,"lowAccessor",v),ee||(re("CandlestickChart",Z,"openAccessor",A),re("CandlestickChart",Z,"closeAccessor",w));const{customHoverBehavior:ae,customClickBehavior:se,crosshairSourceId:le}=V({selection:R,linkedHover:B,onObservation:P,onClick:N,chartType:"CandlestickChart",chartId:M,mobileInteraction:i.mobileInteraction}),ce=F(B,le),he=Uo(()=>{const e=i.marginDefaults,t="sparkline"===i.mode?{...e,top:0,bottom:0}:e;return null==c?t:{...t,...o(c)}},[c,i.marginDefaults,i.mode]),de=Uo(()=>{const e=[{label:K||m(p),accessor:p,role:"x",format:d}];return ee?(e.push({label:"High",accessor:x,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:x,format:u}),e.push({label:"Low",accessor:v,format:u}),e.push({label:"Close",accessor:w,format:u})),g(e)},[p,K,d,u,x,v,A,w,ee]),ue=s({componentName:"CandlestickChart",data:a,accessors:{xAccessor:p,highAccessor:x,lowAccessor:v,...!ee&&{openAccessor:A,closeAccessor:w}}}),me={chartType:"candlestick",...null!=a&&{data:Z},xAccessor:p,yAccessor:x,highAccessor:x,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:i.showAxes,xLabel:K,yLabel:U,xFormat:d,yFormat:u,enableHover:G,showGrid:j,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...y({title:$,description:X,summary:Q,accessibleTable:Y,className:h,animate:e.animate,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...b({tooltip:S,defaultTooltipContent:de}),...f({linkedHover:B,selection:R,onObservation:P,onClick:N,mobileInteraction:i.mobileInteraction,customHoverBehavior:ae,customClickBehavior:se}),...C&&C.length>0&&{annotations:C},...L&&{xExtent:L},..._&&{yExtent:_},...ce,...H};return q||J||(ue?Zo(te,{componentName:"CandlestickChart",message:ue,width:T,height:E}):Zo(oe,{componentName:"CandlestickChart",width:T,height:E,children:Zo(l,{ref:n,...me})}))});en.displayName="CandlestickChart";export{Re as Scatterplot,Oe as ConnectedScatterplot,Qe as LineChart,qe as XYCustomChart,ct as rankBumpData,yt as BumpChart,wt as AreaChart,Ft as DifferenceChart,Wt as StackedAreaChart,zt as Heatmap,Kt as BubbleChart,yo as ScatterplotMatrix,Ho as MinimapChart,Fo as DEFAULT_QUADRANTS,Wo as QuadrantChart,Ko as MultiAxisLineChart,en as CandlestickChart};
|