semiotic 3.13.1 → 3.13.3

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.
Files changed (276) hide show
  1. package/README.md +48 -48
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/dist/mcp-server.js +4 -4
  4. package/ai/reference.md +23 -12
  5. package/ai/schema.json +258 -96
  6. package/ai/surface-manifest.json +1 -1
  7. package/ai/task-packets/compare-category-totals.json +5 -5
  8. package/ai/task-packets/compare-category-totals.md +2 -2
  9. package/ai/task-packets/correct-published-chart.json +5 -5
  10. package/ai/task-packets/correct-published-chart.md +2 -2
  11. package/ai/task-packets/index.json +6 -6
  12. package/ai/task-packets/update-live-chart.json +5 -5
  13. package/ai/task-packets/update-live-chart.md +2 -2
  14. package/dist/c-2YFVDRU4.min.js +1 -0
  15. package/dist/c-4OVDIXAR.min.js +1 -0
  16. package/dist/c-57IIWW46.min.js +1 -0
  17. package/dist/c-5HTUQRJT.min.js +1 -0
  18. package/dist/c-5NAU4JAY.min.js +1 -0
  19. package/dist/c-62UTMRQE.min.js +1 -0
  20. package/dist/c-6QV6F3U7.min.js +1 -0
  21. package/dist/c-73ORHEHO.min.js +1 -0
  22. package/dist/c-7S46KBYD.min.js +2 -0
  23. package/dist/c-AJSS332Z.min.js +2 -0
  24. package/dist/{c-ZWJDTDEV.min.js → c-AMQAAW7G.min.js} +1 -1
  25. package/dist/c-B3X2IJRQ.min.js +1 -0
  26. package/dist/c-BLLDBVFK.min.js +38 -0
  27. package/dist/c-BQWX6NBX.min.js +1 -0
  28. package/dist/c-C7TT4J7K.min.js +1 -0
  29. package/dist/c-CJ5GA7DM.min.js +1 -0
  30. package/dist/c-D7YDFHLY.min.js +1 -0
  31. package/dist/c-DHNROAXY.min.js +1 -0
  32. package/dist/c-DMDFJQU4.min.js +1 -0
  33. package/dist/{c-RAIBDXDV.min.js → c-FRVHZIGR.min.js} +1 -1
  34. package/dist/{c-I54V24WG.min.js → c-HAZCVHI7.min.js} +1 -1
  35. package/dist/c-HN5U72U7.min.js +1 -0
  36. package/dist/c-JA5F7ITS.min.js +1 -0
  37. package/dist/{c-VZNIIKL6.min.js → c-JDI7HKEM.min.js} +1 -1
  38. package/dist/{c-ISHYKYII.min.js → c-JVZRD4GL.min.js} +1 -1
  39. package/dist/{c-HGWITEJI.min.js → c-KJGJEOSV.min.js} +1 -1
  40. package/dist/c-LDGV6TDQ.min.js +1 -0
  41. package/dist/c-LW3GP7RY.min.js +1 -0
  42. package/dist/c-M2TPZE7P.min.js +1 -0
  43. package/dist/{c-XOGN3524.min.js → c-NBBYSAQY.min.js} +2 -2
  44. package/dist/c-OA6RJZ7S.min.js +1 -0
  45. package/dist/c-OBBSIOYU.min.js +1 -0
  46. package/dist/c-OMTJIC3P.min.js +1 -0
  47. package/dist/{c-SQQZPFVY.min.js → c-QPHM7AWW.min.js} +1 -1
  48. package/dist/{c-XZJWL7UL.min.js → c-QSEAAHEU.min.js} +1 -1
  49. package/dist/c-RQWI623R.min.js +1 -0
  50. package/dist/{c-62JIVHK5.min.js → c-RWFADOKS.min.js} +1 -1
  51. package/dist/c-TFESQSWE.min.js +1 -0
  52. package/dist/{c-SDGGMIYI.min.js → c-TJGC5JEM.min.js} +1 -1
  53. package/dist/{c-4P2EM44G.min.js → c-TOXWQRXS.min.js} +3 -3
  54. package/dist/c-TX53234M.min.js +1 -0
  55. package/dist/c-TZBEQ5UY.min.js +1 -0
  56. package/dist/c-UALVQIIJ.min.js +1 -0
  57. package/dist/c-VBDWHTC7.min.js +1 -0
  58. package/dist/c-VBIPDCE7.min.js +1 -0
  59. package/dist/c-WTNRBWZZ.min.js +51 -0
  60. package/dist/{c-3GIPT46Z.min.js → c-XG4LL2VI.min.js} +1 -1
  61. package/dist/c-XPNBS3W2.min.js +1 -0
  62. package/dist/c-XT3G3YWU.min.js +1 -0
  63. package/dist/c-YCBCZFOC.min.js +1 -0
  64. package/dist/c-ZBSL4Y32.min.js +1 -0
  65. package/dist/c-ZP6O6UHV.min.js +1 -0
  66. package/dist/c-ZVL7ULNH.min.js +1 -0
  67. package/dist/components/ChartErrorBoundary.d.ts +5 -1
  68. package/dist/components/ai/intentWeights.d.ts +22 -0
  69. package/dist/components/ai/streamSchema.d.ts +98 -0
  70. package/dist/components/ai/streamingTypes.d.ts +27 -4
  71. package/dist/components/ai/suggestCharts.d.ts +10 -2
  72. package/dist/components/ai/suggestStreamCharts.d.ts +60 -13
  73. package/dist/components/ai/suggestStreamDashboard.d.ts +9 -1
  74. package/dist/components/charts/network/processSankey/frameMargins.d.ts +1 -1
  75. package/dist/components/charts/network/processSankey/labelPlacement.d.ts +1 -1
  76. package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
  77. package/dist/components/charts/realtime/RealtimeAccumulator.d.ts +7 -0
  78. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -2
  79. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +13 -1
  80. package/dist/components/charts/realtime/RealtimeLineChart.types.d.ts +5 -1
  81. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +5 -1
  82. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +7 -1
  83. package/dist/components/charts/realtime/TemporalHistogram.capability.d.ts +5 -3
  84. package/dist/components/charts/realtime/aggregate.d.ts +11 -12
  85. package/dist/components/charts/realtime/defaultRealtimeTooltip.d.ts +9 -0
  86. package/dist/components/charts/realtime/eventTime.d.ts +7 -1
  87. package/dist/components/charts/realtime/useRealtimeLineIngestion.d.ts +13 -0
  88. package/dist/components/charts/shared/ChartError.d.ts +4 -6
  89. package/dist/components/charts/shared/GaugeReadout.d.ts +39 -4
  90. package/dist/components/charts/shared/axisExtent.d.ts +2 -1
  91. package/dist/components/charts/shared/chartMode.d.ts +2 -2
  92. package/dist/components/charts/shared/gaugeLayout.d.ts +69 -0
  93. package/dist/components/charts/shared/types.d.ts +4 -1
  94. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +3 -0
  95. package/dist/components/charts/shared/useStreamStatus.d.ts +2 -2
  96. package/dist/components/charts/shared/withChartErrorBoundary.d.ts +14 -0
  97. package/dist/components/charts/xy/Scatterplot.streamCapability.d.ts +2 -0
  98. package/dist/components/charts/xy/WaterfallChart.d.ts +2 -0
  99. package/dist/components/charts/xy/WaterfallIndex.d.ts +12 -0
  100. package/dist/components/charts/xy/lineGapStrategy.d.ts +15 -3
  101. package/dist/components/legendGeometry.d.ts +148 -0
  102. package/dist/components/legendLayout.d.ts +20 -38
  103. package/dist/components/realtime/ReorderBuffer.d.ts +14 -0
  104. package/dist/components/realtime/SlidingExtent.d.ts +18 -0
  105. package/dist/components/realtime/WindowAccumulator.d.ts +5 -1
  106. package/dist/components/realtime/renderers/types.d.ts +1 -0
  107. package/dist/components/realtime/renderers/waterfallRenderer.d.ts +1 -1
  108. package/dist/components/recipes/atlas/resolution/appearance.d.ts +1 -1
  109. package/dist/components/recipes/atlas/resolution/scene.d.ts +1 -1
  110. package/dist/components/recipes/compositional/edgeRouting.d.ts +9 -0
  111. package/dist/components/recipes/compositional/metrics.d.ts +2 -2
  112. package/dist/components/recipes/compositional/projection.d.ts +3 -1
  113. package/dist/components/recipes/compositional/routing.d.ts +3 -1
  114. package/dist/components/recipes/compositional/testFixtures.d.ts +4 -0
  115. package/dist/components/recipes/compositional/topology.d.ts +2 -0
  116. package/dist/components/recipes/compositional/types.d.ts +10 -1
  117. package/dist/components/recipes/compositional/useCompositionalInterfaces.d.ts +20 -0
  118. package/dist/components/semiotic-ai-core.d.ts +3 -2
  119. package/dist/components/semiotic-ai-stream.d.ts +3 -2
  120. package/dist/components/semiotic-network-zoom.d.ts +1 -1
  121. package/dist/components/semiotic-recipes-react.d.ts +2 -0
  122. package/dist/components/semiotic-utils-core.d.ts +2 -0
  123. package/dist/components/server/serverChartConfigHeatmap.d.ts +13 -0
  124. package/dist/components/server/staticLegend.d.ts +5 -0
  125. package/dist/components/server/staticLegendText.d.ts +13 -0
  126. package/dist/components/server/staticSVGChrome.d.ts +2 -2
  127. package/dist/components/store/ThemeStore.d.ts +4 -1
  128. package/dist/components/store/themeCore.d.ts +2 -0
  129. package/dist/components/stream/DataSourceAdapter.d.ts +15 -62
  130. package/dist/components/stream/FrameRuntime.d.ts +3 -0
  131. package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
  132. package/dist/components/stream/IngestActivity.d.ts +9 -0
  133. package/dist/components/stream/NetworkPipelineStore.d.ts +3 -1
  134. package/dist/components/stream/OrdinalPipelineStore.d.ts +5 -2
  135. package/dist/components/stream/OrdinalSVGOverlay.d.ts +1 -1
  136. package/dist/components/stream/PipelineStore.d.ts +8 -3
  137. package/dist/components/stream/accessibleDataRows.d.ts +1 -0
  138. package/dist/components/stream/axisTickUtils.d.ts +25 -5
  139. package/dist/components/stream/frameDefaultMargins.d.ts +26 -4
  140. package/dist/components/stream/frameKeyboardNavigation.d.ts +8 -1
  141. package/dist/components/stream/geoTypes.d.ts +2 -0
  142. package/dist/components/stream/graphKeyboardNavigation.d.ts +4 -2
  143. package/dist/components/stream/hitTestUtils.d.ts +7 -0
  144. package/dist/components/stream/keyboardNav.d.ts +3 -1
  145. package/dist/components/stream/mediaQuery.d.ts +2 -0
  146. package/dist/components/stream/navigationGraph.d.ts +10 -3
  147. package/dist/components/stream/networkEdgeHitIndex.d.ts +6 -2
  148. package/dist/components/stream/networkFrameKeyboardNavigation.d.ts +2 -0
  149. package/dist/components/stream/networkNavGroups.d.ts +3 -0
  150. package/dist/components/stream/networkPipelineConfig.d.ts +1 -0
  151. package/dist/components/stream/networkSceneTypes.d.ts +10 -0
  152. package/dist/components/stream/networkSpatialNavigation.d.ts +3 -0
  153. package/dist/components/stream/networkTypes.d.ts +2 -0
  154. package/dist/components/stream/networkZoom/ZoomableNetworkCustomChart.d.ts +6 -4
  155. package/dist/components/stream/networkZoom/gestures.d.ts +5 -0
  156. package/dist/components/stream/networkZoom/types.d.ts +10 -0
  157. package/dist/components/stream/ordinalAxisTicks.d.ts +27 -0
  158. package/dist/components/stream/ordinalSceneBuilders/pieScene.d.ts +10 -0
  159. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -0
  160. package/dist/components/stream/ordinalTypes.d.ts +11 -2
  161. package/dist/components/stream/pipelineBufferUtils.d.ts +9 -0
  162. package/dist/components/stream/pipelineConfig.d.ts +7 -0
  163. package/dist/components/stream/pipelineDomainResolution.d.ts +3 -2
  164. package/dist/components/stream/pipelineTransitionTypes.d.ts +3 -5
  165. package/dist/components/stream/pipelineTransitionUtils.d.ts +4 -0
  166. package/dist/components/stream/pipelineTransitions.d.ts +1 -13
  167. package/dist/components/stream/renderers/networkArcRenderer.d.ts +1 -3
  168. package/dist/components/stream/renderers/networkCircleRenderer.d.ts +1 -3
  169. package/dist/components/stream/renderers/networkPrimitiveRenderer.d.ts +5 -0
  170. package/dist/components/stream/renderers/networkRectRenderer.d.ts +1 -3
  171. package/dist/components/stream/renderers/renderPulse.d.ts +8 -14
  172. package/dist/components/stream/roundScaleDomain.d.ts +9 -0
  173. package/dist/components/stream/sceneToSVGShared.d.ts +9 -0
  174. package/dist/components/stream/shallowEqual.d.ts +2 -0
  175. package/dist/components/stream/stalenessBands.d.ts +1 -1
  176. package/dist/components/stream/svgOverlayUtils.d.ts +12 -0
  177. package/dist/components/stream/types.d.ts +10 -2
  178. package/dist/components/stream/useFrame.d.ts +7 -4
  179. package/dist/components/stream/useMediaPreferences.d.ts +1 -4
  180. package/dist/components/stream/useOrdinalFrameHandle.d.ts +4 -14
  181. package/dist/components/stream/useStalenessCheck.d.ts +5 -3
  182. package/dist/components/stream/useStreamingDataHandle.d.ts +24 -0
  183. package/dist/components/stream/useXYFrameHandle.d.ts +4 -14
  184. package/dist/components/stream/xyDateTicks.d.ts +33 -4
  185. package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
  186. package/dist/components/stream/xyPlugins/registry.d.ts +7 -0
  187. package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +11 -2
  188. package/dist/components/stream/xySceneBuilders/types.d.ts +4 -0
  189. package/dist/components/types/legendTypes.d.ts +12 -1
  190. package/dist/geo.min.js +155 -152
  191. package/dist/geo.module.min.js +1 -1
  192. package/dist/network.module.min.js +1 -1
  193. package/dist/ordinal.module.min.js +1 -1
  194. package/dist/physics.module.min.js +1 -1
  195. package/dist/processSankeyLayoutWorker.js +1 -1
  196. package/dist/semiotic-ai-core.d.ts +3 -2
  197. package/dist/semiotic-ai-core.min.js +5 -5
  198. package/dist/semiotic-ai-core.module.min.js +4 -4
  199. package/dist/semiotic-ai.module.min.js +2 -2
  200. package/dist/semiotic-artifact.min.js +6 -6
  201. package/dist/semiotic-artifact.module.min.js +5 -5
  202. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  203. package/dist/semiotic-atlas.module.min.js +1 -1
  204. package/dist/semiotic-client-cjs-shared.min.js +1021 -1024
  205. package/dist/semiotic-client-compositional.module.min.js +1 -1
  206. package/dist/semiotic-client-shared.module.min.js +1 -1
  207. package/dist/semiotic-experimental-auxiliary.module.min.js +2 -2
  208. package/dist/semiotic-experimental-network-resolution-react.module.min.js +1 -1
  209. package/dist/semiotic-experimental-node-auxiliary.module.min.js +3 -3
  210. package/dist/semiotic-line.module.min.js +1 -1
  211. package/dist/semiotic-network-zoom.d.ts +1 -1
  212. package/dist/semiotic-network-zoom.min.js +7 -7
  213. package/dist/semiotic-network-zoom.module.min.js +1 -1
  214. package/dist/semiotic-realtime-core.module.min.js +1 -1
  215. package/dist/semiotic-realtime-react.module.min.js +1 -1
  216. package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
  217. package/dist/semiotic-recipes-core.module.min.js +1 -1
  218. package/dist/semiotic-recipes-react.d.ts +2 -0
  219. package/dist/semiotic-recipes-react.min.js +8 -8
  220. package/dist/semiotic-server-edge-node.module.min.js +3 -3
  221. package/dist/semiotic-server-edge.min.js +399 -397
  222. package/dist/semiotic-server-edge.module.min.js +3 -3
  223. package/dist/semiotic-server-node.min.js +399 -397
  224. package/dist/semiotic-themes-core.min.js +2 -2
  225. package/dist/semiotic-themes-core.module.min.js +1 -1
  226. package/dist/semiotic-themes.min.js +2 -2
  227. package/dist/semiotic-themes.module.min.js +1 -1
  228. package/dist/semiotic-utils-core.d.ts +2 -0
  229. package/dist/semiotic-utils-core.min.js +11 -11
  230. package/dist/semiotic-utils-core.module.min.js +3 -3
  231. package/dist/semiotic-value.module.min.js +1 -1
  232. package/dist/semiotic.module.min.js +1 -1
  233. package/dist/server.min.js +399 -397
  234. package/dist/server.module.min.js +3 -3
  235. package/dist/xy.module.min.js +1 -1
  236. package/package.json +11 -11
  237. package/dist/c-2M2OPWVA.min.js +0 -37
  238. package/dist/c-2N7IU2NY.min.js +0 -1
  239. package/dist/c-3UXQGCQT.min.js +0 -1
  240. package/dist/c-4RVDKSMQ.min.js +0 -1
  241. package/dist/c-4YPPVFZH.min.js +0 -1
  242. package/dist/c-6WJKNYIG.min.js +0 -1
  243. package/dist/c-7UN2WUMI.min.js +0 -1
  244. package/dist/c-AQUX6L2O.min.js +0 -1
  245. package/dist/c-BR5QDUCR.min.js +0 -1
  246. package/dist/c-C3YQVUB6.min.js +0 -1
  247. package/dist/c-COP4OISO.min.js +0 -1
  248. package/dist/c-ENRZPF5E.min.js +0 -1
  249. package/dist/c-FAOZZE77.min.js +0 -1
  250. package/dist/c-HBLICBM6.min.js +0 -1
  251. package/dist/c-I4BEWAKT.min.js +0 -1
  252. package/dist/c-IDCFMBA4.min.js +0 -2
  253. package/dist/c-KLJDKRD5.min.js +0 -1
  254. package/dist/c-LEICSI5V.min.js +0 -1
  255. package/dist/c-MOK4RWNO.min.js +0 -1
  256. package/dist/c-N2TVSOYL.min.js +0 -2
  257. package/dist/c-NHZ2E3CI.min.js +0 -1
  258. package/dist/c-OIJL2WZH.min.js +0 -1
  259. package/dist/c-OSLNYZ3Q.min.js +0 -51
  260. package/dist/c-OWRVBUSL.min.js +0 -1
  261. package/dist/c-QIVKWHDL.min.js +0 -1
  262. package/dist/c-QUAEYF34.min.js +0 -1
  263. package/dist/c-RDFFLRKC.min.js +0 -1
  264. package/dist/c-RTU5425Z.min.js +0 -1
  265. package/dist/c-SIQVOV6A.min.js +0 -1
  266. package/dist/c-SU6Z75M2.min.js +0 -1
  267. package/dist/c-SWVXFUDL.min.js +0 -1
  268. package/dist/c-TC47SNSI.min.js +0 -1
  269. package/dist/c-VLWWXOM5.min.js +0 -1
  270. package/dist/c-VNFIRKU5.min.js +0 -1
  271. package/dist/c-W5ATXREF.min.js +0 -1
  272. package/dist/c-WFX456JK.min.js +0 -5
  273. package/dist/c-WSWMQDFZ.min.js +0 -1
  274. package/dist/c-XORVM6C5.min.js +0 -1
  275. package/dist/c-YGTMWEEF.min.js +0 -1
  276. package/dist/c-ZDCTFRA6.min.js +0 -1
@@ -0,0 +1 @@
1
+ function l(l){return l._pulseIntensity>0}function t(t,e,n,i){if(!l(e))return;let s="w"in e;t.globalAlpha=n*e._pulseIntensity*(s?.3:.35),t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",i?t.fill(i):s?t.fillRect(e.x,e.y,e.w,e.h):t.fill()}function e(t,e,n){if(!l(e))return;let i=e._pulseGlowRadius??4,s=e.r+i*e._pulseIntensity,r=e.cx??e.x??0,u=e.cy??e.y??0;t.beginPath(),t.arc(r,u,s,0,2*Math.PI),t.strokeStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.lineWidth=2*e._pulseIntensity,t.globalAlpha=n*e._pulseIntensity*.6,t.stroke()}export{l as a,t as b,e as c};
@@ -0,0 +1 @@
1
+ import{f as a,g as s,h as i,i as t,j as n,k as o,l as e}from"./c-BQWX6NBX.min.js";export{o as advanceTransition,s as getNodeIdentity,a as joinPathByIdentity,i as resolveMarkOpacity,t as snapshotPositions,n as startTransition,e as xyTransitionEngine};
@@ -0,0 +1 @@
1
+ import{a as t}from"./c-OMTJIC3P.min.js";import{a as e,b as l}from"./c-TX53234M.min.js";import{o,q as a,c as h,t as i}from"./c-JDI7HKEM.min.js";import{area as r,line as s}from"d3-shape";function n(t,e){let l=o(e.curve);if(l&&e.topPath.length>=2&&e.bottomPath.length>=2){let o=r().x(t=>t[0]).y0((t,l)=>e.bottomPath[l][1]).y1(t=>t[1]).curve(l).context(t);t.beginPath(),o(e.topPath)}else{t.beginPath(),t.moveTo(e.topPath[0][0],e.topPath[0][1]);for(let l=1;l<e.topPath.length;l++)t.lineTo(e.topPath[l][0],e.topPath[l][1]);for(let l=e.bottomPath.length-1;l>=0;l--)t.lineTo(e.bottomPath[l][0],e.bottomPath[l][1]);t.closePath()}}function p(t,e){let l=o(e.curve);if(t.beginPath(),l)s().x(t=>t[0]).y(t=>t[1]).curve(l).context(t)(e.topPath);else{t.moveTo(e.topPath[0][0],e.topPath[0][1]);for(let l=1;l<e.topPath.length;l++)t.lineTo(e.topPath[l][0],e.topPath[l][1])}}var P=(o,r,s,P)=>{let f=r.filter(t=>"area"===t.type),c=o.globalAlpha;for(let r of f){if(r.topPath.length<2)continue;let s=!1;r.clipRect&&(o.save(),o.beginPath(),o.rect(r.clipRect.x,r.clipRect.y,r.clipRect.width,r.clipRect.height),o.clip(),s=!0);let f=r._introClipFraction;void 0!==f&&f<1&&(o.save(),o.beginPath(),o.rect(0,0,P.width*f,P.height),o.clip());let g=a(o,r.style.fill,"#4e79a7"),y=c*(r.style.opacity??1),b=y*(r.style.strokeOpacity??1),m=r._decayOpacities,d=!(!r.colorThresholds?.length||!r.rawValues||r.rawValues.length!==r.topPath.length),k=!!r.strokeColorBands?.length;if(m&&m.length===r.topPath.length&&!d&&!k){let t=y*(r.style.fillOpacity??.7);o.fillStyle=g;for(let e=0;e<r.topPath.length-1;e++){let l=.5*(m[e]+m[e+1])*t;o.globalAlpha=l,o.beginPath(),o.moveTo(r.topPath[e][0],r.topPath[e][1]),o.lineTo(r.topPath[e+1][0],r.topPath[e+1][1]),o.lineTo(r.bottomPath[e+1][0],r.bottomPath[e+1][1]),o.lineTo(r.bottomPath[e][0],r.bottomPath[e][1]),o.closePath(),o.fill()}let e=r.style.strokeWidth??2;if(r.style.stroke&&"none"!==r.style.stroke&&e>0){o.strokeStyle=h(o,r.style.stroke)||r.style.stroke,o.lineWidth=e,o.setLineDash([]);for(let t=0;t<r.topPath.length-1;t++){let e=.5*(m[t]+m[t+1]);o.globalAlpha=e*b,o.beginPath(),o.moveTo(r.topPath[t][0],r.topPath[t][1]),o.lineTo(r.topPath[t+1][0],r.topPath[t+1][1]),o.stroke()}}void 0!==f&&f<1&&o.restore(),s&&o.restore(),o.globalAlpha=c;continue}if(n(o,r),r.fillGradient&&r.fillGradient.stops.length>=2&&r.fillGradient){let t=1/0,e=-1/0;if(r.fillGradientSpan)[t,e]=r.fillGradientSpan;else{for(let e of r.topPath)e[1]<t&&(t=e[1]);for(let t of r.bottomPath)t[1]>e&&(e=t[1])}let l="string"==typeof g?g:"#4e79a7",a=i(o,r.fillGradient,l,0,t,0,e);o.fillStyle=a||g,o.globalAlpha=y}else{let t=r.style.fillOpacity??.7;o.globalAlpha=t*y,o.fillStyle=g}o.fill(),e(r)&&(n(o,r),l(o,r,c));let T=r.style.strokeWidth??2;if(r.style.stroke&&"none"!==r.style.stroke&&T>0){o.globalAlpha=b;let e=h(o,r.style.stroke)||r.style.stroke,l=!d&&!k&&r.strokeGradient&&r.topPath.length>=2?i(o,r.strokeGradient,e,r.topPath[0][0],0,r.topPath[r.topPath.length-1][0],0):null;if(o.lineWidth=T,o.setLineDash([]),k){let t=1/0,l=-1/0;for(let[e]of r.topPath)t=Math.min(t,e),l=Math.max(l,e);let a=o.lineWidth;for(let i of r.strokeColorBands){o.save(),o.beginPath(),o.rect(t-a,i.y,l-t+2*a,i.height),o.clip();let s=i.color??e;o.strokeStyle=h(o,s)||s,o.globalAlpha=b*(i.opacity??1),p(o,r),o.stroke(),o.restore()}}else if(d){let l=t(r.topPath,r.rawValues,r.colorThresholds,e);for(let t of l){o.beginPath(),o.strokeStyle=h(o,t.color)||t.color,o.moveTo(t.path[0][0],t.path[0][1]);for(let e=1;e<t.path.length;e++)o.lineTo(t.path[e][0],t.path[e][1]);o.stroke()}}else o.strokeStyle=l||e,p(o,r),o.stroke()}void 0!==f&&f<1&&o.restore(),s&&o.restore(),o.globalAlpha=c}};export{P as a};
@@ -0,0 +1 @@
1
+ function e({isPushMode:e,colorBy:m,colorScheme:y,showLegend:h,legendPosition:p="right",trackCategoryDomain:b=!0,registerLinkedCategories:C=!0}){let[S,P]=c(0),w=r(null!=y),A=t(),v=o(),M=e&&!!m&&(b||v),j="function"==typeof m?u:m,D=d(()=>({lifecycle:{colorByDomainKey:j,isPushMode:e,shouldTrackCategoryDomain:M},categories:new Set,ordered:[]}),[j,e,M]),k=f(e=>{if(!m)return null;let r="function"==typeof m?m(e):e[m];return String(r)},[m]),L=f(e=>{if(!M)return;let r=!1;for(let t of e){if(!t||"object"!=typeof t)continue;let e=k(t);null!=e&&!D.categories.has(e)&&(D.categories.add(e),D.ordered.push(e),r=!0)}r&&P(e=>e+1)},[D,k,M]),B=f(e=>{if(!M)return;let r=Array.from(new Set(e.map(String))),t=D.ordered;t.length===r.length&&t.every((e,t)=>e===r[t])||(D.categories=new Set(r),D.ordered=r,P(e=>e+1))},[D,M]),T=f(e=>r=>{L([r]),e(r)},[L]),_=f(e=>r=>{L(r),e(r)},[L]),x=f(()=>{D.categories=new Set,D.ordered=[],P(e=>e+1)},[D]),E=d(()=>M?[...D.ordered]:[],[D,M,S]);a(C&&e&&m?E:[]);let G=d(()=>{if(!e||!m||!1===h)return;let r=D.ordered;if(0===r.length)return;let t=Array.isArray(y)&&y.length>0||"string"==typeof y&&y.length>0?y:A&&A.length>0?A:i,o="string"==typeof m?m:"__streamCat",a=r.map(e=>({[o]:e})),c=s(a,o,t),d=y&&"object"==typeof y&&!Array.isArray(y)?y:void 0;return n({data:a,colorBy:o,colorScale:e=>(w?g(w,e):void 0)??(d?g(d,e):void 0)??c(e)??"#999",getColor:l})},[e,m,h,y,w,A,S,D]),K=d(()=>{if(G)return"right"===p?{right:110}:"left"===p?{left:110}:"top"===p?{top:50}:"bottom"===p?{bottom:80}:{right:110}},[G,p]);return{wrapPush:T,wrapPushMany:_,resetCategories:x,categories:E,categoryDomainProps:M?{legendCategoryAccessor:m,onCategoriesChange:B}:{},streamingLegend:G,streamingMarginAdjust:K}}import{bf as r,bD as t,bw as o,bv as a,by as n}from"./c-62UTMRQE.min.js";import{p as i,t as s,r as l,s as g}from"./c-WPL6PGP3.min.js";import{useState as c,useMemo as d,useCallback as f}from"react";var u=/*#__PURE__*/Symbol("streaming-function-color-domain");export{e as a};
@@ -0,0 +1 @@
1
+ function t(t,e,a,i){let r=i.current,s=!0===t.lastCustomLayoutFailure?.preservedLastGoodScene,n=!s&&t.hasActivePulsesAt(e),u=!(a||s||!n&&!r)&&t.refreshPulse(e);return i.current=n,{changed:u,pending:n}}function e({customHoverBehavior:t,customClickBehavior:e,onObservation:a,chartId:i,chartType:r}){let s=!(!t&&!a),n=!(!e&&!a),u=k((e,s)=>{t?.(e,s),v({onObservation:a,datum:e?e.data||e:null,x:e?.x,y:e?.y,chartType:r,chartId:i,context:s})},[i,r,t,a]),o=k((t,s)=>{e?.(t,s),z({onObservation:a,datum:t?t.data||t:null,x:t?.x,y:t?.y,chartType:r,chartId:i,context:s})},[i,r,e,a]);return{customHoverBehavior:s?u:void 0,customClickBehavior:n?o:void 0,hasClickBehavior:n}}function a(t){let e=[];for(let a of t)if(null!=a.datum)switch(a.type){case"point":case"symbol":if("point"===a.type?!1===a.interactive:a.size<=0)break;e.push({x:a.x,y:a.y,datum:a.datum,semanticKey:a.pointId,shape:"circle",group:"_default"});break;case"glyph":{if(a.size<=0||null==a.datum)break;let t=S(a.glyph,a.size);e.push({x:a.x+t.centerDx,y:a.y+t.centerDy,datum:a.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"});break}case"line":case"area":{if("area"===a.type&&!1===a.interactive)break;let t="line"===a.type?a.path:a.topPath,i=Array.isArray(a.datum)?a.datum:[],r=a.group??"_default";for(let s=0;s<t.length&&s<i.length;s++)e.push({x:t[s][0],y:t[s][1],datum:i[s],semanticKey:a.pathIds?.[s],shape:"circle",group:r});break}case"rect":{let t=a.datum?.binStart;e.push({x:a.x+a.w/2,y:a.y+a.h/2,datum:a.datum,shape:"rect",w:a.w,h:a.h,semanticKey:"number"==typeof t&&Number.isFinite(t)?JSON.stringify(["bin",a.group??null,t]):void 0,group:a.group??"_default"});break}case"candlestick":{if(null==a.datum)break;let t=a.isRange?a.highY:Math.min(a.openY,a.closeY),i=a.isRange?a.lowY:Math.max(a.openY,a.closeY);e.push({x:a.x,y:(t+i)/2,datum:A(a.datum),shape:"rect",w:a.bodyWidth,h:Math.abs(i-t),group:"_default"});break}case"heatcell":e.push({x:a.x+a.w/2,y:a.y+a.h/2,datum:a.datum,shape:"rect",w:a.w,h:a.h,group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function i(t){let e=[],a=t=>{null==t.readingOrder&&(t.readingOrder=e.length),e.push(t)};for(let i of t)if("rect"===i.type&&null!=i.x){if(null==i.datum)continue;let t=i.datum?.category??"",e=i.datum.__funnelNavGroup??i.group??t,r=i.datum,s=void 0!==r.__aggregateValue?[t,i.group??t]:null!=r.__funnelStep?["funnel",r.__funnelStep,e]:null!=r.__barFunnelStep?["bar-funnel",r.__barFunnelStep,e,r.__barFunnelIsDropoff]:null!=r.bin&&null!=r.count&&Array.isArray(r.range)?["bin",t,...r.range]:void 0;a({x:i.x+i.w/2,y:i.y+i.h/2,datum:i.datum,shape:"rect",w:i.w,h:i.h,semanticKey:s&&JSON.stringify(s),group:e})}else if("point"===i.type||"symbol"===i.type){if(null==i.datum||("point"===i.type?!1===i.interactive:i.size<=0))continue;a({x:i.x,y:i.y,datum:i.datum,shape:"circle",group:"_default"})}else if("glyph"===i.type){if(i.size<=0||null==i.datum)continue;let t=S(i.glyph,i.size);a({x:i.x+t.centerDx,y:i.y+t.centerDy,datum:i.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"})}else if("boxplot"===i.type){if(null==i.datum)continue;let t="vertical"===i.projection;a({x:t?i.x:(i.q1Pos+i.q3Pos)/2,y:t?(i.q1Pos+i.q3Pos)/2:i.y,datum:A(i.datum),shape:"rect",w:t?i.columnWidth:Math.abs(i.q3Pos-i.q1Pos),h:t?Math.abs(i.q3Pos-i.q1Pos):i.columnWidth,semanticKey:null!=i.category?JSON.stringify([i.type,i.category]):void 0,stats:i.stats,category:i.category,group:"_default"})}else if("violin"===i.type&&i.bounds){if(null==i.datum)continue;let{x:t,y:e,width:r,height:s}=i.bounds;a({x:t+r/2,y:e+s/2,datum:A(i.datum),shape:"rect",w:r,h:s,semanticKey:null!=i.category?JSON.stringify([i.type,i.category]):void 0,stats:i.stats,category:i.category,group:"_default"})}else if("trapezoid"===i.type){if(null==i.datum||i.points.length<3)continue;a({x:i.points.reduce((t,e)=>t+e[0],0)/i.points.length,y:i.points.reduce((t,e)=>t+e[1],0)/i.points.length,datum:A(i.datum),shape:"path",pathData:`M${i.points.map(t=>t.join(",")).join("L")}Z`,category:i.category,group:"_default"})}else if("connector"===i.type){if(null==i.datum||(i.style.strokeWidth??1)<=0||"none"===i.style.stroke||i.x1===i.x2&&i.y1===i.y2)continue;a({x:(i.x1+i.x2)/2,y:(i.y1+i.y2)/2,datum:A(i.datum),shape:"path",pathData:`M${i.x1},${i.y1}L${i.x2},${i.y2}`,readingOrder:t.length+e.length,category:i.group,group:i.group??"_default"})}else if("wedge"===i.type&&null!=i.cx){if(null===i.datum)continue;let t=((i.startAngle||0)+(i.endAngle||0))/2,e=((i.innerRadius||0)+(i.outerRadius||50))/2;a({x:i.cx+Math.cos(t)*e,y:i.cy+Math.sin(t)*e,datum:i.datum,shape:"wedge",semanticKey:null!=i.category?JSON.stringify([i.type,i.category]):void 0,category:i.category,readingOrder:i.startAngle,group:"_default"})}return e.sort((t,e)=>t.readingOrder-e.readingOrder||t.x-e.x||t.y-e.y)}function r(t){let e=[];for(let a of t)if("point"===a.type&&null!=a.x&&!1!==a.interactive)e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle"});else if("glyph"===a.type){if(a.size<=0||null==a.datum)continue;let t=S(a.glyph,a.size);e.push({x:a.x+t.centerDx,y:a.y+t.centerDy,datum:a.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight})}else if("line"===a.type){if(null==a.datum||a.path.length<2)continue;let t=a.path.slice(1).map((t,e)=>Math.hypot(t[0]-a.path[e][0],t[1]-a.path[e][1])),i=t.reduce((t,e)=>t+e,0)/2;if(!Number.isFinite(i)||i<=0)continue;for(let r=0;r<t.length;r++){let s=t[r];if(s>0&&i<=s){let t=a.path[r],n=a.path[r+1],u=i/s;e.push({x:t[0]+(n[0]-t[0])*u,y:t[1]+(n[1]-t[1])*u,datum:A(a.datum),shape:"path",pathData:`M${a.path.map(t=>t.join(",")).join("L")}`});break}i-=s}}else"geoarea"===a.type&&a.centroid&&!1!==a.interactive&&e.push({x:a.centroid[0],y:a.centroid[1],datum:a.datum,shape:"geoarea",pathData:a.pathData});return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function s(t){return{data:t.datum||{},...t.stats&&{stats:t.stats},...null!=t.category&&{category:t.category},x:t.x,y:t.y,__semioticHoverData:!0}}function n({decorateHover:t,...e}){return w({...e,extractPoints:a,toHover:(e,a)=>{let i=s({...e,datum:b(e.datum,a.resolvedRibbons)});return t?t(i,a):i}})}function u({chartType:t,dataIdAccessor:e,oAccessor:a,rAccessor:r,...n}){return w({...n,extractPoints:t=>{let a=i(t);if(e)for(let t of a){let a=t.datum;if(a&&"object"==typeof a&&!Array.isArray(a)&&null==t.semanticKey){let i="function"==typeof e?e(a):a[e];null!=i&&(t.semanticKey=JSON.stringify(["datum",i,a.__rIndex??0]))}}return a},navigation:"ordered",toHover:e=>({...s(e),__oAccessor:"string"==typeof a?a:void 0,__rAccessor:"string"==typeof r?r:void 0,__chartType:t})})}function o(t){let e=t.datum;return{...e||{},...e?.properties||{},data:e,properties:e?.properties,x:t.x,y:t.y,__semioticHoverData:!0}}function l(t){return w({...t,extractPoints:r,toHover:o,navigation:"linear"})}function c(t,e,a){let i=t.duration??500,r=a-e;return r>=i?0:1-r/i}function h(t,e,a,i,r,s=(typeof performance<"u"?performance.now():Date.now())){let n=t.color??"rgba(255,255,255,0.6)",u=t.glowRadius??4,o=!1,l=r??(()=>{let t=new Map;for(let e=0;e<a.length;e++)t.set(a[e],e);return t})();for(let a of e){if("line"===a.type)continue;if("area"===a.type){let e=Array.isArray(a.datum)?a.datum:[a.datum],r=0,u=!1;for(let a of e){let e=l.get(a);if(null==e)continue;u=!0;let n=i.get(e);if(null==n)continue;let o=c(t,n,s);o>r&&(r=o)}u&&(o=p(a,r,n)||o);continue}let e=l.get(a.datum);if(null==e)continue;let r=i.get(e);o=p(a,null==r?0:c(t,r,s),n,u)||o}return o}function p(t,e,a,i){let r=!1;return e>0?(t._pulseIntensity!==e&&(t._pulseIntensity=e,r=!0),t._pulseColor!==a&&(t._pulseColor=a,r=!0),t._pulseGlowRadius!==i&&(t._pulseGlowRadius=i,r=!0),r):(0!==t._pulseIntensity&&(t._pulseIntensity=0,r=!0),void 0!==t._pulseColor&&(t._pulseColor=void 0,r=!0),void 0!==t._pulseGlowRadius&&(t._pulseGlowRadius=void 0,r=!0),r)}function y(t,e,a=(typeof performance<"u"?performance.now():Date.now())){if(!e||0===e.size)return!1;let i=t.duration??500,r=e.peek();return null!=r&&a-r<i}function d(t,e,a){e<=t.capacity||(t.resize(e),a&&e>a.capacity&&a.resize(e))}function f(t,e){let a=new O(t.capacity);return t.forEach(()=>a.push(e)),a}function m(t,e,a,i){let r=t.push(e);return a&&a.push(i),r}function g(t,e,a){if(!e||0===e.size)return;let i=new Set;if(t.forEach((t,e)=>{a(t)&&i.add(e)}),0===i.size)return;let r=e.toArray();e.clear();for(let t=0;t<r.length;t++)i.has(t)||e.push(r[t])}function _(t){for(let[e,a]of[["windowSize",t.windowSize],["maxCapacity",t.maxCapacity]])if(void 0===a&&"windowSize"===e||void 0!==a&&(!Number.isSafeInteger(a)||a<1))throw new Error(`${e} must be a positive safe integer`)}function x(t,e,a,i=!1){let r="sliding"===a.windowMode?a.windowSize:Math.min(a.maxCapacity??1e5,Math.max(a.windowSize,t.capacity*(i&&t.full?2:1)));if(r===t.capacity)return[];let s=t.resize(r);return e?.resize(r),s}import{e as b}from"./c-5XCN6BMT.min.js";import{O as w}from"./c-OBBSIOYU.min.js";import{aW as v,aX as z}from"./c-62UTMRQE.min.js";import{b as A}from"./c-ZP6O6UHV.min.js";import{i as S}from"./c-ELGOCAEY.min.js";import{useCallback as k}from"react";var O=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,!Number.isSafeInteger(t)||t<1)throw new Error("RingBuffer capacity must be a positive safe integer");this.buffer=new Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){let e=[];for(let a of t){let t=this.push(a);void 0!==t&&e.push(t)}return e}get(t){if(t<0||t>=this._size)return;let e=(this.head-this._size+t+this._capacity)%this._capacity;return this.buffer[e]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;return{next:()=>t>=this._size?{done:!0,value:void 0}:{done:!1,value:this.get(t++)}}}forEach(t){let e=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;a<this._size;a++)t(this.buffer[(e+a)%this._capacity],a)}toArray(){let t=new Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;a<this._size;a++)t[a]=this.buffer[(e+a)%this._capacity];return t}resize(t){if(!Number.isSafeInteger(t)||t<1)throw new Error("RingBuffer capacity must be a positive safe integer");let e=this.toArray(),a=0,i=[];e.length>t&&(a=e.length-t,i=e.slice(0,a)),this._capacity=t,this.buffer=new Array(t),this.head=0,this._size=0;for(let t=a;t<e.length;t++)this.push(e[t]);return i}update(t,e){let a=[],i=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;r<this._size;r++){let s=(i+r)%this._capacity,n=this.buffer[s];if(t(n)){let t;t="object"!=typeof n||null===n?n:Array.isArray(n)?[...n]:{...n},a.push(t),this.buffer[s]=e(n)}}return a}remove(t){let e=[],a=[];if(this.forEach(i=>{t(i)?a.push(i):e.push(i)}),0===a.length)return a;this.buffer=new Array(this._capacity),this.head=0,this._size=0;for(let t of e)this.push(t);return a}clear(){this.buffer=new Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}};export{O as a,c as b,h as c,p as d,y as e,d as f,f as g,m as h,g as i,_ as j,x as k,t as l,e as m,n,u as o,l as p};
@@ -0,0 +1,51 @@
1
+ import{a as E}from"./c-BWJQSSAD.min.js";import{a as z}from"./c-LBXDHQZG.min.js";import{a as G,b as $,c as j,e as V,d as X}from"./c-JA5F7ITS.min.js";import{a as Y}from"./c-GNTXRXRN.min.js";import{c as Q,a as U}from"./c-HAZCVHI7.min.js";import{e as K}from"./c-YSMCBJOI.min.js";import{c as J,b as q,a as Z}from"./c-DMDFJQU4.min.js";import{a as ee}from"./c-RWFADOKS.min.js";import{b as te,a as oe,d as ie,c as ae,h as re,g as ne}from"./c-ZVL7ULNH.min.js";import{e as le}from"./c-5NAU4JAY.min.js";import{b as se,g as ce,f as he,e as de,c as me,d as ue}from"./c-4OVDIXAR.min.js";import{e as pe,l as ye,m as ge,j as fe}from"./c-AMQAAW7G.min.js";import{k as be,m as xe,i as ve,j as Ae,l as we}from"./c-ZYMXDR42.min.js";import{J as Se,G as ke,R as Ce,S as Le,Q as Re,T as _e,I as He}from"./c-OBBSIOYU.min.js";import{b as Ie}from"./c-363Q2L4Z.min.js";import{bW as Fe,bK as Pe,b as Be,v as De,be as Me,bM as Te,ba as We,aP as Oe,aN as Ne,aS as Ee,aO as ze,x as Ge,bQ as $e,bD as je,aR as Ve,bR as Xe,bd as Ye,bc as Qe,bE as Ue,bI as Ke,bJ as Je,bB as qe,bA as Ze,bi as et,bl as tt,bp as ot,bG as it,at,az as rt,ay as nt,aT as lt,ax as st,bX as ct,bx as ht,bq as dt,bL as mt}from"./c-62UTMRQE.min.js";import{e as ut,f as pt}from"./c-C7TT4J7K.min.js";import{e as yt}from"./c-ZP6O6UHV.min.js";import{u as gt,b as ft,o as bt,v as xt,s as vt,r as At,n as wt,d as St,m as kt}from"./c-WPL6PGP3.min.js";import{c as Ct}from"./c-JDI7HKEM.min.js";import{B as Lt,E as Rt,D as _t,o as Ht,y as It,H as Ft,x as Pt}from"./c-B3X2IJRQ.min.js";import{a as Bt,c as Dt}from"./c-GRTKU3C7.min.js";import*as Mt from"react";import{useRef as Tt,useState as Wt,useCallback as Ot,useMemo as Nt,forwardRef as Et,useImperativeHandle as zt,useEffect as Gt}from"react";import{jsx as $t,Fragment as jt,jsxs as Vt}from"react/jsx-runtime";import{scaleSequential as Xt}from"d3-scale";function Yt(e){let{accessor:t,data:o,isPushMode:i}=e,a=Tt(null),[r,n]=Wt(0),l=Ot(e=>{if(!i||!t)return;let o=!1;for(let i of e){let e="function"==typeof t?t(i):i[t];if(null==e)continue;let r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(a.current?(r<a.current[0]&&(a.current[0]=r,o=!0),r>a.current[1]&&(a.current[1]=r,o=!0)):(a.current=[r,r],o=!0))}o&&n(e=>e+1)},[i,t]),s=Ot(()=>{i&&(a.current=null,n(e=>e+1))},[i]);return{domain:Nt(()=>{if(i)return a.current??void 0;if(!t||0===o.length)return;let e="function"==typeof t?t:e=>e[t],r=1/0,n=-1/0;for(let t of o){let o=e(t);if(null==o)continue;let i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(i<r&&(r=i),i>n&&(n=i))}return Number.isFinite(r)&&Number.isFinite(n)?[r,n]:void 0},[o,t,i,r]),trackPushed:l,reset:s}}function Qt(e,t){return ft(1===t?.5:e/(t-1))}function Ut(e){return e instanceof Date?`date:${e.getTime()}`:`${typeof e}:${String(e)}`}function Kt(e,t){let o=t=>e[Math.max(0,Math.min(e.length-1,Math.round(Number(t))))],i=e.every(e=>"number"==typeof e||e instanceof Date),a=t?void 0:Jt(e);return(r,n,l)=>{if(0===e.length)return"";let s=o(r);return t?t(s,n,l&&i?l.map(e=>Number(o(e).valueOf())):void 0):s instanceof Date&&a?a(s):String(s)}}function Jt(e){let t=e.filter(e=>e instanceof Date&&Number.isFinite(e.valueOf()));if(0===t.length)return;let o=t.every(e=>e.valueOf()%864e5==0),i=o&&t.every(e=>1===e.getUTCDate());if(i&&t.every(e=>0===e.getUTCMonth()))return e=>String(e.getUTCFullYear());if(i)return e=>`${me(e).split(" ")[0]} ${e.getUTCFullYear()}`;let a=t.map(e=>e.valueOf()),r=Bt(a);if(o){let e=new Date(r[0]).getUTCFullYear()===new Date(r[1]).getUTCFullYear();return t=>e?me(t):`${me(t)}, ${t.getUTCFullYear()}`}return ue(r)}function qt(e,t,o){return"function"==typeof e?e(t,o):t[e]}function Zt(e,t){if(!e?.length)return;let o=new Map(t.map((e,t)=>[Ut(e),t]));return e.map(e=>{let t={...e},i=i=>{if(!(i in e))return;let a=o.get(Ut(e[i]));void 0!==a&&(t[i]=a)};return i("x"),i("x0"),i("x1"),"string"==typeof e.type&&("x-threshold"===e.type||"x"===e.type)&&i("value"),t})}function eo(e){let t="number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN;return Number.isFinite(t)?Math.max(0,Math.floor(t)):void 0}function to(e){return"string"==typeof e&&""!==e.trim()?e:void 0}function oo(e){let{seriesOrder:t,overallOrder:o,highlightTop:i,color:a,colorScheme:r,neutralColor:n,themeCategorical:l,themeNeutral:s}=e;if(null==i&&null==a)return r;let c="string"==typeof r?[...bt(r,l)]:r,h=null==i?o.length:Math.max(0,Math.floor(i)),d=new Set(o.slice(0,h)),m= new Map,u={};for(let e of t)Object.defineProperty(u,e,{configurable:!0,enumerable:!0,writable:!0,value:a??(d.has(e)?xt(void 0,l,c,e,m):n??s??"#b8bec8")});return u}function io(e,t={}){let o=t.xAccessor??"x",a=t.yAccessor??"y",r=t.lineBy??"series",n=t.rankDirection??"descending",l=[],s= new Map,c= new Map,h=[],d= new Map,m=1/0,u=-1/0;e.forEach((e,t)=>{let i=qt(o,e,t),n=Ut(i),p=s.get(n);null==p&&(p=l.length,s.set(n,p),l.push(i),c.set(p,[]));let y=String(qt(r,e,t));d.has(y)||(d.set(y,h.length),h.push(y));let g=Number(qt(a,e,t));Number.isFinite(g)&&(m=Math.min(m,g),u=Math.max(u,g),c.get(p)?.push({datum:e,inputIndex:t,series:y,value:g}))});let p=[],y= new Map,g= new Map;for(let e=0;e<l.length;e++){let t=c.get(e)??[];t.sort((e,t)=>("descending"===n?t.value-e.value:e.value-t.value)||(d.get(e.series)??0)-(d.get(t.series)??0)),t.forEach((t,o)=>{let i=o+1;p.push({datum:t.datum,xIndex:e,xValue:l[e],series:t.series,value:t.value,rank:i}),y.set(t.series,(y.get(t.series)??0)+i),g.set(t.series,(g.get(t.series)??0)+1)})}let f=h.length+1,b=[...h].sort((e,t)=>{let o=g.get(e)??0,i=g.get(t)??0;return((y.get(e)??0)+(l.length-o)*f)/Math.max(1,l.length)-((y.get(t)??0)+(l.length-i)*f)/Math.max(1,l.length)||(d.get(e)??0)-(d.get(t)??0)}),x=null==t.highlightTop?b.length:Math.max(0,Math.floor(t.highlightTop)),v=new Set(b.slice(0,x));return{data:p.map(e=>{let t=v.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:i,__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:l,seriesOrder:h,overallOrder:b,valueExtent:m===1/0?[0,0]:[m,u]}}function ao({tooltip:e,xValues:t,xFormat:o,yFormat:i}){let a=Nt(()=>Kt(t,o),[o,t]),r=Ot(e=>i?i(e):e.toLocaleString(),[i]),n=Ne(e),l=Nt(()=>n?void 0:Ee(e),[n,e]),s=Ot(t=>{let o=t?.data??t;return o&&!1!==e?l?l({...t,data:o.__bumpRaw,__semioticHoverData:!0}): Vt(Lt,{children:[
2
+ $t("div",{style:{fontWeight:700},children:o.__bumpSeries}),
3
+ Vt("div",{children:[a(o.x)," · Rank ",o.__bumpRank]}),
4
+ Vt("div",{children:["Value: ",r(o.__bumpValue)]})]}):null},[r,a,l,e]),c=Ot(t=>{let o=(Array.isArray(t.allSeries)?t.allSeries:[]).map(e=>{let t=e.datum;return{...e,value:t?.__bumpValue??e.value,rank:t?.__bumpRank,datum:t?.__bumpRaw??e.datum}}),i=t?.data??t,n={...i?.__bumpRaw??{},xValue:i?.__bumpXValue??t.xValue,allSeries:o};if(ze(e)&&"function"==typeof e.content)return e.content(n);let l=t.xValue??i?.x;
5
+ return Vt(Lt,{children:[null!=l&& $t("div",{style:{fontWeight:700,marginBottom:4},children:a(l)}),o.map((e,t)=> Vt("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
6
+ $t("span",{style:{width:8,height:8,borderRadius:"50%",background:e.color,flexShrink:0}}),
7
+ $t("span",{style:{flex:1},children:e.group}),
8
+ Vt("span",{children:[null!=e.rank?`Rank ${e.rank} · `:"",r(e.value)]})]},`${e.group}-${t}`))]})},[r,a,e]);return{tooltip:Nt(()=>{if(!1===e)return!1;let t=n?c:s,o=(n?ze(e)&&Rt(e.content):Rt(l))?_t(t):t;return n?{mode:"multi",content:o,chrome:ze(e)?e.chrome:void 0}:o},[n,c,l,s,e]),formatX:a}}function ro(e,t,o,i,a){let r=1-a;return r*r*r*e+3*r*r*a*t+3*r*a*a*o+a*a*a*i}function no(e,t,o,i,a){let r=1-a;return 3*r*r*(t-e)+6*r*a*(o-t)+3*a*a*(i-o)}function lo(e,t,o,i,a){let r=[],n=(e.x+t.x)/2;for(let l=0;l<=a;l++){let s,c,h,d,m=l/a;"linear"===i?(s=e.x+(t.x-e.x)*m,c=e.y+(t.y-e.y)*m,h=t.x-e.x,d=t.y-e.y):(s=ro(e.x,n,n,t.x,m),c=ro(e.y,e.y,t.y,t.y,m),h=no(e.x,n,n,t.x,m),d=no(e.y,e.y,t.y,t.y,m)),r.push({x:s,y:c,dx:h,dy:d,radius:e.radius+(t.radius-e.radius)*m,datumIndex:m<.5?o:o+1})}return r}function so(e,t){let o=e.length-1,i=Math.sign(e[o][0]-e[t][0])||1,a=i*e[o][0],r=i*e[t][0];for(let n=t+1;n<o;n++){let t=Math.max(r,Math.min(a,i*e[n][0]));e[n][0]=i*t,r=t}for(let i=t;i<o;i++){let t=i;for(;t<o&&e[t+1][0]===e[i][0];)t++;for(let o=i+1;o<t;o++)e[o][1]=e[i][1]+(e[t][1]-e[i][1])*(o-i)/(t-i);i=t}let n=1e-6*(a-i*e[t][0])/(o-t);r=i*e[t][0];for(let l=t+1;l<o;l++){let t=Math.max(r+n,Math.min(i*e[l][0],a-(o-l)*n));e[l][0]=i*t,r=t}}function co(e,t={}){let o=[],i=[],a=[];if(e.length<2)return{topPath:o,bottomPath:i,datumIndices:a};let r=t.curve??"smooth",n=Math.max(2,Math.floor(t.samplesPerSegment??12));for(let t=0;t<e.length-1;t++){let l=Math.max(0,o.length-1),s=lo(e[t],e[t+1],t,r,n);for(let e=0===t?0:1;e<s.length;e++){let t=s[e],r=Math.hypot(t.dx,t.dy)||1,n=-t.dy/r,l=t.dx/r,c=Math.max(0,t.radius);o.push([t.x+n*c,t.y+l*c]),i.push([t.x-n*c,t.y-l*c]),a.push(t.datumIndex)}so(o,l),so(i,l)}return{topPath:o,bottomPath:i,datumIndices:a}}function ho(e,t){let o=0;for(let t of e)o+=(t.codePointAt(0)??0)>=11904?c:h.find(([e])=>e.test(t))?.[1]??(t.toLowerCase()!==t?d:m);return o*t*u}function mo(e){let t=e.fontSize??12,o=!0===e.showLabels?"end":e.showLabels,i="end"===o||"both"===o||"auto"===o,c="start"===o||"both"===o,h=e.labels.reduce((e,o)=>Math.max(e,ho(o,t)),0),d=Math.round(e.width*(e.maxSideFraction??.38)),m=ho(String(Math.max(1,e.rankCount)),t),u=e.showAxes?r+m+s:r,p=e.showAxes&&e.yLabel?l:0,y={start:u+n+p,end:r+n},g=e.legendSide?Ge({legendGroups:[{label:"",styleFn:()=>({}),items:e.labels.map(e=>({label:e}))}]},{sideGutter:0}):0,f=ho("MMM",t),b=(t,o)=>Math.min(o+h,e.legendSide===t?Math.max(o+f,d-g):d),x={start:c?b("left",y.start):0,end:i?b("right",y.end):0},v=!1===e.showLabels?24:110;return{margin:{...a,right:Math.max(v,x.end),left:Math.max(a.left,x.start)},startLabelOffset:u,chrome:y,room:x,labelWidth:h,fontSize:t,hasStart:c,hasEnd:i}}function uo(e,t){let o={start:t.hasStart?Math.max(0,Math.min(e.left,t.room.start)-t.chrome.start):0,end:t.hasEnd?Math.max(0,Math.min(e.right,t.room.end)-t.chrome.end):0};return{budget:o,sideGutter:{...t.hasStart&&{left:t.chrome.start+Math.min(o.start,t.labelWidth)},...t.hasEnd&&{right:t.chrome.end+Math.min(o.end,t.labelWidth)}}}}function po(e,t,o){if(ho(e,o)<=t)return{text:e,truncated:!1};let i=Array.from(e),a=i.length-1;for(;a>0&&ho(`${i.slice(0,a).join("")}…`,o)>t;)a--;return{text:`${i.slice(0,a).join("").trimEnd()}…`,truncated:!0}}function yo(e,t,o,i){let a=Math.max(1,Math.floor(t/18)),r="auto"===o?Number.isFinite(i)&&(i??0)>=0?Math.min(a,Math.floor(i)):a:1/0,n=e.map((e,t)=>({candidate:e,index:t})).sort((e,t)=>{let o=e.candidate.priority??0;return(t.candidate.priority??0)-o||Number(t.candidate.highlighted)-Number(e.candidate.highlighted)||e.candidate.rank-t.candidate.rank||e.index-t.index}),l=[];for(let{candidate:e}of n){if(l.length>=r)break;l.some(t=>t.side===e.side&&Math.abs(t.y-e.y)<14)||l.push(e)}return new Set(l.map(e=>e.id))}function go({datum:e,x:t,y:o,side:i,color:a,highlighted:r,labelStyle:n,offset:l,budget:s,fontSize:c}){let h=Ie(),d=h.isActive&&!h.predicate(e),m="function"==typeof n?n(e.__bumpRaw):n,u=null==s?{text:e.__bumpSeries,truncated:!1}:po(e.__bumpSeries,s,c);
9
+ return Vt("text",{className:"semiotic-bump-label",x:t+("end"===i?l:-l),y:o,dy:"0.35em",textAnchor:"end"===i?"start":"end",fill:a,fillOpacity:d?.16:1,fontWeight:r?650:450,fontSize:12,style:{pointerEvents:"none",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-axis-label-font-size, 12px)",...m},children:[u.truncated&& $t("title",{children:e.__bumpSeries}),u.text]})}function fo(e){let t=Array.isArray(e.datum)?e.datum[0]:e.datum;return t&&"object"==typeof t&&"__bumpSeries"in t?t:void 0}function bo(e,t,o){let[i,a]=t,[r,n]=o;return a===i?(r+n)/2:r+(n-r)*Math.max(0,Math.min(1,(e-i)/(a-i)))}function xo(e){let t=e.__bumpXValue instanceof Date?e.__bumpXValue.getTime():Number(e.__bumpXValue);return{value:e.__bumpValue,x:Number.isFinite(t)?t:void 0,y:e.__bumpValue,category:e.__bumpSeries}}function vo(e){let t=e.config,o= new Map;for(let t of e.data){let e=o.get(t.__bumpSeries)??[];e.push(t),o.set(t.__bumpSeries,e)}let i=t.seriesOrder.filter(e=>o.has(e)).sort((e,i)=>(o.get(e)?.[0]?.__bumpHighlighted?1:0)-(o.get(i)?.[0]?.__bumpHighlighted?1:0)||t.seriesOrder.indexOf(e)-t.seriesOrder.indexOf(i)),a=[],r=[],n=[];for(let r of i){let i=(o.get(r)??[]).sort((e,t)=>e.x-t.x);if(i.length<2)continue;let l=i[0].__bumpHighlighted,s=(t.colorMap&&vt(t.colorMap,r))??e.resolveColor(i[0].__bumpSeries,i[0]),c=t.color??(l?s:t.neutralColor??e.theme.semantic.textSecondary??e.theme.semantic.border??s),h=i.map(o=>({x:e.scales.x(o.x),y:e.scales.y(o.y),radius:t.ribbon?bo(o.__bumpValue,t.valueExtent,t.ribbonSizeRange)/2:Math.max(.5,t.lineWidth/2)})),d=co(h,{curve:t.curve,samplesPerSegment:t.samplesPerSegment}),m={fill:c,fillOpacity:1,opacity:l?t.ribbon?t.ribbonOpacity:t.lineOpacity:Math.min(t.ribbon?t.ribbonOpacity:t.lineOpacity,.58)};t.styleRules?.length&&Object.assign(m,$e(i[0].__bumpRaw,t.styleRules,xo(i[0]))),t.areaStyle&&Object.assign(m,t.areaStyle(i[0].__bumpRaw)??{}),void 0!==t.stroke&&(m.stroke=t.stroke),void 0!==t.strokeWidth&&(m.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(m.opacity=t.opacity),a.push({type:"area",topPath:d.topPath,bottomPath:d.bottomPath,_hitArea:!0,style:m,datum:d.datumIndices.map(e=>i[e]),accessibleDatum:i.map(e=>e.__bumpRaw),accessibility:{label:`${r} ranking trajectory`,tableFields:i.map(e=>e.__bumpRaw)},group:r,interactive:!0}),t.showPoints&&i.forEach((e,o)=>{let i={fill:c,stroke:"none",opacity:l?1:.75};t.styleRules?.length&&Object.assign(i,$e(e.__bumpRaw,t.styleRules,xo(e))),t.pointStyle&&Object.assign(i,t.pointStyle(e.__bumpRaw)??{}),void 0!==t.stroke&&(i.stroke=t.stroke),void 0!==t.strokeWidth&&(i.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(i.opacity=t.opacity),a.push({type:"point",x:h[o].x,y:h[o].y,r:i.r??t.pointRadius,style:i,datum:e,accessibleDatum:e.__bumpRaw,accessibility:{label:`${r}, rank ${e.__bumpRank}, value ${e.__bumpValue}`},pointId:`${r}:${e.x}`})});let u=!0===t.showLabels?"end":t.showLabels,p=(e,o,i)=>{let a=null==t.labelPriorityAccessor?void 0:"function"==typeof t.labelPriorityAccessor?t.labelPriorityAccessor(e.__bumpRaw):Number(e.__bumpRaw[t.labelPriorityAccessor]);n.push({id:`${r}\0${i}`,datum:e,x:h[o].x,y:h[o].y,side:i,rank:e.__bumpRank,highlighted:l,priority:Number.isFinite(a)?a:void 0,color:"string"==typeof m.fill?m.fill:c})};("start"===u||"both"===u)&&p(i[0],0,"start"),("end"===u||"both"===u||"auto"===u)&&p(i.at(-1),i.length-1,"end")}let l=!0===t.showLabels?"end":t.showLabels,s=yo(n,e.dimensions.plot.height,"auto"!==l||"auto",t.maxLabels);for(let e of n)s.has(e.id)&&r.push(
10
+ $t(go,{datum:e.datum,x:e.x,y:e.y,side:e.side,color:e.color,highlighted:e.highlighted,labelStyle:t.labelStyle,offset:"end"===e.side?8:t.startLabelOffset??8,budget:t.labelBudget?.[e.side],fontSize:t.labelFontSize??12},e.id));return{nodes:a,overlays:r.length? $t("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{let o=fo(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}function Ao({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];let a,r=void 0!==t[0]?.[i];if(!r&&!o)return t;if(r)a=t;else{let e=t.reduce((e,t)=>{let a="function"==typeof o?o(t):t[o],r=String(a);if(!e[r]){let t={[i]:[]};"string"==typeof o&&(t[o]=a),e[r]=t}return e[r][i].push(t),e},{});a=Object.values(e)}return a.flatMap(e=>{let t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}function wo(e){let{safeData:t,data:o,areaBy:i,lineDataAccessor:a,colorBy:r,colorScale:n,color:l,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:d,resolvedSelection:m,areaOpacity:u,showLine:p,lineWidth:y,showPoints:g,pointRadius:f,xAccessor:b,yAccessor:x,xLabel:v,yLabel:A,xFormat:w,yFormat:S,groupField:k,styleRules:C,ruleContext:L}=e,R=Nt(()=>Ao({data:o,safeData:t,areaBy:i,lineDataAccessor:a}),[o,t,i,a]),_=Nt(()=>e=>{let t={};if(r){if(n){let o=At(e,r,n);t.fill=o,p?(t.stroke=o,t.strokeWidth=y):t.stroke="none"}}else{let e=l||wt;t.fill=e,p?(t.stroke=e,t.strokeWidth=y):t.stroke="none"}return t.fillOpacity=u,C&&C.length>0&&Object.assign(t,$e(e,C,L?L(e):{value:void 0})),t},[r,n,l,u,p,y,C,L]),H=Nt(()=>_e(_,{stroke:s,strokeWidth:c,opacity:h}),[_,s,c,h]),I=Nt(()=>pt(H,d??null,m),[H,d,m]),F=Nt(()=>{if(g)return e=>{let t={r:f,fillOpacity:1};return r?n&&(t.fill=At(e.parentLine||e,r,n)):t.fill=l||wt,t}},[g,f,r,n,l]);return{flattenedData:R,lineStyle:I,pointStyle:F,defaultTooltipContent:Nt(()=>Se([{label:v||ke(b),accessor:b,role:"x",format:w},{label:A||ke(x),accessor:x,role:"y",format:S},...k?[{label:ke(k),accessor:k,role:"group"}]:[],...He(e.band,S)]),[b,x,v,A,k,w,S,e.band])}}function So(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[],n=0,l=null,s=null,c=[],h=(e,t)=>e>t?"A":t>e?"B":null,d=e=>`seg-${n}-${e}`,m=e=>r.push(e),u=(e,t)=>{m({__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;e<a.length;e++){let r=a[e],p=t(r),y=o(r),g=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(g))continue;let f=h(y,g);if(null!==f){if(null==l){l=f;for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f};continue}if(s&&s.w!==f){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{let o=y-s.a-(g-s.b);if(0!==o){let i=(s.b-s.a)/o,a=Math.max(0,Math.min(1,i));e=s.x+a*(p-s.x),t=s.a+a*(y-s.a)}else e=s.x,t=s.a}m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t}),n++,l=f,m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t});for(let e=1;e<c.length;e++)u(c[e],l)}else for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f}}else c.push({x:p,y:y,datum:r})}for(let e of c)u(e,l??"A");return r}function ko(e){if("A"===e.__diffWinner||"B"===e.__diffWinner)return e.__diffWinner;let t=String(e.__diffSegment??"");return"line-A"===t||t.endsWith("-A")?"A":"B"}function Co(e,t){return Xe(e,t,e=>{let t=Number(e.__x),o=Number(e.__y);return{value:Number.isFinite(o)?o:void 0,x:Number.isFinite(t)?t:void 0,y:Number.isFinite(o)?o:void 0,category:ko(e)}},e=>e.__sourceDatum?{...e.__sourceDatum,...e}:e)}function Lo(e){let{seriesAColor:t,seriesBColor:o,areaOpacity:i,styleRules:a}=e;return Co(e=>({fill:"A"===ko(e)?t:o,stroke:"none",fillOpacity:i}),a)}function Ro(e){let{seriesAColor:t,seriesBColor:o,lineWidth:i,styleRules:a}=e;return Co(e=>({stroke:"A"===ko(e)?t:o,strokeWidth:i,fill:"none"}),a)}function _o(e){let{seriesAColor:t,seriesBColor:o,pointRadius:i,styleRules:a}=e;return Co(e=>({fill:"A"===ko(e)?t:o,r:i}),a)}function Ho(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;let t=+e;return Number.isFinite(t)?t:NaN}return NaN}function Io(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(let e of a){let a=t(e),n=o(e),l=i(e);Number.isFinite(n)&&r.push({__x:a,__y:n,__diffSegment:"line-A",__diffWinner:"A",__sourceDatum:e}),Number.isFinite(l)&&r.push({__x:a,__y:l,__diffSegment:"line-B",__diffWinner:"B",__sourceDatum:e})}return r}function Fo(e){let[t,o]=Mt.useState(()=>w);return Mt.useEffect(()=>{if(t)return;let e=!1;return(w?Promise.resolve(w):(S||(S=import("./c-HPT33CWH.min.js").then(e=>w=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw S=null,e})),S)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? $t(t,{...e}):null}function Po({data:e,xField:t,yField:o,fieldLabels:i,cellSize:a,pointRadius:r,pointOpacity:n,styleRules:l,colorBy:s,colorScale:c,brushSelectionName:h,hoverSelectionName:d,unselectedOpacity:m,showGrid:u,maxDevicePixelRatio:p,mobileInteraction:y,mode:g,onPointHover:f,onPointClick:b}){pe(te);let x=Tt(null),v=et({name:h,clientId:`splom-${t}-${o}`,fields:[t,o]}),A=tt({name:h,xField:t,yField:o}),w=et({name:d,clientId:C,fields:[k]}),S=w.selectPoints,R=Ot(e=>{e?A.brushInteraction.during(e):A.brushInteraction.end(null)},[A.brushInteraction]),_=Ot(e=>{if(!e)return void f?.(null);let t=e.data,o=t?.[k];void 0!==o&&(S({[k]:[o]}),f?.(t,e.x+L.left,e.y+L.top))},[S,f]),H=Ot(e=>{if(!e)return void b?.(null);let t=e.data;t&&b?.(t,e.x+L.left,e.y+L.top)},[b]),I=Nt(()=>Te(t,o),[t,o]),F=Nt(()=>Xe(e=>({opacity:n,r:r,fill:s?At(e,s,c):wt}),l,I),[n,r,s,c,l,I]),P=Ot(e=>{let t={...F(e)};return"hover"===g?w.isActive&&w.predicate(e)?(t.opacity=1,t.r=2.5*r,t.stroke="#333",t.strokeWidth=1.5):w.isActive&&(t.opacity=.6*("number"==typeof t.opacity?t.opacity:n)):v.isActive&&!v.predicate(e)&&(t.opacity=m),t},[F,g,w,v,m,r,n]);
11
+ return Vt("div",{style:{position:"relative",width:a,height:a},children:[
12
+ $t(he,{ref:x,chartType:"scatter",data:e,size:[a,a],xAccessor:t,yAccessor:o,pointStyle:P,margin:L,showAxes:!1,maxDevicePixelRatio:p,enableHover:"hover"===g,accessibleTable:!1,description:`${vt(i,t)??t} versus ${vt(i,o)??o} scatterplot`,...Ce({forceHoverBehavior:"hover"===g,forceClickBehavior:!!b,mobileInteraction:y,customHoverBehavior:_,customClickBehavior:H}),tooltipContent:"hover"===g?()=>null:void 0}),"brush"===g&& $t(Fo,{frameRef:x,cellSize:a,onBrush:R})]})}function Bo({data:e,field:t,label:o,cellSize:i,bins:a,colorBy:r,colorScale:n,brushSelectionName:l,hoverSelectionName:s,unselectedOpacity:c,mode:h}){let d=et({name:l,clientId:`splom-diag-${t}`,fields:[t]}),m=et({name:s,clientId:`splom-diag-${t}-hover`,fields:[k]}),u="hover"===h?m:d,p=u.isActive,y=u.predicate,g=Nt(()=>{let o="string"==typeof r?r:null,n=[],l= new Set;for(let i of e){let e=i[t];if(null!=e&&!isNaN(e)&&n.push(Number(e)),o){let e=i[o];null!=e&&l.add(String(e))}}if(0===n.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};let[s,c]=Bt(n),h=(c-s)/a||1,d=Array.from(l),m=new Map(d.map((e,t)=>[e,t])),u=new Array(a).fill(0),g=new Array(a).fill(0),f=Array.from({length:a},()=>new Array(d.length).fill(0)),b=Array.from({length:a},()=>new Array(d.length).fill(0));for(let i of e){let e=i[t];if(null==e||isNaN(e))continue;let r=Math.min(Math.floor((e-s)/h),a-1);if(u[r]++,(!p||y(i))&&g[r]++,o){let e=m.get(String(i[o]));void 0!==e&&(f[r][e]++,(!p||y(i))&&b[r][e]++)}}let x=Dt(u,1),v=f.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})}),A=b.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})});return{bars:u.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),selectedBars:g.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:x,categories:d}},[e,t,a,i,p,y,r]);
13
+ return Vt("svg",{width:i,height:i,style:{overflow:"hidden"},children:[
14
+ $t("text",{x:i/2,y:14,textAnchor:"middle",fontSize:11,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:o}),g.categories.length>0?g.categoryBars.map((e,t)=>e.map((e,o)=> $t("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:n?n(e.category):wt,opacity:p?.3:.6},`bg-${t}-${o}`))):g.bars.map((e,t)=> $t("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:wt,opacity:p?.3:.6},`bg-${t}`)),p&&(g.categories.length>0?g.selectedCategoryBars.map((e,t)=>e.map((e,o)=> $t("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:n?n(e.category):wt,opacity:.7},`sel-${t}-${o}`))):g.selectedBars.map((e,t)=> $t("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:wt,opacity:.7},`sel-${t}`)))]})}function Do({label:e,cellSize:t}){
15
+ return $t("svg",{width:t,height:t,children: $t("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})})}function Mo(e){let{data:t,fields:o,fieldLabels:i={},colorBy:a,colorScheme:r,cellSize:n=A.cellSize,cellGap:l=A.cellGap,pointRadius:s=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:d=20,brushMode:m="crossfilter",hoverMode:u=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:g,tooltip:f,showLegend:b,idAccessor:x,styleRules:v,width:w,height:S,className:C,title:L,description:R,summary:_,accessibleTable:H=!0,onObservation:I,onClick:F,chartId:P}=e,B="splom",D="splom-hover",M=ot(e.mobileInteraction,{mode:e.mode,width:w??o.length*n,mobileSemantics:e.mobileSemantics}),T=u?"hover":m?"brush":"hover",W=Ft(e=>e.clearSelection),[O,N]=Wt(null),E=Ot(()=>{W(D),N(null)},[W,D]),z=Nt(()=>(t||[]).map((e,t)=>void 0!==e[k]?e:{...e,[k]:t}),[t]),G=it(z,a,r),$=`${Mt.useId().replace(/:/g,"")}-data-table`,j=Nt(()=>(t||[]).map(e=>({type:"point",datum:e})),[t]),V=Nt(()=>Ee(f),[f]),X=(o.length,A.labelWidth),Y=Ot((e,t,o,i)=>[X+l+e*(n+l)+(o??0),t*(n+l)+(i??0)],[X,n,l]),Q=void 0!==b?b:!!a,U=Nt(()=>{if(!Q||!a)return null;let e="string"==typeof a?a:null;return e?Array.from(new Set(z.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:String(e),color:G?G(String(e)):wt})):null},[Q,a,z,G]),K=Nt(()=>({display:"grid",gridTemplateColumns:`${X}px ${o.map(()=>`${n}px`).join(" ")}`,gridTemplateRows:`${o.map(()=>`${n}px`).join(" ")} ${X}px`,gap:`${l}px`,width:"fit-content"}),[o,n,l,X]);
16
+ return Vt("div",{className:C,style:{position:"relative",color:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)"},role:"group","aria-label":R||L||`Scatterplot matrix comparing ${o.length} fields`,children:[L&& $t("div",{className:"semiotic-chart-title",style:{fontWeight:600,marginBottom:8},children:L}),H&& $t(at,{accessibleTable:H,children: $t(rt,{tableId:$})}),
17
+ $t(nt,{summary:_}),U&& $t("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:U.map(e=> Vt("div",{style:{display:"flex",alignItems:"center",gap:4},children:[
18
+ $t("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e.color}}),
19
+ $t("span",{style:{fontSize:11},children:e.label})]},e.label))}),
20
+ Vt("div",{style:{position:"relative",width:"fit-content"},children:[
21
+ Vt("div",{style:K,onMouseLeave:"hover"===T?E:void 0,children:[o.map((e,t)=> Vt(Mt.Fragment,{children:[
22
+ $t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"var(--semiotic-text, #333)"},children:vt(i,e)??e}),o.map((o,r)=>t===r?"label"===h? $t(Do,{label:vt(i,e)??e,cellSize:n},`diag-${e}`): $t(Bo,{data:z,field:e,label:vt(i,e)??e,cellSize:n,bins:d,colorBy:a,colorScale:G,brushSelectionName:B,hoverSelectionName:D,unselectedOpacity:p,mode:T},`diag-${e}`): $t(Po,{data:z,xField:o,yField:e,fieldLabels:i,cellSize:n,pointRadius:s,pointOpacity:c,styleRules:v,colorBy:a,colorScale:G,brushSelectionName:B,hoverSelectionName:D,unselectedOpacity:p,showGrid:y,maxDevicePixelRatio:g,mobileInteraction:M,mode:T,onPointHover:"hover"===T?(i,a,n)=>{if(i){if(N({datum:i,xField:o,yField:e,colIndex:r,rowIndex:t,px:a??0,py:n??0}),I){let[e,o]=Y(r,t,a,n);I({type:"hover",datum:i,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}}else N(null),I&&I({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}:void 0,onPointClick:F||I?(e,o,i)=>{if(!e)return;let[a,n]=Y(r,t,o,i);F&&F(e,{x:a,y:n}),I&&I({type:"click",datum:e,x:a,y:n,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}:void 0},`cell-${e}-${o}`))]},`row-${e}`)),
23
+ $t("div",{})," ",o.map(e=> $t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:vt(i,e)??e},`col-label-${e}`))]}),O&&"hover"===T&&!1!==f&&(()=>{let e=O.datum,t=vt(i,O.xField)??O.xField,r=vt(i,O.yField)??O.yField,s=a?"function"==typeof a?a(e):e[a]:null,c=x?"function"==typeof x?x(e):e[x]:`Row ${e[k]}`,h=X+l+O.colIndex*(n+l),d=O.rowIndex*(n+l),m=h+O.px,u=d+O.py,p={...e};delete p[k];let y="function"==typeof V,g=y?V(p):null,f= Vt(Lt,{style:{color:"var(--semiotic-tooltip-text, #333)",background:"var(--semiotic-tooltip-bg, rgba(255,255,255,0.95))",border:"1px solid var(--semiotic-border, #ddd)",borderRadius:3,padding:"4px 8px",fontSize:11,lineHeight:1.4,whiteSpace:"nowrap",boxShadow:"none"},children:[
24
+ $t("div",{style:{fontWeight:"bold",marginBottom:2},children:String(c)}),
25
+ Vt("div",{children:[t,": ",null!=e[O.xField]?Number(e[O.xField]).toFixed(1):"–"]}),
26
+ Vt("div",{children:[r,": ",null!=e[O.yField]?Number(e[O.yField]).toFixed(1):"–"]}),null!=s&& Vt("div",{style:{opacity:.8},children:["string"==typeof a?a:"group",": ",String(s)]})]}),b=y?g:f;return Pt(b)? $t(lt,{contentOwnsChrome:Rt(V),x:m,y:u,containerWidth:X+o.length*n+o.length*l,containerHeight:o.length*n+X+o.length*l,margin:{top:0,right:0,bottom:0,left:0},className:"scatterplot-matrix-tooltip",zIndex:10,children:b}):null})()]}),H&& $t(at,{accessibleTable:H,children: $t(st,{scene:j,chartType:"scatterplot matrix",tableId:$,chartTitle:L})})]})}function To(e){let[t,o]=Mt.useState(()=>_);return Mt.useEffect(()=>{if(t)return;let e=!1;return(_?Promise.resolve(_):(H||(H=import("./c-E3G25LFD.min.js").then(e=>_=e.MinimapBrush).catch(e=>{throw H=null,e})),H)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? $t(t,{...e}):null}function Wo(e){let t=Oo(e);return(e.height||I)+(e.margin?.top??t.top)+(e.margin?.bottom??t.bottom)}function Oo(e){let t=e.handles&&"object"==typeof e.handles?e.handles:e.handles?{}:null,o="number"==typeof t?.size&&Number.isFinite(t.size)?t.size:12;return{top:t?.move?Math.ceil(E(o)/2)+2:0,bottom:e.showExtentLabels?34:20}}function No(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}function Eo(e,t,o){let i=bt(t,o,kt),a=t&&"object"==typeof t&&!Array.isArray(t)?t:null;return e.map((e,t)=>{if("string"==typeof e.color&&e.color.length>0)return e.color;let o=e.label||`Series ${t+1}`,r=a?.[o];return"string"==typeof r&&r.length>0?r:i[t%i.length]})}function zo(e,t){let o=mt(e),i=t.map((e,t)=>({label:e.label||`Series ${t+1}`,readY:mt(e.yAccessor)}));return(e,t)=>{let a=String(e[M]??t??""),r=(i.find(e=>e.label===a)??i[0])?.readY(e);return{value:r,x:o(e),y:r,category:a||void 0}}}function Go(e,t){let o=1/0,i=-1/0,a="function"==typeof t?t:e=>e[t];for(let t of e){let e=a(t);null!=e&&isFinite(e)&&(e<o&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){let e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}function $o(e,t){let o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function jo(e,t){return t[0]+e*(t[1]-t[0])}var e=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){se(z),pe(te);let o=Tt(null),i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xScaleType:d,yScaleType:m,colorBy:u,colorScheme:p,styleRules:y,sizeBy:g,sizeRange:f=[3,15],symbolBy:b,symbolMap:x,pointRadius:v=5,pointOpacity:A=.8,tooltip:w,marginalGraphics:S,pointIdAccessor:k,annotations:C,regression:L,forecast:R,anomaly:_,xExtent:H,yExtent:I,pulse:F,decay:P,staleness:B,frameProps:D={},selection:M,linkedHover:T,linkedBrush:W,brush:O,onBrush:N,onObservation:E,onClick:j,hoverHighlight:V,chartId:X,loading:Q,loadingContent:U,emptyContent:Z,legendInteraction:ee,legendPosition:oe,color:ie,stroke:ae,strokeWidth:re,opacity:ne}=e,{width:le,height:de,enableHover:me,showGrid:ue,showLegend:ye,title:ge,description:fe,summary:be,accessibleTable:xe,xLabel:ve,yLabel:Ae}=i,we=Nt(()=>Be(a),[a]),_e=void 0===a,{domain:He,trackPushed:Ie,reset:Fe}=Yt({accessor:g,data:we,isPushMode:_e}),Oe=Ot(e=>{Ie([e]),o.current?.push(e)},[Ie]),Ne=Ot(e=>{Ie(e),o.current?.pushMany(e)},[Ie]);J(t,{variant:"xy",frameRef:o,overrides:{push:Oe,pushMany:Ne,clear:()=>{Fe(),o.current?.clear()}}});let Ee=q({responsive:e,data:we,rawData:a,colorBy:u,colorScheme:p,legendInteraction:ee,legendPosition:oe,frameLegend:D,selection:M,linkedHover:T,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:E,onClick:j,hoverHighlight:V,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"Scatterplot",chartId:X,showLegend:ye,userMargin:r,marginDefaults:i.marginDefaults,loading:Q,loadingContent:U,emptyContent:Z,width:le,height:de,hasTitle:!!ge,axisChrome:De(D,{showAxes:i.showAxes,xLabel:ve,yLabel:Ae})}),{brushStreamProps:ze}=ce({brush:O,onBrush:N,linkedBrush:W,xAccessor:c,yAccessor:h,defaultDimension:"xy"});Me("Scatterplot",we,"xAccessor",c),Me("Scatterplot",we,"yAccessor",h);let Ge=Nt(()=>g?He??[0,1]:void 0,[g,He]),$e=Nt(()=>g?e=>gt(e,g,f,Ge):void 0,[g,f,Ge]),je=Nt(()=>Te(c,h),[c,h]),Ve=G({colorBy:u,colorScale:Ee.colorScale,color:ie,pointRadius:v,fillOpacity:A,radiusFn:$e,stroke:ae,strokeWidth:re,opacity:ne,styleRules:y,ruleContext:je,effectiveSelectionHook:Ee.effectiveSelectionHook,resolvedSelection:Ee.resolvedSelection}),{effectiveData:Xe,statisticalAnnotations:Ye,hasForecast:Qe,xAccessorKey:Ue,yAccessorKey:Ke}=$({data:we,xAccessor:c,yAccessor:h,forecast:R,anomaly:_}),Je=Qe?Ue:c,qe=Qe?Ke:h,Ze=Nt(()=>Se([{label:ve||ke(c),accessor:Je,role:"x",format:l},{label:Ae||ke(h),accessor:qe,role:"y",format:s},...u?[{label:ke(u),accessor:u,role:"color"}]:[],...g?[{label:ke(g),accessor:g,role:"size"}]:[]]),[c,h,Je,qe,ve,Ae,u,g,l,s]),et=Nt(()=>{let e=Y(L),t=C||[];return e||0!==Ye.length?[...e?[e]:[],...t,...Ye]:C},[L,C,Ye]);if(Ee.earlyReturn)return Ee.earlyReturn;let tt=K({componentName:"Scatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(tt) return $t(We,{componentName:"Scatterplot",message:tt,width:le,height:de});let ot={chartType:"scatter",...null!=a&&{data:Xe},xAccessor:Je,yAccessor:qe,xScaleType:d,yScaleType:m,colorAccessor:u||void 0,sizeAccessor:g||void 0,...b&&{symbolAccessor:b},...x&&{symbolMap:x},sizeRange:f,pointStyle:Ve,colorScheme:p,size:[le,de],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ee.margin,showAxes:i.showAxes,xLabel:ve,yLabel:Ae,xFormat:l,yFormat:s,enableHover:me,showGrid:ue,...Ee.legendBehaviorProps,...Re({title:ge,description:fe,summary:be,accessibleTable:xe,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:w,defaultTooltipContent:Ze}),...Ce({linkedHover:T,selection:M,onObservation:E,onClick:j,hoverHighlight:V,hoverRadius:e.hoverRadius,mobileInteraction:Ee.mobileInteraction,customHoverBehavior:Ee.customHoverBehavior,customClickBehavior:Ee.customClickBehavior}),...S&&{marginalGraphics:S},...k&&{pointIdAccessor:k},...F&&{pulse:F},...P&&{decay:P},...B&&{staleness:B},...et&&et.length>0&&{annotations:et},...H&&{xExtent:H},...I&&{yExtent:I},...ze,...Ee.crosshairProps,...D};
27
+ return $t(he,{ref:o,...ot})}),"Scatterplot"),t=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(te);let o=Tt(null);J(t,{variant:"xy",frameRef:o});let i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",orderAccessor:d,orderLabel:m,styleRules:u,pointRadius:p=4,tooltip:y,pointIdAccessor:g,annotations:f,regression:b,forecast:x,anomaly:v,xExtent:A,yExtent:w,pulse:S,decay:k,staleness:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,legendInteraction:T,stroke:W,strokeWidth:O,opacity:N}=e,{width:E,height:z,enableHover:j,showGrid:V,title:X,description:Q,summary:U,accessibleTable:Z,xLabel:ee,yLabel:oe}=i,{safeData:ie,orderMap:ae}=Nt(()=>{let e=a||[],t="function"==typeof c?c:e=>e[c],o="function"==typeof h?h:e=>e[h],i=e;if(d&&e.length>0){let t="function"==typeof d?d:e=>e[d];i=[...e].sort((e,o)=>{let i=t(e),a=t(o);return(i instanceof Date?i.getTime():+i)-(a instanceof Date?a.getTime():+a)})}let r= new WeakMap,n=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&n++}let l=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&r.set(e,{idx:l++,total:n})}return{safeData:i,orderMap:r}},[a,d,c,h]);Me("ConnectedScatterplot",ie,"xAccessor",c),Me("ConnectedScatterplot",ie,"yAccessor",h);let re=q({responsive:e,data:ie,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:T,selection:R,linkedHover:_,fallbackFields:[],unwrapData:!1,onObservation:H,onClick:I,hoverHighlight:F,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ConnectedScatterplot",chartId:P,showLegend:void 0,userMargin:r,marginDefaults:i.marginDefaults,loading:B,loadingContent:D,emptyContent:M,width:E,height:z,hasTitle:!!X,axisChrome:De(L,{showAxes:i.showAxes,xLabel:ee,yLabel:oe})}),ne=re.resolvedSelection?.unselectedOpacity??ut,le=Nt(()=>(e,t)=>{let o=t.filter(e=>"point"===e.type);if(o.length<2)return;let i=re.effectiveSelectionHook?.isActive,a=re.effectiveSelectionHook?.predicate,r=o.length<100,n=o.length;e.lineCap="round";for(let t=0;t<n-1;t++){let l=o[t],s=o[t+1],c=Qt(t,n),h=!i||!a||a(l.datum??l)||a(s.datum??s),d=i?h?1:ne:1;r&&(e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle="white",e.lineWidth=p+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle=c,e.lineWidth=p,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[p,re.effectiveSelectionHook,ne]),se=Nt(()=>[le],[le]),ce=Nt(()=>(e,t,o)=>{let i=e.filter(e=>"point"===e.type);if(i.length<2)return null;let a=i.length,r=a<100,n=[];for(let e=0;e<a-1;e++){let t=i[e],o=i[e+1],l=Qt(e,a),s="number"==typeof t.style?.opacity?t.style.opacity:1,c="number"==typeof o.style?.opacity?o.style.opacity:1,h=Math.min(s,c);r&&n.push(
28
+ $t("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:"white",strokeWidth:p+2,strokeLinecap:"round",opacity:.5*h},`halo-${e}`)),n.push(
29
+ $t("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:l,strokeWidth:p,strokeLinecap:"round",opacity:h},`seg-${e}`))}
30
+ return $t(jt,{children:n})},[p]),de=Nt(()=>[ce],[ce]),me=Nt(()=>e=>{let t=ae.get(e),o=t?.idx??0,i=t?.total??1;return{fill:i>0?Qt(o,i):"#6366f1",stroke:"white",strokeWidth:1,r:p,fillOpacity:1}},[p,ae]),ue=Nt(()=>Te(c,h),[c,h]),ye=G({colorScale:void 0,baseStyleExtras:me,stroke:W,strokeWidth:O,opacity:N,styleRules:u,ruleContext:ue,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ge=m||("string"==typeof d?d:"Order"),{effectiveData:fe,statisticalAnnotations:be,hasForecast:xe,xAccessorKey:ve,yAccessorKey:Ae}=$({data:ie,xAccessor:c,yAccessor:h,forecast:x,anomaly:v}),we=xe?ve:c,_e=xe?Ae:h,He=Nt(()=>Se([{label:ee||ke(c),accessor:we,role:"x",format:l},{label:oe||ke(h),accessor:_e,role:"y",format:s},...d?[{label:ge,accessor:d,role:"group"}]:[]]),[c,h,we,_e,ee,oe,d,ge,l,s]),Ie=K({componentName:"ConnectedScatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(re.earlyReturn)return re.earlyReturn;let Fe=Y(b),Be=f||[],Oe=Fe||be.length>0?[...Fe?[Fe]:[],...Be,...be]:f,Ne={chartType:"scatter",...null!=a&&{data:fe},xAccessor:we,yAccessor:_e,pointStyle:ye,size:[E,z],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:i.showAxes,xLabel:ee,yLabel:oe,xFormat:l,yFormat:s,enableHover:j,showGrid:V,...Re({title:X,description:Q,summary:U,accessibleTable:Z,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:y,defaultTooltipContent:He}),...Ce({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...g&&{pointIdAccessor:g},...S&&{pulse:S},...k&&{decay:k},...C&&{staleness:C},canvasPreRenderers:se,svgPreRenderers:de,...Oe&&Oe.length>0&&{annotations:Oe},...A&&{xExtent:A},...w&&{yExtent:w},...re.crosshairProps,...L};return Ie? $t(We,{componentName:"ConnectedScatterplot",message:Ie,width:E,height:z}): $t(he,{ref:o,...Ne})}),"ConnectedScatterplot"),o=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(le);let{data:o,layout:i,layoutConfig:a,onLayoutError:r,xExtent:n,yExtent:l,showAxes:s=!1,margin:c,className:h,annotations:d,onObservation:m,onClick:u,selection:p,linkedHover:y,hoverHighlight:g,chartId:f,loading:b,loadingContent:x,emptyContent:v,colorBy:A,colorScheme:w,legend:S,legendInteraction:k,legendPosition:C,frameProps:L={}}=e,{legend:R,..._}=L,H=Nt(()=>yt(R,S),[R,S]),{frameRef:I,resolved:F,safeData:P,setup:B,earlyReturn:D}=Q({responsive:e,imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:A,colorScheme:w,legend:H,legendInteraction:k,legendPosition:C,frameLegend:_,selection:p,linkedHover:y,hoverHighlight:g,onObservation:m,onClick:u,chartId:f,loading:b,loadingContent:x,emptyContent:v,margin:c,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}),M=B.effectiveSelectionHook,T=Nt(()=>M?.isActive?{isActive:!0,predicate:M.predicate}:null,[M?.isActive,M?.predicate]),W=Nt(()=>Oe({tooltip:e.tooltip,defaultTooltipContent:e=> $t(de,{hover:e})}),[e.tooltip]);if(D)return D;let{width:O,height:N,enableHover:E,showGrid:z,title:G,description:$,summary:j,accessibleTable:V,xLabel:X,yLabel:Y}=F,U={chartType:"custom",...null!=o&&{data:P},customLayout:i,layoutConfig:a,onLayoutError:r,...T&&{layoutSelection:T},xExtent:n,yExtent:l,colorAccessor:A,colorScheme:w,size:[O,N],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:B.margin,showAxes:s,xLabel:X,yLabel:Y,enableHover:E,showGrid:z,...B.legendBehaviorProps,...Re({title:G,description:$,summary:j,accessibleTable:V,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...W,...Ce({linkedHover:y,selection:p,onObservation:m,onClick:u,hoverRadius:e.hoverRadius,hoverHighlight:g,mobileInteraction:B.mobileInteraction,customHoverBehavior:B.customHoverBehavior,customClickBehavior:B.customClickBehavior}),...d&&d.length>0&&{annotations:d},...B.crosshairProps,..._};
31
+ return $t(he,{ref:I,...U})}),"XYCustomChart"),i="Other",a={top:20,bottom:48,left:48},r=8,n=4,l=24,s=6,c=1.1,h=[[/[mwMW@%…]/,.95],[/[ijlI'.,|\s]/,.28],[/[frt():;/[\]{}*`!\\-]/,.39]],d=.75,m=.62,u=1.05,p=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){let i=je(),a=Ht(),{data:r,xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c="descending",ribbon:h=!1,curve:d="smooth",ribbonSizeRange:m=[4,28],samplesPerSegment:u=12,lineWidth:p=3,highlightTop:y,neutralColor:g,styleRules:f,labelStyle:b,colorScheme:x,ribbonOpacity:v=.82,lineOpacity:A=.9,showPoints:w=!1,pointRadius:S=3,showLabels:k=!0,labelPriorityAccessor:C,maxLabels:L,showGrid:R=!0,showLegend:_=!1,enableHover:H=!0,hoverHighlight:I=!0,tooltip:F,frameProps:P={},xFormat:B,yFormat:D,onClick:M}=e,T=eo(y),W=to(g),O=to(e.color),N=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,responsiveRules:e.responsiveRules}),E=Nt(()=>io(r,{xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c,highlightTop:T}),[r,n,l,s,c,T]),{axes:z,areaStyle:G,pointStyle:$,margin:j,...V}=P,X="object"==typeof b&&"number"==typeof b?.fontSize?b.fontSize:12,Y=e.legendPosition??"right",Q=!_||"left"!==Y&&"right"!==Y?void 0:Y,K=Nt(()=>mo({labels:E.seriesOrder,showLabels:k,width:N.width,showAxes:N.showAxes,rankCount:E.seriesOrder.length,yLabel:e.yLabel??"Rank",fontSize:X,legendSide:Q}),[E.seriesOrder,k,N.width,N.showAxes,e.yLabel,X,Q]),J=e.margin??j,q=Nt(()=>({...K.margin,...U(J)}),[K,J]),Z=Nt(()=>uo(q,K),[q,K]),ee=Q?Z.sideGutter[Q]:void 0,te=Nt(()=>oo({seriesOrder:E.seriesOrder,overallOrder:E.overallOrder,highlightTop:T,color:O,colorScheme:x,neutralColor:W,themeCategorical:i,themeNeutral:a.colors.textSecondary}),[E.seriesOrder,E.overallOrder,T,O,x,W,i,a.colors.textSecondary]),oe=Nt(()=>({ribbon:h,curve:d,samplesPerSegment:u,ribbonSizeRange:m,valueExtent:E.valueExtent,seriesOrder:E.seriesOrder,lineWidth:p,ribbonOpacity:v,lineOpacity:A,neutralColor:W,color:O,colorMap:te&&"object"==typeof te&&!Array.isArray(te)?te:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:f,areaStyle:G,pointStyle:$,labelStyle:b,showPoints:w,pointRadius:S,showLabels:k,labelPriorityAccessor:C,maxLabels:L,startLabelOffset:K.startLabelOffset,labelBudget:Z.budget,labelFontSize:X}),[h,d,u,m,E.valueExtent,E.seriesOrder,p,v,A,W,te,O,e.stroke,e.strokeWidth,e.opacity,f,G,$,b,w,S,k,C,L,K.startLabelOffset,Z.budget,X]),{tooltip:ie,formatX:ae}=ao({tooltip:F,xValues:E.xValues,xFormat:B,yFormat:D}),re=Nt(()=>{if(M)return(e,t)=>{M(e.__bumpRaw??e,t)}},[M]),ne=Math.max(1,E.seriesOrder.length),le=E.xValues.map((e,t)=>t),se=Array.from({length:ne},(e,t)=>t+1),ce=z??[{orient:"left",tickValues:se,tickFormat:e=>String(e),label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:le,tickFormat:ae,label:e.xLabel,tickAnchor:"edges"}],he=Nt(()=>Zt(e.annotations,E.xValues),[e.annotations,E.xValues]);
32
+ return $t(o,{ref:t,data:E.data,layout:vo,layoutConfig:oe,xExtent:[0,Math.max(1,E.xValues.length-1)],yExtent:[ne+.5,.5],showAxes:N.showAxes,showGrid:R,showLegend:_,enableHover:H,hoverHighlight:I,colorBy:"__bumpSeries",colorScheme:te,tooltip:ie,onClick:re,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:q,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:he,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:ce,axisExtent:"exact",...V,...null!=ee&&null==V.legendLayout?.sideGutter&&{legendLayout:{...V.legendLayout,sideGutter:ee}}}})}),"BumpChart"),y=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(ye);let o=Tt(null);J(t,{variant:"xy",frameRef:o});let i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,y0Accessor:m,gradientFill:u=!1,semanticGradient:p,semanticLine:y=!0,lineDataAccessor:g="coordinates",colorBy:f,colorScheme:b,styleRules:x,curve:v="monotoneX",areaOpacity:A=.7,lineGradient:w,showLine:S=!0,lineWidth:k=2,showPoints:C=!1,pointRadius:L=3,tooltip:R,annotations:_,forecast:H,anomaly:I,band:F,xExtent:P,yExtent:B,frameProps:D={},selection:M,linkedHover:T,onObservation:W,onClick:O,hoverHighlight:N,chartId:E,loading:z,loadingContent:G,emptyContent:j,legendInteraction:V,legendPosition:X,color:Y,stroke:Q,strokeWidth:U,opacity:Z}=e,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:ae,title:re,description:ne,summary:le,accessibleTable:se,xLabel:ce,yLabel:de}=i,me=Nt(()=>Be(a),[a]),ue=f||d,ge=Nt(()=>be(p),[p]),fe=Nt(()=>ge?.stops.length?xe(ge):ve(u),[ge,u]),Se=Nt(()=>Ae(w),[w]),Le=Nt(()=>y?we(ge):void 0,[ge,y]);Me("AreaChart",me,"xAccessor",c),Me("AreaChart",me,"yAccessor",h);let _e=q({responsive:e,data:me,rawData:a,colorBy:ue,colorScheme:b,legendInteraction:V,legendPosition:X,frameLegend:D,selection:M,linkedHover:T,fallbackFields:ue?["string"==typeof ue?ue:""]:[],unwrapData:!1,onObservation:W,onClick:O,hoverHighlight:N,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:E,showLegend:ae,userMargin:r,marginDefaults:i.marginDefaults,loading:z,loadingContent:G,emptyContent:j,width:ee,height:te,hasTitle:!!re,axisChrome:De(D,{showAxes:i.showAxes,xLabel:ce,yLabel:de})}),{effectiveData:He,statisticalAnnotations:Ie,hasForecast:Fe,xAccessorKey:Ne,yAccessorKey:Ee}=$({data:me,xAccessor:c,yAccessor:h,forecast:H,anomaly:I,groupBy:d}),ze=Fe?Ne:c,Ge=Fe?Ee:h,$e=Nt(()=>Te(c,h),[c,h]),{flattenedData:je,lineStyle:Xe,pointStyle:Ye,defaultTooltipContent:Qe}=wo({safeData:He,data:a,areaBy:d,lineDataAccessor:g,colorBy:ue,colorScale:_e.colorScale,color:Y,stroke:Q,strokeWidth:U,opacity:Z,effectiveSelectionHook:_e.effectiveSelectionHook,resolvedSelection:_e.resolvedSelection,areaOpacity:A,showLine:S,lineWidth:k,showPoints:C,pointRadius:L,xAccessor:ze,yAccessor:Ge,xLabel:ce||ke(c),yLabel:de||ke(h),xFormat:l,yFormat:s,groupField:d||f,band:F,styleRules:x,ruleContext:$e}),Ue=K({componentName:"AreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),Ke={chartType:"area",...null!=a&&{data:je},xAccessor:ze,yAccessor:Ge,groupAccessor:d||void 0,...m&&{y0Accessor:m},...F&&{band:F},...fe&&{gradientFill:fe},...Se&&{lineGradient:Se},...Le&&{semanticLineStops:Le},curve:v,lineStyle:Xe,...C&&Ye&&{pointStyle:Ye},size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:_e.margin,showAxes:i.showAxes,xLabel:ce,yLabel:de,xFormat:l,yFormat:s,enableHover:oe,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:ie,..._e.legendBehaviorProps,...Re({title:re,description:ne,summary:le,accessibleTable:se,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Oe({tooltip:R,defaultTooltipContent:Qe,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Ce({linkedHover:T,selection:M,onObservation:W,onClick:O,hoverHighlight:N,hoverRadius:e.hoverRadius,mobileInteraction:_e.mobileInteraction,customHoverBehavior:_e.customHoverBehavior,customClickBehavior:_e.customClickBehavior}),...(_&&_.length>0||Ie.length>0)&&{annotations:[..._||[],...Ie]},...P&&{xExtent:P},...B&&{yExtent:B},..._e.crosshairProps,...D};return _e.earlyReturn?_e.earlyReturn:Ue? $t(We,{componentName:"AreaChart",message:Ue,width:ee,height:te}): $t(he,{ref:o,...Ke})}),"AreaChart"),g=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(ge);let o=Tt(null),i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",seriesAAccessor:h="a",seriesBAccessor:d="b",seriesALabel:m="A",seriesBLabel:u="B",seriesAColor:p="var(--semiotic-danger, #dc2626)",seriesBColor:y="var(--semiotic-info, #2563eb)",showLines:g=!0,lineWidth:f=1.5,showPoints:b=!1,pointRadius:x=3,curve:v="linear",areaOpacity:A=.6,gradientFill:w,styleRules:S,tooltip:k,annotations:C,xExtent:L,yExtent:R,frameProps:_={},selection:H,linkedHover:I,onObservation:F,onClick:P,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:W,legendInteraction:O,legendPosition:N,pointIdAccessor:E,windowSize:z}=e,{width:G,height:$,enableHover:j,showGrid:V,showLegend:X,title:Y,description:Q,summary:U,accessibleTable:K,xLabel:J,yLabel:Z}=i,ee=Nt(()=>"function"==typeof c?e=>Ho(c(e)):e=>Ho(e[c]),[c]),te=Nt(()=>"function"==typeof h?e=>Ho(h(e)):e=>Ho(e[h]),[h]),oe=Nt(()=>"function"==typeof d?e=>Ho(d(e)):e=>Ho(e[d]),[d]),[ie,ae]=Wt([]),re=Tt([]),ne=null==a,le=Nt(()=>Be(ne?ie:a),[ne,ie,a]),se=Nt(()=>So(le,ee,te,oe),[le,ee,te,oe]),ce=Nt(()=>g?Io(le,ee,te,oe):[],[g,le,ee,te,oe]),de=Nt(()=>[...se,...ce],[se,ce]),me=Nt(()=>{let e= new Set;for(let t of se)e.add(t.__diffSegment);return Array.from(e)},[se]);zt(t,()=>{let e=e=>{let t=z&&e.length>z?e.slice(e.length-z):e;re.current=t,ae(t)},t=E?"function"==typeof E?E:e=>e[E]:null;return{push:t=>e([...re.current,t]),pushMany:t=>e([...re.current,...t]),remove:o=>{if(!t)return[];let i=Array.isArray(o)?o:[o],a=[],r=[];for(let e of re.current)i.includes(t(e))?a.push(e):r.push(e);return e(r),a},update:(o,i)=>{if(!t)return[];let a=Array.isArray(o)?o:[o],r=[],n=re.current.map(e=>{if(a.includes(t(e))){let t=i(e);return r.push(t),t}return e});return e(n),r},clear:()=>e([]),getData:()=>ne?re.current:le,getScales:()=>o.current?.getScales()??null}},[ne,le,E,z]);let ue=Nt(()=>!1===X?void 0:{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:m,color:p},{label:u,color:y}]}]},[X,m,u,p,y]),ye=Object.hasOwn(_,"legend")?_:{..._,legend:ue},fe=q({responsive:e,data:le,rawData:a,colorBy:"__diffWinner",colorScheme:[p,y],legendInteraction:O,legendPosition:N,frameLegend:ye,selection:H,linkedHover:I,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:F,onClick:P,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:D,showLegend:X,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:W,width:G,height:$,hasTitle:!!Y,axisChrome:De(_,{showAxes:i.showAxes,xLabel:J,yLabel:Z})}),be=Nt(()=>Lo({seriesAColor:p,seriesBColor:y,areaOpacity:A,styleRules:S}),[p,y,A,S]),xe=Nt(()=>Ro({seriesAColor:p,seriesBColor:y,lineWidth:f,styleRules:S}),[p,y,f,S]),Ae=Nt(()=>_o({seriesAColor:p,seriesBColor:y,pointRadius:x,styleRules:S}),[p,y,x,S]),[we,Se,ke]=Nt(()=>[be,xe,Ae].map(e=>pt(e,fe.effectiveSelectionHook,fe.resolvedSelection)),[be,xe,Ae,fe.effectiveSelectionHook,fe.resolvedSelection]),Le=Ot(e=>{let t=e.data,o=e.allSeries,i=e.xValue??t?.__x,a=t?.__valA,r=t?.__valB;if(o&&o.length>0){let e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(a=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==a||null==r)){let e=le.find(e=>ee(e)===i);e&&(null==a&&(a=te(e)),null==r&&(r=oe(e)))}let n=e=>null!=e&&Number.isFinite(e)?(Math.round(100*e)/100).toString():"—",s=l&&null!=i?l(i):null!=i?String(i):"";
33
+ return Vt("div",{className:"semiotic-tooltip",style:It,children:[s&& $t("div",{style:{fontWeight:600,marginBottom:4},children:s}),
34
+ Vt("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
35
+ $t("span",{style:{width:10,height:10,background:p,display:"inline-block",borderRadius:2}}),
36
+ Vt("span",{children:[m,": ",n(a)]})]}),
37
+ Vt("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
38
+ $t("span",{style:{width:10,height:10,background:y,display:"inline-block",borderRadius:2}}),
39
+ Vt("span",{children:[u,": ",n(r)]})]}),null!=a&&null!=r&&Number.isFinite(a)&&Number.isFinite(r)&& Vt("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",n(a-r)]})]})},[le,ee,te,oe,l,p,y,m,u]),{tooltipContent:_e,tooltipMode:He}=Nt(()=>Oe({tooltip:k,defaultTooltipContent:Le,multiDefaultContent:Le}),[k,Le]),Ie=Nt(()=>ve(w,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[w]);if(fe.earlyReturn)return fe.earlyReturn;let Fe={chartType:"mixed",data:de,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:me,curve:v,areaStyle:we,lineStyle:Se,...b&&{pointStyle:ke},size:[G,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:fe.margin,showAxes:i.showAxes,xLabel:J,yLabel:Z,xFormat:l,yFormat:s,enableHover:j,showGrid:V,...Ie&&{gradientFill:Ie},...fe.legendBehaviorProps,...Re({title:Y,description:Q,summary:U,accessibleTable:K,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:_e,..."multi"===He&&{tooltipMode:"multi"},...Ce({linkedHover:I,selection:H,onObservation:F,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:fe.mobileInteraction,customHoverBehavior:fe.customHoverBehavior,customClickBehavior:fe.customClickBehavior}),...C&&C.length>0&&{annotations:C},...L&&{xExtent:L},...R&&{yExtent:R},...fe.crosshairProps,..._};
40
+ return $t(he,{ref:o,...Fe})}),"DifferenceChart"),f=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(oe);let o=Tt(null),i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,lineDataAccessor:m="coordinates",colorBy:u,colorScheme:p,styleRules:y,curve:g="monotoneX",areaOpacity:f=.7,showLine:b=!0,lineWidth:x=2,showPoints:v=!1,pointRadius:A=3,normalize:w=!1,baseline:S="zero",stackOrder:k,tooltip:C,annotations:L,xExtent:R,yExtent:_,frameProps:H={},selection:I,linkedHover:F,onObservation:P,onClick:B,hoverHighlight:D,chartId:M,loading:T,loadingContent:W,emptyContent:O,legendInteraction:N,legendPosition:E,color:z,stroke:G,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:Q,showLegend:U,title:Z,description:ee,summary:te,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>Be(a),[a]),le=u||d;J(t,{variant:"xy",frameRef:o});let se=q({responsive:e,data:ne,rawData:a,colorBy:le,colorScheme:p,legendInteraction:N,legendPosition:E,frameLegend:H,selection:I,linkedHover:F,fallbackFields:le?["string"==typeof le?le:""]:[],unwrapData:!1,onObservation:P,onClick:B,hoverHighlight:D,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:M,showLegend:U,userMargin:r,marginDefaults:i.marginDefaults,loading:T,loadingContent:W,emptyContent:O,width:V,height:X,hasTitle:!!Z,axisChrome:De(H,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),ce=Nt(()=>Te(c,h),[c,h]),{flattenedData:de,lineStyle:me,pointStyle:ue,defaultTooltipContent:ye}=wo({safeData:ne,data:a,areaBy:d,lineDataAccessor:m,colorBy:le,colorScale:se.colorScale,color:z,stroke:G,strokeWidth:$,opacity:j,effectiveSelectionHook:se.effectiveSelectionHook,resolvedSelection:se.resolvedSelection,areaOpacity:f,showLine:b,lineWidth:x,showPoints:v,pointRadius:A,xAccessor:c,yAccessor:h,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,groupField:d||u,styleRules:y,ruleContext:ce}),ge=K({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),fe={chartType:"stackedarea",...null!=a&&{data:de},xAccessor:c,yAccessor:h,groupAccessor:d||void 0,curve:g,normalize:w,baseline:w?"zero":S,stackOrder:k,lineStyle:me,...v&&ue&&{pointStyle:ue},size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:se.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:Q,...se.legendBehaviorProps,...Re({title:Z,description:ee,summary:te,accessibleTable:ie,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Oe({tooltip:C,defaultTooltipContent:ye,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Ce({linkedHover:F,selection:I,onObservation:P,onClick:B,hoverHighlight:D,hoverRadius:e.hoverRadius,mobileInteraction:se.mobileInteraction,customHoverBehavior:se.customHoverBehavior,customClickBehavior:se.customClickBehavior}),...L&&L.length>0&&{annotations:L},...R&&{xExtent:R},..._&&{yExtent:_},...se.crosshairProps,...H};return se.earlyReturn?se.earlyReturn:ge? $t(We,{componentName:"StackedAreaChart",message:ge,width:V,height:X}): $t(he,{ref:o,...fe})}),"StackedAreaChart"),b=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(ie);let o=Tt(null);J(t,{variant:"xy",frameRef:o});let i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,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:r,className:n,xAccessor:l="x",yAccessor:s="y",valueAccessor:c="value",xFormat:h,yFormat:d,colorScheme:m,customColorScale:u,showValues:p=!1,valueFormat:y,cellBorderColor:g="#fff",cellBorderWidth:f=1,tooltip:b,annotations:x,heatmapAggregation:v,heatmapXBins:A,heatmapYBins:w,styleRules:S,xExtent:k,yExtent:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,showLegend:T,legendPosition:W,legend:O,legendInteraction:N,stroke:E,strokeWidth:z,opacity:G}=e,{width:$,height:j,enableHover:V,title:X,description:Y,summary:Q,accessibleTable:U,xLabel:q,yLabel:te}=i,oe=Ye(B,$,j,D,e),ae=oe?null:Qe(a,$,j,M,e),re=Nt(()=>Be(a),[a]),ne=Ue(),le=m??ne??"blues",se=("string"==typeof L.colorScheme?L.colorScheme:void 0)??le,ce="function"==typeof L.heatmapColorScale?L.heatmapColorScale:"custom"===se&&"function"==typeof u?u:void 0,de=T??!1,me=W??"right",{activeSelectionHook:ue,customHoverBehavior:ye,customClickBehavior:ge,crosshairSourceId:fe}=Ke({selection:R,linkedHover:_,fallbackFields:[],onObservation:H,onClick:I,chartType:"Heatmap",chartId:P,hoverHighlight:F,colorByField:void 0,mobileInteraction:i.mobileInteraction}),be=Z(R),xe=Je(_,fe);qe(N,void 0,[]);let ve=Nt(()=>"function"==typeof c?e=>c(e):e=>e[c],[c]),Ae=Nt(()=>{let e=re.map(ve);return Bt(e)},[re,ve]),we=Nt(()=>{if(ce)return ce;let e=St(se);return Xt(e).domain(Ae)},[se,ce,Ae]),_e=Nt(()=>{let e=Number.isFinite(f)?Math.max(0,f):1;return()=>({stroke:g,strokeWidth:e})},[g,f]),He=Nt(()=>ee(l,s,c),[l,s,c]),Ie=Nt(()=>Xe(_e,S,He),[_e,S,He]),Fe=Nt(()=>pt(Ie,ue,be),[ue,Ie,be]),Me=Nt(()=>Se([{label:q||ke(l),accessor:l,role:"x",format:h},{label:te||ke(s),accessor:s,role:"y",format:d},{label:ke(c),accessor:c,role:"value",format:y}]),[l,s,q,te,c,h,d,y]),Te=K({componentName:"Heatmap",data:a,accessors:{xAccessor:l,yAccessor:s,valueAccessor:c}}),Oe=Nt(()=>de?{gradient:{colorFn:e=>we(e),domain:Ae,label:"string"==typeof c?c:"value",format:y},legendDistance:O?.legendDistance}:void 0,[de,we,Ae,c,y,O?.legendDistance]),{margin:Ne,legend:Ee,legendPosition:ze,legendMarginReserved:Ge}=Ze({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:me,userMargin:r,defaults:i.marginDefaults,additionalLegend:Oe,chartWidth:$,chartHeight:j,legendLayout:L.legendLayout,frameLegend:L,hasTitle:!!X,axisChrome:De(L,{showAxes:i.showAxes,xLabel:q,yLabel:te})}),$e={chartType:"heatmap",...null!=a&&{data:re},xAccessor:l,yAccessor:s,valueAccessor:c,colorScheme:"custom"!==se?se:void 0,...ce&&{heatmapColorScale:ce},areaStyle:Fe,showValues:p,heatmapValueFormat:y,size:[$,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ne,showAxes:i.showAxes,xLabel:q,yLabel:te,xFormat:h,yFormat:d,enableHover:V,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Ee&&{legend:Ee,legendPosition:ze},...Ge&&{__legendMarginReservedFor:Ee},...Re({title:X,description:Y,summary:Q,accessibleTable:U,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:b,defaultTooltipContent:Me}),...Ce({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:ye,customClickBehavior:ge}),...x&&x.length>0&&{annotations:x},...v&&{heatmapAggregation:v},...null!=A&&{heatmapXBins:A},...null!=w&&{heatmapYBins:w},...k&&{xExtent:k},...C&&{yExtent:C},...xe,...L};return oe||ae||(Te? $t(We,{componentName:"Heatmap",message:Te,width:$,height:j}): $t(he,{ref:o,...$e}))}),"Heatmap"),x=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){se(z),pe(ae);let o=Tt(null),i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",sizeBy:d,sizeRange:m=[5,40],colorBy:u,colorScheme:p,styleRules:y,bubbleOpacity:g=.6,bubbleStrokeWidth:f=1,bubbleStrokeColor:b="white",tooltip:x,marginalGraphics:v,pointIdAccessor:A,annotations:w,regression:S,xExtent:k,yExtent:C,pulse:L,decay:R,staleness:_,frameProps:H={},selection:I,linkedHover:F,linkedBrush:P,brush:B,onBrush:D,onObservation:M,onClick:T,hoverHighlight:W,chartId:O,loading:N,loadingContent:E,emptyContent:$,legendInteraction:j,legendPosition:V,color:X,stroke:Q,strokeWidth:U,opacity:Z}=e,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:re,title:ne,description:le,summary:de,accessibleTable:me,xLabel:ue,yLabel:ye}=i,ge=Nt(()=>Be(a),[a]),fe=void 0===a,be=q({responsive:e,data:ge,rawData:a,colorBy:u,colorScheme:p,legendInteraction:j,legendPosition:V,frameLegend:H,selection:I,linkedHover:F,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:M,onClick:T,hoverHighlight:W,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"BubbleChart",chartId:O,showLegend:re,userMargin:r,marginDefaults:i.marginDefaults,loading:N,loadingContent:E,emptyContent:$,width:ee,height:te,hasTitle:!!ne,axisChrome:De(H,{showAxes:i.showAxes,xLabel:ue,yLabel:ye})}),{domain:xe,trackPushed:ve,reset:Ae}=Yt({accessor:d,data:ge,isPushMode:fe}),we=Ot(e=>{ve([e]),o.current?.push(e)},[ve]),_e=Ot(e=>{ve(e),o.current?.pushMany(e)},[ve]);J(t,{variant:"xy",frameRef:o,overrides:{push:we,pushMany:_e,clear:()=>{Ae(),o.current?.clear()}}});let{brushStreamProps:He}=ce({brush:B,onBrush:D,linkedBrush:P,xAccessor:c,yAccessor:h,defaultDimension:"xy"}),Ie=Nt(()=>({stroke:b,strokeWidth:f}),[b,f]),Fe=Nt(()=>xe??[0,1],[xe]),Me=Ot(e=>gt(e,d,m,Fe),[d,m,Fe]),Oe=Nt(()=>Te(c,h),[c,h]),Ne=G({colorBy:u,colorScale:be.colorScale,color:X,fillOpacity:g,radiusFn:Me,baseStyleExtras:Ie,stroke:Q,strokeWidth:U,opacity:Z,styleRules:y,ruleContext:Oe,effectiveSelectionHook:be.effectiveSelectionHook,resolvedSelection:be.resolvedSelection}),Ee=Nt(()=>Se([{label:ue||ke(c),accessor:c,role:"x",format:l},{label:ye||ke(h),accessor:h,role:"y",format:s},{label:ke(d),accessor:d,role:"size"},...u?[{label:ke(u),accessor:u,role:"color"}]:[]]),[c,h,ue,ye,d,u,l,s]);if(be.earlyReturn)return be.earlyReturn;let ze=K({componentName:"BubbleChart",data:a,accessors:{xAccessor:c,yAccessor:h},requiredProps:{sizeBy:d}});if(ze) return $t(We,{componentName:"BubbleChart",message:ze,width:ee,height:te});let Ge=Y(S),$e=Ge?[Ge,...w||[]]:w,je={chartType:"bubble",...null!=a&&{data:ge},xAccessor:c,yAccessor:h,colorAccessor:u||void 0,sizeAccessor:d,sizeRange:m,pointStyle:Ne,colorScheme:p,size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:be.margin,showAxes:i.showAxes,xLabel:ue,yLabel:ye,xFormat:l,yFormat:s,enableHover:oe,showGrid:ie,...be.legendBehaviorProps,...Re({title:ne,description:le,summary:de,accessibleTable:me,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:x,defaultTooltipContent:Ee}),...Ce({linkedHover:F,selection:I,onObservation:M,onClick:T,hoverHighlight:W,hoverRadius:e.hoverRadius,mobileInteraction:be.mobileInteraction,customHoverBehavior:be.customHoverBehavior,customClickBehavior:be.customClickBehavior}),...v&&{marginalGraphics:v},...A&&{pointIdAccessor:A},...L&&{pulse:L},...R&&{decay:R},..._&&{staleness:_},...$e&&$e.length>0&&{annotations:$e},...k&&{xExtent:k},...C&&{yExtent:C},...be.crosshairProps,...He,...H};
41
+ return $t(he,{ref:o,...je})}),"BubbleChart"),v={width:800,height:400},A={cellSize:150,cellGap:4,labelWidth:40},w=null,S=null,k="__splomIdx",C="splom-hover-source",L={top:4,bottom:4,left:4,right:4},R=/*#__PURE__*/ct(function(e){let{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}), $t(ht,{selections:i,children: $t(Mo,{...e})})},"ScatterplotMatrix",e=>{let t=A.labelWidth+(e.fields?.length??0)*((e.cellSize??A.cellSize)+(e.cellGap??A.cellGap));return{width:t,height:t}}),_=null,H=null,I=60,F=/*#__PURE__*/ct(function(e){j();let t=dt(void 0,{}),{data:o,width:i=t.width,height:a=t.height,margin:r,className:n,title:l,description:s,summary:c,xLabel:h,yLabel:d,xFormat:m,yFormat:u,xAccessor:p="x",yAccessor:y="y",lineBy:g,lineDataAccessor:f="coordinates",colorBy:b,colorScheme:x,curve:v="linear",lineWidth:A=2,styleRules:w,fillArea:S=!1,areaOpacity:k=.3,showPoints:C=!1,pointRadius:L=3,enableHover:R=!0,showAxes:_=!0,showGrid:H=!1,showLegend:F,legendPosition:P,tooltip:B,minimap:D={},renderBefore:M=!1,onBrush:T,onBrushEnd:W,onObservation:O,chartId:N,brushExtent:E,yExtent:z,frameProps:G={},loading:$,loadingContent:Y,emptyContent:Q}=e,U=a+Wo(D),J=Ye($,i,U,Y,e),q=J?null:Qe(o,i,U,Q,e),Z=Nt(()=>Be(o),[o]),[ee,te]=Wt(null),oe=E??ee,ie=Tt(null),[ae,re]=Wt(null),ne=void 0!==Z[0]?.[f],le=Nt(()=>ne?Z:g?V(Z,{lineDataAccessor:f,groupAccessor:g}):[{[f]:Z}],[Z,g,f,ne]),se=Nt(()=>ne||g?le.flatMap(e=>{let t=e[f]||[];return g&&"string"==typeof g?t.map(t=>({...t,[g]:e[g]})):t}):Z,[le,f,ne,g,Z]),ce=it(Z,b,x),de=Nt(()=>Te(p,y),[p,y]),me=X({lineWidth:A,colorBy:b,colorScale:ce,fillArea:S,areaOpacity:k,styleRules:w,ruleContext:de}),ue=Nt(()=>{if(D.lineStyle)return D.lineStyle},[D.lineStyle]),pe=X({lineWidth:1,colorBy:b,colorScale:ce,styleRules:w,ruleContext:de}),ye=ue??pe,ge=Nt(()=>C?Xe(e=>{let t={r:L,fillOpacity:1};return t.fill=b?At(e.parentLine||e,b,ce):wt,t},w,de,e=>e.parentLine||e):void 0,[C,L,b,ce,w,de]),{legend:fe,margin:be,legendPosition:xe,legendMarginReserved:ve}=Ze({data:le,colorBy:b,colorScale:ce,showLegend:F,legendPosition:P,userMargin:r,chartWidth:i,chartHeight:a,frameLegend:G,hasTitle:!!l,axisChrome:De(G,{showAxes:_,xLabel:h,yLabel:d})}),Ae=D.height||I,we=Oo(D),Ce=Nt(()=>({top:D.margin?.top??we.top,bottom:D.margin?.bottom??we.bottom,left:D.margin?.left??be.left,right:D.margin?.right??be.right}),[D.margin,we.top,we.bottom,be]),Le=D.brushDirection||"x",Re=Math.max(0,i-Ce.left-Ce.right),_e=z?.[0],He=z?.[1];Gt(()=>{let e=0,t=!1,o=0,i=()=>{if(t)return;let a=ie.current?.getScales?.(),r=(e,t)=>Math.abs(Math.max(...e)-Math.min(...e)-t)<.5;a&&(o>=60||r(a.x.range(),Re)&&r(a.y.range(),Ae))?re(a):(o++,e=requestAnimationFrame(i))};return e=requestAnimationFrame(i),()=>{t=!0,e&&cancelAnimationFrame(e)}},[o,Re,Ae,Ce.top,Ce.bottom,_e,He]);let Ie=Ot(e=>{if(E||te(e),T?.(e),!O)return;if(!e)return void O({type:"brush-end",timestamp:Date.now(),chartType:"MinimapChart",chartId:N});let t=ae?.["x"===Le?"y":"x"].domain().map(Number)??[e[0],e[1]];O({type:"brush",extent:"x"===Le?{x:e,y:t}:{x:t,y:e},timestamp:Date.now(),chartType:"MinimapChart",chartId:N})},[E,T,O,N,ae,Le]),Fe=Nt(()=>Se([{label:h||ke(p),accessor:p,role:"x",format:m},{label:d||ke(y),accessor:y,role:"y",format:u}]),[p,y,h,d,m,u]),Pe=K({componentName:"MinimapChart",data:o,accessors:{xAccessor:p,yAccessor:y}}),Me=S?"area":"line",Ne={chartType:Me,data:se,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:me,...C&&{pointStyle:ge},size:[i,a],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:be,showAxes:_,xLabel:h,yLabel:d,xFormat:m,yFormat:u,enableHover:R,showGrid:H,...fe&&{legend:fe,legendPosition:xe},...ve&&{__legendMarginReservedFor:fe},...l&&{title:l},...s&&{description:s},...c&&{summary:c},...void 0!==e.accessibleTable&&{accessibleTable:e.accessibleTable},...void 0!==e.animate&&{animate:e.animate},...void 0!==e.hoverRadius&&{hoverRadius:e.hoverRadius},...Oe({tooltip:B,defaultTooltipContent:Fe}),...oe&&"x"===Le&&{xExtent:oe},...z&&{yExtent:z},...oe&&"y"===Le&&{yExtent:oe},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...G},Ee={chartType:Me,data:se,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:ye,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[i,Ae+Ce.top+Ce.bottom],margin:Ce,showAxes:D.showAxes??!1,background:D.background,enableHover:!1,accessibleTable:!1,description:`${s||l||"Chart"} overview minimap`,animate:!1,...z&&{yExtent:z}},ze=!!D.handles||!!D.showExtentLabels||!!D.renderHandle,Ge= Vt("div",{style:{position:"relative",width:i,overflow:ze?"visible":"hidden"},children:[
42
+ $t(he,{ref:ie,...Ee}),
43
+ $t(To,{config:D,scales:ae,margin:Ce,plotWidth:Re,plotHeight:Ae,brushDirection:Le,extent:oe,axisFormat:"x"===Le?m:u,onBrush:Ie,onBrushEnd:W,onObservation:O,chartId:N})]},"minimap"),$e= $t("div",{style:{overflow:"hidden"},children: $t(he,{...Ne})},"main");return J||q||(Pe? $t(We,{componentName:"MinimapChart",message:Pe,width:i,height:U}): Vt("div",{className:"minimap-chart"+(n?` ${n}`:""),role:"group","aria-label":s||l||"Chart with overview minimap",children:[M?Ge:$e,M?$e:Ge]}))},"MinimapChart",e=>{let t=dt(void 0,{width:e.width,height:e.height});return{width:t.width,height:t.height+Wo(e.minimap??{})}}),P={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}},B=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(te);let o=Tt(null);J(t,{variant:"xy",frameRef:o});let i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xCenter:d,yCenter:m,quadrants:u,centerlineStyle:p={},showQuadrantLabels:y=!0,quadrantLabelSize:g=12,colorBy:f,colorScheme:b,styleRules:x,sizeBy:v,sizeRange:A=[3,15],pointRadius:w=5,pointOpacity:S=.8,tooltip:k,pointIdAccessor:C,annotations:L,frameProps:R={},selection:_,linkedHover:H,onObservation:I,onClick:F,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:W,legendInteraction:O,legendPosition:N,color:E,stroke:z,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:Q,showLegend:U,title:Z,description:ee,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>({topLeft:No(P.topLeft,u?.topLeft),topRight:No(P.topRight,u?.topRight),bottomLeft:No(P.bottomLeft,u?.bottomLeft),bottomRight:No(P.bottomRight,u?.bottomRight)}),[u]),le=Nt(()=>Be(a),[a]),se=q({responsive:e,data:le,rawData:a,colorBy:f,colorScheme:b,legendInteraction:O,legendPosition:N,frameLegend:R,selection:_,linkedHover:H,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:I,onClick:F,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:D,showLegend:U,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:W,width:V,height:X,hasTitle:!!Z,axisChrome:De(R,{showAxes:i.showAxes,xLabel:ae,yLabel:re})});Me("QuadrantChart",le,"xAccessor",c),Me("QuadrantChart",le,"yAccessor",h);let ce=Nt(()=>{if(!le.length)return;let e="function"==typeof c?c:e=>+e[c],t="function"==typeof h?h:e=>+e[h],o=1/0,i=-1/0,a=1/0,r=-1/0;for(let n of le){let l=e(n),s=t(n);isFinite(l)&&(l<o&&(o=l),l>i&&(i=l)),isFinite(s)&&(s<a&&(a=s),s>r&&(r=s))}if(null!=d&&isFinite(d)&&(d<o&&(o=d),d>i&&(i=d)),null!=m&&isFinite(m)&&(m<a&&(a=m),m>r&&(r=m)),o===1/0)return;let n=.1*(i-o)||1,l=.1*(r-a)||1;return{xExtent:[o-n,i+n],yExtent:[a-l,r+l]}},[le,c,h,d,m]),de=Nt(()=>{if(!v||0===le.length)return;let e=le.map(e=>"function"==typeof v?v(e):e[v]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Bt(e):void 0},[le,v]),me=Nt(()=>"function"==typeof c?c:e=>+e[c],[c]),ue=Nt(()=>"function"==typeof h?h:e=>+e[h],[h]),ye=Nt(()=>e=>{let t=me(e),o=ue(e),i=null!=d?t>=d:void 0,a=null!=m?o>=m:void 0;return void 0===a||void 0===i?E||wt:a&&i?ne.topRight.color:a&&!i?ne.topLeft.color:!a&&i?ne.bottomRight.color:ne.bottomLeft.color},[me,ue,d,m,ne,E]),ge=Nt(()=>v?e=>gt(e,v,A,de):void 0,[v,A,de]),fe=Nt(()=>Te(c,h),[c,h]),be=G({colorBy:f,colorScale:se.colorScale,color:E,pointRadius:w,fillOpacity:S,radiusFn:ge,fallbackFill:ye,stroke:z,strokeWidth:$,opacity:j,styleRules:x,ruleContext:fe,effectiveSelectionHook:se.effectiveSelectionHook,resolvedSelection:se.resolvedSelection}),xe=Nt(()=>{if(!le.length)return;let e= new Set;"string"==typeof c&&e.add(c),"string"==typeof h&&e.add(h),"string"==typeof f&&e.add(f),"string"==typeof v&&e.add(v);let t=le[0];for(let o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[le,c,h,f,v]),ve=Nt(()=>Se([...xe?[{label:xe,accessor:xe,role:"title"}]:[],{label:ae||ke(c),accessor:c,role:"x",format:l},{label:re||ke(h),accessor:h,role:"y",format:s},...f?[{label:ke(f),accessor:f,role:"color"}]:[],...v?[{label:ke(v),accessor:v,role:"size"}]:[]]),[xe,c,h,ae,re,f,v,l,s]),Ae=K({componentName:"QuadrantChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),we=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray||[]};return[(t,o,i,a)=>{if(!i?.x||!i?.y)return;let r=a.width,n=a.height,l=null!=d?i.x(d):r/2,s=null!=m?i.y(m):n/2;if(null!=d&&!isFinite(l)||null!=m&&!isFinite(s))return;let c=Math.max(0,Math.min(r,l)),h=Math.max(0,Math.min(n,s)),u=[{config:ne.topLeft,x:0,y:0,w:c,h:h},{config:ne.topRight,x:c,y:0,w:r-c,h:h},{config:ne.bottomLeft,x:0,y:h,w:c,h:n-h},{config:ne.bottomRight,x:c,y:h,w:r-c,h:n-h}];for(let e of u)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,n),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[d,m,ne,p]),Le=Nt(()=>y?[...we,(e,t,o,i)=>{if(!o?.x||!o?.y)return;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return;Math.max(0,Math.min(a,n)),Math.max(0,Math.min(r,l));let s=Ct(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.font=`600 ${g}px ${s}`,e.globalAlpha=.5,e.fillStyle=ne.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(ne.topLeft.label,8,8),e.fillStyle=ne.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(ne.topRight.label,a-8,8),e.fillStyle=ne.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(ne.bottomLeft.label,8,r-8),e.fillStyle=ne.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(ne.bottomRight.label,a-8,r-8),e.globalAlpha=1}]:we,[we,y,g,ne,d,m]),Re=Nt(()=>{let e=R.canvasPreRenderers||[];return[...Le,...e]},[Le,R.canvasPreRenderers]),_e=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray?Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return null;let s=Math.max(0,Math.min(a,n)),c=Math.max(0,Math.min(r,l)),h=[{config:ne.topLeft,x:0,y:0,w:s,h:c},{config:ne.topRight,x:s,y:0,w:a-s,h:c},{config:ne.bottomLeft,x:0,y:c,w:s,h:r-c},{config:ne.bottomRight,x:s,y:c,w:a-s,h:r-c}];
44
+ return Vt(jt,{children:[h.map((e,t)=>e.w>0&&e.h>0? $t("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),
45
+ $t("line",{x1:s,y1:0,x2:s,y2:r,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),
46
+ $t("line",{x1:0,y1:c,x2:a,y2:c,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),y&& Vt(jt,{children:[
47
+ $t("text",{x:8,y:8+g,fill:ne.topLeft.color,fontWeight:600,fontSize:g,opacity:.5,children:ne.topLeft.label}),
48
+ $t("text",{x:a-8,y:8+g,fill:ne.topRight.color,fontWeight:600,fontSize:g,opacity:.5,textAnchor:"end",children:ne.topRight.label}),
49
+ $t("text",{x:8,y:r-8,fill:ne.bottomLeft.color,fontWeight:600,fontSize:g,opacity:.5,children:ne.bottomLeft.label}),
50
+ $t("text",{x:a-8,y:r-8,fill:ne.bottomRight.color,fontWeight:600,fontSize:g,opacity:.5,textAnchor:"end",children:ne.bottomRight.label})]})]})}]},[d,m,ne,p,y,g]);if(se.earlyReturn)return se.earlyReturn;let He={chartType:"scatter",...null!=a&&{data:le},xAccessor:c,yAccessor:h,colorAccessor:f||void 0,sizeAccessor:v||void 0,sizeRange:A,pointStyle:be,colorScheme:b,size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:se.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,showGrid:Q,...ce&&{xExtent:ce.xExtent,yExtent:ce.yExtent},...se.legendBehaviorProps,...Z&&{title:Z},...ee&&{description:ee},...oe&&{summary:oe},...void 0!==ie&&{accessibleTable:ie},...n&&{className:n},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===k?()=>null:!0===k||void 0===k?ve:Ee(k)||ve,...Ce({linkedHover:H,selection:_,onObservation:I,onClick:F,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:se.mobileInteraction,customHoverBehavior:se.customHoverBehavior,customClickBehavior:se.customClickBehavior}),...C&&{pointIdAccessor:C},...L&&L.length>0&&{annotations:L},canvasPreRenderers:Re,...se.crosshairProps,...R,...Re.length>0&&{canvasPreRenderers:Re},svgPreRenderers:_e};return Ae? $t(We,{componentName:"QuadrantChart",message:Ae,width:V,height:X}): $t(he,{ref:o,...He})}),"QuadrantChart"),D="__ma_unitized",M="__ma_series",T=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(fe);let o=Tt(null),i=Tt([]),a=Tt(e.series);a.current=e.series,zt(t,()=>{let e=()=>(a.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;let a=e(),r=t;for(let e=0;e<a.length&&e<2;e++){let t=a[e],n=t.extent||i.current[e];if(!n)continue;let l=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null==l||!isFinite(l)||o.current.push({...r,[D]:$o(l,n),[M]:t.label||`Series ${e+1}`})}},pushMany:t=>{if(!o.current)return;let a=e(),r=[];for(let e of t)for(let t=0;t<a.length&&t<2;t++){let o=a[t],n=o.extent||i.current[t];if(!n)continue;let l=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null==l||!isFinite(l)||r.push({...e,[D]:$o(l,n),[M]: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}},[]);let r=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},v),{data:n,margin:l,className:s,xFormat:c,xAccessor:h="x",series:d,colorScheme:m,curve:u="monotoneX",lineWidth:p=2,styleRules:y,tooltip:g,annotations:f,frameProps:b={},selection:x,linkedHover:A,onObservation:w,onClick:S,hoverHighlight:k,chartId:C,loading:L,loadingContent:R,emptyContent:_,legendInteraction:H,legendPosition:I,stroke:F,strokeWidth:P,opacity:B}=e,{width:T,height:W,enableHover:O,showGrid:N,showLegend:E=!0,title:z,description:G,summary:$,accessibleTable:j,xLabel:V}=r,Y=Nt(()=>Be(n),[n]),Q=Nt(()=>Be(d),[d]),U=Q,J=2===Q.length,Z=Nt(()=>J?{...b.legendLayout,sideGutter:b.legendLayout?.sideGutter??70}:b.legendLayout,[b.legendLayout,J]);"production"!==process.env.NODE_ENV&&!J&&console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${Q.length}. Rendering as a standard multi-line chart.`);let ee=Ye(L,T,W,R,e),te=ee?null:Qe(n,T,W,_,e),oe=je(),ie=Nt(()=>Eo(U,m,oe),[U,m,oe]),ae=Nt(()=>Q.map((e,t)=>e.label||`Series ${t+1}`),[Q]),{unitizedData:re,extents:ne}=Nt(()=>{if(0===Y.length){let e=Q.map(e=>e.extent||null).filter(Boolean);return e.length===Q.length&&(i.current=e),{unitizedData:[],extents:e.length===Q.length?e:[]}}let e=Q.map(e=>e.extent||Go(Y,e.yAccessor));if(i.current=e,!J){let t=[];for(let e of Y)for(let o=0;o<Q.length;o++){let i=Q[o],a=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=a&&t.push({...e,[D]:a,[M]:ae[o]})}return{unitizedData:t,extents:e}}let t=[];for(let o of Y)for(let i=0;i<2;i++){let a=Q[i],r=("function"==typeof a.yAccessor?a.yAccessor:e=>e[a.yAccessor])(o);null!=r&&t.push({...o,[D]:$o(r,e[i]),[M]:ae[i]})}return{unitizedData:t,extents:e}},[Y,Q,J,ae]),le=Nt(()=>{if(!J||ne.length<2)return;let e=e=>t=>{let o=jo(t,ne[e]),i=Q[e]?.format;return"function"==typeof i?i(o):Number.isInteger(o)?String(o):o.toFixed(1)},t=e(0),o=e(1);return[{orient:"left",label:ae[0],tickFormat:t},{orient:"right",label:ae[1],tickFormat:o},{orient:"bottom"}]},[J,ne,Q,ae]),se=Nt(()=>re.length>0?re:ae.map(e=>({[M]:e})),[re,ae]),ce=q({responsive:e,data:se,rawData:n,colorBy:M,colorScheme:ie,legendInteraction:H,legendPosition:I,frameLegend:{...b,legendLayout:Z},selection:x,linkedHover:A,fallbackFields:[M],unwrapData:!1,onObservation:w,onClick:S,hoverHighlight:k,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,chartType:"MultiAxisLineChart",chartId:C,showLegend:E,legendLayout:Z,userMargin:l,marginDefaults:J?{...r.marginDefaults,left:70,right:70}:r.marginDefaults,loading:L,loadingContent:R,emptyContent:_,width:T,height:W,hasTitle:!!z,axisChrome:De(b,{showAxes:r.showAxes,xLabel:V,yLabel:ae[0],yLabelRight:ae[1],axes:le})}),de=Nt(()=>{let e= new Map;return ae.forEach((t,o)=>e.set(t,ie[o])),e},[ae,ie]),me=Ot(e=>de.get(e[M])||ie[0],[de,ie]),ue=Nt(()=>zo(h,Q),[h,Q]),ye=X({lineWidth:p,resolveStroke:me,stroke:F,strokeWidth:P,opacity:B,effectiveSelectionHook:ce.effectiveSelectionHook,resolvedSelection:ce.resolvedSelection,styleRules:y,ruleContext:ue}),ge=Nt(()=>e=>{let t=e.data||e,o=t[M],i=ae.indexOf(o),a=t[D],r=J&&i>=0&&ne[i]?jo(a,ne[i]):a,n=i>=0&&Q[i]?.format?Q[i].format:e=>Number.isInteger(e)?String(e):e.toFixed(2),l="function"==typeof h?h(t):t[h];return Mt.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},Mt.createElement("div",{style:{fontWeight:600,marginBottom:4,color:ie[i]||"inherit"}},o),Mt.createElement("div",null,`${"string"==typeof h?h:"x"}: `,c?c(l):String(l)),Mt.createElement("div",null,`${o}: ${n(r)}`))},[ae,ie,ne,J,Q,h,c]),be=Ot(e=>{let t=(Array.isArray(e.allSeries)?e.allSeries:[]).map(e=>{let t=ae.indexOf(e.group),o=J&&t>=0&&ne[t]?jo(e.value,ne[t]):e.value,i=e.datum;return i&&(i={...i},delete i[D],delete i[M]),{...e,value:o,datum:i}}),o=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:e.data;o&&"object"==typeof o&&!Array.isArray(o)&&(delete o[D],delete o[M]);let i={...e,data:o,allSeries:t};return delete i[D],delete i[M],i},[ne,J,ae]),xe=Nt(()=>Ve({xFormat:c,yFormat:(e,t)=>Q[ae.indexOf(t??"")]?.format?.(e)}),[c,Q,ae]),ve=Ot(e=>xe(be(e)),[xe,be]),Ae=Nt(()=>{if(!ze(g)||"function"!=typeof g.content)return g;let e=e=>g.content(be(e));return{mode:"multi",content:Rt(g.content)?_t(e):e}},[be,g]),we=Nt(()=>Oe({tooltip:Ae,defaultTooltipContent:ge,multiDefaultContent:ve}),[ge,ve,Ae]);if(ce.earlyReturn)return ce.earlyReturn;let Se=K({componentName:"MultiAxisLineChart",data:n,accessors:{xAccessor:h}}),ke=J?[0,1]:void 0,Le={chartType:"line",...null!=n&&{data:re},xAccessor:h,yAccessor:D,groupAccessor:M,lineStyle:ye,colorScheme:ie,size:[T,W],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ce.margin,showAxes:r.showAxes,...le&&{axes:le},xLabel:V,...J?{}:{yLabel:ae[0]},xFormat:c,...J&&ke&&{yExtent:ke},enableHover:O,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:N,curve:u,...ce.legendBehaviorProps,...z&&{title:z},...G&&{description:G},...$&&{summary:$},...void 0!==j&&{accessibleTable:j},...s&&{className:s},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...we,...f&&{annotations:f},...Ce({linkedHover:A,selection:x,onObservation:w,onClick:S,hoverHighlight:k,hoverRadius:e.hoverRadius,mobileInteraction:ce.mobileInteraction,customHoverBehavior:ce.customHoverBehavior,customClickBehavior:ce.customClickBehavior}),...ce.crosshairProps,...b,...Z&&{legendLayout:Z}};return ee||te||(Se? $t(We,{componentName:"MultiAxisLineChart",message:Se,width:T,height:W}): $t(he,{ref:o,...Le}))}),"MultiAxisLineChart",v),W=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(re);let o=Tt(null);J(t,{variant:"xy",frameRef:o});let i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",highAccessor:h="high",lowAccessor:d="low",openAccessor:m,closeAccessor:u,candlestickStyle:p,styleRules:y,tooltip:g,annotations:f,xExtent:b,yExtent:x,frameProps:v={},selection:A,linkedHover:w,onObservation:S,onClick:k,chartId:C,loading:L,loadingContent:R,emptyContent:_}=e,{width:H,height:I,enableHover:F,showGrid:P,title:B,description:D,summary:M,accessibleTable:T,xLabel:W,yLabel:O}=i,N=Nt(()=>Be(a),[a]),E=Nt(()=>{let e=i.marginDefaults;return"sparkline"===i.mode?{...e,top:0,bottom:0}:e},[i.marginDefaults,i.mode]),z=q({responsive:e,data:N,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:void 0,selection:A,linkedHover:w,fallbackFields:[],onObservation:S,onClick:k,chartType:"CandlestickChart",chartId:C,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,showLegend:!1,userMargin:r,marginDefaults:E,loading:L,loadingContent:R,emptyContent:_,width:H,height:I}),{activeSelectionHook:G,resolvedSelection:$,customHoverBehavior:j,customClickBehavior:V,margin:X}=z,Y=null==m||null==u;Me("CandlestickChart",N,"xAccessor",c),Me("CandlestickChart",N,"highAccessor",h),Me("CandlestickChart",N,"lowAccessor",d),Y||(Me("CandlestickChart",N,"openAccessor",m),Me("CandlestickChart",N,"closeAccessor",u));let Q=Nt(()=>Te(c,Y?h:u),[c,h,u,Y]),U=Nt(()=>pt(Xe(void 0,y,Q),G,$),[y,Q,G,$]),Z=Nt(()=>{let e=[{label:W||ke(c),accessor:c,role:"x",format:l}];return Y?(e.push({label:"High",accessor:h,role:"y",format:s}),e.push({label:"Low",accessor:d,format:s})):(e.push({label:"Open",accessor:m,format:s}),e.push({label:"High",accessor:h,format:s}),e.push({label:"Low",accessor:d,format:s}),e.push({label:"Close",accessor:u,format:s})),Se(e)},[c,W,l,s,h,d,m,u,Y]),ee=K({componentName:"CandlestickChart",data:a,accessors:{xAccessor:c,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u}}}),te=Math.max(2,Math.min(12,Math.round(H/40))),oe=H<=200?.02:.1,ie={chartType:"candlestick",...null!=a&&{data:N},xAccessor:c,yAccessor:h,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u},...p&&{candlestickStyle:p},...(G||y?.length)&&{pointStyle:U},scalePadding:te,extentPadding:oe,size:[H,I],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:X,showAxes:i.showAxes,xLabel:W,yLabel:O,xFormat:l,yFormat:s,enableHover:F,showGrid:P,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Re({title:B,description:D,summary:M,accessibleTable:T,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:g,defaultTooltipContent:Z}),...Ce({linkedHover:w,selection:A,onObservation:S,onClick:k,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:j,customClickBehavior:V}),...f&&f.length>0&&{annotations:f},...b&&{xExtent:b},...x&&{yExtent:x},...z.crosshairProps,...v};return z.earlyReturn?z.earlyReturn:ee? $t(We,{componentName:"CandlestickChart",message:ee,width:H,height:I}): $t(he,{ref:o,...ie})}),"CandlestickChart"),O=class{constructor(){this.next=0,this.indices= new WeakMap,this.ids= new Map,this.entries= new Map}index(e,t,o,i){let a=this.indices.get(e);if(null!=a&&!this.entries.has(a))return a;let r=a??(t?this.ids.get(t):void 0),n=null!=r&&this.entries.has(r)?r:this.next++,l=this.entries.get(n);for(l?.id&&l.id!==t&&this.ids.get(l.id)===n&&this.ids.delete(l.id),this.indices.set(e,n),t&&this.ids.set(t,n),this.entries.set(n,{id:t,label:o});this.entries.size>Math.max(1,i);)this.forgetIndex(this.entries.keys().next().value);return n}label(e){return this.entries.get(e)?.label}forget(e){let t=this.indices.get(e);this.indices.delete(e),null!=t&&this.forgetIndex(t)}forgetIndex(e){let t=this.entries.get(e);t?.id&&this.ids.get(t.id)===e&&this.ids.delete(t.id),this.entries.delete(e)}},N=/*#__PURE__*/Fe(/*#__PURE__*/Et(function(e,t){pe(ne);let o=Tt(null),i=Pe(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,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:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",pointIdAccessor:d,xScaleType:m,positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,styleRules:b,tooltip:x,annotations:v,xExtent:A,yExtent:w,frameProps:S={},selection:k,linkedHover:C,onObservation:L,onClick:R,hoverHighlight:_,chartId:H,loading:I,loadingContent:F,emptyContent:P,legendInteraction:B,legendPosition:D}=e,{areaStyle:M,...T}=S,{width:W,height:N,enableHover:E,showGrid:z,showLegend:G,title:$,description:j,summary:V,accessibleTable:X,xLabel:Y,yLabel:Q}=i,U=Nt(()=>Be(a),[a]),Z=Tt(new O);J(t,{variant:"xy",frameRef:o,overrides:{clear:()=>{o.current?.clear(),Z.current=new O},remove:e=>{let t=o.current?.remove(e)??[];for(let e of t)Z.current.forget(e);return t}}});let ee="growing"===(S.windowMode??S.capacityMode)?S.maxCapacity??1e5:S.windowSize??S.capacity??200,{plotData:te,plotXAccessor:oe,plotXFormat:ie,usesIndex:ae}=Nt(()=>{let e="function"==typeof c?c:e=>e[c],t=d?"function"==typeof d?d:e=>e[d]:void 0,o=e=>"number"==typeof e&&Number.isFinite(e)||e instanceof Date,i=(e,t)=>{let o=e??t;return l?l(o):String(o)};if(null!=a&&!U.some((t,i)=>!o(e(t,i))))return{plotData:U,plotXAccessor:c,plotXFormat:l,usesIndex:!1};if(null!=a){let t=U.map((t,o)=>e(t,o));return{plotData:U.map((e,t)=>({...e,__waterfallX:t})),plotXAccessor:"__waterfallX",plotXFormat:e=>i(t[Number(e)],e),usesIndex:!0}}return{plotData:U,plotXAccessor:(i,a)=>{let r=e(i,a);if(o(r))return r;let n=t?String(t(i,a)??""):"";return Z.current.index(i,n,r,ee)},plotXFormat:e=>i(Z.current.label(Number(e)),e),usesIndex:!0}},[a,U,c,l,d,ee]),re=Nt(()=>{if(ae&&null!=a)return[{orient:"bottom",tickValues:te.map((e,t)=>t)}]},[a,te,ae]),le=q({responsive:e,data:te,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:B,legendPosition:D,frameLegend:S,selection:k,linkedHover:C,fallbackFields:["string"==typeof c?c:"x"],unwrapData:!1,onObservation:L,onClick:R,hoverHighlight:_,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"WaterfallChart",chartId:H,showLegend:G,userMargin:r,marginDefaults:i.marginDefaults,loading:I,loadingContent:F,emptyContent:P,width:W,height:N,hasTitle:!!$,axisChrome:De(S,{showAxes:i.showAxes,xLabel:Y,yLabel:Q,axes:S.axes??re})}),se=Nt(()=>({positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity}),[u,p,y,g,f,e.stroke,e.strokeWidth,e.opacity]),ce=Nt(()=>Te(c,h),[c,h]),de=Nt(()=>Xe(void 0,b,ce),[b,ce]),me=Nt(()=>pt(e=>{let t=de(e);if(!M)return t;let o="function"==typeof M?M(e):M;return o?{...t,...o}:t},le.effectiveSelectionHook,le.resolvedSelection),[de,M,le.effectiveSelectionHook,le.resolvedSelection]),ue=Nt(()=>Se([{label:Y||ke(c),accessor:c,role:"x",format:l},{label:Q||"Change",accessor:h,role:"y",format:s}]),[c,h,Y,Q,l,s]);if(le.earlyReturn)return le.earlyReturn;let ye=K({componentName:"WaterfallChart",data:a,accessors:{xAccessor:c,yAccessor:h}});if(ye) return $t(We,{componentName:"WaterfallChart",message:ye,width:W,height:N});let ge={chartType:"waterfall",initialValue:e.initialValue,...null!=a&&{data:te},xAccessor:oe,yAccessor:h,xScaleType:null!=a&&ae?"linear":m,waterfallStyle:se,areaStyle:me,size:[W,N],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:le.margin,showAxes:i.showAxes,xLabel:Y,yLabel:Q,xFormat:ie,yFormat:s,enableHover:E,showGrid:z,...re&&{axes:re},...le.legendBehaviorProps,...le.crosshairProps,...Re({title:$,description:j,summary:V,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Le({tooltip:x,defaultTooltipContent:ue}),...Ce({linkedHover:C,selection:k,onObservation:L,onClick:R,hoverHighlight:_,hoverRadius:e.hoverRadius,mobileInteraction:le.mobileInteraction,customHoverBehavior:le.customHoverBehavior,customClickBehavior:le.customClickBehavior}),...d&&{pointIdAccessor:d},...v&&v.length>0&&{annotations:v},...A&&{xExtent:A},...w&&{yExtent:w},...T};
51
+ return $t(he,{ref:o,...ge})}),"WaterfallChart");export{e as a,t as b,o as c,Ut as d,io as e,p as f,y as g,g as h,f as i,b as j,x as k,R as l,F as m,P as n,B as o,T as p,W as q,N as r};
@@ -1 +1 @@
1
- import{a as e,d as t}from"./c-SQQZPFVY.min.js";import{a}from"./c-ISHYKYII.min.js";import{c as l,r as n,k as r,m as s}from"./c-7UN2WUMI.min.js";import*as o from"react";import{jsxs as i,Fragment as g,jsx as u}from"react/jsx-runtime";function d(e){return null==e||"object"!=typeof e||Array.isArray(e)?{}:e}function m(e){return null!=e&&"object"==typeof e?d(e).id:e}function c(e){let t=d(e.datum);return{source:m(t.source??e.source),target:m(t.target??e.target)}}function h(t,a){let r=new Map,s=[],o=!1,i=a.flatMap(e=>{let t=d(e?.datum).__chordEdges;return Array.isArray(t)?t.map(t=>({...e,datum:t,accessibleDatum:d(t).data??t})):[e]});for(let e=0;e<i.length;e++){let t=i[e];if(!t||"object"!=typeof t)continue;let a=d(t.datum),{source:n,target:g}=c(t),u="number"==typeof a.value&&Number.isFinite(a.value),m=u?a.value:0;o||(o=u);for(let[e,t,a]of[[n,1,3],[g,0,2]]){if(null==e||""===e)continue;let l=String(e),n=r.get(l)??[0,0,0,0];n[t]++,n[a]+=m,r.set(l,n)}let h=null!=n||null!=g?`${null==n?"?":String(n)} → ${null==g?"?":String(g)}`:`Edge ${e+1}`;s.push(l(t,h))}let g=[],u=0,m=0;for(let e=0;e<t.length;e++){let a=t[e];if(!a||"object"!=typeof a||null===a.datum)continue;let n=d(a.datum).id??a.id,s=null!=n?String(n):`node-${e}`,[o,i,c,h]=r.get(s)??[0,0,0,0],p=o+i;u+=p,p>m&&(m=p),g.push({id:s,degree:p,inDeg:o,outDeg:i,wDegree:c+h,wInDeg:c,wOutDeg:h,semantic:l(a,s)})}g.sort((e,t)=>t.degree-e.degree);let h=[`${n(g.length,"node")}, ${n(s.length,"edge")}.`];return g.length>0&&h.push(`Mean degree: ${e(u/g.length)}, max degree: ${m}.`),{nodeRows:g,edgeRows:s,hasWeights:o,summary:h.join(" ")}}function p({nodes:e,edges:l,sceneRevision:n,chartType:d,revealRows:m}){let[c,p]=o.useState(5),[b,f]=o.useState(5),y=o.useMemo(()=>h(e,l),[n??e,n??l]),{nodeRows:w,edgeRows:$,hasWeights:v,summary:j}=y,D=Math.min(c,w.length),M=w.slice(0,D),R=w.length-D,S=Math.min(b,$.length),x=$.slice(0,S),A=$.length-S,I=[{label:"degree",values:M.map(e=>e.degree)},{label:"in",values:M.map(e=>e.inDeg)},{label:"out",values:M.map(e=>e.outDeg)},...v?[{label:"w. degree",values:M.map(e=>e.wDegree)},{label:"w. in",values:M.map(e=>e.wInDeg)},{label:"w. out",values:M.map(e=>e.wOutDeg)}]:[]];return i(g,{children:[u("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:r,children:j}),w.length>0&&u(t,{rows:M.map(e=>e.semantic),label:`Node data and degree summary for ${d}`,typeLabel:"node",labelRows:!0,extraColumns:I,caption:R>0?`Top ${D} of ${w.length} nodes by degree`:`All ${w.length} nodes by degree`}),u(a,{remaining:R,onClick:e=>{m(e.currentTarget,D,Math.min(D+25,w.length),w.length,"nodes"),p(e=>e+25)},kind:"node"}),$.length>0&&u(t,{rows:x,label:`Edge data for ${d}`,typeLabel:"edge",labelRows:!0,className:"semiotic-accessible-data-table-table semiotic-accessible-data-table-edges",style:{...s,marginTop:12},caption:A>0?`First ${S} of ${$.length} edges`:`All ${$.length} edges`}),u(a,{remaining:A,onClick:e=>{m(e.currentTarget,S,Math.min(S+25,$.length),$.length,"edges"),f(e=>e+25)},kind:"edge"})]})}export{p as default};
1
+ import{a as e,d as t}from"./c-QPHM7AWW.min.js";import{a}from"./c-JVZRD4GL.min.js";import{c as l,r as n,k as r,m as s}from"./c-HN5U72U7.min.js";import*as o from"react";import{jsxs as i,Fragment as g,jsx as u}from"react/jsx-runtime";function d(e){return null==e||"object"!=typeof e||Array.isArray(e)?{}:e}function m(e){return null!=e&&"object"==typeof e?d(e).id:e}function c(e){let t=d(e.datum);return{source:m(t.source??e.source),target:m(t.target??e.target)}}function h(t,a){let r=new Map,s=[],o=!1,i=a.flatMap(e=>{let t=d(e?.datum).__chordEdges;return Array.isArray(t)?t.map(t=>({...e,datum:t,accessibleDatum:d(t).data??t})):[e]});for(let e=0;e<i.length;e++){let t=i[e];if(!t||"object"!=typeof t)continue;let a=d(t.datum),{source:n,target:g}=c(t),u="number"==typeof a.value&&Number.isFinite(a.value),m=u?a.value:0;o||(o=u);for(let[e,t,a]of[[n,1,3],[g,0,2]]){if(null==e||""===e)continue;let l=String(e),n=r.get(l)??[0,0,0,0];n[t]++,n[a]+=m,r.set(l,n)}let h=null!=n||null!=g?`${null==n?"?":String(n)} → ${null==g?"?":String(g)}`:`Edge ${e+1}`;s.push(l(t,h))}let g=[],u=0,m=0;for(let e=0;e<t.length;e++){let a=t[e];if(!a||"object"!=typeof a||null===a.datum)continue;let n=d(a.datum).id??a.id,s=null!=n?String(n):`node-${e}`,[o,i,c,h]=r.get(s)??[0,0,0,0],p=o+i;u+=p,p>m&&(m=p),g.push({id:s,degree:p,inDeg:o,outDeg:i,wDegree:c+h,wInDeg:c,wOutDeg:h,semantic:l(a,s)})}g.sort((e,t)=>t.degree-e.degree);let h=[`${n(g.length,"node")}, ${n(s.length,"edge")}.`];return g.length>0&&h.push(`Mean degree: ${e(u/g.length)}, max degree: ${m}.`),{nodeRows:g,edgeRows:s,hasWeights:o,summary:h.join(" ")}}function p({nodes:e,edges:l,sceneRevision:n,chartType:d,revealRows:m}){let[c,p]=o.useState(5),[b,f]=o.useState(5),y=o.useMemo(()=>h(e,l),[n??e,n??l]),{nodeRows:w,edgeRows:$,hasWeights:v,summary:D}=y,j=Math.min(c,w.length),M=w.slice(0,j),R=w.length-j,A=Math.min(b,$.length),x=$.slice(0,A),S=$.length-A,k=[{label:"degree",values:M.map(e=>e.degree)},{label:"in",values:M.map(e=>e.inDeg)},{label:"out",values:M.map(e=>e.outDeg)},...v?[{label:"w. degree",values:M.map(e=>e.wDegree)},{label:"w. in",values:M.map(e=>e.wInDeg)},{label:"w. out",values:M.map(e=>e.wOutDeg)}]:[]];return i(g,{children:[u("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:r,children:D}),w.length>0&&u(t,{rows:M.map(e=>e.semantic),label:`Node data and degree summary for ${d}`,typeLabel:"node",labelRows:!0,extraColumns:k,caption:R>0?`Top ${j} of ${w.length} nodes by degree`:`All ${w.length} nodes by degree`}),u(a,{remaining:R,onClick:e=>{m(e.currentTarget,j,Math.min(j+25,w.length),w.length,"nodes"),p(e=>e+25)},kind:"node"}),$.length>0&&u(t,{rows:x,label:`Edge data for ${d}`,typeLabel:"edge",labelRows:!0,className:"semiotic-accessible-data-table-table semiotic-accessible-data-table-edges",style:{...s,marginTop:12},caption:S>0?`First ${A} of ${$.length} edges`:`All ${$.length} edges`}),u(a,{remaining:S,onClick:e=>{m(e.currentTarget,A,Math.min(A+25,$.length),$.length,"edges"),f(e=>e+25)},kind:"edge"})]})}export{p as default};
@@ -0,0 +1 @@
1
+ function s(){A(e),A(j),A(a),A(p),A(m),A(o),A(i),A(r),A(c),A(f),A(n),A(t)}import{a,b as m,c as o,d as i,e as r,f as c,g as f,h as n}from"./c-ZVL7ULNH.min.js";import{e as t}from"./c-5NAU4JAY.min.js";import{e as A,j as e,l as j,m as p}from"./c-AMQAAW7G.min.js";export{s as a};
@@ -0,0 +1 @@
1
+ export{a as registerBuiltInNetworkLayouts}from"./c-RQWI623R.min.js";
@@ -0,0 +1 @@
1
+ function t(t){return{opacity:t?.opacity??1,fillOpacity:t?.fillOpacity,strokeOpacity:t?.strokeOpacity}}function n(t,n){return"linear"===n?t:1-Math.pow(1-t,3)}function a(t,n){let a=t-n.startTime;return Math.min(a/n.duration,1)}function i(t,n,a){return t+(n-t)*a}function r(){return globalThis.performance?.now()??Date.now()}function e(t,n){return{transition:!1===t?void 0:t?!0===t?{duration:300}:{duration:t.duration??300,easing:"linear"===t.easing?"linear":"ease-out"}:n,introEnabled:!(!t||globalThis.window?.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!0!==t&&!1===t.intro)}}export{t as a,n as b,a as c,i as d,r as e,e as f};
@@ -0,0 +1 @@
1
+ export{e as customXYPlugin}from"./c-5NAU4JAY.min.js";
@@ -0,0 +1 @@
1
+ function n(n,e){return"touch"===e?Math.max(n,24):n}function e(n){return Array.isArray(n)?n[0]:n}function t(n,t,r,a){return{data:e(n),x:t,y:r,__semioticHoverData:!0,...a}}function r(n,e){if("number"!=typeof n?.binStart||"number"!=typeof n.binEnd)return e;let t=n.binStart+(n.binEnd-n.binStart)/2;return Number.isFinite(t)?e instanceof Date?new Date(t):t:e}function a(...n){let e;for(let t of n)t&&(e=i(e)&&i(t)?{legendGroups:[...e.legendGroups,...t.legendGroups],legendDistance:t.legendDistance??e.legendDistance}:t);return e}function i(n){return"object"==typeof n&&null!==n&&"legendGroups"in n&&Array.isArray(n.legendGroups)}function u(n){return"object"==typeof n&&null!==n&&"gradient"in n}export{n as a,e as b,t as c,r as d,a as e,i as f,u as g};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as i,b as l}from"./c-5NAU4JAY.min.js";import{k as o,b as r}from"./c-AMQAAW7G.min.js";import{a}from"./c-UALVQIIJ.min.js";import{a as n}from"./c-5HTUQRJT.min.js";import{f as s,e as c,h as f,g as u}from"./c-ZYMXDR42.min.js";import{a as g}from"./c-TFESQSWE.min.js";import{a as m}from"./c-DHNROAXY.min.js";import{b as h,c as y}from"./c-YLZIV3VS.min.js";import{g as p,d,c as b}from"./c-ZP6O6UHV.min.js";import{c as v,d as S,s as k}from"./c-WPL6PGP3.min.js";import{c as w}from"./c-ELGOCAEY.min.js";import{f as M,a as x,b as C}from"./c-5PCO2P5Q.min.js";import{b as N,c as A}from"./c-7BVQDXFU.min.js";var F={chartType:"stackedarea",buildScene:(e,t)=>o(e,t),canvasRenderers:[a,g]};function T(e,t){let i=[],l="bubble"===e.config.chartType?10:5,o=e.config.sizeRange||[3,15],r=null;if(e.getSize&&!e.config.pointStyle){let i=t.map(t=>e.getSize(t)).filter(e=>null!=e&&!Number.isNaN(e));if(i.length>0){let e=1/0,t=-1/0;for(let l of i)l<e&&(e=l),l>t&&(t=l);r=i=>e===t?(o[0]+o[1])/2:o[0]+(i-e)/(t-e)*(o[1]-o[0])}}let a=e.getColor?e.resolveColorMap(t):null,n=e.config.themeSemantic?.primary||"#4e79a7",f=e.getSymbol,u=f?w(f,e.config.symbolMap):null;for(let o of t){let t=e.config.pointStyle?e.config.pointStyle(o):{fill:n,opacity:.8},f=t.r||l;if(r&&e.getSize){let t=e.getSize(o);null!=t&&!Number.isNaN(t)&&(f=r(t))}if(a&&e.getColor&&!t.fill){let i=e.getColor(o);i&&a.has(i)&&(t={...t,fill:a.get(i)})}let g=e.getPointId?String(e.getPointId(o)):void 0;if(u){let l=u(o),r=s(o,e.scales,e.getX,e.getY,Math.PI*f*f,l,t,g);r&&i.push(r)}else{let l=c(o,e.scales,e.getX,e.getY,f,t,g);l&&i.push(l)}}return i}var W=[g,m],j={chartType:"scatter",buildScene:(e,t)=>T(e,t),canvasRenderers:W},R={chartType:"bubble",buildScene:(e,t)=>T(e,t),canvasRenderers:W},P=/*#__PURE__*/new Map;function Y(e,t,i){return t===i?Math.floor(128):Math.min(Math.floor(255*(e-t)/(i-t)+.5),255)}function V(e){let t=Object.prototype.hasOwnProperty.call(v,e)?e:"blues",i=P.get(t);if(i)return i;i=new Array(256);let l=S(t);for(let e=0;e<256;e++)i[e]=l(e/255);return P.set(t,i),i}function X(e){return"string"==typeof e.colorScheme?e.colorScheme:e.themeSequential||"blues"}var z=/*#__PURE__*/new WeakMap;function E(e){if(e instanceof Date){let t=e.getTime();return Number.isFinite(t)?{key:t,label:e,numeric:!0,temporal:!0}:{key:"Invalid Date",label:"Invalid Date",numeric:!1,temporal:!1}}return"number"==typeof e&&Number.isFinite(e)?{key:e,label:e,numeric:!0,temporal:!1}:{key:String(e),label:String(e),numeric:!1,temporal:!1}}function I(e,t){let i=t.map((e,t)=>({label:e,previous:t})).sort((e,t)=>O(e.label)-O(t.label)),l=new Map;i.forEach((e,t)=>l.set(e.previous,t));let o=Array.from(e.keys());e.clear();for(let t=0;t<o.length;t++)e.set(o[t],l.get(t));t.length=i.length;for(let e=0;e<i.length;e++)t[e]=i[e].label}function O(e){return e instanceof Date?e.getTime():Number(e)}function B(e,t,i){let l=i.config.areaStyle?.(t);return l&&("string"==typeof l.fill&&(e.fill=l.fill),e.style=l),e}function H(e,t,i){let l=Math.max(1,Math.floor(e.config.heatmapXBins??20)),o=Math.max(1,Math.floor(e.config.heatmapYBins??20)),r=e.config.heatmapAggregation??"count",a=h(e.config.valueAccessor,"value");if(!e.scales||0===t.length)return[];let[n,s]=e.scales.x.domain(),[c,u]=e.scales.y.domain(),g=(s-n||1)/l,m=(u-c||1)/o,y=l*o;if(y>1e6)return[];let p=new Int32Array(y),d=new Float64Array(y),b=e.config.trackHoverRows||M(e.config.areaStyle)?new Map:void 0;for(let i=0;i<t.length;i++){let r=t[i],s=e.getX(r),f=e.getY(r);if(!isFinite(s)||!isFinite(f))continue;let u=Math.min(Math.floor((s-n)/g),l-1),h=Math.min(Math.floor((f-c)/m),o-1);if(u<0||h<0)continue;let y=h*l+u;p[y]++;let v=a(r);if(d[y]+=isFinite(v)?v:0,b){let e=b.get(y);e||(e=[],b.set(y,e)),e.push(r)}}let v=1/0,S=-1/0;for(let e=0;e<y;e++){if(0===p[e])continue;let t;switch(r){case"sum":t=d[e];break;case"mean":t=d[e]/p[e];break;default:t=p[e]}t<v&&(v=t),t>S&&(S=t)}if(!isFinite(v))return[];let k=e.config.heatmapColorScale,w=X(e.config),C=k?void 0:V(w),N=i.width/l,A=i.height/o,F=e.config.showValues,T=e.config.heatmapValueFormat,W=[];for(let t=0;t<o;t++){let i=t*l;for(let a=0;a<l;a++){let l,s=i+a;if(0===p[s])continue;switch(r){case"sum":l=d[s];break;case"mean":l=d[s]/p[s];break;default:l=p[s]}let u=Y(l,v,S),h=k?k(l):C[u],y=F?{value:l,showValues:!0,valueFormat:T}:{value:l},w=n+(a+.5)*g,M=c+(t+.5)*m,j=x({xi:a,yi:t,value:l,count:p[s],sum:d[s],xCenter:w,yCenter:M,agg:r},b?.get(s));W.push(B(f(a*N,(o-1-t)*A,N,A,h,j,y),j,e))}}return W}var D={chartType:"heatmap",buildScene:(e,t,i)=>function(e,t,i){if(e.config.heatmapAggregation)return H(e,t,i);if(0===t.length)return[];let l=h(e.config.valueAccessor,"value"),o=y(e.config.xAccessor,"x"),r=y(e.config.yAccessor,"y"),a=new Map,n=new Map,s=[],c=[],u=new Array(t.length),g=new Array(t.length),m=!0,p=!0,d=!0,b=!0;for(let e=0;e<t.length;e++){let i=t[e],l=E(o(i)),f=E(r(i));u[e]=l.key,g[e]=f.key,l.numeric?l.temporal&&(m=!1):(m=!1,d=!1),f.numeric?f.temporal&&(p=!1):(p=!1,b=!1),a.has(l.key)||(a.set(l.key,a.size),s.push(l.label)),n.has(f.key)||(n.set(f.key,n.size),c.push(f.label))}let v=a.size,S=n.size;if(0===v||0===S)return[];let k=4096;if(m&&p&&v*S>k&&t.length>k){let l=new Set;for(let o=0;o<t.length;o++){let r=a.get(u[o]),s=n.get(g[o]);if(void 0!==r&&void 0!==s&&(l.add(s*v+r),l.size>k))return H({...e,config:{...e.config,heatmapAggregation:e.config.valueAccessor?"mean":"count"}},t,i)}}d&&I(a,s),b&&I(n,c);let w=new Float64Array(t.length),M=new Float64Array(t.length),x=new Array(t.length),C=new Map,F=0;for(let e=0;e<t.length;e++){let i=t[e],o=a.get(u[e]),r=n.get(g[e]);if(void 0===o||void 0===r)continue;let s,c=l(i),f=r*v+o,m=C.get(f);void 0!==m?s=m:(s=F++,C.set(f,s)),w[s]=f,M[s]=c,x[s]=i}let T=1/0,W=-1/0;for(let e=0;e<F;e++){let t=M[e];isFinite(t)&&(t<T&&(T=t),t>W&&(W=t))}if(!isFinite(T)||!isFinite(W))return[];let j=X(e.config),R=e.config.heatmapColorScale,P=R?void 0:V(j),z=e.config.showValues,O=N(s,[0,i.width],A(s,e.config.xExtent)),D=A(c,e.config.yExtent),L=N(c,[i.height,0],e.config.invertY?[D[1],D[0]]:D),Q=(e,t)=>{let i=e(t-.5),l=e(t+.5);return[Math.min(i,l),Math.abs(l-i)]},U=e.config.heatmapValueFormat,G=[];for(let t=0;t<F;t++){let i=M[t];if(!isFinite(i))continue;let l=w[t],o=l%v,r=(l-o)/v,a=Y(i,T,W),n=R?R(i):P[a],s=z?{value:i,showValues:!0,valueFormat:U}:{value:i},c=x[t],[u,g]=Q(O,o),[m,h]=Q(L,r);G.push(B(f(u,m,g,h,n,c,s),c,e))}return e.scales&&v>0&&S>0&&(e.scales.x=O,e.scales.y=L),G}(e,t,i),canvasRenderers:[e],resolveLegend:function(e,t,i){if(!p(e))return e;let l=1/0,o=-1/0;for(let e of t){if("heatcell"!==e.type)continue;let t=Number(e.value);Number.isFinite(t)&&(t<l&&(l=t),t>o&&(o=t))}if(!(l<=o))return e;let r=i.heatmapColorScale,a=X(i),n=[e,l,o,r,a],s=z.get(e.gradient);if(s&&s.key.every((e,t)=>e===n[t]))return s.legend;let c=r?void 0:V(a),f={...e,gradient:{...e.gradient,domain:[l,o],colorFn:r??(e=>c[Math.max(0,Y(e,l,o))])}};return z.set(e.gradient,{key:n,legend:f}),f}};function L(e,t,i,l){let o=Math.min(t,i),r=Math.max(t,i);if(!(r>o))return[];let a=[],n=-1/0;for(let t of e){let e=Math.max(n,o),i=Math.min(t.upTo,r);if(i>e&&a.push({from:e,to:i,fill:t.fill}),n=t.upTo,n>=r)break}return n<r&&a.push({from:Math.max(n,o),to:r,fill:l}),a}var Q={chartType:"bar",buildScene:(e,t)=>function(e,t){if(!e.config.binSize)return{nodes:[],binBoundaries:[]};let i=r(t,e.getX,e.getY,e.config.binSize,e.getCategory,!!e.config.trackHoverRows||M(e.config.areaStyle),e.config.binAlign);if(0===i.size)return{nodes:[],binBoundaries:[]};let l=null;if(e.getCategory){let t=new Set;for(let e of i.values())for(let i of e.categories.keys())t.add(i);let o=e.config.barColors?Object.keys(e.config.barColors):[],r=new Set(o),a=Array.from(t).filter(e=>!r.has(e)).sort(),n=o.filter(e=>t.has(e)),s=n.join("\0")+""+a.join("\0");e.barCategoryCache&&e.barCategoryCache.key===s?l=e.barCategoryCache.order:(l=[...n,...a],e.barCategoryCache={key:s,order:l})}let o=[],a=e.scales,[n,s]=a.x.domain(),c=e.config.barStyle,f=e.config.themeSemantic?.primary,g=c?.gap,m="number"==typeof g&&g>=0?g:1,h={};c?.stroke&&(h.stroke=c.stroke),"number"==typeof c?.strokeWidth&&(h.strokeWidth=c.strokeWidth),"number"==typeof c?.opacity&&(h.opacity=c.opacity),c?.cursor&&(h.cursor=c.cursor);let y=function(e){if(!Array.isArray(e))return;let t=e.filter(e=>!!e&&("string"==typeof e.fill||"object"==typeof e.fill&&null!==e.fill)),i=t.filter(e=>"number"==typeof e.upTo&&Number.isFinite(e.upTo)).map(e=>({upTo:e.upTo,fill:e.fill})).sort((e,t)=>e.upTo-t.upTo),l=t.find(e=>"number"!=typeof e.upTo||!Number.isFinite(e.upTo)),o=l?[...i,{upTo:1/0,fill:l.fill}]:i;return o.length>0?o:void 0}(c?.valueBands);for(let t of i.values()){let i=Math.max(t.start,n),r=Math.min(t.end,s);if(i>=r)continue;let g=a.x(i),p=a.x(r),d=Math.abs(p-g),b=d>m+1?m:0,v=Math.min(g,p)+b/2,S=Math.max(d-b,1);if(!(S<=0))if(l&&t.categories.size>0){let i=x(l.flatMap(e=>{let i=t.categories.get(e)||0;return 0===i?[]:[x({category:e,value:i},t.categoryRows?.get(e))]}),t.rows),r=0;for(let{category:l,value:n}of i){let s=a.y(r),g=a.y(r+n),m=Math.min(s,g),y=Math.abs(s-g),p=(e.config.barColors?k(e.config.barColors,l):void 0)??c?.fill??f??"#4e79a7",d=x({binStart:t.start,binEnd:t.end,total:t.total,category:l,categoryValue:n,categories:i},t.categoryRows?.get(l)),b=e.config.areaStyle?.(d)??{};o.push(u(v,m,S,y,{fill:p,...h,...b},d,l)),r+=n}}else{let i=a.y(0),l=a.y(t.total),r=Math.min(i,l),n=Math.abs(i-l),s=c?.fill||f||"#007bff",g=x({binStart:t.start,binEnd:t.end,total:t.total},t.rows),m=e.config.areaStyle?.(g)??{},p=u(v,r,S,n,{fill:s,...h,...m},g);if(y){let e=p.style.fill,i="string"==typeof e||"object"==typeof e&&null!==e&&"hatch"===e.type?e:void 0,l=L(y,0,t.total,i);l.length>0&&(p.fillBands=l.map(e=>({y0:a.y(e.from),y1:a.y(e.to),fill:e.fill??s})))}o.push(p)}}let p=new Set;for(let e of i.values())p.add(e.start),p.add(e.end);let d=Array.from(p).sort((e,t)=>e-t);return{nodes:o,binBoundaries:d}}(e,t),canvasRenderers:[n],multiHover:(e,t,i,l)=>{let o=t.scales?.x.invert;if("function"!=typeof o)return e;let r=o(i),a=r instanceof Date?r.getTime():Number(r),n=Number.isFinite(a)?function(e,t){let i,l,o=[];for(let r of e){if("rect"!==r.type)continue;let e=r.datum;if("number"==typeof e?.binStart&&"number"==typeof e.binEnd&&!(t<e.binStart||t>=e.binEnd)){if(!l){i=r.x+r.w/2;let{binStart:t,binEnd:o,total:a,categories:n}=e;l=n?x({binStart:t,binEnd:o,total:a,categories:n},C(n)):e}o.push({datum:e,group:e.category??"",value:e.categoryValue??e.total,color:"string"==typeof r.style.fill?r.style.fill:void 0})}}return l&&void 0!==i?{series:o,datum:l,xPx:i}:null}(t.scene,a):null;if(!n)return e;let s=d(n.datum,o(n.xPx)),c=l.hasHit?{...e,xValue:s,xPx:n.xPx}:b(n.datum,e.x,e.y,{xValue:s,xPx:n.xPx});return c.allSeries=n.series.map(e=>({group:e.group,value:e.value,color:e.color||l.fallbackColor,datum:e.datum})),c}},U={chartType:"swarm",buildScene:(e,t)=>function(e,t){let i=[],l=e.config.swarmStyle||{},o=l.radius??3,r=l.fill??e.config.themeSemantic?.primary??"#007bff",a=l.opacity??.7,n=l.stroke,s=l.strokeWidth,c=l.cursor;for(let l of t){let t=e.getX(l),f=e.getY(l);if(null==f||Number.isNaN(f))continue;let u=e.scales.x(t),g=e.scales.y(f),m=r;if(e.getCategory){let t=String(e.getCategory(l));m=(e.config.barColors?k(e.config.barColors,t):void 0)??m}let{r:h,...y}=e.config.pointStyle?.(l)??{},p={type:"point",x:u,y:g,r:h??o,style:{fill:m,opacity:a,stroke:n,strokeWidth:s,cursor:c,...y},datum:l};e.getPointId&&(p.pointId=String(e.getPointId(l))),i.push(p)}return i}(e,t),canvasRenderers:[t]},G={chartType:"waterfall",buildScene:(e,t,i)=>function(e,t,i){let l=[],o=e.scales,r=e.config.waterfallStyle,a=t.filter(t=>{let i=e.getY(t),l=e.getX(t);return null!=i&&Number.isFinite(i)&&null!=l&&isFinite(l)});if(0===a.length)return l;let n=r?.positiveColor??e.config.themeSemantic?.success??"#28a745",s=r?.negativeColor??e.config.themeSemantic?.danger??"#dc3545",c=r?.gap??1,f=r?.stroke,g=r?.strokeWidth,m=r?.opacity,h=e.waterfallBaseline??e.config.initialValue??0;for(let t=0;t<a.length;t++){let y=a[t],p=e.getX(y),d=e.getY(y),b=h+d,v=o.x(p),S=t>0?o.x(e.getX(a[t-1])):void 0,k=t<a.length-1?o.x(e.getX(a[t+1])):void 0,w=null!=S?(S+v)/2:null!=k?v-(k-v)/2:v-i.width/20,M=null!=k?(v+k)/2:null!=S?v+(v-S)/2:v+i.width/20,x=Math.min(w,M)+c/2,C=Math.max(w,M)-c/2-x;if(C<=0){h=b;continue}let N=o.y(h),A=o.y(b),F=Math.min(N,A),T=Math.abs(N-A),W=d>=0?n:s,j={...y,baseline:h,cumEnd:b,delta:d,_connectorStroke:r?.connectorStroke,_connectorWidth:r?.connectorWidth},R={fill:W,stroke:f,strokeWidth:g,opacity:m,cursor:r?.cursor,...e.config.areaStyle?.(j)};l.push(u(x,F,C,T,R,j)),h=b}return l}(e,t,i),canvasRenderers:[i]},J={chartType:"candlestick",buildScene:(e,t,i)=>function(e,t,i){if(!e.getHigh||!e.getLow||!e.scales)return[];let l=e.config.candlestickRangeMode??!1;if(!(l||e.getOpen&&e.getClose))return[];let o=[],r=e.config.candlestickStyle||{},a=r.rangeColor||"#6366f1",n=l?a:r.upColor||"#28a745",s=l?a:r.downColor||"#dc3545",c=l?a:r.wickColor||"#333",f=r.wickWidth||(l?2:1),u=r.bodyWidth??0;if(null==r.bodyWidth){let i=t.map(t=>e.getX(t)).filter(e=>null!=e&&!Number.isNaN(e)).sort((e,t)=>e-t);if(i.length>1){let t=1/0,l=e.scales.x(i[0]);for(let o=1;o<i.length;o++){let r=e.scales.x(i[o]),a=Math.abs(r-l);a>0&&a<t&&(t=a),l=r}u=t!==1/0?Math.max(2,Math.min(.6*t,20)):6}else u=6}for(let a of t){let t=e.getX(a);if(null==t||Number.isNaN(t))continue;let g=e.getHigh(a),m=e.getLow(a);if(null==g||Number.isNaN(g)||null==m||Number.isNaN(m))continue;let h=l?g:e.getOpen(a),y=l?m:e.getClose(a);if(!l&&(null==h||Number.isNaN(h)||null==y||Number.isNaN(y)))continue;let p=y>=h,d=e.config.pointStyle?.(a)??{},b="string"==typeof d.fill?d.fill:void 0,v="string"==typeof d.stroke?d.stroke:void 0,S="number"==typeof d.strokeWidth?d.strokeWidth:void 0,k="number"==typeof d.opacity?d.opacity:"number"==typeof d.fillOpacity?d.fillOpacity:void 0,w={type:"candlestick",x:e.scales.x(t),openY:e.scales.y(h),closeY:e.scales.y(y),highY:e.scales.y(g),lowY:e.scales.y(m),bodyWidth:u,upColor:b&&p?b:n,downColor:b&&!p?b:s,wickColor:v??(l&&b?b:c),wickWidth:S??f,isUp:p,style:{cursor:r.cursor,...d,...void 0!==k&&{opacity:k}},datum:a};l&&(w.isRange=!0,w.dotRadius=Math.max(2,Math.min(u/2,.12*i.height))),o.push(w)}return o}(e,t,i),canvasRenderers:[l]};export{F as a,j as b,R as c,D as d,Q as e,U as f,G as g,J as h};
@@ -2,9 +2,11 @@ import { Component, type ReactNode, type ErrorInfo } from "react";
2
2
  export interface ChartErrorBoundaryProps {
3
3
  children: ReactNode;
4
4
  /** Custom fallback to show on error. Can be a ReactNode or render function. */
5
- fallback?: ReactNode | ((error: Error) => ReactNode);
5
+ fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
6
6
  /** Callback when an error is caught */
7
7
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
8
+ /** Retry after an error when a key changes (Object.is). When omitted, retries when children change. */
9
+ resetKeys?: readonly unknown[];
8
10
  }
9
11
  interface ChartErrorBoundaryState {
10
12
  error: Error | null;
@@ -34,6 +36,8 @@ export declare class ChartErrorBoundary extends Component<ChartErrorBoundaryProp
34
36
  constructor(props: ChartErrorBoundaryProps);
35
37
  static getDerivedStateFromError(error: Error): ChartErrorBoundaryState;
36
38
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
39
+ componentDidUpdate(prevProps: ChartErrorBoundaryProps, prevState: ChartErrorBoundaryState): void;
40
+ private reset;
37
41
  render(): ReactNode;
38
42
  }
39
43
  export {};
@@ -0,0 +1,22 @@
1
+ import type { ChartDataProfile } from "./chartCapabilityTypes";
2
+ import type { IntentId } from "./intents";
3
+ /** Intents to rank by, each with its share of the composite score. */
4
+ export type IntentWeights = ReadonlyArray<readonly [IntentId, number]>;
5
+ /** Equal weights for intents the caller asked for. */
6
+ export declare function requestedIntentWeights(intents: ReadonlyArray<IntentId>): IntentWeights;
7
+ /**
8
+ * Weighted mean of intent scores. Without weights it falls back to the mean
9
+ * of the non-zero scores, which is only used for data shapes no default
10
+ * weighting covers.
11
+ */
12
+ export declare function weightedIntentScore(intentScores: Partial<Record<IntentId, number>>, weights: IntentWeights): number;
13
+ /**
14
+ * Intent weights for a caller who names no intent, read off the profile: a
15
+ * measure over a time (or named sequential) axis is first a trend,
16
+ * categories are first a ranking, and two plain measures are first a
17
+ * correlation. A plain mean over every intent would instead favour charts
18
+ * that are middling at many intents — or strong at one niche intent — over
19
+ * the one that fits the common case. Graph, hierarchy, and geographic
20
+ * profiles return no weights and keep that mean.
21
+ */
22
+ export declare function defaultProfileIntentWeights(profile: ChartDataProfile): IntentWeights;
@@ -1,4 +1,17 @@
1
1
  import type { StreamFieldSchema, StreamSchema, StreamShape, StreamThroughputBand, StreamThroughputThresholds } from "./streamingTypes";
2
+ export interface NormalizedStreamSchema {
3
+ schema: StreamSchema;
4
+ /** One message per input problem; empty when the schema is clean. */
5
+ warnings: string[];
6
+ }
7
+ /**
8
+ * Check a schema the way a typed caller would have been checked, and
9
+ * repair what can be repaired: kind aliases (`"timestamp"` → `"date"`)
10
+ * are mapped, duplicate field names and invalid hints are dropped. Every
11
+ * repair and every unknown key is reported. Unknown keys stay on the
12
+ * returned schema so custom capabilities can still read them.
13
+ */
14
+ export declare function normalizeStreamSchema(input: StreamSchema): NormalizedStreamSchema;
2
15
  /** Names that should not be plotted as measures when no value role is set. */
3
16
  export declare function isIdLikeFieldName(name: string): boolean;
4
17
  /** Identity columns: explicit `keyFields` unioned with `role: "key"`. */
@@ -11,8 +24,93 @@ export declare function resolveStreamShape(schema: StreamSchema): StreamShape;
11
24
  export declare function streamThroughputBand(schema: StreamSchema, thresholds?: StreamThroughputThresholds): StreamThroughputBand | undefined;
12
25
  export declare function pickTimeField(schema: StreamSchema): StreamFieldSchema | undefined;
13
26
  export declare function pickValueField(schema: StreamSchema): StreamFieldSchema | undefined;
27
+ /**
28
+ * The primary categorical channel. An explicit `role: "category"` wins
29
+ * (key or not); then the first non-key categorical, then a boolean; then,
30
+ * for keyed tables, a key column that is neither a date nor the selected time
31
+ * field, has no `series` role, and has no ID-like name.
32
+ */
14
33
  export declare function pickCategoryField(schema: StreamSchema): StreamFieldSchema | undefined;
34
+ /** A second categorical channel distinct from {@link pickCategoryField}. */
15
35
  export declare function pickSeriesField(schema: StreamSchema): StreamFieldSchema | undefined;
36
+ /**
37
+ * The field that splits a time chart into one series per value. Time charts
38
+ * have no category axis, so an explicit series role wins and otherwise the
39
+ * primary category becomes the series.
40
+ */
41
+ export declare function pickSplitField(schema: StreamSchema): StreamFieldSchema | undefined;
42
+ /** Every numeric field usable as a measure, value/y roles first. */
43
+ export declare function pickMeasureFields(schema: StreamSchema): StreamFieldSchema[];
44
+ /** Declared distinct-value count; booleans are always two. */
45
+ export declare function streamFieldCardinality(field: StreamFieldSchema | undefined): number | undefined;
46
+ /** Names that read as a signed change (`price_delta`, `netFlow`). */
47
+ export declare function isDeltaLikeFieldName(name: string): boolean;
48
+ /**
49
+ * Whether summing the measure across events is meaningful: the explicit
50
+ * `additive` hint, else `true` for count- or delta-like names, else
51
+ * unknown. Names never infer `false`; only the hint excludes charts.
52
+ */
53
+ export declare function streamMeasureAdditivity(field: StreamFieldSchema | undefined): boolean | undefined;
54
+ /**
55
+ * Whether a chart that totals the measure per bound value adds up several
56
+ * events. False for a single-row aggregate and for a keyed table whose
57
+ * every key is among `boundNames` (one current row per bound value). A
58
+ * keyed table that declares no keys is assumed to be keyed by what the
59
+ * chart binds.
60
+ */
61
+ export declare function streamSumsAcrossEvents(schema: StreamSchema, boundNames: ReadonlyArray<string | undefined>): boolean;
62
+ export interface StreamSumPolicy {
63
+ /** Exclusion reason when the measure is declared non-additive. */
64
+ exclude?: string;
65
+ /** Score multiplier: 0.5 while additivity is unknown, otherwise 1. */
66
+ factor: number;
67
+ caveats: string[];
68
+ }
69
+ /**
70
+ * How a chart that totals the measure per category behaves on this
71
+ * stream. Nothing changes when each bound value is one current row;
72
+ * otherwise a non-additive measure excludes the chart and an unknown one
73
+ * halves its scores and says what is being summed.
74
+ */
75
+ export declare function streamCategorySumPolicy(schema: StreamSchema, component: string, boundNames: ReadonlyArray<string | undefined>): StreamSumPolicy;
76
+ /**
77
+ * How a push-mode chart keeps one row per key on a keyed stream: pushing a
78
+ * changelog adds a row per update, so updates must replace rows by id.
79
+ * Empty for append and aggregate streams.
80
+ */
81
+ export declare function streamKeyedChangelogCaveat(schema: StreamSchema, idProp: string): string[];
82
+ /**
83
+ * True when nothing in the schema varies by time or group, so a display
84
+ * can only show one current value: a declared aggregate, or an append
85
+ * stream with a measure and no time, category, or key fields.
86
+ */
87
+ export declare function isSingleValueStream(schema: StreamSchema): boolean;
88
+ /**
89
+ * Rows per second: the numeric `throughput`, or the lower bound of a
90
+ * string band (so "high" means at least 100/s). Undefined when unset.
91
+ */
92
+ export declare function streamRowsPerSecond(schema: StreamSchema): number | undefined;
93
+ /** Realtime charts retain 200 rows unless told otherwise. */
94
+ export declare const DEFAULT_STREAM_BUFFER = 200;
95
+ /** Seconds of history a suggested retention buffer aims to keep visible. */
96
+ export declare const STREAM_VISIBLE_SECONDS = 30;
97
+ /**
98
+ * Ring-buffer props for a raw-event realtime chart: `windowMode: "growing"`
99
+ * for cumulative retention, otherwise a `windowSize` large enough for
100
+ * {@link STREAM_VISIBLE_SECONDS} at the stream's rate (capped at `cap`).
101
+ * Empty when the 200-row default already covers the window.
102
+ */
103
+ export declare function streamBufferProps(schema: StreamSchema, cap: number): {
104
+ windowMode?: "growing";
105
+ windowSize?: number;
106
+ };
107
+ /** The smallest readable duration (ms) at or above `ms`. */
108
+ export declare function niceStreamDuration(ms: number): number;
109
+ /**
110
+ * Time-bin width (ms) giving about 30 bins across the retained window,
111
+ * or one second when the rate is unknown.
112
+ */
113
+ export declare function streamBinSize(schema: StreamSchema, bufferSize: number): number;
16
114
  export declare function hasNumericValue(schema: StreamSchema): boolean;
17
115
  export declare function hasTimeField(schema: StreamSchema): boolean;
18
116
  export declare function hasCategoryField(schema: StreamSchema): boolean;