vue-data-ui 3.25.5 → 3.25.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
  2. package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
  3. package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
  4. package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
  5. package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
  6. package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
  7. package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
  9. package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-UfoQuPMf.js} +1 -1
  10. package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
  11. package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
  12. package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
  13. package/dist/components/vue-ui-3d-bar.js +1 -1
  14. package/dist/components/vue-ui-accordion.js +1 -1
  15. package/dist/components/vue-ui-age-pyramid.js +1 -1
  16. package/dist/components/vue-ui-annotator.js +1 -1
  17. package/dist/components/vue-ui-bullet.js +1 -1
  18. package/dist/components/vue-ui-bump.js +1 -1
  19. package/dist/components/vue-ui-candlestick.js +1 -1
  20. package/dist/components/vue-ui-carousel-table.js +1 -1
  21. package/dist/components/vue-ui-chestnut.js +1 -1
  22. package/dist/components/vue-ui-chord.js +1 -1
  23. package/dist/components/vue-ui-circle-pack.js +1 -1
  24. package/dist/components/vue-ui-cursor.js +1 -1
  25. package/dist/components/vue-ui-dag.js +1 -1
  26. package/dist/components/vue-ui-dashboard.js +1 -1
  27. package/dist/components/vue-ui-digits.js +1 -1
  28. package/dist/components/vue-ui-donut-evolution.js +1 -1
  29. package/dist/components/vue-ui-donut.js +1 -1
  30. package/dist/components/vue-ui-dumbbell.js +1 -1
  31. package/dist/components/vue-ui-flow.js +1 -1
  32. package/dist/components/vue-ui-funnel.js +1 -1
  33. package/dist/components/vue-ui-galaxy.js +1 -1
  34. package/dist/components/vue-ui-gauge.js +1 -1
  35. package/dist/components/vue-ui-geo.js +1 -1
  36. package/dist/components/vue-ui-gizmo.js +1 -1
  37. package/dist/components/vue-ui-heatmap.js +1 -1
  38. package/dist/components/vue-ui-hill.js +1 -1
  39. package/dist/components/vue-ui-history-plot.js +1 -1
  40. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  41. package/dist/components/vue-ui-icon.js +1 -1
  42. package/dist/components/vue-ui-kpi.js +1 -1
  43. package/dist/components/vue-ui-label.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-stackline.js +1 -1
  68. package/dist/components/vue-ui-strip-plot.js +1 -1
  69. package/dist/components/vue-ui-table-heatmap.js +1 -1
  70. package/dist/components/vue-ui-table-sparkline.js +1 -1
  71. package/dist/components/vue-ui-table.js +1 -1
  72. package/dist/components/vue-ui-thermometer.js +1 -1
  73. package/dist/components/vue-ui-timer.js +1 -1
  74. package/dist/components/vue-ui-tiremarks.js +1 -1
  75. package/dist/components/vue-ui-treemap.js +1 -1
  76. package/dist/components/vue-ui-vertical-bar.js +1 -1
  77. package/dist/components/vue-ui-waffle.js +1 -1
  78. package/dist/components/vue-ui-wheel.js +1 -1
  79. package/dist/components/vue-ui-word-cloud.js +1 -1
  80. package/dist/components/vue-ui-world.js +1 -1
  81. package/dist/components/vue-ui-xy-canvas.js +1 -1
  82. package/dist/components/vue-ui-xy.js +1 -1
  83. package/dist/{package-ta2JoIjx.js → package-B-3S5q00.js} +1 -1
  84. package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.js} +1 -1
  85. package/dist/ssr/vue-ui-donut.js +1 -1
  86. package/dist/ssr/vue-ui-xy.js +1 -1
  87. package/dist/ssr.js +2 -2
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +10 -0
  90. package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
  91. package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
  92. package/dist/utils.js +1 -1
  93. package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-DlWT702n.js} +70 -70
  94. package/dist/vue-data-ui.js +71 -71
  95. package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
  96. package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
  97. package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
  98. package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
  99. package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
  100. package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
  101. package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
  102. package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
  103. package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
  104. package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
  105. package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
  106. package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
  107. package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
  108. package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
  109. package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
  110. package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
  111. package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
  112. package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
  113. package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
  114. package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
  115. package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
  116. package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
  117. package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
  118. package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
  119. package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
  120. package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
  121. package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
  122. package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
  123. package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
  124. package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.js} +2 -2
  125. package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
  126. package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
  127. package/dist/vue-ui-molecule-BzwMl-in.js +929 -0
  128. package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
  129. package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
  130. package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
  131. package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
  132. package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
  133. package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
  134. package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
  135. package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
  136. package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
  137. package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
  138. package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
  139. package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
  140. package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
  141. package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
  142. package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
  143. package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
  144. package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
  145. package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
  146. package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
  147. package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
  148. package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
  149. package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
  150. package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
  151. package/dist/vue-ui-table-CiccGbRB.js +1352 -0
  152. package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
  153. package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
  154. package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
  155. package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
  156. package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
  157. package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
  158. package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
  159. package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
  160. package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
  161. package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
  162. package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
  163. package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.js} +2 -2
  164. package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
  165. package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
  166. package/package.json +1 -1
  167. package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
  168. package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
  169. package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
  170. package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
  171. package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
  172. package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
  173. package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
  174. package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
  175. package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
  176. package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
  177. package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
  178. package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
  179. package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
  180. package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
  181. package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
  182. package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
  183. package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
  184. package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
  185. package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
  186. package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
  187. package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
  188. package/dist/vue-ui-rating-CBdDXL80.js +0 -359
  189. package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
  190. package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
  191. package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
  192. package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
  193. package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
  194. package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
  195. package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
  196. package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
  197. package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
  198. package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
  199. package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
  200. package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
  201. package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
  202. package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
  203. package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
  204. package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
  205. package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
  206. package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
  207. package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
  208. package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
  209. package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
  210. package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
@@ -0,0 +1,1824 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Ct as n, D as r, Lt as i, Ot as a, Pt as o, S as s, Ut as c, Vt as l, X as u, Yt as ee, Zt as te, _ as ne, bt as re, i as ie, jt as ae, lt as oe, nt as se, o as ce, pt as le, q as ue, w as de } from "./lib-Dql7cqyA.js";
3
+ import { n as fe, t as pe } from "./useHints-Dq_w2E8B.js";
4
+ import { n as me, r as he, t as ge } from "./useTimeLabels-d2f-W1L4.js";
5
+ import { t as _e } from "./useConfig-CIQZ6_r7.js";
6
+ import { t as ve } from "./usePrinter-DISD7q5m.js";
7
+ import { n as ye, t as be } from "./BaseScanner-DZvpgOjM.js";
8
+ import { t as xe } from "./useNestedProp-Chvyfpl-.js";
9
+ import { t as Se } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Ce } from "./img-DhGApYG0.js";
11
+ import { n as we } from "./Title-CPHi-evi.js";
12
+ import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import { a as d, c as Ee, i as De, l as Oe, n as ke, o as Ae, r as je, s as Me, t as Ne } from "./useResponsive-ZtArZtUf.js";
14
+ import { t as Pe } from "./BaseIcon-D8R6_sKH.js";
15
+ import { t as Fe } from "./SlicerPreview-B6iHOC9L.js";
16
+ import { t as Ie } from "./vue-ui-accordion-BSmBUjwZ.js";
17
+ import { t as Le } from "./BaseLegendToggle-CXQrLjd-.js";
18
+ import { t as Re } from "./useUserOptionState-DK-_1ddE.js";
19
+ import { t as ze } from "./useChartAccessibility-DYqac8yF.js";
20
+ import { t as Be } from "./Legend-X4kF4PvW.js";
21
+ import { t as Ve } from "./vue_ui_xy_canvas-Cb6dg3eK.js";
22
+ import { Teleport as He, computed as f, createBlock as Ue, createCommentVNode as p, createElementBlock as We, createElementVNode as m, createSlots as Ge, createTextVNode as Ke, createVNode as qe, defineAsyncComponent as Je, guardReactiveProps as h, mergeProps as Ye, nextTick as Xe, normalizeClass as Ze, normalizeProps as g, normalizeStyle as Qe, onBeforeUnmount as $e, onMounted as et, openBlock as _, ref as v, renderSlot as y, resolveDynamicComponent as tt, shallowRef as nt, toDisplayString as rt, toRefs as it, unref as b, useSlots as at, watch as x, watchEffect as ot, withCtx as S } from "vue";
23
+ //#region src/components/vue-ui-xy-canvas.vue
24
+ var st = /* @__PURE__ */ e({ default: () => yt }), ct = ["id"], lt = ["id"], ut = {
25
+ class: "sr-only",
26
+ "aria-live": "polite",
27
+ "aria-atomic": "true"
28
+ }, dt = ["id"], ft = ["aria-label", "aria-describedby"], pt = {
29
+ key: 0,
30
+ style: {
31
+ position: "absolute",
32
+ top: "100%",
33
+ left: "0",
34
+ width: "100%"
35
+ },
36
+ "data-dom-to-png-ignore": "",
37
+ "aria-hidden": "true"
38
+ }, mt = ["id"], ht = ["onClick"], gt = {
39
+ key: 4,
40
+ class: "vue-data-ui-watermark"
41
+ }, _t = { key: 0 }, vt = { key: 1 }, yt = /*#__PURE__*/ Te({
42
+ __name: "vue-ui-xy-canvas",
43
+ props: {
44
+ dataset: {
45
+ type: Array,
46
+ default() {
47
+ return [];
48
+ }
49
+ },
50
+ config: {
51
+ type: Object,
52
+ default() {
53
+ return {};
54
+ }
55
+ },
56
+ selectedXIndex: {
57
+ type: Number,
58
+ default: void 0
59
+ }
60
+ },
61
+ emits: [
62
+ "selectLegend",
63
+ "selectX",
64
+ "copyAlt"
65
+ ],
66
+ setup(e, { expose: Te, emit: st }) {
67
+ let yt = Je(() => import("./Tooltip-hhrkQ3Lk.js")), bt = Je(() => import("./DataTable-oiM9uWrQ.js")), xt = Je(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), St = Je(() => import("./NonSvgPenAndPaper-DFXjpRyl.js")), Ct = Je(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_xy_canvas: wt } = _e(), { isThemeValid: Tt, warnInvalidTheme: Et } = Se(), C = e, Dt = v(ue()), Ot = v(null), kt = v(null), w = v(null), T = v(1), At = v(1), jt = v(!1), E = v(null), Mt = v(""), Nt = v(null), D = v([]), Pt = v(1), O = v(!0), k = v(!0), Ft = v(null), It = v(0), Lt = v(!1), Rt = v(null), zt = v(null), Bt = v(null), Vt = v(null), Ht = v(0), Ut = v(0), Wt = v(0), A = v(null), Gt = v(!1), Kt = v(null), qt = v(null), Jt = v(!1), Yt = v(!1), Xt = v(!1), j = v(null), Zt = v(!1), Qt = v(!1), $t = v(!1), M = v(null), en = v({
68
+ x: 0,
69
+ y: 0
70
+ }), N = f(() => Array.isArray(dn.value) && dn.value.length > 0), tn = st, nn = at(), P = v(_n()), F = f(() => P.value.userOptions), I = f(() => P.value.style.chart.tooltip), L = f(() => P.value.style.chart.grid.y.verticalLines), rn = f(() => P.value.style.chart.grid.x.horizontalLines), R = f(() => P.value.style.chart.grid.y.axisLabels), z = f(() => P.value.style.chart.grid.x.timeLabels), B = f(() => P.value.style.chart.grid), V = f(() => P.value.style.chart.dataLabels), H = f(() => P.value.style.chart);
71
+ fe({
72
+ config: () => P.value,
73
+ dataset: () => C.dataset,
74
+ component: "VueUiXyCanvas",
75
+ rules: [
76
+ pe.emptyArray,
77
+ {
78
+ test: (e) => e.every((e) => e.series.length < 300),
79
+ message: [
80
+ "👀 Series have < 300 datapoints. Consider:",
81
+ "",
82
+ "▶️ Using VueUiXy instead, if you need more options, or more customization possibilities."
83
+ ]
84
+ },
85
+ {
86
+ test: (e) => e.some((e) => e.series.length > 1e4),
87
+ message: [
88
+ "👀 The dataset has > 10_000 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
89
+ "",
90
+ "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance can be impacted. JS runtime might crash with > 100_000 datapoints."
91
+ ]
92
+ }
93
+ ]
94
+ });
95
+ let an = f(() => {
96
+ let e = H.value.title.text || "XY chart", t = X.value.end - X.value.start;
97
+ return `${e}. ${Y.value.filter((e) => !D.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`;
98
+ }), on = f(() => {
99
+ if (M.value === null) return "";
100
+ let e = M.value + X.value.start;
101
+ return `${z.value.values.slice(X.value.start, X.value.end)[M.value] ? I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[M.value]?.text : or.value[M.value]?.text : $.value[e]?.text ?? `Point ${e + 1}`}. ${Y.value.filter((e) => !D.value.includes(e.absoluteIndex)).map((e) => {
102
+ let t = e.series[M.value], n = t?.value ?? t ?? null;
103
+ return `${e.name}: ${n}`;
104
+ }).join(". ")}.`;
105
+ }), sn = f(() => F.value.useCursorPointer), cn = f(() => P.value.debug);
106
+ et(() => {
107
+ nn["chart-background"] && cn.value && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
108
+ });
109
+ let ln = f(() => te({
110
+ defaultConfig: {
111
+ userOptions: { show: !1 },
112
+ table: { show: !1 },
113
+ style: { chart: {
114
+ backgroundColor: "#99999930",
115
+ grid: {
116
+ x: {
117
+ axisColor: "#6A6A6A",
118
+ timeLabels: { show: !1 },
119
+ axisName: "",
120
+ horizontalLines: { color: "#6A6A6A" }
121
+ },
122
+ y: {
123
+ axisColor: "#6A6A6A",
124
+ axisLabels: { show: !1 },
125
+ axisName: "",
126
+ verticalLines: { color: "#6A6A6A" }
127
+ },
128
+ zeroLine: { color: "#6A6A6A" }
129
+ },
130
+ legend: { backgroundColor: "#99999930" },
131
+ paddingProportions: { left: .05 },
132
+ scale: {
133
+ max: null,
134
+ min: null
135
+ },
136
+ zoom: {
137
+ endIndex: null,
138
+ startIndex: null
139
+ }
140
+ } }
141
+ },
142
+ userConfig: P.value.skeletonConfig ?? {}
143
+ })), { loading: un, FINAL_DATASET: dn } = ye({
144
+ ...it(C),
145
+ FINAL_CONFIG: P,
146
+ prepareConfig: _n,
147
+ skeletonDataset: C.config?.skeletonDataset ?? [{
148
+ name: "",
149
+ series: [
150
+ 0,
151
+ 1,
152
+ 2,
153
+ 3,
154
+ 5,
155
+ 8,
156
+ 13,
157
+ 21,
158
+ 34,
159
+ 55,
160
+ 89,
161
+ 134
162
+ ],
163
+ type: "line",
164
+ smooth: !0,
165
+ color: "#BABABA"
166
+ }, {
167
+ name: "",
168
+ series: [
169
+ 0,
170
+ .5,
171
+ 1,
172
+ 1.5,
173
+ 2.5,
174
+ 4,
175
+ 6.5,
176
+ 10.5,
177
+ 17,
178
+ 27.5,
179
+ 44.5,
180
+ 67
181
+ ],
182
+ type: "bar",
183
+ color: "#AAAAAA"
184
+ }],
185
+ skeletonConfig: te({
186
+ defaultConfig: P.value,
187
+ userConfig: ln.value
188
+ })
189
+ }), { userOptionsVisible: fn, setUserOptionsVisibility: pn, keepUserOptionState: mn } = Re({ config: P.value }), { svgRef: U } = ze({ config: H.value.title });
190
+ function hn() {
191
+ pn(!0);
192
+ }
193
+ function gn() {
194
+ pn(!1), tn("selectX", {
195
+ dataset: null,
196
+ index: null,
197
+ indexLabel: null
198
+ }), E.value = null;
199
+ }
200
+ function _n() {
201
+ let e = xe({
202
+ userConfig: C.config,
203
+ defaultConfig: wt
204
+ }), t = {}, n = e.theme;
205
+ if (n) {
206
+ if (!Tt.value(e)) Et(e), t = e;
207
+ else {
208
+ let r = xe({
209
+ userConfig: Ve[n] || C.config,
210
+ defaultConfig: e
211
+ });
212
+ t = {
213
+ ...xe({
214
+ userConfig: C.config,
215
+ defaultConfig: r
216
+ }),
217
+ customPalette: e.customPalette.length ? e.customPalette : ee[n] || i
218
+ };
219
+ }
220
+ } else t = e;
221
+ return C.config && re(C.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), t.style.chart.grid.x.timeLabels = xe({
222
+ defaultConfig: t.style.chart.grid.x.timeLabels,
223
+ userConfig: C.config.style.chart.grid.y.timeLabels
224
+ })), t;
225
+ }
226
+ x(() => C.config, (e) => {
227
+ un.value || (P.value = _n()), fn.value = !F.value.showOnChartHover, Pr(), Ht.value += 1, Ut.value += 1, Wt.value += 1, W.value.showTable = P.value.table.show, W.value.showDataLabels = V.value.show, W.value.stacked = H.value.stacked, W.value.showTooltip = I.value.show;
228
+ }, { deep: !0 }), x(() => C.dataset, async (e) => {
229
+ !Array.isArray(e) || e.length === 0 || (await Xe(), U.value && !w.value && (w.value = U.value.getContext("2d", { willReadFrequently: !0 })), O.value = !0, k.value = !0, await Bn(), Yn(), Ht.value += 1, Ut.value += 1, Wt.value += 1);
230
+ }, { deep: !0 });
231
+ let vn = v(H.value.aspectRatio), { isPrinting: yn, isImaging: bn, generatePdf: xn, generateImage: Sn } = ve({
232
+ elementId: `xy_canvas_${Dt.value}`,
233
+ fileName: H.value.title.text || "vue-ui-xy-canvas",
234
+ options: F.value.print
235
+ }), W = v({
236
+ showTable: P.value.table.show,
237
+ showDataLabels: V.value.show,
238
+ stacked: H.value.stacked,
239
+ showTooltip: I.value.show
240
+ });
241
+ function Cn(e) {
242
+ Lt.value = e, It.value += 1;
243
+ }
244
+ let wn = f(() => de(P.value.customPalette)), Tn = f(() => D.value.length === J.value.length), G = f(() => J.value ? Math.max(...J.value.filter((e, t) => Tn.value ? !0 : !D.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
245
+ function En(e) {
246
+ j.value = e, _r();
247
+ }
248
+ let Dn = v(0), On = v(0);
249
+ function kn() {
250
+ if (!w.value || !z.value.show) return 0;
251
+ let e = $.value || [], t = X.value.start ?? 0, n = X.value.end ?? 0;
252
+ if (!Math.max(0, n - t)) return 0;
253
+ let r = Math.round(T.value / 40 * z.value.fontSizeRatio), i = `${z.value.bold ? "bold " : ""}${r}px ${P.value.style.fontFamily}`;
254
+ w.value.save(), w.value.font = i;
255
+ let a = 0;
256
+ for (let r = t; r < n; r += 1) {
257
+ let t = e[r]?.text ?? `${r + 1}`, n = w.value.measureText(String(t));
258
+ n.width > a && (a = n.width);
259
+ }
260
+ w.value.restore();
261
+ let o = (z.value.rotation || 0) * Math.PI / 180, s = r, c = Math.abs(Math.sin(o)) * a + Math.abs(Math.cos(o)) * s, l = z.value.offsetY || 1, u = T.value / l;
262
+ return Math.max(0, u + c + 4);
263
+ }
264
+ function An() {
265
+ Dn.value = kn();
266
+ }
267
+ function jn() {
268
+ On.value && cancelAnimationFrame(On.value), On.value = requestAnimationFrame(() => {
269
+ requestAnimationFrame(() => {
270
+ An();
271
+ });
272
+ });
273
+ }
274
+ $e(() => {
275
+ On.value && cancelAnimationFrame(On.value);
276
+ });
277
+ let K = f(() => {
278
+ let e = T.value - T.value * (H.value.paddingProportions.left + H.value.paddingProportions.right), t = At.value * H.value.paddingProportions.top, n = At.value * H.value.paddingProportions.bottom, r = Dn.value, i = At.value - n - r, a = At.value - (t + n) - r;
279
+ return {
280
+ canvasWidth: T.value,
281
+ canvasHeight: At.value,
282
+ left: T.value * H.value.paddingProportions.left,
283
+ top: t,
284
+ right: T.value - T.value * H.value.paddingProportions.right,
285
+ bottom: i,
286
+ width: e,
287
+ height: a,
288
+ slot: e / (X.value.end - X.value.start)
289
+ };
290
+ });
291
+ function Mn(e, t) {
292
+ return e / t;
293
+ }
294
+ function Nn({ hasAutoScale: e, series: t, min: n, max: r, scale: i, yOffset: a, individualHeight: o, stackIndex: s = null }) {
295
+ return t.map((t, n) => {
296
+ let r = i.min < 0 ? Math.abs(i.min) : 0, c = Mn(t + r, r + i.max), l, u;
297
+ e && (l = i.min, u = Mn(t - l, i.max - l));
298
+ let ee = 0;
299
+ return ee = s === null ? K.value.bottom - K.value.height * (e ? u : c) : K.value.bottom - a - o * (e ? u : c), {
300
+ x: K.value.left + K.value.slot * n + K.value.slot / 2,
301
+ y: ee,
302
+ value: t
303
+ };
304
+ });
305
+ }
306
+ let q = f(() => {
307
+ let e = H.value.scale.min === null ? Math.min(...J.value.filter((e, t) => !D.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(X.value.start, X.value.end))) : H.value.scale.min, t = H.value.scale.max === null ? Math.max(...J.value.filter((e, t) => !D.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(X.value.start, X.value.end))) : H.value.scale.max, n = ne(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, H.value.scale.ticks), r = n.min < 0 ? Math.abs(n.min) : 0, i = K.value.bottom - K.value.height * (r / (n.max + r));
308
+ return {
309
+ absoluteMin: r,
310
+ max: t,
311
+ min: e,
312
+ scale: n,
313
+ yLabels: n.ticks.map((e) => ({
314
+ y: K.value.bottom - K.value.height * ((e + r) / (n.max + r)),
315
+ x: K.value.left - 8,
316
+ value: e
317
+ })),
318
+ zero: i
319
+ };
320
+ }), Pn = f(() => Y.value.map((e) => `
321
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
322
+ <svg viewBox="0 0 10 10" height="12" width="12">
323
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
324
+ </svg>
325
+ <span>${e.name ? e.name + ": " : ""}</span>
326
+ <span>${ie(V.value.formatter, e.series[E.value] ?? "-", u({
327
+ p: e.prefix || "",
328
+ v: e.series[E.value] ?? "-",
329
+ s: e.suffix || "",
330
+ r: e.rounding || 0
331
+ }), {
332
+ datapoint: e,
333
+ seriesIndex: E.value
334
+ })}</span>
335
+ </div>
336
+ `)), Fn = f(() => H.value.line.cutNullValues), J = f(() => dn.value.map((e, t) => ({
337
+ ...e,
338
+ series: a({
339
+ data: l(e.series, [], Fn.value),
340
+ threshold: P.value.downsample.threshold
341
+ }),
342
+ absoluteIndex: t,
343
+ color: s(e.color || wn.value[t] || i[t] || i[t % i.length])
344
+ }))), In = f(() => {
345
+ if (!H.value.zoom.minimap.show) return [];
346
+ let e = J.value.filter((e) => !D.value.includes(e.absoluteIndex)), t = Math.max(...e.map((e) => e.series.length)), n = [];
347
+ for (let r = 0; r < t; r += 1) n.push(e.map((e) => e.series[r] || 0).reduce((e, t) => (e || 0) + (t || 0), 0));
348
+ let r = Math.min(...n);
349
+ return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
350
+ }), Ln = f(() => H.value.zoom.minimap.show ? J.value.map((e) => ({
351
+ ...e,
352
+ isVisible: !D.value.includes(e.absoluteIndex)
353
+ })) : []);
354
+ x(G, (e) => {
355
+ e && Bn();
356
+ });
357
+ let Y = f(() => ce(J.value.filter((e, t) => !D.value.includes(e.absoluteIndex))).map((e, t) => ({
358
+ ...e,
359
+ series: e.series.slice(X.value.start, X.value.end)
360
+ })).map((e, t) => {
361
+ let n = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, r = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
362
+ n === r && (n = n >= 0 ? r - 1 : n, r = r >= 0 ? r : n + 1);
363
+ let i = {
364
+ ratios: e.series.filter((e) => ![null, void 0].includes(e)).map((e) => (e - n) / (r - n)),
365
+ valueMin: n,
366
+ valueMax: r
367
+ }, a = e.scaleSteps || H.value.scale.ticks, o;
368
+ o = e.autoScaling ? ne(i.valueMin, i.valueMax, a) : ne(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, a);
369
+ let s = W.value.stacked ? K.value.height * (1 - e.cumulatedStackRatio) : 0, c = W.value.stacked ? K.value.height / H.value.stackGap : 0, l = W.value.stacked ? K.value.height * e.stackRatio - c : K.value.height, u = o.min < 0 ? Math.abs(o.min) : 0, ee;
370
+ ee = e.autoScaling && W.value.stacked && r <= 0 ? K.value.bottom - s - l : K.value.bottom - s - l * (u / (o.max + u));
371
+ let te = o.ticks.map((e, t) => ({
372
+ y: K.value.bottom - s - l * (t / (o.ticks.length - 1)),
373
+ x: K.value.left - 8,
374
+ value: e
375
+ })), re = Nn({
376
+ hasAutoScale: W.value.stacked && e.autoScaling,
377
+ series: e.series,
378
+ min: W.value.stacked ? n : q.value.min,
379
+ max: W.value.stacked ? r : q.value.max,
380
+ scale: W.value.stacked ? o : q.value.scale,
381
+ yOffset: s,
382
+ individualHeight: l,
383
+ stackIndex: W.value.stacked ? t : null
384
+ });
385
+ return {
386
+ ...e,
387
+ coordinatesLine: re,
388
+ min: n,
389
+ max: r,
390
+ localScale: o,
391
+ localZero: ee,
392
+ localMin: u,
393
+ localYLabels: te,
394
+ yOffset: s,
395
+ individualHeight: l
396
+ };
397
+ })), X = v({
398
+ start: 0,
399
+ end: G.value
400
+ }), Z = v({
401
+ start: 0,
402
+ end: G.value
403
+ }), Rn = v(null);
404
+ function zn() {
405
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
406
+ }
407
+ $e(() => {
408
+ Rn.value && cancelAnimationFrame(Rn.value);
409
+ });
410
+ async function Bn() {
411
+ Un(), await Xe(), Rn.value && cancelAnimationFrame(Rn.value), Rn.value = requestAnimationFrame(async () => {
412
+ await zn(), Un();
413
+ });
414
+ }
415
+ let Vn = f(() => H.value.zoom.preview.enable && (Z.value.start !== X.value.start || Z.value.end !== X.value.end));
416
+ function Hn(e, t) {
417
+ Z.value[e] = t;
418
+ }
419
+ async function Un() {
420
+ if (!Jt.value) {
421
+ Jt.value = !0;
422
+ try {
423
+ let { startIndex: e, endIndex: t } = H.value.zoom, n = Math.max(...J.value.map((e) => e.series.length)), r = e ?? 0, i = t == null ? n : Math.min(Kn(t + 1), n);
424
+ Xt.value = !0, X.value.start = r, X.value.end = i, Z.value.start = r, Z.value.end = i, qn(), Yt.value = !0, await Xe(), Bt.value && (Bt.value.setStartValue(X.value.start), Bt.value.setEndValue(X.value.end));
425
+ } finally {
426
+ queueMicrotask(() => {
427
+ Xt.value = !1;
428
+ }), Jt.value = !1;
429
+ }
430
+ }
431
+ }
432
+ function Wn(e) {
433
+ Jt.value || Xt.value || e !== X.value.start && (X.value.start = e, Z.value.start = e, qn());
434
+ }
435
+ function Gn(e) {
436
+ if (Jt.value || Xt.value) return;
437
+ let t = Kn(e);
438
+ t !== X.value.end && (X.value.end = t, Z.value.end = t, qn());
439
+ }
440
+ function Kn(e) {
441
+ let t = G.value;
442
+ return e > t ? t : e < 0 || e < X.value.start ? H.value.zoom.startIndex === null ? 1 : H.value.zoom.startIndex + 1 : e;
443
+ }
444
+ function qn() {
445
+ let e = Math.max(1, Math.max(...J.value.map((e) => e.series.length))), t = Math.max(0, Math.min(X.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(X.value.end ?? e, e));
446
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), X.value = {
447
+ start: t,
448
+ end: n
449
+ }, Z.value.start = t, Z.value.end = n, Bt.value && (Bt.value.setStartValue(t), Bt.value.setEndValue(n));
450
+ }
451
+ let Jn = f(() => Y.value.filter((e) => [
452
+ "line",
453
+ "plot",
454
+ void 0
455
+ ].includes(e.type))), Q = f(() => Y.value.filter((e) => e.type === "bar"));
456
+ function Yn() {
457
+ if (!U.value || !kt.value) return;
458
+ let e = kt.value.offsetWidth, t = kt.value.offsetHeight;
459
+ U.value.width = e * Pt.value * 2, U.value.height = t * Pt.value * 2, T.value = e * Pt.value * 2, At.value = t * Pt.value * 2, w.value?.scale(Pt.value, Pt.value), _r();
460
+ }
461
+ x(N, async (e) => {
462
+ if (!e) {
463
+ Ft.value = null, jt.value = !1, E.value = null, A.value = null;
464
+ return;
465
+ }
466
+ await Xe(), U.value && !w.value && (w.value = U.value.getContext("2d", { willReadFrequently: !0 })), O.value = !0, k.value = !0, await Bn(), Yn(), _r();
467
+ });
468
+ function Xn() {
469
+ if (w.value && (w.value.clearRect(0, 0, 1e4, 1e4), w.value.fillStyle = H.value.backgroundColor, w.value.fillRect(0, 0, K.value.canvasWidth, K.value.canvasHeight), N.value)) {
470
+ if (W.value.stacked) L.value.show && X.value.end - X.value.start < L.value.hideUnderXLength ? Y.value.forEach((e) => {
471
+ for (let t = 0; t < X.value.end - X.value.start + 1; t += 1) d(w.value, [{
472
+ x: K.value.left + K.value.slot * t,
473
+ y: K.value.bottom - e.yOffset - e.individualHeight
474
+ }, {
475
+ x: K.value.left + K.value.slot * t,
476
+ y: K.value.bottom - e.yOffset
477
+ }], { color: L.value.color });
478
+ }) : L.value.show && X.value.end - X.value.start >= L.value.hideUnderXLength && Y.value.forEach((e) => {
479
+ for (let t = X.value.start; t < X.value.end; t += 1) t % Math.floor((X.value.end - X.value.start) / rn.value.modulo) === 0 && d(w.value, [{
480
+ x: K.value.left + K.value.slot * (t - X.value.start) + K.value.slot / 2,
481
+ y: K.value.bottom - e.yOffset - e.individualHeight
482
+ }, {
483
+ x: K.value.left + K.value.slot * (t - X.value.start) + K.value.slot / 2,
484
+ y: K.value.bottom - e.yOffset
485
+ }], { color: L.value.color });
486
+ }), rn.value.show && (rn.value.alternate ? Y.value.forEach((e) => {
487
+ e.localYLabels.forEach((t, n) => {
488
+ n < e.localYLabels.length - 1 && Me(w.value, [
489
+ {
490
+ x: K.value.left,
491
+ y: t.y
492
+ },
493
+ {
494
+ x: K.value.right,
495
+ y: t.y
496
+ },
497
+ {
498
+ x: K.value.right,
499
+ y: e.localYLabels[n + 1].y
500
+ },
501
+ {
502
+ x: K.value.left,
503
+ y: e.localYLabels[n + 1].y
504
+ }
505
+ ], {
506
+ fillColor: n % 2 == 0 ? "transparent" : c(H.value.grid.x.horizontalLines.color, H.value.grid.x.horizontalLines.opacity),
507
+ strokeColor: "transparent"
508
+ });
509
+ });
510
+ }) : Y.value.forEach((e) => {
511
+ e.localYLabels.slice(X.value.start, X.value.end).forEach((e) => {
512
+ d(w.value, [{
513
+ x: K.value.left,
514
+ y: e.y
515
+ }, {
516
+ x: K.value.right,
517
+ y: e.y
518
+ }], { color: rn.value.color });
519
+ });
520
+ })), B.value.zeroLine.show && Y.value.forEach((e) => {
521
+ d(w.value, [{
522
+ x: K.value.left,
523
+ y: e.localZero
524
+ }, {
525
+ x: K.value.right,
526
+ y: e.localZero
527
+ }], {
528
+ color: B.value.zeroLine.color,
529
+ lineDash: B.value.zeroLine.dashed ? [10, 10] : [0, 0]
530
+ });
531
+ }), R.value.show && Y.value.forEach((e) => {
532
+ d(w.value, [{
533
+ x: K.value.left,
534
+ y: K.value.bottom - e.yOffset
535
+ }, {
536
+ x: K.value.left,
537
+ y: K.value.bottom - e.yOffset - e.individualHeight
538
+ }], { color: e.color }), d(w.value, [{
539
+ x: K.value.right,
540
+ y: K.value.bottom - e.yOffset
541
+ }, {
542
+ x: K.value.right,
543
+ y: K.value.bottom - e.yOffset - e.individualHeight
544
+ }], { color: e.color });
545
+ }), Y.value.forEach((e) => {
546
+ Ee(w.value, e.name, T.value / 35, K.value.bottom - e.yOffset - e.individualHeight / 2, {
547
+ align: "center",
548
+ rotation: -90,
549
+ color: e.color,
550
+ font: `${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`
551
+ });
552
+ });
553
+ else {
554
+ if (L.value.show && X.value.end - X.value.start < L.value.hideUnderXLength) for (let e = 0; e < X.value.end - X.value.start + 1; e += 1) d(w.value, [{
555
+ x: K.value.left + K.value.slot * e,
556
+ y: K.value.top
557
+ }, {
558
+ x: K.value.left + K.value.slot * e,
559
+ y: K.value.bottom
560
+ }], { color: L.value.color });
561
+ else if (L.value.show && X.value.end - X.value.start >= L.value.hideUnderXLength) for (let e = X.value.start; e < X.value.end; e += 1) e % Math.floor((X.value.end - X.value.start) / z.value.modulo) === 0 && d(w.value, [{
562
+ x: K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2,
563
+ y: K.value.top
564
+ }, {
565
+ x: K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2,
566
+ y: K.value.bottom
567
+ }], { color: L.value.color });
568
+ rn.value.show && (rn.value.alternate ? q.value.yLabels.forEach((e, t) => {
569
+ t < q.value.yLabels.length - 1 && Me(w.value, [
570
+ {
571
+ x: K.value.left,
572
+ y: e.y
573
+ },
574
+ {
575
+ x: K.value.right,
576
+ y: e.y
577
+ },
578
+ {
579
+ x: K.value.right,
580
+ y: q.value.yLabels[t + 1].y
581
+ },
582
+ {
583
+ x: K.value.left,
584
+ y: q.value.yLabels[t + 1].y
585
+ }
586
+ ], {
587
+ fillColor: t % 2 == 0 ? "transparent" : c(H.value.grid.x.horizontalLines.color, H.value.grid.x.horizontalLines.opacity),
588
+ strokeColor: "transparent"
589
+ });
590
+ }) : q.value.yLabels.forEach((e) => {
591
+ d(w.value, [{
592
+ x: K.value.left,
593
+ y: e.y
594
+ }, {
595
+ x: K.value.right,
596
+ y: e.y
597
+ }], { color: rn.value.color });
598
+ })), B.value.y.showAxis && d(w.value, [{
599
+ x: K.value.left,
600
+ y: K.value.top
601
+ }, {
602
+ x: K.value.left,
603
+ y: K.value.bottom
604
+ }], {
605
+ color: B.value.y.axisColor,
606
+ lineWidth: B.value.y.axisThickness
607
+ }), B.value.x.showAxis && d(w.value, [{
608
+ x: K.value.left,
609
+ y: K.value.bottom
610
+ }, {
611
+ x: K.value.right,
612
+ y: K.value.bottom
613
+ }], {
614
+ color: B.value.x.axisColor,
615
+ lineWidth: B.value.x.axisThickness
616
+ }), B.value.zeroLine.show && d(w.value, [{
617
+ x: K.value.left,
618
+ y: q.value.zero
619
+ }, {
620
+ x: K.value.right,
621
+ y: q.value.zero
622
+ }], {
623
+ color: B.value.zeroLine.color,
624
+ lineDash: B.value.zeroLine.dashed ? [10, 10] : [0, 0]
625
+ });
626
+ }
627
+ B.value.y.axisName && Ee(w.value, B.value.y.axisName, T.value - T.value / 40 * R.value.fontSizeRatio * 1.2, K.value.bottom - K.value.height / 2, {
628
+ font: `${R.value.bold ? "bold " : ""}${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
629
+ color: H.value.color,
630
+ align: "center",
631
+ rotation: 90
632
+ }), B.value.x.axisName && Ee(w.value, B.value.x.axisName, T.value / 2, At.value, {
633
+ font: `${R.value.bold ? "bold " : ""}${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
634
+ color: H.value.color,
635
+ align: "center"
636
+ });
637
+ }
638
+ }
639
+ function Zn(e) {
640
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) {
641
+ let n = (E.value === t || j.value === t ? T.value / 150 : H.value.line.plots.show || e.type === "plot" ? T.value / 200 : 0) * H.value.line.plots.radiusRatio;
642
+ ke(w.value, {
643
+ x: e.coordinatesLine[t].x,
644
+ y: e.coordinatesLine[t].y
645
+ }, n, {
646
+ color: H.value.backgroundColor,
647
+ fillStyle: e.color,
648
+ strokeColor: "transparent"
649
+ });
650
+ }
651
+ }
652
+ function Qn() {
653
+ Y.value.forEach((e) => {
654
+ e.showYMarker && yr(e) && Ee(w.value, ie(V.value.formatter, yr(e).value, u({
655
+ p: e.prefix || R.value.prefix || "",
656
+ v: yr(e).value,
657
+ s: e.suffix || R.value.suffix || "",
658
+ r: e.rounding || R.value.rounding || 0
659
+ }), {
660
+ datapoint: yr(e),
661
+ seriesIndex: null
662
+ }), K.value.left - 8 + R.value.offsetX, yr(e).y, {
663
+ align: "right",
664
+ font: `${R.value.bold ? "bold " : ""}${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
665
+ color: e.color
666
+ });
667
+ });
668
+ }
669
+ function $n() {
670
+ R.value.show && (W.value.stacked ? Y.value.forEach((e) => {
671
+ e.localYLabels.forEach((t, n) => {
672
+ Ee(w.value, ie(V.value.formatter, t.value, u({
673
+ p: e.prefix || B.value.y.axisLabels.prefix || "",
674
+ v: t.value,
675
+ s: e.suffix || B.value.y.axisLabels.suffix || "",
676
+ r: e.rounding || B.value.y.axisLabels.rounding || 0
677
+ }), {
678
+ datapoint: t,
679
+ seriesIndex: n
680
+ }), t.x + R.value.offsetX, t.y, {
681
+ align: "right",
682
+ font: `${R.value.bold ? "bold " : ""}${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
683
+ color: e.color,
684
+ globalAlpha: e.showYMarker && ![null, void 0].includes(E.value ?? j.value) ? .2 : 1
685
+ });
686
+ });
687
+ }) : q.value.yLabels.forEach((e, t) => {
688
+ Ee(w.value, ie(V.value.formatter, e.value, u({
689
+ p: R.value.prefix || "",
690
+ v: e.value,
691
+ s: R.value.suffix || "",
692
+ r: R.value.rounding || 0
693
+ }), {
694
+ datapoint: e,
695
+ seriesIndex: t
696
+ }), e.x + R.value.offsetX, e.y, {
697
+ align: "right",
698
+ font: `${R.value.bold ? "bold " : ""}${Math.round(T.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
699
+ color: R.value.color,
700
+ globalAlpha: Y.value.some((e) => e.showYMarker) && ![null, void 0].includes(E.value ?? j.value) ? .2 : 1
701
+ });
702
+ }));
703
+ }
704
+ function er(e) {
705
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) Ee(w.value, ie(V.value.formatter, e.coordinatesLine[t].value, u({
706
+ p: e.prefix || "",
707
+ v: e.coordinatesLine[t].value,
708
+ s: e.suffix || "",
709
+ r: e.rounding || 0
710
+ }), {
711
+ datapoint: e.coordinatesLine[t],
712
+ seriesIndex: t
713
+ }), e.coordinatesLine[t].x, e.coordinatesLine[t].y + V.value.offsetY, {
714
+ align: "center",
715
+ font: `${V.value.bold ? "bold " : ""}${Math.round(T.value / 40 * V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
716
+ color: V.value.useSerieColor ? e.color : V.value.color,
717
+ strokeColor: H.value.backgroundColor,
718
+ lineWidth: .5
719
+ });
720
+ }
721
+ let $ = v([]), tr = 0;
722
+ ot(() => {
723
+ let e = ++tr;
724
+ (async () => {
725
+ let t = await ge({
726
+ values: z.value.values,
727
+ maxDatapoints: G.value,
728
+ formatter: z.value.datetimeFormatter,
729
+ start: 0,
730
+ end: G.value
731
+ });
732
+ e === tr && ($.value = t);
733
+ })();
734
+ }), ot(() => {
735
+ z.value.show, z.value.rotation, z.value.offsetY, z.value.fontSizeRatio, z.value.bold, X.value.start, X.value.end, T.value, At.value, ($.value || []).map((e) => e?.text ?? "").join("|"), jn();
736
+ }, { flush: "post" });
737
+ let nr = v({
738
+ months: [],
739
+ shortMonths: [],
740
+ days: [],
741
+ shortDays: []
742
+ }), rr = 0;
743
+ ot(() => {
744
+ let e = ++rr, t = z.value.datetimeFormatter;
745
+ (async () => {
746
+ let n = await he(t.locale).catch(() => he("en"));
747
+ e === rr && (nr.value = n.data);
748
+ })();
749
+ });
750
+ let ir = f(() => {
751
+ let e = z.value.datetimeFormatter, t = me({
752
+ useUTC: e.useUTC,
753
+ locale: nr.value,
754
+ januaryAsYear: e.januaryAsYear
755
+ });
756
+ return (e, n) => {
757
+ let r = z.value.values?.[e];
758
+ return r == null ? "" : t.formatDate(new Date(r), n);
759
+ };
760
+ }), ar = f(() => (z.value.values || []).map((e, t) => ({
761
+ text: ir.value(t, H.value.zoom.timeFormat),
762
+ absoluteIndex: t
763
+ }))), or = f(() => (z.value.values || []).map((e, t) => ({
764
+ text: ir.value(t, I.value.timeFormat),
765
+ absoluteIndex: t
766
+ })));
767
+ function sr() {
768
+ for (let e = X.value.start; e < X.value.end; e += 1) (X.value.end - X.value.start < z.value.modulo || X.value.end - X.value.start >= z.value.modulo && (e % Math.floor((X.value.end - X.value.start) / z.value.modulo) === 0 || (e === E.value + X.value.start || e === j.value) && z.value.showMarker)) && Ee(w.value, $.value[e] ? $.value[e].text : e + 1, K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2, K.value.bottom + T.value / z.value.offsetY, {
769
+ align: z.value.rotation === 0 ? "center" : z.value.rotation > 0 ? "left" : "right",
770
+ font: `${z.value.bold ? "bold " : ""}${Math.round(T.value / 40 * z.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
771
+ color: z.value.showMarker ? c(z.value.color, E.value !== null || j.value !== null ? E.value + X.value.start === e || j.value === e ? 100 : 20 : 100) : z.value.color,
772
+ rotation: z.value.rotation
773
+ });
774
+ }
775
+ function cr() {
776
+ d(w.value, [{
777
+ x: K.value.left + K.value.slot * (E.value ?? j.value) + K.value.slot / 2,
778
+ y: K.value.top
779
+ }, {
780
+ x: K.value.left + K.value.slot * (E.value ?? j.value) + K.value.slot / 2,
781
+ y: K.value.bottom
782
+ }], {
783
+ color: H.value.selector.color,
784
+ lineDash: H.value.selector.dashed ? [8, 8] : [0, 0],
785
+ lineWidth: 2,
786
+ linceCap: "round"
787
+ });
788
+ }
789
+ function lr() {
790
+ A.value && d(w.value, [{
791
+ x: K.value.left,
792
+ y: A.value
793
+ }, {
794
+ x: K.value.right,
795
+ y: A.value
796
+ }], {
797
+ color: H.value.selector.color,
798
+ lineDash: H.value.selector.dashed ? [8, 8] : [0, 0],
799
+ lineWidth: 2,
800
+ linceCap: "round"
801
+ });
802
+ }
803
+ function ur() {
804
+ Q.value.forEach((e, t) => {
805
+ for (let n = 0; n < e.coordinatesLine.length; n += 1) Me(w.value, [
806
+ {
807
+ x: K.value.left + K.value.slot * n + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * t - (t === 0 ? 0 : K.value.slot / (5 * Q.value.length) * t)),
808
+ y: W.value.stacked ? e.localZero : q.value.zero
809
+ },
810
+ {
811
+ x: K.value.left + K.value.slot * n + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * t - (t === 0 ? 0 : K.value.slot / (5 * Q.value.length) * t)) + K.value.slot * .8 / (W.value.stacked ? 1 : Q.value.length),
812
+ y: W.value.stacked ? e.localZero : q.value.zero
813
+ },
814
+ {
815
+ x: K.value.left + K.value.slot * n + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * t - (t === 0 ? 0 : K.value.slot / (5 * Q.value.length) * t)) + K.value.slot * .8 / (W.value.stacked ? 1 : Q.value.length),
816
+ y: e.coordinatesLine[n].y
817
+ },
818
+ {
819
+ x: K.value.left + K.value.slot * n + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * t - (t === 0 ? 0 : K.value.slot / (5 * Q.value.length) * t)),
820
+ y: e.coordinatesLine[n].y
821
+ }
822
+ ], {
823
+ strokeColor: H.value.backgroundColor,
824
+ gradient: {
825
+ type: "linear",
826
+ start: {
827
+ x: e.coordinatesLine[n].x,
828
+ y: e.coordinatesLine[n].y
829
+ },
830
+ end: {
831
+ x: e.coordinatesLine[n].x,
832
+ y: W.value.stacked ? e.localZero : q.value.zero
833
+ },
834
+ stops: [{
835
+ offset: 0,
836
+ color: e.color
837
+ }, {
838
+ offset: 1,
839
+ color: H.value.bar.gradient.show ? ae(e.color, .5) : e.color
840
+ }]
841
+ }
842
+ }), W.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Ee(w.value, ie(V.value.formatter, e.coordinatesLine[n].value, u({
843
+ p: e.prefix || "",
844
+ v: e.coordinatesLine[n].value,
845
+ s: e.suffix || "",
846
+ r: e.rounding || 0
847
+ }), {
848
+ datapoint: e.coordinatesLine[n],
849
+ seriesIndex: n
850
+ }), K.value.left + K.value.slot * n + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * t - (t === 0 ? 0 : K.value.slot / (5 * Q.value.length) * t)) + K.value.slot * .4 / (W.value.stacked ? 1 : Q.value.length), (e.coordinatesLine[n].value < 0 ? W.value.stacked ? e.localZero : q.value.zero : e.coordinatesLine[n].y) + V.value.offsetY, {
851
+ align: "center",
852
+ font: `${Math.round(T.value / 40 * V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
853
+ color: V.value.useSerieColor ? e.color : V.value.color,
854
+ strokeColor: H.value.backgroundColor,
855
+ lineWidth: .8
856
+ });
857
+ });
858
+ }
859
+ function dr(e, t) {
860
+ let n = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), r = [], i = [], a = [];
861
+ for (let e = 0; e < n.length; e += 1) {
862
+ let o = n[e];
863
+ if (o) a.push(o);
864
+ else {
865
+ if (a.length >= 2) {
866
+ let e = a[0], n = a[a.length - 1];
867
+ r.push([
868
+ {
869
+ x: e.x,
870
+ y: t
871
+ },
872
+ ...a,
873
+ {
874
+ x: n.x,
875
+ y: t
876
+ }
877
+ ]);
878
+ } else a.length === 1 && i.push(a[0]);
879
+ a = [];
880
+ }
881
+ }
882
+ if (a.length >= 2) {
883
+ let e = a[0], n = a[a.length - 1];
884
+ r.push([
885
+ {
886
+ x: e.x,
887
+ y: t
888
+ },
889
+ ...a,
890
+ {
891
+ x: n.x,
892
+ y: t
893
+ }
894
+ ]);
895
+ } else a.length === 1 && i.push(a[0]);
896
+ return {
897
+ polygons: r,
898
+ singles: i
899
+ };
900
+ }
901
+ function fr(e) {
902
+ let t = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), n = [], r = [];
903
+ for (let e = 0; e < t.length; e += 1) {
904
+ let i = t[e];
905
+ i ? r.push(i) : (r.length >= 2 && n.push(r), r = []);
906
+ }
907
+ return r.length >= 2 && n.push(r), n;
908
+ }
909
+ function pr(e) {
910
+ if (Fn.value) {
911
+ let t = fr(e);
912
+ for (let n of t) d(w.value, n, {
913
+ color: e.color,
914
+ lineWidth: 3
915
+ });
916
+ } else d(w.value, e.coordinatesLine, {
917
+ color: e.color,
918
+ lineWidth: 3
919
+ });
920
+ }
921
+ function mr(e) {
922
+ let t = !!Fn.value;
923
+ if (e.useArea) {
924
+ let n = W.value.stacked ? e.localZero : q.value.zero;
925
+ if (t) {
926
+ let { polygons: t, singles: r } = dr(e, n);
927
+ for (let n of t) Ae(w.value, n, {
928
+ fillColor: c(e.color, H.value.area.opacity),
929
+ strokeColor: "transparent"
930
+ });
931
+ let i = T.value / 200 * H.value.line.plots.radiusRatio;
932
+ for (let t of r) ke(w.value, {
933
+ x: t.x,
934
+ y: t.y
935
+ }, i, {
936
+ color: H.value.backgroundColor,
937
+ fillStyle: e.color,
938
+ strokeColor: "transparent"
939
+ });
940
+ } else {
941
+ let t = {
942
+ x: e.coordinatesLine[0].x,
943
+ y: n
944
+ }, r = {
945
+ x: e.coordinatesLine.at(-1).x,
946
+ y: n
947
+ };
948
+ Ae(w.value, [
949
+ t,
950
+ ...e.coordinatesLine,
951
+ r
952
+ ], {
953
+ fillColor: c(e.color, H.value.area.opacity),
954
+ strokeColor: "transparent"
955
+ });
956
+ }
957
+ pr(e);
958
+ return;
959
+ }
960
+ pr(e);
961
+ }
962
+ function hr() {
963
+ Y.value.forEach((e, t) => {
964
+ d(w.value, [{
965
+ x: K.value.left,
966
+ y: K.value.bottom - e.yOffset
967
+ }, {
968
+ x: K.value.right,
969
+ y: K.value.bottom - e.yOffset
970
+ }], {
971
+ color: rn.value.color,
972
+ lineWidth: 1
973
+ });
974
+ });
975
+ }
976
+ function gr() {
977
+ let { left: e, top: t, width: n, height: r } = K.value, i = X.value.start, a = X.value.end - i, o = n / a, s = Z.value.start - i, c = Z.value.end - i, l = Math.max(0, Math.min(a, s)), u = Math.max(0, Math.min(a, c));
978
+ Me(w.value, [
979
+ {
980
+ x: e + l * o,
981
+ y: t
982
+ },
983
+ {
984
+ x: e + l * o + (u - l) * o,
985
+ y: t
986
+ },
987
+ {
988
+ x: e + l * o + (u - l) * o,
989
+ y: t + r
990
+ },
991
+ {
992
+ x: e + l * o,
993
+ y: t + r
994
+ }
995
+ ], {
996
+ fillColor: H.value.zoom.preview.fill,
997
+ strokeColor: H.value.zoom.preview.stroke,
998
+ lineDash: [
999
+ ,
1000
+ ,
1001
+ ,
1002
+ ,
1003
+ ].fill(H.value.zoom.preview.strokeDasharray),
1004
+ lineWidth: H.value.zoom.preview.strokeWidth
1005
+ });
1006
+ }
1007
+ function _r() {
1008
+ !N.value || !U.value || !w.value || (Xn(), O.value ? ((E.value !== null || j.value !== null) && H.value.selector.show && cr(), ur(), W.value.stacked && B.value.x.showAxis && hr(), Jn.value.forEach((e) => {
1009
+ (e.type === "line" || !e.type) && mr(e), k.value && (Zn(e), W.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && er(e));
1010
+ }), U.value && (Ft.value = je(U.value))) : (Ft.value && (w.value.clearRect(0, 0, 1e4, 1e4), w.value.drawImage(Ft.value, 0, 0)), (E.value !== null || j.value !== null) && H.value.selector.show && cr(), (E.value !== null || j.value !== null) && Y.value.forEach((e) => {
1011
+ let t = E.value ?? j.value, n = e.coordinatesLine[t];
1012
+ (e.type === "line" || !e.type || e.type === "plot") && n && Number.isFinite(n.x) && Number.isFinite(n.y) && ke(w.value, {
1013
+ x: n.x,
1014
+ y: n.y
1015
+ }, T.value / 150 * H.value.line.plots.radiusRatio, {
1016
+ color: H.value.backgroundColor,
1017
+ fillStyle: e.color,
1018
+ strokeColor: "transparent"
1019
+ });
1020
+ })), z.value.show && sr(), H.value.selector.show && H.value.selector.showHorizontalSelector && lr(), $n(), Qn(), H.value.zoom.preview.enable && (X.value.start !== Z.value.start || X.value.end !== Z.value.end) && gr(), O.value = !1);
1021
+ }
1022
+ let vr = De(() => {
1023
+ k.value = !0, Yn();
1024
+ }, G.value > 200 ? 10 : 1, !k.value);
1025
+ function yr(e) {
1026
+ if ([null, void 0].includes(E.value ?? j.value) || !e.coordinatesLine[E.value ?? j.value]) return !1;
1027
+ let { y: t, value: n } = e.coordinatesLine[E.value ?? j.value];
1028
+ return {
1029
+ y: t,
1030
+ value: n
1031
+ };
1032
+ }
1033
+ function br(e) {
1034
+ if (!N.value || !U.value || Tn.value) return;
1035
+ let { left: t, top: r } = U.value.getBoundingClientRect(), i = e.clientX - t;
1036
+ if (A.value = (e.clientY - r) * 2, (A.value < K.value.top || A.value > K.value.bottom) && (A.value = null), i * 2 < K.value.left || i * 2 > K.value.right) {
1037
+ Tr();
1038
+ return;
1039
+ }
1040
+ let a = i * 2 - K.value.left, o = Math.floor(a / K.value.slot);
1041
+ if (E.value = o, M.value = o, jt.value = !0, Qt.value = !1, !k.value) return;
1042
+ let s = "", c = I.value.customFormat, l = Y.value.map((e) => ({
1043
+ shape: e.shape || null,
1044
+ name: e.name,
1045
+ color: e.color,
1046
+ type: e.type || "line",
1047
+ value: e.series.find((e, t) => t === E.value)
1048
+ }));
1049
+ Nt.value = {
1050
+ timeLabel: z.value.values.slice(X.value.start, X.value.end)[E.value] ? I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[E.value]?.text : or.value[E.value]?.text : "",
1051
+ datapoint: l,
1052
+ seriesIndex: E.value,
1053
+ series: Y.value,
1054
+ config: P.value
1055
+ }, kr({
1056
+ seriesIndex: E.value,
1057
+ datapoint: l
1058
+ }), n(c) && oe(() => c({
1059
+ seriesIndex: E.value,
1060
+ datapoint: l,
1061
+ series: Y.value,
1062
+ config: P.value
1063
+ })) ? Mt.value = c({
1064
+ seriesIndex: E.value,
1065
+ datapoint: l,
1066
+ series: Y.value,
1067
+ config: P.value
1068
+ }) : (z.value.values.slice(X.value.start, X.value.end)[E.value] ? s += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[E.value]?.text : or.value[E.value]?.text}</div>` : s += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[E.value + X.value.start]?.text ?? ""}</div>`, s += Pn.value.join(""), Mt.value = s), k.value = !1;
1069
+ }
1070
+ function xr(e) {
1071
+ return Y.value.map((t) => ({
1072
+ shape: t.shape || null,
1073
+ name: t.name,
1074
+ color: t.color,
1075
+ type: t.type || "line",
1076
+ value: t.series.find((t, n) => n === e)
1077
+ }));
1078
+ }
1079
+ function Sr(e) {
1080
+ let t = "", r = I.value.customFormat, i = xr(e);
1081
+ return kr({
1082
+ seriesIndex: e,
1083
+ datapoint: i
1084
+ }), n(r) && oe(() => r({
1085
+ seriesIndex: e,
1086
+ datapoint: i,
1087
+ series: Y.value,
1088
+ config: P.value
1089
+ })) ? r({
1090
+ seriesIndex: e,
1091
+ datapoint: i,
1092
+ series: Y.value,
1093
+ config: P.value
1094
+ }) : (z.value.values.slice(X.value.start, X.value.end)[e] ? t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[e]?.text : or.value[e]?.text}</div>` : t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[e + X.value.start]?.text ?? ""}</div>`, t += Pn.value.join(""), t);
1095
+ }
1096
+ function Cr(e) {
1097
+ if (!U.value || !K.value?.slot) return;
1098
+ let t = U.value.getBoundingClientRect(), n = t.width / K.value.canvasWidth, r = t.height / K.value.canvasHeight, i = K.value.left + K.value.slot * e + K.value.slot / 2, a = K.value.top + K.value.height / 2;
1099
+ en.value = {
1100
+ x: t.left + i * n,
1101
+ y: t.top + a * r
1102
+ };
1103
+ }
1104
+ function wr(e, { fromKeyboard: t = !1 } = {}) {
1105
+ !N.value || Tn.value || e != null && (e < 0 || e >= X.value.end - X.value.start || (E.value = e, M.value = e, jt.value = !0, Qt.value = t, Mt.value = Sr(e), t && Cr(e), k.value = !1, _r()));
1106
+ }
1107
+ function Tr() {
1108
+ jt.value = !1, E.value = null, M.value = null, Mt.value = "", A.value = null, Qt.value = !1, _r();
1109
+ }
1110
+ function Er() {
1111
+ $t.value = !0;
1112
+ }
1113
+ function Dr() {
1114
+ $t.value = !1, Tr();
1115
+ }
1116
+ function Or(e) {
1117
+ if (!U.value || Xr.value || document.activeElement !== U.value) return;
1118
+ let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1119
+ if (!t && !n) return;
1120
+ let r = X.value.end - X.value.start;
1121
+ if (r <= 0) return;
1122
+ e.preventDefault(), e.stopPropagation();
1123
+ let i = M.value;
1124
+ i !== null && i >= 0 && i < r ? n ? (i += 1, i >= r && (i = 0)) : (--i, i < 0 && (i = r - 1)) : i = n ? 0 : r - 1, wr(i, { fromKeyboard: !0 });
1125
+ }
1126
+ function kr({ seriesIndex: e, datapoint: t }) {
1127
+ let n = X.value.start + e;
1128
+ tn("selectX", {
1129
+ dataset: t,
1130
+ index: n,
1131
+ indexLabel: ""
1132
+ });
1133
+ }
1134
+ x(() => C.selectedXIndex, (e) => {
1135
+ if ([null, void 0].includes(C.selectedXIndex)) {
1136
+ Tr();
1137
+ return;
1138
+ }
1139
+ let t = e - X.value.start;
1140
+ t < 0 || e >= X.value.end ? Tr() : wr(t, { fromKeyboard: !1 });
1141
+ }, { immediate: !0 }), x(() => E.value, (e) => {
1142
+ vr();
1143
+ }), x(() => X.value, (e) => {
1144
+ O.value = !0, _r();
1145
+ }, { deep: !0 }), x(() => Z.value, (e) => {
1146
+ _r();
1147
+ }, { deep: !0 }), x(() => W.value.showDataLabels, (e) => {
1148
+ O.value = !0, _r();
1149
+ }), x(() => A.value, (e) => {
1150
+ e && _r();
1151
+ }), x(() => W.value.stacked, (e) => {
1152
+ O.value = !0, k.value = !0, vr();
1153
+ });
1154
+ function Ar() {
1155
+ Tr();
1156
+ }
1157
+ let jr = nt(null), Mr = nt(null), Nr = nt(null);
1158
+ et(() => {
1159
+ Gt.value = !0, Pr();
1160
+ });
1161
+ function Pr() {
1162
+ if (o(C.dataset) && se({
1163
+ componentName: "VueUiXyCanvas",
1164
+ type: "dataset",
1165
+ debug: cn.value
1166
+ }), Xe(() => {
1167
+ U.value && !w.value && (w.value = U.value.getContext("2d", { willReadFrequently: !0 })), w.value && N.value && (O.value = !0, k.value = !0, Yn());
1168
+ }), P.value.responsive) {
1169
+ let e = Oe(() => {
1170
+ let { width: e, height: t } = Ne({
1171
+ chart: Ot.value,
1172
+ title: H.value.title.text ? Rt.value : null,
1173
+ legend: H.value.legend.show ? zt.value : null,
1174
+ slicer: H.value.zoom.show && G.value > 6 ? Bt.value?.$el : null,
1175
+ source: Vt.value
1176
+ });
1177
+ requestAnimationFrame(() => {
1178
+ vn.value = `${e} / ${t}`;
1179
+ });
1180
+ });
1181
+ jr.value && (Mr.value && jr.value.unobserve(Mr.value), jr.value.disconnect()), jr.value = new ResizeObserver(e), Mr.value = Ot.value.parentNode, jr.value.observe(Mr.value);
1182
+ }
1183
+ Nr.value && Nr.value.disconnect(), Nr.value = new ResizeObserver(async (e) => {
1184
+ for (let t of e) t.contentBoxSize && kt.value && (O.value = !0, vr());
1185
+ }), Nr.value.observe(kt.value), Bn();
1186
+ }
1187
+ $e(() => {
1188
+ Nr.value && Nr.value.disconnect(), jr.value && (Mr.value && jr.value.unobserve(Mr.value), jr.value.disconnect());
1189
+ });
1190
+ function Fr() {
1191
+ D.value.length ? D.value = [] : Br.value.forEach((e, t) => {
1192
+ D.value.push(t);
1193
+ }), O.value = !0, vr(), tn("selectLegend", Y.value);
1194
+ }
1195
+ function Ir(e) {
1196
+ D.value.includes(e) ? D.value = D.value.filter((t) => t !== e) : D.value.push(e), O.value = !0, vr(), tn("selectLegend", Y.value);
1197
+ }
1198
+ function Lr(e) {
1199
+ return J.value.length ? J.value.find((t) => t.name === e) || (cn.value && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null) : (cn.value && console.warn("VueUiXyCanvas - There are no series to show."), null);
1200
+ }
1201
+ function Rr(e) {
1202
+ let t = Lr(e);
1203
+ t !== null && D.value.includes(t.absoluteIndex) && Ir(t.absoluteIndex);
1204
+ }
1205
+ function zr(e) {
1206
+ let t = Lr(e);
1207
+ t !== null && (D.value.includes(t.absoluteIndex) || Ir(t.absoluteIndex));
1208
+ }
1209
+ let Br = f(() => J.value.map((e, t) => ({
1210
+ ...e,
1211
+ name: e.name,
1212
+ color: s(e.color) || wn.value[t] || i[t] || i[t % i.length],
1213
+ shape: e.shape || "circle",
1214
+ prefix: e.prefix || "",
1215
+ suffix: e.suffix || "",
1216
+ rounding: e.rounding || 0
1217
+ })).map((e) => ({
1218
+ ...e,
1219
+ opacity: D.value.includes(e.absoluteIndex) ? .5 : 1,
1220
+ segregate: () => Ir(e.absoluteIndex),
1221
+ isSegregated: D.value.includes(e.absoluteIndex)
1222
+ }))), Vr = f(() => ({
1223
+ cy: "donut-div-legend",
1224
+ backgroundColor: H.value.legend.backgroundColor,
1225
+ color: H.value.legend.color,
1226
+ fontSize: H.value.legend.fontSize,
1227
+ paddingBottom: 12,
1228
+ fontWeight: H.value.legend.bold ? "bold" : ""
1229
+ })), Hr = f(() => {
1230
+ let e = [""].concat(Y.value.map((e) => e.name), "__SUM__"), t = [];
1231
+ for (let e = 0; e < G.value; e += 1) {
1232
+ let n = Y.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1233
+ t.push([z.value.values.slice(X.value.start, X.value.end)[e] ? $?.value?.slice(X.value.start, X.value.end)?.[e]?.text ?? e + 1 : e + 1].concat(Y.value.map((t) => (t.series[e] ?? 0).toFixed(P.value.table.rounding)), (n ?? 0).toFixed(P.value.table.rounding)));
1234
+ }
1235
+ let n = {
1236
+ th: {
1237
+ backgroundColor: P.value.table.th.backgroundColor,
1238
+ color: P.value.table.th.color,
1239
+ outline: P.value.table.th.outline
1240
+ },
1241
+ td: {
1242
+ backgroundColor: P.value.table.td.backgroundColor,
1243
+ color: P.value.table.td.color,
1244
+ outline: P.value.table.td.outline
1245
+ },
1246
+ breakpoint: P.value.table.responsiveBreakpoint
1247
+ }, r = [P.value.table.columnNames.period].concat(Y.value.map((e) => e.name), P.value.table.columnNames.total);
1248
+ return {
1249
+ head: e,
1250
+ body: t.slice(0, X.value.end - X.value.start),
1251
+ config: n,
1252
+ colNames: r
1253
+ };
1254
+ }), Ur = f(() => {
1255
+ if (Y.value.length === 0) return {
1256
+ head: [],
1257
+ body: [],
1258
+ config: {},
1259
+ columnNames: []
1260
+ };
1261
+ let e = Y.value.map((e) => ({
1262
+ label: e.name,
1263
+ color: e.color,
1264
+ type: e.type
1265
+ })), t = [];
1266
+ for (let e = X.value.start; e < X.value.end; e += 1) {
1267
+ let n = [z.value.values[e] ? $.value[e].text : e + 1];
1268
+ Y.value.forEach((t) => {
1269
+ n.push(Number((t.series[e] || 0).toFixed(P.value.table.rounding)));
1270
+ }), t.push(n);
1271
+ }
1272
+ return {
1273
+ head: e,
1274
+ body: t
1275
+ };
1276
+ });
1277
+ function Wr(e = null) {
1278
+ let n = [
1279
+ [H.value.title.text],
1280
+ [H.value.title.subtitle.text],
1281
+ [""]
1282
+ ], i = ["", ...Ur.value.head.map((e) => e.label)], a = Ur.value.body, o = n.concat([i]).concat(a), s = r(o);
1283
+ e ? e(s) : t({
1284
+ csvContent: s,
1285
+ title: H.value.title.text || "vue-ui-xy-canvas"
1286
+ });
1287
+ }
1288
+ function Gr() {
1289
+ return Y.value;
1290
+ }
1291
+ function Kr() {
1292
+ W.value.showTable = !W.value.showTable;
1293
+ }
1294
+ function qr() {
1295
+ W.value.showDataLabels = !W.value.showDataLabels;
1296
+ }
1297
+ function Jr() {
1298
+ W.value.stacked = !W.value.stacked;
1299
+ }
1300
+ function Yr() {
1301
+ W.value.showTooltip = !W.value.showTooltip;
1302
+ }
1303
+ let Xr = v(!1);
1304
+ function Zr() {
1305
+ Xr.value = !Xr.value;
1306
+ }
1307
+ async function Qr({ scale: e = 2 } = {}) {
1308
+ if (!Ot.value) return;
1309
+ let { imageUri: t, base64: n } = await Ce({
1310
+ domElement: Ot.value,
1311
+ base64: !0,
1312
+ img: !0,
1313
+ scale: e
1314
+ }), r = Ot.value.getBoundingClientRect(), i = {
1315
+ width: r.width,
1316
+ height: r.height,
1317
+ aspectRatio: r.height ? r.width / r.height : 0
1318
+ }, a = await le(t, e) ?? i;
1319
+ return {
1320
+ imageUri: t,
1321
+ base64: n,
1322
+ title: H.value.title.text,
1323
+ ...a
1324
+ };
1325
+ }
1326
+ let $r = f(() => {
1327
+ let e = P.value.table.useDialog && !P.value.table.show, t = W.value.showTable;
1328
+ return {
1329
+ component: e ? Ct : Ie,
1330
+ title: `${H.value.title.text}${H.value.title.subtitle.text ? `: ${H.value.title.subtitle.text}` : ""}`,
1331
+ props: e ? {
1332
+ backgroundColor: P.value.table.th.backgroundColor,
1333
+ color: P.value.table.th.color,
1334
+ headerColor: P.value.table.th.color,
1335
+ headerBg: P.value.table.th.backgroundColor,
1336
+ isFullscreen: Lt.value,
1337
+ fullscreenParent: Ot.value,
1338
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1339
+ isCursorPointer: sn.value
1340
+ } : {
1341
+ hideDetails: !0,
1342
+ config: {
1343
+ open: t,
1344
+ maxHeight: 1e4,
1345
+ body: {
1346
+ backgroundColor: H.value.backgroundColor,
1347
+ color: H.value.color
1348
+ },
1349
+ head: {
1350
+ backgroundColor: H.value.backgroundColor,
1351
+ color: H.value.color
1352
+ }
1353
+ }
1354
+ }
1355
+ };
1356
+ });
1357
+ x(() => W.value.showTable, (e) => {
1358
+ P.value.table.show || (e && P.value.table.useDialog && Kt.value ? Kt.value.open() : "close" in Kt.value && Kt.value.close());
1359
+ });
1360
+ function ei() {
1361
+ W.value.showTable = !1, qt.value && qt.value.setTableIconState(!1);
1362
+ }
1363
+ function ti(e) {
1364
+ if (e?.stage === "start") {
1365
+ Zt.value = !0;
1366
+ return;
1367
+ }
1368
+ if (e?.stage === "end") {
1369
+ Zt.value = !1;
1370
+ return;
1371
+ }
1372
+ Sn();
1373
+ }
1374
+ async function ni() {
1375
+ if (tn("copyAlt", {
1376
+ config: P.value,
1377
+ dataset: Y.value
1378
+ }), !F.value.callbacks.altCopy) {
1379
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1380
+ return;
1381
+ }
1382
+ await Promise.resolve(F.value.callbacks.altCopy({
1383
+ config: P.value,
1384
+ dataset: Y.value
1385
+ }));
1386
+ }
1387
+ return Te({
1388
+ getData: Gr,
1389
+ getImage: Qr,
1390
+ generateCsv: Wr,
1391
+ generatePdf: xn,
1392
+ generateImage: Sn,
1393
+ hideSeries: zr,
1394
+ showSeries: Rr,
1395
+ toggleTable: Kr,
1396
+ toggleLabels: qr,
1397
+ toggleStack: Jr,
1398
+ toggleTooltip: Yr,
1399
+ toggleAnnotator: Zr,
1400
+ toggleFullscreen: Cn,
1401
+ copyAlt: ni
1402
+ }), (t, r) => (_(), We("div", {
1403
+ style: Qe(`width:100%; position:relative; ${P.value.responsive ? "height: 100%" : ""}; background:${P.value.style.chart.backgroundColor};`),
1404
+ ref_key: "xy",
1405
+ ref: Ot,
1406
+ id: `xy_canvas_${Dt.value}`,
1407
+ class: Ze(`vue-data-ui-component vue-ui-xy-canvas ${Lt.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1408
+ onMouseenter: hn,
1409
+ onMouseleave: gn
1410
+ }, [
1411
+ m("div", {
1412
+ id: `chart-instructions-${Dt.value}`,
1413
+ class: "sr-only"
1414
+ }, [m("p", null, rt(P.value.a11y.translations.keyboardNavigation), 1)], 8, lt),
1415
+ m("div", ut, rt(on.value), 1),
1416
+ P.value.style.chart.title.text ? (_(), We("div", {
1417
+ key: 0,
1418
+ ref_key: "chartTitle",
1419
+ ref: Rt,
1420
+ style: Qe(`width:100%;background:${P.value.style.chart.backgroundColor};`)
1421
+ }, [(_(), Ue(we, {
1422
+ key: `title_${Ht.value}`,
1423
+ config: {
1424
+ title: {
1425
+ cy: "xy-canvas-title",
1426
+ ...P.value.style.chart.title
1427
+ },
1428
+ subtitle: {
1429
+ cy: "xy-canvas-subtitle",
1430
+ ...P.value.style.chart.title.subtitle
1431
+ }
1432
+ }
1433
+ }, null, 8, ["config"]))], 4)) : p("", !0),
1434
+ m("div", { id: `legend-top-${Dt.value}` }, null, 8, dt),
1435
+ F.value.show && N.value && (b(mn) || b(fn)) ? (_(), Ue(b(xt), {
1436
+ ref_key: "userOptionsRef",
1437
+ ref: qt,
1438
+ key: `user_option_${It.value}`,
1439
+ backgroundColor: P.value.style.chart.backgroundColor,
1440
+ color: P.value.style.chart.color,
1441
+ isPrinting: b(yn),
1442
+ isImaging: b(bn),
1443
+ uid: Dt.value,
1444
+ hasTooltip: F.value.buttons.tooltip && I.value.show,
1445
+ hasPdf: F.value.buttons.pdf,
1446
+ hasImg: F.value.buttons.img,
1447
+ hasXls: F.value.buttons.csv,
1448
+ hasLabel: F.value.buttons.labels,
1449
+ hasStack: e.dataset.length > 1 && F.value.buttons.stack,
1450
+ hasFullscreen: F.value.buttons.fullscreen,
1451
+ hasAltCopy: F.value.buttons.altCopy,
1452
+ hasTable: X.value.end - X.value.start <= 730 && F.value.buttons.table,
1453
+ isFullscreen: Lt.value,
1454
+ isTooltip: W.value.showTooltip,
1455
+ isStacked: W.value.stacked,
1456
+ titles: { ...F.value.buttonTitles },
1457
+ chartElement: Ot.value,
1458
+ position: F.value.position,
1459
+ hasAnnotator: F.value.buttons.annotator,
1460
+ isAnnotation: Xr.value,
1461
+ callbacks: F.value.callbacks,
1462
+ printScale: F.value.print.scale,
1463
+ tableDialog: P.value.table.useDialog,
1464
+ isCursorPointer: sn.value,
1465
+ onToggleFullscreen: Cn,
1466
+ onGeneratePdf: b(xn),
1467
+ onGenerateCsv: Wr,
1468
+ onGenerateImage: ti,
1469
+ onToggleTable: Kr,
1470
+ onToggleLabels: qr,
1471
+ onToggleStack: Jr,
1472
+ onToggleTooltip: Yr,
1473
+ onToggleAnnotator: Zr,
1474
+ onCopyAlt: ni,
1475
+ style: Qe({ visibility: b(mn) ? b(fn) ? "visible" : "hidden" : "visible" })
1476
+ }, Ge({ _: 2 }, [
1477
+ t.$slots.menuIcon ? {
1478
+ name: "menuIcon",
1479
+ fn: S(({ isOpen: e, color: n }) => [y(t.$slots, "menuIcon", g(h({
1480
+ isOpen: e,
1481
+ color: n
1482
+ })), void 0, !0)]),
1483
+ key: "0"
1484
+ } : void 0,
1485
+ t.$slots.optionTooltip ? {
1486
+ name: "optionTooltip",
1487
+ fn: S(() => [y(t.$slots, "optionTooltip", {}, void 0, !0)]),
1488
+ key: "1"
1489
+ } : void 0,
1490
+ t.$slots.optionPdf ? {
1491
+ name: "optionPdf",
1492
+ fn: S(() => [y(t.$slots, "optionPdf", {}, void 0, !0)]),
1493
+ key: "2"
1494
+ } : void 0,
1495
+ t.$slots.optionCsv ? {
1496
+ name: "optionCsv",
1497
+ fn: S(() => [y(t.$slots, "optionCsv", {}, void 0, !0)]),
1498
+ key: "3"
1499
+ } : void 0,
1500
+ t.$slots.optionImg ? {
1501
+ name: "optionImg",
1502
+ fn: S(() => [y(t.$slots, "optionImg", {}, void 0, !0)]),
1503
+ key: "4"
1504
+ } : void 0,
1505
+ t.$slots.optionTable ? {
1506
+ name: "optionTable",
1507
+ fn: S(() => [y(t.$slots, "optionTable", {}, void 0, !0)]),
1508
+ key: "5"
1509
+ } : void 0,
1510
+ t.$slots.optionLabels ? {
1511
+ name: "optionLabels",
1512
+ fn: S(() => [y(t.$slots, "optionLabels", {}, void 0, !0)]),
1513
+ key: "6"
1514
+ } : void 0,
1515
+ t.$slots.optionStack ? {
1516
+ name: "optionStack",
1517
+ fn: S(() => [y(t.$slots, "optionStack", {}, void 0, !0)]),
1518
+ key: "7"
1519
+ } : void 0,
1520
+ t.$slots.optionFullscreen ? {
1521
+ name: "optionFullscreen",
1522
+ fn: S(({ toggleFullscreen: e, isFullscreen: n }) => [y(t.$slots, "optionFullscreen", g(h({
1523
+ toggleFullscreen: e,
1524
+ isFullscreen: n
1525
+ })), void 0, !0)]),
1526
+ key: "8"
1527
+ } : void 0,
1528
+ t.$slots.optionAnnotator ? {
1529
+ name: "optionAnnotator",
1530
+ fn: S(({ toggleAnnotator: e, isAnnotator: n }) => [y(t.$slots, "optionAnnotator", g(h({
1531
+ toggleAnnotator: e,
1532
+ isAnnotator: n
1533
+ })), void 0, !0)]),
1534
+ key: "9"
1535
+ } : void 0,
1536
+ t.$slots.optionAltCopy ? {
1537
+ name: "optionAltCopy",
1538
+ fn: S(({ altCopy: e }) => [y(t.$slots, "optionAltCopy", g(h({ altCopy: e })), void 0, !0)]),
1539
+ key: "10"
1540
+ } : void 0,
1541
+ t.$slots["custom-menu-before"] ? {
1542
+ name: "custom-menu-before",
1543
+ fn: S(() => [y(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1544
+ key: "11"
1545
+ } : void 0,
1546
+ t.$slots["custom-menu-after"] ? {
1547
+ name: "custom-menu-after",
1548
+ fn: S(() => [y(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1549
+ key: "12"
1550
+ } : void 0
1551
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasXls.hasLabel.hasStack.hasFullscreen.hasAltCopy.hasTable.isFullscreen.isTooltip.isStacked.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : p("", !0),
1552
+ m("div", {
1553
+ class: "vue-ui-xy-canvas",
1554
+ style: Qe(`position: relative; aspect-ratio: ${vn.value}`),
1555
+ ref_key: "container",
1556
+ ref: kt
1557
+ }, [
1558
+ m("canvas", {
1559
+ ref_key: "canvas",
1560
+ ref: U,
1561
+ "aria-label": an.value,
1562
+ "aria-describedby": `chart-instructions-${Dt.value}`,
1563
+ role: "img",
1564
+ "aria-live": "polite",
1565
+ tabindex: "0",
1566
+ style: {
1567
+ width: "100%",
1568
+ height: "100%"
1569
+ },
1570
+ onMousemove: r[0] ||= (e) => br(e),
1571
+ onMouseleave: Ar,
1572
+ onFocus: Er,
1573
+ onBlur: Dr,
1574
+ onKeydown: Or
1575
+ }, null, 40, ft),
1576
+ t.$slots.hint ? (_(), We("div", pt, [y(t.$slots, "hint", g(h({
1577
+ hint: P.value.a11y.translations.keyboardNavigation,
1578
+ isVisible: $t.value
1579
+ })), void 0, !0)])) : p("", !0),
1580
+ y(t.$slots, "skeleton", {}, () => [b(un) ? (_(), Ue(be, { key: 0 })) : p("", !0)], !0),
1581
+ qe(b(yt), {
1582
+ teleportTo: I.value.teleportTo,
1583
+ show: W.value.showTooltip && jt.value,
1584
+ backgroundColor: I.value.backgroundColor,
1585
+ color: I.value.color,
1586
+ fontSize: I.value.fontSize,
1587
+ borderRadius: I.value.borderRadius,
1588
+ borderColor: I.value.borderColor,
1589
+ borderWidth: I.value.borderWidth,
1590
+ position: I.value.position,
1591
+ offsetX: I.value.offsetX,
1592
+ offsetY: I.value.offsetY,
1593
+ parent: t.$refs.xy,
1594
+ content: Mt.value,
1595
+ isFullscreen: Lt.value,
1596
+ backgroundOpacity: I.value.backgroundOpacity,
1597
+ isCustom: b(n)(I.value.customFormat),
1598
+ smooth: I.value.smooth,
1599
+ backdropFilter: I.value.backdropFilter,
1600
+ smoothForce: I.value.smoothForce,
1601
+ smoothSnapThreshold: I.value.smoothSnapThreshold,
1602
+ isA11yMode: Qt.value,
1603
+ a11yPosition: en.value
1604
+ }, {
1605
+ "tooltip-before": S(() => [y(t.$slots, "tooltip-before", g(h({ ...Nt.value })), void 0, !0)]),
1606
+ tooltip: S(() => [y(t.$slots, "tooltip", g(h({ ...Nt.value })), void 0, !0)]),
1607
+ "tooltip-after": S(() => [y(t.$slots, "tooltip-after", g(h({ ...Nt.value })), void 0, !0)]),
1608
+ _: 3
1609
+ }, 8, [
1610
+ "teleportTo",
1611
+ "show",
1612
+ "backgroundColor",
1613
+ "color",
1614
+ "fontSize",
1615
+ "borderRadius",
1616
+ "borderColor",
1617
+ "borderWidth",
1618
+ "position",
1619
+ "offsetX",
1620
+ "offsetY",
1621
+ "parent",
1622
+ "content",
1623
+ "isFullscreen",
1624
+ "backgroundOpacity",
1625
+ "isCustom",
1626
+ "smooth",
1627
+ "backdropFilter",
1628
+ "smoothForce",
1629
+ "smoothSnapThreshold",
1630
+ "isA11yMode",
1631
+ "a11yPosition"
1632
+ ])
1633
+ ], 4),
1634
+ P.value.style.chart.zoom.show && G.value > 6 && N.value && Yt.value && !b(un) ? (_(), Ue(Fe, {
1635
+ key: 2,
1636
+ ref_key: "chartSlicer",
1637
+ ref: Bt,
1638
+ "data-dom-to-png-ignore-layout": "",
1639
+ allMinimaps: Ln.value,
1640
+ background: P.value.style.chart.zoom.color,
1641
+ borderColor: P.value.style.chart.backgroundColor,
1642
+ customFormat: P.value.style.chart.zoom.customFormat,
1643
+ cutNullValues: Fn.value,
1644
+ enableRangeHandles: P.value.style.chart.zoom.enableRangeHandles,
1645
+ enableSelectionDrag: P.value.style.chart.zoom.enableSelectionDrag,
1646
+ end: X.value.end,
1647
+ focusOnDrag: P.value.style.chart.zoom.focusOnDrag,
1648
+ focusRangeRatio: P.value.style.chart.zoom.focusRangeRatio,
1649
+ fontSize: P.value.style.chart.zoom.fontSize,
1650
+ immediate: !P.value.style.chart.zoom.preview.enable,
1651
+ inputColor: P.value.style.chart.zoom.color,
1652
+ isPreview: Vn.value,
1653
+ labelLeft: P.value.style.chart.grid.x.timeLabels.values[X.value.start] ? $.value[X.value.start]?.text : "",
1654
+ labelRight: P.value.style.chart.grid.x.timeLabels.values[X.value.end - 1] ? $.value[X.value.end - 1]?.text : "",
1655
+ max: G.value,
1656
+ min: 0,
1657
+ minimap: In.value,
1658
+ minimapCompact: P.value.style.chart.zoom.minimap.compact,
1659
+ minimapFrameColor: P.value.style.chart.zoom.minimap.frameColor,
1660
+ minimapIndicatorColor: P.value.style.chart.zoom.minimap.indicatorColor,
1661
+ minimapLineColor: P.value.style.chart.zoom.minimap.lineColor,
1662
+ minimapMerged: P.value.style.chart.zoom.minimap.merged,
1663
+ minimapSelectedColor: P.value.style.chart.zoom.minimap.selectedColor,
1664
+ minimapSelectedColorOpacity: P.value.style.chart.zoom.minimap.selectedColorOpacity,
1665
+ minimapSelectedIndex: E.value,
1666
+ minimapSelectionRadius: P.value.style.chart.zoom.minimap.selectionRadius,
1667
+ preciseLabels: ar.value?.length ? ar.value : $.value,
1668
+ refreshEndPoint: P.value.style.chart.zoom.endIndex === null ? G.value : P.value.style.chart.zoom.endIndex + 1,
1669
+ refreshStartPoint: P.value.style.chart.zoom.startIndex === null ? 0 : P.value.style.chart.zoom.startIndex,
1670
+ selectColor: P.value.style.chart.zoom.highlightColor,
1671
+ selectedSeries: J.value,
1672
+ smoothMinimap: P.value.style.chart.zoom.minimap.smooth,
1673
+ start: X.value.start,
1674
+ timeLabels: $.value,
1675
+ usePreciseLabels: P.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !P.value.style.chart.zoom.useDefaultFormat,
1676
+ textColor: P.value.style.chart.color,
1677
+ useResetSlot: P.value.style.chart.zoom.useResetSlot,
1678
+ valueEnd: X.value.end,
1679
+ valueStart: X.value.start,
1680
+ verticalHandles: P.value.style.chart.zoom.minimap.verticalHandles,
1681
+ maxWidth: P.value.style.chart.zoom.maxWidth,
1682
+ minimapLeftInsetRatio: K.value.canvasWidth > 0 && P.value.style.chart.zoom.autoFit ? K.value.left / K.value.canvasWidth : null,
1683
+ minimapRightInsetRatio: K.value.canvasWidth > 0 && P.value.style.chart.zoom.autoFit ? (K.value.canvasWidth - K.value.right) / K.value.canvasWidth : null,
1684
+ additionalMinimapHeight: P.value.style.chart.zoom.minimap.additionalHeight,
1685
+ handleType: P.value.style.chart.zoom.minimap.handleType,
1686
+ handleIconColor: P.value.style.chart.zoom.minimap.handleIconColor,
1687
+ handleBorderWidth: P.value.style.chart.zoom.minimap.handleBorderWidth,
1688
+ handleBorderColor: P.value.style.chart.zoom.minimap.handleBorderColor,
1689
+ handleFill: P.value.style.chart.zoom.minimap.handleFill,
1690
+ handleWidth: P.value.style.chart.zoom.minimap.handleWidth,
1691
+ onFutureEnd: r[1] ||= (e) => Hn("end", e),
1692
+ onFutureStart: r[2] ||= (e) => Hn("start", e),
1693
+ onReset: Bn,
1694
+ onTrapMouse: En,
1695
+ "onUpdate:end": Gn,
1696
+ "onUpdate:start": Wn
1697
+ }, {
1698
+ "reset-action": S(({ reset: e }) => [y(t.$slots, "reset-action", g(h({ reset: e })), void 0, !0)]),
1699
+ _: 3
1700
+ }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.smoothMinimap.start.timeLabels.usePreciseLabels.textColor.useResetSlot.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : p("", !0),
1701
+ m("div", { id: `legend-bottom-${Dt.value}` }, null, 8, mt),
1702
+ Gt.value && (P.value.style.chart.legend.show || t.$slots.legend) ? (_(), Ue(He, {
1703
+ key: 3,
1704
+ to: P.value.style.chart.legend.position === "top" ? `#legend-top-${Dt.value}` : `#legend-bottom-${Dt.value}`
1705
+ }, [m("div", {
1706
+ ref_key: "chartLegend",
1707
+ ref: zt
1708
+ }, [y(t.$slots, "legend", { legend: Br.value }, () => [P.value.style.chart.legend.show && N.value ? (_(), Ue(Be, {
1709
+ legendSet: Br.value,
1710
+ config: Vr.value,
1711
+ key: `legend_${Wt.value}`,
1712
+ isCursorPointer: sn.value,
1713
+ onClickMarker: r[3] ||= ({ i: e }) => Ir(e)
1714
+ }, {
1715
+ item: S(({ legend: e, index: t }) => [m("div", {
1716
+ onClick: (t) => e.segregate(),
1717
+ style: Qe(`opacity:${D.value.includes(t) ? .5 : 1}`)
1718
+ }, rt(e.name), 13, ht)]),
1719
+ legendToggle: S(() => [Br.value.length > 2 && P.value.style.chart.legend.selectAllToggle.show && !b(un) ? (_(), Ue(Le, {
1720
+ key: 0,
1721
+ backgroundColor: P.value.style.chart.legend.selectAllToggle.backgroundColor,
1722
+ color: P.value.style.chart.legend.selectAllToggle.color,
1723
+ fontSize: P.value.style.chart.legend.fontSize,
1724
+ checked: D.value.length > 0,
1725
+ isCursorPointer: sn.value,
1726
+ onToggle: Fr
1727
+ }, null, 8, [
1728
+ "backgroundColor",
1729
+ "color",
1730
+ "fontSize",
1731
+ "checked",
1732
+ "isCursorPointer"
1733
+ ])) : p("", !0)]),
1734
+ _: 1
1735
+ }, 8, [
1736
+ "legendSet",
1737
+ "config",
1738
+ "isCursorPointer"
1739
+ ])) : p("", !0)], !0)], 512)], 8, ["to"])) : p("", !0),
1740
+ t.$slots.watermark ? (_(), We("div", gt, [y(t.$slots, "watermark", g(h({ isPrinting: b(yn) || b(bn) || Zt.value })), void 0, !0)])) : p("", !0),
1741
+ t.$slots.source ? (_(), We("div", {
1742
+ key: 5,
1743
+ ref_key: "source",
1744
+ ref: Vt,
1745
+ dir: "auto"
1746
+ }, [y(t.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
1747
+ N.value && F.value.buttons.table ? (_(), Ue(tt($r.value.component), Ye({ key: 6 }, $r.value.props, {
1748
+ ref_key: "tableUnit",
1749
+ ref: Kt,
1750
+ onClose: ei
1751
+ }), Ge({
1752
+ content: S(() => [(_(), Ue(b(bt), {
1753
+ key: `table_${Ut.value}`,
1754
+ colNames: Hr.value.colNames,
1755
+ head: Hr.value.head,
1756
+ body: Hr.value.body,
1757
+ config: Hr.value.config,
1758
+ title: P.value.table.useDialog ? "" : $r.value.title,
1759
+ withCloseButton: !P.value.table.useDialog,
1760
+ isCursorPointer: sn.value,
1761
+ onClose: ei
1762
+ }, {
1763
+ th: S(({ th: e }) => [e === "__SUM__" ? (_(), We("div", _t, [qe(Pe, {
1764
+ name: "sigma",
1765
+ stroke: Hr.value.config.th.color,
1766
+ size: 16
1767
+ }, null, 8, ["stroke"])])) : (_(), We("div", vt, rt(e), 1))]),
1768
+ td: S(({ td: e }) => [Ke(rt(e), 1)]),
1769
+ _: 1
1770
+ }, 8, [
1771
+ "colNames",
1772
+ "head",
1773
+ "body",
1774
+ "config",
1775
+ "title",
1776
+ "withCloseButton",
1777
+ "isCursorPointer"
1778
+ ]))]),
1779
+ _: 2
1780
+ }, [P.value.table.useDialog ? {
1781
+ name: "title",
1782
+ fn: S(() => [Ke(rt($r.value.title), 1)]),
1783
+ key: "0"
1784
+ } : void 0, P.value.table.useDialog ? {
1785
+ name: "actions",
1786
+ fn: S(() => [m("button", {
1787
+ tabindex: "0",
1788
+ class: "vue-ui-user-options-button",
1789
+ onClick: r[4] ||= (e) => Wr(F.value.callbacks.csv),
1790
+ style: Qe({ cursor: sn.value ? "pointer" : "default" })
1791
+ }, [qe(Pe, {
1792
+ name: "fileCsv",
1793
+ stroke: $r.value.props.color
1794
+ }, null, 8, ["stroke"])], 4)]),
1795
+ key: "1"
1796
+ } : void 0]), 1040)) : p("", !0),
1797
+ F.value.buttons.annotator && Y.value.length ? (_(), Ue(b(St), {
1798
+ key: 7,
1799
+ parent: Ot.value,
1800
+ backgroundColor: P.value.style.chart.backgroundColor,
1801
+ color: P.value.style.chart.color,
1802
+ active: Xr.value,
1803
+ isCursorPointer: sn.value,
1804
+ onClose: Zr
1805
+ }, {
1806
+ "annotator-action-close": S(() => [y(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1807
+ "annotator-action-color": S(({ color: e }) => [y(t.$slots, "annotator-action-color", g(h({ color: e })), void 0, !0)]),
1808
+ "annotator-action-draw": S(({ mode: e }) => [y(t.$slots, "annotator-action-draw", g(h({ mode: e })), void 0, !0)]),
1809
+ "annotator-action-undo": S(({ disabled: e }) => [y(t.$slots, "annotator-action-undo", g(h({ disabled: e })), void 0, !0)]),
1810
+ "annotator-action-redo": S(({ disabled: e }) => [y(t.$slots, "annotator-action-redo", g(h({ disabled: e })), void 0, !0)]),
1811
+ "annotator-action-delete": S(({ disabled: e }) => [y(t.$slots, "annotator-action-delete", g(h({ disabled: e })), void 0, !0)]),
1812
+ _: 3
1813
+ }, 8, [
1814
+ "parent",
1815
+ "backgroundColor",
1816
+ "color",
1817
+ "active",
1818
+ "isCursorPointer"
1819
+ ])) : p("", !0)
1820
+ ], 46, ct));
1821
+ }
1822
+ }, [["__scopeId", "data-v-5be194fb"]]);
1823
+ //#endregion
1824
+ export { st as n, yt as t };