vue-data-ui 3.15.12 → 3.16.1

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 (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -1,1273 +0,0 @@
1
- import { ref as C, onMounted as Ze, onBeforeUnmount as De, computed as y, watch as z, nextTick as U, openBlock as p, createElementBlock as k, Fragment as be, renderList as Ce, createElementVNode as L, createCommentVNode as A, defineAsyncComponent as ot, toRefs as At, shallowRef as st, watchEffect as Pt, normalizeStyle as ae, renderSlot as ge, normalizeProps as it, guardReactiveProps as ct, toDisplayString as Te, unref as g, createVNode as _t, createBlock as Ie, withCtx as Nt, createTextVNode as Tt } from "vue";
2
- import { j as It, t as dt, aC as We, o as vt, q as ht, r as Rt, v as Re, Y as Bt, ao as Et, c as Oe, b as ft, s as Dt, X as Ft, u as Be, V as qt, G as pt, k as ze, l as je, aD as Gt } from "./lib-GwPnJSrY.js";
3
- import { t as Vt, u as Wt } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ot } from "./useConfig-CIgyKZ6R.js";
5
- import { u as zt, B as jt } from "./BaseScanner-BhhkKVoj.js";
6
- import { u as Ye } from "./useNestedProp-BBT0mbHh.js";
7
- import { u as Yt } from "./useThemeCheck-D1ZYXUwG.js";
8
- import { u as Xt } from "./useTimeLabels-C-A2uZKi.js";
9
- import { u as Kt } from "./useChartAccessibility-9icAAmYg.js";
10
- import Ut from "./vue_ui_sparkline-CQ8DJVJx.js";
11
- import { _ as Ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- function Zt() {
13
- const e = C(!1);
14
- return Ze(() => {
15
- const a = window.matchMedia("(prefers-reduced-motion: reduce)"), l = () => {
16
- e.value = a.matches;
17
- };
18
- l(), a.addEventListener("change", l), De(() => {
19
- a.removeEventListener("change", l);
20
- });
21
- }), e;
22
- }
23
- const Jt = {
24
- key: 0,
25
- style: { "pointer-events": "none" }
26
- }, Qt = ["r", "fill", "filter"], ea = ["begin", "dur", "repeatCount", "fill", "calcMode", "keySplines", "keyTimes", "keyPoints"], ta = ["href"], aa = ["dur", "repeatCount", "fill", "values"], la = ["r", "fill"], na = ["begin", "dur", "repeatCount", "calcMode", "keySplines", "keyTimes", "keyPoints"], ra = ["href"], ua = ["dur", "repeatCount"], oa = {
27
- __name: "SparklinePulse",
28
- props: {
29
- uid: { type: String, required: !0 },
30
- svgRef: { type: Object, default: null },
31
- pulsePathId: { type: String, required: !0 },
32
- pulsePathLength: { type: Number, required: !0 },
33
- pulseDur: { type: String, required: !0 },
34
- pulseBegin: { type: String, required: !0 },
35
- pulseRepeatCount: { type: String, required: !0 },
36
- pulseFillMode: { type: String, default: void 0 },
37
- pulseKeyPoints: { type: String, required: !0 },
38
- pulseMotion: { type: Object, required: !0 },
39
- pulse: { type: Object, required: !0 },
40
- pulseTrail: { type: Object, required: !0 },
41
- pulseTrailLength: { type: Number, required: !0 },
42
- prefersReducedMotion: { type: Boolean, required: !0 },
43
- loading: { type: Boolean, required: !0 },
44
- isBar: { type: Boolean, required: !0 }
45
- },
46
- setup(e) {
47
- const a = e, l = y(() => Math.min(a.pulseTrailLength, 45)), o = y(() => !!a.pulse?.show && !a.isBar && !a.prefersReducedMotion && !a.loading && Number(a.pulsePathLength) > 0);
48
- function r() {
49
- const i = a.svgRef?.value;
50
- i && (typeof i.pauseAnimations == "function" && i.pauseAnimations(), typeof i.setCurrentTime == "function" && i.setCurrentTime(0), typeof i.unpauseAnimations == "function" && i.unpauseAnimations());
51
- }
52
- function c(i, x) {
53
- if (typeof i != "string") return i;
54
- const v = i.trim().match(/^([\d.]+)\s*(ms|s)$/);
55
- if (!v) return i;
56
- const m = Number(v[1]), P = v[2];
57
- return Number.isNaN(m) ? i : `${m + x}${P}`;
58
- }
59
- function d(i) {
60
- return (l.value - i) / l.value * a.pulse.radius;
61
- }
62
- function f(i) {
63
- const x = a.pulse.trail.opacity, v = (l.value - i) / l.value, m = i === 0 ? 1 : v * x;
64
- return `0;${m};${m};0`;
65
- }
66
- return z(
67
- () => a.loading,
68
- async (i) => {
69
- if (i) {
70
- r();
71
- return;
72
- }
73
- await U(), r();
74
- }
75
- ), z(
76
- () => a.pulsePathId,
77
- async () => {
78
- await U(), r();
79
- }
80
- ), De(() => {
81
- r();
82
- }), (i, x) => o.value ? (p(), k("g", Jt, [
83
- (p(!0), k(be, null, Ce(l.value, (v, m) => (p(), k(be, null, [
84
- m % 3 === 0 ? (p(), k("circle", {
85
- key: `sparkline_dot_${m}_${e.pulsePathId}`,
86
- r: d(m),
87
- fill: e.pulse.color,
88
- filter: `url(#sparkline_pulse_glow_${e.uid})`,
89
- opacity: "0"
90
- }, [
91
- L("animateMotion", {
92
- begin: c(e.pulseBegin, m * 10),
93
- dur: e.pulseDur,
94
- repeatCount: e.pulseRepeatCount,
95
- fill: e.pulseFillMode,
96
- calcMode: e.pulseMotion.calcMode,
97
- keySplines: e.pulseMotion.keySplines || void 0,
98
- keyTimes: e.pulseMotion.keyTimes || void 0,
99
- keyPoints: e.pulseKeyPoints,
100
- rotate: "auto"
101
- }, [
102
- L("mpath", {
103
- href: `#${e.pulsePathId}`
104
- }, null, 8, ta)
105
- ], 8, ea),
106
- L("animate", {
107
- attributeName: "opacity",
108
- dur: e.pulseDur,
109
- repeatCount: e.pulseRepeatCount,
110
- fill: e.pulseFillMode,
111
- values: f(m),
112
- keyTimes: "0;0.1;0.9;1"
113
- }, null, 8, aa)
114
- ], 8, Qt)) : A("", !0)
115
- ], 64))), 256)),
116
- (p(), k("circle", {
117
- key: `sparkline_halo_${e.pulsePathId}`,
118
- r: Math.max(e.pulse.radius * 1.3),
119
- fill: e.pulse.color,
120
- opacity: "0"
121
- }, [
122
- L("animateMotion", {
123
- begin: e.pulseBegin,
124
- dur: e.pulseDur,
125
- repeatCount: e.pulseRepeatCount,
126
- calcMode: e.pulseMotion.calcMode,
127
- keySplines: e.pulseMotion.keySplines || void 0,
128
- keyTimes: e.pulseMotion.keyTimes || void 0,
129
- keyPoints: e.pulseKeyPoints,
130
- rotate: "auto"
131
- }, [
132
- L("mpath", {
133
- href: `#${e.pulsePathId}`
134
- }, null, 8, ra)
135
- ], 8, na),
136
- L("animate", {
137
- attributeName: "opacity",
138
- values: "0;0.35;0.35;0",
139
- keyTimes: "0;0.15;0.85;1",
140
- dur: e.pulseDur,
141
- repeatCount: e.pulseRepeatCount
142
- }, null, 8, ua)
143
- ], 8, la))
144
- ])) : A("", !0);
145
- }
146
- }, Ee = {
147
- canvas: null,
148
- ctx: null
149
- };
150
- function sa() {
151
- if (typeof document > "u")
152
- throw new Error("color-utils: document is not available (browser-only).");
153
- if (!Ee.canvas) {
154
- const e = document.createElement("canvas");
155
- e.width = 1, e.height = 1;
156
- const a = e.getContext("2d", { willReadFrequently: !0 });
157
- if (!a)
158
- throw new Error("color-utils: unable to get 2D canvas context.");
159
- Ee.canvas = e, Ee.ctx = a;
160
- }
161
- return Ee.ctx;
162
- }
163
- function ia(e) {
164
- return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
165
- }
166
- function Qe(e) {
167
- return e < 0 ? 0 : e > 1 ? 1 : e;
168
- }
169
- function ca(e, a = null) {
170
- if (typeof e != "string" || e.trim().length === 0)
171
- throw new Error("colorToRgba: inputColor must be a non-empty string.");
172
- const l = e.trim();
173
- if (l.toLowerCase() === "transparent")
174
- return { red: 0, green: 0, blue: 0, alpha: 0 };
175
- const o = da(l, a), r = sa();
176
- r.clearRect(0, 0, 1, 1), r.fillStyle = "#000";
177
- const c = r.fillStyle;
178
- if (r.fillStyle = o, r.fillStyle === c && !va(o))
179
- throw new Error(`colorToRgba: unsupported or invalid color "${e}".`);
180
- r.fillRect(0, 0, 1, 1);
181
- const f = r.getImageData(0, 0, 1, 1).data;
182
- return {
183
- red: f[0],
184
- green: f[1],
185
- blue: f[2],
186
- alpha: f[3] / 255
187
- };
188
- }
189
- function gt(e, a = null) {
190
- if (!Array.isArray(e) || e.length === 0)
191
- throw new Error("colorsToRgba: colors must be a non-empty array.");
192
- const l = new Array(e.length);
193
- for (let o = 0; o < e.length; o += 1)
194
- l[o] = ca(e[o], a);
195
- return l;
196
- }
197
- function da(e, a = null) {
198
- return e !== "currentColor" || typeof window > "u" || !a ? e : window.getComputedStyle(a).color || e;
199
- }
200
- function va(e) {
201
- const a = e.trim().toLowerCase();
202
- return a === "black" || a === "#000" || a === "#000000" || a === "rgb(0, 0, 0)" || a === "rgba(0, 0, 0, 1)" || a === "rgba(0, 0, 0, 0)";
203
- }
204
- function ye(e) {
205
- const a = Qe(e / 255);
206
- return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
207
- }
208
- function Xe(e) {
209
- const a = Qe(e);
210
- let l;
211
- return a <= 31308e-7 ? l = a * 12.92 : l = 1.055 * Math.pow(a, 1 / 2.4) - 0.055, ia(l * 255);
212
- }
213
- function yt(e, a, l, o) {
214
- const r = Qe(l);
215
- if (o === "linearRGB") {
216
- const c = ye(e.red), d = ye(e.green), f = ye(e.blue), i = ye(a.red), x = ye(a.green), v = ye(a.blue), m = c + (i - c) * r, P = d + (x - d) * r, N = f + (v - f) * r;
217
- return {
218
- red: Xe(m),
219
- green: Xe(P),
220
- blue: Xe(N),
221
- alpha: e.alpha + (a.alpha - e.alpha) * r
222
- };
223
- }
224
- return {
225
- red: e.red + (a.red - e.red) * r,
226
- green: e.green + (a.green - e.green) * r,
227
- blue: e.blue + (a.blue - e.blue) * r,
228
- alpha: e.alpha + (a.alpha - e.alpha) * r
229
- };
230
- }
231
- function V(e, a, l) {
232
- let o = e;
233
- return o < a && (o = a), o > l && (o = l), o;
234
- }
235
- function H(e, a) {
236
- const l = Math.pow(10, a);
237
- return Math.round(e * l) / l;
238
- }
239
- function le(e) {
240
- return Number.isFinite(e) ? e.toString() : "0";
241
- }
242
- function Ke(e) {
243
- const l = V(e, 0, 255).toString(16);
244
- return l.length === 1 ? "0" + l : l;
245
- }
246
- function ha(e) {
247
- if (typeof e != "string") return;
248
- const a = Number.parseFloat(e);
249
- return Number.isFinite(a) ? a : void 0;
250
- }
251
- function fa(e, a, l, o = !0) {
252
- const r = l - a;
253
- if (r === 0) return 0;
254
- const c = (e - a) / r;
255
- return o ? V(c, 0, 1) : c;
256
- }
257
- const mt = "http://www.w3.org/2000/svg";
258
- function pa(e) {
259
- if (typeof document > "u")
260
- throw new Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
261
- const a = document.createElementNS(mt, "svg");
262
- a.setAttribute("width", "0"), a.setAttribute("height", "0"), a.setAttribute("viewBox", "0 0 0 0"), a.style.position = "absolute", a.style.left = "-10000px", a.style.top = "-10000px", a.style.visibility = "hidden", a.style.pointerEvents = "none";
263
- const l = document.createElementNS(mt, "path");
264
- return e === "M " && (e = "M 0,0"), l.setAttribute("d", e), a.appendChild(l), document.body.appendChild(a), { svgElement: a, pathElement: l };
265
- }
266
- function Ue(e) {
267
- if (e)
268
- try {
269
- e.svgElement?.remove?.();
270
- } catch {
271
- }
272
- }
273
- function ga(e, a, l) {
274
- if (typeof l == "number" && l > 0)
275
- return l;
276
- let o = a * 0.75;
277
- o < 0.5 && (o = 0.5), o > 8 && (o = 8);
278
- const r = e / 2;
279
- return o > r && r > 0 && (o = r), o <= 0 && (o = 1), o;
280
- }
281
- function ya(e, a, l) {
282
- if (typeof a == "number" && a >= 1)
283
- return Math.floor(a);
284
- const o = typeof l == "number" && l > 0 ? l : 2, r = Math.ceil(e / o);
285
- return r < 1 ? 1 : r;
286
- }
287
- function ma(e, a, l, o, r, c) {
288
- const d = l - a;
289
- let f = Math.ceil(d / o) + 1;
290
- f < 2 && (f = 2), f > c && (f = c);
291
- const i = f > 1 ? d / (f - 1) : 0, x = e.getPointAtLength(a);
292
- let v = `M ${le(H(x.x, r))} ${le(
293
- H(x.y, r)
294
- )}`;
295
- for (let m = 1; m < f; m += 1) {
296
- const P = a + m * i, N = e.getPointAtLength(P);
297
- v += ` L ${le(H(N.x, r))} ${le(
298
- H(N.y, r)
299
- )}`;
300
- }
301
- return v;
302
- }
303
- function ba(e, a, l, o, r, c) {
304
- const d = l - a;
305
- let f = Math.ceil(d / o) + 1;
306
- f < 2 && (f = 2), f > c && (f = c);
307
- const i = f > 1 ? d / (f - 1) : 0, x = e.getPointAtLength(a);
308
- let v = x.x, m = x.x, P = x.y, N = x.y, t = `M ${le(H(x.x, r))} ${le(
309
- H(x.y, r)
310
- )}`;
311
- for (let q = 1; q < f; q += 1) {
312
- const ne = a + q * i, w = e.getPointAtLength(ne);
313
- w.x < v && (v = w.x), w.x > m && (m = w.x), w.y < P && (P = w.y), w.y > N && (N = w.y), t += ` L ${le(H(w.x, r))} ${le(
314
- H(w.y, r)
315
- )}`;
316
- }
317
- return {
318
- pathData: t,
319
- bounds: { minX: v, maxX: m, minY: P, maxY: N }
320
- };
321
- }
322
- function ka(e) {
323
- if (e.length === 1) return [{ position: 0, rgba: e[0] }];
324
- const a = new Array(e.length), l = e.length - 1;
325
- for (let o = 0; o < e.length; o += 1)
326
- a[o] = { position: o / l, rgba: e[o] };
327
- return a;
328
- }
329
- function wa(e, a, l, o) {
330
- const r = V(a, 0, 1);
331
- let c = o;
332
- for (c < 0 && (c = 0), c > e.length - 2 && (c = e.length - 2); c > 0 && r < e[c].position; ) c -= 1;
333
- for (; c < e.length - 2 && r > e[c + 1].position; ) c += 1;
334
- const d = e[c], f = e[c + 1], i = f.position - d.position, x = i > 0 ? (r - d.position) / i : 0, v = xa(d.rgba, f.rgba, x, l);
335
- return Je(v);
336
- }
337
- function xa(e, a, l, o) {
338
- const r = V(l, 0, 1);
339
- if (o === "linearRGB") {
340
- const c = me(e.red), d = me(e.green), f = me(e.blue), i = me(a.red), x = me(a.green), v = me(a.blue), m = c + (i - c) * r, P = d + (x - d) * r, N = f + (v - f) * r;
341
- return {
342
- red: He(m),
343
- green: He(P),
344
- blue: He(N),
345
- alpha: e.alpha + (a.alpha - e.alpha) * r
346
- };
347
- }
348
- return {
349
- red: e.red + (a.red - e.red) * r,
350
- green: e.green + (a.green - e.green) * r,
351
- blue: e.blue + (a.blue - e.blue) * r,
352
- alpha: e.alpha + (a.alpha - e.alpha) * r
353
- };
354
- }
355
- function me(e) {
356
- const a = V(e / 255, 0, 1);
357
- return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
358
- }
359
- function He(e) {
360
- const a = V(e, 0, 1);
361
- let l;
362
- a <= 31308e-7 ? l = a * 12.92 : l = 1.055 * Math.pow(a, 1 / 2.4) - 0.055;
363
- const o = Math.round(l * 255);
364
- return V(o, 0, 255);
365
- }
366
- function Je(e) {
367
- const a = V(e.alpha, 0, 1), l = V(Math.round(e.red), 0, 255), o = V(Math.round(e.green), 0, 255), r = V(Math.round(e.blue), 0, 255);
368
- if (a >= 1)
369
- return `#${Ke(l)}${Ke(o)}${Ke(r)}`;
370
- const c = H(a, 4).toString();
371
- return `rgba(${l}, ${o}, ${r}, ${c})`;
372
- }
373
- function Ma(e) {
374
- const a = e.fill ?? "none";
375
- let l = `fill="${Z(a)}"`;
376
- const o = Object.keys(e);
377
- for (let r = 0; r < o.length; r += 1) {
378
- const c = o[r];
379
- if (c === "stroke" || c === "d") continue;
380
- const d = e[c];
381
- l += ` ${c}="${Z(d)}"`;
382
- }
383
- return l;
384
- }
385
- function bt(e, a, l) {
386
- return `<path d="${Z(e)}" stroke="${Z(a)}" ${l} />`;
387
- }
388
- function $a(e) {
389
- const a = [], l = e.segmentAttributeMap.fill ?? "none";
390
- a.push(`fill="${Z(l)}"`), a.push(`stroke="${Z(e.stroke)}"`);
391
- for (const o of Object.keys(e.segmentAttributeMap)) {
392
- if (o === "stroke" || o === "d") continue;
393
- const r = e.segmentAttributeMap[o];
394
- a.push(`${o}="${Z(r)}"`);
395
- }
396
- return `<path d="${Z(e.pathData)}" ${a.join(" ")} />`;
397
- }
398
- function kt(e, a) {
399
- const l = [];
400
- for (const r of Object.keys(a))
401
- l.push(`${r}="${Z(a[r])}"`);
402
- return `<g data-svg-path-gradient="true"${l.length ? " " + l.join(" ") : ""}>${e.join("")}</g>`;
403
- }
404
- function Z(e) {
405
- return String(e).replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
406
- }
407
- function Sa(e, a = null, l = {}) {
408
- return new Promise((o, r) => {
409
- let c = null;
410
- try {
411
- if (!e || typeof e != "string")
412
- throw new Error("SvgPathGradientAsync: pathData must be a non-empty string.");
413
- const d = l.temperatureMode ?? null;
414
- if (d === null && (!Array.isArray(a) || a.length === 0))
415
- throw new Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
416
- if ((l.returnMode ?? "string") !== "string")
417
- throw new Error('SvgPathGradientAsync: only returnMode="string" is supported for the async version.');
418
- const i = typeof l.decimalPlaces == "number" ? l.decimalPlaces : 3, x = typeof l.flattenTolerance == "number" && l.flattenTolerance > 0 ? l.flattenTolerance : 0.25, v = l.attrs ? { ...l.attrs } : {}, m = l.groupAttrs ? { ...l.groupAttrs } : {}, P = ha(v["stroke-width"]), N = typeof l.strokeWidth == "number" && l.strokeWidth > 0 ? l.strokeWidth : typeof P == "number" && P > 0 ? P : 1;
419
- c = pa(e);
420
- const t = c.pathElement, q = t.getTotalLength(), ne = d === null ? gt(a, l.colorReferenceElement) : [];
421
- if (d === null && (!(q > 0) || ne.length === 1)) {
422
- const _ = Je(ne[0]), I = kt(
423
- [
424
- $a({
425
- pathData: e,
426
- stroke: _,
427
- segmentAttributeMap: v
428
- })
429
- ],
430
- m
431
- );
432
- Ue(c), o(I);
433
- return;
434
- }
435
- const w = l.colorSpace ?? "linearRGB";
436
- if (d !== null) {
437
- const _ = l.temperatureColors;
438
- if (!Array.isArray(_) || _.length !== 2)
439
- throw new Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
440
- }
441
- const J = d !== null ? gt(l.temperatureColors, l.colorReferenceElement) : null, re = d === null ? (() => {
442
- const _ = ka(ne), I = new Array(_.length);
443
- for (let X = 0; X < _.length; X += 1)
444
- I[X] = { position: _[X].position, rgba: _[X].rgba };
445
- return I;
446
- })() : [], ce = ga(q, N, l.maxSegmentLength), Q = ya(q, l.segments, ce), T = q / Q;
447
- let de = typeof l.overlap == "number" && l.overlap >= 0 ? l.overlap : N * 0.5;
448
- const ue = T * 0.45;
449
- de > ue && (de = ue);
450
- const Ae = typeof l.samplePointLimitPerSegment == "number" && l.samplePointLimitPerSegment > 10 ? l.samplePointLimitPerSegment : 250, Pe = Ma(v), ve = [], _e = d !== null ? [] : null, oe = d !== null ? [] : null;
451
- let ee = 0;
452
- const ke = d === null ? re.length - 2 : 0;
453
- let Y = 0;
454
- const we = () => {
455
- const _ = performance.now(), I = typeof l.frameBudgetMs == "number" ? l.frameBudgetMs : 8;
456
- for (; Y < Q && performance.now() - _ < I; ) {
457
- const F = Y * T, G = (Y + 1) * T;
458
- let R = F, B = G;
459
- if (Y !== 0 && (R = F - de), Y !== Q - 1 && (B = G + de), R = V(R, 0, q), B = V(B, 0, q), B > R)
460
- if (d !== null) {
461
- const E = ba(
462
- t,
463
- R,
464
- B,
465
- x,
466
- i,
467
- Ae
468
- );
469
- _e.push(E.pathData), oe.push(E.bounds);
470
- } else {
471
- const D = (R + B) * 0.5 / q;
472
- for (; ee < ke && D > re[ee + 1].position; )
473
- ee += 1;
474
- const j = wa(
475
- re,
476
- D,
477
- w,
478
- ee
479
- ), W = ma(
480
- t,
481
- R,
482
- B,
483
- x,
484
- i,
485
- Ae
486
- );
487
- ve.push(
488
- bt(W, j, Pe)
489
- );
490
- }
491
- Y += 1;
492
- }
493
- if (Y < Q) {
494
- requestAnimationFrame(we);
495
- return;
496
- }
497
- if (d !== null) {
498
- let F = Number.POSITIVE_INFINITY, G = Number.NEGATIVE_INFINITY;
499
- for (let E = 0; E < oe.length; E += 1) {
500
- const D = oe[E], j = d === "vertical" ? D.minY : D.minX, W = d === "vertical" ? D.maxY : D.maxX;
501
- j < F && (F = j), W > G && (G = W);
502
- }
503
- const R = J[0], B = J[1];
504
- ve.length = 0;
505
- for (let E = 0; E < oe.length; E += 1) {
506
- const D = oe[E], j = d === "vertical" ? D.minY : D.minX, W = d === "vertical" ? D.maxY : D.maxX, xe = (j + W) * 0.5, Me = fa(xe, F, G, !0), se = d === "vertical" ? yt(R, B, Me, w) : yt(B, R, Me, w), $e = Je(se), Ne = _e[E];
507
- ve.push(
508
- bt(Ne, $e, Pe)
509
- );
510
- }
511
- }
512
- const X = kt(ve, m);
513
- Ue(c), o(X);
514
- };
515
- requestAnimationFrame(we);
516
- } catch (d) {
517
- Ue(c), r(d);
518
- }
519
- });
520
- }
521
- const La = ["innerHTML"], Ca = {
522
- __name: "SparklineGradientPath",
523
- props: {
524
- svgPathData: { type: String, required: !0 },
525
- enabled: { type: Boolean, required: !0 },
526
- strokeWidth: { type: Number, required: !0 },
527
- highColor: { type: String, required: !0 },
528
- lowColor: { type: String, required: !0 },
529
- segments: { type: Number, required: !0 }
530
- },
531
- setup(e) {
532
- const a = e, l = C("");
533
- let o = 0;
534
- return z(
535
- () => [
536
- a.enabled,
537
- a.svgPathData,
538
- a.strokeWidth,
539
- a.highColor,
540
- a.lowColor,
541
- a.segments
542
- ],
543
- async ([r]) => {
544
- const c = ++o;
545
- if (!r) {
546
- l.value = "";
547
- return;
548
- }
549
- const d = await Sa(a.svgPathData, null, {
550
- segments: a.segments,
551
- temperatureMode: "vertical",
552
- temperatureColors: [a.highColor, a.lowColor],
553
- attrs: {
554
- "stroke-width": a.strokeWidth,
555
- "stroke-linecap": "round",
556
- "stroke-linejoin": "round"
557
- },
558
- groupAttrs: { class: "vue-ui-sparkline-gradient" }
559
- });
560
- c === o && (l.value = d);
561
- },
562
- { immediate: !0 }
563
- ), (r, c) => (p(), k("g", { innerHTML: l.value }, null, 8, La));
564
- }
565
- }, Aa = ["id"], Pa = ["xmlns", "viewBox"], _a = ["width", "height"], Na = ["id"], Ta = ["stop-color"], Ia = ["stop-color"], Ra = ["id"], Ba = ["stop-color"], Ea = ["stop-color"], Da = ["id"], Fa = ["stop-color"], qa = ["stop-color"], Ga = ["id"], Va = ["id"], Wa = ["stop-color", "offset"], Oa = { key: 1 }, za = ["d", "fill"], ja = ["d", "fill"], Ya = ["id", "d", "stroke", "stroke-width"], Xa = ["id", "d", "stroke", "stroke-width"], Ka = ["x", "y", "width", "height", "fill", "rx"], Ua = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ha = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Za = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ja = ["x", "y", "font-size", "font-weight", "fill"], Qa = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], el = {
566
- __name: "vue-ui-sparkline",
567
- props: {
568
- config: {
569
- type: Object,
570
- default() {
571
- return {};
572
- }
573
- },
574
- dataset: {
575
- type: Array,
576
- default() {
577
- return [];
578
- }
579
- },
580
- showInfo: {
581
- type: Boolean,
582
- default: !0
583
- },
584
- selectedIndex: {
585
- type: Number,
586
- default: void 0
587
- },
588
- heightRatio: {
589
- type: Number,
590
- default: 1
591
- },
592
- forcedPadding: {
593
- type: Number,
594
- default: 30
595
- }
596
- },
597
- emits: ["hoverIndex", "selectDatapoint"],
598
- setup(e, { emit: a }) {
599
- const l = ot(() => import("./PackageVersion-DN9d0ME5.js")), o = ot(() => import("./SparkTooltip-BiseJed3.js")), { vue_ui_sparkline: r } = Ot(), { isThemeValid: c, warnInvalidTheme: d } = Yt(), f = Zt(), i = e, x = y(() => Array.isArray(i.dataset) && i.dataset.length > 0), v = C(It()), m = C(null), P = C(null), N = C(null), t = C(Q());
600
- function q(n) {
601
- return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((u) => ({ period: "-", value: u })) : Gt(n).map((u) => ({ period: "-", value: u }));
602
- }
603
- const ne = y(() => dt({
604
- defaultConfig: {
605
- gradientPath: { show: !1 },
606
- temperatureColors: { show: !1 },
607
- style: {
608
- backgroundColor: "#99999930",
609
- scaleMin: 0,
610
- scaleMax: null,
611
- animation: { show: !1 },
612
- line: { color: "#AAAAAA", pulse: { show: !1 } },
613
- bar: { color: "#AAAAAA" },
614
- area: { color: "#CACACA" },
615
- zeroLine: { color: "#6A6A6A" },
616
- dataLabel: { show: !1 },
617
- tooltip: { show: !1 }
618
- }
619
- },
620
- userConfig: t.value.skeletonConfig ?? {}
621
- })), { loading: w, FINAL_DATASET: J, manualLoading: re } = zt({
622
- ...At(i),
623
- FINAL_CONFIG: t,
624
- prepareConfig: Q,
625
- callback: () => {
626
- Promise.resolve().then(async () => {
627
- await U(), xe();
628
- });
629
- },
630
- skeletonDataset: q(12),
631
- skeletonConfig: dt({
632
- defaultConfig: t.value,
633
- userConfig: ne.value
634
- })
635
- }), { svgRef: ce } = Kt({ config: t.value.style.title });
636
- function Q() {
637
- const n = Ye({
638
- userConfig: i.config,
639
- defaultConfig: r
640
- });
641
- let u = {};
642
- const s = n.theme;
643
- if (s)
644
- if (!c.value(n))
645
- d(n), u = n;
646
- else {
647
- const h = Ye({
648
- userConfig: Ut[s] || i.config,
649
- defaultConfig: n
650
- });
651
- u = {
652
- ...Ye({
653
- userConfig: i.config,
654
- defaultConfig: h
655
- })
656
- };
657
- }
658
- else
659
- u = n;
660
- return u;
661
- }
662
- const T = y(() => t.value?.style?.line.pulse || {}), de = y(() => `${Math.max(200, Number(T.value.durationMs) || 4e3) / 1e3}s`), ue = C(0), Ae = y(() => T.value?.begin || "0ms"), Pe = C("0;1"), ve = y(() => T.value?.loop === !1 ? "1" : "indefinite"), _e = y(() => T.value?.loop === !1 ? "freeze" : void 0), oe = y(() => T.value.trail.show && we.value.lengthPx || 1), ee = y(() => !!T.value?.show && !K.value && !f.value && !w.value && (M.value?.length || 0) > 1);
663
- function ke() {
664
- if (!ee.value) {
665
- ue.value = 0;
666
- return;
667
- }
668
- const n = ce.value;
669
- if (!n) return;
670
- const u = `#${se.value}`, s = n.querySelector?.(u);
671
- if (s && typeof s.getTotalLength == "function") {
672
- const h = s.getTotalLength();
673
- Number.isFinite(h) && h > 0 && (ue.value = h);
674
- return;
675
- }
676
- requestAnimationFrame(() => {
677
- const h = n.querySelector?.(u);
678
- if (h && typeof h.getTotalLength == "function") {
679
- const O = h.getTotalLength();
680
- Number.isFinite(O) && O > 0 && (ue.value = O);
681
- }
682
- });
683
- }
684
- const Y = y(() => {
685
- const n = T.value?.easing || "ease-in-out", u = {
686
- ease: [0.25, 0.1, 0.25, 1],
687
- "ease-in": [0.42, 0, 1, 1],
688
- "ease-out": [0, 0, 0.58, 1],
689
- "ease-in-out": [0.42, 0, 0.58, 1]
690
- };
691
- return n === "linear" ? {
692
- calcMode: "linear",
693
- keySplines: null,
694
- keyTimes: "0;1"
695
- } : n === "steps" ? {
696
- calcMode: "discrete",
697
- keySplines: null,
698
- keyTimes: "0;1"
699
- } : {
700
- calcMode: "spline",
701
- keySplines: (n === "cubic-bezier" ? Array.isArray(T.value?.cubicBezier) && T.value.cubicBezier.length === 4 ? T.value.cubicBezier : [0.4, 0, 0.2, 1] : u[n] || u["ease-in-out"]).join(" "),
702
- keyTimes: "0;1"
703
- };
704
- }), we = y(() => {
705
- const n = T.value?.trail || {}, u = t.value.style.line.strokeWidth || 1;
706
- return {
707
- show: n.show !== !1,
708
- lengthPx: n.length,
709
- width: Math.max(1, Number(n.strokeWidth) || u * 2.2),
710
- opacity: Math.min(1, Math.max(0, Number(n.opacity) ?? 0.6)),
711
- fadeIn: 0.5,
712
- fadeOut: 0.2
713
- };
714
- }), _ = y(() => We({
715
- data: J.value,
716
- threshold: t.value.downsample.threshold
717
- }));
718
- z(() => i.config, (n) => {
719
- w.value || (t.value = Q()), tt(), b.value.chartWidth = t.value.style.chartWidth;
720
- }, { deep: !0 }), z(() => i.dataset, (n) => {
721
- Array.isArray(n) && n.length > 0 && (re.value = !1), I.value = We({
722
- data: J.value.map((u) => ({
723
- ...u,
724
- value: [void 0].includes(u.value) ? null : u.value
725
- })),
726
- threshold: t.value.downsample.threshold
727
- });
728
- }, { deep: !0 });
729
- const I = C(X());
730
- function X() {
731
- return We({
732
- data: J.value.map((n) => t.value.style.animation.show && J.value.length > 1 ? {
733
- ...n,
734
- value: null
735
- } : {
736
- ...n,
737
- value: [void 0].includes(n.value) ? null : n.value
738
- }),
739
- threshold: t.value.downsample.threshold
740
- });
741
- }
742
- const F = st(null), G = st(null), R = C(!1), B = C(0), E = C([]), D = C(""), j = y(() => {
743
- const u = (_.value || []).map((O) => `${O.period}::${Number.isFinite(O.value) ? O.value : 0}`).join("|"), s = t.value?.style?.animation || {}, h = !!t.value?.gradientPath?.show && !t.value.temperatureColors.show;
744
- return `${u}#${!!s.show}#${s.animationFrames || 0}#${h}`;
745
- });
746
- function W() {
747
- B.value && (cancelAnimationFrame(B.value), B.value = 0), E.value.forEach((n) => clearTimeout(n)), E.value = [], R.value = !1;
748
- }
749
- function xe() {
750
- const n = t.value?.style?.animation || {}, u = _.value || [], s = j.value, h = !!t.value.gradientPath.show && !t.value.temperatureColors.show;
751
- if (s && s === D.value && (R.value || I.value.length === u.length))
752
- return;
753
- if (W(), h || !n.show || w.value || u.length <= 1) {
754
- I.value = u, D.value = s;
755
- return;
756
- }
757
- R.value = !0, D.value = s, I.value = [];
758
- const O = Math.max(1, Number(n.animationFrames) || 1), Lt = Math.max(1, Math.floor(O / u.length));
759
- let Ve = 0;
760
- const ut = () => {
761
- if (s !== j.value) {
762
- W();
763
- return;
764
- }
765
- if (Ve < u.length) {
766
- I.value.push(u[Ve]);
767
- const Ct = setTimeout(() => {
768
- B.value = requestAnimationFrame(ut);
769
- }, Lt);
770
- E.value.push(Ct), Ve += 1;
771
- } else
772
- I.value = u, W();
773
- };
774
- B.value = requestAnimationFrame(ut);
775
- }
776
- z(j, () => {
777
- xe();
778
- }), Ze(() => {
779
- tt(), xe();
780
- }), De(() => {
781
- W();
782
- });
783
- const Me = C(0);
784
- z(
785
- () => w.value,
786
- async (n) => {
787
- n || (await U(), Me.value += 1);
788
- }
789
- ), z(
790
- () => R.value,
791
- async (n) => {
792
- n || w.value || (await U(), Me.value += 1);
793
- }
794
- );
795
- const se = y(() => `sparkline_line_path_${v.value}`), $e = C(!0);
796
- async function Ne() {
797
- $e.value = !1, await U(), $e.value = !0, await U(), ke();
798
- }
799
- const et = y(() => !!t.value.debug);
800
- function tt() {
801
- if (vt(i.dataset) ? (ht({
802
- componentName: "VueUiSparkline",
803
- type: "dataset",
804
- debug: et.value
805
- }), re.value = !0) : i.dataset.forEach((n, u) => {
806
- Rt({
807
- datasetObject: n,
808
- requiredAttributes: ["period", "value"]
809
- }).forEach((s) => {
810
- ht({
811
- componentName: "VueUiSparkline",
812
- type: "datasetSerieAttribute",
813
- property: s,
814
- index: u,
815
- debug: et.value
816
- });
817
- });
818
- }), vt(i.dataset) || (re.value = t.value.loading), t.value.responsive) {
819
- const n = Vt(() => {
820
- const { width: u, height: s } = Wt({
821
- chart: m.value,
822
- title: t.value.style.title.show && i.showInfo ? P.value : null,
823
- source: N.value
824
- });
825
- requestAnimationFrame(() => {
826
- b.value.width = u, b.value.height = s, b.value.chartWidth = t.value.style.chartWidth / 500 * u, b.value.padding = i.forcedPadding / 500 * u;
827
- });
828
- });
829
- F.value && (G.value && F.value.unobserve(G.value), F.value.disconnect()), F.value = new ResizeObserver(n), G.value = m.value.parentNode, F.value.observe(G.value);
830
- }
831
- }
832
- De(() => {
833
- F.value && (G.value && F.value.unobserve(G.value), F.value.disconnect());
834
- });
835
- const b = C({
836
- height: 80 * i.heightRatio,
837
- width: 500,
838
- chartWidth: t.value.style.chartWidth,
839
- padding: i.forcedPadding
840
- }), Fe = a, $ = y(() => {
841
- const { top: n, right: u, bottom: s, left: h } = t.value.style.padding;
842
- return {
843
- top: n,
844
- left: h,
845
- right: b.value.width - u,
846
- bottom: b.value.height - s,
847
- start: i.showInfo && t.value.style.dataLabel.show && t.value.style.dataLabel.position === "left" ? b.value.width - b.value.chartWidth + h : b.value.padding + h,
848
- width: i.showInfo && t.value.style.dataLabel.show ? b.value.chartWidth - h - u : b.value.width - b.value.padding - h - u,
849
- height: b.value.height - n - s
850
- };
851
- }), qe = y(() => [null, void 0].includes(t.value.style.scaleMin) ? Math.min(...I.value.map((n) => isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0)) : t.value.style.scaleMin), wt = y(() => [null, void 0].includes(t.value.style.scaleMax) ? Math.max(...I.value.map((n) => isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0)) : t.value.style.scaleMax), Se = y(() => {
852
- const n = qe.value >= 0 ? 0 : qe.value;
853
- return Math.abs(n);
854
- }), at = y(() => wt.value + Se.value), he = y(() => $.value.bottom - $.value.height * Ge(Se.value));
855
- function Ge(n) {
856
- return isNaN(n / at.value) ? 0 : n / at.value;
857
- }
858
- const fe = y(() => _.value.length - 1 || 1), Le = C([]);
859
- let lt = 0;
860
- Pt(() => {
861
- const n = ++lt;
862
- (async () => {
863
- const u = await Xt({
864
- values: _.value.map((s) => s.period),
865
- maxDatapoints: _.value.length,
866
- formatter: t.value.style.dataLabel.datetimeFormatter,
867
- start: 0,
868
- end: _.value.length
869
- });
870
- n === lt && (Le.value = u);
871
- })();
872
- });
873
- const M = y(() => I.value.map((n, u) => {
874
- const s = isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0, h = $.value.width / fe.value;
875
- return {
876
- absoluteValue: s,
877
- period: Le.value && Le.value[u] && Le.value[u].text ? Le.value[u].text : n.period,
878
- plotValue: s + Se.value,
879
- toMax: Ge(s + Se.value),
880
- x: $.value.start + u * h,
881
- y: $.value.bottom - $.value.height * Ge(s + Se.value),
882
- id: `plot_${v.value}_${u}`,
883
- color: K.value ? t.value.style.bar.color : t.value.style.area.useGradient ? Re(t.value.style.line.color, 0.05 * (1 - u / fe.value)) : t.value.style.line.color,
884
- width: h
885
- };
886
- })), xt = y(() => {
887
- const n = { x: M.value[0].x || 0, y: (b.value.height || 0) - 6 }, u = { x: M.value[M.value.length - 1].x || 0, y: (b.value.height || 0) - 6 }, s = [];
888
- return M.value.forEach((h) => {
889
- s.push(`${h.x || 0},${h.y || 0} `);
890
- }), [n.x, n.y, ...s, u.x, u.y].toString();
891
- }), S = C(void 0), pe = C(void 0);
892
- function Mt(n, u) {
893
- t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: n, seriesIndex: u }), S.value = n, pe.value || (pe.value = n), Fe("hoverIndex", { index: u });
894
- }
895
- function $t(n, u) {
896
- t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: n, seriesIndex: u }), pe.value = S.value, S.value = void 0, Fe("hoverIndex", { index: void 0 });
897
- }
898
- const te = y(() => {
899
- if (x.value) {
900
- const n = M.value.map((s) => s.absoluteValue), u = n.reduce((s, h) => s + h, 0);
901
- return {
902
- latest: M.value[M.value.length - 1] ? M.value[M.value.length - 1].absoluteValue : 0,
903
- sum: u,
904
- average: u / M.value.length,
905
- median: Et(n),
906
- trend: Bt(M.value.map(({ x: s, y: h, absoluteValue: O }) => ({
907
- x: s,
908
- y: h,
909
- value: O
910
- }))).trend
911
- };
912
- } else
913
- return {
914
- latest: null,
915
- sum: null,
916
- average: null,
917
- median: null,
918
- trend: null
919
- };
920
- }), nt = y(() => x.value ? t.value.style.dataLabel.valueType === "latest" ? te.value.latest : t.value.style.dataLabel.valueType === "sum" ? te.value.sum : t.value.style.dataLabel.valueType === "average" ? te.value.average : 0 : 0), K = y(() => t.value.type && t.value.type === "bar");
921
- function St(n, u) {
922
- t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: n, seriesIndex: u }), Fe("selectDatapoint", { datapoint: n, index: u });
923
- }
924
- const rt = y(() => K.value || !t.value.gradientPath.show || t.value.temperatureColors.show ? "" : `M ${(t.value.style.line.smooth ? Oe(M.value) : ft(M.value)) || "0,0"}`), ie = y(() => !t.value.temperatureColors.show || t.value.temperatureColors.colors.length === 0 ? null : t.value.temperatureColors.colors.map((n) => Dt(n)));
925
- return z(
926
- () => [
927
- ee.value,
928
- se.value,
929
- M.value.length,
930
- b.value.width,
931
- b.value.height,
932
- t.value?.style?.line?.smooth
933
- ],
934
- async () => {
935
- await U(), ke();
936
- },
937
- { immediate: !0 }
938
- ), Ze(async () => {
939
- await U(), ke();
940
- }), z(
941
- () => w.value,
942
- async (n) => {
943
- n || await Ne();
944
- }
945
- ), z(
946
- () => R.value,
947
- async (n) => {
948
- n || w.value || await Ne();
949
- }
950
- ), (n, u) => (p(), k("div", {
951
- ref_key: "sparklineChart",
952
- ref: m,
953
- class: "vue-data-ui-component vue-ui-sparkline",
954
- id: v.value,
955
- style: ae(`width:100%;font-family:${t.value.style.fontFamily};`)
956
- }, [
957
- ge(n.$slots, "before", it(ct({
958
- selected: S.value,
959
- latest: te.value.latest,
960
- sum: te.value.sum,
961
- average: te.value.average,
962
- median: te.value.median,
963
- trend: te.value.trend
964
- })), void 0, !0),
965
- t.value.style.title.show && e.showInfo ? (p(), k("div", {
966
- key: 0,
967
- ref_key: "chartTitle",
968
- ref: P,
969
- class: "vue-ui-sparkline-title",
970
- style: ae(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign === "left" ? "flex-start" : t.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${t.value.style.title.fontSize * 2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold ? "bold" : "normal"};`)
971
- }, [
972
- L("span", {
973
- style: ae(`padding:${t.value.style.title.textAlign === "left" ? "0 0 0 12px" : t.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
974
- }, Te(S.value ? S.value.period : t.value.style.title.text), 5)
975
- ], 4)) : A("", !0),
976
- (p(), k("svg", {
977
- ref_key: "svgRef",
978
- ref: ce,
979
- xmlns: g(Ft),
980
- viewBox: `0 0 ${b.value.width} ${b.value.height}`,
981
- style: ae(`background:${t.value.style.backgroundColor};overflow:visible;direction:ltr`),
982
- onMouseleave: u[0] || (u[0] = (s) => pe.value = void 0)
983
- }, [
984
- _t(g(l)),
985
- n.$slots["chart-background"] ? (p(), k("foreignObject", {
986
- key: 0,
987
- x: 0,
988
- y: 0,
989
- width: b.value.width <= 0 ? 10 : b.value.width,
990
- height: b.value.height <= 0 ? 10 : b.value.height,
991
- style: {
992
- pointerEvents: "none"
993
- }
994
- }, [
995
- ge(n.$slots, "chart-background", {}, void 0, !0)
996
- ], 8, _a)) : A("", !0),
997
- L("defs", null, [
998
- L("linearGradient", {
999
- x1: "0%",
1000
- y1: "0%",
1001
- x2: "100%",
1002
- y2: "0%",
1003
- id: `sparkline_gradient_${v.value}`
1004
- }, [
1005
- L("stop", {
1006
- offset: "0%",
1007
- "stop-color": g(Be)(g(Re)(t.value.style.area.color, 0.05), t.value.style.area.opacity)
1008
- }, null, 8, Ta),
1009
- L("stop", {
1010
- offset: "100%",
1011
- "stop-color": g(Be)(t.value.style.area.color, t.value.style.area.opacity)
1012
- }, null, 8, Ia)
1013
- ], 8, Na),
1014
- L("linearGradient", {
1015
- x2: "0%",
1016
- y2: "100%",
1017
- id: `sparkline_bar_gradient_pos_${v.value}`
1018
- }, [
1019
- L("stop", {
1020
- offset: "0%",
1021
- "stop-color": t.value.style.bar.color
1022
- }, null, 8, Ba),
1023
- L("stop", {
1024
- offset: "100%",
1025
- "stop-color": g(Re)(t.value.style.bar.color, 0.05)
1026
- }, null, 8, Ea)
1027
- ], 8, Ra),
1028
- L("linearGradient", {
1029
- x2: "0%",
1030
- y2: "100%",
1031
- id: `sparkline_bar_gradient_neg_${v.value}`
1032
- }, [
1033
- L("stop", {
1034
- offset: "0%",
1035
- "stop-color": g(Re)(t.value.style.bar.color, 0.05)
1036
- }, null, 8, Fa),
1037
- L("stop", {
1038
- offset: "100%",
1039
- "stop-color": t.value.style.bar.color
1040
- }, null, 8, qa)
1041
- ], 8, Da),
1042
- L("filter", {
1043
- id: `sparkline_pulse_glow_${v.value}`,
1044
- filterUnits: "userSpaceOnUse",
1045
- x: "-50",
1046
- y: "-50",
1047
- width: "100",
1048
- height: "100"
1049
- }, [...u[1] || (u[1] = [
1050
- L("feGaussianBlur", {
1051
- in: "SourceGraphic",
1052
- stdDeviation: "3",
1053
- result: "blur"
1054
- }, null, -1),
1055
- L("feMerge", null, [
1056
- L("feMergeNode", { in: "blur" }),
1057
- L("feMergeNode", { in: "SourceGraphic" })
1058
- ], -1)
1059
- ])], 8, Ga),
1060
- t.value.temperatureColors.show && ie.value ? (p(), k("linearGradient", {
1061
- key: 0,
1062
- id: `temperature_grad_sparkline_${v.value}`,
1063
- gradientTransform: "rotate(90)"
1064
- }, [
1065
- (p(!0), k(be, null, Ce(ie.value, (s, h) => (p(), k("stop", {
1066
- key: `temperature_grad_stop_${h}_${v.value}`,
1067
- "stop-color": s,
1068
- offset: g(qt)(h, ie.value.length)
1069
- }, null, 8, Wa))), 128))
1070
- ], 8, Va)) : A("", !0)
1071
- ]),
1072
- t.value.style.area.show && !K.value && M.value[0] && M.value.length > 1 ? (p(), k("g", Oa, [
1073
- t.value.style.line.smooth ? (p(), k("path", {
1074
- key: 0,
1075
- class: "vue-ui-sparkline-area",
1076
- d: `M ${M.value[0].x},${$.value.bottom} ${g(Oe)(M.value)} L ${M.value.at(-1).x},${$.value.bottom} Z`,
1077
- fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : g(Be)(t.value.style.area.color, t.value.style.area.opacity),
1078
- "stroke-linecap": "round",
1079
- "stroke-linejoin": "round",
1080
- style: ae({
1081
- transition: g(w) ? void 0 : "all 0.2s"
1082
- })
1083
- }, null, 12, za)) : (p(), k("path", {
1084
- key: 1,
1085
- class: "vue-ui-sparkline-area",
1086
- d: `M${xt.value}Z`,
1087
- fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : g(Be)(t.value.style.area.color, t.value.style.area.opacity),
1088
- "stroke-linecap": "round",
1089
- "stroke-linejoin": "round",
1090
- style: ae({
1091
- transition: g(w) ? void 0 : "all 0.2s"
1092
- })
1093
- }, null, 12, ja))
1094
- ])) : A("", !0),
1095
- t.value.style.line.smooth && !K.value ? (p(), k("path", {
1096
- key: 2,
1097
- class: "vue-ui-sparkline-path",
1098
- id: se.value,
1099
- d: `M ${g(Oe)(M.value) || "0,0"}`,
1100
- stroke: ie.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
1101
- fill: "none",
1102
- "stroke-width": t.value.style.line.strokeWidth,
1103
- "stroke-linecap": "round",
1104
- "stroke-linejoin": "round",
1105
- style: ae({
1106
- transition: g(w) ? void 0 : "all 0.2s"
1107
- })
1108
- }, null, 12, Ya)) : A("", !0),
1109
- !t.value.style.line.smooth && !K.value ? (p(), k("path", {
1110
- key: 3,
1111
- class: "vue-ui-sparkline-path",
1112
- id: se.value,
1113
- d: `M ${g(ft)(M.value) || "0,0"}`,
1114
- stroke: ie.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
1115
- fill: "none",
1116
- "stroke-width": t.value.style.line.strokeWidth,
1117
- "stroke-linecap": "round",
1118
- "stroke-linejoin": "round",
1119
- style: ae({
1120
- transition: g(w) ? void 0 : "all 0.2s"
1121
- })
1122
- }, null, 12, Xa)) : A("", !0),
1123
- rt.value && !ie.value ? (p(), Ie(Ca, {
1124
- key: 4,
1125
- svgPathData: rt.value,
1126
- enabled: t.value.gradientPath.show && !K.value && !ie.value,
1127
- strokeWidth: t.value.style.line.strokeWidth,
1128
- highColor: t.value.gradientPath.colors.high,
1129
- lowColor: t.value.gradientPath.colors.low,
1130
- segments: t.value.gradientPath.segments
1131
- }, null, 8, ["svgPathData", "enabled", "strokeWidth", "highColor", "lowColor", "segments"])) : A("", !0),
1132
- $e.value && ee.value ? (p(), Ie(oa, {
1133
- key: 5,
1134
- uid: v.value,
1135
- svgRef: g(ce),
1136
- pulsePathId: se.value,
1137
- pulsePathLength: ue.value,
1138
- pulseDur: de.value,
1139
- pulseBegin: Ae.value,
1140
- pulseRepeatCount: ve.value,
1141
- pulseFillMode: _e.value,
1142
- pulseKeyPoints: Pe.value,
1143
- pulseMotion: Y.value,
1144
- pulse: T.value,
1145
- pulseTrail: we.value,
1146
- pulseTrailLength: oe.value,
1147
- prefersReducedMotion: g(f),
1148
- loading: g(w),
1149
- isBar: K.value
1150
- }, null, 8, ["uid", "svgRef", "pulsePathId", "pulsePathLength", "pulseDur", "pulseBegin", "pulseRepeatCount", "pulseFillMode", "pulseKeyPoints", "pulseMotion", "pulse", "pulseTrail", "pulseTrailLength", "prefersReducedMotion", "loading", "isBar"])) : A("", !0),
1151
- (p(!0), k(be, null, Ce(M.value, (s, h) => (p(), k("g", null, [
1152
- K.value ? (p(), k("rect", {
1153
- key: 0,
1154
- x: s.x - s.width / 2,
1155
- y: isNaN(s.absoluteValue > 0 ? s.y : he.value) ? 0 : s.absoluteValue > 0 ? s.y : he.value,
1156
- width: s.width,
1157
- height: isNaN(Math.abs(s.y - he.value)) ? 0 : Math.abs(s.y - he.value),
1158
- fill: s.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${v.value})` : `url(#sparkline_bar_gradient_neg_${v.value})`,
1159
- rx: t.value.style.bar.borderRadius
1160
- }, null, 8, Ka)) : A("", !0),
1161
- t.value.style.verticalIndicator.show && (S.value && s.id === S.value.id || e.selectedIndex === h) ? (p(), k("line", {
1162
- key: 1,
1163
- x1: s.x,
1164
- x2: s.x,
1165
- y1: $.value.top - 6,
1166
- y2: $.value.bottom,
1167
- stroke: t.value.style.verticalIndicator.color || s.color,
1168
- "stroke-width": t.value.style.verticalIndicator.strokeWidth,
1169
- "stroke-linecap": "round",
1170
- "stroke-dasharray": t.value.style.verticalIndicator.strokeDasharray || 0
1171
- }, null, 8, Ua)) : A("", !0)
1172
- ]))), 256)),
1173
- qe.value < 0 ? (p(), k("line", {
1174
- key: 6,
1175
- x1: $.value.start,
1176
- x2: $.value.start + $.value.width,
1177
- y1: g(pt)(he.value, $.value.bottom),
1178
- y2: g(pt)(he.value, $.value.bottom),
1179
- stroke: t.value.style.zeroLine.color,
1180
- "stroke-dasharray": t.value.style.zeroLine.strokeWidth * 2,
1181
- "stroke-width": t.value.style.zeroLine.strokeWidth,
1182
- "stroke-linecap": "round"
1183
- }, null, 8, Ha)) : A("", !0),
1184
- t.value.style.plot.show ? (p(!0), k(be, { key: 7 }, Ce(M.value, (s, h) => (p(), k("g", null, [
1185
- S.value && s.id === S.value.id || e.selectedIndex === h || g(J).length === 1 ? (p(), k("circle", {
1186
- key: 0,
1187
- cx: s.x,
1188
- cy: s.y,
1189
- r: t.value.style.plot.radius,
1190
- fill: s.color,
1191
- stroke: t.value.style.plot.stroke,
1192
- "stroke-width": t.value.style.plot.strokeWidth
1193
- }, null, 8, Za)) : A("", !0)
1194
- ]))), 256)) : A("", !0),
1195
- e.showInfo && t.value.style.dataLabel.show ? (p(), k("text", {
1196
- key: 8,
1197
- x: t.value.style.dataLabel.position === "left" ? 12 + t.value.style.dataLabel.offsetX : $.value.width + 12 + t.value.style.dataLabel.offsetX,
1198
- y: b.value.height / 2 + t.value.style.dataLabel.fontSize / 2.5 + t.value.style.dataLabel.offsetY,
1199
- "font-size": t.value.style.dataLabel.fontSize,
1200
- "font-weight": t.value.style.dataLabel.bold ? "bold" : "normal",
1201
- fill: t.value.style.dataLabel.color
1202
- }, Te(S.value ? g(ze)(
1203
- t.value.style.dataLabel.formatter,
1204
- S.value.absoluteValue,
1205
- g(je)({ p: t.value.style.dataLabel.prefix, v: S.value.absoluteValue, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue }),
1206
- { datapoint: S.value }
1207
- ) : g(ze)(
1208
- t.value.style.dataLabel.formatter,
1209
- nt.value,
1210
- g(je)({ p: t.value.style.dataLabel.prefix, v: nt.value, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue })
1211
- )), 9, Ja)) : A("", !0),
1212
- (p(!0), k(be, null, Ce(M.value, (s, h) => (p(), k("rect", {
1213
- x: s.x - ($.value.width / (fe.value + 1) > b.value.padding ? b.value.padding : $.value.width / (fe.value + 1)) / 2,
1214
- y: $.value.top - 6,
1215
- height: $.value.height + 6,
1216
- width: $.value.width / (fe.value + 1) > b.value.padding ? b.value.padding : $.value.width / (fe.value + 1),
1217
- fill: "transparent",
1218
- onMouseenter: () => Mt(s, h),
1219
- onMouseleave: () => $t(s, h),
1220
- onClick: () => St(s, h)
1221
- }, null, 40, Qa))), 256)),
1222
- ge(n.$slots, "svg", { svg: b.value }, void 0, !0)
1223
- ], 44, Pa)),
1224
- S.value && t.value.style.tooltip.show ? (p(), Ie(g(o), {
1225
- key: 1,
1226
- x: S.value.x,
1227
- y: S.value.y,
1228
- prevX: pe.value.x,
1229
- prevY: pe.value.y,
1230
- offsetY: t.value.style.plot.radius * 3 + t.value.style.tooltip.offsetY,
1231
- svgRef: g(ce),
1232
- background: t.value.style.tooltip.backgroundColor,
1233
- color: t.value.style.tooltip.color,
1234
- fontSize: t.value.style.tooltip.fontSize,
1235
- borderWidth: t.value.style.tooltip.borderWidth,
1236
- borderColor: t.value.style.tooltip.borderColor,
1237
- borderRadius: t.value.style.tooltip.borderRadius,
1238
- backgroundOpacity: t.value.style.tooltip.backgroundOpacity
1239
- }, {
1240
- default: Nt(() => [
1241
- ge(n.$slots, "tooltip", it(ct({ ...S.value })), () => [
1242
- Tt(Te(S.value.period) + ": " + Te(g(ze)(
1243
- t.value.style.dataLabel.formatter,
1244
- S.value.absoluteValue,
1245
- g(je)({
1246
- p: t.value.style.dataLabel.prefix,
1247
- v: S.value.absoluteValue,
1248
- s: t.value.style.dataLabel.suffix,
1249
- r: t.value.style.dataLabel.roundingValue
1250
- }),
1251
- { datapoint: S.value }
1252
- )), 1)
1253
- ], !0)
1254
- ]),
1255
- _: 3
1256
- }, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : A("", !0),
1257
- n.$slots.source ? (p(), k("div", {
1258
- key: 2,
1259
- ref_key: "source",
1260
- ref: N,
1261
- dir: "auto"
1262
- }, [
1263
- ge(n.$slots, "source", {}, void 0, !0)
1264
- ], 512)) : A("", !0),
1265
- ge(n.$slots, "skeleton", {}, () => [
1266
- g(w) ? (p(), Ie(jt, { key: 0 })) : A("", !0)
1267
- ], !0)
1268
- ], 12, Aa));
1269
- }
1270
- }, vl = /* @__PURE__ */ Ht(el, [["__scopeId", "data-v-051de641"]]);
1271
- export {
1272
- vl as default
1273
- };