semiotic 3.9.1 → 3.9.2

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 (328) hide show
  1. package/README.md +102 -48
  2. package/agent-skill/semiotic-charts/SKILL.md +14 -10
  3. package/ai/componentMetadata.cjs +13 -3
  4. package/ai/dist/mcp-server.js +140 -36407
  5. package/ai/examples.md +109 -6
  6. package/ai/reference.md +55 -18
  7. package/ai/schema.json +5964 -1190
  8. package/ai/surface-manifest.json +51 -7
  9. package/ai/system-prompt.md +16 -3
  10. package/dist/c-3SCUN5HI.min.js +1 -0
  11. package/dist/c-3VVKFA4M.min.js +1 -0
  12. package/dist/c-43TJZS3F.min.js +1 -0
  13. package/dist/c-4DTZPSUD.min.js +1 -0
  14. package/dist/c-4ES5367Y.min.js +1 -0
  15. package/dist/c-54IRWOGM.min.js +1 -0
  16. package/dist/c-5D2S4RMI.min.js +1 -0
  17. package/dist/c-5JWCTX3G.min.js +1 -0
  18. package/dist/c-6CMMSN6N.min.js +1 -0
  19. package/dist/c-6HRB2L7H.min.js +1 -0
  20. package/dist/c-7W4SV36A.min.js +1 -0
  21. package/dist/c-A4WRGZFX.min.js +1 -0
  22. package/dist/c-AG7WWVIH.min.js +1 -0
  23. package/dist/c-AH6J4MTN.min.js +1 -0
  24. package/dist/c-ALYR5LKK.min.js +1 -0
  25. package/dist/c-BYDPC44I.min.js +1 -0
  26. package/dist/c-CFFIU2MW.min.js +1 -0
  27. package/dist/c-CGNHBHCE.min.js +1 -0
  28. package/dist/c-CJYSXIFV.min.js +1 -0
  29. package/dist/c-CKLIFCGN.min.js +1 -0
  30. package/dist/c-CZF7MV67.min.js +1 -0
  31. package/dist/c-D53OKBSY.min.js +1 -0
  32. package/dist/c-DBQ2V7CH.min.js +1 -0
  33. package/dist/c-DPMVAUAW.min.js +1 -0
  34. package/dist/c-ECJCKLYY.min.js +1 -0
  35. package/dist/c-EGATGOWJ.min.js +1 -0
  36. package/dist/c-EGR6VYBW.min.js +1 -0
  37. package/dist/c-ENF72HU5.min.js +1 -0
  38. package/dist/c-ESNR43AN.min.js +1 -0
  39. package/dist/c-F3LIKINL.min.js +1 -0
  40. package/dist/c-F5ZB5GJ6.min.js +1 -0
  41. package/dist/c-G3VYMHKE.min.js +1 -0
  42. package/dist/c-GR6MOEQC.min.js +1 -0
  43. package/dist/c-GSVCN34B.min.js +1 -0
  44. package/dist/c-GYOQCEFP.min.js +1 -0
  45. package/dist/c-H3DNMTCC.min.js +1 -0
  46. package/dist/c-I6J3FEZE.min.js +1 -0
  47. package/dist/c-IGH6MGJ5.min.js +1 -0
  48. package/dist/c-II2EEAJN.min.js +1 -0
  49. package/dist/c-J6M4JHRS.min.js +1 -0
  50. package/dist/c-JM3MGLQV.min.js +1 -0
  51. package/dist/c-KM3N7F7R.min.js +1 -0
  52. package/dist/c-LF5BZFNC.min.js +1 -0
  53. package/dist/c-LKBSGFQC.min.js +1 -0
  54. package/dist/c-NDJADPIF.min.js +1 -0
  55. package/dist/c-NVPQCIL5.min.js +1 -0
  56. package/dist/c-OFWJBEE5.min.js +1 -0
  57. package/dist/c-OYFHP5F5.min.js +1 -0
  58. package/dist/c-PGKQGGQ2.min.js +1 -0
  59. package/dist/c-Q2IPZ3MU.min.js +1 -0
  60. package/dist/c-QKHMBE2E.min.js +1 -0
  61. package/dist/c-QMVM3AY6.min.js +1 -0
  62. package/dist/c-QSGWX53A.min.js +1 -0
  63. package/dist/c-RJKEKZOO.min.js +1 -0
  64. package/dist/c-SFDIIU5G.min.js +1 -0
  65. package/dist/c-SRTBCRVE.min.js +1 -0
  66. package/dist/c-T6UAIKBH.min.js +1 -0
  67. package/dist/c-TMCTEVVW.min.js +1 -0
  68. package/dist/c-TMOSJLT3.min.js +1 -0
  69. package/dist/c-U6ESPM7V.min.js +1 -0
  70. package/dist/c-UC5PTTFI.min.js +1 -0
  71. package/dist/c-VGKUEZBC.min.js +1 -0
  72. package/dist/c-VN2HG5BS.min.js +1 -0
  73. package/dist/{c-J5G56TUH.min.js → c-VPZDY5Q4.min.js} +1 -1
  74. package/dist/c-VRXUB2F2.min.js +1 -0
  75. package/dist/c-VUBQNQJH.min.js +1 -0
  76. package/dist/c-VUH4PGZY.min.js +1 -0
  77. package/dist/c-XDRV7RKW.min.js +1 -0
  78. package/dist/c-YGZHURXZ.min.js +1 -0
  79. package/dist/components/Annotation.d.ts +1 -1
  80. package/dist/components/access/chartAccessCapabilities.generated.d.ts +14 -0
  81. package/dist/components/access/chartAccessContract.d.ts +90 -0
  82. package/dist/components/access/chartAccessContractFixtures.d.ts +11 -0
  83. package/dist/components/ai/aestheticProfileTypes.d.ts +35 -0
  84. package/dist/components/ai/annotationProvenance.d.ts +2 -7
  85. package/dist/components/ai/auditVisualHierarchy.d.ts +49 -0
  86. package/dist/components/ai/builtInChartRecipeLayouts.d.ts +2 -0
  87. package/dist/components/ai/builtInChartRecipePublic.d.ts +4 -0
  88. package/dist/components/ai/builtInChartRecipes.d.ts +26 -0
  89. package/dist/components/ai/chartCapabilities.d.ts +3 -1
  90. package/dist/components/ai/chartRecipeRegistry.d.ts +2 -1
  91. package/dist/components/ai/chartRecipes.d.ts +6 -0
  92. package/dist/components/ai/colorEvidence.d.ts +12 -0
  93. package/dist/components/ai/evaluateAesthetics.d.ts +47 -0
  94. package/dist/components/ai/geoNavigation.d.ts +4 -0
  95. package/dist/components/ai/hierarchyNavigation.d.ts +4 -0
  96. package/dist/components/ai/navigationTree.d.ts +7 -1
  97. package/dist/components/ai/qualityFixtures.d.ts +8 -0
  98. package/dist/components/ai/suggestionPropContracts.d.ts +1 -1
  99. package/dist/components/ai/useNavigationSync.d.ts +3 -3
  100. package/dist/components/charts/index.d.ts +4 -0
  101. package/dist/components/charts/network/ChordDiagram.d.ts +5 -1
  102. package/dist/components/charts/network/CirclePack.d.ts +8 -1
  103. package/dist/components/charts/network/OrbitDiagram.d.ts +9 -0
  104. package/dist/components/charts/network/TreeDiagram.d.ts +8 -1
  105. package/dist/components/charts/network/Treemap.d.ts +8 -1
  106. package/dist/components/charts/ordinal/BarChart.d.ts +6 -0
  107. package/dist/components/charts/ordinal/BoxPlot.d.ts +3 -0
  108. package/dist/components/charts/ordinal/DonutChart.d.ts +3 -0
  109. package/dist/components/charts/ordinal/DotPlot.d.ts +3 -0
  110. package/dist/components/charts/ordinal/FunnelChart.d.ts +3 -0
  111. package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
  112. package/dist/components/charts/ordinal/Histogram.d.ts +3 -0
  113. package/dist/components/charts/ordinal/LikertChart.d.ts +3 -0
  114. package/dist/components/charts/ordinal/PieChart.d.ts +3 -0
  115. package/dist/components/charts/ordinal/RadarChart.capability.d.ts +2 -0
  116. package/dist/components/charts/ordinal/RadarChart.d.ts +75 -0
  117. package/dist/components/charts/ordinal/RidgelinePlot.d.ts +3 -0
  118. package/dist/components/charts/ordinal/SwarmPlot.d.ts +3 -0
  119. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +3 -0
  120. package/dist/components/charts/ordinal/ViolinPlot.d.ts +3 -0
  121. package/dist/components/charts/physics/GauntletChart.d.ts +1 -5
  122. package/dist/components/charts/physics/chainReactionTypes.d.ts +3 -0
  123. package/dist/components/charts/physics/gauntletPhysics.d.ts +1 -0
  124. package/dist/components/charts/physics/physicsHocUtils.d.ts +7 -1
  125. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +10 -1
  126. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +11 -1
  127. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +14 -5
  128. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -1
  129. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +7 -1
  130. package/dist/components/charts/realtime/aggregate.d.ts +12 -1
  131. package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +4 -2
  132. package/dist/components/charts/realtime/realtimeStyleRules.d.ts +4 -0
  133. package/dist/components/charts/shared/annotationStatusFilter.d.ts +18 -0
  134. package/dist/components/charts/shared/chartDefinitionPilot.d.ts +5 -4
  135. package/dist/components/charts/shared/chartSpecCore.d.ts +2 -2
  136. package/dist/components/charts/shared/heatmapStyleRules.d.ts +13 -0
  137. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  138. package/dist/components/charts/shared/networkUtils.d.ts +14 -0
  139. package/dist/components/charts/shared/selectionUtils.d.ts +3 -1
  140. package/dist/components/charts/shared/types.d.ts +4 -2
  141. package/dist/components/charts/shared/useChartLegend.d.ts +2 -1
  142. package/dist/components/charts/shared/useLikertAggregation.d.ts +8 -2
  143. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +9 -5
  144. package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +1 -1
  145. package/dist/components/charts/shared/useXYBrush.d.ts +24 -0
  146. package/dist/components/charts/xy/Heatmap.d.ts +16 -0
  147. package/dist/components/charts/xy/LineChart.d.ts +9 -0
  148. package/dist/components/charts/xy/Scatterplot.d.ts +7 -0
  149. package/dist/components/charts/xy/WaterfallChart.capability.d.ts +2 -0
  150. package/dist/components/charts/xy/WaterfallChart.d.ts +68 -0
  151. package/dist/components/evidence/chartEvidenceEnvelope.d.ts +146 -0
  152. package/dist/components/evidence/evidenceGate.d.ts +28 -0
  153. package/dist/components/realtime/BinAccumulator.d.ts +5 -1
  154. package/dist/components/realtime/types.d.ts +16 -7
  155. package/dist/components/recipes/adjacencyFlow.d.ts +12 -0
  156. package/dist/components/recipes/adjacencyFlowAggregation.d.ts +72 -0
  157. package/dist/components/recipes/adjacencyFlowGeometry.d.ts +79 -0
  158. package/dist/components/recipes/lineageDag.d.ts +17 -0
  159. package/dist/components/recipes/lineageDagHulls.d.ts +22 -0
  160. package/dist/components/recipes/transitDiagram.d.ts +75 -0
  161. package/dist/components/recipes/transitDiagramGeometry.d.ts +47 -0
  162. package/dist/components/semiotic-access.d.ts +9 -0
  163. package/dist/components/semiotic-ai-audits.d.ts +17 -0
  164. package/dist/components/semiotic-ai-core.d.ts +9 -0
  165. package/dist/components/semiotic-ai.d.ts +5 -17
  166. package/dist/components/semiotic-evidence.d.ts +10 -0
  167. package/dist/components/semiotic-line.d.ts +9 -0
  168. package/dist/components/semiotic-network.d.ts +3 -0
  169. package/dist/components/semiotic-ordinal.d.ts +2 -0
  170. package/dist/components/semiotic-realtime-core.d.ts +3 -2
  171. package/dist/components/semiotic-recipes-core.d.ts +6 -0
  172. package/dist/components/semiotic-themes-core.d.ts +3 -0
  173. package/dist/components/semiotic-utils-core.d.ts +5 -0
  174. package/dist/components/semiotic-xy.d.ts +3 -0
  175. package/dist/components/semiotic.d.ts +9 -3
  176. package/dist/components/server/renderDashboard.d.ts +37 -0
  177. package/dist/components/server/renderEvidence.d.ts +27 -0
  178. package/dist/components/server/renderToStaticSVG.d.ts +2 -30
  179. package/dist/components/server/serverChartConfigShared.d.ts +13 -0
  180. package/dist/components/server/serverChartConfigs.d.ts +9 -0
  181. package/dist/components/server/serverChartConfigsComposite.d.ts +4 -0
  182. package/dist/components/server/serverChartConfigsCustom.d.ts +2 -0
  183. package/dist/components/server/serverChartConfigsGeo.d.ts +1 -0
  184. package/dist/components/server/serverChartConfigsOrdinal.d.ts +3 -2
  185. package/dist/components/server/serverChartConfigsXY.d.ts +1 -0
  186. package/dist/components/server/serverChartConfigsXYExtra.d.ts +3 -0
  187. package/dist/components/server/serverCompositeChainReaction.d.ts +3 -0
  188. package/dist/components/server/serverOrdinalGauge.d.ts +3 -0
  189. package/dist/components/server/serverOrdinalLikert.d.ts +2 -0
  190. package/dist/components/store/selectionProvenance.d.ts +8 -0
  191. package/dist/components/store/themeCore.d.ts +5 -1
  192. package/dist/components/stream/GeoPipelineStore.d.ts +1 -1
  193. package/dist/components/stream/MarginalGraphics.d.ts +3 -3
  194. package/dist/components/stream/MarginalGraphicsLazy.d.ts +22 -0
  195. package/dist/components/stream/NetworkPipelineStore.d.ts +2 -0
  196. package/dist/components/stream/OrdinalPipelineStore.d.ts +1 -1
  197. package/dist/components/stream/PipelineStore.d.ts +1 -1
  198. package/dist/components/stream/SceneToSVG.d.ts +1 -1
  199. package/dist/components/stream/canvasSetup.d.ts +8 -2
  200. package/dist/components/stream/customLayoutAttempt.d.ts +21 -0
  201. package/dist/components/stream/geoTypes.d.ts +1 -1
  202. package/dist/components/stream/isServerEnvironment.d.ts +6 -0
  203. package/dist/components/stream/layouts/forceLayoutNodeSize.d.ts +12 -0
  204. package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +2 -9
  205. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +2 -21
  206. package/dist/components/stream/layouts/forceLayoutWorkerPolicy.d.ts +21 -0
  207. package/dist/components/stream/layouts/index.d.ts +6 -12
  208. package/dist/components/stream/layouts/missingPlugin.d.ts +7 -0
  209. package/dist/components/stream/layouts/registerBuiltIn.d.ts +1 -0
  210. package/dist/components/stream/layouts/registry.d.ts +12 -0
  211. package/dist/components/stream/marginalConfig.d.ts +3 -0
  212. package/dist/components/stream/networkCustomLayout.d.ts +7 -0
  213. package/dist/components/stream/networkCustomLayoutOutput.d.ts +13 -0
  214. package/dist/components/stream/networkCustomLayoutRunner.d.ts +1 -1
  215. package/dist/components/stream/networkTypes.d.ts +5 -1
  216. package/dist/components/stream/ordinalTypes.d.ts +1 -1
  217. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +1 -1
  218. package/dist/components/stream/pipelineDomainResolution.d.ts +6 -0
  219. package/dist/components/stream/renderers/pointCanvasRenderer.d.ts +4 -0
  220. package/dist/components/stream/renderers/resolveCSSColor.d.ts +4 -4
  221. package/dist/components/stream/types.d.ts +8 -1
  222. package/dist/components/stream/useEnsureCustomXYRenderers.d.ts +18 -0
  223. package/dist/components/stream/useMarginalValues.d.ts +13 -0
  224. package/dist/components/stream/xyCanvasRenderers.d.ts +4 -4
  225. package/dist/components/stream/xyPlugins/areaPlugin.d.ts +2 -0
  226. package/dist/components/stream/xyPlugins/barPlugin.d.ts +2 -0
  227. package/dist/components/stream/xyPlugins/candlestickPlugin.d.ts +2 -0
  228. package/dist/components/stream/xyPlugins/customPlugin.d.ts +6 -0
  229. package/dist/components/stream/xyPlugins/heatmapPlugin.d.ts +2 -0
  230. package/dist/components/stream/xyPlugins/lineFamily.d.ts +5 -0
  231. package/dist/components/stream/xyPlugins/linePlugin.d.ts +2 -0
  232. package/dist/components/stream/xyPlugins/missingPlugin.d.ts +7 -0
  233. package/dist/components/stream/xyPlugins/mixedPlugin.d.ts +2 -0
  234. package/dist/components/stream/xyPlugins/pointPlugin.d.ts +3 -0
  235. package/dist/components/stream/xyPlugins/registerBuiltIn.d.ts +1 -0
  236. package/dist/components/stream/xyPlugins/registry.d.ts +31 -0
  237. package/dist/components/stream/xyPlugins/stackedAreaPlugin.d.ts +2 -0
  238. package/dist/components/stream/xyPlugins/swarmPlugin.d.ts +2 -0
  239. package/dist/components/stream/xyPlugins/waterfallPlugin.d.ts +2 -0
  240. package/dist/forceLayoutWorker.js +1 -1
  241. package/dist/geo.min.js +1 -1
  242. package/dist/geo.module.min.js +1 -1
  243. package/dist/network.module.min.js +1 -1
  244. package/dist/ordinal.module.min.js +1 -1
  245. package/dist/physics.module.min.js +1 -1
  246. package/dist/rough.module.min.js +1 -1
  247. package/dist/semiotic-access.d.ts +9 -0
  248. package/dist/semiotic-access.min.js +2 -0
  249. package/dist/semiotic-access.module.min.js +2 -0
  250. package/dist/semiotic-ai-core.d.ts +9 -0
  251. package/dist/semiotic-ai-core.min.js +1 -1
  252. package/dist/semiotic-ai-core.module.min.js +1 -1
  253. package/dist/semiotic-ai.d.ts +5 -17
  254. package/dist/semiotic-ai.module.min.js +1 -1
  255. package/dist/semiotic-client-cjs-shared.min.js +1 -1
  256. package/dist/semiotic-client-shared.module.min.js +1 -1
  257. package/dist/semiotic-evidence.d.ts +10 -0
  258. package/dist/semiotic-evidence.min.js +1 -0
  259. package/dist/semiotic-evidence.module.min.js +1 -0
  260. package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
  261. package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
  262. package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
  263. package/dist/semiotic-experimental-vacp.min.js +1 -1
  264. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  265. package/dist/semiotic-line.d.ts +9 -0
  266. package/dist/semiotic-line.min.js +2 -0
  267. package/dist/semiotic-line.module.min.js +2 -0
  268. package/dist/semiotic-network.d.ts +3 -0
  269. package/dist/semiotic-ordinal.d.ts +2 -0
  270. package/dist/semiotic-realtime-core.d.ts +3 -2
  271. package/dist/semiotic-realtime-core.module.min.js +1 -1
  272. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
  273. package/dist/semiotic-recipes-core.d.ts +6 -0
  274. package/dist/semiotic-recipes-core.module.min.js +1 -1
  275. package/dist/semiotic-server-edge-node.module.min.js +1 -1
  276. package/dist/semiotic-server-edge.min.js +1 -1
  277. package/dist/semiotic-server-edge.module.min.js +1 -1
  278. package/dist/semiotic-server-node.min.js +1 -1
  279. package/dist/semiotic-server-node.module.min.js +1 -1
  280. package/dist/semiotic-themes-core.d.ts +3 -0
  281. package/dist/semiotic-themes-core.min.js +1 -1
  282. package/dist/semiotic-themes-core.module.min.js +1 -1
  283. package/dist/semiotic-themes.min.js +1 -1
  284. package/dist/semiotic-themes.module.min.js +1 -1
  285. package/dist/semiotic-utils-core.d.ts +5 -0
  286. package/dist/semiotic-utils-core.min.js +1 -1
  287. package/dist/semiotic-utils-core.module.min.js +1 -1
  288. package/dist/semiotic-xy.d.ts +3 -0
  289. package/dist/semiotic.d.ts +9 -3
  290. package/dist/semiotic.module.min.js +1 -1
  291. package/dist/server.min.js +1 -1
  292. package/dist/server.module.min.js +1 -1
  293. package/dist/xy.module.min.js +1 -1
  294. package/package.json +39 -60
  295. package/dist/c-3KZD6AXJ.min.js +0 -1
  296. package/dist/c-4TWEX5HG.min.js +0 -1
  297. package/dist/c-5YCIX3VZ.min.js +0 -1
  298. package/dist/c-6FEKTA3U.min.js +0 -1
  299. package/dist/c-74HEEZGK.min.js +0 -1
  300. package/dist/c-BWNB6USU.min.js +0 -1
  301. package/dist/c-C25ENHIK.min.js +0 -1
  302. package/dist/c-CDR5AO3R.min.js +0 -1
  303. package/dist/c-E3JFRRMI.min.js +0 -1
  304. package/dist/c-EBFPQHHO.min.js +0 -1
  305. package/dist/c-GIKRQI4X.min.js +0 -1
  306. package/dist/c-GPYOFETM.min.js +0 -1
  307. package/dist/c-IDUHYYSI.min.js +0 -1
  308. package/dist/c-JAZ73J32.min.js +0 -1
  309. package/dist/c-KG3NXHAL.min.js +0 -1
  310. package/dist/c-KII3PLZE.min.js +0 -1
  311. package/dist/c-LIXGXMNS.min.js +0 -1
  312. package/dist/c-LVEY6D6B.min.js +0 -1
  313. package/dist/c-M4Y3BHFR.min.js +0 -1
  314. package/dist/c-MAIICR2Z.min.js +0 -1
  315. package/dist/c-MG5DM6VE.min.js +0 -1
  316. package/dist/c-O6U6K4CW.min.js +0 -1
  317. package/dist/c-OQ7M4AGV.min.js +0 -1
  318. package/dist/c-OXYMVK7Q.min.js +0 -1
  319. package/dist/c-QHF5YON3.min.js +0 -1
  320. package/dist/c-RR3GO5SW.min.js +0 -1
  321. package/dist/c-S2BXNNJN.min.js +0 -1
  322. package/dist/c-SUILCHWU.min.js +0 -1
  323. package/dist/c-US5ZFT6E.min.js +0 -1
  324. package/dist/c-UUKVD4WB.min.js +0 -1
  325. package/dist/c-WJCD5EUY.min.js +0 -1
  326. package/dist/c-YDAY2WFR.min.js +0 -1
  327. package/dist/c-ZOWWU34K.min.js +0 -1
  328. /package/dist/{c-COHXCW3Q.min.js → c-YZVRZGX2.min.js} +0 -0
@@ -0,0 +1 @@
1
+ import{coerceDateLikeValue as t,parseDateLikeString as e}from"./c-W3CE4A4S.min.js";import{resolveNodeColor as i}from"./c-5D2S4RMI.min.js";import{normalizeMarginalConfig as r}from"./c-ENF72HU5.min.js";import{computeBinExtent as s,getXYCanvasRenderers as o,getXYPlugin as n,getXYSceneBuilder as a,registerXYPlugin as c,unwrapXYScene as l}from"./c-TMOSJLT3.min.js";import{DataSourceAdapter as h,IncrementalExtent as u,buildEnrichAnnotationData as g,resolveAnnotationAccessor as d,snapXYIntroTargets as p,ticksForMode as y,toIdSet as f,xyFrameLegendOptions as m}from"./c-SRTBCRVE.min.js";import{RingBuffer as x,applyPulse as v,compactTimestampBufferForRemoval as b,createTimestampBufferForData as w,ensureRingBufferCapacity as A,hasActivePulses as k,pushWithTimestamp as _,refreshIdlePulse as C,useSemanticFrameInteractions as S,useXYKeyboardNavigation as M}from"./c-RJKEKZOO.min.js";import{computeDivergingStackExtent as P,computeStackOffsets as R,normalizeColorGradient as Y,normalizeGradient as T}from"./c-F3LIKINL.min.js";import{enrichDatumWithBand as D}from"./c-VGKUEZBC.min.js";import{needsInteractionCanvasPaint as E}from"./c-OCI56QF2.min.js";import{AXIS_FRAME_DEFAULT_MARGIN as B}from"./c-GSVCN34B.min.js";import{StalenessBadge as O,applyDecay as L,attachUpdateResultStore as z,buildDatumIndexMap as F,composeOverlays as N,computeDecayOpacity as I,filterAnnotationsByStatus as W,findHitPointInQuadtree as X,getHitRadius as V,hitTestRect as $,isTimeLandmark as j,paintCanvasBackground as H,paintSceneWithBackend as G,renderSceneWithBackend as q,resolveCanvasBackground as K,resolveFrameGraphics as U,resolveStaleness as J,runCustomLayoutAttempt as Q,shouldHandleFramePointer as Z,useConfigSync as tt,useLayoutSelectionSync as et,useLegendCategoryEmission as it,useStableShallow as rt,useStalenessCheck as st,warnCustomLayoutDiagnostics as ot}from"./c-AG7WWVIH.min.js";import{wrapWithCustomLayoutSelection as nt}from"./c-G36WS6LN.min.js";import{accessorsEquivalent as at,resolveAccessor as ct,resolveStringAccessor as lt}from"./c-MT3WBK7M.min.js";import{xySceneNodeToSVG as ht}from"./c-DBQ2V7CH.min.js";import{AccessibleDataTable as ut,AccessibleTablePortal as gt,AriaLiveTooltip as dt,CanvasFrameBackground as pt,FlippingTooltip as yt,FocusRing as ft,SVGChartTitle as mt,SceneRevisionDiagnosticsObserver as xt,ScreenReaderSummary as vt,SkipToTableLink as bt,UpdateResultTracker as wt,annotationLayout as At,buildHoverData as kt,computeCanvasAriaLabel as _t,computeEasing as Ct,computeRawProgress as St,createDefaultAnnotationRules as Mt,defaultTooltipStyle as Pt,filterSparseArray as Rt,getDevicePixelRatio as Yt,getPointerHitRadius as Tt,isAnnotationActivationTarget as Dt,isServerEnvironment as Et,lerp as Bt,now as Ot,observationInputType as Lt,prepareCanvas as zt,rehitCanvasMarkCursor as Ft,renderAnnotationPass as Nt,renderLegendFromConfig as It,resolveLegendSideGutter as Wt,resolveXYAxisChrome as Xt,sceneHasAuthoredCursor as Vt,sceneMarkCursor as $t,setCanvasMarkCursor as jt,smartTooltipEntries as Ht,subscribeToCanvasFontInvalidation as Gt,syncCanvasSize as qt,unlockCrosshair as Kt,useAnnotationActivationOptions as Ut,useCanvasMarkCursorCleanup as Jt,useCrosshairPosition as Qt,useFrame as Zt,useFrameCanvasHost as te,useHydration as ee,useSceneRevisionDiagnostics as ie,useWasHydratingFromSSR as re}from"./c-VN2HG5BS.min.js";import{resolveThemeSemanticColors as se}from"./c-VRXUB2F2.min.js";import{STREAMING_PALETTE as oe}from"./c-EGR6VYBW.min.js";import{getCSSColorCacheVersion as ne,glyphHitGeometry as ae,resolveCurveFactory as ce,symbolRadius as le}from"./c-QKHMBE2E.min.js";import*as he from"react";import{forwardRef as ue,memo as ge,useCallback as de,useEffect as pe,useId as ye,useImperativeHandle as fe,useMemo as me,useRef as xe,useState as ve}from"react";import*as be from"react";import{jsx as we}from"react/jsx-runtime";var Ae=null,ke=null;function _e(t){const[e,i]=be.useState(()=>Ae);return be.useEffect(()=>{if(e)return;let t=!1;return(Ae?Promise.resolve(Ae):(ke||(ke=import("./c-6O5EVOPH.min.js").then(t=>Ae=t.XYBrushOverlay).catch(t=>{throw ke=null,t})),ke)).then(e=>{t||i(()=>e)}),()=>{t=!0}},[e]),e?we(e,{...t}):null}function Ce(t,e,i){if(e._transitionKey)return e._transitionKey;switch(e.type){case"point":if(e.pointId)return"p:"+e.pointId;if("streaming"===t.runtimeMode&&e.datum){const i=t.getX(e.datum),r=t.getY(e.datum);if(t.getCategory)return`p:${t.getCategory(e.datum)}:${i}:${r}`;if(null!=i&&null!=r)return`p:${i}:${r}`}return"p:"+i;case"glyph":return e.pointId?"g:"+e.pointId:"g:"+i;case"rect":return`r:${e.group||""}:${e.datum?.binStart??e.datum?.category??i}`;case"heatcell":return`h:${e.x}_${e.y}`;case"candlestick":return null==e.datum?"c:"+i:"c:"+t.getX(e.datum);case"line":return"l:"+(e.group||"_default");case"area":return"a:"+(e.group||"_default");default:return null}}function Se(t){return t?null!=t.opacity?t.opacity:null!=t.fillOpacity?t.fillOpacity:1:1}var Me=new Set;function Pe(t,e){const i="function"==typeof t?t:i=>i[t||e];return t=>{const e=i(t);return null==e?NaN:+e}}function Re(t){const e=[],i=["bar","swarm","waterfall"].includes(t.chartType)||"streaming"===t.runtimeMode,r=Pe(i&&t.valueAccessor||t.yAccessor,i?"value":"y");if(t.boundsAccessor){const i=ct(t.boundsAccessor,"bounds");e.push({kind:"bounds",getTop:t=>{const e=r(t);if(!Number.isFinite(e))return NaN;const s=i(t);return Number.isFinite(s)&&0!==s?e+s:e},getBottom:t=>{const e=r(t);if(!Number.isFinite(e))return NaN;const s=i(t);return Number.isFinite(s)&&0!==s?e-s:e},style:t.boundsStyle,perSeries:!0,interactive:!1})}if(t.band){const i=Array.isArray(t.band)?t.band:[t.band];for(const t of i)e.push({kind:"band",getTop:Pe(t.y1Accessor,"y1"),getBottom:Pe(t.y0Accessor,"y0"),style:t.style,perSeries:!1!==t.perSeries,interactive:!0===t.interactive})}return e}import{scaleLinear as Ye,scaleLog as Te,scaleSymlog as De,scaleTime as Ee}from"d3-scale";function Be(t,e){return e?[e[0]??t[0],e[1]??t[1]]:t}function Oe(t,e,i){if("log"===t){const t=[Math.max(e[0],1e-6),Math.max(e[1],1e-6)];return Te().domain(t).range(i).clamp(!0)}return"symlog"===t?De().domain(e).range(i):"time"===t?Ee().domain([new Date(e[0]),new Date(e[1])]).range(i):Ye().domain(e).range(i)}var Le=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],ze=["scene-style","data-paint","accessibility","evidence"],Fe=(t,e)=>({retainedData:t,invalidations:e}),Ne=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Ie=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],We=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Xe=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Ve=["scene-geometry","data-paint","accessibility","evidence"],$e=["scene-style","data-paint","accessibility","evidence"],je=[],He={chartType:Fe("rebuild",Ne),runtimeMode:Fe("rebuild",Ne),xAccessor:Fe("rebuild",Ne),yAccessor:Fe("rebuild",Ne),timeAccessor:Fe("rebuild",Ne),valueAccessor:Fe("rebuild",Ne),y0Accessor:Fe("rebuild",Ne),boundsAccessor:Fe("rebuild",Ne),band:Fe("rebuild",Ne),openAccessor:Fe("rebuild",Ne),highAccessor:Fe("rebuild",Ne),lowAccessor:Fe("rebuild",Ne),closeAccessor:Fe("rebuild",Ne),candlestickRangeMode:Fe("rebuild",Ne),accessorRevision:Fe("rebuild",Ne),groupAccessor:Fe("rebuild",Ie),categoryAccessor:Fe("rebuild",Ie),lineDataAccessor:Fe("rebuild",Ie),colorAccessor:Fe("rebuild",$e),sizeAccessor:Fe("rebuild",Ve),symbolAccessor:Fe("rebuild",Ve),pointIdAccessor:Fe("rebuild",Ve),xScaleType:Fe("preserve",We),yScaleType:Fe("preserve",We),xExtent:Fe("preserve",We),yExtent:Fe("preserve",We),extentPadding:Fe("preserve",We),scalePadding:Fe("preserve",We),axisExtent:Fe("preserve",We),yAxisExtent:Fe("preserve",We),binSize:Fe("preserve",We),normalize:Fe("preserve",We),heatmapAggregation:Fe("preserve",We),heatmapXBins:Fe("preserve",We),heatmapYBins:Fe("preserve",We),arrowOfTime:Fe("preserve",Xe),baseline:Fe("preserve",Xe),stackOrder:Fe("preserve",Xe),sizeRange:Fe("preserve",Xe),curve:Fe("preserve",Xe),areaGroups:Fe("preserve",Xe),customLayout:Fe("preserve",Xe),layoutConfig:Fe("preserve",Xe),layoutMargin:Fe("preserve",Xe),symbolMap:Fe("preserve",Ve),showValues:Fe("preserve",Ve),heatmapValueFormat:Fe("preserve",Ve),lineStyle:Fe("preserve",$e),pointStyle:Fe("preserve",$e),areaStyle:Fe("preserve",$e),barStyle:Fe("preserve",$e),swarmStyle:Fe("preserve",$e),waterfallStyle:Fe("preserve",$e),candlestickStyle:Fe("preserve",$e),boundsStyle:Fe("preserve",$e),gradientFill:Fe("preserve",$e),lineGradient:Fe("preserve",$e),semanticLineStops:Fe("preserve",$e),colorScheme:Fe("preserve",$e),themeCategorical:Fe("preserve",$e),themeSemantic:Fe("preserve",$e),themeSequential:Fe("preserve",$e),themeDiverging:Fe("preserve",$e),barColors:Fe("preserve",$e),decay:Fe("preserve",$e),pulse:Fe("preserve",$e),staleness:Fe("preserve",$e),layoutSelection:Fe("preserve",$e),annotations:Fe("preserve",["overlay","accessibility","evidence"]),windowSize:Fe("preserve",je),windowMode:Fe("preserve",je),maxCapacity:Fe("preserve",je),clock:Fe("preserve",je),transition:Fe("preserve",je),introAnimation:Fe("preserve",je),onLayoutError:Fe("preserve",je)},Ge=Fe("preserve",Xe),qe=class{constructor(){this.tracker=new wt}get last(){return this.tracker.last}subscribe(t){return this.tracker.subscribe(t)}recordData(t,e){return this.tracker.record({kind:t,...void 0===e?{}:{count:e}},Le)}recordNoop(t){return this.tracker.record({kind:t,..."restyle"===t?{}:{count:0}},[])}recordRestyle(t){return t?this.tracker.record({kind:"restyle"},ze):this.recordNoop("restyle")}recordConfig(t){const e=function(t){let e="preserve";const i=new Set;for(const r of t){const t=He[r]??Ge;"rebuild"===t.retainedData&&(e="rebuild");for(const e of t.invalidations)i.add(e)}return{retainedData:e,invalidations:i}}(t);return this.tracker.record({kind:"config",keys:t},e.invalidations)}};import{quadtree as Ke}from"d3-quadtree";var Ue=class{constructor(){this.maxRadius=0,this.tree=null}get quadtree(){return this.tree}get maxPointRadius(){return this.maxRadius}clear(){this.tree=null,this.maxRadius=0}rebuild(t,e){if("scatter"!==t&&"bubble"!==t&&"custom"!==t)return void this.clear();let i=0,r=0;for(const t of e)"point"===t.type&&!1!==t.interactive&&(i++,t.r>r&&(r=t.r));if(this.maxRadius=r,500>=i)return void(this.tree=null);const s=Array(i);let o=0;for(const t of e)"point"===t.type&&!1!==t.interactive&&(s[o++]=t);this.tree=Ke().x(t=>t.x).y(t=>t.y).addAll(s)}},Je=class i{constructor(t){if(this.xExtent=new u,this.yExtent=new u,this.growingCapacityWarned=!1,this.windowSizeWarned=!1,this.resolvedRibbons=[],this.timestampBuffer=null,this.activeTransition=null,this._hasRenderedOnce=!1,this.prevPositionMap=new Map,this.prevPathMap=new Map,this.exitNodes=[],this.lastIngestTime=0,this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this._ingestVersion=0,this._datumIndexCache=null,this._bufferArrayCache=null,this._bufferDirty=!0,this.needsFullRebuild=!0,this.lastLayout=null,this.updateResults=new qe,this.scales=null,this.scene=[],this.version=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutFailedThisBuild=!1,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.xIsDate=!1,this.spatialIndex=new Ue,this._lastBoundedInsertsRef=null,this.applyPulse=(t,e,i)=>!(!this.config.pulse||!this.timestampBuffer)&&v(this.config.pulse,t,e,this.timestampBuffer,this.getDatumIndexMap(e),i),this.config=t,this.buffer=new x(t.windowSize),this.growingCap=t.windowSize,["bar","swarm","waterfall"].includes(t.chartType)||"streaming"===t.runtimeMode?(this.getX=ct(t.timeAccessor||t.xAccessor,"time"),this.getY=ct(t.valueAccessor||t.yAccessor,"value")):(this.getX=ct(t.xAccessor,"x"),this.getY=ct(t.yAccessor,"y")),this.getGroup=lt(t.groupAccessor),this.getCategory=lt(t.categoryAccessor),this.getSize=t.sizeAccessor?ct(t.sizeAccessor,"size"):void 0,this.getColor=lt(t.colorAccessor),this.getSymbol=lt(t.symbolAccessor),this.getY0=t.y0Accessor?ct(t.y0Accessor,"y0"):void 0,this.resolvedRibbons=Re(t),this.getPointId=lt(t.pointIdAccessor),"candlestick"===t.chartType){const e=null!=t.openAccessor,i=null!=t.closeAccessor;this.getOpen=e?ct(t.openAccessor,"open"):void 0,this.getHigh=ct(t.highAccessor,"high"),this.getLow=ct(t.lowAccessor,"low"),this.getClose=i?ct(t.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!e&&!i}t.pulse&&(this.timestampBuffer=new x(t.windowSize))}currentTime(){return this.config.clock?.()??Ot()}syncPulseTimestampBuffer(){this.config.pulse?null!=this.timestampBuffer&&this.timestampBuffer.capacity===this.buffer.capacity&&this.timestampBuffer.size===this.buffer.size||(this.timestampBuffer=w(this.buffer,this.currentTime())):this.timestampBuffer=null}pushDatumYExtent(t){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.push(this.getHigh(t)),void this.yExtent.push(this.getLow(t));this.yExtent.push(this.getY(t)),this.getY0&&this.yExtent.push(this.getY0(t));for(const e of this.resolvedRibbons){const i=e.getTop(t),r=e.getBottom(t);Number.isFinite(i)&&this.yExtent.push(i),Number.isFinite(r)&&this.yExtent.push(r)}}evictDatumYExtent(t){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.evict(this.getHigh(t)),void this.yExtent.evict(this.getLow(t));this.yExtent.evict(this.getY(t)),this.getY0&&this.yExtent.evict(this.getY0(t));for(const e of this.resolvedRibbons){const i=e.getTop(t),r=e.getBottom(t);Number.isFinite(i)&&this.yExtent.evict(i),Number.isFinite(r)&&this.yExtent.evict(r)}}rebuildYExtent(){this.yExtent.clear();for(const t of this.buffer)this.pushDatumYExtent(t)}rebuildExtents(){this.xExtent.clear(),this.yExtent.clear();for(const t of this.buffer)this.xExtent.push(this.getX(t)),this.pushDatumYExtent(t)}ingest(i){if(i.bounded&&this._lastBoundedInsertsRef===i.inserts)return this.updateResults.recordNoop("replace"),!1;const r=this.currentTime();if(this.lastIngestTime=r,this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,i.bounded){this._lastBoundedInsertsRef=i.inserts,this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this.timestampBuffer&&this.timestampBuffer.clear();const s=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode;if(this.getX=s?ct(this.config.timeAccessor||this.config.xAccessor,"time"):ct(this.config.xAccessor,"x"),this.xIsDate=!1,i.inserts.length>0){const r=i.inserts[0],s=this.config.xAccessor,o="function"==typeof s?s(r):r[s||"x"],n=o instanceof Date,a="string"==typeof o&&Number.isFinite(e(o));if(this.xIsDate=n||a,a){const e="string"==typeof s?s:void 0;this.getX=e?i=>t(i[e]):e=>t(s(e))}}A(this.buffer,i.totalSize||i.inserts.length,this.timestampBuffer);for(const t of i.inserts)_(this.buffer,t,this.timestampBuffer,r),this.xExtent.push(this.getX(t)),this.pushDatumYExtent(t)}else for(const t of i.inserts){if("growing"===this.config.windowMode&&this.buffer.full){const t=this.config.maxCapacity??1e5;t>this.growingCap&&(this.growingCap=Math.min(2*this.growingCap,t),this.buffer.resize(this.growingCap),this.timestampBuffer&&this.timestampBuffer.resize(this.growingCap),"production"===process.env.NODE_ENV||this.growingCapacityWarned||5e4>this.growingCap||(this.growingCapacityWarned=!0,console.warn(`[Semiotic] Growing window buffer reached ${this.growingCap} points (cap ${t}). Large canvas scenes are expensive — prefer a sliding window, aggregation, or an explicit maxCapacity if this is intentional.`)))}const e=_(this.buffer,t,this.timestampBuffer,r);this.xExtent.push(this.getX(t)),this.pushDatumYExtent(t),null!=e&&(this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e))}return this.updateResults.recordData(i.bounded?"replace":"ingest",i.inserts.length),!0}ingestWithResult(t){return this.ingest(t),this.updateResults.last}computeScene(t){const{config:e,buffer:i}=this,r=this.scales,o=this.lastLayout;if(!this.needsFullRebuild&&!e.customLayout&&this.lastLayout&&this.scene.length>0&&this.scales&&0>=(this.config.scalePadding??0)&&(this.lastLayout.width!==t.width||this.lastLayout.height!==t.height))return void this.remapScene(t);this.xExtent.dirty&&this.xExtent.recalculate(i,this.getX),this.yExtent.dirty&&this.rebuildYExtent();const n=this.getBufferArray(),a=this.xExtent.extent,c=this.yExtent.extent;let l="waterfall"===e.chartType&&i.size>0?function(t,e,i,r,s){const o=Array.from(new Set(t.map(e).filter(t=>Number.isFinite(t)))).sort((t,e)=>t-e);if(2>o.length)return Be(i,r);const n=o[0],a=o[1],c=o[o.length-1],l=o[o.length-2];return Be("log"===s&&n>0?[n/Math.sqrt(a/n),c*Math.sqrt(c/l)]:[n-(a-n)/2,c+(c-l)/2],r)}(n,this.getX,a,e.xExtent,e.xScaleType):Be(a,e.xExtent),h=Be(c,e.yExtent);const u=!(!(g=e.yExtent)||null==g[0]||null==g[1]);var g;const d="exact"===(e.yAxisExtent??e.axisExtent);if("stackedarea"===e.chartType&&!u&&i.size>0){const t=function(t){const{config:e,groups:i,getX:r,getY:s}=t,o="exact"===(e.yAxisExtent??e.axisExtent);if(e.normalize){const i=[0,o?1:1+e.extentPadding];return{yDomain:i,stackExtentCache:{key:`${t.bufferSize}:${t.ingestVersion}:norm`,yDomain:i}}}const n=`${t.bufferSize}:${t.ingestVersion}:${e.baseline??"zero"}:${e.stackOrder??"key"}`;if(t.stackExtentCache&&t.stackExtentCache.key===n)return{yDomain:t.stackExtentCache.yDomain,stackExtentCache:t.stackExtentCache};const a=new Map,c=new Set;let l=0;const h=new Map,u=new Map;for(const t of i){const e=new Map;let i=0;for(const o of t.data){const t=r(o),n=s(o);if(!Number.isFinite(t)||!Number.isFinite(n))continue;e.set(t,(e.get(t)||0)+n),c.add(t),i+=n;const a=(h.get(t)||0)+n;h.set(t,a),a>l&&(l=a)}a.set(t.key,e),u.set(t.key,i)}const g=e.stackOrder??"key",d=(t,e)=>e>t?-1:t>e?1:0;let p,y;if("input"===g)p=i.map(t=>t.key);else if("insideOut"===g){const t=[...i].map(t=>t.key).sort((t,e)=>{const i=(u.get(e)??0)-(u.get(t)??0);return 0!==i?i:d(t,e)}),e=[],r=[];let s=0,o=0;for(const i of t)o>s?(e.push(i),s+=u.get(i)??0):(r.push(i),o+=u.get(i)??0);p=[...r.reverse(),...e]}else p="asc"===g?i.map(t=>t.key).sort((t,e)=>{const i=(u.get(t)??0)-(u.get(e)??0);return 0!==i?i:d(t,e)}):"desc"===g?i.map(t=>t.key).sort((t,e)=>{const i=(u.get(e)??0)-(u.get(t)??0);return 0!==i?i:d(t,e)}):i.map(t=>t.key).sort(d);if("wiggle"===e.baseline||"silhouette"===e.baseline){const t=Array.from(c).sort((t,e)=>t-e),i=R(t,p,(t,e)=>a.get(t)?.get(e)||0,e.baseline);let r=1/0,s=-1/0;for(const e of t){const t=i.get(e)??0,o=h.get(e)??0;r>t&&(r=t),t+o>s&&(s=t+o)}Number.isFinite(r)&&Number.isFinite(s)||(r=0,s=0);const n=s-r,l=o?0:n>0?n*e.extentPadding:1;y=[r-l,s+l]}else if("diverging"===e.baseline){const t=Array.from(c).sort((t,e)=>t-e),[i,r]=P(t,p,(t,e)=>a.get(t)?.get(e)||0),s=r-i,n=o?0:s>0?s*e.extentPadding:1;y=[i-n,r+n]}else y=[0,l+(o?0:l>0?l*e.extentPadding:1)];return{yDomain:y,stackExtentCache:{key:n,yDomain:y}}}({config:e,groups:this.groupData(n),getX:this.getX,getY:this.getY,bufferSize:i.size,ingestVersion:this._ingestVersion,stackExtentCache:this._stackExtentCache});h=t.yDomain,this._stackExtentCache=t.stackExtentCache}else"bar"===e.chartType&&e.binSize&&!u&&i.size>0?h=function(t,e,i,r,o,n,a){const[,c]=s(t,e,i,r,o);return[0,a?c:c+c*n]}(i,this.getX,this.getY,e.binSize,this.getCategory,e.extentPadding,d):"waterfall"===e.chartType&&!u&&i.size>0?h=function(t,e,i,r){const[s,o]=function(t,e){let i=0,r=0,s=0;for(const o of t){const t=e(o);null==t||Number.isNaN(t)||(s+=t,i>s&&(i=s),s>r&&(r=s))}return[i,r]}(t,e),n=o-s,a=r?0:n>0?n*i:1;return[Math.min(0,s-Math.abs(a)),Math.max(0,o+Math.abs(a))]}(i,this.getY,e.extentPadding,d):u||h[0]===1/0||(h=function(t,e,i){if(!i.length)return t;let[r,s]=t;for(const t of e)for(const e of i){const i=e.getTop(t),o=e.getBottom(t);Number.isFinite(i)&&(r>i&&(r=i),i>s&&(s=i)),Number.isFinite(o)&&(r>o&&(r=o),o>s&&(s=o))}return[r,s]}(h,n,this.resolvedRibbons),h=function(t,e){const i=t[1]-t[0],r=e.exactMode?0:i>0?i*e.extentPadding:1,s=[null!=e.userMin?t[0]:t[0]-r,null!=e.userMax?t[1]:t[1]+r];return"log"!==e.yScaleType||s[0]>0||0>=e.dataYDomain[0]||e.exactMode||null==e.userMin&&(s[0]=e.dataYDomain[0]/(1+e.extentPadding)),s}(h,{exactMode:d,extentPadding:e.extentPadding,userMin:e.yExtent?.[0],userMax:e.yExtent?.[1],yScaleType:e.yScaleType,dataYDomain:c}));h=function(t,e,i){if(!e||i)return t;const r=e[0],s=e[1];return null==r&&null==s?t:[null!=r?r:t[0],null!=s?s:t[1]]}(h,e.yExtent,!!u),({xDomain:l,yDomain:h}=function(t,e,i){let r=t,s=e;if(r[0]===1/0||r[1]===-1/0)if("time"===i){const t=Date.now();r=[t-864e5,t]}else r=[0,1];return s[0]!==1/0&&s[1]!==-1/0||(s=[0,1]),{xDomain:r,yDomain:s}}(l,h,e.xScaleType)),this.scales=function(t){const{config:e,layout:i,xDomain:r,yDomain:s}=t,o="streaming"===e.runtimeMode,n=Math.max(0,Math.min(e.scalePadding||0,Math.min(i.width,i.height)/2-1));if(o){const t="left"===e.arrowOfTime?[i.width-n,n]:[n,i.width-n];return{x:Ye().domain(r).range(t),y:Oe(e.yScaleType,s,[i.height-n,n])}}return{x:Oe(e.xScaleType,r,[n,i.width-n]),y:Oe(e.yScaleType,s,[i.height-n,n])}}({config:e,layout:t,xDomain:l,yDomain:h}),this._customLayoutFailedThisBuild=!1;const p=this.buildSceneNodes(t,n);if(this._customLayoutFailedThisBuild)return!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.scales=r,this.lastLayout=o):(this.scene=[],this.spatialIndex.rebuild(this.config.chartType,this.scene)),void(this.needsFullRebuild=!0);this.config.transition&&this.scene.length>0&&this.snapshotPositions(),this.scene=p,this.config.decay&&this.applyDecay(this.scene,n),this.config.pulse&&this.applyPulse(this.scene,n,this.currentTime()),this.config.transition&&!this._hasRenderedOnce&&this.scene.length>0&&(this.config.introAnimation&&this.synthesizeIntroPositions(),this._hasRenderedOnce=!0),this.config.transition&&(this.prevPositionMap.size>0||this.prevPathMap.size>0)&&this.startTransition(),this.spatialIndex.rebuild(this.config.chartType,this.scene),this.needsFullRebuild=!1,this.lastLayout={width:t.width,height:t.height},this.version++}get quadtree(){return this.spatialIndex.quadtree}get maxPointRadius(){return this.spatialIndex.maxPointRadius}remapScene(t){const e=t.width/this.lastLayout.width,i=t.height/this.lastLayout.height;for(const t of this.scene)switch(t.type){case"line":for(const r of t.path)r[0]*=e,r[1]*=i;break;case"area":for(const r of t.topPath)r[0]*=e,r[1]*=i;for(const r of t.bottomPath)r[0]*=e,r[1]*=i;t.clipRect&&(t.clipRect={x:t.clipRect.x*e,y:t.clipRect.y*i,width:t.clipRect.width*e,height:t.clipRect.height*i}),t.strokeColorBands&&(t.strokeColorBands=t.strokeColorBands.map(t=>({...t,y:t.y*i,height:t.height*i})));break;case"point":case"glyph":t.x*=e,t.y*=i;break;case"rect":case"heatcell":t.x*=e,t.y*=i,t.w*=e,t.h*=i;break;case"candlestick":t.x*=e,t.openY*=i,t.closeY*=i,t.highY*=i,t.lowY*=i}const r=this.scales.x.domain(),s=this.scales.y.domain(),o=this.scales.x.range(),n=this.scales.y.range(),a=Oe,c=Math.max(0,Math.min(this.config.scalePadding||0,Math.min(t.width,t.height)/2-1)),l=n[1]>n[0];this.scales={x:a(this.config.xScaleType,r,o[0]>o[1]?[t.width-c,c]:[c,t.width-c]),y:a(this.config.yScaleType,s,l?[c,t.height-c]:[t.height-c,c])},this.lastLayout={width:t.width,height:t.height},this.spatialIndex.rebuild(this.config.chartType,this.scene),this.version++}buildSceneNodes(t,e){const{config:i,scales:r}=this;if(!r)return[];if(i.customLayout){const s={data:e,scales:r,dimensions:{width:t.width,height:t.height,margin:i.layoutMargin??{top:0,right:0,bottom:0,left:0},plot:{x:0,y:0,width:t.width,height:t.height}},theme:{semantic:i.themeSemantic??{},categorical:i.themeCategorical??oe},resolveColor:(t,e)=>{const r=this.resolveGroupColor(t);if(r)return r;const s=this.resolveLineStyle(t,e);return s.stroke?s.stroke:"string"==typeof s.fill?s.fill:i.themeSemantic?.primary??"#4e79a7"},config:i.layoutConfig??{},selection:i.layoutSelection??null},o=Q({family:"xy",logLabel:"customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:i.onLayoutError,run:()=>i.customLayout(s)});if("failure"===o.kind)return this.lastCustomLayoutFailure=o.diagnostic,this._customLayoutFailedThisBuild=!0,o.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);const n=o.result;this.customLayoutOverlays=n.overlays??null,this.lastCustomLayoutResult=n,this.lastCustomLayoutFailure=null;const a=n.nodes??[];if(this._customRestyle=n.restyle,this.hasCustomRestyle=!!n.restyle,this.hasCustomRestyle){this._baseStyles=new WeakMap;for(const t of a)t.style&&this._baseStyles.set(t,t.style);this.applyCustomRestyle(a,i.layoutSelection??null)}return ot({label:"customLayout",nodes:a,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),a}if(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,0===e.length)return[];const s={scales:r,config:i,getX:this.getX,getY:this.getY,getY0:this.getY0,getSize:this.getSize,getColor:this.getColor,getSymbol:this.getSymbol,getGroup:this.getGroup,getCategory:this.getCategory,getPointId:this.getPointId,ribbons:this.resolvedRibbons,getOpen:this.getOpen,getHigh:this.getHigh,getLow:this.getLow,getClose:this.getClose,resolveLineStyle:(t,e)=>this.resolveLineStyle(t,e),resolveAreaStyle:(t,e)=>this.resolveAreaStyle(t,e),resolveBoundsStyle:(t,e)=>this.resolveBoundsStyle(t,e),resolveColorMap:t=>this.resolveColorMap(t),resolveGroupColor:t=>this.resolveGroupColor(t),groupData:t=>this.groupData(t),barCategoryCache:this._barCategoryCache},o=a(i.chartType);if(!o)return n(c=i.chartType)||Et&&(Me.has(c)||(Me.add(c),console.warn(`[semiotic] StreamXYFrame: no XY plugin registered for "${c}" during SSR. Import a chart HOC, or call registerBuiltInXYPlugins() from "semiotic/xy" or "semiotic/realtime/core" before render.`))),[];var c;const h=l(o(s,e,t));return"bar"===i.chartType&&(this._barCategoryCache=s.barCategoryCache??null,this._binBoundaries=h.binBoundaries),h.nodes}resolveBoundsStyle(t,e){return function(t,e,i,r){const s=t.boundsStyle;if("function"==typeof s)return s(i||{},e);if(s&&"object"==typeof s)return s;const o=r(e,i);return{fill:o.stroke||t.themeSemantic?.primary||"#4e79a7",fillOpacity:.2,stroke:"none",cursor:o.cursor}}(this.config,t,e,(t,e)=>this.resolveLineStyle(t,e))}computeDecayOpacity(t,e){const i=this.config.decay;return i&&e>1?I(i,t,e):1}getDatumIndexMap(t){if(this._datumIndexCache&&this._datumIndexCache.version===this._ingestVersion)return this._datumIndexCache.map;const e=F(t);return this._datumIndexCache={version:this._ingestVersion,map:e},e}applyDecay(t,e){this.config.decay&&L(this.config.decay,t,e,this.getDatumIndexMap(e))}refreshPulse(t){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(this.scene,this.getBufferArray(),t)}hasActivePulsesAt(t){return!!this.config.pulse&&k(this.config.pulse,this.timestampBuffer,t)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}get transitionContext(){return{runtimeMode:this.config.runtimeMode,getX:this.getX,getY:this.getY,getCategory:this.getCategory}}snapshotPositions(){!function(t,e,i,r){i.clear(),r.clear();for(let s=0;e.length>s;s++){const o=e[s],n=Ce(t,o,s);n&&("point"===o.type?i.set(n,{x:o.x,y:o.y,r:o.r,opacity:Se(o.style)}):"glyph"===o.type?i.set(n,{x:o.x,y:o.y,r:o.size,opacity:Se(o.style),glyph:o.glyph}):"rect"===o.type||"heatcell"===o.type?i.set(n,{x:o.x,y:o.y,w:o.w,h:o.h,opacity:Se(o.style)}):"candlestick"===o.type?i.set(n,{x:o.x,y:o.openY,w:o.bodyWidth,openY:o.openY,closeY:o.closeY,highY:o.highY,lowY:o.lowY,opacity:Se(o.style)}):"line"===o.type?r.set(n,{path:o.path.map(t=>[t[0],t[1]]),opacity:o.style?.opacity}):"area"===o.type&&r.set(n,{topPath:o.topPath.map(t=>[t[0],t[1]]),bottomPath:o.bottomPath.map(t=>[t[0],t[1]]),opacity:o.style?.opacity}))}}(this.transitionContext,this.scene,this.prevPositionMap,this.prevPathMap)}synthesizeIntroPositions(){this.prevPositionMap.clear(),this.prevPathMap.clear();const t=this.scales?.y(0)??0;for(let e=0;this.scene.length>e;e++){const i=this.scene[e],r=Ce(this.transitionContext,i,e);r&&("point"===i.type?this.prevPositionMap.set(r,{x:i.x,y:i.y,r:0,opacity:0}):"rect"===i.type?this.prevPositionMap.set(r,{x:i.x,y:t,w:i.w,h:0,opacity:i.style.opacity??1}):"heatcell"===i.type?this.prevPositionMap.set(r,{x:i.x,y:i.y,w:i.w,h:i.h,opacity:0}):"line"===i.type?(i._introClipFraction=0,this.prevPathMap.set(r,{path:i.path.map(t=>[t[0],t[1]]),opacity:i.style.opacity})):"area"===i.type&&(i._introClipFraction=0,this.prevPathMap.set(r,{topPath:i.topPath.map(t=>[t[0],t[1]]),bottomPath:i.bottomPath.map(t=>[t[0],t[1]]),opacity:i.style.opacity})))}}startTransition(){if(!this.config.transition)return;const t=function(t,e,i,r,s,o=Ot()){if(0===r.size&&0===s.size)return i;const n=e.duration??300;if(i.exitNodes.length>0){const t=new Set(i.exitNodes);i.scene=i.scene.filter(e=>!t.has(e)),i.exitNodes=[]}let a=!1;const c=new Set,l=new Set;for(let e=0;i.scene.length>e;e++){const o=i.scene[e],n=Ce(t,o,e);if(!n)continue;if(o._transitionKey=n,"line"===o.type||"area"===o.type){const t=s.get(n);if(t){if(l.add(n),"line"===o.type&&t.path&&t.path.length===o.path.length){o._targetPath=o.path.map(t=>[t[0],t[1]]),o._prevPath=t.path;for(let e=0;o.path.length>e;e++)o.path[e]=[t.path[e][0],t.path[e][1]];a=!0}else if("area"===o.type&&t.topPath&&t.bottomPath&&t.topPath.length===o.topPath.length&&t.bottomPath.length===o.bottomPath.length){o._targetTopPath=o.topPath.map(t=>[t[0],t[1]]),o._targetBottomPath=o.bottomPath.map(t=>[t[0],t[1]]),o._prevTopPath=t.topPath,o._prevBottomPath=t.bottomPath;for(let e=0;o.topPath.length>e;e++)o.topPath[e]=[t.topPath[e][0],t.topPath[e][1]];for(let e=0;o.bottomPath.length>e;e++)o.bottomPath[e]=[t.bottomPath[e][0],t.bottomPath[e][1]];a=!0}o._targetOpacity=o.style.opacity??1,o._startOpacity=t.opacity??o.style.opacity??1}else o._targetOpacity=o.style.opacity??1,o._startOpacity=0,o.style={...o.style,opacity:0},a=!0;continue}const h=r.get(n);if("point"===o.type)if(h){c.add(n);const t={x:o.x,y:o.y,r:o.r};o._targetOpacity=Se(o.style),h.x===t.x&&h.y===t.y&&h.r===t.r||(o._targetX=t.x,o._targetY=t.y,o._targetR=t.r,o.x=h.x,o.y=h.y,o.r=h.r??o.r,a=!0)}else o._targetOpacity=Se(o.style),o.style={...o.style,opacity:0},a=!0;else if("glyph"===o.type)if(h){c.add(n);const t={x:o.x,y:o.y,size:o.size};o._targetOpacity=Se(o.style),h.x===t.x&&h.y===t.y&&h.r===t.size||(o._targetX=t.x,o._targetY=t.y,o._targetR=t.size,o.x=h.x,o.y=h.y,o.size=h.r??o.size,a=!0)}else o._targetOpacity=Se(o.style),o.style={...o.style,opacity:0},a=!0;else if("rect"===o.type)if(h){c.add(n);const t={x:o.x,y:o.y,w:o.w,h:o.h};o._targetOpacity=Se(o.style),h.x===t.x&&h.y===t.y&&h.w===t.w&&h.h===t.h||(o._targetX=t.x,o._targetY=t.y,o._targetW=t.w,o._targetH=t.h,o.x=h.x,o.y=h.y,o.w=h.w??o.w,o.h=h.h??o.h,a=!0)}else o._targetOpacity=Se(o.style),o.style={...o.style,opacity:0},a=!0;else if("heatcell"===o.type)if(h){c.add(n);const t={x:o.x,y:o.y,w:o.w,h:o.h};o._targetOpacity=Se(o.style),h.x===t.x&&h.y===t.y&&h.w===t.w&&h.h===t.h||(o._targetX=t.x,o._targetY=t.y,o._targetW=t.w,o._targetH=t.h,o.x=h.x,o.y=h.y,o.w=h.w??o.w,o.h=h.h??o.h,a=!0)}else o._targetOpacity=Se(o.style),o.style={...o.style||{},opacity:0},a=!0;else if("candlestick"===o.type)if(h&&null!=h.openY){c.add(n);const t={x:o.x,openY:o.openY,closeY:o.closeY,highY:o.highY,lowY:o.lowY};o._targetOpacity=Se(o.style),(h.x!==t.x||h.openY!==t.openY||h.closeY!==t.closeY||h.highY!==t.highY||h.lowY!==t.lowY)&&(o._targetX=t.x,o._targetOpenY=t.openY,o._targetCloseY=t.closeY,o._targetHighY=t.highY,o._targetLowY=t.lowY,o.x=h.x,o.openY=h.openY,o.closeY=h.closeY??o.closeY,o.highY=h.highY??o.highY,o.lowY=h.lowY??o.lowY,a=!0)}else o._targetOpacity=Se(o.style),o.style={...o.style||{},opacity:0},a=!0}for(const[t,e]of s)if(!l.has(t))if(t.startsWith("l:")&&e.path){const r={type:"line",path:e.path.map(t=>[t[0],t[1]]),group:t.slice(2),style:{stroke:"#999",strokeWidth:1,opacity:e.opacity??1},_targetOpacity:0,_transitionKey:t,datum:null};i.exitNodes.push(r),a=!0}else if(t.startsWith("a:")&&e.topPath&&e.bottomPath){const r={type:"area",topPath:e.topPath.map(t=>[t[0],t[1]]),bottomPath:e.bottomPath.map(t=>[t[0],t[1]]),group:t.slice(2),style:{fill:"#999",opacity:e.opacity??1},_targetOpacity:0,_transitionKey:t,datum:null};i.exitNodes.push(r),a=!0}for(const[t,e]of r)if(!c.has(t)){if(t.startsWith("p:"))i.exitNodes.push({type:"point",x:e.x,y:e.y,r:e.r??3,style:{opacity:e.opacity??1},datum:null,_targetOpacity:0,_transitionKey:t});else if(t.startsWith("g:")&&e.glyph)i.exitNodes.push({type:"glyph",x:e.x,y:e.y,size:e.r??12,glyph:e.glyph,color:"#999",accent:"#999",style:{opacity:e.opacity??1},datum:null,_targetOpacity:0,_transitionKey:t});else if(t.startsWith("r:"))i.exitNodes.push({type:"rect",x:e.x,y:e.y,w:e.w??0,h:e.h??0,style:{opacity:e.opacity??1,fill:"#999"},datum:null,_targetOpacity:0,_transitionKey:t});else if(t.startsWith("h:"))i.exitNodes.push({type:"heatcell",x:e.x,y:e.y,w:e.w??0,h:e.h??0,fill:"#999",datum:null,style:{opacity:e.opacity??1},_targetOpacity:0,_transitionKey:t});else if(t.startsWith("c:")){const r=e.openY??e.y;i.exitNodes.push({type:"candlestick",x:e.x,openY:r,closeY:e.closeY??r,highY:e.highY??r,lowY:e.lowY??r,bodyWidth:e.w??6,upColor:"#999",downColor:"#999",wickColor:"#999",wickWidth:1,isUp:!0,datum:null,style:{opacity:e.opacity??1},_targetOpacity:0,_transitionKey:t})}a=!0}return i.exitNodes.length>0&&(i.scene=[...i.scene,...i.exitNodes]),a&&(i.activeTransition={startTime:o,duration:n}),i}(this.transitionContext,this.config.transition,{scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},this.prevPositionMap,this.prevPathMap,this.currentTime());this.scene=t.scene,this.exitNodes=t.exitNodes,this.activeTransition=t.activeTransition}advanceTransition(t){if(!this.activeTransition||!this.config.transition)return!1;const e={scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},i=function(t,e,i,r){if(!i.activeTransition)return!1;const s=St(t,i.activeTransition),o=Ct(s,"linear"===e.easing?"linear":"ease-out-cubic");for(const t of i.scene){const e=t._transitionKey;if("point"===t.type){if(void 0!==t._targetOpacity){const i=e?r.get(e):void 0;t.style.opacity=Bt(i?i.opacity??1:0,t._targetOpacity,o)}if(void 0===t._targetX)continue;if(!e)continue;const i=r.get(e);if(!i)continue;t.x=Bt(i.x,t._targetX,o),t.y=Bt(i.y,t._targetY,o),void 0!==t._targetR&&void 0!==i.r&&(t.r=Bt(i.r,t._targetR,o))}else if("glyph"===t.type){if(void 0!==t._targetOpacity){const i=e?r.get(e):void 0;t.style.opacity=Bt(i?i.opacity??1:0,t._targetOpacity,o)}if(void 0===t._targetX)continue;if(!e)continue;const i=r.get(e);if(!i)continue;t.x=Bt(i.x,t._targetX,o),t.y=Bt(i.y,t._targetY,o),void 0!==t._targetR&&void 0!==i.r&&(t.size=Bt(i.r,t._targetR,o))}else if("rect"===t.type){if(void 0!==t._targetOpacity){const i=e?r.get(e):void 0;t.style.opacity=Bt(i?i.opacity??1:0,t._targetOpacity,o)}if(void 0===t._targetX)continue;if(!e)continue;const i=r.get(e);if(!i)continue;t.x=Bt(i.x,t._targetX,o),t.y=Bt(i.y,t._targetY,o),void 0!==i.w&&(t.w=Bt(i.w,t._targetW,o)),void 0!==i.h&&(t.h=Bt(i.h,t._targetH,o))}else if("heatcell"===t.type){if(void 0!==t._targetOpacity){const i=e?r.get(e):void 0;t.style={...t.style||{},opacity:Bt(i?i.opacity??1:0,t._targetOpacity,o)}}if(void 0===t._targetX)continue;if(!e)continue;const i=r.get(e);if(!i)continue;t.x=Bt(i.x,t._targetX,o),t.y=Bt(i.y,t._targetY,o),void 0!==i.w&&(t.w=Bt(i.w,t._targetW,o)),void 0!==i.h&&(t.h=Bt(i.h,t._targetH,o))}else if("candlestick"===t.type){if(void 0!==t._targetOpacity){const i=e?r.get(e):void 0;t.style={...t.style||{},opacity:Bt(i?i.opacity??1:0,t._targetOpacity,o)}}if(void 0===t._targetX)continue;if(!e)continue;const i=r.get(e);if(!i)continue;t.x=Bt(i.x,t._targetX,o),void 0!==i.openY&&(t.openY=Bt(i.openY,t._targetOpenY,o)),void 0!==i.closeY&&(t.closeY=Bt(i.closeY,t._targetCloseY,o)),void 0!==i.highY&&(t.highY=Bt(i.highY,t._targetHighY,o)),void 0!==i.lowY&&(t.lowY=Bt(i.lowY,t._targetLowY,o))}else if("line"===t.type){void 0!==t._targetOpacity&&(t.style={...t.style,opacity:Bt(t._startOpacity??0,t._targetOpacity,o)}),void 0!==t._introClipFraction&&(t._introClipFraction=o);const e=t._prevPath,i=t._targetPath;if(e&&i&&e.length===t.path.length)for(let r=0;t.path.length>r;r++)t.path[r][0]=Bt(e[r][0],i[r][0],o),t.path[r][1]=Bt(e[r][1],i[r][1],o)}else if("area"===t.type){void 0!==t._targetOpacity&&(t.style={...t.style,opacity:Bt(t._startOpacity??0,t._targetOpacity,o)}),void 0!==t._introClipFraction&&(t._introClipFraction=o);const e=t._prevTopPath,i=t._prevBottomPath,r=t._targetTopPath,s=t._targetBottomPath;if(e&&r&&e.length===t.topPath.length)for(let i=0;t.topPath.length>i;i++)t.topPath[i][0]=Bt(e[i][0],r[i][0],o),t.topPath[i][1]=Bt(e[i][1],r[i][1],o);if(i&&s&&i.length===t.bottomPath.length)for(let e=0;t.bottomPath.length>e;e++)t.bottomPath[e][0]=Bt(i[e][0],s[e][0],o),t.bottomPath[e][1]=Bt(i[e][1],s[e][1],o)}}if(s>=1){for(const t of i.scene){if(void 0!==t._targetOpacity){const e=t._targetOpacity;t.style="line"===t.type||"area"===t.type?{...t.style,opacity:0===e?0:e}:{...t.style||{},opacity:0===e?0:e},t._targetOpacity=void 0}if("point"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,void 0!==t._targetR&&(t.r=t._targetR),t._targetX=void 0,t._targetY=void 0,t._targetR=void 0}else if("glyph"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,void 0!==t._targetR&&(t.size=t._targetR),t._targetX=void 0,t._targetY=void 0,t._targetR=void 0}else if("rect"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,t.w=t._targetW,t.h=t._targetH,t._targetX=void 0,t._targetY=void 0,t._targetW=void 0,t._targetH=void 0}else if("heatcell"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,t.w=t._targetW,t.h=t._targetH,t._targetX=void 0,t._targetY=void 0,t._targetW=void 0,t._targetH=void 0}else if("candlestick"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,void 0!==t._targetOpenY&&(t.openY=t._targetOpenY),void 0!==t._targetCloseY&&(t.closeY=t._targetCloseY),void 0!==t._targetHighY&&(t.highY=t._targetHighY),void 0!==t._targetLowY&&(t.lowY=t._targetLowY),t._targetX=void 0,t._targetOpenY=void 0,t._targetCloseY=void 0,t._targetHighY=void 0,t._targetLowY=void 0}else if("line"===t.type){const e=t._targetPath;if(e)for(let i=0;t.path.length>i;i++)t.path[i]=e[i];t._prevPath=void 0,t._targetPath=void 0,t._introClipFraction=void 0}else if("area"===t.type){const e=t._targetTopPath,i=t._targetBottomPath;if(e)for(let i=0;t.topPath.length>i;i++)t.topPath[i]=e[i];if(i)for(let e=0;t.bottomPath.length>e;e++)t.bottomPath[e]=i[e];t._prevTopPath=void 0,t._prevBottomPath=void 0,t._targetTopPath=void 0,t._targetBottomPath=void 0,t._introClipFraction=void 0}}if(i.exitNodes.length>0){const t=new Set(i.exitNodes);i.scene=i.scene.filter(e=>!t.has(e)),i.exitNodes=[]}return i.activeTransition=null,!1}return!0}(t,this.config.transition,e,this.prevPositionMap);return this.scene=e.scene,this.exitNodes=e.exitNodes,this.activeTransition=e.activeTransition,i}cancelIntroAnimation(){this.prevPositionMap.clear(),this.prevPathMap.clear(),this.activeTransition=null,p(this.scene),this.exitNodes=[]}groupData(t){const{result:e,cache:i}=function(t,e,i,r){if(r&&r.version===i&&r.group===e&&r.data===t)return{result:r.result,cache:r};let s;if(e){const i=new Map;for(const r of t){const t=e(r);i.has(t)||i.set(t,[]),i.get(t).push(r)}s=Array.from(i.entries()).map(([t,e])=>({key:t,data:e}))}else s=[{key:"_default",data:t}];return{result:s,cache:{version:i,group:e,data:t,result:s}}}(t,this.getGroup,this._ingestVersion,this._groupDataCache);return this._groupDataCache=i,e}resolveColorMap(t){const{map:e,cache:i}=function(t,e,i,r,s){if(s&&s.version===r)return{map:s.map,cache:s};const o=new Set;if(e)for(const i of t){const t=e(i);t&&o.add(t)}const n=Array.from(o).sort(),a=n.join("\0");if(s&&s.key===a){const t={...s,version:r};return{map:t.map,cache:t}}const c=Array.isArray(i.colorScheme)?i.colorScheme:i.themeCategorical||oe,l=new Map;for(let t=0;n.length>t;t++)l.set(n[t],c[t%c.length]);return{map:l,cache:{key:a,map:l,version:r}}}(t,this.getColor,this.config,this._ingestVersion,this._colorMapCache);return this._colorMapCache=i,e}resolveLineStyle(t,e){return function(t,e,i,r){const s=t.lineStyle;if("function"==typeof s){const t=s(i||{},e);if(t&&!t.stroke&&e){const i=r(e);if(i)return{...t,stroke:i}}return t}const o=t.themeSemantic?.primary;return s&&"object"==typeof s?{stroke:s.stroke||o||"#007bff",strokeWidth:s.strokeWidth??2,strokeDasharray:s.strokeDasharray,fill:s.fill,fillOpacity:s.fillOpacity,opacity:s.opacity,cursor:s.cursor}:{stroke:r(e)||o||"#007bff",strokeWidth:2}}(this.config,t,e,t=>this.resolveGroupColor(t))}resolveAreaStyle(t,e){return function(t,e,i,r){if(t.areaStyle){const s=t.areaStyle(i||{});if(s&&!s.fill&&e){const t=r(e);if(t)return{...s,fill:t,stroke:s.stroke||t}}return s}const s=t.lineStyle;if("function"==typeof s){const t=s(i||{},e);if(t&&!t.fill&&e){const i=r(e);if(i)return{...t,fill:i,stroke:t.stroke||i}}return t}const o=t.themeSemantic?.primary;if(s&&"object"==typeof s)return{fill:s.fill||s.stroke||o||"#4e79a7",fillOpacity:s.fillOpacity??.7,stroke:s.stroke||o||"#4e79a7",strokeWidth:s.strokeWidth??2,cursor:s.cursor};const n=r(e)||o||"#4e79a7";return{fill:n,fillOpacity:.7,stroke:n,strokeWidth:2}}(this.config,t,e,t=>this.resolveGroupColor(t))}resolveGroupColor(t){const{color:e,groupColorCounter:r}=function(t){const{group:e,colorMapCache:i,groupColorMap:r,groupColorMapCap:s,config:o}=t;let{groupColorCounter:n}=t;if(i){const t=i.map.get(e);if(t)return{color:t,groupColorCounter:n}}const a=r.get(e);if(a)return{color:a,groupColorCounter:n};const c=(Array.isArray(o.colorScheme)&&o.colorScheme.length>0?o.colorScheme:null)||(Array.isArray(o.themeCategorical)&&o.themeCategorical.length>0?o.themeCategorical:null)||oe;if(0===c.length)return{color:null,groupColorCounter:n};const l=c[n%c.length];if(n++,r.set(e,l),r.size>s){const t=r.keys().next().value;void 0!==t&&r.delete(t)}return{color:l,groupColorCounter:n}}({group:t,colorMapCache:this._colorMapCache,groupColorMap:this._groupColorMap,groupColorCounter:this._groupColorCounter,groupColorMapCap:i.GROUP_COLOR_MAP_CAP,config:this.config});return this._groupColorCounter=r,e}getBufferArray(){return!this._bufferDirty&&this._bufferArrayCache||(this._bufferArrayCache=this.buffer.toArray(),this._bufferDirty=!1),this._bufferArrayCache}getData(){return this.getBufferArray()}remove(t){if(!this.getPointId)throw Error("remove() requires pointIdAccessor to be configured");this.config.transition&&this.scene.length>0&&this.snapshotPositions();const e=f(t),i=this.getPointId,r=t=>e.has(i(t));b(this.buffer,this.timestampBuffer,r);const s=this.buffer.remove(r);if(0===s.length)return this.updateResults.recordNoop("remove"),s;for(const t of s)this.xExtent.evict(this.getX(t)),this.evictDatumYExtent(t);return this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",s.length),s}update(t,e){if(!this.getPointId)throw Error("update() requires pointIdAccessor to be configured");const i=f(t),r=this.getPointId,s=new Set;this.buffer.forEach((t,e)=>{i.has(r(t))&&s.add(e)});const o=this.buffer.update(t=>i.has(r(t)),e);if(0===o.length)return this.updateResults.recordNoop("update"),o;for(const t of o)this.xExtent.evict(this.getX(t)),this.evictDatumYExtent(t);return this.buffer.forEach((t,e)=>{s.has(e)&&(this.xExtent.push(this.getX(t)),this.pushDatumYExtent(t))}),this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",o.length),o}getBinBoundaries(){return this._binBoundaries}getExtents(){return this.xExtent.min===1/0?null:{x:this.xExtent.extent,y:this.yExtent.extent}}clear(){this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this._hasRenderedOnce=!1,this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.prevPathMap.clear(),this.exitNodes=[],this.activeTransition=null,this.lastIngestTime=0,this._lastBoundedInsertsRef=null,this.needsFullRebuild=!0,this._bufferDirty=!0,this._bufferArrayCache=null,this._datumIndexCache=null,this.lastLayout=null,this.scales=null,this.scene=[],this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.spatialIndex.clear(),this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this.version++,this.updateResults.recordData("clear")}get size(){return this.buffer.size}getBuffer(){return this.buffer}getXAccessor(){return this.getX}getYAccessor(){return this.getY}getCategoryAccessor(){return this.getCategory}applyCustomRestyle(t,e){const i=this._customRestyle;if(i)for(const r of t){const t=this._baseStyles.get(r)??r.style??{},s=i(r,e);r.style=s?{...t,...s}:t}}restyleScene(t){this._customRestyle?(this.applyCustomRestyle(this.scene,t),this.markStylePaintPending(),this.updateResults.recordRestyle(!0)):this.updateResults.recordRestyle(!1)}updateConfig(t){const e={...this.config},i=Object.keys(t).filter(i=>t[i]!==e[i]);"production"!==process.env.NODE_ENV&&!this.windowSizeWarned&&"windowSize"in t&&t.windowSize!==e.windowSize&&(this.windowSizeWarned=!0,console.warn(`[Semiotic] windowSize changed after mount (${e.windowSize} → ${t.windowSize}) but it is a mount-only setting — the ring buffer keeps its original capacity. Remount the chart (e.g. via a React key) to apply a new windowSize.`)),("colorScheme"in t||"themeCategorical"in t||"colorAccessor"in t)&&(this._colorMapCache=null,this._groupColorMap=new Map,this._groupColorCounter=0),("barColors"in t||"colorScheme"in t)&&(this._barCategoryCache=null),("normalize"in t||"extentPadding"in t||"xAccessor"in t||"yAccessor"in t||"timeAccessor"in t||"valueAccessor"in t||"boundsAccessor"in t||"band"in t||"y0Accessor"in t||"openAccessor"in t||"highAccessor"in t||"lowAccessor"in t||"closeAccessor"in t||"groupAccessor"in t||"categoryAccessor"in t||"chartType"in t||"runtimeMode"in t)&&(this._stackExtentCache=null);let r=!1,s=!1;Object.assign(this.config,t),"pulse"in t&&this.syncPulseTimestampBuffer();const o="chartType"in t&&t.chartType!==e.chartType||"runtimeMode"in t&&t.runtimeMode!==e.runtimeMode;if(o||"xAccessor"in t||"yAccessor"in t||"timeAccessor"in t||"valueAccessor"in t){const t=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode,i=t&&this.config.valueAccessor||this.config.yAccessor,n=t&&e.valueAccessor||e.yAccessor,a=o||!at(t&&this.config.timeAccessor||this.config.xAccessor,t&&e.timeAccessor||e.xAccessor),c=o||!at(i,n);(a||c)&&(t?(this.getX=ct(this.config.timeAccessor||this.config.xAccessor,"time"),this.getY=ct(this.config.valueAccessor||this.config.yAccessor,"value")):(this.getX=ct(this.config.xAccessor,"x"),this.getY=ct(this.config.yAccessor,"y")),c&&this.resolvedRibbons.some(t=>"bounds"===t.kind)&&(this.resolvedRibbons=Re(this.config)),r=!0,s=!0)}if("groupAccessor"in t&&!at(t.groupAccessor,e.groupAccessor)&&(this.getGroup=null!=this.config.groupAccessor?lt(this.config.groupAccessor):void 0,r=!0),"categoryAccessor"in t&&!at(t.categoryAccessor,e.categoryAccessor)&&(this.getCategory=null!=this.config.categoryAccessor?lt(this.config.categoryAccessor):void 0,r=!0),"sizeAccessor"in t&&!at(t.sizeAccessor,e.sizeAccessor)&&(this.getSize=this.config.sizeAccessor?ct(this.config.sizeAccessor,"size"):void 0,r=!0),"symbolAccessor"in t&&!at(t.symbolAccessor,e.symbolAccessor)&&(this.getSymbol=null!=this.config.symbolAccessor?lt(this.config.symbolAccessor):void 0,r=!0),"colorAccessor"in t&&!at(t.colorAccessor,e.colorAccessor)&&(this.getColor=null!=this.config.colorAccessor?lt(this.config.colorAccessor):void 0,r=!0),"y0Accessor"in t&&!at(t.y0Accessor,e.y0Accessor)&&(this.getY0=this.config.y0Accessor?ct(this.config.y0Accessor,"y0"):void 0,r=!0,s=!0),("boundsAccessor"in t&&!at(t.boundsAccessor,e.boundsAccessor)||"band"in t&&t.band!==e.band||"boundsStyle"in t&&t.boundsStyle!==e.boundsStyle)&&(this.resolvedRibbons=Re(this.config),r=!0,s=!0),"pointIdAccessor"in t&&!at(t.pointIdAccessor,e.pointIdAccessor)&&(this.getPointId=null!=this.config.pointIdAccessor?lt(this.config.pointIdAccessor):void 0,r=!0),"candlestick"===this.config.chartType&&(o||"openAccessor"in t&&!at(t.openAccessor,e.openAccessor)||"closeAccessor"in t&&!at(t.closeAccessor,e.closeAccessor)||"highAccessor"in t&&!at(t.highAccessor,e.highAccessor)||"lowAccessor"in t&&!at(t.lowAccessor,e.lowAccessor))){const t=null!=this.config.openAccessor,e=null!=this.config.closeAccessor;this.getOpen=t?ct(this.config.openAccessor,"open"):void 0,this.getHigh=ct(this.config.highAccessor,"high"),this.getLow=ct(this.config.lowAccessor,"low"),this.getClose=e?ct(this.config.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!t&&!e,r=!0,s=!0}if("accessorRevision"in t&&t.accessorRevision!==e.accessorRevision&&(r=!0,s=!0),!r){const i=Object.keys(t).filter(t=>!t.endsWith("Accessor")&&"timeAccessor"!==t&&"valueAccessor"!==t);for(const s of i)if(t[s]!==e[s]){r=!0;break}}r&&(s&&this.rebuildExtents(),this.needsFullRebuild=!0),this.updateResults.recordConfig(i)}updateConfigWithResult(t){return this.updateConfig(t),this.updateResults.last}};Je.GROUP_COLOR_MAP_CAP=1e3;var Qe=Je;z(Qe);import{line as Ze}from"d3-shape";var ti=new WeakMap;function ei(t,e){const i=ce(e);if(!i)return t;const r=ti.get(t);if(r)return r;const s=function(t,e,i=8){if(!e||2>t.length)return t.map(([t,e])=>[t,e]);const r=[];let s=null;const o={moveTo(t,e){s=[t,e],r.push([t,e])},lineTo(t,e){s=[t,e],r.push([t,e])},bezierCurveTo(t,e,o,n,a,c){if(!s)return s=[a,c],void r.push([a,c]);const[l,h]=s;for(let s=1;i>=s;s++){const u=s/i,g=1-u;r.push([g*g*g*l+3*g*g*u*t+3*g*u*u*o+u*u*u*a,g*g*g*h+3*g*g*u*e+3*g*u*u*n+u*u*u*c])}s=[a,c]},closePath(){},arc(){},rect(){},arcTo(){},quadraticCurveTo(t,e,i,o){s=[i,o],r.push([i,o])}};return Ze().x(t=>t[0]).y(t=>t[1]).curve(e).context(o)(t),r}(t,i);return ti.set(t,s),s}function ii(t,e,i,r=30,s,o=0){let n=null;if(s){const t=X(s,e,i,r,o);t&&!1!==t.node.interactive&&(n={node:t.node,datum:t.node.datum,x:t.node.x,y:t.node.y,distance:t.distance})}for(const o of t){let t=null;switch(o.type){case"point":if(!1===o.interactive)break;if(s)break;t=si(o,e,i,r);break;case"symbol":t=oi(o,e,i,r);break;case"glyph":t=ni(o,e,i,r);break;case"line":t=ai(o,e,i,r);break;case"rect":if(null==o.datum)break;t=li(o,e,i);break;case"heatcell":t=hi(o,e,i);break;case"area":if(!1===o.interactive)break;t=gi(o,e,i,r);break;case"candlestick":t=ui(o,e,i)}t&&(n&&t.distance>=n.distance||(n=t))}return n}function ri(t,e,i){if(0===t.length)return null;if(t[0][0]>e||e>t[t.length-1][0])return null;const r=di(t,e);if(0>r)return null;if(Math.abs(t[r][0]-e)>i)return null;let s=r,o=r;r>0&&t[r][0]>=e?(s=r-1,o=r):t.length-1>r&&(s=r,o=r+1);const[n,a]=t[s],[c,l]=t[o];return c===n?a:a+Math.max(0,Math.min(1,(e-n)/(c-n)))*(l-a)}function si(t,e,i,r=30){const s=e-t.x,o=i-t.y,n=Math.sqrt(s*s+o*o);return n>V(t.r,r)?null:{node:t,datum:t.datum,x:t.x,y:t.y,distance:n}}function oi(t,e,i,r=30){const s=e-t.x,o=i-t.y,n=Math.sqrt(s*s+o*o);return n>V(le(t.size),r)?null:{node:t,datum:t.datum,x:t.x,y:t.y,distance:n}}function ni(t,e,i,r=30){if(null==t.datum)return null;const s=ae(t.glyph,t.size),o=t.x+s.centerDx,n=t.y+s.centerDy,a=e-o,c=i-n,l=Math.sqrt(a*a+c*c);return l>V(s.radius,r)?null:{node:t,datum:t.datum,x:o,y:n,distance:l}}function ai(t,e,i,r=30){if(0===t.path.length)return null;const s=di(t.path,e);if(0>s)return null;const[o,n]=t.path[s];let a;if(t.path.length>1){let r=1/0;const o=Math.max(0,s-1),n=Math.min(t.path.length-2,s);for(let s=o;n>=s;s++){const[o,n]=t.path[s],[a,c]=t.path[s+1],l=ci(e,i,o,n,a,c);r>l&&(r=l)}a=r}else{const t=e-o,r=i-n;a=Math.sqrt(t*t+r*r)}const c=t.style;return a>Math.max(5,(c.strokeWidth??c.lineWidth??1)/2+2,r)?null:{node:t,datum:Array.isArray(t.datum)&&t.datum[s]?t.datum[s]:t.datum,x:o,y:n,distance:a}}function ci(t,e,i,r,s,o){const n=s-i,a=o-r,c=n*n+a*a;if(0===c)return Math.sqrt((t-i)**2+(e-r)**2);let l=((t-i)*n+(e-r)*a)/c;return l=Math.max(0,Math.min(1,l)),Math.sqrt((t-(i+l*n))**2+(e-(r+l*a))**2)}function li(t,e,i){const r=$(e,i,t);return r.hit?{node:t,datum:t.datum,x:r.cx,y:r.cy,distance:0}:null}function hi(t,e,i){const r=$(e,i,t);return r.hit?{node:t,datum:t.datum,x:r.cx,y:r.cy,distance:0}:null}function ui(t,e,i){const r=t.bodyWidth/2,s=Math.min(t.openY,t.closeY);if(!(t.x-r-3>e||e>t.x+r+3||t.highY-3>i||i>t.lowY+3)){const r=s+Math.max(Math.max(t.openY,t.closeY)-s,1)/2,o=e-t.x,n=i-r;return{node:t,datum:t.datum,x:t.x,y:r,distance:Math.sqrt(o*o+n*n)}}return null}function gi(t,e,i,r){if(0===t.topPath.length)return null;if(t.clipRect&&(t.clipRect.x>e||e>t.clipRect.x+t.clipRect.width||t.clipRect.y>i||i>t.clipRect.y+t.clipRect.height))return null;const s=ei(t.topPath,t.curve),o=di(s,e),n=di(t.topPath,e);if(0>o||0>n)return null;let a;if(s.length>1){let t=1/0;const r=Math.max(0,o-1),n=Math.min(s.length-2,o);for(let o=r;n>=o;o++){const[r,n]=s[o],[a,c]=s[o+1];t=Math.min(t,ci(e,i,r,n,a,c))}a=t}else{const t=e-s[0][0],r=i-s[0][1];a=Math.sqrt(t*t+r*r)}if(a>r)return null;const[c,l]=t.topPath[n];return{node:t,datum:Array.isArray(t.datum)&&t.datum[n]?t.datum[n]:t.datum,x:c,y:l,distance:a}}function di(t,e){if(0===t.length)return-1;let i=0,r=t.length-1;for(;r>i;){const s=i+r>>1;e>t[s][0]?i=s+1:r=s}return i>0&&Math.abs(t[i][0]-e)>=Math.abs(t[i-1][0]-e)?i-1:i}import{useMemo as pi,useRef as yi,useEffect as fi}from"react";import*as mi from"react";import{jsx as xi}from"react/jsx-runtime";var vi=null,bi=null;function wi(t){vi=t}function Ai(t,e,i){const r="function"==typeof e?e:t=>t[e||"x"],s="function"==typeof i?i:t=>t[i||"y"],o=[],n=[];for(const e of t){const t=r(e),i=s(e);"number"==typeof t&&isFinite(t)&&o.push(t),"number"==typeof i&&isFinite(i)&&n.push(i)}return{xValues:o,yValues:n}}function ki(t){const[e,i]=mi.useState(()=>vi);return mi.useEffect(()=>{if(e)return;let t=!1;return(vi?Promise.resolve(vi):(bi||(bi=import("./c-D53OKBSY.min.js").then(t=>vi=t.MarginalGraphics).catch(t=>{throw bi=null,t})),bi)).then(e=>{t||i(()=>e)}),()=>{t=!0}},[e]),e?xi(e,{...t}):null}function _i(t,e,i){if("edges"===t){if(e)return"start";if(i)return"end"}return"middle"}function Ci(t,e,i){if("edges"===t){if(e)return"hanging";if(i)return"auto"}return"middle"}function Si(t){if(0===t.length)return{min:null,max:null};let e=1/0,i=-1/0;for(const r of t)e>r.pixel&&(e=r.pixel),r.pixel>i&&(i=r.pixel);return{min:e,max:i}}function Mi(t){if(t)return"object"==typeof t?t.strokeDasharray:"dashed"===t?"6,4":"dotted"===t?"2,4":t}function Pi(t,e){return t&&"string"!=typeof t?{stroke:t.stroke??e.stroke,strokeWidth:t.strokeWidth??e.strokeWidth,...null!=t.strokeOpacity&&{strokeOpacity:t.strokeOpacity},...t.strokeDasharray&&{strokeDasharray:t.strokeDasharray}}:{...e,..."string"==typeof t&&{strokeDasharray:Mi(t)}}}function Ri(t,e,i){if("left"===t||"right"===t){const r="left"===t?i:0,s="left"===t?-1:1,o=Math.ceil(e/8);let n="M0,"+r;for(let t=0;o>t;t++){const i=8*(t+1);n+=`L${Math.min(8*t+4,e)},${r+4*s}`,n+=`L${Math.min(i,e)},${r}`}return n}const r="bottom"===t?0:e,s="bottom"===t?1:-1,o=Math.ceil(i/8);let n=`M${r},0`;for(let t=0;o>t;t++){const e=8*(t+1);n+=`L${r+4*s},${Math.min(8*t+4,i)}`,n+=`L${r},${Math.min(e,i)}`}return n}function Yi(t,e){return t?.ticks??t?.tickCount??e}function Ti(t,e,i){return t instanceof Date?`${t.toLocaleString("en",{month:"short"})} ${t.getDate()}`:"number"==typeof t?Math.round(100*t)/100+"":t+""}function Di(t,e){return!("string"!=typeof t&&"number"!=typeof t||"string"!=typeof e&&"number"!=typeof e||t+""!=e+"")}function Ei(t,e){if(2>=t.length)return t;const i=[t[0]];for(let r=1;t.length-1>r;r++)e>Math.abs(t[r].pixel-i[i.length-1].pixel)||i.push(t[r]);const r=t[t.length-1];return e>Math.abs(r.pixel-i[i.length-1].pixel)?i[i.length-1]=r:i.push(r),i}import{useMemo as Bi}from"react";import{jsx as Oi,jsxs as Li}from"react/jsx-runtime";function zi(t){const{width:e,height:i,totalWidth:r,totalHeight:s,margin:o,scales:n,showAxes:a,axes:c,showGrid:l,xFormat:h,yFormat:u,axisExtent:g}=t,d=Bi(()=>{if(!n)return[];const t=c?.find(t=>"bottom"===t.orient),i=c?.find(t=>"top"===t.orient),r=t??i,s=r?.extent??g,o=r?.tickFormat||h||Ti,a=Math.max(2,Math.floor(e/70)),l=Yi(r,5),u="exact"===s?Math.max(2,l):Math.min(l,a),d=r?.tickValues??y(n.x,u,s),p=d.map(t=>t.valueOf()),f=d.map((t,e)=>({value:t,pixel:n.x(t),label:o(t,e,p)})),m=f.reduce((t,e)=>Math.max(t,"string"==typeof e.label?6.5*e.label.length:"number"==typeof e.label?6.5*(e.label+"").length:60),0),x=r?.autoRotate?Math.max(20,Math.min(m+8,55)):Math.max(55,m+8);let v=Ei(f,x);if(v.length>1&&(v=v.filter((t,e)=>0===e||!Di(t.label,v[e-1].label))),r?.includeMax&&v.length>0&&"exact"!==s&&!r.tickValues){const t=n.x.domain()[1],e=n.x(t),i=v[v.length-1].pixel;if(Math.abs(e-i)>1){const r=o(t,v.length,p);x>Math.abs(e-i)&&v.length>1&&(v=v.slice(0,-1)),v.push({value:t,pixel:e,label:r})}}return v},[n,c,h,e,g]),p=Bi(()=>{if(!n)return[];const t=c?.find(t=>"left"===t.orient),e=c?.find(t=>"right"===t.orient),r=t??e,s=r?.extent??g,o=r?.tickFormat||u||Ti,a=Math.max(2,Math.floor(i/30)),l=Yi(r,5),h="exact"===s?Math.max(2,l):Math.min(l,a);let d=Ei((r?.tickValues??y(n.y,h,s)).map(t=>({value:t,pixel:n.y(t),label:o(t)})),22);if(d.length>1&&(d=d.filter((t,e)=>0===e||!Di(t.label,d[e-1].label))),r?.includeMax&&d.length>0&&"exact"!==s&&!r.tickValues){const t=n.y.domain()[1],e=n.y(t),i=d[d.length-1].pixel;if(Math.abs(e-i)>1){const r=o(t);22>Math.abs(e-i)&&d.length>1&&(d=d.slice(0,-1)),d.push({value:t,pixel:e,label:r})}}return d},[n,c,u,i,g]),f=l&&n,m=a&&n;if(!f&&!m)return null;const x=c?.find(t=>"bottom"===t.orient),v=c?.find(t=>"top"===t.orient),b=c?.find(t=>"left"===t.orient),w=c?.find(t=>"right"===t.orient),A=x??v,k=b??w,_=x?"bottom":v?"top":"bottom",C=b?"left":w?"right":"left",S="top"===_?0:i,M="right"===C?e:0,P=m&&(!A||!1!==A.baseline),R=m&&(!k||!1!==k.baseline),Y=A?.jaggedBase||!1,T=k?.jaggedBase||!1,D=Pi(A?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),E=Pi(k?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),B=Pi(A?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1}),O=Pi(k?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1}),L=Mi(A?.gridStyle),z=Mi(k?.gridStyle);return Oi("svg",{width:r,height:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:Li("g",{transform:`translate(${o.left},${o.top})`,children:[f&&Li("g",{className:"stream-grid",children:[!1!==A?.grid&&d.map((t,e)=>Oi("line",{x1:t.pixel,y1:0,x2:t.pixel,y2:i,...B,strokeDasharray:L??B.strokeDasharray},"xgrid-"+e)),!1!==k?.grid&&p.map((t,i)=>Oi("line",{x1:0,y1:t.pixel,x2:e,y2:t.pixel,...O,strokeDasharray:z??O.strokeDasharray},"ygrid-"+i))]}),P&&!Y&&Oi("line",{x1:0,y1:S,x2:e,y2:S,...D}),Y&&Oi("path",{d:Ri(_,e,i),fill:"none",...D}),R&&!T&&Oi("line",{x1:M,y1:0,x2:M,y2:i,...E}),T&&Oi("path",{d:Ri(C,e,i),fill:"none",...E})]})})}import{Fragment as Fi,jsx as Ni,jsxs as Ii}from"react/jsx-runtime";function Wi(t){const{width:e,height:i,totalWidth:s,totalHeight:o,margin:n,scales:a,showAxes:c,axes:l,xLabel:h,yLabel:u,yLabelRight:g,xFormat:d,yFormat:p,axisExtent:f,showGrid:m,title:x,legend:v,legendHoverBehavior:b,legendClickBehavior:w,legendHighlightedCategory:A,legendIsolatedCategories:k,legendPosition:_="right",legendLayout:C,foregroundGraphics:S,marginalGraphics:M,xValues:P,yValues:R,annotations:Y,onAnnotationActivate:T,onObservation:D,chartId:E,chartType:B,autoPlaceAnnotations:O,svgAnnotationRules:L,xAccessor:z,yAccessor:F,annotationData:N,pointNodes:I,curve:X,underlayRendered:V,canvasObscuresUnderlay:$=!0,linkedCrosshairName:H,linkedCrosshairSourceId:G,children:q}=t,K=Ut({onAnnotationActivate:T,onObservation:D,chartId:E,chartType:B}),U=Xt({showAxes:c,xLabel:h,yLabel:u,yLabelRight:g,axes:l}),J=Wt(C,U.leftAxis),Q=Wt(C,U.rightAxis),Z=v&&"left"===_&&J>0?J:n.left,tt=v&&"right"===_&&Q>0?Q:n.right,et=pi(()=>{if(!c||!a)return[];const t=l?.find(t=>"bottom"===t.orient),i=l?.find(t=>"top"===t.orient),r=t??i,s=r?.extent??f,o=r?.tickFormat||d||Ti,n=Math.max(2,Math.floor(e/70)),h=Yi(r,5),u="exact"===s?Math.max(2,h):Math.min(h,n),g=r?.tickValues??y(a.x,u,s),p=g.map(t=>t.valueOf()),m=g.map((t,e)=>({value:t,pixel:a.x(t),label:o(t,e,p)})),x=m.reduce((t,e)=>Math.max(t,"string"==typeof e.label?6.5*e.label.length:"number"==typeof e.label?6.5*(e.label+"").length:60),0),v=r?.autoRotate?Math.max(20,Math.min(x+8,55)):Math.max(55,x+8);let b=Ei(m,v);if(b.length>1&&(b=b.filter((t,e)=>0===e||!Di(t.label,b[e-1].label))),r?.includeMax&&b.length>0&&"exact"!==s&&!r?.tickValues){const t=a.x.domain()[1],e=a.x(t),i=b[b.length-1].pixel;if(Math.abs(e-i)>1){const r=o(t,b.length,p);v>e-i&&b.length>1&&(b=b.slice(0,-1)),b.push({value:t,pixel:e,label:r})}}return b},[c,a,l,d,e,f]),it=pi(()=>{const t=l?.find(t=>"bottom"===t.orient),i=l?.find(t=>"top"===t.orient),r=t??i;if(!r?.autoRotate||1>=et.length)return!1;const s=e/Math.max(et.length-1,1);return et.reduce((t,e)=>Math.max(t,"string"==typeof e.label?6.5*e.label.length:60),0)+8>s},[l,et,e]),rt=pi(()=>{if(!c||!a)return[];const t=l?.find(t=>"left"===t.orient),e=l?.find(t=>"right"===t.orient),r=t??e,s=r?.extent??f,o=r?.tickFormat||p||Ti,n=Math.max(2,Math.floor(i/30)),h=Yi(r,5),u="exact"===s?Math.max(2,h):Math.min(h,n);let g=Ei((r?.tickValues??y(a.y,u,s)).map(t=>({value:t,pixel:a.y(t),label:o(t)})),22);if(g.length>1&&(g=g.filter((t,e)=>0===e||!Di(t.label,g[e-1].label))),r?.includeMax&&g.length>0&&"exact"!==s&&!r?.tickValues){const t=a.y.domain()[1],e=a.y(t),i=g[g.length-1].pixel;if(Math.abs(e-i)>1){const r=o(t);22>Math.abs(e-i)&&g.length>1&&(g=g.slice(0,-1)),g.push({value:t,pixel:e,label:r})}}return g},[c,a,l,p,i,f]),st=pi(()=>{if(!c||!a)return[];const t=l?.find(t=>"right"===t.orient);if(!t)return[];const e=t.extent??f,r=t.tickFormat||p||Ti,s=Math.max(2,Math.floor(i/30)),o=Yi(t,5);let n=Ei((t.tickValues??y(a.y,"exact"===e?Math.max(2,o):Math.min(o,s),e)).map(t=>({value:t,pixel:a.y(t),label:r(t)})),22);if(n.length>1&&(n=n.filter((t,e)=>0===e||!Di(t.label,n[e-1].label))),t.includeMax&&n.length>0&&"exact"!==e&&!t.tickValues){const t=a.y.domain()[1],e=a.y(t),i=n[n.length-1].pixel;if(Math.abs(e-i)>1){const s=r(t);22>Math.abs(e-i)&&n.length>1&&(n=n.slice(0,-1)),n.push({value:t,pixel:e,label:s})}}return n},[c,a,l,p,i,f]),ot=yi(new Map),nt=yi(Y?.length??0),at=Y?.length??0;nt.current!==at&&(nt.current=at,ot.current=new Map);const ct=pi(()=>{if(!Y||0===Y.length)return null;const t=W(Y),r=Mt("xy",K),s={scales:a?{x:a.x,y:a.y,time:a.x,value:a.y}:null,timeAxis:"x",xAccessor:z,yAccessor:F,width:e,height:i,data:N,frameType:"xy",pointNodes:I,curve:X,stickyPositionCache:ot.current},o=O?At({annotations:t,context:s,..."object"==typeof O?O:{}}):t;return Nt(o,r,L,s)},[Y,O,L,e,i,z,F,N,a,I,X,K]),lt=Qt(H);return fi(()=>{if(!lt?.locked||!H)return;const t=t=>{"Escape"===t.key&&Kt(H)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[lt?.locked,H]),c||x||v||S||M||ct&&ct.length>0||m||q||lt?Ii("svg",{role:"img",width:s,height:o,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[Ni("title",{children:"string"==typeof x?x:"XY Chart"}),Ni("desc",{children:"string"==typeof x?x+" (XY data visualization)":"XY data visualization"}),Ii("g",{transform:`translate(${n.left},${n.top})`,children:[m&&a&&(!V||$)&&(()=>{const t=l?.find(t=>"bottom"===t.orient),r=l?.find(t=>"top"===t.orient),s=l?.find(t=>"left"===t.orient),o=l?.find(t=>"right"===t.orient),n=t??r,a=s??o,c=Mi(n?.gridStyle),h=Mi(a?.gridStyle),u=Pi(n?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1}),g=Pi(a?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1}),d=!1!==n?.grid,p=!1!==a?.grid;return Ii("g",{className:"stream-grid",children:[d&&et.map((t,e)=>Ni("line",{x1:t.pixel,y1:0,x2:t.pixel,y2:i,...u,strokeDasharray:c??u.strokeDasharray},"xgrid-"+e)),p&&rt.map((t,i)=>Ni("line",{x1:0,y1:t.pixel,x2:e,y2:t.pixel,...g,strokeDasharray:h??g.strokeDasharray},"ygrid-"+i))]})})(),c&&a&&(()=>{const t=l?.find(t=>"bottom"===t.orient),r=l?.find(t=>"top"===t.orient),s=l?.find(t=>"left"===t.orient),o=l?.find(t=>"right"===t.orient),n=t??r,a=s??o,c=t?"bottom":r?"top":"bottom",d=s?"left":o?"right":"left",p="top"===c?0:i,y="right"===d?e:0,f="top"===c?-1:1,m="right"===d?1:-1,x=!n||!1!==n.baseline,v=!a||!1!==a.baseline,b=n?.jaggedBase||!1,w=a?.jaggedBase||!1,A=n?.landmarkTicks,k=a?.landmarkTicks,_=Pi(n?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),C=Pi(a?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),S="var(--semiotic-text-secondary, var(--semiotic-text, #666))",M="var(--semiotic-text, #333)",P=it,R={fontSize:"var(--semiotic-tick-font-size, 12px)"},Y={fontSize:"calc(var(--semiotic-tick-font-size, 12px) + 1px)"},T={fontSize:"var(--semiotic-axis-label-font-size, 12px)"},D=n?.tickAnchor,E=a?.tickAnchor,B=n?.label??h,O=a?.label??("right"===d?g??u:u),L="right"===d?e+tt-15:15-Z,z=Si(et),F=Si(rt);return Ii("g",{className:"stream-axes",style:{fontFamily:"var(--semiotic-font-family, sans-serif)"},children:[Ii("g",{className:"semiotic-axis semiotic-axis-"+c,"data-orient":c,children:[(!V||$)&&x&&!b&&Ni("line",{x1:0,y1:p,x2:e,y2:p,..._}),(!V||$)&&b&&Ni("path",{d:Ri(c,e,i),fill:"none",..._}),et.map((t,e)=>{const i=!!A&&("function"==typeof A?A(t.value,e):j(t.value,e>0?et[e-1].value:void 0));return Ii("g",{transform:`translate(${t.pixel},${p})`,children:[Ni("line",{y2:5*f,..._}),"string"==typeof t.label||"number"==typeof t.label?Ni("text",{y:f*(P?12:18),textAnchor:P?"end":_i(D,t.pixel===z.min,t.pixel===z.max),fontWeight:i?600:400,fill:S,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?Y:R},transform:P?"top"===c?"rotate(45)":"rotate(-45)":void 0,children:t.label}):Ni("foreignObject",{x:-30,y:"top"===c?-30:6,width:60,height:24,style:{overflow:"visible"},children:Ni("div",{style:{textAlign:"center",userSelect:"none",...R},children:t.label})})]},"xtick-"+e)}),B&&Ni("text",{x:e/2,y:"top"===c?-(P?58:40):i+(P?58:40),textAnchor:"middle",fill:M,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...T},children:B})]}),Ii("g",{className:"semiotic-axis semiotic-axis-"+d,"data-orient":d,children:[(!V||$)&&v&&!w&&Ni("line",{x1:y,y1:0,x2:y,y2:i,...C}),(!V||$)&&w&&Ni("path",{d:Ri(d,e,i),fill:"none",...C}),rt.map((t,e)=>{const i=!!k&&("function"==typeof k?k(t.value,e):j(t.value,e>0?rt[e-1].value:void 0));return Ii("g",{transform:`translate(${y},${t.pixel})`,children:[Ni("line",{x2:5*m,...C}),"string"==typeof t.label||"number"==typeof t.label?Ni("text",{x:8*m,textAnchor:"right"===d?"start":"end",dominantBaseline:Ci(E,t.pixel===F.min,t.pixel===F.max),fontWeight:i?600:400,fill:S,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?Y:R},children:t.label}):Ni("foreignObject",{x:"right"===d?8:-68,y:-12,width:60,height:24,style:{overflow:"visible"},children:Ni("div",{style:{textAlign:"right"===d?"left":"right",userSelect:"none",...R},children:t.label})})]},"ytick-"+e)}),O&&Ni("text",{x:L,y:i/2,textAnchor:"middle",fill:M,transform:`rotate(${"right"===d?90:-90}, ${L}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...T},children:O})]}),(()=>{const t=l?.find(t=>"right"===t.orient);if(!s||!t||0===st.length)return null;const r=!1!==t.baseline,o=t.landmarkTicks,n=t.label||g,a=t.tickAnchor,c=Pi(t.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),h=Si(st);return Ii("g",{className:"semiotic-axis semiotic-axis-right","data-orient":"right",children:[r&&!t.jaggedBase&&Ni("line",{x1:e,y1:0,x2:e,y2:i,...c}),t.jaggedBase&&Ni("path",{d:Ri("right",e,i),fill:"none",...c}),st.map((t,i)=>{const r=!!o&&("function"==typeof o?o(t.value,i):j(t.value,i>0?st[i-1].value:void 0));return Ii("g",{transform:`translate(${e},${t.pixel})`,children:[Ni("line",{x2:5,...c}),"string"==typeof t.label||"number"==typeof t.label?Ni("text",{x:8,textAnchor:"start",dominantBaseline:Ci(a,t.pixel===h.min,t.pixel===h.max),fontWeight:r?600:400,fill:S,fontSize:r?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...r?Y:R},children:t.label}):Ni("foreignObject",{x:8,y:-12,width:60,height:24,style:{overflow:"visible"},children:Ni("div",{style:{textAlign:"left",userSelect:"none",...R},children:t.label})})]},"ytick-r-"+i)}),n&&Ni("text",{x:e+tt-15,y:i/2,textAnchor:"middle",fill:M,transform:`rotate(90, ${e+tt-15}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...T},children:n})]})})()]})})(),ct,M&&a&&P&&R&&Ii(Fi,{children:[M.top&&Ni("g",{transform:"translate(0, 0)",children:Ni(ki,{orient:"top",config:r(M.top),values:P,scale:a.x,size:n.top,length:e})}),M.bottom&&Ni("g",{transform:`translate(0, ${i})`,children:Ni(ki,{orient:"bottom",config:r(M.bottom),values:P,scale:a.x,size:n.bottom,length:e})}),M.left&&Ni("g",{transform:"translate(0, 0)",children:Ni(ki,{orient:"left",config:r(M.left),values:R,scale:a.y,size:n.left,length:i})}),M.right&&Ni("g",{transform:`translate(${e}, 0)`,children:Ni(ki,{orient:"right",config:r(M.right),values:R,scale:a.y,size:n.right,length:i})})]}),S,lt&&lt.sourceId!==G&&a?.x&&(()=>{const t=a.x(lt.xValue);if(null==t||0>t||t>e)return null;const r=lt.locked;return Ni("line",{x1:t,y1:0,x2:t,y2:i,stroke:r?"white":"var(--semiotic-text-secondary, rgba(0,0,0,0.25))",strokeWidth:r?1.5:1,strokeDasharray:r?"6,3":"4,4",pointerEvents:"none"})})(),q]}),Ni(mt,{title:x,totalWidth:s,marginTop:n.top}),It({legend:v,totalWidth:s,totalHeight:o,margin:n,legendPosition:_,title:x,legendLayout:C,axisChrome:U,legendHoverBehavior:b,legendClickBehavior:w,legendHighlightedCategory:A,legendIsolatedCategories:k})]}):null}import{useCallback as Xi,useEffect as Vi,useState as $i}from"react";var ji={axisStroke:"#ccc",tickText:"#666",crosshair:"rgba(0, 0, 0, 0.25)",hoverFill:"rgba(255, 255, 255, 0.3)",hoverStroke:"rgba(0, 0, 0, 0.4)",pointRing:"white",primary:"#007bff",background:""};function Hi(t,e){const i=t.trim();if(/^#[0-9a-f]{3}$/i.test(i)){const t=i[1],r=i[2],s=i[3];return`#${t}${t}${r}${r}${s}${s}${e}`}if(/^#[0-9a-f]{6}$/i.test(i))return`${i}${e}`;const r=i.match(/^rgb\s*\(\s*([^)]+?)\s*\)$/i);return r?`rgba(${r[1]}, ${(parseInt(e,16)/255).toFixed(3)})`:i}var Gi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qi=3156e7;function Ki(t){const e=t[1]-t[0];return 864e5>e?t=>{const e=new Date(t);return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}`}:qi>e?t=>{const e=new Date(t);return`${Gi[e.getUTCMonth()]} ${e.getUTCDate()}`}:5*qi>e?t=>{const e=new Date(t);return`${Gi[e.getUTCMonth()]} ${e.getUTCFullYear()}`}:t=>new Date(t).getUTCFullYear()+""}function Ui(t){if(!t)return;const e=[];for(const i of t)if("point"===i.type)e.push(i);else if("symbol"===i.type)e.push({pointId:i.pointId,x:i.x,y:i.y,r:le(i.size)});else if("glyph"===i.type){const t=ae(i.glyph,i.size);e.push({pointId:i.pointId,x:i.x+t.centerDx,y:i.y+t.centerDy,r:t.radius})}return e}import{useEffect as Ji}from"react";import{jsx as Qi,jsxs as Zi}from"react/jsx-runtime";function tr(t){return null==t?"":"number"==typeof t?Number.isInteger(t)?t+"":t.toFixed(2):t instanceof Date?t.toLocaleString():t+""}function er({hover:t}){const e=t.data??{},i=e.y??e.value,r=e.x??e.time;if(void 0===i&&void 0===r){const t=Ht(e);if(null!=t.title||t.entries.length>0)return Zi("div",{className:"semiotic-tooltip",style:Pt,children:[null!=t.title&&Qi("div",{style:{fontWeight:600,marginBottom:t.entries.length?2:0},children:t.title+""}),t.entries.map(t=>Zi("div",{style:{opacity:.7,fontSize:11},children:[t.key,":"," ",Qi("span",{style:{fontWeight:600},children:tr(t.value)})]},t.key))]})}return Zi("div",{className:"semiotic-tooltip",style:Pt,children:[Qi("div",{style:{fontWeight:600,marginBottom:2},children:tr(i)}),Qi("div",{style:{opacity:.7,fontSize:11},children:tr(r)})]})}function ir(t,e){if(!e||0===t.length)return t;if(!t.some(t=>null!=t&&"object"==typeof t&&Array.isArray(t[e])))return t;const i=[];for(const r of t){if(null==r||"object"!=typeof r)continue;const t=r[e];if(!Array.isArray(t))continue;const s=r.label??r.id??r.key;for(const e of t)null!=e&&"object"==typeof e&&i.push(null==s?e:{...e,_lineGroup:s})}return i}er.ownsChrome=!0;import{jsx as rr,jsxs as sr}from"react/jsx-runtime";var or=B,nr=ji;function ar(t){if(t)return"x"===t.dimension?"pan-y":"y"===t.dimension?"pan-x":"none"}var cr=ge(ue(function(t,e){const{chartType:r,runtimeMode:s,data:a,chunkThreshold:l,chunkSize:u,xAccessor:p,yAccessor:y,accessorRevision:f,colorAccessor:x,sizeAccessor:v,symbolAccessor:b,symbolMap:w,groupAccessor:A,lineDataAccessor:k,curve:_,normalize:P,baseline:R,stackOrder:B,binSize:L,valueAccessor:z,arrowOfTime:F="right",windowMode:I="sliding",windowSize:W=200,timeAccessor:X,xExtent:V,yExtent:$,extentPadding:j=.1,scalePadding:Q,sizeRange:ot,size:at=[500,300],responsiveWidth:ct,responsiveHeight:lt,margin:mt,className:wt,background:At,maxDevicePixelRatio:Ct,renderMode:St,lineStyle:Mt,pointStyle:Pt,areaStyle:Bt,barStyle:Ot,waterfallStyle:Nt,swarmStyle:It,barColors:Wt,colorScheme:Xt,boundsAccessor:Ht,boundsStyle:Kt,y0Accessor:Ut,band:Qt,gradientFill:oe,lineGradient:ae,semanticLineStops:ce,areaGroups:le,openAccessor:ue,highAccessor:ge,lowAccessor:be,closeAccessor:we,candlestickStyle:Ae,showAxes:ke=!0,axes:Ce,xLabel:Se,yLabel:Me,yLabelRight:Pe,xFormat:Re,yFormat:Ye,axisExtent:Te,tickFormatTime:De,tickFormatValue:Ee,hoverAnnotation:Be,tooltipContent:Oe,customHoverBehavior:Le,customClickBehavior:ze,onObservation:Fe,annotationObservationCallback:Ne,chartId:Ie,enableHover:We,hoverRadius:Xe=30,tooltipMode:Ve,annotations:$e,onAnnotationActivate:je,autoPlaceAnnotations:He,svgAnnotationRules:Ge,showGrid:qe,legend:Ke,legendHoverBehavior:Ue,legendClickBehavior:Je,legendHighlightedCategory:Ze,legendIsolatedCategories:ti,legendPosition:si,legendLayout:oi,legendCategoryAccessor:ni,onCategoriesChange:ai,backgroundGraphics:ci,foregroundGraphics:li,canvasPreRenderers:hi,svgPreRenderers:ui,title:gi,categoryAccessor:pi,brush:yi,onBrush:fi,decay:mi,pulse:xi,transition:vi,animate:bi,staleness:wi,frameScheduler:ki,clock:_i,random:Ci,seed:Si,paused:Mi=!1,suspendWhenHidden:Pi=!0,heatmapAggregation:Ri,heatmapXBins:Yi,heatmapYBins:Ti,showValues:Di,heatmapValueFormat:Ei,heatmapColorScale:Bi,onColorDomainChange:Oi,marginalGraphics:Li,pointIdAccessor:Fi,xScaleType:Ni,yScaleType:Ii,accessibleTable:Gi=!0,description:qi,summary:Qi,linkedCrosshairName:Zi,linkedCrosshairSourceId:tr,customLayout:cr,onLayoutError:lr,layoutConfig:hr,layoutSelection:ur}=t,{customHoverBehavior:gr,customClickBehavior:dr,hasClickBehavior:pr}=S({customHoverBehavior:Le,customClickBehavior:ze,onObservation:Fe,chartId:Ie,chartType:"StreamXYFrame"}),yr=ye().replace(/:/g,""),fr=xe(!1),mr=xe({w:-1,h:-1}),xr=xe(!1),vr=Zt({sizeProp:at,responsiveWidth:ct,responsiveHeight:lt,userMargin:mt,marginDefault:or,title:gi,legend:Ke,legendPosition:si,...m(t,Ke),animate:bi,transitionProp:vi,frameScheduler:ki,clock:_i,random:Ci,seed:Si,paused:Mi,suspendWhenHidden:Pi,themeDirtyRef:fr}),br=ee(),wr=re(),{reducedMotionRef:Ar,responsiveRef:kr,size:_r,currentTheme:Cr,transition:Sr,introEnabled:Mr,tableId:Pr,rafRef:Rr,renderFnRef:Yr,scheduleRender:Tr,frameRuntime:Dr}=vr;pe(()=>Gt(()=>{fr.current=!0,Tr()}),[Tr]);let Er=vr.margin;if(Li){const t=60,e={...vr.margin};Li.top&&t>e.top&&(e.top=t),Li.bottom&&t>e.bottom&&(e.bottom=t),Li.left&&t>e.left&&(e.left=t),Li.right&&t>e.right&&(e.right=t),Er=e}const Br=_r[0]-Er.left-Er.right,Or=_r[1]-Er.top-Er.bottom,Lr=(Ce?.find(t=>"left"===t.orient)??Ce?.find(t=>"right"===t.orient))?.extent??Te,zr=me(()=>Rt(a),[a]),Fr=Be??We,[Nr,Ir]=ve(0),Wr=xe(0),[Xr,Vr]=ve(null),$r=U(li,_r,Er,Xr),jr=U(ci,_r,Er,Xr),Hr=xe(null),Gr=xe(!1),qr=xe(null),Kr=xe(void 0),[Ur,Jr]=ve(null),Qr=xe(nr.primary),Zr=xe(function(){let t=-1,e=ji;return{resolve(i){if(!i)return ji;const r=ne();return r===t||(e=function(t){if(!t)return ji;const e=getComputedStyle(t),i=e.getPropertyValue("--semiotic-border").trim(),r=e.getPropertyValue("--semiotic-text-secondary").trim(),s=e.getPropertyValue("--semiotic-bg").trim(),o=e.getPropertyValue("--semiotic-primary").trim(),n=r||e.getPropertyValue("--text-secondary").trim(),a=e.getPropertyValue("--text-primary").trim(),c=i||e.getPropertyValue("--surface-3").trim(),l=s||e.getPropertyValue("--surface-0").trim();return n||a||i||o?{axisStroke:c||ji.axisStroke,tickText:n||ji.tickText,crosshair:n?Hi(n,"66"):ji.crosshair,hoverFill:l?Hi(l,"4D"):ji.hoverFill,hoverStroke:n?Hi(n,"99"):ji.hoverStroke,pointRing:l||ji.pointRing,primary:o||ji.primary,background:l||ji.background}:ji}(i),t=r),e},invalidate(){t=-1}}}()),ts=xe(!1),es=ie("StreamXYFrame"),[is,rs]=ve(!1),ss="streaming"===s||["bar","swarm","waterfall"].includes(r),os=me(()=>({chartType:r,runtimeMode:ss?"streaming":"bounded",windowSize:W,windowMode:I,arrowOfTime:ss?F:"right",extentPadding:j,scalePadding:Q,axisExtent:Te,yAxisExtent:Lr,xAccessor:p,yAccessor:y,accessorRevision:f,timeAccessor:ss?X:void 0,valueAccessor:z,colorAccessor:x,sizeAccessor:v,symbolAccessor:b,symbolMap:w,groupAccessor:A||(k?"_lineGroup":void 0),categoryAccessor:pi,lineDataAccessor:k,xScaleType:Ni,yScaleType:Ii,xExtent:V,yExtent:$,sizeRange:ot,binSize:L,normalize:P,baseline:R,stackOrder:B,boundsAccessor:Ht,boundsStyle:Kt,y0Accessor:Ut,band:Qt,gradientFill:T(oe),areaGroups:le?new Set(le):void 0,lineGradient:Y(ae),semanticLineStops:ce,openAccessor:ue,highAccessor:ge,lowAccessor:be,closeAccessor:we,candlestickStyle:Ae,lineStyle:Mt,pointStyle:Pt,areaStyle:Bt,swarmStyle:It,waterfallStyle:Nt,colorScheme:Xt,barColors:Wt,barStyle:Ot,annotations:$e,decay:mi,pulse:xi,transition:Sr,introAnimation:Mr,staleness:wi,clock:Dr.now,heatmapAggregation:Ri,heatmapXBins:Yi,heatmapYBins:Ti,showValues:Di,heatmapValueFormat:Ei,heatmapColorScale:Bi,pointIdAccessor:Fi,curve:_,themeCategorical:Cr?.colors?.categorical,themeSemantic:se(Cr),themeSequential:Cr?.colors?.sequential,themeDiverging:Cr?.colors?.diverging,customLayout:cr,onLayoutError:lr,layoutConfig:hr,layoutMargin:Er}),[r,ss,W,I,F,j,Q,Te,Lr,p,y,f,X,z,x,v,b,w,A,k,pi,Ni,Ii,V,$,ot,L,P,R,B,Ht,Kt,Ut,Qt,oe,le,ae,ce,ue,ge,be,we,Ae,Mt,Pt,Bt,It,Nt,Xt,Wt,Ot,$e,mi,xi,Sr,Mr,wi,Dr.now,Ri,Yi,Ti,Di,Ei,Bi,Fi,_,Cr,cr,lr,hr,Er]),ns=rt(os),as=xe(null);as.current||(as.current=new Qe(ns));const cs=it(as,ni,ai,t=>t.getData()),ls=xe({onColorDomainChange:Oi,chartType:r}),hs=xe(void 0);ls.current={onColorDomainChange:Oi,chartType:r};const us=de(()=>{const{onColorDomainChange:t,chartType:e}=ls.current;if(!t||"heatmap"!==e)return;let i=1/0,r=-1/0;for(const t of as.current?.scene??[]){if("heatcell"!==t.type)continue;const e=Number(t.value??t.datum?.value);Number.isFinite(e)&&(i>e&&(i=e),e>r&&(r=e))}const s=Number.isFinite(i)&&Number.isFinite(r)?[i,r]:null,o=hs.current;null===o&&null===s||o&&s&&o[0]===s[0]&&o[1]===s[1]||(hs.current=s,t(s))},[]);!function(t,e,i,r){Ji(()=>{let s=!1;const o=[];if(e&&!n("custom")&&o.push(import("./c-43TJZS3F.min.js").then(t=>{c(t.customXYPlugin)})),"custom"===t||n(t)||o.push(import("./c-OYFHP5F5.min.js").then(t=>{t.registerBuiltInXYPlugins()})),0!==o.length)return Promise.all(o).then(()=>{s||(i.current=!0,r())}),()=>{s=!0}},[t,e,i,r])}(r,cr,fr,Tr),tt(as,ns,fr,Tr),et(as,ur,fr,Tr);const gs=xe(null);gs.current||(gs.current=new h(t=>{const e=as.current;e&&e.ingest(t)&&(fr.current=!0,Tr())},{chunkThreshold:l,chunkSize:u})),pe(()=>{gs.current?.updateChunkOptions({chunkThreshold:l,chunkSize:u})},[l,u]);const ds=de(t=>{gs.current?.push(t)},[]),ps=de(t=>{gs.current?.pushMany(t)},[]),ys=de(()=>{gs.current?.clear(),as.current?.clear(),fr.current=!0,Tr()},[Tr]);fe(e,()=>({push:ds,pushMany:ps,remove:t=>{gs.current?.flush();const e=as.current?.remove(t)??[];return e.length>0&&(Hr.current&&e.some(t=>t===Hr.current?.data)&&(Hr.current=null,Jr(null)),fr.current=!0,Tr()),e},update:(t,e)=>{gs.current?.flush();const i=as.current?.update(t,e)??[];return i.length>0&&(fr.current=!0,Tr()),i},clear:ys,getData:()=>(gs.current?.flush(),as.current?.getData()??[]),getScales:()=>as.current?.scales??null,getExtents:()=>as.current?.getExtents()??null,getCustomLayout:()=>as.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>as.current?.lastCustomLayoutFailure??null}),[ds,ps,ys,Tr]),pe(()=>{a&&gs.current?.setBoundedData(ir(zr,k))},[a,zr,k]);const{marginalXValues:fs,marginalYValues:ms,refreshMarginalValues:xs}=function(t,e,i,r,s){const[o,n]=$i([]),[a,c]=$i([]),l=null!=e,h=l?[e.top,e.bottom,e.left,e.right].join("|"):"",u=Xi((e=t.current?.getData()??[])=>{const i=Ai(e,r,s);n(i.xValues),c(i.yValues)},[t,r,s]);return Vi(()=>{if(!l)return n([]),void c([]);u()},[i,l,h,u]),{marginalXValues:o,marginalYValues:a,refreshMarginalValues:u}}(as,Li,zr,p,y),{canvasRef:vs,interactionCanvasRef:bs,resolutionDirtyRef:ws}=te(vr,{storeRef:as,dirtyRef:fr,hydrated:br,wasHydratingFromSSR:wr,cleanup:()=>gs.current?.clear(),maxDevicePixelRatio:Ct,canvasPaintDependencies:[r,Br,Or,ke,At,ci,Mt,St,hi,Tr]}),{hoverHandlerRef:As,hoverLeaveRef:ks,onPointerMove:_s,onPointerLeave:Cs,pointerStateRef:Ss}=vr;As.current=t=>{const e=vs.current;if(!e)return;const i=e.getBoundingClientRect(),s=t.clientX-i.left-Er.left,o=t.clientY-i.top-Er.top;if(0>s||s>Br||0>o||o>Or){if(jt(e),!Fr)return;return void(Hr.current&&(Hr.current=null,qr.current=null,Jr(null),gr?.(null),Tr()))}const n=as.current;if(!n||0===n.scene.length)return void jt(e);const a=Tt(Xe,t.pointerType),c=ii(n.scene,s,o,a,n.quadtree,n.maxPointRadius);if(jt(e,$t(c?.node)),!Fr)return;const l="multi"===Ve,h=()=>{Hr.current&&(Hr.current=null,qr.current=null,Jr(null),gr&&gr(null),Tr())};if(!c&&!l)return void h();const u=l||!c?s:c.x,g=l||!c?o:c.y,d=c?.datum?D(c.datum,n.resolvedRibbons):{},y=n.scales?.x?.invert,f="function"==typeof y?y(u):void 0;let m=kt(d,u,g,null!=f?{xValue:f,xPx:u}:void 0);if(l&&n.scene.length>0&&n.scales){const t=function(t,e,i=30){const r=[];for(const s of t)if("line"===s.type){const t=s;if(2>t.path.length)continue;const o=ri(ei(t.path,t.curve),e,i);if(null===o)continue;const n=di(t.path,e);r.push({node:s,datum:Array.isArray(t.datum)&&t.datum[n]?t.datum[n]:t.datum,x:t.path[n][0],y:o,group:t.group,color:t.style.stroke})}else if("area"===s.type){const t=s;if(!1===t.interactive)continue;if(2>t.topPath.length)continue;const o=ei(t.topPath,t.curve),n=ei(t.bottomPath,t.curve),a=ri(o,e,i);if(null===a)continue;const c=ri(n,e,i),l=di(t.topPath,e);r.push({node:s,datum:Array.isArray(t.datum)&&t.datum[l]?t.datum[l]:t.datum,x:t.topPath[l][0],y:a,y0:c??void 0,group:t.group,color:"string"==typeof t.style.stroke?t.style.stroke:"string"==typeof t.style.fill?t.style.fill:void 0})}return r}(n.scene,u,Math.max(a,Br));if(t.length>0){const e=n.scales.y.invert,i=Qr.current,s=y?y(u):u;if(c)m.xValue=s,m.xPx=u;else{const t={xValue:s};"string"==typeof p&&(t[p]=s),m=kt(t,u,g,{xValue:s,xPx:u})}m.allSeries=t.map(t=>{const s=e?e(t.y):t.y,o=null!=t.y0?e?e(t.y0):t.y0:void 0;return{group:t.group||"",value:"stackedarea"===r&&null!=o?s-o:s,valuePx:t.y,color:t.color||i,datum:D(t.datum,n.resolvedRibbons)}})}}c||m.allSeries?.length?(Hr.current=m,qr.current=c?.node??null,Jr(m),gr?.(m),Tr()):h()},ks.current=()=>{jt(vs.current),Hr.current&&(Hr.current=null,qr.current=null,Jr(null),gr?.(null),Tr())},Jt(vs);const Ms=xe(()=>{});Ms.current=t=>{if(Dt(t.target))return;if(!dr)return;const e=vs.current;if(!e)return;const i=e.getBoundingClientRect(),r=t.clientX-i.left-Er.left,s=t.clientY-i.top-Er.top;if(0>r||r>Br||0>s||s>Or)return void dr(null);const o=as.current;if(!o||0===o.scene.length)return void dr(null);const n=Tt(Xe,Kr.current),a=ii(o.scene,r,s,n,o.quadtree,o.maxPointRadius);if(!a)return void dr(null);const c=a.datum||{},l=o.scales?.x?.invert,h="function"==typeof l?l(a.x):void 0;dr(kt(c,a.x,a.y,null!=h?{xValue:h,xPx:a.x}:void 0),{type:"activate",inputType:Lt(Kr.current)})};const Ps=de(t=>Ms.current(t),[]),{kbFocusIndexRef:Rs,focusedNavPointRef:Ys,onKeyDown:Ts}=M({storeRef:as,hoverRef:Hr,hoveredNodeRef:qr,setHoverPoint:Jr,customHoverBehavior:gr,customClickBehavior:dr,scheduleRender:Tr}),Ds=de(t=>{Z(Ss,t,!!Fr,Gr.current,vs.current)&&(Kr.current=t.pointerType,Rs.current=-1,Ys.current=null,_s(t))},[vs,Fr,Ys,Rs,_s,Ss]),Es=de(t=>{Z(Ss,t,!!Fr,Gr.current,vs.current,"mouse")&&(Kr.current="mouse",Rs.current=-1,Ys.current=null,_s({clientX:t.clientX,clientY:t.clientY,pointerType:"mouse"}))},[vs,Fr,Ys,Rs,_s,Ss]),Bs=de(t=>{Kr.current=t.pointerType},[]);Yr.current=()=>{if(Rr.current=null,!Dr.isActive)return;const t=vs.current,e=bs.current;if(!t||!e)return;const s=as.current;if(!s)return;const n=Dr.now(),a=null!=s.activeTransition,c=s.advanceTransition(Ar.current?n+1e6:n),l=!Ar.current&&c,h=mr.current.w!==Br||mr.current.h!==Or,u=ws.current,g=fr.current||a||h,d=a&&!c,p=s.consumeStylePaintPending();let y=!1;const f=s.getLastUpdateResult(),m=es.current.beforeCompute(f,l);!fr.current&&!h||l&&!h||(s.computeScene({width:Br,height:Or}),mr.current={w:Br,h:Or},y=!0,cs(),us()),(y||p)&&(Gr.current=Vt(s.scene),Gr.current||jt(t)),Gr.current&&(a||y||p)&&function(t){const{canvas:e,pointer:i,store:r,margin:s,width:o,height:n}=t;Ft(e,i,i=>{const a=e.getBoundingClientRect(),c=i.clientX-a.left-s.left,l=i.clientY-a.top-s.top;if(0>c||c>o||0>l||l>n)return;const h=ii(r.scene,c,l,Tt(t.hoverRadius,i.pointerType),t.geometryMoved?null:r.quadtree,r.maxPointRadius);return $t(h?.node)})}({canvas:t,pointer:Ss.current,store:s,margin:Er,width:Br,height:Or,hoverRadius:Xe,geometryMoved:a||y}),es.current.afterCompute(m,y,h);const x=C(s,n,y,xr),v=Yt(Ct,_r);qt(t,_r,v),qt(e,_r,v);const b=Zr.current.resolve(t);Qr.current=b.primary;const w=J(wi,s.lastIngestTime>0?n-s.lastIngestTime:0),A=wi&&w.isStale;if(g||p||x.changed||u){const e=zt(t,_r,Er,v);if(e){if(e.clearRect(-Er.left,-Er.top,_r[0],_r[1]),wi&&1>w.alpha&&(e.globalAlpha=w.alpha),H(e,{background:At,hasBackgroundGraphics:!!ci,themeBackground:b.background,x:-Er.left,y:-Er.top,width:_r[0],height:_r[1]}),e.save(),"function"==typeof e.rect&&(e.beginPath(),e.rect(0,0,Br,Or),e.clip()),hi&&s.scales)for(const t of hi)e.save(),t(e,s.scene,s.scales,{width:Br,height:Or}),e.restore();const t=o(r,!!cr);G({context:e,nodes:s.scene,renderMode:St,pixelRatio:v,paintBuiltIn:i=>{if(t&&s.scales)for(const r of t)r(e,i,s.scales,{width:Br,height:Or})}}),e.restore(),wi&&1>w.alpha&&(e.globalAlpha=1)}}const k=!!(Fr&&Hr.current&&s.scales),_=!!(qr.current&&Array.isArray(Be)&&Be.some(t=>t&&"object"==typeof t&&"highlight"===t.type)),S=k||_;if(E(S,ts.current)){const t=zt(e,_r,Er,v);if(t&&(t.clearRect(-Er.left,-Er.top,_r[0],_r[1]),k&&Hr.current&&function(t,e,r,s,o,n,a){if(!1===o.crosshair)return;const c=e.allSeries,l=c&&c.length>0,h=e.xPx??e.x;t.save();const u="object"==typeof o.crosshair?o.crosshair:{};t.strokeStyle=u.stroke||a.crosshair;const g=u.strokeWidth??1;if(t.setLineDash(u.strokeDasharray?u.strokeDasharray.split(/[\s,]+/).map(Number):[4,4]),g>0&&(t.lineWidth=g,t.beginPath(),t.moveTo(l?h:e.x,0),t.lineTo(l?h:e.x,s),t.stroke(),l||(t.beginPath(),t.moveTo(0,e.y),t.lineTo(r,e.y),t.stroke())),t.restore(),l){t.lineWidth=2,t.strokeStyle=a.pointRing;for(const e of c)null!=e.valuePx&&(t.beginPath(),t.arc(h,e.valuePx,4,0,2*Math.PI),t.fillStyle=e.color||a.primary,t.fill(),t.stroke())}else{const r=o.pointColor||i(n)||a.primary;t.beginPath(),t.arc(e.x,e.y,4,0,2*Math.PI),t.fillStyle=r,t.fill(),t.strokeStyle=a.pointRing,t.lineWidth=2,t.stroke()}}(t,Hr.current,Br,Or,"object"==typeof Fr?Fr:{},qr.current,b),_&&qr.current&&Array.isArray(Be))){const e=Be.find(t=>t&&"object"==typeof t&&"highlight"===t.type);e&&function(t,e,i,r,s){if(!i)return;const o="group"in i?i.group:void 0;if(void 0!==o)for(const i of e){if("line"!==i.type)continue;if(i.group!==o)continue;if(2>i.path.length)continue;const e="function"==typeof r.style?i.datum?r.style(i.datum):{}:r.style||{};t.save(),t.beginPath(),t.moveTo(i.path[0][0],i.path[0][1]);for(let e=1;i.path.length>e;e++)t.lineTo(i.path[e][0],i.path[e][1]);t.strokeStyle=e.stroke||i.style.stroke||s.primary;const n=e.strokeWidth??(i.style.strokeWidth??2)+2;n>0?(t.lineWidth=n,t.globalAlpha=e.opacity??1,t.stroke(),t.restore()):t.restore()}}(t,s.scene,qr.current,e,b)}ts.current=S}g&&t&&t.setAttribute("aria-label",_t(s.scene,r+" chart"));const M=fr.current;if(fr.current=M&&l&&!y,ws.current=!1,M&&s.scales){const t=t=>"object"==typeof t&&null!==t&&"function"==typeof t.valueOf?t.valueOf():t;(!Xr||t(Xr.x.domain()[0])!==t(s.scales.x.domain()[0])||t(Xr.x.domain()[1])!==t(s.scales.x.domain()[1])||t(Xr.y.domain()[0])!==t(s.scales.y.domain()[0])||t(Xr.y.domain()[1])!==t(s.scales.y.domain()[1])||Xr.x.range()[0]!==s.scales.x.range()[0]||Xr.x.range()[1]!==s.scales.x.range()[1]||Xr.y.range()[0]!==s.scales.y.range()[0]||Xr.y.range()[1]!==s.scales.y.range()[1])&&Vr(s.scales),Li&&xs(s.getData())}($e&&$e.length>0||cr)&&(y||a)&&(y||d||n-Wr.current>=33)&&(Ir(t=>t+1),Wr.current=n),wi?.showBadge&&rs(!!A),(l||null!=s.activeTransition||x.pending)&&Tr()},st(wi,as,fr,Tr,Dr.now,is,rs);const Os=me(()=>{if(Re||De)return;const t=as.current;return t?.xIsDate&&Xr?Ki(Xr.x.domain()):void 0},[Re,De,Xr]),Ls=Re||De||Os,zs=Fr&&Ur?Oe?Oe(Ur):rr(er,{hover:Ur}):null,Fs=zs?rr(yt,{x:Ur.x,y:Ur.y,containerWidth:Br,containerHeight:Or,margin:Er,className:"stream-frame-tooltip",children:zs}):null,Ns=Ys.current,Is=rr(ft,{active:Rs.current>=0,hoverPoint:Ur,margin:Er,size:_r,shape:Ns?.shape,width:Ns?.w,height:Ns?.h}),Ws=d(p,X,"__semiotic_resolvedX","__semiotic_resolvedTime"),Xs=d(y,z,"__semiotic_resolvedY","__semiotic_resolvedValue"),Vs=Ws.key,$s=Xs.key,js=g(Ws,Xs,$e&&$e.length>0||!1);if(Et||!br&&wr){const t=as.current;t&&a&&(t.ingest({inserts:ir(zr,k),bounded:!0}),t.computeScene({width:Br,height:Or}));const e=t?.scene??[],i=t?.scales??null,r=U(li,_r,Er,i),s=U(ci,_r,Er,i),o=Ls||(()=>{if(t?.xIsDate&&i)return Ki(i.x.domain())})(),n=qi||("string"==typeof gi?gi:"XY chart"),c=Li&&t?Ai(t.getData(),p,y):{xValues:[],yValues:[]};return sr("div",{ref:kr,className:"stream-xy-frame"+(wt?" "+wt:""),role:"img","aria-label":n,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ct?"100%":_r[0],height:lt?"100%":_r[1]},children:[rr(vt,{summary:Qi}),sr("svg",{xmlns:"http://www.w3.org/2000/svg",width:_r[0],height:_r[1],style:{position:"absolute",left:0,top:0},children:[sr("g",{transform:`translate(${Er.left},${Er.top})`,children:[At&&rr("rect",{x:0,y:0,width:Br,height:Or,fill:At}),s]}),sr("g",{transform:`translate(${Er.left},${Er.top})`,children:[ui&&i&&ui.map((t,r)=>rr(he.Fragment,{children:t(e,i,{width:Br,height:Or})},"svgpre-"+r)),e.map((t,e)=>q({node:t,index:e,renderMode:St,fallback:()=>ht(t,e,yr,Xe)})).filter(Boolean)]})]}),rr(Wi,{width:Br,height:Or,totalWidth:_r[0],totalHeight:_r[1],margin:Er,scales:i,showAxes:ke,axes:Ce,xLabel:Se,yLabel:Me,yLabelRight:Pe,xFormat:o,yFormat:Ye||Ee,axisExtent:Te,showGrid:qe,title:gi,legend:Ke,legendHoverBehavior:Ue,legendClickBehavior:Je,legendHighlightedCategory:Ze,legendIsolatedCategories:ti,legendPosition:si,legendLayout:oi,foregroundGraphics:N(r,nt(as.current?.customLayoutOverlays,ur??null)),marginalGraphics:Li,xValues:c.xValues,yValues:c.yValues,annotations:$e,onAnnotationActivate:je,onObservation:Ne??Fe,chartId:Ie,chartType:"StreamXYFrame",autoPlaceAnnotations:He,svgAnnotationRules:Ge,annotationFrame:0,xAccessor:Vs,yAccessor:$s,annotationData:js(as.current?.getData()),pointNodes:Ui(as.current?.scene),curve:"string"==typeof _?_:void 0,linkedCrosshairName:Zi,linkedCrosshairSourceId:tr})]})}return sr("div",{ref:kr,className:"stream-xy-frame"+(wt?" "+wt:""),role:"group","aria-label":qi||("string"==typeof gi?gi:"XY chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ct?"100%":_r[0],height:lt?"100%":_r[1],overflow:"visible",touchAction:ar(yi)},onKeyDown:Ts,children:["production"!==process.env.NODE_ENV&&as.current&&rr(xt,{store:as.current,diagnostics:es.current}),Gi&&sr(gt,{accessibleTable:Gi,children:[rr(bt,{tableId:Pr}),rr(ut,{scene:as.current?.scene??[],chartType:r+" chart",tableId:Pr,chartTitle:"string"==typeof gi?gi:void 0})]}),rr(vt,{summary:Qi}),rr(dt,{hoverPoint:Ur}),sr("div",{role:"img","aria-label":qi||("string"==typeof gi?gi:"XY chart"),style:{position:"relative",width:"100%",height:"100%"},onPointerMove:Ds,onMouseMove:Es,onPointerLeave:Cs,onMouseLeave:Cs,onPointerDown:Fr||pr?Bs:void 0,onClick:pr?Ps:void 0,children:[rr(pt,{size:_r,margin:Er,backdropFill:ci?At:void 0,children:jr}),rr(zi,{width:Br,height:Or,totalWidth:_r[0],totalHeight:_r[1],margin:Er,scales:Xr,showAxes:ke,axes:Ce,showGrid:qe,xFormat:Ls,yFormat:Ye||Ee,axisExtent:Te}),rr("canvas",{ref:vs,"aria-label":_t(as.current?.scene??[],r+" chart"),style:{position:"absolute",left:0,top:0}}),rr("canvas",{ref:bs,style:{position:"absolute",left:0,top:0,pointerEvents:"none"}}),rr(Wi,{width:Br,height:Or,totalWidth:_r[0],totalHeight:_r[1],margin:Er,scales:Xr,showAxes:ke,axes:Ce,xLabel:Se,yLabel:Me,yLabelRight:Pe,xFormat:Ls,yFormat:Ye||Ee,axisExtent:Te,showGrid:qe,title:gi,legend:Ke,legendHoverBehavior:Ue,legendClickBehavior:Je,legendHighlightedCategory:Ze,legendIsolatedCategories:ti,legendPosition:si,legendLayout:oi,foregroundGraphics:N($r,nt(as.current?.customLayoutOverlays,ur??null)),marginalGraphics:Li,xValues:fs,yValues:ms,annotations:$e,onAnnotationActivate:je,onObservation:Ne??Fe,chartId:Ie,chartType:"StreamXYFrame",autoPlaceAnnotations:He,svgAnnotationRules:Ge,annotationFrame:Nr,xAccessor:Vs,yAccessor:$s,annotationData:js(as.current?.getData()),pointNodes:Ui(as.current?.scene),curve:"string"==typeof _?_:void 0,underlayRendered:!0,canvasObscuresUnderlay:!!K({background:At,hasBackgroundGraphics:!!ci,themeBackground:Cr?.colors.background}),linkedCrosshairName:Zi,linkedCrosshairSourceId:tr}),(yi||fi)&&rr(_e,{width:Br,height:Or,totalWidth:_r[0],totalHeight:_r[1],margin:Er,dimension:yi?.dimension??"xy",scales:Xr,onBrush:fi??(()=>{}),binSize:L,snap:yi?.snap,binBoundaries:yi?.binBoundaries??("bar"===r?as.current?.getBinBoundaries():void 0),snapDuring:yi?.snapDuring,streaming:"streaming"===s}),wi?.showBadge&&rr(O,{isStale:is,position:wi.badgePosition}),Is,Fs]})]})}));cr.displayName="StreamXYFrame";var lr=cr;export{wi as provideMarginalGraphics,er as DefaultTooltip,lr as StreamXYFrame_default};
@@ -0,0 +1 @@
1
+ import{getChartRecipe as e}from"./c-XDRV7RKW.min.js";import{parseDateLikeString as t}from"./c-W3CE4A4S.min.js";import{annotationDrawsConnector as s,annotationType as a,isNoteAnnotation as o}from"./c-4ES5367Y.min.js";import{contrastRatio as r}from"./c-7W4SV36A.min.js";function i(e,t){const s=e.length,a=t.length,o=Array(a+1);for(let e=0;a>=e;e++)o[e]=e;for(let r=1;s>=r;r++){let s=o[0];o[0]=r;for(let i=1;a>=i;i++){const a=o[i];o[i]=e[r-1]===t[i-1]?s:1+Math.min(s,o[i],o[i-1]),s=a}}return o[a]}function n(e,t,s=3){let a,o=s+1;for(const s of t){const t=i(e.toLowerCase(),s.toLowerCase());o>t&&(o=t,a=s)}return o>s?void 0:a}function c(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:[...e]}function l(e,t){if(0===t.length)return null;const s=e.toLowerCase();return t.find(e=>e.toLowerCase().includes(s)||s.includes(e.toLowerCase()))||(n(e,t,3)??null)}function u(e){return` Or use a function: ${e}={d => d.myValue}.`}var d=["string","number",["number","object"],["boolean","object"],"boolean",["array","object"],["string","function"],["string","array","object"],["boolean","function","object","string"],"array","object",["boolean","string"],"function",["boolean","string","function","object"],["boolean","string","object"],["boolean","string","function"],["number","function"],["string","object"],["boolean","object","string","number"],["object","string","number","function"],["boolean","array"],["object","array"],["object","function"],["string","boolean"],["number","string","function"],["number","string"],["boolean","string","number","object"],["string","array"],["array","string"],["string","object","function"],["boolean","number","array"],["number","null"],["array","function"],["string","number","array","object","function"]],h=[["primary","context","sparkline","mobile"],["highlight","isolate","none"],["right","left","top","bottom"],["nice","exact"],["primary","secondary"],["linear","log","time"],["linear","log","symlog"],["sliding","growing"],["left","right"],["vertical","horizontal"],["horizontal","vertical"],["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"],["break","interpolate","zero"],["descending","ascending"],["smooth","linear"],["start","end","both","auto"],["series"],["zero","wiggle","silhouette","diverging"],["key","input","insideOut","asc","desc"],["blues","reds","greens","viridis","oranges","purples","greys","plasma","inferno","magma","cividis","turbo","custom"],["count","sum","mean"],["histogram","density","label"],["crossfilter","intersect"],["auto","worker","sync"],["source","target","gradient"],["justify","left","right","center"],["value","temporal"],["off","reuse"],["insertion","crossing-min","inside-out","crossing-min+inside-out"],["stack","hug"],["temporal","max"],["auto"],["raw","scene"],["source","target","both"],["full","half"],["source","target"],["tree","cluster","partition","treemap","circlepack"],["vertical","horizontal","radial"],["line","curve"],["leaf","parent","all"],["locked","decay","alternate"],["geo","line"],["basic","offset","arc"],["butt","round","square"],["straight","fractional"],["radial","strip"],["up","down"],["primary","context","sparkline","mobile","sample","mechanical"],["sample","mechanical"],["route","net"],["outcome","hold-last"],["replay","snapshot"],["horizontal"],["allAbsorbed","none"],["circle","halo","faceted","pill","diamond","square"],["auto","normalized","pixels"],["path","none"],["snapshot","replay","mechanical"],["none","blocker-amplification"],["domino-ball"],["vertical"],["settle"],["number","currency","percent","compact","duration"],["higher-is-better","lower-is-better","neutral"],["auto","positive","negative","neutral"],["tile","presentation","inline","thumbnail"],["start","center","end"]],p={common:{mode:[0,0],width:1,height:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,enableHover:4,showLegend:4,legendInteraction:[0,1],legendPosition:[0,2],legend:5,showGrid:4,colorBy:6,colorScheme:7,tooltip:8,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,maxDevicePixelRatio:1,axisExtent:[0,3],animate:3,loading:4,loadingContent:3,emptyContent:3,hoverHighlight:11,chartId:0,emphasis:[0,4],responsiveWidth:4,responsiveHeight:4,color:0,stroke:0,strokeWidth:1,opacity:1,onObservation:12,frameProps:10,onClick:12},xyAxis:{xLabel:0,yLabel:0,xFormat:12,yFormat:12,xScaleType:[0,5],yScaleType:[0,6]},ordinalAxis:{categoryLabel:0,valueLabel:0,showCategoryTicks:4,valueFormat:12,categoryFormat:12,dataIdAccessor:6},realtime:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,showLegend:4,legendPosition:[0,2],legendInteraction:[0,1],timeAccessor:6,valueAccessor:6,windowSize:1,windowMode:[0,7],arrowOfTime:[0,8],timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,cursor:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,decay:10,pulse:10,staleness:10,linkedHover:14,selection:10,loading:4,loadingContent:3,emptyContent:3,chartId:0,emphasis:[0,4],pointIdAccessor:6,onObservation:12},realtimeStatic:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,showLegend:4,legendPosition:[0,2],legendInteraction:[0,1],timeAccessor:6,valueAccessor:6,arrowOfTime:[0,8],timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,cursor:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,decay:10,pulse:10,staleness:10,linkedHover:14,selection:10,loading:4,loadingContent:3,emptyContent:3,chartId:0,emphasis:[0,4],pointIdAccessor:6,onObservation:12},physics:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,className:0,title:0,description:0,summary:0,accessibleTable:3,chartId:0,emphasis:[0,4],responsiveWidth:4,responsiveHeight:4,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,colorBy:6,color:0,stroke:0,strokeWidth:1,opacity:1,seed:1,ballRadius:1,hoverRadius:1,paused:4,tooltip:13,annotations:9,autoPlaceAnnotations:3,background:0,legend:5,legendPosition:[0,2],legendLayout:10,selection:10,linkedHover:14,onSimulationStateChange:12,loading:4,loadingContent:3,emptyContent:3,frameProps:10}};function m(e){const[t,s]=Array.isArray(e)?e:[e,void 0],a=d[t],o=Array.isArray(a)?[...a]:a;return void 0===s?{type:o}:{type:o,enum:[...h[s]]}}var g=Object.fromEntries(Object.entries({BarChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,brush:4,linkedBrush:17,onBrush:12,regression:14}],StackedBarChart:[["data","stackBy"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,stackBy:6,categoryAccessor:6,valueAccessor:6,orientation:[0,9],normalize:4,sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,showLegend:4}],GroupedBarChart:[["data","groupBy"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,groupBy:6,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,showLegend:4}],SwarmPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sizeBy:6,sizeRange:9,symbolBy:6,symbolMap:10,pointRadius:1,pointOpacity:1,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],BoxPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],showOutliers:4,outlierRadius:1,categoryPadding:1,valueExtent:9,styleRules:9}],Histogram:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,bins:1,relative:4,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],ViolinPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],bins:1,curve:0,showIQR:4,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],RidgelinePlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,orientation:[0,9],categoryAccessor:6,valueAccessor:6,bins:1,amplitude:1,categoryPadding:1,valueExtent:9,styleRules:9}],DotPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,dotRadius:1,categoryPadding:1,valueExtent:9,styleRules:9,showGrid:4,regression:14}],PieChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common"],{data:9,categoryAccessor:6,valueAccessor:6,styleRules:9,startAngle:1,cornerRadius:1,showCategoryTicks:4,dataIdAccessor:6}],DonutChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common"],{data:9,categoryAccessor:6,valueAccessor:6,styleRules:9,innerRadius:1,centerContent:18,startAngle:1,cornerRadius:1,showCategoryTicks:4,dataIdAccessor:6}],GaugeChart:[["value"],"none",[],["common"],{value:1,min:1,max:1,thresholds:9,gradientFill:10,arcWidth:1,cornerRadius:1,sweep:1,fillZones:4,showNeedle:4,needleColor:0,color:0,valueFormat:12,centerContent:19,showScaleLabels:4,backgroundColor:0,styleRules:9}],FunnelChart:[["data"],"array",["stepAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,stepAccessor:6,valueAccessor:6,categoryAccessor:6,orientation:[0,10],connectorOpacity:1,showLabels:4,showAxes:4,showCategoryTicks:4,responsiveWidth:4,legendPosition:[0,2],styleRules:9}],RadarChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,seriesAccessor:6,pointRadius:1,valueExtent:9,styleRules:9}],SwimlaneChart:[["subcategoryAccessor"],"array",["categoryAccessor","subcategoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,subcategoryAccessor:6,valueAccessor:6,orientation:[0,10],barPadding:1,roundedTop:16,valueExtent:9,trackFill:17,gradientFill:3,brush:4,onBrush:12,linkedBrush:17,showCategoryTicks:4,rTickValues:9,tickLabelEdgeAlign:4,responsiveWidth:4,legendPosition:[0,2],styleRules:9}],LikertChart:[[],"array",["categoryAccessor","valueAccessor","levelAccessor","countAccessor"],["common","ordinalAxis"],{data:9,levels:9,categoryAccessor:6,valueAccessor:6,levelAccessor:6,countAccessor:6,orientation:[0,9],barPadding:1,valueExtent:9,styleRules:9}],LineChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{frameProps:10,styleRules:9,data:9,xAccessor:6,yAccessor:6,lineBy:6,lineDataAccessor:0,curve:[0,11],lineWidth:1,showPoints:4,pointRadius:1,pointIdAccessor:6,fillArea:20,areaOpacity:1,lineGradient:10,directLabel:3,gapStrategy:[0,12],forecast:10,anomaly:10,band:21,xExtent:9,yExtent:9,brush:4,linkedBrush:17,onBrush:12}],BumpChart:[["data"],"array",["xAccessor","yAccessor"],["common"],{data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,lineBy:6,rankDirection:[0,13],ribbon:4,curve:[0,14],ribbonSizeRange:9,samplesPerSegment:1,lineWidth:1,highlightTop:1,neutralColor:0,ribbonOpacity:1,lineOpacity:1,showPoints:4,pointRadius:1,showLabels:[11,15],labelPriorityAccessor:0,maxLabels:1,showAxes:4,styleRules:9,labelStyle:22,legend:5,legendInteraction:[0,1],legendPosition:[0,2],hoverHighlight:[11,16]}],AreaChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,areaBy:6,lineDataAccessor:0,curve:[0,11],y0Accessor:6,gradientFill:3,semanticGradient:21,semanticLine:4,lineGradient:10,areaOpacity:1,showLine:4,lineWidth:1,showPoints:4,pointRadius:1,pointIdAccessor:6,forecast:10,anomaly:10,band:21,xExtent:9,yExtent:9}],DifferenceChart:[[],"array",["xAccessor","seriesAAccessor","seriesBAccessor"],["common","xyAxis"],{data:9,xAccessor:6,seriesAAccessor:6,seriesBAccessor:6,seriesALabel:0,seriesBLabel:0,seriesAColor:0,seriesBColor:0,showLines:4,lineWidth:1,showPoints:4,pointRadius:1,curve:[0,11],areaOpacity:1,gradientFill:3,xExtent:9,yExtent:9,pointIdAccessor:6,windowSize:1}],StackedAreaChart:[["data","areaBy"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,areaBy:6,lineDataAccessor:0,curve:[0,11],areaOpacity:1,showLine:4,lineWidth:1,showPoints:4,pointRadius:1,normalize:4,baseline:[0,17],stackOrder:[0,18],pointIdAccessor:6,xExtent:9,yExtent:9}],Scatterplot:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,sizeBy:6,sizeRange:9,symbolBy:6,symbolMap:10,pointRadius:1,pointOpacity:1,pointIdAccessor:6,marginalGraphics:22,xExtent:9,yExtent:9,regression:14,forecast:10,anomaly:10,brush:4,linkedBrush:17,onBrush:12}],BubbleChart:[["data","sizeBy"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,sizeBy:6,xAccessor:6,yAccessor:6,sizeRange:9,bubbleOpacity:1,bubbleStrokeWidth:1,bubbleStrokeColor:0,pointIdAccessor:6,marginalGraphics:22,xExtent:9,yExtent:9,regression:14}],Heatmap:[["data"],"array",["xAccessor","yAccessor","valueAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,valueAccessor:6,colorScheme:[0,19],customColorScale:12,showValues:4,valueFormat:12,cellBorderColor:0,cellBorderWidth:1,pointIdAccessor:6,xExtent:9,yExtent:9,legendPosition:[0,2],heatmapAggregation:[0,20],heatmapXBins:1,heatmapYBins:1}],QuadrantChart:[[],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,xCenter:1,yCenter:1,quadrants:10,centerlineStyle:10,showQuadrantLabels:4,quadrantLabelSize:1,sizeBy:6,sizeRange:9,pointRadius:1,pointOpacity:1,pointIdAccessor:6}],MultiAxisLineChart:[["series"],"array",["xAccessor"],["common","xyAxis"],{data:9,xAccessor:6,series:9,colorScheme:7,pointIdAccessor:6,curve:0,lineWidth:1}],WaterfallChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{data:9,xAccessor:6,yAccessor:6,positiveColor:0,negativeColor:0,connectorStroke:0,connectorWidth:1,gap:1,xExtent:9,yExtent:9,pointIdAccessor:6}],CandlestickChart:[[],"array",["xAccessor","highAccessor","lowAccessor"],["common","xyAxis"],{data:9,xAccessor:6,highAccessor:6,lowAccessor:6,openAccessor:6,closeAccessor:6,candlestickStyle:10,pointIdAccessor:6,xExtent:9,yExtent:9,mode:[0,0]}],ConnectedScatterplot:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,orderAccessor:6,orderLabel:0,pointRadius:1,pointIdAccessor:6,xExtent:9,yExtent:9,regression:14,forecast:10,anomaly:10}],ScatterplotMatrix:[["data","fields"],"array",[],["common"],{frameProps:10,data:9,fields:9,fieldLabels:10,cellSize:1,cellGap:1,pointRadius:1,pointOpacity:1,diagonal:[0,21],histogramBins:1,brushMode:[23,22],hoverMode:4,unselectedOpacity:1,idAccessor:6}],MinimapChart:[["data"],"array",[],["common"],{data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,lineBy:6,lineDataAccessor:0,curve:[0,11],lineWidth:1,fillArea:4,areaOpacity:1,showPoints:4,pointRadius:1,minimap:10,renderBefore:4,onBrush:12,brushExtent:9,yExtent:9}],ForceDirectedGraph:[["nodes","edges"],"network",["nodeIdAccessor","sourceAccessor","targetAccessor"],["common"],{styleRules:9,nodes:9,edges:9,nodeIdAccessor:6,nodeIDAccessor:6,sourceAccessor:6,targetAccessor:6,nodeLabel:6,nodeSize:24,nodeSizeRange:9,edgeWidth:24,edgeColor:0,edgeOpacity:1,nodeStroke:0,nodeStrokeWidth:1,iterations:1,forceStrength:1,layoutExecution:[0,23],layoutLoadingContent:3,onLayoutStateChange:12,showLabels:4}],SankeyDiagram:[["edges"],"network",["sourceAccessor","targetAccessor"],["common"],{styleRules:9,edges:9,nodes:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,edgeColorBy:[6,24],orientation:[0,9],nodeAlign:[0,25],nodePaddingRatio:1,nodeWidth:1,nodeLabel:6,showLabels:4,edgeOpacity:1,edgeSort:12}],ProcessSankey:[["domain"],"network",["sourceAccessor","targetAccessor"],["common"],{edges:9,nodes:9,domain:9,axisTicks:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,nodeLabel:6,startTimeAccessor:6,endTimeAccessor:6,systemInTimeAccessor:6,systemOutTimeAccessor:6,xExtentAccessor:6,groupBy:6,edgeIdAccessor:6,orientation:[0,10],legendPosition:[0,2],pairing:[0,26],packing:[0,27],laneOrder:[0,28],maxValueScale:1,lanePlacement:[0,29],nodeSizing:[0,30],showLabels:[11,31],labelPriorityAccessor:0,maxLabels:1,selectionDatum:[0,32],groupPadding:1,ribbonLane:[0,33],ribbonMinRun:25,lifetimeMode:[0,34],showLaneRails:4,showQualityReadout:4,edgeOpacity:1,styleRules:9,layoutExecution:[0,23],layoutWorkerThreshold:1,layoutLoadingContent:26,onLayoutStateChange:12,timeFormat:12,valueFormat:12,showParticles:4,particleStyle:10}],ChordDiagram:[["edges"],"network",["sourceAccessor","targetAccessor"],["common"],{styleRules:9,edges:9,nodes:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,edgeColorBy:[6,35],padAngle:1,groupWidth:1,sortGroups:12,nodeLabel:6,showLabels:4,edgeOpacity:1}],TreeDiagram:[["data"],"object",[],["common"],{styleRules:9,data:10,layout:[0,36],orientation:[0,37],childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,edgeStyle:[0,38],nodeLabel:6,showLabels:4,nodeSize:1}],Treemap:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,showLabels:4,labelMode:[0,39],padding:1,paddingTop:1,nodeLabel:6,nodeStyle:12}],CirclePack:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,showLabels:4,nodeLabel:6,circleOpacity:1,padding:1}],OrbitDiagram:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,nodeIdAccessor:6,colorByDepth:4,orbitMode:27,orbitSize:16,speed:1,eccentricity:16,showRings:4,nodeRadius:16,showLabels:4,animated:4,revolution:12,revolutionStyle:[0,40],foregroundGraphics:10}],ChoroplethMap:[["areas","valueAccessor"],"array",["valueAccessor"],["common"],{styleRules:9,areas:28,valueAccessor:6,colorScheme:27,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1,areaOpacity:1}],ProportionalSymbolMap:[["points","sizeBy"],"array",["xAccessor","yAccessor"],["common"],{styleRules:9,points:9,xAccessor:6,yAccessor:6,sizeBy:6,sizeRange:9,areas:28,pointIdAccessor:6,areaStyle:10,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],FlowMap:[["flows"],"array",[],["common"],{flows:9,nodes:9,nodeIdAccessor:0,xAccessor:6,yAccessor:6,valueAccessor:6,lineIdAccessor:6,lineType:[0,41],flowStyle:[0,42],areas:28,areaStyle:10,edgeColorBy:6,edgeOpacity:1,edgeWidthRange:9,pointRadius:1,edgeLinecap:[0,43],showParticles:4,particleStyle:10,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],DistanceCartogram:[["points","center","costAccessor"],"array",[],["common"],{styleRules:9,points:9,lines:9,xAccessor:6,yAccessor:6,nodeIdAccessor:0,center:0,costAccessor:6,strength:1,lineMode:[0,44],transition:1,pointRadius:1,showRings:30,showRingLabels:4,ringStyle:10,showNorth:4,costLabel:0,cartogramLayout:[0,45],projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],RealtimeLineChart:[[],"realtime",[],["realtime"],{styleRules:9,stroke:0,strokeWidth:1,strokeDasharray:0,opacity:1,aggregate:10,eventTime:10,transition:10}],RealtimeHistogram:[["binSize"],"realtime",[],["realtime"],{styleRules:9,binSize:1,direction:[0,46],categoryAccessor:6,colors:10,fill:0,stroke:0,strokeWidth:1,opacity:1,gap:1,legend:5,brush:14,onBrush:12,linkedBrush:17,transition:10}],TemporalHistogram:[["data","binSize"],"array",["timeAccessor","valueAccessor","categoryAccessor"],["realtimeStatic"],{styleRules:9,data:9,binSize:1,size:9,width:1,height:1,margin:2,className:0,timeAccessor:6,valueAccessor:6,direction:[0,46],categoryAccessor:6,colors:10,timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,fill:0,stroke:0,strokeWidth:1,opacity:1,gap:1,legend:5,transition:10,linkedHover:14,linkedBrush:17,brush:14,onBrush:12}],RealtimeSwarmChart:[[],"realtime",[],["realtime"],{styleRules:9,categoryAccessor:6,colors:10,radius:1,fill:0,opacity:1,stroke:0,strokeWidth:1,pointStyle:12,yScaleType:[0,6],transition:10}],RealtimeWaterfallChart:[[],"realtime",[],["realtime"],{styleRules:9,positiveColor:0,negativeColor:0,connectorStroke:0,connectorWidth:1,gap:1,stroke:0,strokeWidth:1,opacity:1,transition:10}],RealtimeHeatmap:[[],"realtime",[],["realtime"],{styleRules:9,heatmapXBins:1,heatmapYBins:1,aggregation:[0,20],categoryAccessor:6,colorScheme:[0,19],customColorScale:12}],GaltonBoardChart:[[],"array",["valueAccessor"],["physics"],{styleRules:9,valueAccessor:6,valueExtent:9,bins:1,mode:[0,47],simulationMode:[0,48],pegRows:1,mechanicalCount:1,branchProbability:1,referenceLines:21,rerunMS:31,showProjection:4}],EventDropChart:[["data"],"array",["timeAccessor","arrivalAccessor"],["physics"],{styleRules:9,timeAccessor:6,arrivalAccessor:6,windows:10,watermark:22,timeExtent:9,timeScale:1,rerunMS:31,showProjection:4}],UnitPileChart:[[],"array",["categoryAccessor","valueAccessor"],["physics"],{styleRules:9,categoryAccessor:6,valueAccessor:6,mode:[0,47],simulationMode:[0,48],mechanicalCount:1,mechanicalCategories:9,unitValue:1,showProjection:4,sediment:4,rerunMS:31}],CollisionSwarmChart:[[],"array",["xAccessor","groupAccessor","radiusAccessor"],["physics"],{styleRules:9,xAccessor:6,groupAccessor:6,radiusAccessor:6,pointRadius:1,xExtent:9,collisionIterations:1,settle:4,rerunMS:31,showProjection:4}],GauntletChart:[["negativeProperties"],"array",["idAccessor","positiveAccessor","negativeAccessor","metricsAccessor","startTimeAccessor"],["physics"],{idAccessor:6,labelAccessor:6,positiveAccessor:6,negativeAccessor:6,metricsAccessor:6,initialViability:6,positiveProperties:9,negativeProperties:9,gates:9,events:32,bodyGroups:32,crashOffset:1,initialSpawnPacing:10,startTimeAccessor:6,onCapacityChange:12,crashDetection:4,rerunMS:31,showChrome:4,showProjection:4,showTethers:4,coreForceMode:[0,49],terminalBehavior:[0,50]}],CrucibleChart:[["data","phases"],"array",["idAccessor","labelAccessor","categoryAccessor","amountAccessor","metricsAccessor","initialStateAccessor"],["physics"],{description:0,summary:0,phases:9,products:9,events:9,outlets:9,idAccessor:6,labelAccessor:6,categoryAccessor:6,amountAccessor:6,metricsAccessor:6,initialStateAccessor:6,metrics:10,amountLabel:0,conservation:3,projection:10,playback:[0,51],snapshotAt:2,controls:3,paused:4,playbackRate:1,rerunMS:31,seed:25,bodyRadius:1,radiusRange:9,colorBy:6,showBonds:4,showChrome:4,showProjection:4,initialSpawnPacing:10,loading:4,loadingContent:3,emptyContent:3,onStateChange:12,onCrucibleObservation:12,onDiagnostic:12,onConservation:12,onClick:12}],ProcessFlowChart:[["stages"],"array",["idAccessor","stageAccessor","groupBy","workAccessor","radiusAccessor"],["physics"],{stages:9,stageAccessor:6,idAccessor:6,groupBy:6,groupLabelAccessor:6,workAccessor:6,radiusAccessor:6,ballRadius:1,route:[0,52],groupCompletion:[0,53],groupAnchorAlong:1,showProjection:4,showChrome:4,chromeOptions:10,settle:4,gravityX:1,gravityY:1,springStiffness:1,springDamping:1,rerunMS:31,initialSpawnPacing:10,liveCapacity:4,bodyLimit:1,bodyMark:[0,54],seed:1}],PacketFlowChart:[[],"network",["nodeIdAccessor","nodeXAccessor","nodeYAccessor","sourceAccessor","targetAccessor","throughputAccessor","pathAccessor"],["common"],{size:9,background:0,legendLayout:10,nodes:9,links:9,edges:9,data:9,nodeIdAccessor:6,nodeXAccessor:6,nodeYAccessor:6,sourceAccessor:6,targetAccessor:6,throughputAccessor:6,pathAccessor:6,styleRules:9,coordinateMode:[0,55],particleRate:1,maxParticles:1,particleRadius:1,flowSpeed:1,pathConstraint:[0,56],reducedMotion:4,showStaticFlow:4,showNodeLabels:4,showSensors:4,paused:4,rerunMS:31,seed:1}],ChainReactionChart:[["data","taskIDAccessor","labelAccessor","laneAccessor","dependencyAccessor"],"array",["taskIDAccessor","labelAccessor","laneAccessor","dependencyAccessor","startAccessor","endAccessor","progressAccessor","statusAccessor","completionTimeAccessor","blockerAccessor","milestoneAccessor"],["physics"],{taskIDAccessor:6,labelAccessor:6,laneAccessor:6,dependencyAccessor:6,startAccessor:6,endAccessor:6,progressAccessor:6,statusAccessor:6,completionTimeAccessor:6,blockerAccessor:6,milestoneAccessor:6,mode:[0,57],insight:[0,58],currentTime:2,controls:20,mechanism:[0,59],orientation:[0,60],reducedMotion:[0,61],enableHover:4,seed:1,selectedTaskIDs:9,onSelectionChange:12,onObservation:12}],BigNumber:[[],"none",[],[],{width:25,height:25,className:0,chartId:0,description:0,summary:0,loading:4,loadingContent:3,emptyContent:3,value:1,label:0,caption:0,format:[6,62],locale:0,currency:0,precision:1,prefix:0,suffix:0,unit:0,comparison:10,target:10,delta:1,deltaFormat:[6,62],showDeltaPercent:4,direction:[0,63],sentiment:[0,64],thresholds:9,chartSlot:33,chartSize:1,windowSize:1,mode:[0,65],align:[0,66],padding:2,emphasis:[0,4],color:0,background:0,borderColor:0,borderRadius:25,animate:3,stalenessThreshold:1,staleLabel:0,headerSlot:33,valueSlot:33,deltaSlot:33,trendSlot:33,footerSlot:33,onClick:12,onObservation:12}]}).map(([e,[t,s,a,o,r]])=>[e,{required:[...t],dataShape:s,dataAccessors:[...a],props:Object.fromEntries(Object.entries(Object.assign({},...o.map(e=>p[e]),r)).map(([e,t])=>[e,m(t)]))}]));function y(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}var f=new Set(["start","center","end","left","right"]),b={swatchSize:{minimum:1,label:"a positive number"},labelGap:{minimum:0,label:"a non-negative number"},itemGap:{minimum:0,label:"a non-negative number"},rowHeight:{minimum:1,label:"a positive number"},maxWidth:{minimum:1,label:"a positive number"},edgeGutter:{minimum:0,label:"a non-negative number"},sideGutter:{minimum:0,label:"a non-negative number"},axisGutter:{minimum:0,label:"a non-negative number"}};function A(e,t){const s=[];null!=t&&"object"==typeof t||(t={});const a=g[e];if(!a)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(g).join(", ")}`]};for(const o of a.required)null==t[o]&&s.push(`"${o}" is required for ${e}.`);"array"!==a.dataShape||!Object.prototype.hasOwnProperty.call(a.props,"data")||a.required.includes("data")||function(e,t){return"mechanical"===t.mode&&("GaltonBoardChart"===e||"UnitPileChart"===e)}(e,t)||null!=t.data||s.push(`"data" is required for ${e}.`);for(const[e,o]of Object.entries(t)){if(null==o)continue;const t=a.props[e];if(t){if(!y(o,t.type)){const a=Array.isArray(t.type)?t.type.join(" | "):t.type;s.push(`"${e}" should be ${a}, got ${Array.isArray(o)?"array":typeof o}.`);continue}t.enum&&"string"==typeof o&&!t.enum.includes(o)&&s.push(`"${e}" value "${o}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const o=Object.keys(a.props),r=new Set(o);for(const a of Object.keys(t))if(void 0!==t[a]&&!r.has(a)){const t=n(a,o),r=t?`Unknown prop "${a}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${a}" for ${e}. Valid props: ${o.join(", ")}.`;s.push(r)}if("array"===a.dataShape){const o=t.data,r={};for(const e of a.dataAccessors){const s=t[e];"string"==typeof s&&(r[e]=s)}const i=function({componentName:e,data:t,accessors:s,requiredProps:a}){if(a)for(const[t,s]of Object.entries(a))if(null==s)return`${e}: ${t} is required. Provide a field name or function.`;if(null==t)return null;if(!Array.isArray(t)&&"object"==typeof t)return e+": data should be an array, but received an object. If this is hierarchical data, use TreeDiagram, Treemap, or CirclePack instead.";if(!Array.isArray(t)||0===t.length)return e+": No data provided. Pass a non-empty array to the data prop.";if(s){const a=c(t).find(e=>e&&"object"==typeof e);if(a){const t=Object.keys(a);for(const[o,r]of Object.entries(s))if(r&&"string"==typeof r&&!(r in a)){const s=l(r,t),a=s?` Try ${o}="${s}".`:"";return`${e}: ${o} "${r}" not found in data. Available fields: ${t.join(", ")}.${a}`+u(o)}}}return null}({componentName:e,data:o,accessors:Object.keys(r).length>0?r:void 0});i&&s.push(i)}else if("object"===a.dataShape){const a=function({componentName:e,data:t,dataLabel:s="data"}){return null==t?`${e}: No ${s} provided. Pass a hierarchical object with children: { name: "root", children: [...] }.`:Array.isArray(t)?`${e}: ${s} should be a single root object, not an array. Expected: { name: "root", children: [...] }. If you have flat data, use LineChart, BarChart, or Scatterplot instead.`:null}({componentName:e,data:t.data});a&&s.push(a)}else if("network"===a.dataShape){const o=t.nodeIdAccessor??t.nodeIDAccessor??"id",r="string"==typeof o?{nodeIdAccessor:o}:void 0,i=function({componentName:e,nodes:t,edges:s,nodesRequired:a=!1,edgesRequired:o=!0,accessors:r}){if(null==t&&null==s)return null;if(o&&(!s||!Array.isArray(s)||0===s.length))return e+': No edges provided. Pass a non-empty array: edges={[{ source: "A", target: "B", value: 10 }, ...]}.';if(a&&(!t||!Array.isArray(t)||0===t.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(r&&t&&t.length>0){const s=c(t).find(e=>e&&"object"==typeof e);if(s){const t=Object.keys(s);for(const[a,o]of Object.entries(r))if(o&&"string"==typeof o&&!(o in s)){const s=l(o,t),r=s?` Try ${a}="${s}".`:"";return`${e}: ${a} "${o}" not found in node data. Available fields: ${t.join(", ")}.${r}`+u(a)}}}return null}({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:a.required.includes("nodes"),edgesRequired:a.required.includes("edges"),accessors:r});i&&s.push(i)}return"GaugeChart"===e&&s.push(...function(e){if(!Array.isArray(e.thresholds))return[];const t=[];return 0===e.thresholds.length&&t.push('"thresholds" for GaugeChart must contain at least one { value, color, label? } object.'),e.thresholds.forEach((e,s)=>{if(!e||"object"!=typeof e||Array.isArray(e))return void t.push(`"thresholds[${s}]" for GaugeChart should be an object with numeric "value" and string "color".`);const a=e;"number"==typeof a.value&&Number.isFinite(a.value)||t.push(`"thresholds[${s}].value" is required for GaugeChart and must be a finite number. BigNumber's "at" threshold key is not supported here.`),"string"==typeof a.color&&0!==a.color.length||t.push(`"thresholds[${s}].color" is required for GaugeChart and must be a non-empty string.`),void 0!==a.label&&"string"!=typeof a.label&&t.push(`"thresholds[${s}].label" for GaugeChart should be a string.`);const o=Object.keys(a).filter(e=>"value"!==e&&"color"!==e&&"label"!==e);o.length>0&&t.push(`"thresholds[${s}]" has unsupported GaugeChart key(s): ${o.join(", ")}. Use { value, color, label? }; { at, level } belongs to BigNumber.`)}),t}(t)),"ScatterplotMatrix"===e&&null!=t.frameProps&&s.push('"frameProps" is not supported for ScatterplotMatrix; configure its matrix props directly.'),s.push(...function(e){const t=e.frameProps;if(null==t||"object"!=typeof t||Array.isArray(t))return[];const s=t.legendLayout;if(null==s||"object"!=typeof s||Array.isArray(s))return null==s?[]:['"frameProps.legendLayout" should be object, got '+(Array.isArray(s)?"array":typeof s)+"."];const a=[],o=s,r=new Set(["align",...Object.keys(b)]);for(const e of Object.keys(o))r.has(e)||a.push(`Unknown "frameProps.legendLayout" key "${e}". Valid keys: ${[...r].join(", ")}.`);void 0!==o.align&&"string"!=typeof o.align?a.push(`"frameProps.legendLayout.align" should be string, got ${Array.isArray(o.align)?"array":typeof o.align}.`):"string"!=typeof o.align||f.has(o.align)||a.push(`"frameProps.legendLayout.align" value "${o.align}" is not valid. Expected one of: ${[...f].join(", ")}.`);for(const[e,t]of Object.entries(b)){const s=o[e];void 0!==s&&("number"==typeof s&&Number.isFinite(s)?t.minimum>s&&a.push(`"frameProps.legendLayout.${e}" should be ${t.label} (minimum ${t.minimum}), got ${s}.`):a.push(`"frameProps.legendLayout.${e}" should be ${t.label}, got ${Array.isArray(s)?"array":typeof s}.`))}return a}(t)),{valid:0===s.length,errors:s}}function v(e,t){const s={numbers:[],missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(const a of e){const e=a?.[t];if(null==e||""===e){s.missing++;continue}let o;if("number"==typeof e)o=e;else if("string"==typeof e){const t=e.trim();if(""===t){s.missing++;continue}const a=Number(t);Number.isNaN(a)?/^[+-]?nan$/i.test(t)&&(o=a):o=a}void 0!==o?Number.isFinite(o)?(s.numbers.push(o),0===o&&s.zero++,0>o&&s.negative++,Number.isInteger(o)||s.fractional++):s.nonFinite++:s.nonNumeric++}return s}function w(e,t){if(0===e.length)return;const s=(e.length-1)*t,a=Math.floor(s),o=Math.ceil(s);if(a===o)return e[a];const r=s-a;return e[a]*(1-r)+e[o]*r}function x(e,t={}){if(!Array.isArray(e)||0===e.length)return{};const s=new Set;for(const t of e)if(t&&"object"==typeof t)for(const e of Object.keys(t))s.add(e);const a={};for(const o of s){const s=v(e,o);let r=1/0,i=-1/0;for(const e of s.numbers)r>e&&(r=e),e>i&&(i=e);const n=!1===t.quantiles?void 0:[...s.numbers].sort((e,t)=>e-t);a[o]={field:o,observedCount:e.length-s.missing,finiteCount:s.numbers.length,missingCount:s.missing,nonFiniteCount:s.nonFinite,nonNumericCount:s.nonNumeric,zeroCount:s.zero,negativeCount:s.negative,fractionalCount:s.fractional,...s.numbers.length>0?{min:r,...n?{q1:w(n,.25),median:w(n,.5),q3:w(n,.75)}:{},max:i}:{}}}return a}function C(e){const t=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(const s of e.diagnoses)t.push(`${"error"===s.severity?"ERROR":"WARN"} ${s.code}${s.field?` [${s.field}]`:""}: ${s.message}`),s.fix&&t.push(" Fix: "+s.fix);return t.join("\n")}function S(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function R(e,t={}){const s=Number.isFinite(t.max)?Math.max(0,Math.floor(t.max)):6,a=e.diagnoses.map((e,t)=>({item:e,diagnosisIndex:t})).filter(({item:e})=>!t.errorsOnly||"error"===e.severity),o=a.slice(0,s).map(({item:e,diagnosisIndex:t})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${t}`,level:e.severity,title:e.field?`${S(e)} · ${e.field}`:S(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return a.length>s&&o.push({id:"data-audit:overflow:chart",level:a.slice(s).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${a.length-s} more numeric finding${a.length-s===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),o}function k(e,t){const s=e.nestedDataAccessorProp?t[e.nestedDataAccessorProp]:void 0;return"string"==typeof s?s:e.defaultNestedDataAccessor}function P(e,t,s){const a=e.dataProp??"data",o=t[a],r=s??(Array.isArray(o)?o:[]),i=k(e,t);if(!i)return{dataProp:a,rows:r};const n=[];let c=!1;for(const e of r){const t=e?.[i];if(Array.isArray(t)){c=!0;for(const e of t)e&&"object"==typeof e&&n.push(e)}}return{dataProp:a,rows:c?n:r}}var $=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],L={fields:$},B=[{...$[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...$[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],z={fields:B},E={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},I={...E,domain:!0},j={fields:[{...E,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},N={fields:[E],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},T={fields:B,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},O={fields:[...$,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},F={fields:[...$,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},D={fields:[E]},M={fields:[{...E,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},V={LineChart:z,AreaChart:z,BumpChart:z,Scatterplot:F,ConnectedScatterplot:L,QuadrantChart:F,MinimapChart:z,BubbleChart:O,StackedAreaChart:T,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:D,BarChart:{fields:[E]},GroupedBarChart:{fields:[E]},StackedBarChart:N,DotPlot:{fields:[I]},Histogram:{fields:[I]},BoxPlot:{fields:[I]},SwarmPlot:{fields:[I,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[I]},RidgelinePlot:{fields:[I]},PieChart:j,DonutChart:j,FunnelChart:j,SankeyDiagram:M,ChordDiagram:M,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},G=Symbol.for("semiotic.numericContractRegistry");var W={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};function q(e,t,s){return"function"==typeof e?e(t,s):t[e]}function _(e,s){if("number"==typeof e)return Number.isFinite(e)?e:null;if(e instanceof Date){const t=e.getTime();return s&&Number.isFinite(t)?t:null}if("string"==typeof e){const a=e.trim(),o=Number(a);if(a&&Number.isFinite(o))return o;if("date-like"===s){const e=t(a);return Number.isFinite(e)?e:null}}return null}function U(e){return"number"==typeof e&&!Number.isFinite(e)}function H(e,t,s,a,o){const r={field:s,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let s=0;e.length>s;s++){let i;try{i=q(t,e[s],s)}catch{r.accessorErrorRows.push(s);continue}if(null==i||""===i){if(void 0!==o){r.numbers.push(o),r.finiteRows.push(s),0===o&&r.zeroRows.push(s),0>o&&r.negativeRows.push(s),Number.isInteger(o)||r.fractionalRows.push(s);continue}r.missingRows.push(s);continue}const n=_(i,a);null!=n?(r.numbers.push(n),r.finiteRows.push(s),0===n&&r.zeroRows.push(s),0>n&&r.negativeRows.push(s),Number.isInteger(n)||r.fractionalRows.push(s)):U(i)?r.nonFiniteRows.push(s):r.nonNumericRows.push(s)}return r}function Z(e,t){const s=new Set(e.requirements??["finite"]);return s.add("finite"),("x"===e.role&&"log"===t.xScaleType||"y"===e.role&&"log"===t.yScaleType)&&s.add("positive"),[...s]}function X(e){return e.slice(0,5)}function Q(e){return{domain:"data",...e}}function Y(e,t){const s=[],{observation:a,contract:o,accessorLabel:r,requirements:i}=e,n={field:r,role:o.role},c=[...a.nonFiniteRows,...a.nonNumericRows,...a.accessorErrorRows].sort((e,t)=>e-t);if(0===a.numbers.length)return s.push(Q({severity:"error",code:"DEGENERATE_EXTENT",message:`${o.accessor}="${r}" produces no finite numeric values; the chart cannot resolve its ${o.role} input.`,fix:`Ensure ${r} contains finite numbers${"x"===o.role?" (or valid dates for a time scale)":""}.`,...n,...c.length>0?{rows:X(c),count:c.length}:{}})),s;a.nonFiniteRows.length>0&&s.push(Q({severity:"error",code:"NON_FINITE_VALUE",message:`${r} contains ${a.nonFiniteRows.length} NaN or infinite value${1===a.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${r} before rendering.`,...n,rows:X(a.nonFiniteRows),count:a.nonFiniteRows.length})),!o.allowMissing&&a.missingRows.length>0&&s.push(Q({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${r} is missing for ${a.missingRows.length} row${1===a.missingRows.length?"":"s"}; the ${o.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${r} values before rendering.`,...n,rows:X(a.missingRows),count:a.missingRows.length}));const l=[...a.nonNumericRows,...a.accessorErrorRows].sort((e,t)=>e-t);if(l.length>0&&s.push(Q({severity:"error",code:"NON_NUMERIC_VALUE",message:`${r} produces ${l.length} non-numeric value${1===l.length?"":"s"} for the ${o.role} role.`,fix:`Bind ${o.accessor} to a numeric field or return finite numbers from the accessor.`,...n,rows:X(l),count:l.length})),o.domain&&a.numbers.length>=2){const[e,t]=function(e){let t=1/0,s=-1/0;for(const a of e)t>a&&(t=a),a>s&&(s=a);return[t,s]}(a.numbers);e===t&&s.push(Q({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${r} is constant at ${e}; its ${o.role} scale has a zero-span data domain.`,fix:`Provide varying ${o.role} values, set an explicit extent around ${e}, or use a single-value display.`,...n,rows:X(a.finiteRows),count:a.finiteRows.length}))}if(i.includes("positive")){const t=a.numbers.map((e,t)=>({number:e,row:a.finiteRows[t]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(t.length>0){const a=e.logScale;s.push(Q({severity:"error",code:a?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${r} contains ${t.length} non-positive value${1===t.length?"":"s"}, which ${a?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:a?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...n,rows:X(t),count:t.length}))}}if(i.includes("non-negative")&&a.negativeRows.length>0&&s.push(Q({severity:"error",code:"size"===o.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${r} contains ${a.negativeRows.length} negative ${o.role} value${1===a.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...n,rows:X(a.negativeRows),count:a.negativeRows.length})),i.includes("integer")){const e=[...new Set([...a.negativeRows,...a.zeroRows,...a.fractionalRows])].sort((e,t)=>e-t);e.length>0&&s.push(Q({severity:"error",code:"INVALID_COUNT",message:`${r} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...n,rows:X(e),count:e.length}))}if(i.includes("unit-interval")){const e=a.numbers.map((e,t)=>({number:e,row:a.finiteRows[t]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&s.push(Q({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${r} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${r} to [0, 1] before using it as ${o.role}.`,...n,rows:X(e),count:e.length}))}if(t&&o.domain){const t=function(e){const t=e.observation.numbers.map((t,s)=>({value:t,row:e.observation.finiteRows[s]})).sort((e,t)=>e.value-t.value);if(8>t.length)return[];const s=t.map(e=>e.value),a=w(s,.25),o=w(s,.75),r=w(s,.5),i=o-a;if(i>0){const e=a-10*i,s=o+10*i;return t.filter(t=>e>t.value||t.value>s).map(e=>e.row)}const n=100*Math.max(1,Math.abs(r));return t.filter(e=>Math.abs(e.value-r)>n).map(e=>e.row)}(e);t.length>0&&s.push(Q({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${r} has ${t.length} extreme value${1===t.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...n,rows:X(t),count:t.length}))}return s}function K(e,t,s){if(!e)return"__all__";try{return q(e,t,s)+""}catch{return"__accessor_error__"}}function J(e,t,s){if(e.whenProp&&!0!==s[e.whenProp])return[];const a=t.find(t=>t.contract.role===e.role);if(!a||0===a.observation.numbers.length)return[];const o=e.groupAccessor?s[e.groupAccessor]:void 0,r="string"==typeof o||"function"==typeof o?o:e.defaultGroupAccessor,i=new Map;for(let e=0;a.rows.length>e;e++){let t;try{t=q(a.accessor,a.rows[e],e)}catch{continue}const s=_(t,void 0);if(null==s)continue;const o=K(r,a.rows[e],e),n=i.get(o)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};n.sum+=s,n.magnitude+=Math.abs(s),n.positive||(n.positive=s>0),n.negative||(n.negative=0>s),n.rows.push(e),0>s&&n.negativeRows.push(e),i.set(o,n)}const n=[],c=[],l=[],u=[],d=[],h=[];for(const[t,s]of i)("positive-total"===e.kind&&0>=s.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,s.magnitude)*10>=Math.abs(s.sum))&&(n.push(t),u.push(...s.rows)),"normalized-total"===e.kind&&s.positive&&s.negative&&(c.push(t),d.push(...s.rows)),"normalized-total"===e.kind&&s.negative&&(l.push(t),h.push(...s.negativeRows));const p=[];return n.length>0&&p.push(Q({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${n.length} normalization group${1===n.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:a.accessorLabel,role:e.role,rows:X([...new Set(u)].sort((e,t)=>e-t)),count:n.length})),l.length>0&&p.push(Q({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${l.length} normalization group${1===l.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:a.accessorLabel,role:e.role,rows:X([...new Set(h)].sort((e,t)=>e-t)),count:h.length})),c.length>0&&p.push(Q({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${c.length} normalization group${1===c.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:a.accessorLabel,role:e.role,rows:X([...new Set(d)].sort((e,t)=>e-t)),count:c.length})),p}function ee(e,t,s,a={}){const o=a.contracts??function(e){return function(){const e=globalThis;return e[G]??(e[G]={contracts:new Map}),e[G]}().contracts.get(e)??V[e]}(e)??function(e){const t=[];for(const[s,a]of Object.entries(W))"string"!=typeof e[s]&&"function"!=typeof e[s]||t.push({role:a,accessor:s,..."size"===a?{requirements:["finite","non-negative"]}:{},..."x"===a||"y"===a?{domain:!0}:{}});return t.length>0?{fields:t}:void 0}(t);if(!o)return{component:e,ok:!0,rowCount:s?.length??(Array.isArray(t.data)?t.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};const r=function(e,t,s){const a=[],o=new Set;for(const r of e.fields){if(r.whenProps?.some(e=>null==t[e]))continue;const e=t[r.accessor],i="string"==typeof e||"function"==typeof e?e:r.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;const{dataProp:n,rows:c}=P(r,t,s);if(0===c.length)continue;const l="string"==typeof i?i:r.accessor+"()",u=`${n}:${r.role}:${l}`;if(o.has(u))continue;o.add(u);const d=r.temporalValues??("time"===r.role||"x"===r.role&&"time"===t.xScaleType?"date-like":void 0),h="x"===r.role&&"log"===t.xScaleType||"y"===r.role&&"log"===t.yScaleType,p=Z(r,t);a.push({contract:r,accessor:i,accessorLabel:l,dataProp:n,rows:c,requirements:p,logScale:h,observation:H(c,i,l,d,r.missingValue)})}return a}(o,t,s),i=[],n=!1!==a.checkOutliers;for(const e of function(e,t,s){const a=new Set;for(const o of e.fields){const e=o.dataProp??"data",r=s??t[e];if(!Array.isArray(r))continue;if(0===r.length){a.add(e);continue}const i=k(o,t);if(!i)continue;const n=r.map(e=>e?.[i]).filter(Array.isArray);n.length>0&&n.every(e=>0===e.length)&&a.add(`${e}.${i}`)}return[...a]}(o,t,s))i.push(Q({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));const c=new Set(r.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(const e of c)i.push(Q({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(const e of r)i.push(...Y(e,n));for(const e of o.aggregates??[])i.push(...J(e,r,t));const l=i.filter(e=>"error"===e.severity).length,u=i.length-l;return{component:e,ok:0===l,rowCount:r.reduce((e,t)=>Math.max(e,t.rows.length),s?.length??(Array.isArray(t.data)?t.data.length:0)),summary:{fieldsChecked:r.length,errors:l,warnings:u},contracts:r.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:i}}var te=["title","description","summary"];function se(e){return"string"==typeof e&&e.trim().length>0}var ae=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]),oe=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),re=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),ie=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),ne=new Set(["LineChart","AreaChart","StackedAreaChart"]),ce=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),le=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),ue=new Set(["PieChart","DonutChart"]),de={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},he=new Set(Object.keys(de)),pe={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},me=new Set(["BigNumber"]),ge=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),ye=new Set(["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","DotPlot","RidgelinePlot","FunnelChart","LikertChart","SwimlaneChart"]),fe=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]),be=new Set(["OrbitDiagram",...fe]),Ae=new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart"]),ve=new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),we=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),xe=new Set(["MultiAxisLineChart"]),Ce=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),Se={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"};function Re(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){const t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function ke(e){const t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(3>=t.length)return 1;const s=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return s?s.length:1}function Pe(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function $e(t,i,n={}){const c=[],l=e(t),u=fe.has(t),d=!!g[t]||!!l||u,h=!0===n.inChartContainer,p=!0===n.describe,m=!0===n.navigable,y=me.has(t),f=oe.has(t),{hasTitle:b,hasDescription:A,hasSummary:v,unsupportedFinding:w}=function(e,t){const s=g[e]?.props,a=e=>!!s?.[e],o=te.filter(e=>se(t[e])&&!a(e));return{hasTitle:a("title")&&se(t.title),hasDescription:a("description")&&se(t.description),hasSummary:a("summary")&&se(t.summary),unsupportedFinding:o.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${o.join(" and ")} text was supplied, but ${1===o.length?"that prop is":"those props are"} not supported by ${e}'s declared chart API and cannot be credited as rendered accessibility text.`,fix:"Use the component's declared title, description, and summary props when available; for richer generated description or navigation, use ChartContainer with chartConfig plus describe and/or navigable."}:void 0}}(t,i),x=!1!==i.accessibleTable&&!y,C=b||A||v,S=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(i),R=function(e){const t=Pe(e),s=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===s.pause||"function"==typeof s.pause}(i),k=u,P=function(e){const t=Pe(e);return!0===e.settledProjection||!0===t.settledProjection}(i)||Ae.has(t)&&x,$=function(e){const t=Pe(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(i)||k,L=Array.isArray(i.annotations)?i.annotations.filter(e=>!!e&&"object"==typeof e):[],B=d?"pass":"manual",z=d?"":` (unrecognized component "${t}" — verify manually that the built-in applies)`;if(w&&c.push(w),c.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},s=e.colorScheme,a="string"==typeof e.background?e.background:null;if(a&&!a.startsWith("#"))return{...t,status:"manual",message:`Background "${a}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};const o=a??"#ffffff";if(!Array.isArray(s))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};const i=[];let n=0;for(const e of s){if("string"!=typeof e||!e.startsWith("#"))continue;const t=r(e,o);null!=t&&(n++,3>t&&i.push(`${e} (${t.toFixed(1)}:1)`))}return 0===n?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:i.length>0?{...t,status:"fail",message:`${i.length} color(s) fall below 3:1 contrast vs ${o}: ${i.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${n} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${o}.`}}(i)),c.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...y?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:x?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:A&&v?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),c.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),c.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=i.pulse||be.has(t)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=i.colorBy){const e=!0===i.directLabel||!0===i.showLabels,t=function(e){return!!Array.isArray(e.styleRules)&&e.styleRules.some(e=>{if("object"!=typeof e||null===e)return!1;const t=e.style;if("object"!=typeof t||null===t||Array.isArray(t))return!1;const s=t.fill;return"object"==typeof s&&null!==s&&"hatch"===s.type})}(i);c.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...e?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:t?"Categories use colorBy and this config authors a HatchFill through styleRules, but a static audit cannot prove those rules give every category a distinct non-color cue. Semiotic does not automatically assign per-category textures.":"Categories are encoded by color (colorBy) with no declared redundant channel. Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor and there is no automatic per-category texture assignment.",fix:t?"Verify every category remains distinguishable with color removed; add direct labels where hatching is incomplete, keep categories ≤ ~7, and use a CVD-safe palette.":"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy) or category-targeted styleRules with distinct HatchFill descriptors; keep categories ≤ ~7 and use a CVD-safe palette."}});const s=function(e){if(!Array.isArray(e))return!1;const t=e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase());return t.length>0&&t.every(e=>ae.has(e))}(i.colorScheme);c.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...s?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),c.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:t?"This config uses an author-supplied HatchFill through styleRules, but Semiotic has no automatic, theme-aware per-category texture channel or user-facing texture toggle.":"Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor; there is no automatic, theme-aware per-category texture channel or user-facing texture toggle.",fix:t?"Verify the authored hatches cover every meaningful category and remain legible in the active theme; pair them with direct labels and a CVD-safe palette.":"Use category-targeted styleRules with distinct HatchFill descriptors or direct labels so the encoding survives color removal. Contrast itself is themeable via CSS variables."})}{const e=L.filter(o);if(e.length>0){const t=i.autoPlaceAnnotations,o="object"==typeof t&&null!==t&&!0===t.redundantCues,r=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=a(e),r=o&&"text"===t;return!(s(e)||r)});c.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===r.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${r.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}c.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...d?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${t}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==i.brush&&null==i.onBrush||e.push("brushing"),!0===i.zoomable&&e.push("zoom/pan"),"isolate"!==i.legendInteraction&&"highlight"!==i.legendInteraction||e.push("legend filtering"),e.length>0&&c.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const e=Se[t];if(e&&S){const t=i[e];"number"==typeof t&&t>0&&24>2*t&&c.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${e}=${t} gives a ~${2*t}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}c.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:B,message:`The chart takes a single tab stop and navigates data with arrow keys${z} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),c.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...S?v||A?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),c.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:B,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${z}.`}),c.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:B,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${z}.`,fix:d?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),c.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...C?{status:"pass",message:`Provided: ${[b&&"title",A&&"description",v&&"summary"].filter(Boolean).join(", ")}.`}:h?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),c.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...A||v?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:p?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:b?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[i.description,i.summary].filter(se).join(". "),t=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),s=e.trim().split(/\s+/).filter(Boolean);if(0===s.length||0===t.length)return null;let a=0;for(const e of s)a+=ke(e);return s.length/t.length*.39+a/s.length*11.8-15.59}(e):null;c.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==t?{status:"not-applicable",message:"No description/summary text to grade."}:t>9?{status:"warn",message:`Description/summary reads at ~grade ${t.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(t))} (≤ 9).`}})}if(ge.has(t)){const e=se(i.xLabel),t=se(i.yLabel);c.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&t?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!t&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(xe.has(t)&&c.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),L.length>1){const e=L.filter(Re).length;c.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===L.length?{status:"pass",message:`All ${L.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:L.length+" annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.",fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${L.length-e} of ${L.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=i.forecast||null!=i.anomaly||null!=i.band||null!=i.regression)&&c.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=i.animate&&!1!==i.animate&&c.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:B,message:`Transitions animate with object constancy and data changes are mirrored to the live region${z}.`,fix:d?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),c.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),c.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),c.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:B,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${z}.`,fix:d?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),c.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...y?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:x?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),y||c.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...h?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),c.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:d?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${d?"":z}.`,fix:d?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),c.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...m?f?{status:"pass",message:"ChartContainer's navigable option mounts a structured navigation tree, including hierarchy/network branches and their data items."}:{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:f?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:B,message:`Keyboard navigation steps through points and switches series/groups${z}.`,fix:d?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const e=Array.isArray(i.data)?i.data:null,s=Array.isArray(i.nodes)?i.nodes:null,a={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let o;o=he.has(t)&&e&&e.length>7?{...a,status:"warn",message:e.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:s&&s.length>200?{...a,status:"warn",message:s.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:e&&e.length>5e3?{...a,status:"warn",message:e.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:e?{...a,status:"pass",message:e.length+" data points — a reasonable density for non-visual consumption."}:s?{...a,status:"pass",message:s.length+" nodes — a reasonable density for non-visual consumption."}:{...a,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},c.push(o)}{const e=Array.isArray(i.data)?i.data:null,t=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof i[e]||"string"==typeof i[e]);let s=!1;if(e&&!t)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){s=!0;break}if(s)break}s&&c.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}c.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...p?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:v?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),c.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...y?{status:"not-applicable",message:"Single value — nothing to skip."}:x?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),c.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:B,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${z}.`,fix:d?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),c.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...be.has(t)||we.has(t)?R?{status:"pass",message:t+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:t+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:B,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${z}.`}}),u&&(c.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...R?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),c.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...P?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),c.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...$?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const e=!0===i.responsiveWidth||!0===i.responsiveHeight,s=Ce.has(t)&&!0===i.zoomable;c.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...e?{status:"pass",message:`Chart reflows to its container (${[!0===i.responsiveWidth&&"responsiveWidth",!0===i.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:s?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}if(l){const e=l.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&c.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:l.name+" declares a color encoding without a redundant cue.",fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"!==l.accessibility.description||se(i.description)||c.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:l.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),l.accessibility.fallbackTable&&!1===i.accessibleTable&&c.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:l.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const E=c.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),I={criticalsPassed:E.filter(e=>"pass"===e.status).length,criticalsEvaluated:E.length,fails:c.filter(e=>"fail"===e.status).length,warnings:c.filter(e=>"warn"===e.status).length,manual:c.filter(e=>"manual"===e.status).length,passes:c.filter(e=>"pass"===e.status).length};return{component:t,ok:!E.some(e=>"fail"===e.status),summary:I,findings:c,reference:"Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari)."}}function Le(e,{onlyCritical:t=!1}={}){const s=[];for(const a of e.findings)"fail"!==a.status&&"warn"!==a.status||t&&!a.critical||s.push(a.message);return s}var Be={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},ze=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function Ee(e){const t=[],s=e.summary,a=e.ok?`${s.criticalsPassed}/${s.criticalsEvaluated} critical heuristics pass`:`${s.fails} blocking failure(s) — ${s.criticalsPassed}/${s.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${a} · ${s.warnings} warning(s) · ${s.manual} to verify manually`);for(const s of ze){const a=e.findings.filter(e=>e.principle===s&&"not-applicable"!==e.status);if(0!==a.length){t.push(""),t.push(" "+s.toUpperCase());for(const e of a)t.push(` ${Be[e.status]} ${e.id}${e.critical?" [critical]":""}: ${e.message}`),!e.fix||"fail"!==e.status&&"warn"!==e.status&&"manual"!==e.status||t.push(" → "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}export{g as VALIDATION_MAP,A as validateProps,oe as HIERARCHY_CHARTS,re as NETWORK_CHARTS,ie as BAR_AREA_CHARTS,ne as TREND_SERIES_CHARTS,ce as ORDINAL_BAR_CHARTS,le as CURVE_CHARTS,ue as PIE_CHARTS,de as PART_TO_WHOLE_ACCESSORS,pe as NORMALIZED_STACK_ACCESSORS,ge as XY_WITH_AXES_CHARTS,ye as ORDINAL_CHARTS,ve as PHYSICS_DIAGNOSTIC_CHARTS,Se as POINT_TARGET_RADIUS_PROP,x as profileNumericFields,C as formatDataAudit,R as toDataAuditNotifications,ee as auditData,$e as auditAccessibility,Le as accessibilityCaveats,Ee as formatAccessibilityAudit};
@@ -0,0 +1 @@
1
+ import{ModuleWorkerSession as e,createSharedWorkerSessionHolder as r,errorFromPayload as t,parseModuleWorkerErrorField as o}from"./c-4DTZPSUD.min.js";import{canUseForceWorker as s}from"./c-6HRB2L7H.min.js";import{commonJsWorkerModuleUrl as n}from"./c-VGW3VG3I.min.js";function i(){const e="string"==typeof import.meta.url&&import.meta.url?new URL("./forceLayoutWorker.js",import.meta.url):n("forceLayoutWorker.js");return new Worker(e,{type:"module",name:"semiotic-force-layout"})}var a=class{constructor(r=i()){this.session=new e({name:"Force layout",createWorker:()=>r,terminateOnAbort:!0,parseMessage:e=>{const r=e,{requestId:s,error:n}=o(r);return n?{requestId:s,ok:!1,error:t(n)}:{requestId:s,ok:!0,payload:{positions:r.positions??{}}}}})}get isDead(){return this.session.isDead}request(e,r){return this.session.request(e,r)}terminate(){this.session.terminate()}},u=r(()=>new a);function m(){u.resetForTest()}function c(e,r){return s()?u.get().request(e,r):Promise.reject(Error("Web Workers are unavailable"))}export{i as createForceLayoutWorker,a as ForceLayoutWorkerSession,m as _resetSharedForceLayoutSessionForTest,c as runForceLayoutWorker};
@@ -0,0 +1 @@
1
+ import{getMinMax as t}from"./c-GGISSW5E.min.js";import{resolveCSSColor as e}from"./c-YZVRZGX2.min.js";function i(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function r(t,e){const{when:i}=t,r=e.width,n=e.height,s=function(t){if("number"==typeof t.height&&t.height>0)return t.width/t.height}(e),a=function(t){if("number"==typeof t.height&&t.height>0)return t.height>t.width?"portrait":"landscape"}(e);return!("number"==typeof i.minWidth&&i.minWidth>r||"number"==typeof i.maxWidth&&r>i.maxWidth||"number"==typeof i.minHeight&&("number"!=typeof n||i.minHeight>n)||"number"==typeof i.maxHeight&&("number"!=typeof n||n>i.maxHeight)||"number"==typeof i.minAspectRatio&&("number"!=typeof s||i.minAspectRatio>s)||"number"==typeof i.maxAspectRatio&&("number"!=typeof s||s>i.maxAspectRatio)||i.orientation&&a!==i.orientation)}function n(t,e,n=t.responsiveRules){if(!Array.isArray(n)||0===n.length)return{props:t,matches:[]};const s=n.map((t,e)=>({rule:t,index:e})).filter(t=>r(t.rule,e)).sort((t,e)=>("number"==typeof t.rule.priority?t.rule.priority:t.index)-("number"==typeof e.rule.priority?e.rule.priority:e.index));return{props:s.reduce((t,e)=>function(t,e){const r={...t,...e};for(const n of["margin","frameProps","mobileSemantics","style"])i(t[n])&&i(e[n])&&(r[n]={...t[n],...e[n]});return"string"==typeof t.className&&"string"==typeof e.className&&(r.className=`${t.className} ${e.className}`),r}(t,e.rule.transform),t),matches:s}}function s(t,e=.5){const i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!i)return t;const r=Math.round(parseInt(i[1],16)*(1-e)),n=Math.round(parseInt(i[2],16)*(1-e)),s=Math.round(parseInt(i[3],16)*(1-e));return`#${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function a(t,e=.5){const i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!i)return t;const r=Math.round(parseInt(i[1],16)+(255-parseInt(i[1],16))*e),n=Math.round(parseInt(i[2],16)+(255-parseInt(i[2],16))*e),s=Math.round(parseInt(i[3],16)+(255-parseInt(i[3],16))*e);return`#${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function o(t=240){const e=360-t,i=180+e/2,r=i*Math.PI/180;return{sweepRad:t*Math.PI/180,gapDeg:e,startAngleDeg:i,startAngleRad:r,offsetRad:-Math.PI/2+r}}function h(t,e,i,r,n){const s=i-e||1;return n+(Math.max(e,Math.min(i,t))-e)/s*r}function c(e=240){const{sweepRad:i,offsetRad:r}=o(e),n=[[Math.cos(r),Math.sin(r)],[Math.cos(r+i),Math.sin(r+i)],[0,0]];for(let t=0;2*Math.PI>t;t+=Math.PI/2)((t-r)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)>i+.001||n.push([Math.cos(t),Math.sin(t)]);const s=n.map(t=>t[0]),a=n.map(t=>t[1]),[h,c]=t(s),[u,f]=t(a);return{minX:h,maxX:c,minY:u,maxY:f,width:c-h,height:f-u,cx:(h+c)/2,cy:(u+f)/2}}function u(t){return{type:"hatch",background:t.background,stroke:t.stroke,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle}}var f=null;function l(t={},e){const{background:i="transparent",stroke:r="#000",lineWidth:n=1.5,spacing:s=6,angle:a=45}=t,o={background:i,stroke:r,lineWidth:n,spacing:s,angle:a},h=Math.max(8,Math.ceil(2*s));let c;try{c=function(t){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(t,t):(f||(f=document.createElement("canvas")),f.width=t,f.height=t,f)}(h)}catch{return u(o)}const l=c.getContext("2d");if(!l)return u(o);i&&"transparent"!==i?(l.fillStyle=i,l.fillRect(0,0,h,h)):l.clearRect(0,0,h,h),l.strokeStyle=r,l.lineWidth=n,l.lineCap="square";const p=a*Math.PI/180;if(45===a||-45===a){const t=a>0?1:-1;for(let e=-h;2*h>=e;e+=s)l.beginPath(),l.moveTo(e,0),l.lineTo(e+t*h,h),l.stroke()}else{l.save(),l.translate(h/2,h/2),l.rotate(p);const t=2*h;for(let e=-t;t>=e;e+=s)l.beginPath(),l.moveTo(-t,e),l.lineTo(t,e),l.stroke();l.restore()}return(e||l).createPattern(c,"repeat")}import{jsx as p,jsxs as d}from"react/jsx-runtime";function m(t){return"object"==typeof t&&null!==t&&"hatch"===t.type}function y(t){return["hatch",t.background??"transparent",t.stroke??"#000",t.lineWidth??1.5,t.spacing??6,t.angle??45,t.lineOpacity??1].join("|")}function g(t,e){let i=2166136261;const r=y(e);for(let t=0;r.length>t;t++)i^=r.charCodeAt(t),i=Math.imul(i,16777619);return`${t}-hatch-${(i>>>0).toString(36)}`}var _=new Map;function b(t,i){const r=t.background??"transparent",n=t.stroke??"#000",s="transparent"===r||"none"===r?r:e(i,r)||r,a=e(i,n)||n||"#000",o="undefined"!=typeof window&&window.devicePixelRatio||1,h=`${y(t)}|${s}|${a}@${o}`,c=_.get(h);if(void 0!==c)return c;const u=l({background:s,stroke:a,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle},i),f=m(u)?null:u;return _.set(h,f),f}function x(t,e){const{background:i="transparent",stroke:r="#000",lineWidth:n=1.5,spacing:s=6,angle:a=45,lineOpacity:o=1}=t,h=Math.max(8,Math.ceil(2*s));return d("pattern",{id:e,width:h,height:h,patternUnits:"userSpaceOnUse",patternTransform:0!==a?`rotate(${a})`:void 0,children:[i&&"transparent"!==i&&p("rect",{width:h,height:h,fill:i}),p("line",{x1:0,y1:0,x2:0,y2:h,stroke:r,strokeWidth:n,strokeOpacity:o}),p("line",{x1:s,y1:0,x2:s,y2:h,stroke:r,strokeWidth:n,strokeOpacity:o})]},e)}function A(t,e,i="#4e79a7"){if(m(t)){const i=g(e,t);return{fill:`url(#${i})`,def:x(t,i)}}return t&&"string"==typeof t?{fill:t}:{fill:i}}function M(t,e,i,r){if(!t||"object"!=typeof t)return;const n=t;if(!Array.isArray(n.stops))return;const s=n.stops.flatMap(t=>{if(!t||"object"!=typeof t)return[];const{offset:e,color:i,opacity:n}=t;return"number"==typeof e&&Number.isFinite(e)?[{offset:Math.max(0,Math.min(1,e)),color:"string"==typeof i&&i?i:r,opacity:"number"==typeof n&&Number.isFinite(n)?Math.max(0,Math.min(1,n)):void 0}]:[]}).sort((t,e)=>t.offset-e.offset);if(!s.length)return;const a="horizontal"===n.direction?"horizontal":"vertical"===n.direction?"vertical":i,o=e+"-gradient";return{fill:`url(#${o})`,def:p("linearGradient",{id:o,x1:0,y1:0,x2:"horizontal"===a?"100%":0,y2:"vertical"===a?"100%":0,children:s.map((t,e)=>p("stop",{offset:100*t.offset+"%",stopColor:t.color,stopOpacity:t.opacity},`${t.offset}-${e}`))},o)}}var S=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,1>t)throw Error("RingBuffer capacity must be at least 1");this.buffer=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){const e=[];for(const i of t){const t=this.push(i);void 0!==t&&e.push(t)}return e}get(t){if(t>=0&&this._size>t)return this.buffer[(this.head-this._size+t+this._capacity)%this._capacity]}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:()=>this._size>t?{done:!1,value:this.get(t++)}:{done:!0,value:void 0}}}forEach(t){const e=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++)t(this.buffer[(e+i)%this._capacity],i)}toArray(){const t=Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++)t[i]=this.buffer[(e+i)%this._capacity];return t}resize(t){if(1>t)throw Error("RingBuffer capacity must be at least 1");const e=this.toArray();let i=0,r=[];e.length>t&&(i=e.length-t,r=e.slice(0,i)),this._capacity=t,this.buffer=Array(t),this.head=0,this._size=0;for(let t=i;e.length>t;t++)this.push(e[t]);return r}update(t,e){const i=[],r=(this.head-this._size+this._capacity)%this._capacity;for(let n=0;this._size>n;n++){const s=(r+n)%this._capacity,a=this.buffer[s];if(t(a)){let t;t="object"!=typeof a||null===a?a:Array.isArray(a)?[...a]:{...a},i.push(t),this.buffer[s]=e(a)}}return i}remove(t){const e=[],i=[];if(this.forEach(r=>{t(r)?i.push(r):e.push(r)}),0===i.length)return i;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const t of e)this.push(t);return i}clear(){this.buffer=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}},k=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const i of t){const t=e?e(i):i;Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}};function v(t,e=30){return Math.max((t??4)+5,12,e)}function w(t){return t instanceof Date?t:"number"==typeof t&&t>1e9?new Date(t):null}function I(t,e){const i=w(t);if(!i)return!1;const r=w(e);return!r||i.getFullYear()!==r.getFullYear()||i.getMonth()!==r.getMonth()}function E(t){const e=[],i=t.domain;null==i?e.push({severity:"error",code:"PROCESS_SANKEY_MISSING_DOMAIN",message:"ProcessSankey requires domain: [tStart, tEnd].",fix:"Pass domain={[start, end]} as numbers or Date-compatible values."}):Array.isArray(i)&&2===i.length&&Number.isFinite(Number(i[0]))&&Number.isFinite(Number(i[1]))||e.push({severity:"error",code:"PROCESS_SANKEY_BAD_DOMAIN",message:"domain must be a 2-tuple of finite times.",fix:"Use domain={[t0, t1]} with t0 <= t1."});const r=t.edges;if(Array.isArray(r)&&r.length>0){const t=r[0];null!=t.startTime&&null!=t.endTime||e.push({severity:"warning",code:"PROCESS_SANKEY_EDGE_TIMES",message:"Edges should carry startTime and endTime for temporal layout.",fix:"Add startTime/endTime fields or set startTimeAccessor/endTimeAccessor."})}const n=t.nodes,s=Array.isArray(n)?n.length:0;return!0!==t.showLabels||24>s||e.push({severity:"warning",code:"PROCESS_SANKEY_LABEL_DENSITY",message:`showLabels={true} with ${s} nodes may overcrowd the plot.`,fix:'Use showLabels="auto" with optional labelPriorityAccessor / maxLabels.'}),80>(Array.isArray(r)?r.length:0)||null!=t.layoutExecution||"off"===t.packing||e.push({severity:"warning",code:"PROCESS_SANKEY_WORKER_HINT",message:"Dense ProcessSankey layouts benefit from worker packing/order.",fix:'layoutExecution defaults to "auto"; set layoutExecution="worker" or raise layoutWorkerThreshold deliberately.'}),e}function z(t){const e=t.provenance,i=t.id??t.stableId??e?.stableId;return null==i||""===i?void 0:i+""}export{r as responsiveRuleMatches,n as resolveResponsiveRules,s as darkenColor,a as lightenColor,o as sweepToAngles,h as valueToAngle,c as computeArcBoundingBox,E as diagnoseProcessSankeyProps,l as createHatchPattern,m as isHatchFill,y as hatchFillKey,g as hatchFillId,b as resolveHatchCanvasPattern,x as hatchPatternDef,A as resolveSvgFill,M as resolveAnnotationGradient,S as RingBuffer,k as IncrementalExtent,z as annotationStableId,v as getHitRadius,I as isTimeLandmark};