@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.11

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 (233) hide show
  1. package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → 1-LEUre9ZLG0OYYB.mjs} +24 -23
  2. package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
  3. package/browser/esm/{BwRduT8FTrk5n72r.mjs → B26QVfjer2oY2ewK.mjs} +1 -1
  4. package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
  5. package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → BQYS2Yf-EAV_tBLr.mjs} +1 -1
  6. package/browser/esm/BegvsXeRs7e-9t8k.mjs +8 -0
  7. package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
  8. package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → Bos4Rkp8UTF7QXUB.mjs} +1 -1
  9. package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → C1pc9F4Rt2C5FKUo.mjs} +1 -1
  10. package/browser/esm/{C6urN77szrYwODXF.mjs → CPnnESfZz2jjJd82.mjs} +1 -1
  11. package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
  12. package/browser/esm/{BuvXl14hs-1CvjeA.mjs → ClAtIfYbsUPA073B.mjs} +1 -1
  13. package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
  14. package/browser/esm/{DyU9UInRnfkPYYlR.mjs → D2u6THGErqw64KQI.mjs} +1 -1
  15. package/browser/esm/{cYjYjqEsyd63x8t4.mjs → DMdsMPT0fWBbTkNn.mjs} +1 -1
  16. package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DS66lAIM-9M-YoZQ.mjs} +5 -8
  17. package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
  18. package/browser/esm/{DjiBz4H74I6nPUY6.mjs → Dnh1kpz3v1JKtRD_.mjs} +2 -2
  19. package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → cQ6xdPFkEcuDlNTN.mjs} +1 -1
  20. package/browser/esm/chart.mjs +32 -52
  21. package/browser/esm/control.mjs +2 -2
  22. package/browser/esm/group.mjs +3 -3
  23. package/browser/esm/index.mjs +6590 -4824
  24. package/browser/esm/note.mjs +73 -47
  25. package/browser/esm/picture.mjs +2 -2
  26. package/browser/esm/shape.mjs +2 -2
  27. package/browser/esm/slicer.mjs +5 -5
  28. package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
  29. package/licenses/dependencies.txt +313 -1
  30. package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
  31. package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → BMVK5plvmBOAIlxP.mjs} +1 -1
  32. package/node/esm/{Dxbm6ryIDCEi26RO.mjs → BaRfst1euuhquupX.mjs} +1 -1
  33. package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → Be9c1GwQkPo8Piuh.mjs} +1 -1
  34. package/node/esm/{DhSq680c5tgMFFbj.mjs → BiaDWnN3tT7neoRL.mjs} +1 -1
  35. package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
  36. package/node/esm/{CM5BT7h-hMtST2bE.mjs → C_SNx7TlFEcwbYjx.mjs} +1 -1
  37. package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
  38. package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
  39. package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → D_pCpfdQowV_4Aje.mjs} +23 -22
  40. package/node/esm/{DYosMUJKp-3MSO4q.mjs → DgGEHydEjD7nfsDB.mjs} +1 -1
  41. package/node/esm/{CFFlJxNwgyInjEnh.mjs → Dj5FM7_-YWhCtCCt.mjs} +1 -1
  42. package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → DxQZmb-j4NLUO9Af.mjs} +1 -1
  43. package/node/esm/{BfRn5S5V4X8xIAEa.mjs → JiQGhLkoL8CJpVvA.mjs} +1 -1
  44. package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
  45. package/node/esm/chart.mjs +32 -52
  46. package/node/esm/control.mjs +2 -2
  47. package/node/esm/{C_ANM4feA1xV-pri.mjs → gpD-9LDW92phhoma.mjs} +1 -1
  48. package/node/esm/group.mjs +3 -3
  49. package/node/esm/index.mjs +9005 -7225
  50. package/node/esm/note.mjs +86 -60
  51. package/node/esm/picture.mjs +2 -2
  52. package/node/esm/shape.mjs +292 -340
  53. package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
  54. package/node/esm/slicer.mjs +15 -15
  55. package/node/esm/{D3YXHeOyFp00Xk3m.mjs → umljAT66yb3_rURh.mjs} +53 -56
  56. package/package.json +8 -6
  57. package/resources/contents.json +6 -0
  58. package/resources/locales/contents.json +14 -0
  59. package/resources/locales/de/chart.cmd.json +82 -0
  60. package/resources/locales/de/sheet.cmd.json +11 -0
  61. package/resources/locales/de/table.cmd.json +1 -1
  62. package/resources/locales/de/ui.msg.json +12 -0
  63. package/resources/locales/de/workbook.cmd.json +5 -0
  64. package/resources/locales/en/chart.cmd.json +82 -0
  65. package/resources/locales/en/sheet.cmd.json +11 -0
  66. package/resources/locales/en/table.cmd.json +1 -1
  67. package/resources/locales/en/ui.msg.json +12 -0
  68. package/resources/locales/en/workbook.cmd.json +5 -0
  69. package/types/src/autoFill/FillMenu.d.ts +2 -2
  70. package/types/src/autoFill/FillSeries.d.ts +2 -2
  71. package/types/src/border/StaticBorderRenderer.d.ts +18 -1
  72. package/types/src/border/useBorders.d.ts +74 -1
  73. package/types/src/cell/FormulaCellRenderer.d.ts +5 -2
  74. package/types/src/cell/useFormulaViewAnchor.d.ts +2 -2
  75. package/types/src/chart/ChartCommands.d.ts +15 -0
  76. package/types/src/chart/ChartEditor.d.ts +10 -2
  77. package/types/src/chart/ChartElement.d.ts +111 -0
  78. package/types/src/chart/ChartKind.d.ts +7 -0
  79. package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
  80. package/types/src/chart/index.d.ts +2 -0
  81. package/types/src/chart/paint/_fills.d.ts +24 -0
  82. package/types/src/chart/paint/_graphics.d.ts +46 -0
  83. package/types/src/chart/paint/echarts.d.ts +30 -0
  84. package/types/src/chart/paint/index.d.ts +12 -0
  85. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -0
  86. package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
  87. package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
  88. package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
  89. package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
  90. package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
  91. package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
  92. package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
  93. package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
  94. package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
  95. package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
  96. package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
  97. package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
  98. package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
  99. package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
  100. package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
  101. package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
  102. package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
  103. package/types/src/chart/paint/toEChartsOption.d.ts +31 -0
  104. package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
  105. package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
  106. package/types/src/comment/CommentCardRequest.d.ts +9 -9
  107. package/types/src/comment/useSheetComments.d.ts +2 -2
  108. package/types/src/context/WorksheetContext.d.ts +18 -0
  109. package/types/src/context/index.d.ts +1 -1
  110. package/types/src/editor/EditorCommands.d.ts +3 -3
  111. package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
  112. package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
  113. package/types/src/editor/SheetEditable.d.ts +6 -6
  114. package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
  115. package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
  116. package/types/src/editor/formulaAnchor.d.ts +12 -0
  117. package/types/src/editor/index.d.ts +1 -0
  118. package/types/src/editor/pickedReference.d.ts +3 -3
  119. package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
  120. package/types/src/editor/useFormulaHints.d.ts +2 -2
  121. package/types/src/editor/validationAlert.d.ts +3 -3
  122. package/types/src/frame/CommandContext.d.ts +7 -7
  123. package/types/src/index.d.ts +2 -0
  124. package/types/src/layer/BorderLayer.d.ts +2 -2
  125. package/types/src/layer/CellErrorLayer.d.ts +2 -2
  126. package/types/src/layer/CellFillLayer.d.ts +2 -2
  127. package/types/src/layer/CellInsertLayer.d.ts +71 -0
  128. package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
  129. package/types/src/layer/CommentCardLayer.d.ts +2 -2
  130. package/types/src/layer/CommentsLayer.d.ts +2 -2
  131. package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
  132. package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
  133. package/types/src/layer/ContextMenuLayer.d.ts +2 -2
  134. package/types/src/layer/GridFreezeLayer.d.ts +2 -2
  135. package/types/src/layer/HyperlinkLayer.d.ts +3 -3
  136. package/types/src/layer/MovableKindScope.d.ts +2 -2
  137. package/types/src/layer/ProtectionLayer.d.ts +3 -3
  138. package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
  139. package/types/src/layer/ResizeIndicator.d.ts +2 -2
  140. package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
  141. package/types/src/layer/SheetCellLayer.d.ts +4 -4
  142. package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
  143. package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
  144. package/types/src/layer/SheetLayers.d.ts +115 -0
  145. package/types/src/layer/SheetMovableLayer.d.ts +2 -2
  146. package/types/src/layer/SheetOutlineLayer.d.ts +2 -2
  147. package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
  148. package/types/src/layer/SpillLayer.d.ts +2 -2
  149. package/types/src/layer/TableLayer.d.ts +2 -2
  150. package/types/src/layer/TableToolbar.d.ts +3 -3
  151. package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
  152. package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
  153. package/types/src/layer/ValidationPromptLayer.d.ts +5 -4
  154. package/types/src/layer/_tableColor.d.ts +2 -2
  155. package/types/src/layer/index.d.ts +2 -0
  156. package/types/src/layer/useFreezeDrag.d.ts +2 -2
  157. package/types/src/layer/useNormalBorderLines.d.ts +15 -0
  158. package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
  159. package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
  160. package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
  161. package/types/src/layer/useTableHeaderCells.d.ts +2 -2
  162. package/types/src/layer/useValidationPicker.d.ts +2 -2
  163. package/types/src/layer/useVisibleTables.d.ts +2 -2
  164. package/types/src/layer/validationMark.d.ts +3 -3
  165. package/types/src/listener/index.d.ts +5 -0
  166. package/types/src/listener/useCell.d.ts +29 -0
  167. package/types/src/listener/useCellRange.d.ts +23 -0
  168. package/types/src/listener/useCellValue.d.ts +26 -0
  169. package/types/src/listener/useModelListener.d.ts +4 -4
  170. package/types/src/listener/useRangeSnapshot.d.ts +35 -0
  171. package/types/src/listener/useTable.d.ts +26 -0
  172. package/types/src/movable/DefaultMovable.d.ts +8 -0
  173. package/types/src/movable/MovableCommands.d.ts +2 -2
  174. package/types/src/movable/MovableRenderers.d.ts +3 -3
  175. package/types/src/movable/index.d.ts +1 -0
  176. package/types/src/picker/cellPickerOpen.d.ts +3 -3
  177. package/types/src/picker/useCellPicker.d.ts +2 -2
  178. package/types/src/richText/RichTextEditor.d.ts +2 -2
  179. package/types/src/selection/SelectionCommands.d.ts +2 -2
  180. package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
  181. package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
  182. package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +46 -13
  183. package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
  184. package/types/src/sheet/SheetCommandProvider.d.ts +2 -2
  185. package/types/src/sheet/SheetCommands.d.ts +2 -2
  186. package/types/src/sheet/SheetKindIcon.d.ts +14 -0
  187. package/types/src/sheet/SheetOutlineElement.d.ts +4 -4
  188. package/types/src/sheet/SheetPanels.d.ts +11 -0
  189. package/types/src/sheet/SheetScrollbar.d.ts +3 -3
  190. package/types/src/sheet/TopLeftCorner.d.ts +2 -2
  191. package/types/src/sheet/WorksheetElement.d.ts +12 -0
  192. package/types/src/sheet/_freezeAt.d.ts +2 -2
  193. package/types/src/sheet/circularReferences.d.ts +3 -3
  194. package/types/src/sheet/index.d.ts +5 -2
  195. package/types/src/sheet/useCycleHighlight.d.ts +2 -2
  196. package/types/src/tabStrip/SheetTab.d.ts +1 -1
  197. package/types/src/table/TableCommands.d.ts +2 -2
  198. package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
  199. package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
  200. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  201. package/types/src/theme/useSystemColors.d.ts +2 -2
  202. package/types/src/workbook/DefaultRenderers.d.ts +3 -2
  203. package/types/src/workbook/IWorkbookElement.d.ts +27 -5
  204. package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
  205. package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
  206. package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
  207. package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
  208. package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
  209. package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
  210. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
  211. package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
  212. package/types/src/chart/templates/area-template.json.d.ts +0 -9
  213. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
  214. package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
  215. package/types/src/chart/templates/bar-template.json.d.ts +0 -9
  216. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
  217. package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
  218. package/types/src/chart/templates/column-template.json.d.ts +0 -9
  219. package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
  220. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
  221. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
  222. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
  223. package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
  224. package/types/src/chart/templates/line-template.json.d.ts +0 -9
  225. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
  226. package/types/src/chart/templates/pie-template.json.d.ts +0 -9
  227. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
  228. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
  229. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
  230. package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
  231. package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
  232. package/types/src/context/SheetContext.d.ts +0 -18
  233. package/types/src/sheet/SheetElement.d.ts +0 -15
@@ -0,0 +1,1664 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./6zApGj9DozhFy-bx.mjs";
8
+ import { IFill as t, IStroke as i } from "@sheetxl/sdk";
9
+ import * as s from "echarts/core";
10
+ import { BarChart as r, LineChart as n, PieChart as l } from "echarts/charts";
11
+ import { GraphicComponent as o, GridComponent as a, LegendComponent as p, TitleComponent as h, TooltipComponent as c } from "echarts/components";
12
+ import { SVGRenderer as d } from "echarts/renderers";
13
+ var y = {
14
+ pct5: "0040000000040000",
15
+ pct10: "0004004000040040",
16
+ pct20: "0044001100440011",
17
+ pct25: "1144114411441144",
18
+ pct30: "8855225588552255",
19
+ pct40: "8A55AA55A855AA55",
20
+ pct50: "AA55AA55AA55AA55",
21
+ pct60: "AA77AADDAA77AADD",
22
+ pct70: "EEBBEEBBEEBBEEBB",
23
+ pct75: "FFBBFFEEFFBBFFEE",
24
+ pct80: "FF7FFFF7FF7FFFF7",
25
+ pct90: "BFFFFFFFFBFFFFFF",
26
+ dkHorz: "00FFFF0000FFFF00",
27
+ dkVert: "6666666666666666",
28
+ dkDnDiag: "CC663399CC663399",
29
+ dkUpDiag: "CC993366CC993366",
30
+ smCheck: "CCCC3333CCCC3333",
31
+ trellis: "CCFF33FFCCFF33FF",
32
+ ltHorz: "00FF000000FF0000",
33
+ ltVert: "4444444444444444",
34
+ ltDnDiag: "8844221188442211",
35
+ ltUpDiag: "4488112244881122",
36
+ smGrid: "44FF444444FF4444",
37
+ dotDmnd: "0040001100040011",
38
+ wdDnDiag: "C1E070381C0E0783",
39
+ wdUpDiag: "E0C183070E1C3870",
40
+ dashUpDiag: "1122440000000088",
41
+ dashDnDiag: "2211880000000044",
42
+ narVert: "AAAAAAAAAAAAAAAA",
43
+ narHorz: "00FF00FF00FF00FF",
44
+ dashVert: "0440404040040404",
45
+ dashHorz: "0078000000870000",
46
+ lgConfetti: "D8C606606C8D8118",
47
+ lgGrid: "0404040404FF0404",
48
+ horzBrick: "04FF404040FF0404",
49
+ lgCheck: "8778787878878787",
50
+ smConfetti: "1080080120044002",
51
+ zigZag: "C00C1221C00C1221",
52
+ solidDmnd: "F7E3C1800080C1E3",
53
+ diagBrick: "40C021120C081020",
54
+ openDmnd: "8041221408142241",
55
+ plaid: "AA8787878755AA55",
56
+ sphere: "7CBBC4C7C7BB4C7C",
57
+ weave: "2A44A0118A44A211",
58
+ dotGrid: "0004000400550004",
59
+ divot: "8000040804008040",
60
+ shingle: "8160100808182442",
61
+ wave: "0600C0290600C029"
62
+ }, f = (e) => {
63
+ const t = e ? y[e] : void 0;
64
+ if (!t) return null;
65
+ const i = [];
66
+ for (let e = 0; e < 8; e++) {
67
+ const s = parseInt(t.slice(2 * e, 2 * e + 2), 16);
68
+ i.push(Array.from({ length: 8 }, (e, t) => !!(s & 128 >> t)));
69
+ }
70
+ return i;
71
+ }, u = (e, t, i) => {
72
+ let s = "";
73
+ e.forEach((e, t) => e.forEach((e, i) => {
74
+ e && (s += `M${i} ${t}h1v1h-1z`);
75
+ }));
76
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" shape-rendering="crispEdges"><rect width="8" height="8" fill="${i}"/><path d="${s}" fill="${t}"/></svg>`)}`;
77
+ }, g = (e) => Math.max(0, Math.min(1, e ?? 0)), x = (e) => {
78
+ const i = ((e) => {
79
+ const t = e.stops ?? [], i = Math.max(1, t.length - 1);
80
+ return t.map((e, t) => ({
81
+ offset: g("object" == typeof e && "number" == typeof e.offset ? e.offset : t / i),
82
+ color: "string" == typeof e ? e : String(e.color)
83
+ })).sort((e, t) => e.offset - t.offset);
84
+ })(e);
85
+ if ((e.gradientType ?? t.GradientType.Linear) === t.GradientType.Linear) {
86
+ const t = ((e.angle ?? 90) - 90) % 360 * Math.PI / 180, s = Math.cos(t), r = Math.sin(t), n = (Math.abs(s) + Math.abs(r)) / 2, l = (e) => Math.round(1e9 * e) / 1e9;
87
+ return {
88
+ type: "linear",
89
+ x: l(.5 - s * n),
90
+ y: l(.5 - r * n),
91
+ x2: l(.5 + s * n),
92
+ y2: l(.5 + r * n),
93
+ colorStops: i,
94
+ global: !1
95
+ };
96
+ }
97
+ const s = e.focus, r = (g(s?.left) + g(s?.right ?? s?.left)) / 2, n = (g(s?.top) + g(s?.bottom ?? s?.top)) / 2;
98
+ return {
99
+ type: "radial",
100
+ x: r,
101
+ y: n,
102
+ r: Math.hypot(Math.max(r, 1 - r), Math.max(n, 1 - n)),
103
+ colorStops: i,
104
+ global: !1
105
+ };
106
+ }, m = (e, i = "transparent") => {
107
+ if (!e) return i;
108
+ switch (e.type) {
109
+ case t.Type.Solid: return e.color ?? i;
110
+ case t.Type.Gradient: return (e.stops?.length ?? 0) > 0 ? x(e) : i;
111
+ case t.Type.Pattern: {
112
+ const t = String(e.foreground ?? "#000000"), i = String(e.background ?? "#FFFFFF");
113
+ return {
114
+ image: u(f(e.patternType) ?? f("pct50"), t, i),
115
+ repeat: "repeat",
116
+ imageWidth: 8,
117
+ imageHeight: 8
118
+ };
119
+ }
120
+ default: return i;
121
+ }
122
+ }, b = (e) => e?.width ?? 0, k = (e) => i.toDashLengths(e.dash)?.map((t) => t * b(e)), w = (e) => e.font?.family ?? "Calibri", A = (e) => (e.weight ?? 400) >= 600, v = (e) => "italic" === e.style, F = (e) => e.size ?? 0, z = (e) => "string" == typeof e.color ? e.color : m(e.color, "#000000"), C = (e) => ({
123
+ fontFamily: w(e),
124
+ fontSize: F(e),
125
+ color: z(e),
126
+ fontWeight: A(e) ? "bold" : "normal",
127
+ fontStyle: v(e) ? "italic" : "normal"
128
+ }), M = (e, t = F(e)) => {
129
+ return `${v(e) ? "italic " : ""}${A(e) ? "bold " : ""}${t}px ${i = w(e), i.includes(" ") ? `'${i}'` : i}`;
130
+ var i;
131
+ }, S = (e) => e ? {
132
+ stroke: m(e.fill, "none"),
133
+ lineWidth: b(e),
134
+ lineCap: e.lineCap ?? "butt",
135
+ lineDash: k(e)
136
+ } : {
137
+ stroke: "none",
138
+ lineWidth: 0
139
+ }, L = (e) => e ? {
140
+ color: m(e.fill),
141
+ width: b(e),
142
+ cap: e.lineCap ?? "butt",
143
+ join: "round",
144
+ type: k(e) ?? "solid"
145
+ } : { width: 0 }, B = {
146
+ x: [[
147
+ 0,
148
+ 0,
149
+ 1,
150
+ 1
151
+ ], [
152
+ 1,
153
+ 0,
154
+ 0,
155
+ 1
156
+ ]],
157
+ star: [
158
+ [
159
+ 0,
160
+ 0,
161
+ 1,
162
+ 1
163
+ ],
164
+ [
165
+ 1,
166
+ 0,
167
+ 0,
168
+ 1
169
+ ],
170
+ [
171
+ .5,
172
+ 0,
173
+ .5,
174
+ 1
175
+ ]
176
+ ],
177
+ plus: [[
178
+ .5,
179
+ 0,
180
+ .5,
181
+ 1
182
+ ], [
183
+ 0,
184
+ .5,
185
+ 1,
186
+ .5
187
+ ]]
188
+ }, I = (e) => {
189
+ const t = e.size, i = b(e.stroke), s = B[e.symbol];
190
+ if (s) return {
191
+ symbol: "path://" + s.map(([e, t, i, s]) => `M${e} ${t}L${i} ${s}`).join(""),
192
+ symbolSize: t
193
+ };
194
+ switch (e.symbol) {
195
+ case "circle": return {
196
+ symbol: "circle",
197
+ symbolSize: t - i
198
+ };
199
+ case "square": return {
200
+ symbol: "rect",
201
+ symbolSize: t - i
202
+ };
203
+ case "dash": return {
204
+ symbol: "rect",
205
+ symbolSize: [t - i, t / 5 - i]
206
+ };
207
+ case "dot": return {
208
+ symbol: "rect",
209
+ symbolSize: [t / 2, t / 5 - i],
210
+ symbolOffset: [t / 4, 0]
211
+ };
212
+ case "triangle": return {
213
+ symbol: "triangle",
214
+ symbolSize: t
215
+ };
216
+ default: return {
217
+ symbol: "diamond",
218
+ symbolSize: t
219
+ };
220
+ }
221
+ }, E = (e) => e && B[e.symbol] && e.fill ? e.fill : null, $ = (e, t, i, s) => {
222
+ const r = e.size, n = r / 2, l = {
223
+ fill: m(e.fill),
224
+ ...S(e.stroke)
225
+ }, o = B[e.symbol];
226
+ if (o) {
227
+ const l = E(e);
228
+ return [...l ? [{
229
+ type: "rect",
230
+ silent: !0,
231
+ z: s,
232
+ shape: {
233
+ x: t - n,
234
+ y: i - n,
235
+ width: r,
236
+ height: r
237
+ },
238
+ style: { fill: m(l) }
239
+ }] : [], ...o.map(([l, o, a, p]) => ({
240
+ type: "line",
241
+ silent: !0,
242
+ z: s,
243
+ shape: {
244
+ x1: t - n + l * r,
245
+ y1: i - n + o * r,
246
+ x2: t - n + a * r,
247
+ y2: i - n + p * r
248
+ },
249
+ style: S(e.stroke)
250
+ }))];
251
+ }
252
+ const a = b(e.stroke), p = r - a, h = r / 5 - a;
253
+ switch (e.symbol) {
254
+ case "circle": return [{
255
+ type: "circle",
256
+ silent: !0,
257
+ z: s,
258
+ shape: {
259
+ cx: t,
260
+ cy: i,
261
+ r: p / 2
262
+ },
263
+ style: l
264
+ }];
265
+ case "square": return [{
266
+ type: "rect",
267
+ silent: !0,
268
+ z: s,
269
+ shape: {
270
+ x: t - p / 2,
271
+ y: i - p / 2,
272
+ width: p,
273
+ height: p
274
+ },
275
+ style: l
276
+ }];
277
+ case "dash": return [{
278
+ type: "rect",
279
+ silent: !0,
280
+ z: s,
281
+ shape: {
282
+ x: t - p / 2,
283
+ y: i - h / 2,
284
+ width: p,
285
+ height: h
286
+ },
287
+ style: l
288
+ }];
289
+ case "dot": return [{
290
+ type: "rect",
291
+ silent: !0,
292
+ z: s,
293
+ shape: {
294
+ x: t,
295
+ y: i - h / 2,
296
+ width: n,
297
+ height: h
298
+ },
299
+ style: l
300
+ }];
301
+ case "triangle": return [{
302
+ type: "polygon",
303
+ silent: !0,
304
+ z: s,
305
+ shape: { points: [
306
+ [t, i - n],
307
+ [t + n, i + n],
308
+ [t - n, i + n]
309
+ ] },
310
+ style: l
311
+ }];
312
+ default: return [{
313
+ type: "polygon",
314
+ silent: !0,
315
+ z: s,
316
+ shape: { points: [
317
+ [t, i - n],
318
+ [t + n, i],
319
+ [t, i + n],
320
+ [t - n, i]
321
+ ] },
322
+ style: l
323
+ }];
324
+ }
325
+ }, D = (e, t, i, s) => {
326
+ const { rect: r, font: n } = e, l = [];
327
+ return (t || i) && l.push({
328
+ type: "rect",
329
+ silent: !0,
330
+ z: 59,
331
+ shape: {
332
+ x: r.x,
333
+ y: r.y,
334
+ width: r.width,
335
+ height: r.height
336
+ },
337
+ style: {
338
+ fill: m(t),
339
+ ...S(i)
340
+ }
341
+ }), l.push({
342
+ type: "text",
343
+ silent: !0,
344
+ z: 60,
345
+ x: r.x + r.width / 2,
346
+ y: r.y + r.height / 2,
347
+ rotation: (e.rotation ?? 0) * Math.PI / 180,
348
+ style: {
349
+ x: 0,
350
+ y: 0,
351
+ text: e.text,
352
+ fill: z(n),
353
+ font: M(n),
354
+ align: "center",
355
+ verticalAlign: "middle",
356
+ ...s ? { lineHeight: s } : {}
357
+ }
358
+ }), l;
359
+ }, W = (e) => (e?.segments ?? []).map((t) => ({
360
+ type: "line",
361
+ silent: !0,
362
+ z: 3,
363
+ shape: {
364
+ x1: t.from.x,
365
+ y1: t.from.y,
366
+ x2: t.to.x,
367
+ y2: t.to.y
368
+ },
369
+ style: {
370
+ fill: "none",
371
+ ...S(e.stroke)
372
+ }
373
+ })), H = (e) => (e?.bars ?? []).map((t) => {
374
+ const i = t.up ? e.up : e.down;
375
+ return {
376
+ type: "rect",
377
+ silent: !0,
378
+ z: 3,
379
+ shape: {
380
+ x: t.rect.x,
381
+ y: t.rect.y,
382
+ width: t.rect.width,
383
+ height: t.rect.height
384
+ },
385
+ style: {
386
+ fill: m(i.fill, "none"),
387
+ ...S(i.stroke)
388
+ }
389
+ };
390
+ }), j = {
391
+ types: ["bar"],
392
+ horizontal: (e) => "bar" === e.type && "bar" === e.barDir,
393
+ series: (e, t) => "bar" === e.type ? ((e, t) => {
394
+ const i = t.cartesian(e), s = "clustered" === e.grouping ? void 0 : `bar:${e.axisIds.join(":")}`, r = e.series.map((r, n) => ({
395
+ ...i.base(r),
396
+ type: "bar",
397
+ data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
398
+ value: e,
399
+ source: r.values[t]
400
+ })),
401
+ ...s ? {
402
+ stack: s,
403
+ stackStrategy: "samesign"
404
+ } : {},
405
+ clip: !0,
406
+ barWidth: e.barWidth,
407
+ barMinWidth: 1e-6,
408
+ barGap: -e.overlap + "%",
409
+ z: 2 + n / e.series.length,
410
+ itemStyle: {
411
+ color: t.paint(r.fill),
412
+ borderColor: t.paint(r.stroke?.fill),
413
+ borderWidth: t.width(r.stroke)
414
+ }
415
+ }));
416
+ return "bar" === e.barDir == !!t.axisOf(e.axisIds[0])?.reversed || s ? r : r.reverse();
417
+ })(e, t) : [],
418
+ graphic: (e, t) => "bar" === e.type ? t.lines(e.seriesLines) : []
419
+ }, G = {
420
+ types: ["waterfall"],
421
+ graphic: (e, t) => "waterfall" === e.type ? ((e, t) => {
422
+ const i = [];
423
+ for (const s of e.series) for (const e of s.bars ?? []) e && i.push({
424
+ type: "rect",
425
+ silent: !0,
426
+ z: 2,
427
+ shape: {
428
+ x: e.rect.x,
429
+ y: e.rect.y,
430
+ width: e.rect.width,
431
+ height: e.rect.height
432
+ },
433
+ style: {
434
+ fill: t.paint(e.fill, "none"),
435
+ ...t.stroke(e.stroke)
436
+ }
437
+ });
438
+ return i.push(...t.lines(e.connectorLines)), i;
439
+ })(e, t) : []
440
+ }, P = {
441
+ types: ["sunburst"],
442
+ grid: !1,
443
+ graphic: (e, t) => "sunburst" === e.type ? ((e, t) => {
444
+ const i = [], s = [], { x: r, y: n } = e.center;
445
+ for (const l of e.series) for (const e of l.segments ?? []) e.endAngle > e.startAngle && (i.push({
446
+ type: "sector",
447
+ silent: !0,
448
+ z: 2,
449
+ shape: {
450
+ cx: r,
451
+ cy: n,
452
+ r0: e.innerRadius,
453
+ r: e.outerRadius,
454
+ startAngle: (e.startAngle - 90) * Math.PI / 180,
455
+ endAngle: (e.endAngle - 90) * Math.PI / 180,
456
+ clockwise: !0
457
+ },
458
+ style: {
459
+ fill: t.paint(e.fill, "none"),
460
+ ...t.stroke(e.stroke)
461
+ }
462
+ }), e.label && s.push(...t.text(e.label, null, null)));
463
+ return [...i, ...s];
464
+ })(e, t) : []
465
+ }, T = {
466
+ types: ["histogram"],
467
+ graphic: (e, t) => "histogram" === e.type ? ((e, t) => {
468
+ const i = [];
469
+ for (const s of e.series) {
470
+ for (const e of s.bars) e && i.push({
471
+ type: "rect",
472
+ silent: !0,
473
+ z: 2,
474
+ shape: {
475
+ x: e.x,
476
+ y: e.y,
477
+ width: e.width,
478
+ height: e.height
479
+ },
480
+ style: {
481
+ fill: t.paint(s.fill, "none"),
482
+ ...t.stroke(s.stroke)
483
+ }
484
+ });
485
+ if (s.line) {
486
+ const e = s.line.points.filter((e) => !!e);
487
+ e.length > 1 && i.push({
488
+ type: "polyline",
489
+ silent: !0,
490
+ z: 3,
491
+ shape: { points: e.map((e) => [e.x, e.y]) },
492
+ style: {
493
+ fill: "none",
494
+ ...t.stroke(s.stroke)
495
+ }
496
+ });
497
+ }
498
+ }
499
+ return i;
500
+ })(e, t) : []
501
+ }, V = {
502
+ types: ["boxWhisker"],
503
+ graphic: (e, t) => "boxWhisker" === e.type ? ((e, t) => {
504
+ const i = [], s = (e, i, s) => ({
505
+ type: "line",
506
+ silent: !0,
507
+ z: s,
508
+ shape: {
509
+ x1: e.from.x,
510
+ y1: e.from.y,
511
+ x2: e.to.x,
512
+ y2: e.to.y
513
+ },
514
+ style: {
515
+ fill: "none",
516
+ ...t.stroke(i)
517
+ }
518
+ });
519
+ for (const r of e.series) {
520
+ for (const e of r.boxes) {
521
+ if (!e) continue;
522
+ const r = t.stroke(e.stroke);
523
+ i.push({
524
+ type: "rect",
525
+ silent: !0,
526
+ z: 2,
527
+ shape: {
528
+ x: e.rect.x,
529
+ y: e.rect.y,
530
+ width: e.rect.width,
531
+ height: e.rect.height
532
+ },
533
+ style: {
534
+ fill: t.paint(e.fill, "none"),
535
+ ...r
536
+ }
537
+ }), i.push(s(e.median, e.stroke, 3));
538
+ for (const t of [e.whiskerHigh, e.whiskerLow]) t && i.push(s(t.line, e.stroke, 3), s(t.cap, e.stroke, 3));
539
+ if (e.mean) {
540
+ const { center: t, size: r } = e.mean, n = r / 2;
541
+ i.push(s({
542
+ from: {
543
+ x: t.x - n,
544
+ y: t.y - n
545
+ },
546
+ to: {
547
+ x: t.x + n,
548
+ y: t.y + n
549
+ }
550
+ }, e.stroke, 4), s({
551
+ from: {
552
+ x: t.x - n,
553
+ y: t.y + n
554
+ },
555
+ to: {
556
+ x: t.x + n,
557
+ y: t.y - n
558
+ }
559
+ }, e.stroke, 4));
560
+ }
561
+ for (const s of e.outliers) i.push({
562
+ type: "circle",
563
+ silent: !0,
564
+ z: 4,
565
+ shape: {
566
+ cx: s.center.x,
567
+ cy: s.center.y,
568
+ r: s.size / 2
569
+ },
570
+ style: {
571
+ fill: t.paint(e.fill, "none"),
572
+ ...r
573
+ }
574
+ });
575
+ for (const t of e.innerPoints) i.push({
576
+ type: "circle",
577
+ silent: !0,
578
+ z: 4,
579
+ shape: {
580
+ cx: t.center.x,
581
+ cy: t.center.y,
582
+ r: t.size / 2
583
+ },
584
+ style: {
585
+ fill: "#FFFFFF",
586
+ ...r
587
+ }
588
+ });
589
+ }
590
+ i.push(...t.lines(r.meanLine));
591
+ }
592
+ return i;
593
+ })(e, t) : []
594
+ }, O = {
595
+ types: ["treemap"],
596
+ grid: !1,
597
+ graphic: (e, t) => "treemap" === e.type ? ((e, t) => {
598
+ const i = [], s = [];
599
+ for (const r of e.series) {
600
+ for (const e of r.tiles) e.rect.width > 0 && e.rect.height > 0 && (i.push({
601
+ type: "rect",
602
+ silent: !0,
603
+ z: 2,
604
+ shape: {
605
+ x: e.rect.x,
606
+ y: e.rect.y,
607
+ width: e.rect.width,
608
+ height: e.rect.height
609
+ },
610
+ style: {
611
+ fill: t.paint(e.fill, "none"),
612
+ ...t.stroke(e.stroke)
613
+ }
614
+ }), e.label && s.push(...t.text(e.label, null, null)));
615
+ for (const e of r.parents) {
616
+ if (e.banner) {
617
+ const { rect: s } = e.banner;
618
+ i.push({
619
+ type: "rect",
620
+ silent: !0,
621
+ z: 3,
622
+ shape: {
623
+ x: s.x,
624
+ y: s.y,
625
+ width: s.width,
626
+ height: s.height
627
+ },
628
+ style: {
629
+ fill: t.paint(e.banner.fill, "none"),
630
+ ...t.stroke(e.banner.stroke)
631
+ }
632
+ });
633
+ }
634
+ s.push(...t.text(e.label, null, null));
635
+ }
636
+ }
637
+ return [...i, ...s];
638
+ })(e, t) : []
639
+ }, R = {
640
+ types: ["funnel"],
641
+ grid: !1,
642
+ graphic: (e, t) => "funnel" === e.type ? ((e, t) => {
643
+ const i = [];
644
+ e.axisLine && i.push({
645
+ type: "line",
646
+ silent: !0,
647
+ z: 1,
648
+ shape: {
649
+ x1: e.axisLine.from.x,
650
+ y1: e.axisLine.from.y,
651
+ x2: e.axisLine.to.x,
652
+ y2: e.axisLine.to.y
653
+ },
654
+ style: {
655
+ fill: "none",
656
+ ...t.stroke(e.axisStroke)
657
+ }
658
+ });
659
+ for (const s of e.categoryLabels) s && i.push(...t.text(s, null, null));
660
+ for (const s of e.series) for (const e of s.bars) e && i.push({
661
+ type: "rect",
662
+ silent: !0,
663
+ z: 2,
664
+ shape: {
665
+ x: e.x,
666
+ y: e.y,
667
+ width: e.width,
668
+ height: e.height
669
+ },
670
+ style: {
671
+ fill: t.paint(s.fill, "none"),
672
+ ...t.stroke(s.stroke)
673
+ }
674
+ });
675
+ return i;
676
+ })(e, t) : []
677
+ }, U = (e, t, i) => {
678
+ const s = t.x + t.width / 2, r = t.y + t.height / 2, n = [];
679
+ return e.stroke && n.push({
680
+ type: "line",
681
+ silent: !0,
682
+ z: 50,
683
+ shape: {
684
+ x1: t.x,
685
+ y1: r,
686
+ x2: t.x + t.width,
687
+ y2: r
688
+ },
689
+ style: i.stroke(e.stroke)
690
+ }), e.marker && n.push(...i.marker.graphic(e.marker, s, r, 51)), n;
691
+ }, K = {
692
+ types: ["line"],
693
+ series: (e, t) => "line" === e.type ? ((e, t) => {
694
+ const i = t.cartesian(e), s = "standard" === e.grouping ? void 0 : `line:${e.axisIds.join(":")}`;
695
+ return e.series.flatMap((r) => t.withMarkerFills(r, {
696
+ ...i.base(r),
697
+ ...t.lineSeries(r, !1, e.spanBlanks),
698
+ ...s ? {
699
+ data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
700
+ value: e,
701
+ source: r.values[t]
702
+ })),
703
+ stack: s
704
+ } : {}
705
+ }));
706
+ })(e, t) : [],
707
+ graphic: (e, t) => "line" === e.type ? [
708
+ ...t.upDownBars(e.upDownBars),
709
+ ...t.lines(e.hiLowLines),
710
+ ...t.lines(e.dropLines)
711
+ ] : [],
712
+ legendKey: (e, t, i, s, r) => U(t, s, r)
713
+ }, J = {
714
+ types: ["area"],
715
+ series: (e, t) => "area" === e.type ? ((e, t) => {
716
+ const i = t.cartesian(e), s = "standard" === e.grouping ? void 0 : `area:${e.axisIds.join(":")}`;
717
+ return e.series.map((r) => ({
718
+ ...i.base(r),
719
+ ...t.lineSeries(r, !1),
720
+ data: i.placed(r, r.plotted.map((e, t) => e === r.values[t] ? e : {
721
+ value: e,
722
+ source: r.values[t]
723
+ })),
724
+ ...s ? { stack: s } : {},
725
+ areaStyle: {
726
+ color: t.paint(r.fill),
727
+ opacity: 1,
728
+ origin: e.baseValue
729
+ },
730
+ z: 1
731
+ }));
732
+ })(e, t) : [],
733
+ graphic: (e, t) => "area" === e.type ? t.lines(e.dropLines) : []
734
+ }, Z = {
735
+ types: ["scatter"],
736
+ series: (e, t) => "scatter" === e.type ? ((e, t) => {
737
+ const i = t.cartesian(e);
738
+ return e.series.flatMap((s) => t.withMarkerFills(s, {
739
+ ...i.base(s),
740
+ ...t.lineSeries(s, s.smooth, e.spanBlanks),
741
+ data: s.values.map((e, t) => [s.xValues[t], e])
742
+ }));
743
+ })(e, t) : [],
744
+ legendKey: (e, t, i, s, r) => U(t, s, r)
745
+ }, q = {
746
+ types: ["bubble"],
747
+ series: (e, t) => "bubble" === e.type ? ((e, t) => {
748
+ const i = t.cartesian(e);
749
+ return e.series.map((s) => ({
750
+ ...i.base(s),
751
+ type: "line",
752
+ showSymbol: !0,
753
+ symbol: "circle",
754
+ lineStyle: {
755
+ width: 0,
756
+ opacity: 0
757
+ },
758
+ data: s.values.flatMap((i, r) => {
759
+ if (null === s.radii[r]) return [];
760
+ const n = s.negative[r] ? e.negative : {
761
+ fill: s.fill,
762
+ stroke: s.stroke
763
+ };
764
+ return [{
765
+ value: [s.xValues[r], i],
766
+ symbolSize: 2 * s.radii[r] - t.width(n.stroke),
767
+ ...s.negative[r] ? { itemStyle: {
768
+ color: t.paint(n.fill),
769
+ borderColor: t.paint(n.stroke?.fill),
770
+ borderWidth: t.width(n.stroke)
771
+ } } : {}
772
+ }];
773
+ }),
774
+ itemStyle: {
775
+ color: t.paint(s.fill),
776
+ borderColor: t.paint(s.stroke?.fill),
777
+ borderWidth: t.width(s.stroke)
778
+ },
779
+ z: 2
780
+ }));
781
+ })(e, t) : []
782
+ }, N = (e, t, i, s, r, n, l) => {
783
+ if (0 === n.length) return [];
784
+ const o = (e) => e.center.x !== i.x || e.center.y !== i.y, a = (e, i, o) => ({
785
+ type: "pie",
786
+ id: e,
787
+ name: t,
788
+ center: [i.x, i.y],
789
+ radius: [s, r],
790
+ startAngle: 90 - n[0].slice.startAngle,
791
+ clockwise: !0,
792
+ minAngle: 0,
793
+ stillShowZeroSum: !0,
794
+ avoidLabelOverlap: !1,
795
+ selectedMode: !1,
796
+ label: { show: !1 },
797
+ labelLine: { show: !1 },
798
+ emphasis: { disabled: !0 },
799
+ animation: !1,
800
+ data: n.map((e) => (({ slice: e, name: t }, i) => ({
801
+ name: t,
802
+ value: e.endAngle - e.startAngle,
803
+ itemStyle: i ? {
804
+ color: l.paint(e.fill),
805
+ borderColor: l.paint(e.stroke?.fill),
806
+ borderWidth: l.width(e.stroke)
807
+ } : {
808
+ color: "transparent",
809
+ borderWidth: 0
810
+ },
811
+ ...i ? {} : { tooltip: { show: !1 } }
812
+ }))(e, o(e.slice)))
813
+ }), p = [a(e, i, (e) => !o(e))];
814
+ return n.forEach(({ slice: t }, i) => {
815
+ o(t) && p.push(a(`${e}:${i}`, t.center, (e) => e === t));
816
+ }), p;
817
+ }, Q = (e, t, i, s) => [{
818
+ type: "rect",
819
+ silent: !0,
820
+ z: 50,
821
+ shape: {
822
+ x: i.x,
823
+ y: i.y,
824
+ width: i.width,
825
+ height: i.height
826
+ },
827
+ style: {
828
+ fill: s.paint(e),
829
+ ...s.stroke(t ?? null)
830
+ }
831
+ }], X = {
832
+ types: ["pie"],
833
+ series: (e, t) => "pie" === e.type ? ((e, t) => e.series.flatMap((i) => {
834
+ const s = i.slices.flatMap((e, t) => e ? [{
835
+ slice: e,
836
+ name: String(t + 1)
837
+ }] : []);
838
+ return N(i.id, i.name, e.center, i.innerRadius, i.outerRadius, s, t);
839
+ }))(e, t) : [],
840
+ legendKey: (e, t, i, s, r) => {
841
+ const n = void 0 === e.pointIndex ? void 0 : t.slices[e.pointIndex];
842
+ return n ? Q(n.fill, n.stroke, s, r) : void 0;
843
+ }
844
+ }, Y = (e, t) => e.series.flatMap((e) => (e.bars ?? []).flatMap((e) => e ? [{
845
+ type: "rect",
846
+ silent: !0,
847
+ z: 2,
848
+ shape: {
849
+ x: e.rect.x,
850
+ y: e.rect.y,
851
+ width: e.rect.width,
852
+ height: e.rect.height
853
+ },
854
+ style: {
855
+ fill: t.paint(e.fill, "none"),
856
+ ...t.stroke(e.stroke)
857
+ }
858
+ }] : [])), _ = {
859
+ types: ["ofPie"],
860
+ series: (e, t) => "ofPie" === e.type ? ((e, t) => e.series.flatMap((i) => {
861
+ const s = i.slices.flatMap((e, t) => e ? [{
862
+ slice: e,
863
+ name: String(t + 1),
864
+ k: t
865
+ }] : []), r = s.filter(({ k: e }) => !i.second[e]);
866
+ i.other && r.unshift({
867
+ slice: i.other,
868
+ name: "Other",
869
+ k: -1
870
+ });
871
+ const n = N(i.id, i.name, e.center, 0, e.radius, r, t);
872
+ return e.second && n.push(...N(`${i.id}:second`, i.name, e.second.center, 0, e.second.radius, s.filter(({ k: e }) => i.second[e]), t)), n;
873
+ }))(e, t) : [],
874
+ graphic: (e, t) => "ofPie" === e.type ? [...Y(e, t), ...t.lines(e.seriesLines)] : [],
875
+ legendKey: (e, t, i, s, r) => {
876
+ if ("ofPie" !== i.type || void 0 === e.pointIndex) return;
877
+ const n = i.series[0], l = n?.slices[e.pointIndex] ?? n?.bars?.[e.pointIndex];
878
+ return l ? Q(l.fill, l.stroke, s, r) : void 0;
879
+ }
880
+ }, ee = {
881
+ types: ["radar"],
882
+ grid: !1,
883
+ graphic: (e, t) => "radar" === e.type ? ((e, t) => {
884
+ const i = [];
885
+ for (const s of e.rings) i.push({
886
+ type: "polygon",
887
+ silent: !0,
888
+ z: 1,
889
+ shape: { points: s.map((e) => [e.x, e.y]) },
890
+ style: {
891
+ fill: "none",
892
+ ...t.stroke(e.ringStroke)
893
+ }
894
+ });
895
+ for (const s of e.spokes) i.push({
896
+ type: "line",
897
+ silent: !0,
898
+ z: 1,
899
+ shape: {
900
+ x1: s.from.x,
901
+ y1: s.from.y,
902
+ x2: s.to.x,
903
+ y2: s.to.y
904
+ },
905
+ style: t.stroke(e.spokeStroke)
906
+ });
907
+ e.series.forEach((s, r) => {
908
+ const n = 2 + r / Math.max(1, e.series.length), l = [[]];
909
+ s.points.forEach((e) => {
910
+ e ? l[l.length - 1].push(e) : l.push([]);
911
+ }), e.filled ? i.push({
912
+ type: "polygon",
913
+ silent: !0,
914
+ z: n,
915
+ shape: { points: s.points.filter((e) => !!e).map((e) => [e.x, e.y]) },
916
+ style: {
917
+ fill: t.paint(s.fill, "none"),
918
+ ...t.stroke(s.stroke)
919
+ }
920
+ }) : s.stroke && (s.points.length > 1 && s.points.every((e) => !!e) ? i.push({
921
+ type: "polygon",
922
+ silent: !0,
923
+ z: n,
924
+ shape: { points: s.points.map((e) => [e.x, e.y]) },
925
+ style: {
926
+ fill: "none",
927
+ ...t.stroke(s.stroke),
928
+ lineJoin: "round"
929
+ }
930
+ }) : l.filter((e) => e.length > 1).forEach((e) => i.push({
931
+ type: "polyline",
932
+ silent: !0,
933
+ z: n,
934
+ shape: { points: e.map((e) => [e.x, e.y]) },
935
+ style: {
936
+ fill: "none",
937
+ ...t.stroke(s.stroke),
938
+ lineJoin: "round"
939
+ }
940
+ }))), s.marker && s.points.forEach((e) => {
941
+ e && i.push(...t.marker.graphic(s.marker, e.x, e.y, n + .5));
942
+ });
943
+ });
944
+ for (const s of e.categoryLabels) s && i.push(...t.text(s, null, null));
945
+ for (const s of e.valueLabels) i.push(...t.text(s, null, null));
946
+ return i;
947
+ })(e, t) : [],
948
+ legendKey: (e, t, i, s, r) => "radar" !== i.type || i.filled ? void 0 : U(t, s, r)
949
+ }, te = {
950
+ types: ["surface"],
951
+ grid: !1,
952
+ graphic: (e, t) => "surface" === e.type ? ((e, t) => {
953
+ const i = [];
954
+ e.bands.forEach((s) => {
955
+ for (const r of s.polygons) i.push({
956
+ type: "polygon",
957
+ silent: !0,
958
+ z: 2,
959
+ shape: { points: r.map((e) => [e.x, e.y]) },
960
+ style: e.wireframe ? {
961
+ fill: "none",
962
+ ...t.stroke(s.stroke)
963
+ } : {
964
+ fill: t.paint(s.fill, "none"),
965
+ stroke: t.paint(s.fill, "none"),
966
+ lineWidth: .5
967
+ }
968
+ });
969
+ });
970
+ for (const s of [...e.categoryLabels, ...e.seriesLabels]) i.push(...t.text(s, null, null));
971
+ return i;
972
+ })(e, t) : [],
973
+ legendKey: (e, t, i, s, r) => {
974
+ const n = "surface" === i.type && void 0 !== e.bandIndex ? i.bands[e.bandIndex] : void 0;
975
+ return n ? Q(n.fill, n.stroke, s, r) : void 0;
976
+ }
977
+ }, ie = {
978
+ types: ["regionMap"],
979
+ grid: !1,
980
+ graphic: (e) => "label" in e && e.label ? D(e.label, null, null) : []
981
+ };
982
+ function se(e) {
983
+ for (const t of [
984
+ j,
985
+ G,
986
+ P,
987
+ T,
988
+ V,
989
+ O,
990
+ R,
991
+ K,
992
+ J,
993
+ Z,
994
+ q,
995
+ X,
996
+ _,
997
+ ee,
998
+ te,
999
+ ie
1000
+ ]) e(t);
1001
+ }
1002
+ function re(t, i) {
1003
+ e.registerBuiltIns(se);
1004
+ const s = i?.interactive ?? !0, r = i?.legend ?? "graphic", n = (t) => e.of(t), l = t.axes.filter((e) => "bottom" === e.position || "top" === e.position), o = t.axes.filter((e) => "left" === e.position || "right" === e.position), a = oe(t.groups, n), p = ae(t, (e) => {
1005
+ const t = l.findIndex((t) => t.id === e);
1006
+ if (t >= 0) return {
1007
+ dim: "x",
1008
+ index: t
1009
+ };
1010
+ const i = o.findIndex((t) => t.id === e);
1011
+ if (i >= 0) return {
1012
+ dim: "y",
1013
+ index: i
1014
+ };
1015
+ throw new Error(`chart layout names axis ${e}, which it does not have`);
1016
+ }), h = [], c = t.chartArea.cornerRadius, d = t.chartArea.fill, y = !!d && (c > 0 || "solid" !== d.type);
1017
+ if (y && h.push({
1018
+ type: "rect",
1019
+ silent: !0,
1020
+ z: -100,
1021
+ shape: {
1022
+ x: 0,
1023
+ y: 0,
1024
+ width: t.width,
1025
+ height: t.height,
1026
+ r: c
1027
+ },
1028
+ style: { fill: m(d, "none") }
1029
+ }), t.chartArea.border) {
1030
+ const e = b(t.chartArea.border);
1031
+ h.push({
1032
+ type: "rect",
1033
+ silent: !0,
1034
+ z: 100,
1035
+ shape: {
1036
+ x: e / 2,
1037
+ y: e / 2,
1038
+ width: t.width - e,
1039
+ height: t.height - e,
1040
+ r: Math.max(0, c - e / 2)
1041
+ },
1042
+ style: {
1043
+ fill: "none",
1044
+ ...S(t.chartArea.border)
1045
+ }
1046
+ });
1047
+ }
1048
+ t.legend && "graphic" === r && h.push(...function(t, i, s) {
1049
+ const r = (e) => {
1050
+ for (const t of i) {
1051
+ const i = t.series.find((t) => t.id === e);
1052
+ if (i) return {
1053
+ series: i,
1054
+ group: t
1055
+ };
1056
+ }
1057
+ }, n = [];
1058
+ for (const i of t.entries) {
1059
+ const l = r(i.seriesId), o = i.keyRect, a = void 0 === i.trendlineIndex ? void 0 : l?.series.trendlines?.[i.trendlineIndex];
1060
+ if (a) {
1061
+ const e = o.y + o.height / 2;
1062
+ n.push({
1063
+ type: "line",
1064
+ silent: !0,
1065
+ z: 50,
1066
+ shape: {
1067
+ x1: o.x,
1068
+ y1: e,
1069
+ x2: o.x + o.width,
1070
+ y2: e
1071
+ },
1072
+ style: S(a.stroke)
1073
+ });
1074
+ } else {
1075
+ const t = l && !i.swatch ? e.of(l.group)?.legendKey?.(i, l.series, l.group, o, s) : void 0;
1076
+ if (t) n.push(...t);
1077
+ else {
1078
+ const e = i.swatch ?? {
1079
+ fill: l?.series.fill ?? null,
1080
+ stroke: l?.series.stroke ?? null
1081
+ };
1082
+ n.push({
1083
+ type: "rect",
1084
+ silent: !0,
1085
+ z: 50,
1086
+ shape: {
1087
+ x: o.x,
1088
+ y: o.y,
1089
+ width: o.width,
1090
+ height: o.height
1091
+ },
1092
+ style: {
1093
+ fill: m(e.fill),
1094
+ ...S(e.stroke)
1095
+ }
1096
+ });
1097
+ }
1098
+ }
1099
+ const p = o.x + o.width + (o.x - i.rect.x);
1100
+ n.push({
1101
+ type: "text",
1102
+ silent: !0,
1103
+ z: 50,
1104
+ style: {
1105
+ x: p,
1106
+ y: i.rect.y + i.rect.height / 2,
1107
+ text: i.text,
1108
+ fill: z(t.font),
1109
+ font: M(t.font),
1110
+ verticalAlign: "middle",
1111
+ align: "left"
1112
+ }
1113
+ });
1114
+ }
1115
+ return n;
1116
+ }(t.legend, t.groups, p));
1117
+ for (const e of t.axes) h.push(...ge(e)), h.push(...ue(e, t.plotArea.inner)), e.title && !e.deleted && h.push(...D(e.title, null, null)), e.unitLabel && !e.deleted && h.push(...D(e.unitLabel, null, null)), "category" !== e.kind || e.deleted || h.push(...de(e)), e.labelVertical && h.push(...fe(e, t.plotArea.inner));
1118
+ for (const e of t.groups) {
1119
+ h.push(...n(e)?.graphic?.(e, p) ?? []);
1120
+ for (const t of e.series) {
1121
+ for (const e of t.labels ?? []) e && h.push(...D(e, e.fill, e.border));
1122
+ for (const e of t.trendlines ?? []) h.push(...me(e));
1123
+ for (const e of t.errorBars ?? []) h.push(...xe(e));
1124
+ }
1125
+ }
1126
+ return {
1127
+ animation: !1,
1128
+ backgroundColor: y ? "transparent" : m(d),
1129
+ textStyle: { fontFamily: w(t.axes.find((e) => e.labelFont)?.labelFont ?? {}) },
1130
+ title: t.title ? {
1131
+ show: !0,
1132
+ text: t.title.text,
1133
+ left: t.title.rect.x,
1134
+ top: t.title.rect.y,
1135
+ padding: [
1136
+ t.title.insets.top,
1137
+ t.title.insets.right,
1138
+ t.title.insets.bottom,
1139
+ t.title.insets.left
1140
+ ],
1141
+ triggerEvent: !0,
1142
+ textStyle: {
1143
+ ...C(t.title.font),
1144
+ lineHeight: t.title.rect.height - t.title.insets.top - t.title.insets.bottom
1145
+ }
1146
+ } : { show: !1 },
1147
+ grid: [{
1148
+ id: "plot",
1149
+ left: t.plotArea.inner.x,
1150
+ top: t.plotArea.inner.y,
1151
+ width: t.plotArea.inner.width,
1152
+ height: t.plotArea.inner.height,
1153
+ containLabel: !1,
1154
+ outerBoundsMode: "none",
1155
+ show: !(!t.plotArea.fill && !t.plotArea.border),
1156
+ backgroundColor: m(t.plotArea.fill),
1157
+ borderColor: m(t.plotArea.border?.fill),
1158
+ borderWidth: b(t.plotArea.border)
1159
+ }, ...t.axes.some((e) => 1 === a(e.id)) ? [{
1160
+ id: "plot:vertical",
1161
+ left: t.plotArea.inner.x,
1162
+ top: t.plotArea.inner.y,
1163
+ width: t.plotArea.inner.width,
1164
+ height: t.plotArea.inner.height,
1165
+ containLabel: !1,
1166
+ outerBoundsMode: "none",
1167
+ show: !1
1168
+ }] : []],
1169
+ xAxis: l.map((e) => pe(e, t.plotArea.inner, a(e.id))),
1170
+ yAxis: o.map((e) => pe(e, t.plotArea.inner, a(e.id))),
1171
+ series: t.groups.flatMap((e) => n(e)?.series?.(e, p) ?? []),
1172
+ legend: t.legend && "native" === r ? ce(t.legend) : { show: !1 },
1173
+ graphic: h,
1174
+ tooltip: s ? {
1175
+ show: !0,
1176
+ trigger: "item",
1177
+ formatter: (e) => {
1178
+ const t = e.data?.source, i = void 0 !== t ? t : Array.isArray(e.value) ? e.value[1] : e.value;
1179
+ return `Series "${e.seriesName}" Point "${e.name}" Value: ${i}`;
1180
+ }
1181
+ } : { show: !1 }
1182
+ };
1183
+ }
1184
+ var ne = (e) => (t) => {
1185
+ const i = e.ticks.find((i) => Math.abs(i.value - t) <= ((t) => e.logBase ? 1e-9 * Math.abs(t) : 1e-6 * e.majorUnit)(i.value));
1186
+ return i ? i.label : "";
1187
+ }, le = (e, t) => {
1188
+ const i = e.labelsAt ?? e.lineAt;
1189
+ let s;
1190
+ switch (e.position) {
1191
+ case "bottom":
1192
+ s = i - (t.y + t.height);
1193
+ break;
1194
+ case "top":
1195
+ s = t.y - i;
1196
+ break;
1197
+ case "left":
1198
+ s = t.x - i;
1199
+ break;
1200
+ default: s = i - (t.x + t.width);
1201
+ }
1202
+ return Math.abs(s) < 1e-6 ? 0 : s;
1203
+ }, oe = (e, t) => {
1204
+ const i = (e) => t(e)?.horizontal?.(e) ?? !1, s = e.filter((e) => t(e)?.grid ?? ("axisIds" in e && 2 === e.axisIds.length)), r = s.some(i) && s.some((e) => !i(e)), n = new Set(r ? s.filter((e) => !i(e)).flatMap((e) => e.axisIds) : []);
1205
+ return (e) => n.has(e) ? 1 : 0;
1206
+ }, ae = (e, t) => {
1207
+ const i = (t) => e.axes.find((e) => e.id === t);
1208
+ return {
1209
+ layout: e,
1210
+ axisOf: i,
1211
+ cartesian: (e) => {
1212
+ const s = t(e.axisIds[0]), r = t(e.axisIds[1]), n = "x" === s.dim ? s.index : r.index, l = "y" === s.dim ? s.index : r.index, o = i(e.axisIds[1]), a = "value" === o?.kind && !!o.logBase, p = (e, t) => {
1213
+ a && (t = t.map((e) => {
1214
+ const t = null !== e && "object" == typeof e ? e.value : e;
1215
+ return "number" != typeof t || t > 0 ? e : null;
1216
+ }));
1217
+ const i = e.slots;
1218
+ if (!i) return t;
1219
+ const r = (e, t) => "x" === s.dim ? [e, t] : [t, e];
1220
+ return t.map((e, t) => {
1221
+ const s = i[t];
1222
+ return null == s ? null : null !== e && "object" == typeof e ? {
1223
+ ...e,
1224
+ value: r(s, e.value)
1225
+ } : r(s, e);
1226
+ }).filter((e) => null !== e);
1227
+ };
1228
+ return {
1229
+ xAxisIndex: n,
1230
+ yAxisIndex: l,
1231
+ isLog: a,
1232
+ placed: p,
1233
+ base: (e) => ({
1234
+ id: e.id,
1235
+ name: e.name,
1236
+ xAxisIndex: n,
1237
+ yAxisIndex: l,
1238
+ data: p(e, e.values),
1239
+ emphasis: { disabled: !0 },
1240
+ label: { show: !1 },
1241
+ animation: !1
1242
+ })
1243
+ };
1244
+ },
1245
+ paint: m,
1246
+ stroke: S,
1247
+ line: L,
1248
+ width: b,
1249
+ lineSeries: (e, t, i = !1) => ({
1250
+ type: "line",
1251
+ smooth: t,
1252
+ connectNulls: i,
1253
+ showSymbol: !!e.marker,
1254
+ ...e.marker ? I(e.marker) : {
1255
+ symbol: "none",
1256
+ symbolSize: 0
1257
+ },
1258
+ lineStyle: L(e.stroke),
1259
+ itemStyle: {
1260
+ color: e.marker && !B[e.marker.symbol] ? m(e.marker.fill) : e.marker ? "transparent" : m(e.stroke?.fill),
1261
+ borderColor: m(e.marker?.stroke?.fill),
1262
+ borderWidth: b(e.marker?.stroke)
1263
+ }
1264
+ }),
1265
+ withMarkerFills: (e, t) => {
1266
+ const i = E(e.marker);
1267
+ return i ? [{
1268
+ ...t,
1269
+ id: `${e.id}:fill`,
1270
+ name: `${e.name}:fill`,
1271
+ silent: !0,
1272
+ tooltip: { show: !1 },
1273
+ symbol: "rect",
1274
+ symbolSize: e.marker.size,
1275
+ lineStyle: {
1276
+ width: 0,
1277
+ opacity: 0
1278
+ },
1279
+ itemStyle: {
1280
+ color: m(i),
1281
+ borderWidth: 0
1282
+ },
1283
+ z: (t.z ?? 2) - .5
1284
+ }, t] : [t];
1285
+ },
1286
+ marker: {
1287
+ symbol: I,
1288
+ fill: E,
1289
+ graphic: $
1290
+ },
1291
+ text: D,
1292
+ lines: W,
1293
+ upDownBars: H
1294
+ };
1295
+ };
1296
+ function pe(e, t, i) {
1297
+ const s = {
1298
+ id: String(e.id),
1299
+ gridIndex: i,
1300
+ position: e.position,
1301
+ offset: le(e, t),
1302
+ show: !e.deleted,
1303
+ inverse: e.reversed,
1304
+ axisLine: {
1305
+ show: !!e.line && void 0 === e.labelsAt,
1306
+ onZero: !1,
1307
+ lineStyle: L(e.line)
1308
+ },
1309
+ axisTick: {
1310
+ show: "none" !== e.tickMark && !!e.line,
1311
+ inside: "in" === e.tickMark,
1312
+ length: e.tickLength,
1313
+ lineStyle: L(e.line)
1314
+ },
1315
+ splitLine: { show: !1 },
1316
+ z: 3,
1317
+ axisLabel: {
1318
+ show: !!e.labelFont && !e.labelVertical,
1319
+ margin: e.labelMargin,
1320
+ ...e.labelFont ? C(e.labelFont) : {},
1321
+ interval: 0,
1322
+ hideOverlap: !1,
1323
+ showMinLabel: !0,
1324
+ showMaxLabel: !0
1325
+ },
1326
+ triggerEvent: !0
1327
+ };
1328
+ return "category" === e.kind ? {
1329
+ ...s,
1330
+ type: "category",
1331
+ data: e.categories,
1332
+ boundaryGap: "between" === e.crossBetween,
1333
+ axisTick: {
1334
+ ...s.axisTick,
1335
+ ...e.dividers ? { show: !1 } : {},
1336
+ alignWithLabel: "midCat" === e.crossBetween
1337
+ },
1338
+ axisLabel: {
1339
+ ...s.axisLabel,
1340
+ ...he(e),
1341
+ formatter: (t, i) => e.labels[i] ?? "",
1342
+ lineHeight: e.labelLineHeight,
1343
+ overflow: "none"
1344
+ }
1345
+ } : e.logBase ? {
1346
+ ...s,
1347
+ type: "log",
1348
+ logBase: e.logBase,
1349
+ min: e.min,
1350
+ max: e.max,
1351
+ interval: Math.round(Math.log(e.majorUnit) / Math.log(e.logBase)),
1352
+ axisLabel: {
1353
+ ...s.axisLabel,
1354
+ formatter: ne(e)
1355
+ }
1356
+ } : {
1357
+ ...s,
1358
+ type: "value",
1359
+ min: e.min,
1360
+ max: e.max,
1361
+ interval: e.majorUnit,
1362
+ alignTicks: !1,
1363
+ axisLabel: {
1364
+ ...s.axisLabel,
1365
+ formatter: ne(e)
1366
+ }
1367
+ };
1368
+ }
1369
+ function he(e) {
1370
+ const t = e.labelRotation;
1371
+ if ("left" === e.position || "right" === e.position) return {
1372
+ rotate: t,
1373
+ align: "left" === e.position ? "right" : "left",
1374
+ verticalAlign: "middle"
1375
+ };
1376
+ const i = "bottom" === e.position;
1377
+ return 0 === t ? {
1378
+ rotate: t,
1379
+ align: "center",
1380
+ verticalAlign: i ? "top" : "bottom"
1381
+ } : {
1382
+ rotate: t,
1383
+ align: t > 0 === i ? "right" : "left",
1384
+ verticalAlign: i ? "top" : "bottom"
1385
+ };
1386
+ }
1387
+ function ce(e) {
1388
+ const t = e.entries[0], i = e.entries.length > 1 ? e.entries[1].rect.x - (t.rect.x + t.rect.width) : 0;
1389
+ return {
1390
+ show: !0,
1391
+ left: e.rect.x,
1392
+ top: e.rect.y,
1393
+ width: e.rect.width,
1394
+ height: e.rect.height,
1395
+ orient: e.orient,
1396
+ padding: 0,
1397
+ itemGap: Math.max(0, i),
1398
+ itemWidth: t?.keyRect.width ?? 10,
1399
+ itemHeight: t?.keyRect.height ?? 10,
1400
+ align: "left",
1401
+ selectedMode: !1,
1402
+ textStyle: C(e.font),
1403
+ data: e.entries.map((e) => ({ name: e.text }))
1404
+ };
1405
+ }
1406
+ function de(e) {
1407
+ const t = [];
1408
+ for (const i of e.levels ?? []) for (const e of i.labels) t.push(...D(e, null, null, e.lineHeight));
1409
+ if (e.line) for (const { from: i, to: s } of e.dividers ?? []) t.push({
1410
+ type: "line",
1411
+ silent: !0,
1412
+ z: 50,
1413
+ shape: {
1414
+ x1: i.x,
1415
+ y1: i.y,
1416
+ x2: s.x,
1417
+ y2: s.y
1418
+ },
1419
+ style: S(e.line)
1420
+ });
1421
+ return t;
1422
+ }
1423
+ var ye = .95;
1424
+ function fe(e, t) {
1425
+ const i = e.labelFont;
1426
+ if (!i || e.deleted) return [];
1427
+ const s = "bottom" === e.position || "top" === e.position, r = e.labelsAt ?? e.lineAt, n = e.labelLineHeight ?? F(i), l = s ? t.x : t.y + t.height, o = s ? t.width : t.height, a = (e) => s ? l + e * o : l - e * o, p = [];
1428
+ if ("category" === e.kind) {
1429
+ const t = e.categories.length;
1430
+ e.labels.forEach((i, s) => {
1431
+ if (null === i) return;
1432
+ const r = e.reversed ? t - 1 - s : s, n = "between" === e.crossBetween ? (r + .5) / t : 1 === t ? .5 : r / (t - 1);
1433
+ p.push([i, a(n)]);
1434
+ });
1435
+ } else {
1436
+ const [t, i] = e.logBase ? [Math.log(e.min), Math.log(e.max)] : [e.min, e.max];
1437
+ for (const s of e.ticks) {
1438
+ if (!s.label) continue;
1439
+ const r = e.logBase ? Math.log(s.value) : s.value, n = i === t ? .5 : (r - t) / (i - t);
1440
+ p.push([s.label, a(e.reversed ? 1 - n : n)]);
1441
+ }
1442
+ }
1443
+ const h = {
1444
+ fill: z(i),
1445
+ font: M(i),
1446
+ lineHeight: n
1447
+ }, c = [];
1448
+ for (const [t, n] of p) {
1449
+ if (!s) {
1450
+ c.push({
1451
+ type: "text",
1452
+ silent: !0,
1453
+ z: 3,
1454
+ x: "left" === e.position ? r - e.labelMargin : r + e.labelMargin,
1455
+ y: n,
1456
+ style: {
1457
+ ...h,
1458
+ text: t,
1459
+ align: "left" === e.position ? "right" : "left",
1460
+ verticalAlign: "middle"
1461
+ }
1462
+ });
1463
+ continue;
1464
+ }
1465
+ const l = t.split(" "), o = ye * F(i);
1466
+ l.forEach((t, i) => c.push({
1467
+ type: "text",
1468
+ silent: !0,
1469
+ z: 3,
1470
+ x: n + (i - (l.length - 1) / 2) * o,
1471
+ y: "bottom" === e.position ? r + e.labelMargin : r - e.labelMargin,
1472
+ style: {
1473
+ ...h,
1474
+ text: t,
1475
+ align: "center",
1476
+ verticalAlign: "bottom" === e.position ? "top" : "bottom"
1477
+ }
1478
+ }));
1479
+ }
1480
+ return c;
1481
+ }
1482
+ function ue(e, t) {
1483
+ return void 0 === e.labelsAt || !e.line || e.deleted ? [] : [{
1484
+ type: "line",
1485
+ silent: !0,
1486
+ z: 3,
1487
+ shape: "bottom" === e.position || "top" === e.position ? {
1488
+ x1: t.x,
1489
+ y1: e.lineAt,
1490
+ x2: t.x + t.width,
1491
+ y2: e.lineAt
1492
+ } : {
1493
+ x1: e.lineAt,
1494
+ y1: t.y,
1495
+ x2: e.lineAt,
1496
+ y2: t.y + t.height
1497
+ },
1498
+ style: S(e.line)
1499
+ }];
1500
+ }
1501
+ function ge(e) {
1502
+ return e.gridlines && e.majorGridlines ? e.gridlines.map((t) => ({
1503
+ type: "line",
1504
+ silent: !0,
1505
+ z: 0,
1506
+ shape: {
1507
+ x1: t.from.x,
1508
+ y1: t.from.y,
1509
+ x2: t.to.x,
1510
+ y2: t.to.y
1511
+ },
1512
+ style: {
1513
+ fill: "none",
1514
+ ...S(e.majorGridlines)
1515
+ }
1516
+ })) : [];
1517
+ }
1518
+ function xe(e) {
1519
+ return e.paths.map((t) => ({
1520
+ type: "polyline",
1521
+ silent: !0,
1522
+ z: 29,
1523
+ shape: { points: t.map((e) => [e.x, e.y]) },
1524
+ style: {
1525
+ fill: "none",
1526
+ ...S(e.stroke)
1527
+ }
1528
+ }));
1529
+ }
1530
+ function me(e) {
1531
+ const t = e.paths.map((t) => ({
1532
+ type: "polyline",
1533
+ silent: !0,
1534
+ z: 30,
1535
+ shape: { points: t.map((e) => [e.x, e.y]) },
1536
+ style: {
1537
+ fill: "none",
1538
+ ...S(e.stroke),
1539
+ lineJoin: "round"
1540
+ }
1541
+ })), i = e.label;
1542
+ if (!i) return t;
1543
+ const { rect: s, font: r } = i;
1544
+ (i.fill || i.border) && t.push({
1545
+ type: "rect",
1546
+ silent: !0,
1547
+ z: 59,
1548
+ shape: {
1549
+ x: s.x,
1550
+ y: s.y,
1551
+ width: s.width,
1552
+ height: s.height
1553
+ },
1554
+ style: {
1555
+ fill: m(i.fill),
1556
+ ...S(i.border)
1557
+ }
1558
+ });
1559
+ const n = (e) => M(r, e);
1560
+ return i.lines.forEach((e, l) => {
1561
+ t.push({
1562
+ type: "text",
1563
+ silent: !0,
1564
+ z: 60,
1565
+ x: s.x + s.width / 2,
1566
+ y: s.y + i.insets.top + (l + .5) * i.lineHeight,
1567
+ style: {
1568
+ x: 0,
1569
+ y: 0,
1570
+ text: e.map((e) => `{${e.superscript ? "raised" : "plain"}|${e.text}}`).join(""),
1571
+ rich: {
1572
+ plain: {
1573
+ font: n(F(r)),
1574
+ fill: z(r),
1575
+ lineHeight: i.lineHeight
1576
+ },
1577
+ raised: {
1578
+ font: n(i.superscriptSize),
1579
+ fill: z(r),
1580
+ lineHeight: i.lineHeight,
1581
+ verticalAlign: "top"
1582
+ }
1583
+ },
1584
+ align: "center",
1585
+ verticalAlign: "middle"
1586
+ }
1587
+ });
1588
+ }), t;
1589
+ }
1590
+ var be = !1;
1591
+ function ke() {
1592
+ be || (be = !0, s.use([
1593
+ d,
1594
+ a,
1595
+ p,
1596
+ h,
1597
+ c,
1598
+ o
1599
+ ]));
1600
+ }
1601
+ var we = {
1602
+ bar: [r],
1603
+ line: [n],
1604
+ area: [n],
1605
+ scatter: [n],
1606
+ bubble: [n],
1607
+ pie: [l],
1608
+ ofPie: [l]
1609
+ }, Ae = /* @__PURE__ */ new Set();
1610
+ function ve(t) {
1611
+ for (const i of t.groups) {
1612
+ const t = e.typeOf(i);
1613
+ if (Ae.has(t)) continue;
1614
+ Ae.add(t);
1615
+ const r = e.get(t)?.modules?.() ?? we[t] ?? [];
1616
+ r.length > 0 && s.use(r);
1617
+ }
1618
+ }
1619
+ function Fe(e, t) {
1620
+ ke();
1621
+ const i = re(e, {
1622
+ interactive: !1,
1623
+ ...t
1624
+ });
1625
+ ve(e);
1626
+ const r = s.init(null, null, {
1627
+ renderer: "svg",
1628
+ ssr: !0,
1629
+ width: e.width,
1630
+ height: e.height
1631
+ });
1632
+ return r.setOption(i), r;
1633
+ }
1634
+ function ze(e, t) {
1635
+ const i = Fe(e, t);
1636
+ try {
1637
+ return i.renderToSVGString();
1638
+ } finally {
1639
+ i.dispose();
1640
+ }
1641
+ }
1642
+ function Ce(e, t, i) {
1643
+ ke();
1644
+ let r = t;
1645
+ const n = re(t, i);
1646
+ ve(t);
1647
+ const l = s.init(e, null, {
1648
+ renderer: "svg",
1649
+ width: t.width,
1650
+ height: t.height
1651
+ });
1652
+ return l.setOption(n), {
1653
+ update: (e) => {
1654
+ e.width === r.width && e.height === r.height || l.resize({
1655
+ width: e.width,
1656
+ height: e.height
1657
+ }), r = e;
1658
+ const t = re(e, i);
1659
+ ve(e), l.setOption(t, { notMerge: !0 });
1660
+ },
1661
+ dispose: () => l.dispose()
1662
+ };
1663
+ }
1664
+ export { Fe as createHeadlessChart, ke as ensureRegistered, Ce as mountChart, ze as renderChartToSVG };