vue-data-ui 3.21.0 → 3.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/PackageVersion-Djj1DmIU.js +12 -0
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-age-pyramid.js +1 -1
  4. package/dist/components/vue-ui-bullet.js +1 -1
  5. package/dist/components/vue-ui-bump.js +1 -1
  6. package/dist/components/vue-ui-candlestick.js +1 -1
  7. package/dist/components/vue-ui-carousel-table.js +1 -1
  8. package/dist/components/vue-ui-chestnut.js +1 -1
  9. package/dist/components/vue-ui-chord.js +1 -1
  10. package/dist/components/vue-ui-circle-pack.js +1 -1
  11. package/dist/components/vue-ui-cursor.js +1 -1
  12. package/dist/components/vue-ui-dag.js +1 -1
  13. package/dist/components/vue-ui-dashboard.js +1 -1
  14. package/dist/components/vue-ui-digits.js +1 -1
  15. package/dist/components/vue-ui-donut-evolution.js +1 -1
  16. package/dist/components/vue-ui-donut.js +1 -1
  17. package/dist/components/vue-ui-dumbbell.js +1 -1
  18. package/dist/components/vue-ui-flow.js +1 -1
  19. package/dist/components/vue-ui-funnel.js +1 -1
  20. package/dist/components/vue-ui-galaxy.js +1 -1
  21. package/dist/components/vue-ui-gauge.js +1 -1
  22. package/dist/components/vue-ui-geo.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-heatmap.js +1 -1
  25. package/dist/components/vue-ui-history-plot.js +1 -1
  26. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  27. package/dist/components/vue-ui-kpi.js +1 -1
  28. package/dist/components/vue-ui-molecule.js +1 -1
  29. package/dist/components/vue-ui-mood-radar.js +1 -1
  30. package/dist/components/vue-ui-nested-donuts.js +1 -1
  31. package/dist/components/vue-ui-onion.js +1 -1
  32. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  33. package/dist/components/vue-ui-quadrant.js +1 -1
  34. package/dist/components/vue-ui-quick-chart.js +1 -1
  35. package/dist/components/vue-ui-radar.js +1 -1
  36. package/dist/components/vue-ui-relation-circle.js +1 -1
  37. package/dist/components/vue-ui-ridgeline.js +1 -1
  38. package/dist/components/vue-ui-rings.js +1 -1
  39. package/dist/components/vue-ui-scatter.js +1 -1
  40. package/dist/components/vue-ui-skeleton.js +1 -1
  41. package/dist/components/vue-ui-spark-trend.js +1 -1
  42. package/dist/components/vue-ui-sparkbar.js +1 -1
  43. package/dist/components/vue-ui-sparkgauge.js +1 -1
  44. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  45. package/dist/components/vue-ui-sparkline.js +1 -1
  46. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  47. package/dist/components/vue-ui-stackbar.js +1 -1
  48. package/dist/components/vue-ui-stackline.js +1 -1
  49. package/dist/components/vue-ui-strip-plot.js +1 -1
  50. package/dist/components/vue-ui-table-sparkline.js +1 -1
  51. package/dist/components/vue-ui-table.js +1 -1
  52. package/dist/components/vue-ui-thermometer.js +1 -1
  53. package/dist/components/vue-ui-timer.js +1 -1
  54. package/dist/components/vue-ui-tiremarks.js +1 -1
  55. package/dist/components/vue-ui-treemap.js +1 -1
  56. package/dist/components/vue-ui-vertical-bar.js +1 -1
  57. package/dist/components/vue-ui-waffle.js +1 -1
  58. package/dist/components/vue-ui-wheel.js +1 -1
  59. package/dist/components/vue-ui-word-cloud.js +1 -1
  60. package/dist/components/vue-ui-world.js +1 -1
  61. package/dist/components/vue-ui-xy.js +1 -1
  62. package/dist/package-DwtrIvz-.js +4 -0
  63. package/dist/render-common-aVBx5bwm.js +152 -0
  64. package/dist/ssr/vue-ui-donut.js +2 -0
  65. package/dist/ssr/vue-ui-xy.js +2 -0
  66. package/dist/ssr.js +3 -1366
  67. package/dist/types/ssr.d.ts +56 -2
  68. package/dist/{vue-data-ui-D2dM3IQZ.js → vue-data-ui-DxLmhpko.js} +60 -60
  69. package/dist/vue-data-ui.js +60 -60
  70. package/dist/{vue-ui-3d-bar-0C_yshya.js → vue-ui-3d-bar-Dzdo_8qY.js} +1 -1
  71. package/dist/{vue-ui-age-pyramid-DFNELwbT.js → vue-ui-age-pyramid-CIwN3HVR.js} +1 -1
  72. package/dist/{vue-ui-bullet-ChQq42AN.js → vue-ui-bullet-Dosih8Hb.js} +1 -1
  73. package/dist/{vue-ui-bump-BVCYywuS.js → vue-ui-bump--giMQaXE.js} +1 -1
  74. package/dist/{vue-ui-candlestick-CQ0nfkmL.js → vue-ui-candlestick-D_lfz0FX.js} +1 -1
  75. package/dist/{vue-ui-carousel-table-Cvi1gsKR.js → vue-ui-carousel-table-DEgFnasE.js} +1 -1
  76. package/dist/{vue-ui-chestnut-DeWbKqze.js → vue-ui-chestnut-i2Y-uK8C.js} +1 -1
  77. package/dist/{vue-ui-chord-bRXYWpGT.js → vue-ui-chord-DYwKe8vr.js} +1 -1
  78. package/dist/{vue-ui-circle-pack-DWO8x9gf.js → vue-ui-circle-pack-Cf0oDwlO.js} +1 -1
  79. package/dist/{vue-ui-cursor-BKGUvOWO.js → vue-ui-cursor-B7yLqYNS.js} +1 -1
  80. package/dist/{vue-ui-dag-lL0juBzN.js → vue-ui-dag-BDVRFz-1.js} +1 -1
  81. package/dist/{vue-ui-dashboard-CEk2z8v9.js → vue-ui-dashboard-AUHJopaF.js} +57 -57
  82. package/dist/{vue-ui-digits-BAjr0eIJ.js → vue-ui-digits-BEFXCA9O.js} +1 -1
  83. package/dist/{vue-ui-donut-BsSpIinL.js → vue-ui-donut-B3IYq0vZ.js} +1 -1
  84. package/dist/vue-ui-donut-BJyXzn6B.js +973 -0
  85. package/dist/{vue-ui-donut-evolution-1UhFKEgG.js → vue-ui-donut-evolution-BSV2Crlx.js} +1 -1
  86. package/dist/{vue-ui-dumbbell-ChqJicg9.js → vue-ui-dumbbell-7DAk8eNI.js} +1 -1
  87. package/dist/{vue-ui-flow-BXfzMTXx.js → vue-ui-flow-DUk1CDgi.js} +1 -1
  88. package/dist/{vue-ui-funnel-BpnC82m0.js → vue-ui-funnel-Bf9GDDV6.js} +1 -1
  89. package/dist/{vue-ui-galaxy-FNzwDOH1.js → vue-ui-galaxy-Z5Ev4iYr.js} +1 -1
  90. package/dist/{vue-ui-gauge-D6I78FZr.js → vue-ui-gauge-Cq_EA0Bj.js} +1 -1
  91. package/dist/{vue-ui-geo-Z1xuH8r6.js → vue-ui-geo-C7k7pTTU.js} +1 -1
  92. package/dist/{vue-ui-gizmo-ZlmJIh0_.js → vue-ui-gizmo-D_xYaP3o.js} +1 -1
  93. package/dist/{vue-ui-heatmap-BWN0UBKE.js → vue-ui-heatmap-DgmK3aY4.js} +1 -1
  94. package/dist/{vue-ui-history-plot-2E6KrNhv.js → vue-ui-history-plot-Cq9UBQYd.js} +1 -1
  95. package/dist/{vue-ui-horizontal-bar-BzP7k_3J.js → vue-ui-horizontal-bar-BcLFr3-H.js} +1 -1
  96. package/dist/{vue-ui-kpi-B9bdicir.js → vue-ui-kpi-CjiJWVnq.js} +1 -1
  97. package/dist/{vue-ui-molecule-B-69fE_1.js → vue-ui-molecule-CVu51gtg.js} +1 -1
  98. package/dist/{vue-ui-mood-radar-D3kF7iHz.js → vue-ui-mood-radar-bZC-Dg-1.js} +1 -1
  99. package/dist/{vue-ui-nested-donuts-CTmomXj1.js → vue-ui-nested-donuts-BYK8yR9-.js} +1 -1
  100. package/dist/{vue-ui-onion-3fJB4mfC.js → vue-ui-onion-DVQBUIfH.js} +1 -1
  101. package/dist/{vue-ui-parallel-coordinate-plot-CKKkbBlu.js → vue-ui-parallel-coordinate-plot-BxhGmOXk.js} +1 -1
  102. package/dist/{vue-ui-quadrant-DGLnjwva.js → vue-ui-quadrant-vnDlJEWL.js} +1 -1
  103. package/dist/{vue-ui-quick-chart-DJnhlEXi.js → vue-ui-quick-chart-CBauII4k.js} +1 -1
  104. package/dist/{vue-ui-radar-AIBX0QYs.js → vue-ui-radar-BYHLMJ0O.js} +1 -1
  105. package/dist/{vue-ui-relation-circle-BQVR8L9Y.js → vue-ui-relation-circle-WyHCmUGv.js} +1 -1
  106. package/dist/{vue-ui-ridgeline-CYq3APPQ.js → vue-ui-ridgeline-Dt2bsq8i.js} +1 -1
  107. package/dist/{vue-ui-rings-BgFO7NYF.js → vue-ui-rings-B97-rYT2.js} +1 -1
  108. package/dist/{vue-ui-scatter-BPu5DwaJ.js → vue-ui-scatter-DXOLVV7d.js} +1 -1
  109. package/dist/{vue-ui-skeleton-qpdvvWtx.js → vue-ui-skeleton-BFoHaAzE.js} +1 -1
  110. package/dist/{vue-ui-spark-trend-CQ9ZN5sL.js → vue-ui-spark-trend-BwSLGFz4.js} +1 -1
  111. package/dist/{vue-ui-sparkbar-d6ctWlLA.js → vue-ui-sparkbar-BQlbLbj_.js} +1 -1
  112. package/dist/{vue-ui-sparkgauge-HX_rqLxX.js → vue-ui-sparkgauge-gMtvy-s9.js} +1 -1
  113. package/dist/{vue-ui-sparkhistogram-B_zxKMHv.js → vue-ui-sparkhistogram-C5Elj_Rp.js} +1 -1
  114. package/dist/{vue-ui-sparkline-BSdOdtKu.js → vue-ui-sparkline-DJM-Ez8d.js} +1 -1
  115. package/dist/{vue-ui-sparkstackbar-B2sqpW-w.js → vue-ui-sparkstackbar-DrcKqBm_.js} +1 -1
  116. package/dist/{vue-ui-stackbar-DH75CCpy.js → vue-ui-stackbar-D2T1OrVG.js} +1 -1
  117. package/dist/{vue-ui-stackline-CXodezD1.js → vue-ui-stackline-ByefOdDI.js} +1 -1
  118. package/dist/{vue-ui-strip-plot-C1un5Mku.js → vue-ui-strip-plot-BVvVrhEq.js} +1 -1
  119. package/dist/{vue-ui-table-R-aXpHvF.js → vue-ui-table-C9o1vxEo.js} +2 -2
  120. package/dist/{vue-ui-table-sparkline-Dy-6i82F.js → vue-ui-table-sparkline-DbMBlaJr.js} +1 -1
  121. package/dist/{vue-ui-thermometer-CIse_lcE.js → vue-ui-thermometer-BGoNUm0Q.js} +1 -1
  122. package/dist/{vue-ui-timer-AlYvthQ6.js → vue-ui-timer-DrqEZJ9e.js} +1 -1
  123. package/dist/{vue-ui-tiremarks-CP_bw6by.js → vue-ui-tiremarks-h-OTdz5K.js} +1 -1
  124. package/dist/{vue-ui-treemap-BXrV5VAp.js → vue-ui-treemap-CVVSxQPH.js} +1 -1
  125. package/dist/{vue-ui-waffle-uoqEnQ30.js → vue-ui-waffle-nvE6zzca.js} +1 -1
  126. package/dist/{vue-ui-wheel-DLgw_xfe.js → vue-ui-wheel-CYu92PTs.js} +1 -1
  127. package/dist/{vue-ui-word-cloud-Bgu-qbcp.js → vue-ui-word-cloud-CRuXBu1K.js} +1 -1
  128. package/dist/{vue-ui-world-B93iq1ZM.js → vue-ui-world-Dn5KG6i-.js} +1 -1
  129. package/dist/vue-ui-xy-DjB1eAEf.js +1264 -0
  130. package/dist/{vue-ui-xy-DzuOBbPL.js → vue-ui-xy-Dzk3ILJy.js} +1 -1
  131. package/package.json +2 -2
  132. package/dist/PackageVersion-DYLo3MRd.js +0 -11
@@ -0,0 +1,1264 @@
1
+ import { B as e, Bt as t, F as n, Ft as r, G as i, H as a, Ht as o, I as s, L as c, M as l, Nt as u, O as d, Ot as f, Pt as p, Q as m, R as h, T as g, a as _, c as ee, g as v, h as y, i as b, j as x, k as te, pt as S, s as C, t as w, w as T, y as E } from "./lib-AJRHFE5U.js";
2
+ import { t as D } from "./useTimeLabels-BmBRv27Y.js";
3
+ import { t as O } from "./useConfig-DnH7Pf_2.js";
4
+ import { t as k } from "./vue_ui_xy-BA3-_LCx.js";
5
+ import { _ as A, d as j, f as M, g as N, h as P, l as F, m as I, p as L, u as R, v as z } from "./render-common-aVBx5bwm.js";
6
+ //#region src/svg/vue-ui-xy/create.js
7
+ var { vue_ui_xy: B } = O();
8
+ function ne({ config: e = {}, dataset: n = [] } = {}) {
9
+ let r = e ?? {}, i = o({
10
+ userConfig: r,
11
+ defaultConfig: B
12
+ });
13
+ S(r, "chart.highlightArea") && (Array.isArray(r.chart.highlightArea) ? i.chart.highlightArea = r.chart.highlightArea.map((e) => o({
14
+ defaultConfig: B.chart.highlightArea,
15
+ userConfig: e
16
+ })) : i.chart.highlightArea = [o({
17
+ defaultConfig: B.chart.highlightArea,
18
+ userConfig: r.chart.highlightArea
19
+ })]), S(r, "chart.annotations") && Array.isArray(r.chart.annotations) && r.chart.annotations.length ? i.chart.annotations = r.chart.annotations.map((e) => o({
20
+ defaultConfig: B.chart.annotations[0],
21
+ userConfig: e
22
+ })) : i.chart.annotations = [], S(r, "chart.grid.position") && r.chart.grid.position === "start" && n.some((e) => e.type === "bar") && (i.chart.grid.position = "middle");
23
+ let a = i.theme;
24
+ if (!a) return {
25
+ ...i,
26
+ customPalette: i.customPalette?.length ? i.customPalette : f
27
+ };
28
+ let s = o({
29
+ userConfig: r,
30
+ defaultConfig: o({
31
+ userConfig: k[a] || {},
32
+ defaultConfig: i
33
+ })
34
+ });
35
+ return {
36
+ ...s,
37
+ customPalette: s.customPalette?.length ? s.customPalette : t[a] || f
38
+ };
39
+ }
40
+ function re({ dataset: e = [], config: t = {}, width: n = 1e3, height: r = 600, selectedXIndex: i, additionalSvgContent: a = "", svgTitle: o = "" } = {}) {
41
+ let s = ne({
42
+ config: t,
43
+ dataset: e
44
+ }), c = {
45
+ top: s.chart.padding.top,
46
+ left: s.chart.padding.left,
47
+ right: n - s.chart.padding.right,
48
+ bottom: r - s.chart.padding.bottom
49
+ };
50
+ c.width = c.right - c.left, c.height = c.bottom - c.top;
51
+ let l = e.flatMap((e) => Array.isArray(e.series) ? e.series.map((e) => Number(typeof e == "object" && e ? e.y : e)) : []).filter(Number.isFinite), u = y(Math.min(0, ...l), Math.max(1, ...l), 6), d = Math.max(0, ...e.map((e) => e.series?.length || 0)), p = (e) => d <= 1 ? c.left + c.width / 2 : c.left + e / (d - 1) * c.width, m = (e) => {
52
+ let t = (Number(e) - u.min) / (u.max - u.min || 1);
53
+ return c.bottom - t * c.height;
54
+ }, h = Array.isArray(s.customPalette) ? s.customPalette : [], g = h.length ? h : f;
55
+ return {
56
+ width: n,
57
+ height: r,
58
+ selectedXIndex: i,
59
+ dataset: e,
60
+ config: s,
61
+ drawingArea: c,
62
+ scale: u,
63
+ series: e.map((e, t) => {
64
+ let n = (e.color ? E(e.color) : "") || g[t % g.length], r = (e.series || []).map((e, t) => {
65
+ let n = e == null ? null : typeof e == "object" ? e.y ?? null : Number(e);
66
+ return {
67
+ x: p(t),
68
+ y: n === null || !Number.isFinite(Number(n)) ? null : m(n),
69
+ value: n,
70
+ index: t,
71
+ label: e?.name ?? e?.x ?? String(t)
72
+ };
73
+ });
74
+ return {
75
+ ...e,
76
+ color: n,
77
+ type: e.type || "line",
78
+ plots: r
79
+ };
80
+ }),
81
+ additionalSvgContent: a,
82
+ svgTitle: o
83
+ };
84
+ }
85
+ //#endregion
86
+ //#region src/svg/vue-ui-xy/render.js
87
+ function V(e) {
88
+ return !!L(e, "chart.grid.labels.yAxis.useIndividualScale", !1);
89
+ }
90
+ function H(e) {
91
+ return String(e.scaleLabel ?? e.id ?? e.name ?? "");
92
+ }
93
+ function U(e) {
94
+ return A(L(e, "chart.grid.labels.yAxis.labelWidth", 40), 40) + 36;
95
+ }
96
+ function ie(e) {
97
+ return N(e).flatMap((e) => N(e.plots)).map((e) => e?.value === null || e?.value === void 0 ? null : Number(e.value)).filter(Number.isFinite);
98
+ }
99
+ function ae(e, t, n) {
100
+ let r = ie(n), i = L(e, "chart.grid.labels.yAxis.scaleMin", null), a = L(e, "chart.grid.labels.yAxis.scaleMax", null), o = Z(i) ? Number(i) : Math.min(0, ...r), s = Z(a) ? Number(a) : Math.max(1, ...r), c = A(L(e, "chart.grid.labels.yAxis.commonScaleSteps", 6), 6);
101
+ return !r.length && !Z(i) && !Z(a) ? t : Se(e, o, s === o ? o + 1 : s, c);
102
+ }
103
+ function oe(e, t) {
104
+ let { drawingArea: n } = e, r = A(t.__yOffset, 0), i = A(t.__individualHeight, n.height);
105
+ return {
106
+ top: n.bottom - r - i,
107
+ bottom: n.bottom - r
108
+ };
109
+ }
110
+ function se(e, t, n, r) {
111
+ let i = oe(e, t), a = Math.min(n.y, r), o = Math.max(n.y, r), s = Math.max(i.top, a), c = Math.min(i.bottom, o);
112
+ return {
113
+ y: s,
114
+ height: Math.max(1e-5, c - s)
115
+ };
116
+ }
117
+ function ce(e, t) {
118
+ let n = {};
119
+ return N(t).forEach((t, r) => {
120
+ let i = H(t) || `serie_${r}`, a = N(t.plots).map((e) => Number(e.value)).filter(Number.isFinite);
121
+ n[i] || (n[i] = {
122
+ scaleLabel: i,
123
+ name: t.name ?? i,
124
+ color: L(e, "chart.grid.labels.yAxis.groupColor", null) || t.color,
125
+ series: [],
126
+ values: []
127
+ }), n[i].series.push(t), n[i].values.push(...a);
128
+ }), Object.values(n).forEach((t) => {
129
+ t.scale = Ce(e, {
130
+ ...t.series[0],
131
+ plots: t.series.flatMap((e) => N(e.plots))
132
+ });
133
+ }), n;
134
+ }
135
+ function le(e, t, n, r, i, a) {
136
+ return !i && !a ? r : n[H(t)]?.scale ?? Ce(e, t);
137
+ }
138
+ function ue(e) {
139
+ return e === "bar" || e === "line" || e === "plot" ? e : "line";
140
+ }
141
+ function de(e) {
142
+ return N(e.series).map((e) => ({
143
+ ...e,
144
+ type: ue(e.type),
145
+ plots: N(e.plots).filter((e) => e && I(e.x))
146
+ }));
147
+ }
148
+ function W(e) {
149
+ let { drawingArea: t, scale: n } = e, r = (0 - n.min) / (n.max - n.min || 1);
150
+ return t.bottom - r * t.height;
151
+ }
152
+ var fe = a();
153
+ function G(e) {
154
+ return fe;
155
+ }
156
+ function K(e, t, n) {
157
+ return `rectGradient_${n}_${t}_${G(e)}`;
158
+ }
159
+ function pe(e, t) {
160
+ return `lineGradient_${t}_${G(e)}`;
161
+ }
162
+ function me(e, t) {
163
+ return `temperature_grad_line_${t}_${G(e)}`;
164
+ }
165
+ function he(e, t, n) {
166
+ return t.temperatureColors && !t.isFlatTemperatureLine ? `url(#${me(e, n)})` : t.color;
167
+ }
168
+ function ge(e, t) {
169
+ return `plotGradient_${t}_${G(e)}`;
170
+ }
171
+ function _e(e, t, n) {
172
+ let { config: r } = e;
173
+ return L(r, "line.useGradient", !1) ? `url(#${pe(e, n)})` : L(r, "line.dot.useSerieColor", !0) ? t.color : L(r, "line.dot.fill", "#FFFFFF");
174
+ }
175
+ function ve(e, t, n) {
176
+ let { config: r } = e;
177
+ return L(r, "line.area.useGradient", !1) ? `url(#${Je(e, n)})` : p(t.color, A(L(r, "line.area.opacity", 30), 30));
178
+ }
179
+ function ye(e, t, n, r) {
180
+ return L(e.config, "bar.useGradient", !1) ? r >= 0 ? `url(#${K(e, n, "pos")})` : `url(#${K(e, n, "neg")})` : t.color;
181
+ }
182
+ function be(e, t) {
183
+ let { config: n } = e, i = [];
184
+ return L(n, "bar.useGradient", !1) && t.filter((e) => e.type === "bar").forEach((t, n) => {
185
+ i.push(R("linearGradient", {
186
+ id: K(e, n, "pos"),
187
+ x2: "0%",
188
+ y2: "100%"
189
+ }, [
190
+ j("stop", {
191
+ offset: "0%",
192
+ "stop-color": E(t.color)
193
+ }),
194
+ j("stop", {
195
+ offset: "62%",
196
+ "stop-color": r(E(t.color), .02)
197
+ }),
198
+ j("stop", {
199
+ offset: "100%",
200
+ "stop-color": r(E(t.color), .05)
201
+ })
202
+ ].join(""))), i.push(R("linearGradient", {
203
+ id: K(e, n, "neg"),
204
+ x2: "0%",
205
+ y2: "100%"
206
+ }, [
207
+ j("stop", {
208
+ offset: "0%",
209
+ "stop-color": r(E(t.color), .05)
210
+ }),
211
+ j("stop", {
212
+ offset: "38%",
213
+ "stop-color": r(E(t.color), .02)
214
+ }),
215
+ j("stop", {
216
+ offset: "100%",
217
+ "stop-color": E(t.color)
218
+ })
219
+ ].join("")));
220
+ }), t.filter((e) => e.type === "line").forEach((t, a) => {
221
+ L(n, "line.useGradient", !1) && i.push(R("radialGradient", {
222
+ id: pe(e, a),
223
+ cx: "50%",
224
+ cy: "50%",
225
+ r: "50%",
226
+ fx: "50%",
227
+ fy: "50%"
228
+ }, [j("stop", {
229
+ offset: "0%",
230
+ "stop-color": r(E(t.color), .05)
231
+ }), j("stop", {
232
+ offset: "100%",
233
+ "stop-color": E(t.color)
234
+ })].join(""))), t.temperatureColors && !t.isFlatTemperatureLine && i.push(R("linearGradient", {
235
+ id: me(e, a),
236
+ gradientTransform: "rotate(90)"
237
+ }, t.temperatureColors.map((e, n) => j("stop", {
238
+ offset: u(n, t.temperatureColors.length),
239
+ "stop-color": E(e)
240
+ })).join("")));
241
+ }), t.filter((e) => e.type === "plot").forEach((t, a) => {
242
+ L(n, "plot.useGradient", !1) && i.push(R("radialGradient", {
243
+ id: ge(e, a),
244
+ cx: "50%",
245
+ cy: "50%",
246
+ r: "50%",
247
+ fx: "50%",
248
+ fy: "50%"
249
+ }, [j("stop", {
250
+ offset: "0%",
251
+ "stop-color": r(E(t.color), .05)
252
+ }), j("stop", {
253
+ offset: "100%",
254
+ "stop-color": E(t.color)
255
+ })].join("")));
256
+ }), i.length ? R("defs", { "data-layer": "gradients" }, i.join("")) : "";
257
+ }
258
+ function xe(e) {
259
+ let t = L(e.config, "chart.backgroundColor", "#FFFFFF");
260
+ return j("rect", {
261
+ width: e.width,
262
+ height: e.height,
263
+ fill: t
264
+ });
265
+ }
266
+ function q(e) {
267
+ return {
268
+ dataLabels: A(L(e, "chart.grid.labels.fontSize", 12), 12),
269
+ xAxis: A(L(e, "chart.grid.labels.xAxisLabels.fontSize", 12), 12),
270
+ yAxis: A(L(e, "chart.grid.labels.axis.fontSize", 12), 12)
271
+ };
272
+ }
273
+ function J(e) {
274
+ return L(e, "chart.grid.labels.yAxis.position", "left") === "right";
275
+ }
276
+ function Y(e, t) {
277
+ let n = i({
278
+ p: L(t, "chart.labels.prefix", ""),
279
+ v: e,
280
+ s: L(t, "chart.labels.suffix", ""),
281
+ r: L(t, "chart.grid.labels.yAxis.rounding", 0)
282
+ });
283
+ return b(L(t, "chart.grid.labels.yAxis.formatter", null), e, n, t);
284
+ }
285
+ function X(e) {
286
+ return !!L(e, "chart.grid.labels.yAxis.stacked", !1);
287
+ }
288
+ function Z(e) {
289
+ return e != null && Number.isFinite(Number(e));
290
+ }
291
+ function Se(e, t, n, r) {
292
+ return L(e, "chart.grid.labels.yAxis.useNiceScale", !0) ? y(t, n, r) : v(t, n, r);
293
+ }
294
+ function Ce(e, t) {
295
+ let n = N(t.plots).map((e) => Number(e.value)).filter(Number.isFinite), r = L(e, "chart.grid.labels.yAxis.scaleMin", null), i = L(e, "chart.grid.labels.yAxis.scaleMax", null), a = Z(r) ? Number(r) : Z(t.scaleMin) ? Number(t.scaleMin) : Math.min(0, ...n), o = Z(i) ? Number(i) : Z(t.scaleMax) ? Number(t.scaleMax) : Math.max(1, ...n);
296
+ return Se(e, a, o === a ? a + 1 : o, A(t.scaleSteps ?? L(e, "chart.grid.labels.yAxis.commonScaleSteps", 6), 6));
297
+ }
298
+ function we(e, t, n = []) {
299
+ let r = q(e), i = X(e), a = V(e), o = U(e);
300
+ if (a && !i) {
301
+ let t = Object.keys(ce(e, n)).length;
302
+ return {
303
+ left: J(e) ? 0 : t * o,
304
+ right: J(e) ? t * o : 0,
305
+ scaleLabelsOffset: t * o,
306
+ yAxisLabelWidth: 0
307
+ };
308
+ }
309
+ if (a && i) return {
310
+ left: J(e) ? 0 : o,
311
+ right: J(e) ? o : 0,
312
+ scaleLabelsOffset: o,
313
+ yAxisLabelWidth: 0
314
+ };
315
+ let s = (i ? n.flatMap((t) => Ce(e, t).ticks) : N(t.ticks)).reduce((t, n) => Math.max(t, M(Y(n, e), r.dataLabels)), 0), c = L(e, "chart.grid.labels.axis.yLabel", "") ? r.yAxis * 2 + 24 + A(L(e, "chart.grid.labels.axis.yLabelOffsetX", 0), 0) + r.yAxis : 0, l = s + A(L(e, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0) + A(L(e, "chart.grid.labels.yAxis.crosshairSize", 0), 0);
316
+ return {
317
+ left: J(e) ? 0 : l + c,
318
+ right: J(e) ? l + c : 0,
319
+ scaleLabelsOffset: l,
320
+ yAxisLabelWidth: c
321
+ };
322
+ }
323
+ function Te(e, t) {
324
+ let { config: n, scale: r, width: i, height: a } = e, o = q(n), s = e.drawingArea, c = we(n, r, t), l = L(n, "chart.legend.position", "bottom"), u = L(n, "chart.legend.show", !0), d = u ? Ke({
325
+ ...e,
326
+ width: i,
327
+ height: a
328
+ }, t) : { height: 0 }, f = u && l === "top" ? d.height : 0, p = u && l !== "top" ? d.height : 0, m = L(n, "chart.grid.labels.axis.xLabel", ""), h = L(n, "chart.grid.labels.xAxisLabels.show", !0) ? o.xAxis * 2 : 0, g = (m ? o.yAxis * 1.5 : 0) + h + o.xAxis, ee = ct(n) + A(L(n, "chart.labels.fontSize", 12), 12) * 1.1, v = A(L(n, "chart.padding.top", 12), 12), y = A(L(n, "chart.padding.right", 12), 12), b = A(L(n, "chart.padding.bottom", 12), 12), x = A(L(n, "chart.padding.left", 12), 12), te = A(L(n, "chart.grid.labels.axis.xLabelOffsetY", 0), 0), S = A(L(n, "chart.grid.labels.yAxis.crosshairSize", 0), 0), C = c.left, w = c.right, T = i - C - w - 6 - x - y, E = {
329
+ top: v + ee + f,
330
+ right: C + (J(n) ? 0 : S) + x + T,
331
+ bottom: a - g - b - te - p,
332
+ left: C + (J(n) ? 0 : S) + x,
333
+ width: Math.max(1, T),
334
+ height: 1,
335
+ scaleLabelX: C,
336
+ rightScaleLabelX: w,
337
+ scaleLabelsOffset: c.scaleLabelsOffset,
338
+ yAxisLabelWidth: c.yAxisLabelWidth,
339
+ individualOffsetX: 36
340
+ };
341
+ E.height = Math.max(1, E.bottom - E.top);
342
+ function D(e) {
343
+ let t = (e - s.left) / (s.width || 1);
344
+ return E.left + t * E.width;
345
+ }
346
+ let O = X(n), k = O ? _(t) : t, j = Math.max(1, k.length), M = O ? A(L(n, "chart.grid.labels.yAxis.gap", 12), 12) : 0, P = M * Math.max(0, j - 1), F = Math.max(1, E.height - P), I = V(n), R = ce(n, t), z = Math.max(1, ...t.map((e) => N(e.plots).length));
347
+ function B(t, n) {
348
+ return Q(e) ? D(t.x) : $({
349
+ ...e,
350
+ drawingArea: E
351
+ }, t.index ?? n, z);
352
+ }
353
+ let ne = t.map((e, t) => {
354
+ let i = e.id !== void 0 && e.id !== null ? k.find((t) => t.id === e.id) ?? k[t] ?? e : k[t] ?? e, a = le(n, e, R, r, I, O), o = A(i.stackIndex, t), s = A(i.stackRatio, 1 / j), c = A(i.cumulatedStackRatio, s * (o + 1)), l = j - 1 - o, u = O ? 1 - c : 0, d = O ? F * u + M * l : 0, f = O ? F * s : E.height;
355
+ function p(e) {
356
+ let t = (e - a.min) / (a.max - a.min || 1);
357
+ return E.bottom - d - t * f;
358
+ }
359
+ let m = p(0);
360
+ return {
361
+ ...e,
362
+ __scale: a,
363
+ __yOffset: d,
364
+ __individualHeight: f,
365
+ __zeroY: m,
366
+ __scaleYLabels: N(a.ticks).map((t) => ({
367
+ value: t,
368
+ y: p(t),
369
+ serie: e
370
+ })),
371
+ plots: e.plots.map((e, t) => {
372
+ let n = e.value === null || e.value === void 0 ? null : Number(e.value);
373
+ return {
374
+ ...e,
375
+ value: n,
376
+ x: B(e, t),
377
+ y: n === null || !Number.isFinite(n) ? null : p(n)
378
+ };
379
+ })
380
+ };
381
+ });
382
+ return {
383
+ ...e,
384
+ drawingArea: E,
385
+ series: ne,
386
+ __scaleGroups: R,
387
+ __useIndividualScale: I
388
+ };
389
+ }
390
+ function Ee(e) {
391
+ let { config: t, drawingArea: n, scale: r, series: i } = e;
392
+ if (!L(t, "chart.grid.labels.show", !0) || !L(t, "chart.grid.labels.yAxis.show", !0)) return "";
393
+ let a = V(t), o = X(t);
394
+ if (a) return De(e);
395
+ let s = q(t), c = J(t), l = L(t, "chart.grid.labels.yAxis.showCrosshairs", !1), u = A(L(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), d = A(L(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), f = L(t, "chart.grid.labels.color", "#2A2A2A"), p = L(t, "chart.grid.stroke", "#CCCCCC"), m = o ? i.flatMap((e) => N(e.__scaleYLabels)) : N(r.ticks).map((e) => {
396
+ let t = (e - r.min) / (r.max - r.min || 1);
397
+ return {
398
+ value: e,
399
+ y: n.bottom - t * n.height
400
+ };
401
+ }), h = [];
402
+ return m.forEach((e) => {
403
+ Number.isFinite(e.y) && (l && h.push(j("line", {
404
+ "data-cy": "axis-y-tick",
405
+ x1: c ? n.right : n.left,
406
+ x2: c ? n.right + u : n.left - u,
407
+ y1: e.y,
408
+ y2: e.y,
409
+ stroke: p,
410
+ "stroke-width": 1,
411
+ "stroke-linecap": "round"
412
+ })), h.push(z(Y(e.value, t), {
413
+ "data-cy": "axis-y-label",
414
+ transform: `translate(${c ? n.right + u + d + 5 : n.scaleLabelX - u}, ${e.y + s.dataLabels / 3})`,
415
+ "font-size": s.dataLabels,
416
+ "text-anchor": c ? "start" : "end",
417
+ fill: o && e.serie?.color ? L(t, "chart.grid.labels.yAxis.groupColor", null) || e.serie.color : f
418
+ })));
419
+ }), R("g", { "data-layer": "scale-labels" }, h.join(""));
420
+ }
421
+ function De(e) {
422
+ let { config: t, drawingArea: n, series: r } = e, i = q(t), a = J(t), o = X(t), s = e.__scaleGroups ?? ce(t, r), c = L(t, "chart.grid.labels.yAxis.showCrosshairs", !1), l = A(L(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), u = A(L(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), d = A(L(t, "chart.grid.labels.yAxis.labelWidth", 40), 40), f = A(n.individualOffsetX, 36), p = [], m = Object.values(s);
423
+ return m.forEach((e, s) => {
424
+ let h = r.find((t) => H(t) === e.scaleLabel) ?? r[s];
425
+ if (!h) return;
426
+ let g = o ? a ? n.right : n.left : a ? n.right + U(t) * s : n.left - U(t) * (m.length - s - 1), _ = A(h.__yOffset, 0), ee = A(h.__individualHeight, n.height), v = o ? n.bottom - _ - ee : n.top, y = o ? n.bottom - _ : n.bottom;
427
+ p.push(j("line", {
428
+ x1: o || a ? g : g - f,
429
+ x2: o || a ? g : g - f,
430
+ y1: v,
431
+ y2: y,
432
+ stroke: e.color,
433
+ "stroke-width": L(t, "chart.grid.strokeWidth", 1),
434
+ "stroke-linecap": "round"
435
+ }));
436
+ let b = o ? a ? n.right + l + u + 5 + d + f : n.left - l - u - d : a ? g + l + u + 5 + d : g - i.dataLabels / 2;
437
+ p.push(z(e.name, {
438
+ transform: `translate(${b}, ${v + (y - v) / 2}) rotate(-90)`,
439
+ "font-size": i.dataLabels * .8,
440
+ "text-anchor": "middle",
441
+ fill: e.color
442
+ })), N(e.scale.ticks).forEach((r) => {
443
+ let s = y - (r - e.scale.min) / (e.scale.max - e.scale.min || 1) * (y - v);
444
+ Number.isFinite(s) && (c && p.push(j("line", {
445
+ "data-cy": "axis-y-tick",
446
+ x1: o || a ? g : g + 3 - l - f,
447
+ x2: o ? a ? g + l : g - l : a ? g + l : g - f,
448
+ y1: s,
449
+ y2: s,
450
+ stroke: e.color,
451
+ "stroke-width": 1,
452
+ "stroke-linecap": "round"
453
+ })), p.push(z(Y(r, t), {
454
+ "data-cy": "axis-y-label",
455
+ transform: `translate(${o ? a ? n.right + l + u + 5 : n.left - l - u - 5 : a ? g + l + u + 5 : g - 5 - f}, ${s + i.dataLabels / 3})`,
456
+ "font-size": i.dataLabels,
457
+ "text-anchor": a ? "start" : "end",
458
+ fill: e.color
459
+ })));
460
+ });
461
+ }), R("g", { "data-layer": "individual-scale-labels" }, p.join(""));
462
+ }
463
+ function Oe(e, t) {
464
+ let { config: n, drawingArea: r } = e, i = X(n), a = t.filter((e) => e.type === "bar");
465
+ if (!a.length) return "";
466
+ let o = Math.max(1, ...t.map((e) => N(e.plots).length)), s = r.width / o, c = A(L(n, "bar.periodGap", .2), .2), l = A(L(n, "bar.innerGap", .05), .05), u = L(n, "bar.borderRadius", 0), d = [];
467
+ if (i) {
468
+ let t = Math.max(1e-5, s * .9), n = t * Math.min(Math.abs(l), .95);
469
+ return a.forEach((i, a) => {
470
+ let o = Number.isFinite(Number(i.__zeroY)) ? Number(i.__zeroY) : W(e);
471
+ N(i.plots).forEach((c, l) => {
472
+ if (!c || c.value === null || c.value === void 0 || !Number.isFinite(Number(c.value)) || !Number.isFinite(Number(c.y))) return;
473
+ let f = r.left + s * l + s * .05 + n / 2, { y: p, height: m } = se(e, i, c, o);
474
+ c.__barLabelX = f + Math.max(1e-5, t - n) / 2, d.push(j("rect", {
475
+ "data-cy": "datapoint-bar",
476
+ x: f,
477
+ y: p,
478
+ width: Math.max(1e-5, t - n),
479
+ height: m,
480
+ rx: u,
481
+ fill: ye(e, i, a, Number(c.value)),
482
+ ...tt(e, i)
483
+ }));
484
+ });
485
+ }), R("g", { "data-layer": "bars" }, d.join(""));
486
+ }
487
+ let f = s * (1 - c), p = f / Math.max(1, a.length), m = p * Math.min(Math.abs(l), .95);
488
+ return W(e), a.forEach((t, n) => {
489
+ let i = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : W(e);
490
+ N(t.plots).forEach((a, o) => {
491
+ if (!a || a.value === null || a.value === void 0 || !Number.isFinite(Number(a.value)) || !Number.isFinite(Number(a.y))) return;
492
+ let c = r.left + s * o + (s - f) / 2 + p * n + m / 2, { y: l, height: h } = se(e, t, a, i);
493
+ a.__barLabelX = c + Math.max(1e-5, p - m) / 2, d.push(j("rect", {
494
+ "data-cy": "datapoint-bar",
495
+ x: c,
496
+ y: l,
497
+ width: Math.max(1e-5, p - m),
498
+ height: h,
499
+ rx: u,
500
+ fill: ye(e, t, n, Number(a.value)),
501
+ ...tt(e, t)
502
+ }));
503
+ });
504
+ }), R("g", { "data-layer": "bars" }, d.join(""));
505
+ }
506
+ function ke(e) {
507
+ let { config: t, drawingArea: n, scale: r, series: i } = e;
508
+ return V(t) || X(t) ? i.flatMap((e) => N(e.__scaleYLabels)) : N(r.ticks).map((e) => {
509
+ let t = (e - r.min) / (r.max - r.min || 1);
510
+ return {
511
+ value: e,
512
+ y: n.bottom - t * n.height
513
+ };
514
+ });
515
+ }
516
+ function Ae(e, t, n) {
517
+ let { drawingArea: r } = e, i = r.width / Math.max(1, n);
518
+ return r.left + i * t;
519
+ }
520
+ function je(e, t) {
521
+ let { config: n, drawingArea: r } = e, i = Math.max(1, ...t.map((e) => N(e.plots).length)), a = r.top, o = r.bottom;
522
+ if (Q(e)) {
523
+ let e = [...new Set(t.flatMap((e) => N(e.plots)).map((e) => Number(e.x)).filter(Number.isFinite))].sort((e, t) => e - t);
524
+ return e.length ? L(n, "chart.grid.position", "middle") === "middle" ? e.map((e, t, n) => {
525
+ if (t === 0) return null;
526
+ let r = n[t - 1], i = r + (e - r) / 2;
527
+ return `M${i},${a} L${i},${o}`;
528
+ }).filter(Boolean).join(" ") : e.map((e) => `M${e},${a} L${e},${o}`).join(" ") : "";
529
+ }
530
+ let s = i + +(L(n, "chart.grid.position", "middle") === "middle");
531
+ return Array.from({ length: s }).map((t, r) => {
532
+ let s = L(n, "chart.grid.position", "middle") === "middle" ? Ae(e, r, i) : $(e, r, i);
533
+ return `M${s},${a} L${s},${o}`;
534
+ }).join(" ");
535
+ }
536
+ function Me(e) {
537
+ let { config: t, drawingArea: n, scale: r, series: i } = e, a = L(t, "chart.grid.show", !0), o = L(t, "chart.grid.showHorizontalLines", !0), s = L(t, "chart.grid.showVerticalLines", !1), c = L(t, "chart.grid.stroke", "#CCCCCC"), l = A(L(t, "chart.grid.strokeWidth", .5), .5), u = [];
538
+ if (a && o && ke(e).forEach((e) => {
539
+ Number.isFinite(Number(e.y)) && u.push(j("line", {
540
+ "data-cy": "xy-grid-horizontal-line",
541
+ x1: n.left,
542
+ x2: n.right,
543
+ y1: e.y,
544
+ y2: e.y,
545
+ stroke: c,
546
+ "stroke-width": l,
547
+ "stroke-linecap": "round"
548
+ }));
549
+ }), a && s) {
550
+ let t = je(e, i);
551
+ t && u.push(j("path", {
552
+ "data-cy": "xy-grid-vertical-line",
553
+ d: t,
554
+ stroke: c,
555
+ "stroke-width": l,
556
+ "stroke-linecap": "round"
557
+ }));
558
+ }
559
+ u.push(j("line", {
560
+ x1: n.left,
561
+ y1: n.bottom,
562
+ x2: n.right,
563
+ y2: n.bottom,
564
+ stroke: c,
565
+ "stroke-width": l,
566
+ "stroke-linecap": "round"
567
+ }));
568
+ let d = J(t) ? n.right : n.left;
569
+ return u.push(j("line", {
570
+ x1: d,
571
+ y1: n.top,
572
+ x2: d,
573
+ y2: n.bottom,
574
+ stroke: c,
575
+ "stroke-width": l,
576
+ "stroke-linecap": "round"
577
+ })), r.min < 0 && r.max > 0 && u.push(j("line", {
578
+ x1: n.left,
579
+ y1: W(e),
580
+ x2: n.right,
581
+ y2: W(e),
582
+ stroke: c,
583
+ "stroke-width": l,
584
+ "stroke-dasharray": 4,
585
+ "stroke-linecap": "round"
586
+ })), R("g", { "data-layer": "grid" }, u.join(""));
587
+ }
588
+ function Ne(e) {
589
+ return e && typeof e == "object" && Number.isFinite(Number(e.x)) && Number.isFinite(Number(e.y));
590
+ }
591
+ function Q(e) {
592
+ return N(e.series).some((e) => N(e.series).some(Ne));
593
+ }
594
+ function $(e, t, n) {
595
+ let { drawingArea: r, config: i } = e, a = L(i, "chart.grid.position", "middle"), o = r.width, s = a === "middle" ? o / Math.max(1, n) : o / Math.max(1, n - 1);
596
+ return a === "middle" ? r.left + s / 2 + s * t : r.left + s * t;
597
+ }
598
+ function Pe(e) {
599
+ let t = N(e.series).flatMap((e) => N(e.series)).filter(Ne).map((e) => Number(e.x));
600
+ if (!t.length) return {
601
+ min: 0,
602
+ max: 1
603
+ };
604
+ let n = Math.min(...t), r = Math.max(...t);
605
+ return n === r ? {
606
+ min: n - 1,
607
+ max: r + 1
608
+ } : {
609
+ min: n,
610
+ max: r
611
+ };
612
+ }
613
+ function Fe(e, t) {
614
+ let { drawingArea: n, config: r } = e, i = Pe(e), a = (Number(t) - i.min) / (i.max - i.min || 1), o = L(r, "chart.grid.labels.xAxis.reverse", !1) ? 1 - a : a;
615
+ return n.left + n.width * o;
616
+ }
617
+ function Ie(e, t, n) {
618
+ let { config: r } = e;
619
+ return i({
620
+ v: t,
621
+ s: L(r, "chart.labels.prefix", ""),
622
+ p: L(r, "chart.labels.suffix", ""),
623
+ r: L(r, "chart.grid.labels.xAxis.rounding", 0)
624
+ });
625
+ }
626
+ function Le(e) {
627
+ let { scale: t, config: n } = e, r = N(t?.ticks);
628
+ return (L(n, "chart.grid.labels.xAxis.reverse", !1) ? [...r].reverse() : r).map((t, n) => ({
629
+ id: `continuous_x_label_${n}`,
630
+ text: Ie(e, t, n),
631
+ value: t,
632
+ x: Fe(e, t),
633
+ index: n,
634
+ absoluteIndex: n
635
+ }));
636
+ }
637
+ async function Re(e, t) {
638
+ let { config: n } = e, r = Math.max(0, ...t.map((e) => N(e.plots).length));
639
+ return await D({
640
+ values: L(n, "chart.grid.labels.xAxisLabels.values", []),
641
+ maxDatapoints: r,
642
+ formatter: L(n, "chart.grid.labels.xAxisLabels.datetimeFormatter", null),
643
+ start: A(e.slotStartIndex ?? e.startAbs, 0),
644
+ end: A(e.slotEndIndex ?? e.endAbs, r)
645
+ });
646
+ }
647
+ async function ze(e, t) {
648
+ let { config: n } = e, r = L(n, "chart.grid.labels.xAxisLabels", {}), i = Math.max(0, ...t.map((e) => N(e.plots).length)), a = await Re(e, t), o = await D({
649
+ values: L(n, "chart.grid.labels.xAxisLabels.values", []),
650
+ maxDatapoints: i,
651
+ formatter: L(n, "chart.grid.labels.xAxisLabels.datetimeFormatter", null),
652
+ start: 0,
653
+ end: i
654
+ }), s = a.map((e) => e?.text ?? ""), c = o.map((e) => e?.text ?? ""), l = Math.min(A(r.modulo, 1), Math.max(1, new Set(s).size));
655
+ return C(!!r.showOnlyFirstAndLast, !!r.showOnlyAtModulo, Math.max(1, l || 1), s, c, A(e.slotStartIndex ?? e.startAbs, 0), e.selectedXIndex ?? null, i);
656
+ }
657
+ async function Be(e, t) {
658
+ return Q(e) ? Le(e) : await ze(e, t);
659
+ }
660
+ function Ve(e, t, n, r) {
661
+ return Q(e) ? t.x : $(e, n, r);
662
+ }
663
+ function He(e) {
664
+ return S(e.userConfig ?? e.sourceConfig ?? e.props?.config ?? {}, "chart.grid.labels.xAxisLabels.rotation") ? A(L(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0) : L(e.config, "chart.grid.labels.xAxisLabels.autoRotate.enable", !1) ? A(L(e.config, "chart.grid.labels.xAxisLabels.autoRotate.angle", 0), 0) : A(L(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0);
665
+ }
666
+ async function Ue(t, n) {
667
+ let { config: r, drawingArea: i } = t;
668
+ if (!n[0] || !L(r, "chart.grid.labels.xAxisLabels.show", !0)) return "";
669
+ L(r, "chart.grid.labels.xAxisLabels", {});
670
+ let a = A(L(r, "chart.grid.labels.xAxisLabels.fontSize", 12), 12), o = L(r, "chart.grid.labels.xAxisLabels.color", L(r, "chart.grid.labels.color", "#2A2A2A")), s = He(t), c = Math.max(1, n[0].plots.length), l = await Be(t, n), u = s > 0 ? "start" : s < 0 ? "end" : "middle";
671
+ return R("g", { "data-layer": "x-axis-labels" }, l.map((n, r) => {
672
+ let l = typeof n == "string" ? n : n?.text;
673
+ if (!l) return "";
674
+ let d = `translate(${Ve(t, n, r, c)}, ${i.bottom + a * 1.5}), rotate(${s})`;
675
+ return String(l).includes("\n") ? R("text", {
676
+ class: "vue-data-ui-time-label",
677
+ "data-cy": "time-label",
678
+ "text-anchor": u,
679
+ "font-size": a,
680
+ fill: o,
681
+ transform: d
682
+ }, e({
683
+ content: String(l),
684
+ fontSize: a,
685
+ fill: o,
686
+ x: 0,
687
+ y: 0
688
+ })) : z(l, {
689
+ class: "vue-data-ui-time-label",
690
+ "data-cy": "time-label",
691
+ "text-anchor": u,
692
+ "font-size": a,
693
+ fill: o,
694
+ transform: d
695
+ });
696
+ }).join(""));
697
+ }
698
+ function We(e) {
699
+ let { config: t, drawingArea: n, height: r } = e, i = q(t), a = L(t, "chart.grid.labels.axis.xLabel", ""), o = L(t, "chart.grid.labels.axis.yLabel", ""), s = L(t, "chart.grid.labels.axis.color", L(t, "chart.grid.labels.color", "#2A2A2A")), c = A(L(t, "chart.grid.labels.axis.yLabelOffsetX", 0), 0), l = A(L(t, "chart.grid.labels.axis.xLabelOffsetY", 0), 0), u = A(L(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), d = A(L(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), f = A(L(t, "chart.grid.labels.yAxis.labelWidth", 0), 0), p = J(t), m = [];
700
+ if (a && m.push(z(a, {
701
+ x: n.left + n.width / 2,
702
+ y: Math.min(r - 4, n.bottom + i.xAxis * 3 + l),
703
+ "font-size": i.yAxis,
704
+ "text-anchor": "middle",
705
+ fill: s
706
+ })), o) {
707
+ let e = p ? n.right + u + d + 5 + f + c : n.scaleLabelX - u - d - f - c, t = n.top + n.height / 2;
708
+ m.push(z(o, {
709
+ x: e,
710
+ y: t,
711
+ transform: `rotate(-90 ${e} ${t})`,
712
+ "font-size": i.yAxis,
713
+ "text-anchor": "middle",
714
+ fill: s
715
+ }));
716
+ }
717
+ return R("g", { "data-layer": "axis-labels" }, m.join(""));
718
+ }
719
+ async function Ge(e, t) {
720
+ let { config: n, drawingArea: r } = e, i = L(n, "chart.grid.labels.xAxisLabels.show", !0), a = L(n, "chart.grid.labels.xAxis.showCrosshairs", !1);
721
+ if (!i || !a || !t[0]) return "";
722
+ let o = A(L(n, "chart.grid.labels.xAxis.crosshairSize", 6), 6), s = !!L(n, "chart.grid.labels.xAxis.crosshairsAlwaysAtZero", !1), c = Math.max(1, t[0].plots.length), l = await Be(e, t), u = W(e), d = l.map((t, n) => {
723
+ if (!(typeof t == "string" ? t : t?.text)) return "";
724
+ let i = Q(e) ? t.x : $(e, n, c);
725
+ return `M${i},${s ? u - (u === r.bottom ? 0 : o / 2) : r.bottom} L${i},${s ? u + o / (u === r.bottom ? 1 : 2) : r.bottom + o}`;
726
+ }).filter(Boolean).join(" ");
727
+ return d ? R("g", { "data-layer": "x-axis-ticks" }, j("path", {
728
+ d,
729
+ stroke: L(n, "chart.grid.stroke", "#CCCCCC"),
730
+ "stroke-width": 1,
731
+ "stroke-linecap": "round",
732
+ "data-cy": "axis-x-tick"
733
+ })) : "";
734
+ }
735
+ function Ke(e, t) {
736
+ let { config: n, width: r } = e, i = L(n, "chart.legend", {}), a = A(i.fontSize, 12), o = A(i.markerSize, 10), s = A(i.itemGap, 16), c = A(i.rowGap, 8), l = A(i.padding, 8), u = Math.max(1, r - l * 2), d = [], f = [], p = 0;
737
+ return t.forEach((e) => {
738
+ let t = String(e.name ?? ""), n = o + 6 + M(t, a) + s;
739
+ f.length && p + n > u && (d.push({
740
+ items: f,
741
+ width: p
742
+ }), f = [], p = 0), f.push({
743
+ serie: e,
744
+ label: t,
745
+ itemWidth: n
746
+ }), p += n;
747
+ }), f.length && d.push({
748
+ items: f,
749
+ width: p
750
+ }), {
751
+ rows: d,
752
+ fontSize: a,
753
+ markerSize: o,
754
+ itemGap: s,
755
+ rowGap: c,
756
+ padding: l,
757
+ height: d.length * Math.max(o, a) + Math.max(0, d.length - 1) * c + l * 2
758
+ };
759
+ }
760
+ function qe(e, t) {
761
+ let { config: n, width: r, height: i } = e;
762
+ if (!L(n, "chart.legend.show", !0) || !t.length) return "";
763
+ let a = L(n, "chart.legend", {}), o = a.position || "bottom", s = a.color || L(n, "chart.color", "#2A2A2A"), c = Ke(e, t), l = Math.max(c.markerSize, c.fontSize), u = o === "top" ? c.padding + l : i - c.height + c.padding + l, d = [];
764
+ return c.rows.forEach((e, t) => {
765
+ let n = Math.max(c.padding, r / 2 - e.width / 2), i = u + t * (l + c.rowGap);
766
+ e.items.forEach(({ serie: e, label: t, itemWidth: r }) => {
767
+ d.push(j("rect", {
768
+ x: n,
769
+ y: i - c.markerSize / 2,
770
+ width: c.markerSize,
771
+ height: c.markerSize,
772
+ rx: 2,
773
+ fill: e.color
774
+ })), d.push(z(t, {
775
+ x: n + c.markerSize + 6,
776
+ y: i + 2,
777
+ "font-size": c.fontSize,
778
+ "dominant-baseline": "middle",
779
+ fill: s
780
+ })), n += r;
781
+ });
782
+ }), R("g", { "data-layer": "legend" }, d.join(""));
783
+ }
784
+ function Je(e, t) {
785
+ return `areaGradient_${t}_${G()}`;
786
+ }
787
+ function Ye(e, t) {
788
+ let { config: n } = e;
789
+ if (!L(n, "line.area.useGradient", !1)) return "";
790
+ let i = A(L(n, "line.area.opacity", 30), 30), a = t.filter((e) => e.type === "line" && e.useArea).map((t, n) => R("linearGradient", {
791
+ id: Je(e, n),
792
+ x1: "0%",
793
+ x2: "0%",
794
+ y1: "0%",
795
+ y2: "100%"
796
+ }, [j("stop", {
797
+ offset: "0%",
798
+ "stop-color": p(r(E(t.color), .03), i),
799
+ "stop-opacity": 1
800
+ }), j("stop", {
801
+ offset: "100%",
802
+ "stop-color": t.color,
803
+ "stop-opacity": 0
804
+ })].join(""))).join("");
805
+ return a ? R("defs", {}, a) : "";
806
+ }
807
+ function Xe(e, t) {
808
+ let { config: r } = e, i = !!L(r, "line.cutNullValues", !1), a = [];
809
+ return t.filter((e) => e.type === "line" && e.useArea).forEach((t, r) => {
810
+ let o = N(t.plots), s = o.filter((e) => e && e.value !== null);
811
+ if (s.length < 2) return;
812
+ let c = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : W(e), l = ve(e, t, r);
813
+ if (t.smooth && !t.useStepper) {
814
+ d(i ? o : s, c, i).forEach((e) => {
815
+ e && a.push(j("path", {
816
+ d: e,
817
+ fill: l,
818
+ "data-cy": "datapoint-line-area-smooth"
819
+ }));
820
+ });
821
+ return;
822
+ }
823
+ (t.useStepper ? n(i ? o : s, c) : i ? g(o, c) : T(s, c)).split(";").filter(Boolean).forEach((e) => {
824
+ a.push(j("path", {
825
+ d: `M${e}Z`,
826
+ fill: l,
827
+ "data-cy": "datapoint-line-area-straight"
828
+ }));
829
+ });
830
+ }), R("g", { "data-layer": "line-areas" }, a.join(""));
831
+ }
832
+ function Ze(e, t) {
833
+ let n = A(t.slotStartIndex ?? t.startAbs, 0);
834
+ return N(e.dashIndices).map((e) => Number(e) - n).filter(Number.isFinite);
835
+ }
836
+ function Qe(e, t, n, r, i) {
837
+ let { config: a } = e, o = A(t.strokeWidth || L(a, "line.strokeWidth", 2), 2);
838
+ return j("path", {
839
+ d: `M${r}`,
840
+ fill: "none",
841
+ stroke: he(e, t, n),
842
+ "stroke-width": o,
843
+ "stroke-linecap": "round",
844
+ "stroke-linejoin": "round",
845
+ "stroke-dasharray": i ? o * 2 : 0
846
+ });
847
+ }
848
+ function $e(e, t) {
849
+ let { config: r } = e, i = t.filter((e) => e.type === "line"), a = !!L(r, "line.cutNullValues", !1), o = [];
850
+ return i.forEach((t, i) => {
851
+ let u = a ? N(t.plots) : N(t.plots).filter((e) => e.value !== null), d = u.filter((e) => e.value !== null);
852
+ if (!(d.length < 2)) {
853
+ if (N(t.dashIndices).length > 0 && !t.useStepper) {
854
+ let n = Ze(t, e);
855
+ (t.smooth || L(r, "line.smooth", !1) ? l(u, n) : h(u, n)).forEach((n) => {
856
+ n?.path && o.push(Qe(e, t, i, n.path, !!n.dashed));
857
+ });
858
+ return;
859
+ }
860
+ (t.useStepper ? n(u).split(";").filter(Boolean) : [t.smooth || L(r, "line.smooth", !1) ? a ? x(u) : te(d) : a ? c(u) : s(d, !1, !0)]).forEach((n) => {
861
+ n && o.push(Qe(e, t, i, n, !!t.dashed));
862
+ });
863
+ }
864
+ }), R("g", { "data-layer": "lines" }, o.join(""));
865
+ }
866
+ function et(e, t, n) {
867
+ let { config: r } = e;
868
+ return L(r, "plot.useGradient", !1) ? `url(#${ge(e, n)})` : L(r, "plot.dot.useSerieColor", !0) ? t.color : L(r, "plot.dot.fill", t.color);
869
+ }
870
+ function tt(e, t) {
871
+ let n = L(e.config, "bar.border", {});
872
+ return {
873
+ stroke: n.useSerieColor ? t.color : n.stroke,
874
+ "stroke-width": A(n.strokeWidth, 0)
875
+ };
876
+ }
877
+ function nt(e, t) {
878
+ let { config: n } = e, r = t.filter((e) => e.type === "plot"), i = L(n, "plot.radius", 4), a = L(n, "plot.dot.strokeWidth", 2), o = L(n, "chart.backgroundColor", "#FFFFFF"), s = [];
879
+ return r.forEach((t, r) => {
880
+ t.plots.forEach((c, l) => {
881
+ I(c.value) && s.push(P({
882
+ dataCy: `xy-plot-${r}-${l}`,
883
+ shape: t.shape,
884
+ plot: c,
885
+ radius: t.radius || i,
886
+ fill: et(e, t, r),
887
+ stroke: L(n, "plot.dot.useSerieColor", !0) ? o : t.color,
888
+ strokeWidth: a
889
+ }));
890
+ });
891
+ }), R("g", { "data-layer": "plots" }, s.join(""));
892
+ }
893
+ function rt(e) {
894
+ return ![
895
+ null,
896
+ void 0,
897
+ NaN,
898
+ Infinity,
899
+ -Infinity
900
+ ].includes(e);
901
+ }
902
+ function it(e, t, n) {
903
+ let r = e[t - 1], i = e[t + 1], a = !!r && !!i && r.value == null && i.value == null || !r && !!i && i.value == null || !!r && !i && r.value == null;
904
+ return rt(e[t]?.value) && a && !!L(n, "line.cutNullValues", !1);
905
+ }
906
+ function at(e, t, n, r, i) {
907
+ let { config: a } = e;
908
+ if (!n || !rt(n.value)) return !1;
909
+ if (!(i > A(L(a, "line.dot.hideAboveMaxSerieLength", Infinity), Infinity))) return !0;
910
+ let o = e.selectedSerieIndex ?? null, s = e.selectedMinimapIndex ?? null;
911
+ return o !== null && o === r || s !== null && s === r || it(t.plots, r, a);
912
+ }
913
+ function ot(e, t) {
914
+ let { config: n } = e, r = t.filter((e) => e.type === "line"), i = Math.max(0, ...r.map((e) => N(e.plots).length)), a = L(n, "line.radius", 4), o = L(n, "line.dot.strokeWidth", 2), s = L(n, "chart.backgroundColor", "#FFFFFF"), c = [];
915
+ return r.forEach((t, r) => {
916
+ t.plots.forEach((l, u) => {
917
+ at(e, t, l, u, i) && c.push(P({
918
+ dataCy: "datapoint-line-plot",
919
+ shape: t.shape,
920
+ plot: l,
921
+ radius: t.radius || a,
922
+ fill: _e(e, t, r),
923
+ stroke: L(n, "line.dot.useSerieColor", !0) ? s : t.color,
924
+ strokeWidth: o
925
+ }));
926
+ });
927
+ }), R("g", { "data-layer": "line-dots" }, c.join(""));
928
+ }
929
+ function st(e, t) {
930
+ let { config: n } = e;
931
+ if (X(n)) return "";
932
+ let r = L(n, "line.interLine", {}), i = N(r.pairs), a = N(r.colors);
933
+ if (!i.length) return "";
934
+ let o = t.filter((e) => e.type === "line"), s = A(r.fillOpacity, .2), c = !!L(n, "line.cutNullValues", !1), l = [];
935
+ return i.forEach((e, t) => {
936
+ let [n, r] = Array.isArray(e) ? e : [e?.a, e?.b];
937
+ if (!n || !r) return;
938
+ let i = o.find((e) => e.name === n), u = o.find((e) => e.name === r);
939
+ if (!i || !u) return;
940
+ let d = a?.[t]?.[0] ?? i.color, f = a?.[t]?.[1] ?? u.color;
941
+ ee({
942
+ lineA: N(i.plots),
943
+ lineB: N(u.plots),
944
+ smoothA: !!i.smooth,
945
+ smoothB: !!u.smooth,
946
+ colorLineA: d,
947
+ colorLineB: f,
948
+ sampleStepPx: 2,
949
+ cutNullValues: c
950
+ }).forEach((e, i) => {
951
+ l.push(j("path", {
952
+ "data-cy": "interline-area",
953
+ d: e.d,
954
+ fill: e.color,
955
+ "fill-opacity": s,
956
+ stroke: "none",
957
+ "pointer-events": "none",
958
+ "data-key": `inter_${n}_${r}_${t}_${i}`
959
+ }));
960
+ });
961
+ }), l.length ? R("g", { "data-layer": "interline-areas" }, l.join("")) : "";
962
+ }
963
+ function ct(e) {
964
+ let t = L(e, "chart.title", {}), n = L(t, "subtitle", {});
965
+ if (!t.show) return 0;
966
+ let r = A(t.fontSize, 20), i = n.text ? A(n.fontSize, 14) : 0, a = A(t.paddingTop, 12), o = A(t.paddingBottom, 6);
967
+ return a + r + (n.text ? i + 4 : 0) + o;
968
+ }
969
+ function lt(e) {
970
+ let { config: t, width: n } = e, r = L(t, "chart.title", {}), i = L(r, "subtitle", {});
971
+ if (!r.show || !r.text) return "";
972
+ let a = r.textAlign || "center", o = a === "left" ? A(r.paddingLeft, 12) : a === "right" ? n - A(r.paddingRight, 12) : n / 2, s = a === "left" ? "start" : a === "right" ? "end" : "middle", c = A(r.fontSize, 20), l = A(i.fontSize, 14), u = A(r.paddingTop, 12) + c, d = [z(r.text, {
973
+ "data-cy": "xy-div-title",
974
+ x: o,
975
+ y: u,
976
+ "font-size": c,
977
+ "font-weight": r.bold ? "700" : "400",
978
+ "text-anchor": s,
979
+ fill: r.color || L(t, "chart.color", "#2A2A2A")
980
+ })];
981
+ return i.text && d.push(z(i.text, {
982
+ "data-cy": "xy-div-subtitle",
983
+ x: o,
984
+ y: u + l + 4,
985
+ "font-size": l,
986
+ "font-weight": i.bold ? "700" : "400",
987
+ "text-anchor": s,
988
+ fill: i.color || r.color || L(t, "chart.color", "#2A2A2A")
989
+ })), R("g", { "data-layer": "title" }, d.join(""));
990
+ }
991
+ function ut(e) {
992
+ return e.svgTitle ? R("desc", { "aria-hidden": "true" }, [e.svgTitle].join("")) : "";
993
+ }
994
+ function dt(e, t, n, r, i) {
995
+ return !n || n.value === null || n.value === void 0 || !Number.isFinite(Number(n.value)) || !L(e.config, "dataLabels.show", !0) || !L(e.config, `${i}.labels.show`, !1) ? !1 : !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || e.selectedSerieIndex === r || e.selectedMinimapIndex === r;
996
+ }
997
+ function ft(t, n, r, a) {
998
+ let { config: o } = t, s = A(L(o, `${a}.labels.fontSize`, L(o, "chart.labels.fontSize", 12)), 12), c = L(o, `${a}.labels.color`, L(o, "chart.color", "#2A2A2A")), l = i({
999
+ p: n.prefix || L(o, "chart.labels.prefix", ""),
1000
+ v: r.value,
1001
+ s: n.suffix || L(o, "chart.labels.suffix", ""),
1002
+ r: L(o, `${a}.labels.rounding`, 0)
1003
+ });
1004
+ return e({
1005
+ content: Q(t) && Number.isFinite(Number(r.x)) ? `x: ${i({
1006
+ v: r.x,
1007
+ r: L(o, "chart.grid.labels.xAxis.rounding", 0)
1008
+ })}\ny: ${l}` : b(L(o, `${a}.labels.formatter`, null), r.value, l, {
1009
+ datapoint: r,
1010
+ serie: n
1011
+ }),
1012
+ fontSize: s,
1013
+ fill: c,
1014
+ x: 0,
1015
+ y: 0
1016
+ });
1017
+ }
1018
+ function pt(e, t, n) {
1019
+ let r = L(e.config, `${n}.labels.textAnchor`, null);
1020
+ return r === null ? A(L(e.config, `${n}.labels.rotation`, 0), 0) === 0 ? "middle" : L(e.config, `${n}.labels.alwaysOnTop`, !1) || t.value >= 0 ? "start" : "end" : r;
1021
+ }
1022
+ function mt(e, t, n) {
1023
+ let r = A(L(e.config, `${n}.labels.offsetX`, 0), 0), i = A(L(e.config, `${n}.labels.offsetY`, -12), -12), a = A(L(e.config, `${n}.labels.rotation`, 0), 0), o = !!L(e.config, `${n}.labels.alwaysOnTop`, !1);
1024
+ return `translate(${t.x + r}, ${t.y + (o || t.value >= 0 ? i : -i * 3)}) rotate(${a})`;
1025
+ }
1026
+ function ht(e, t, n) {
1027
+ let r = A(L(e.config, "bar.labels.offsetX", 0), 0), i = A(L(e.config, "bar.labels.offsetY", -6), -6), a = A(L(e.config, "bar.labels.rotation", 0), 0), o = !!L(e.config, "bar.labels.alwaysOnTop", !1), s = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : W(e), c = Math.abs(s - n.y), l = n.__barLabelX ?? n.x, u = n.y + (o ? i - (n.value < 0 ? c : 0) : n.value >= 0 ? i : -i * 3);
1028
+ return `translate(${l + r}, ${u}) rotate(${a})`;
1029
+ }
1030
+ function gt(e, t) {
1031
+ let { config: n } = e, r = A(L(n, "chart.labels.fontSize", 12), 12), i = L(n, "chart.backgroundColor", "#FFFFFF"), a = [];
1032
+ return t.forEach((t) => {
1033
+ N(t.plots).forEach((o, s) => {
1034
+ let c = t.type;
1035
+ [
1036
+ "line",
1037
+ "bar",
1038
+ "plot"
1039
+ ].includes(c) && dt(e, t, o, s, c) && a.push(R("text", {
1040
+ "data-cy": `datapoint-${c}-label`,
1041
+ transform: c === "bar" ? ht(e, t, o) : mt(e, o, c),
1042
+ "text-anchor": pt(e, o, c),
1043
+ "font-size": L(n, `${c}.labels.fontSize`, r),
1044
+ fill: L(n, `${c}.labels.color`, L(n, "chart.color", "#2A2A2A")),
1045
+ stroke: i,
1046
+ "paint-order": "stroke"
1047
+ }, ft(e, t, o, c)));
1048
+ });
1049
+ }), R("g", { "data-layer": "datapoint-labels" }, a.join(""));
1050
+ }
1051
+ function _t(e) {
1052
+ return A(e.slotStartIndex ?? e.startAbs, 0);
1053
+ }
1054
+ function vt(e, t) {
1055
+ let n = Math.max(0, ...t.map((e) => N(e.plots).length));
1056
+ return A(e.slotEndIndex ?? e.endAbs, n);
1057
+ }
1058
+ function yt(e, t) {
1059
+ let { drawingArea: n, config: r } = e;
1060
+ return L(r, "chart.grid.position", "middle") === "middle" ? n.width / Math.max(1, t) : n.width / Math.max(1, t - 1);
1061
+ }
1062
+ function bt(e, t, n) {
1063
+ let { drawingArea: r, config: i } = e, a = yt(e, n);
1064
+ return L(i, "chart.grid.position", "middle") === "middle" ? r.left + a * t : r.left + a * t - a / 2;
1065
+ }
1066
+ function xt(e, t) {
1067
+ return yt(e, t);
1068
+ }
1069
+ function St(e, t, n, r, i, a) {
1070
+ let { drawingArea: o } = e, s = t.caption ?? {};
1071
+ if (!s.text) return "";
1072
+ let c = xt(e, a) * i, l = s.width === "auto" ? c : A(s.width, c), u = bt(e, r, a) - (s.width === "auto" ? 0 : l / 2 - c / 2), d = o.top + A(s.offsetY, 0);
1073
+ return R("foreignObject", {
1074
+ "data-key": `highlight_area_caption_${n}`,
1075
+ x: u,
1076
+ y: d,
1077
+ width: l,
1078
+ height: 1,
1079
+ overflow: "visible"
1080
+ }, R("div", {
1081
+ xmlns: "http://www.w3.org/1999/xhtml",
1082
+ "data-cy": "highlight-area-caption",
1083
+ style: [
1084
+ `padding:${A(s.padding, 0)}px`,
1085
+ `text-align:${s.textAlign || "center"}`,
1086
+ `font-size:${A(s.fontSize, 12)}px`,
1087
+ `color:${s.color || "#2A2A2A"}`,
1088
+ `font-weight:${s.bold ? "bold" : "normal"}`
1089
+ ].join(";")
1090
+ }, m(s.text)));
1091
+ }
1092
+ function Ct(e, t) {
1093
+ let { config: n, drawingArea: r } = e, i = N(L(n, "chart.highlightArea", []));
1094
+ if (!i.length) return "";
1095
+ let a = Math.max(1, ...t.map((e) => N(e.plots).length)), o = _t(e), s = vt(e, t), c = [];
1096
+ return i.forEach((t, n) => {
1097
+ if (!t?.show) return;
1098
+ let i = A(t.from, 0), l = Math.min(A(t.to, i), a - 1);
1099
+ if (l < i) return;
1100
+ for (let u = i; u <= l; u += 1) {
1101
+ if (u < o || u > s - 1) continue;
1102
+ let i = u - o;
1103
+ c.push(j("rect", {
1104
+ "data-cy": "highlight-area",
1105
+ "data-key": `highlight_area_${n}_${u}`,
1106
+ x: bt(e, i, a),
1107
+ y: r.top,
1108
+ width: xt(e, a),
1109
+ height: Math.max(1, r.height),
1110
+ fill: p(t.color, A(t.opacity, 20)),
1111
+ "pointer-events": "none"
1112
+ }));
1113
+ }
1114
+ let u = Math.max(i, o);
1115
+ u <= Math.min(l, s - 1) && c.push(St(e, t, n, u - o, l - i + 1, a));
1116
+ }), c.length ? R("g", { "data-layer": "highlight-areas" }, c.join("")) : "";
1117
+ }
1118
+ function wt(e, t) {
1119
+ if (t == null) return null;
1120
+ let { drawingArea: n, scale: r } = e, i = W(e), a = r.max - r.min || 1;
1121
+ return i - (Number(t) - 0) / a * n.height;
1122
+ }
1123
+ function Tt(e) {
1124
+ return M(e.text, A(e.fontSize, 12));
1125
+ }
1126
+ function Et(e, t, n) {
1127
+ let r = A(e.fontSize, 12), i = e.padding ?? {}, a = e.border ?? {}, o = Tt(e), s = r, c;
1128
+ return c = e.textAnchor === "middle" ? t - o / 2 - A(i.left, 0) : e.textAnchor === "end" ? t - o - A(i.right, 0) : t - A(i.left, 0), {
1129
+ x: c,
1130
+ y: n - s * .75 - A(i.top, 0),
1131
+ width: o + A(i.left, 0) + A(i.right, 0),
1132
+ height: s + A(i.top, 0) + A(i.bottom, 0),
1133
+ fill: e.backgroundColor,
1134
+ stroke: a.stroke,
1135
+ rx: a.rx,
1136
+ ry: a.ry,
1137
+ "stroke-width": a.strokeWidth
1138
+ };
1139
+ }
1140
+ function Dt(e) {
1141
+ let { config: t, drawingArea: n } = e;
1142
+ if (X(t)) return "";
1143
+ let r = N(L(t, "chart.annotations", [])).filter((e) => e?.show && (e.yAxis?.yTop !== null || e.yAxis?.yBottom !== null) && (e.yAxis?.yTop !== void 0 || e.yAxis?.yBottom !== void 0));
1144
+ if (!r.length) return "";
1145
+ let i = [];
1146
+ return r.forEach((t, r) => {
1147
+ let a = t.yAxis ?? {}, o = a.label ?? {}, s = a.line ?? {}, c = a.area ?? {}, l = a.yTop, u = a.yBottom, d = l != null && u != null && l !== u, f = wt(e, l), m = wt(e, u), h = Number.isFinite(f), g = Number.isFinite(m);
1148
+ if (!h && !g) return;
1149
+ let _ = [];
1150
+ if (h && _.push(j("line", {
1151
+ x1: n.left,
1152
+ y1: f,
1153
+ x2: n.right,
1154
+ y2: f,
1155
+ stroke: s.stroke,
1156
+ "stroke-width": s.strokeWidth,
1157
+ "stroke-dasharray": s.strokeDasharray,
1158
+ "stroke-linecap": "round",
1159
+ "data-cy": "xy-annotation-y-top-line"
1160
+ })), g && _.push(j("line", {
1161
+ x1: n.left,
1162
+ y1: m,
1163
+ x2: n.right,
1164
+ y2: m,
1165
+ stroke: s.stroke,
1166
+ "stroke-width": s.strokeWidth,
1167
+ "stroke-dasharray": s.strokeDasharray,
1168
+ "stroke-linecap": "round",
1169
+ "data-cy": "xy-annotation-y-bottom-line"
1170
+ })), d && h && g && _.push(j("rect", {
1171
+ x: n.left,
1172
+ y: Math.min(f, m),
1173
+ width: n.width,
1174
+ height: Math.abs(f - m),
1175
+ fill: p(c.fill, A(c.opacity, 20)),
1176
+ "data-cy": "xy-annotation-y-area",
1177
+ "pointer-events": "none"
1178
+ })), o.text) {
1179
+ let e = o.padding ?? {}, t = h && g ? Math.min(f, m) : h ? f : m, r = (o.position === "start" ? n.left + A(e.left, 0) : n.right - A(e.right, 0)) + A(o.offsetX, 0), i = t - A(o.fontSize, 12) / 3 + A(o.offsetY, 0) - A(e.top, 0), a = Et(o, r, i);
1180
+ Number.isFinite(a.y) && Number.isFinite(i) && (_.push(j("rect", {
1181
+ class: "vue-ui-xy-annotation-label-box",
1182
+ ...a,
1183
+ "data-cy": "xy-annotation-label-box"
1184
+ })), _.push(z(o.text, {
1185
+ class: "vue-ui-xy-annotation-label",
1186
+ x: r,
1187
+ y: i,
1188
+ "font-size": o.fontSize,
1189
+ fill: o.color,
1190
+ "text-anchor": o.textAnchor,
1191
+ "data-cy": "xy-annotation-label"
1192
+ })));
1193
+ }
1194
+ i.push(R("g", {
1195
+ "data-layer": "annotation",
1196
+ "data-key": `annotation_y_${r}`
1197
+ }, _.join("")));
1198
+ }), i.length ? R("g", { "data-layer": "annotations" }, i.join("")) : "";
1199
+ }
1200
+ function Ot(e, t) {
1201
+ let n = e.additionalSvgContent;
1202
+ return typeof n == "function" ? n({
1203
+ width: e.width,
1204
+ height: e.height,
1205
+ drawingArea: e.drawingArea,
1206
+ scale: e.scale,
1207
+ config: e.config,
1208
+ series: t.map((e) => ({
1209
+ ...e,
1210
+ plots: N(e.plots).map((e) => ({ ...e }))
1211
+ }))
1212
+ }) ?? "" : n ?? "";
1213
+ }
1214
+ async function kt(e) {
1215
+ let t = e.config, n = A(e.width, t.chart.width ?? 1e3), r = A(e.height, t.chart.height ?? 600), i = de({
1216
+ ...e,
1217
+ config: t,
1218
+ width: n,
1219
+ height: r
1220
+ }), a = Te({
1221
+ ...e,
1222
+ config: t,
1223
+ width: n,
1224
+ height: r,
1225
+ scale: ae(t, e.scale, i)
1226
+ }, i), o = a.series;
1227
+ return `
1228
+ <svg
1229
+ xmlns="${w}"
1230
+ width="100%"
1231
+ viewBox="0 0 ${n} ${r}"
1232
+ role="img"
1233
+ >
1234
+ ${F()}
1235
+ ${ut(a)}
1236
+ ${Ye(a, o)}
1237
+ ${be(a, o)}
1238
+ ${xe(a)}
1239
+ ${lt(a)}
1240
+ ${Ct(a, o)}
1241
+ ${Me(a)}
1242
+ ${await Ge(a, o)}
1243
+ ${Ee(a)}
1244
+ ${We(a)}
1245
+ ${await Ue(a, o)}
1246
+ ${Oe(a, o)}
1247
+ ${st(a, o)}
1248
+ ${Xe(a, o)}
1249
+ ${$e(a, o)}
1250
+ ${nt(a, o)}
1251
+ ${ot(a, o)}
1252
+ ${gt(a, o)}
1253
+ ${qe(a, o)}
1254
+ ${Dt(a)}
1255
+ ${Ot(a, o)}
1256
+ </svg>`.trim();
1257
+ }
1258
+ //#endregion
1259
+ //#region src/svg/vue-ui-xy/index.js
1260
+ async function At(e = {}) {
1261
+ return await kt(re(e));
1262
+ }
1263
+ //#endregion
1264
+ export { At as t };