vue-data-ui 3.23.10 → 3.23.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +40 -40
  2. package/dist/{Arrow-bwmME0jw.js → Arrow-DrF4NNJO.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DBVHlhQZ.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
  4. package/dist/{BaseIcon-B4n7br_R.js → BaseIcon-BbElSC8_.js} +1 -1
  5. package/dist/{BaseLegendToggle-wRhcG_-q.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
  6. package/dist/{BaseZoomControls-BZjzzyQo.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
  7. package/dist/{ColorPicker-B9kUMLSz.js → ColorPicker-ChOgAmCi.js} +2 -2
  8. package/dist/{DataTable-DMsScfkx.js → DataTable-CmyEubtT.js} +2 -2
  9. package/dist/{HillActions-IWPfuceW.js → HillActions-3HneGJhS.js} +1 -1
  10. package/dist/{Legend-DWEFXq9E.js → Legend-BJtY2RA9.js} +2 -2
  11. package/dist/{NonSvgPenAndPaper-Crs4-xWz.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
  12. package/dist/{PackageVersion-DNTJUKh1.js → PackageVersion-C0b7KAMa.js} +1 -1
  13. package/dist/{PenAndPaper-DJ607Hx6.js → PenAndPaper-CIa1F5Jq.js} +3 -3
  14. package/dist/{Shape-BAhF1ToV.js → Shape-BAL5bQmA.js} +1 -1
  15. package/dist/{SlicerPreview-sXtk2ZZ2.js → SlicerPreview-BRRyc1p7.js} +426 -426
  16. package/dist/{SparkTooltip-BE50SZQH.js → SparkTooltip-Bou05CV_.js} +1 -1
  17. package/dist/{Title-BGLPsoA9.js → Title-CaVA8EIw.js} +1 -1
  18. package/dist/{Tooltip-DO4-MVhc.js → Tooltip-CVxJe3UW.js} +1 -1
  19. package/dist/{UserOptions-HQyukyl2.js → UserOptions-WH7-49V0.js} +2 -2
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.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-Cg_3vpOo.js → dom-to-png-COvyU2SG.js} +1 -1
  91. package/dist/exposedLib-DrUEXSyf.js +28 -0
  92. package/dist/{img-tU9mMt9W.js → img-Bkzj3lDD.js} +1 -1
  93. package/dist/{labelUtils-C_lMnQRs.js → labelUtils-iX76cA2-.js} +1 -1
  94. package/dist/{lib-AT2PUyyh.js → lib-Dqr_-I6Y.js} +165 -162
  95. package/dist/{package-enC-Nivt.js → package-D7_0M69J.js} +1 -1
  96. package/dist/{pdf-ColHHJFH.js → pdf-Bk_9lTdQ.js} +1 -1
  97. package/dist/{render-common-CqcoYfCA.js → render-common-B0f5NTO9.js} +12 -12
  98. package/dist/ssr/vue-ui-donut.js +1 -1
  99. package/dist/ssr/vue-ui-xy.js +1 -1
  100. package/dist/ssr.js +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/types/vue-data-ui.d.ts +13 -2
  103. package/dist/types/vue-ui-dag.d.ts +2 -0
  104. package/dist/{useNestedProp-CW0vJS1B.js → useNestedProp-CulPqtou.js} +1 -1
  105. package/dist/{usePrinter-BFS7d6eb.js → usePrinter-CEiH1b6R.js} +2 -2
  106. package/dist/utils.js +9 -9
  107. package/dist/{vue-data-ui-DD7J3yor.js → vue-data-ui-BlZHZHoH.js} +69 -69
  108. package/dist/vue-data-ui.js +73 -73
  109. package/dist/vue-ui-3d-bar-CtT2BovY.js +1829 -0
  110. package/dist/{vue-ui-accordion-DJNjilyy.js → vue-ui-accordion-C6L7glHU.js} +3 -3
  111. package/dist/{vue-ui-age-pyramid-DI8b5E2H.js → vue-ui-age-pyramid-BhGNgnLB.js} +27 -27
  112. package/dist/{vue-ui-annotator-7ZVfFskI.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
  113. package/dist/vue-ui-bullet-BI7KJyJx.js +700 -0
  114. package/dist/{vue-ui-bump-DzB3WQnq.js → vue-ui-bump-BCQ97z1G.js} +237 -237
  115. package/dist/{vue-ui-candlestick--YWEtek_.js → vue-ui-candlestick-Cs7I5MQS.js} +245 -245
  116. package/dist/{vue-ui-carousel-table-Dn3RZU0p.js → vue-ui-carousel-table-CDjAjc4b.js} +108 -108
  117. package/dist/{vue-ui-chestnut-BIsXeXiU.js → vue-ui-chestnut-d6GxjfcP.js} +86 -86
  118. package/dist/vue-ui-chord-BuConnPN.js +1345 -0
  119. package/dist/vue-ui-circle-pack-CmxANHap.js +1633 -0
  120. package/dist/{vue-ui-cursor-C-P2D5i6.js → vue-ui-cursor-CQcnZYBv.js} +3 -3
  121. package/dist/{vue-ui-dag-CThnMMWA.js → vue-ui-dag-DKUZN-aQ.js} +923 -885
  122. package/dist/{vue-ui-dashboard-D0NNTRO3.js → vue-ui-dashboard-ciI4wMe6.js} +69 -69
  123. package/dist/{vue-ui-digits-9tGjGzZh.js → vue-ui-digits-DWf1vzYE.js} +3 -3
  124. package/dist/{vue-ui-donut-DLN9uPOi.js → vue-ui-donut-CvCViwSI.js} +64 -64
  125. package/dist/{vue-ui-donut-EZu8p7HF.js → vue-ui-donut-DZTtuFAG.js} +85 -85
  126. package/dist/{vue-ui-donut-evolution-mu-iGTIn.js → vue-ui-donut-evolution-BvZX3Gi8.js} +347 -347
  127. package/dist/{vue-ui-dumbbell-Dvldi3Oo.js → vue-ui-dumbbell-BZywCpHd.js} +229 -229
  128. package/dist/vue-ui-flow-D5jcKr_S.js +1214 -0
  129. package/dist/vue-ui-funnel-7zX5QnQx.js +747 -0
  130. package/dist/{vue-ui-galaxy-D6eYN8Ut.js → vue-ui-galaxy-BuGd-Ojm.js} +64 -64
  131. package/dist/vue-ui-gauge-BlDQIpBk.js +932 -0
  132. package/dist/{vue-ui-geo-CQqNemR6.js → vue-ui-geo-PWGZw4Un.js} +34 -34
  133. package/dist/{vue-ui-gizmo-ClunTUxX.js → vue-ui-gizmo-CTxB3PAl.js} +10 -10
  134. package/dist/{vue-ui-heatmap-B_pSQNzO.js → vue-ui-heatmap-sFF5IbM8.js} +472 -472
  135. package/dist/{vue-ui-hill-Byp0Tnny.js → vue-ui-hill-DO3r2s-i.js} +10 -10
  136. package/dist/vue-ui-history-plot-Cj-Olvhn.js +1695 -0
  137. package/dist/vue-ui-horizontal-bar-B34aYuDZ.js +1708 -0
  138. package/dist/{vue-ui-kpi-BKw5t-rX.js → vue-ui-kpi-Co6y1YlE.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-BNm0MQDw.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
  140. package/dist/{vue-ui-molecule-DRwQV5hN.js → vue-ui-molecule-ERAB4YzZ.js} +176 -176
  141. package/dist/{vue-ui-mood-radar-Bj3KTWYj.js → vue-ui-mood-radar-BPp7L6OP.js} +20 -20
  142. package/dist/{vue-ui-nested-donuts-83Wh2w6z.js → vue-ui-nested-donuts-CX5ut2yp.js} +104 -104
  143. package/dist/vue-ui-onion-CWYJTUCq.js +1233 -0
  144. package/dist/vue-ui-parallel-coordinate-plot-DJrV-dVt.js +1430 -0
  145. package/dist/{vue-ui-quadrant-_J-Qr7-K.js → vue-ui-quadrant-wj8Up03L.js} +32 -32
  146. package/dist/{vue-ui-quick-chart-DcOUq4ym.js → vue-ui-quick-chart-CPYdScHL.js} +153 -153
  147. package/dist/{vue-ui-radar-FlRlsoAd.js → vue-ui-radar-D3gLQcI5.js} +41 -41
  148. package/dist/{vue-ui-rating-eCxEZD8C.js → vue-ui-rating-dBCk6ECe.js} +26 -26
  149. package/dist/vue-ui-relation-circle-DeNBOPjz.js +903 -0
  150. package/dist/vue-ui-ridgeline-DQcZJ_hv.js +1614 -0
  151. package/dist/vue-ui-rings-CF9NfFW2.js +1250 -0
  152. package/dist/vue-ui-scatter-U_xxKOte.js +2403 -0
  153. package/dist/{vue-ui-skeleton-CNOam3kC.js → vue-ui-skeleton-GA4wzjXV.js} +3 -3
  154. package/dist/{vue-ui-smiley-YdyidjBH.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
  155. package/dist/{vue-ui-spark-trend-CS5GLtYL.js → vue-ui-spark-trend-BXRGMn5-.js} +23 -23
  156. package/dist/{vue-ui-sparkbar-DDHwgP4k.js → vue-ui-sparkbar-96D0eR-o.js} +24 -24
  157. package/dist/{vue-ui-sparkgauge-BcQu9V3h.js → vue-ui-sparkgauge-BWBek2u2.js} +61 -61
  158. package/dist/{vue-ui-sparkhistogram-CPsA5P6c.js → vue-ui-sparkhistogram-Cqs068RX.js} +15 -15
  159. package/dist/vue-ui-sparkline-B8cyY_P1.js +1584 -0
  160. package/dist/{vue-ui-sparkstackbar-4tsTxMe2.js → vue-ui-sparkstackbar-C0BkLc2b.js} +207 -207
  161. package/dist/vue-ui-stackbar-DtsOc7B_.js +2332 -0
  162. package/dist/{vue-ui-stackline-BNCWO_jG.js → vue-ui-stackline-MSs0pdhE.js} +605 -605
  163. package/dist/{vue-ui-strip-plot-2Y1c02Ek.js → vue-ui-strip-plot-Df-TomML.js} +57 -57
  164. package/dist/vue-ui-table-BKSRQGVK.js +1352 -0
  165. package/dist/{vue-ui-table-heatmap-BacaEjQy.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
  166. package/dist/{vue-ui-table-sparkline-B8oAU5yr.js → vue-ui-table-sparkline-B7Dh-fN2.js} +11 -11
  167. package/dist/vue-ui-thermometer-DXuLn8NC.js +756 -0
  168. package/dist/{vue-ui-timer-CWZgSpP8.js → vue-ui-timer-orCjVwS4.js} +12 -12
  169. package/dist/{vue-ui-tiremarks-LLVCPyg9.js → vue-ui-tiremarks-DNoQ6Fl2.js} +12 -12
  170. package/dist/{vue-ui-treemap-ehBl9JMC.js → vue-ui-treemap-90_Clj0e.js} +44 -44
  171. package/dist/vue-ui-waffle-BSQXyJ1S.js +1610 -0
  172. package/dist/{vue-ui-wheel-C4OHPrtC.js → vue-ui-wheel-CfU0Nnn0.js} +28 -28
  173. package/dist/{vue-ui-word-cloud-CDHn3Kwa.js → vue-ui-word-cloud-AgMvmPlI.js} +32 -32
  174. package/dist/{vue-ui-world-ao1xf04I.js → vue-ui-world-D0Z9B6M2.js} +116 -116
  175. package/dist/{vue-ui-xy-_U3wmtCf.js → vue-ui-xy-5Te2TfRK.js} +304 -304
  176. package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
  177. package/dist/{vue-ui-xy-DmJDCl3c.js → vue-ui-xy-ua_mFu_a.js} +99 -99
  178. package/package.json +1 -1
  179. package/dist/exposedLib-vfRiIvq_.js +0 -28
  180. package/dist/vue-ui-3d-bar-DgrcdAgz.js +0 -1829
  181. package/dist/vue-ui-bullet-Dyd5F1Wa.js +0 -700
  182. package/dist/vue-ui-chord-BimXqVsF.js +0 -1345
  183. package/dist/vue-ui-circle-pack-DKQEhL-L.js +0 -1633
  184. package/dist/vue-ui-flow-DYZBT5Cb.js +0 -1214
  185. package/dist/vue-ui-funnel--NaxO0cZ.js +0 -747
  186. package/dist/vue-ui-gauge-DTIEl2Xb.js +0 -932
  187. package/dist/vue-ui-history-plot-CMu8ST1E.js +0 -1695
  188. package/dist/vue-ui-horizontal-bar-BQn7WxQ-.js +0 -1708
  189. package/dist/vue-ui-onion-C27GpneA.js +0 -1233
  190. package/dist/vue-ui-parallel-coordinate-plot-BklOszr1.js +0 -1430
  191. package/dist/vue-ui-relation-circle-DnsxHv7t.js +0 -903
  192. package/dist/vue-ui-ridgeline-TopTLyaE.js +0 -1614
  193. package/dist/vue-ui-rings-obVfb09j.js +0 -1250
  194. package/dist/vue-ui-scatter-BHSuA506.js +0 -2403
  195. package/dist/vue-ui-sparkline-CnbO-GkM.js +0 -1584
  196. package/dist/vue-ui-stackbar-2_SrMFNT.js +0 -2332
  197. package/dist/vue-ui-table-DJZxHo5N.js +0 -1352
  198. package/dist/vue-ui-thermometer-BGtxNU9T.js +0 -756
  199. package/dist/vue-ui-waffle-DpBAXbhh.js +0 -1610
  200. package/dist/vue-ui-xy-canvas-Bx-9y53V.js +0 -1823
@@ -1,1584 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { A as t, Bt as n, Dt as r, H as i, I as a, Jt as o, L as s, N as c, P as l, S as u, U as d, V as ee, Vt as f, X as p, bt as te, d as ne, i as re, it as ie, jt as ae, k as oe, m as se, ot as ce, pt as le, q as ue, t as de, tt as fe, zt as pe } from "./lib-AT2PUyyh.js";
3
- import { n as me, t as he } from "./useHints-Dq_w2E8B.js";
4
- import { t as m } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as ge } from "./useConfig-DwdGsXTx.js";
6
- import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as ye } from "./useNestedProp-CW0vJS1B.js";
8
- import { t as be } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as xe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
10
- import { l as Se, t as Ce } from "./useResponsive-ZtArZtUf.js";
11
- import { t as we } from "./DefGrad-DVBqDjhO.js";
12
- import { t as Te } from "./A11yDataTable-DdRsVULz.js";
13
- import { t as Ee } from "./useChartAccessibility-DYqac8yF.js";
14
- import { t as De } from "./usePrefersMotion-BC-CsqR1.js";
15
- import { t as Oe } from "./vue_ui_sparkline-auZhap6Y.js";
16
- import { Fragment as h, computed as g, createBlock as ke, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as Ae, createVNode as je, defineAsyncComponent as Me, guardReactiveProps as Ne, nextTick as b, normalizeProps as Pe, normalizeStyle as x, onBeforeUnmount as Fe, onMounted as Ie, openBlock as S, ref as C, renderList as w, renderSlot as T, shallowRef as Le, toDisplayString as Re, toRefs as ze, unref as E, watch as D, watchEffect as Be, withCtx as Ve } from "vue";
17
- //#region src/atoms/SparklinePulse.vue
18
- var He = {
19
- key: 0,
20
- style: { "pointer-events": "none" }
21
- }, Ue = [
22
- "r",
23
- "fill",
24
- "filter"
25
- ], We = [
26
- "begin",
27
- "dur",
28
- "repeatCount",
29
- "fill",
30
- "calcMode",
31
- "keySplines",
32
- "keyTimes",
33
- "keyPoints"
34
- ], Ge = ["href"], Ke = [
35
- "dur",
36
- "repeatCount",
37
- "fill",
38
- "values"
39
- ], qe = ["r", "fill"], O = [
40
- "begin",
41
- "dur",
42
- "repeatCount",
43
- "calcMode",
44
- "keySplines",
45
- "keyTimes",
46
- "keyPoints"
47
- ], Je = ["href"], k = ["dur", "repeatCount"], Ye = {
48
- __name: "SparklinePulse",
49
- props: {
50
- uid: {
51
- type: String,
52
- required: !0
53
- },
54
- svgRef: {
55
- type: Object,
56
- default: null
57
- },
58
- pulsePathId: {
59
- type: String,
60
- required: !0
61
- },
62
- pulsePathLength: {
63
- type: Number,
64
- required: !0
65
- },
66
- pulseDur: {
67
- type: String,
68
- required: !0
69
- },
70
- pulseBegin: {
71
- type: String,
72
- required: !0
73
- },
74
- pulseRepeatCount: {
75
- type: String,
76
- required: !0
77
- },
78
- pulseFillMode: {
79
- type: String,
80
- default: void 0
81
- },
82
- pulseKeyPoints: {
83
- type: String,
84
- required: !0
85
- },
86
- pulseMotion: {
87
- type: Object,
88
- required: !0
89
- },
90
- pulse: {
91
- type: Object,
92
- required: !0
93
- },
94
- pulseTrail: {
95
- type: Object,
96
- required: !0
97
- },
98
- pulseTrailLength: {
99
- type: Number,
100
- required: !0
101
- },
102
- prefersReducedMotion: {
103
- type: Boolean,
104
- required: !0
105
- },
106
- loading: {
107
- type: Boolean,
108
- required: !0
109
- },
110
- isBar: {
111
- type: Boolean,
112
- required: !0
113
- }
114
- },
115
- setup(e) {
116
- let t = e, n = g(() => Math.min(t.pulseTrailLength, 45)), r = g(() => !!t.pulse?.show && !t.isBar && !t.prefersReducedMotion && !t.loading && Number(t.pulsePathLength) > 0);
117
- function i() {
118
- let e = t.svgRef?.value;
119
- e && (typeof e.pauseAnimations == "function" && e.pauseAnimations(), typeof e.setCurrentTime == "function" && e.setCurrentTime(0), typeof e.unpauseAnimations == "function" && e.unpauseAnimations());
120
- }
121
- function a(e, t) {
122
- if (typeof e != "string") return e;
123
- let n = e.trim().match(/^([\d.]+)\s*(ms|s)$/);
124
- if (!n) return e;
125
- let r = Number(n[1]), i = n[2];
126
- return Number.isNaN(r) ? e : `${r + t}${i}`;
127
- }
128
- function o(e) {
129
- return (n.value - e) / n.value * t.pulse.radius;
130
- }
131
- function s(e) {
132
- let r = t.pulse.trail.opacity, i = (n.value - e) / n.value, a = e === 0 ? 1 : i * r;
133
- return `0;${a};${a};0`;
134
- }
135
- return D(() => t.loading, async (e) => {
136
- if (e) {
137
- i();
138
- return;
139
- }
140
- await b(), i();
141
- }), D(() => t.pulsePathId, async () => {
142
- await b(), i();
143
- }), Fe(() => {
144
- i();
145
- }), (t, i) => r.value ? (S(), v("g", He, [(S(!0), v(h, null, w(n.value, (t, n) => (S(), v(h, null, [n % 3 == 0 ? (S(), v("circle", {
146
- key: `sparkline_dot_${n}_${e.pulsePathId}`,
147
- r: o(n),
148
- fill: e.pulse.color,
149
- filter: `url(#sparkline_pulse_glow_${e.uid})`,
150
- opacity: "0"
151
- }, [y("animateMotion", {
152
- begin: a(e.pulseBegin, n * 10),
153
- dur: e.pulseDur,
154
- repeatCount: e.pulseRepeatCount,
155
- fill: e.pulseFillMode,
156
- calcMode: e.pulseMotion.calcMode,
157
- keySplines: e.pulseMotion.keySplines || void 0,
158
- keyTimes: e.pulseMotion.keyTimes || void 0,
159
- keyPoints: e.pulseKeyPoints,
160
- rotate: "auto"
161
- }, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, Ge)], 8, We), y("animate", {
162
- attributeName: "opacity",
163
- dur: e.pulseDur,
164
- repeatCount: e.pulseRepeatCount,
165
- fill: e.pulseFillMode,
166
- values: s(n),
167
- keyTimes: "0;0.1;0.9;1"
168
- }, null, 8, Ke)], 8, Ue)) : _("", !0)], 64))), 256)), (S(), v("circle", {
169
- key: `sparkline_halo_${e.pulsePathId}`,
170
- r: Math.max(e.pulse.radius * 1.3),
171
- fill: e.pulse.color,
172
- opacity: "0"
173
- }, [y("animateMotion", {
174
- begin: e.pulseBegin,
175
- dur: e.pulseDur,
176
- repeatCount: e.pulseRepeatCount,
177
- calcMode: e.pulseMotion.calcMode,
178
- keySplines: e.pulseMotion.keySplines || void 0,
179
- keyTimes: e.pulseMotion.keyTimes || void 0,
180
- keyPoints: e.pulseKeyPoints,
181
- rotate: "auto"
182
- }, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, Je)], 8, O), y("animate", {
183
- attributeName: "opacity",
184
- values: "0;0.35;0.35;0",
185
- keyTimes: "0;0.15;0.85;1",
186
- dur: e.pulseDur,
187
- repeatCount: e.pulseRepeatCount
188
- }, null, 8, k)], 8, qe))])) : _("", !0);
189
- }
190
- }, A = {
191
- canvas: null,
192
- ctx: null
193
- };
194
- function Xe() {
195
- if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
196
- if (!A.canvas) {
197
- let e = document.createElement("canvas");
198
- e.width = 1, e.height = 1;
199
- let t = e.getContext("2d", { willReadFrequently: !0 });
200
- if (!t) throw Error("color-utils: unable to get 2D canvas context.");
201
- A.canvas = e, A.ctx = t;
202
- }
203
- return A.ctx;
204
- }
205
- function Ze(e) {
206
- return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
207
- }
208
- function j(e) {
209
- return e < 0 ? 0 : e > 1 ? 1 : e;
210
- }
211
- function M(e, t = null) {
212
- if (typeof e != "string" || e.trim().length === 0) throw Error("colorToRgba: inputColor must be a non-empty string.");
213
- let n = e.trim();
214
- if (n.toLowerCase() === "transparent") return {
215
- red: 0,
216
- green: 0,
217
- blue: 0,
218
- alpha: 0
219
- };
220
- let r = Qe(n, t), i = Xe();
221
- i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
222
- let a = i.fillStyle;
223
- if (i.fillStyle = r, i.fillStyle === a && !$e(r)) throw Error(`colorToRgba: unsupported or invalid color "${e}".`);
224
- i.fillRect(0, 0, 1, 1);
225
- let o = i.getImageData(0, 0, 1, 1).data;
226
- return {
227
- red: o[0],
228
- green: o[1],
229
- blue: o[2],
230
- alpha: o[3] / 255
231
- };
232
- }
233
- function N(e, t = null) {
234
- if (!Array.isArray(e) || e.length === 0) throw Error("colorsToRgba: colors must be a non-empty array.");
235
- let n = Array(e.length);
236
- for (let r = 0; r < e.length; r += 1) n[r] = M(e[r], t);
237
- return n;
238
- }
239
- function Qe(e, t = null) {
240
- return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
241
- }
242
- function $e(e) {
243
- let t = e.trim().toLowerCase();
244
- return t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)" || t === "rgba(0, 0, 0, 0)";
245
- }
246
- function P(e) {
247
- let t = j(e / 255);
248
- return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
249
- }
250
- function F(e) {
251
- let t = j(e), n;
252
- return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, Ze(n * 255);
253
- }
254
- function et(e, t, n, r) {
255
- let i = j(n);
256
- if (r === "linearRGB") {
257
- let n = P(e.red), r = P(e.green), a = P(e.blue), o = P(t.red), s = P(t.green), c = P(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
258
- return {
259
- red: F(l),
260
- green: F(u),
261
- blue: F(d),
262
- alpha: e.alpha + (t.alpha - e.alpha) * i
263
- };
264
- }
265
- return {
266
- red: e.red + (t.red - e.red) * i,
267
- green: e.green + (t.green - e.green) * i,
268
- blue: e.blue + (t.blue - e.blue) * i,
269
- alpha: e.alpha + (t.alpha - e.alpha) * i
270
- };
271
- }
272
- //#endregion
273
- //#region src/SPG/number-utils.js
274
- function I(e, t, n) {
275
- let r = e;
276
- return r < t && (r = t), r > n && (r = n), r;
277
- }
278
- function L(e, t) {
279
- let n = 10 ** t;
280
- return Math.round(e * n) / n;
281
- }
282
- function R(e) {
283
- return Number.isFinite(e) ? e.toString() : "0";
284
- }
285
- function tt(e) {
286
- let t = I(e, 0, 255).toString(16);
287
- return t.length === 1 ? "0" + t : t;
288
- }
289
- function nt(e) {
290
- if (typeof e != "string") return;
291
- let t = Number.parseFloat(e);
292
- return Number.isFinite(t) ? t : void 0;
293
- }
294
- function rt(e, t, n, r = !0) {
295
- let i = n - t;
296
- if (i === 0) return 0;
297
- let a = (e - t) / i;
298
- return r ? I(a, 0, 1) : a;
299
- }
300
- //#endregion
301
- //#region src/SPG/index.js
302
- var it = "http://www.w3.org/2000/svg";
303
- function at(e) {
304
- if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
305
- let t = document.createElementNS(it, "svg");
306
- t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.setAttribute("viewBox", "0 0 0 0"), t.style.position = "absolute", t.style.left = "-10000px", t.style.top = "-10000px", t.style.visibility = "hidden", t.style.pointerEvents = "none";
307
- let n = document.createElementNS(it, "path");
308
- return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), t.appendChild(n), document.body.appendChild(t), {
309
- svgElement: t,
310
- pathElement: n
311
- };
312
- }
313
- function ot(e) {
314
- if (e) try {
315
- e.svgElement?.remove?.();
316
- } catch {}
317
- }
318
- function st(e, t, n) {
319
- if (typeof n == "number" && n > 0) return n;
320
- let r = t * .75;
321
- r < .5 && (r = .5), r > 8 && (r = 8);
322
- let i = e / 2;
323
- return r > i && i > 0 && (r = i), r <= 0 && (r = 1), r;
324
- }
325
- function ct(e, t, n) {
326
- if (typeof t == "number" && t >= 1) return Math.floor(t);
327
- let r = Math.ceil(e / (typeof n == "number" && n > 0 ? n : 2));
328
- return r < 1 ? 1 : r;
329
- }
330
- function lt(e, t, n, r, i, a) {
331
- let o = n - t, s = Math.ceil(o / r) + 1;
332
- s < 2 && (s = 2), s > a && (s = a);
333
- let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = `M ${R(L(l.x, i))} ${R(L(l.y, i))}`;
334
- for (let n = 1; n < s; n += 1) {
335
- let r = t + n * c, a = e.getPointAtLength(r);
336
- u += ` L ${R(L(a.x, i))} ${R(L(a.y, i))}`;
337
- }
338
- return u;
339
- }
340
- function ut(e, t, n, r, i, a) {
341
- let o = n - t, s = Math.ceil(o / r) + 1;
342
- s < 2 && (s = 2), s > a && (s = a);
343
- let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = l.x, d = l.x, ee = l.y, f = l.y, p = `M ${R(L(l.x, i))} ${R(L(l.y, i))}`;
344
- for (let n = 1; n < s; n += 1) {
345
- let r = t + n * c, a = e.getPointAtLength(r);
346
- a.x < u && (u = a.x), a.x > d && (d = a.x), a.y < ee && (ee = a.y), a.y > f && (f = a.y), p += ` L ${R(L(a.x, i))} ${R(L(a.y, i))}`;
347
- }
348
- return {
349
- pathData: p,
350
- bounds: {
351
- minX: u,
352
- maxX: d,
353
- minY: ee,
354
- maxY: f
355
- }
356
- };
357
- }
358
- function dt(e) {
359
- if (e.length === 1) return [{
360
- position: 0,
361
- rgba: e[0]
362
- }];
363
- let t = Array(e.length), n = e.length - 1;
364
- for (let r = 0; r < e.length; r += 1) t[r] = {
365
- position: r / n,
366
- rgba: e[r]
367
- };
368
- return t;
369
- }
370
- function z(e, t, n, r) {
371
- let i = I(t, 0, 1), a = r;
372
- for (a < 0 && (a = 0), a > e.length - 2 && (a = e.length - 2); a > 0 && i < e[a].position;) --a;
373
- for (; a < e.length - 2 && i > e[a + 1].position;) a += 1;
374
- let o = e[a], s = e[a + 1], c = s.position - o.position, l = c > 0 ? (i - o.position) / c : 0;
375
- return U(B(o.rgba, s.rgba, l, n));
376
- }
377
- function B(e, t, n, r) {
378
- let i = I(n, 0, 1);
379
- if (r === "linearRGB") {
380
- let n = V(e.red), r = V(e.green), a = V(e.blue), o = V(t.red), s = V(t.green), c = V(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
381
- return {
382
- red: H(l),
383
- green: H(u),
384
- blue: H(d),
385
- alpha: e.alpha + (t.alpha - e.alpha) * i
386
- };
387
- }
388
- return {
389
- red: e.red + (t.red - e.red) * i,
390
- green: e.green + (t.green - e.green) * i,
391
- blue: e.blue + (t.blue - e.blue) * i,
392
- alpha: e.alpha + (t.alpha - e.alpha) * i
393
- };
394
- }
395
- function V(e) {
396
- let t = I(e / 255, 0, 1);
397
- return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
398
- }
399
- function H(e) {
400
- let t = I(e, 0, 1), n;
401
- return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, I(Math.round(n * 255), 0, 255);
402
- }
403
- function U(e) {
404
- let t = I(e.alpha, 0, 1), n = I(Math.round(e.red), 0, 255), r = I(Math.round(e.green), 0, 255), i = I(Math.round(e.blue), 0, 255);
405
- return t >= 1 ? `#${tt(n)}${tt(r)}${tt(i)}` : `rgba(${n}, ${r}, ${i}, ${L(t, 4).toString()})`;
406
- }
407
- function ft(e) {
408
- let t = `fill="${W(e.fill ?? "none")}"`, n = Object.keys(e);
409
- for (let r = 0; r < n.length; r += 1) {
410
- let i = n[r];
411
- if (i === "stroke" || i === "d") continue;
412
- let a = e[i];
413
- t += ` ${i}="${W(a)}"`;
414
- }
415
- return t;
416
- }
417
- function pt(e, t, n) {
418
- return `<path d="${W(e)}" stroke="${W(t)}" ${n} />`;
419
- }
420
- function mt(e) {
421
- let t = [], n = e.segmentAttributeMap.fill ?? "none";
422
- t.push(`fill="${W(n)}"`), t.push(`stroke="${W(e.stroke)}"`);
423
- for (let n of Object.keys(e.segmentAttributeMap)) {
424
- if (n === "stroke" || n === "d") continue;
425
- let r = e.segmentAttributeMap[n];
426
- t.push(`${n}="${W(r)}"`);
427
- }
428
- return `<path d="${W(e.pathData)}" ${t.join(" ")} />`;
429
- }
430
- function ht(e, t) {
431
- let n = [];
432
- for (let e of Object.keys(t)) n.push(`${e}="${W(t[e])}"`);
433
- return `<g data-svg-path-gradient="true"${n.length ? " " + n.join(" ") : ""}>${e.join("")}</g>`;
434
- }
435
- function W(e) {
436
- return String(e).replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
437
- }
438
- function gt(e, t = null, n = {}) {
439
- return new Promise((r, i) => {
440
- let a = null;
441
- try {
442
- if (!e || typeof e != "string") throw Error("SvgPathGradientAsync: pathData must be a non-empty string.");
443
- let i = n.temperatureMode ?? null;
444
- if (i === null && (!Array.isArray(t) || t.length === 0)) throw Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
445
- if ((n.returnMode ?? "string") !== "string") throw Error("SvgPathGradientAsync: only returnMode=\"string\" is supported for the async version.");
446
- let o = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, s = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : .25, c = n.attrs ? { ...n.attrs } : {}, l = n.groupAttrs ? { ...n.groupAttrs } : {}, u = nt(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
447
- a = at(e);
448
- let ee = a.pathElement, f = ee.getTotalLength(), p = i === null ? N(t, n.colorReferenceElement) : [];
449
- if (i === null && (!(f > 0) || p.length === 1)) {
450
- let t = ht([mt({
451
- pathData: e,
452
- stroke: U(p[0]),
453
- segmentAttributeMap: c
454
- })], l);
455
- ot(a), r(t);
456
- return;
457
- }
458
- let te = n.colorSpace ?? "linearRGB";
459
- if (i !== null) {
460
- let e = n.temperatureColors;
461
- if (!Array.isArray(e) || e.length !== 2) throw Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
462
- }
463
- let ne = i === null ? null : N(n.temperatureColors, n.colorReferenceElement), re = i === null ? (() => {
464
- let e = dt(p), t = Array(e.length);
465
- for (let n = 0; n < e.length; n += 1) t[n] = {
466
- position: e[n].position,
467
- rgba: e[n].rgba
468
- };
469
- return t;
470
- })() : [], ie = st(f, d, n.maxSegmentLength), ae = ct(f, n.segments, ie), oe = f / ae, se = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, ce = oe * .45;
471
- se > ce && (se = ce);
472
- let le = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ue = ft(c), de = [], fe = i === null ? null : [], pe = i === null ? null : [], me = 0, he = i === null ? re.length - 2 : 0, m = 0, ge = () => {
473
- let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
474
- for (; m < ae && performance.now() - e < t;) {
475
- let e = m * oe, t = (m + 1) * oe, n = e, r = t;
476
- if (m !== 0 && (n = e - se), m !== ae - 1 && (r = t + se), n = I(n, 0, f), r = I(r, 0, f), r > n) if (i !== null) {
477
- let e = ut(ee, n, r, s, o, le);
478
- fe.push(e.pathData), pe.push(e.bounds);
479
- } else {
480
- let e = (n + r) * .5 / f;
481
- for (; me < he && e > re[me + 1].position;) me += 1;
482
- let t = z(re, e, te, me), i = lt(ee, n, r, s, o, le);
483
- de.push(pt(i, t, ue));
484
- }
485
- m += 1;
486
- }
487
- if (m < ae) {
488
- requestAnimationFrame(ge);
489
- return;
490
- }
491
- if (i !== null) {
492
- let e = Infinity, t = -Infinity;
493
- for (let n = 0; n < pe.length; n += 1) {
494
- let r = pe[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
495
- a < e && (e = a), o > t && (t = o);
496
- }
497
- let n = ne[0], r = ne[1];
498
- de.length = 0;
499
- for (let a = 0; a < pe.length; a += 1) {
500
- let o = pe[a], s = rt(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = U(i === "vertical" ? et(n, r, s, te) : et(r, n, s, te)), l = fe[a];
501
- de.push(pt(l, c, ue));
502
- }
503
- }
504
- let c = ht(de, l);
505
- ot(a), r(c);
506
- };
507
- requestAnimationFrame(ge);
508
- } catch (e) {
509
- ot(a), i(e);
510
- }
511
- });
512
- }
513
- //#endregion
514
- //#region src/atoms/SparklineGradientPath.vue
515
- var _t = ["innerHTML"], vt = {
516
- __name: "SparklineGradientPath",
517
- props: {
518
- svgPathData: {
519
- type: String,
520
- required: !0
521
- },
522
- enabled: {
523
- type: Boolean,
524
- required: !0
525
- },
526
- strokeWidth: {
527
- type: Number,
528
- required: !0
529
- },
530
- highColor: {
531
- type: String,
532
- required: !0
533
- },
534
- lowColor: {
535
- type: String,
536
- required: !0
537
- },
538
- segments: {
539
- type: Number,
540
- required: !0
541
- }
542
- },
543
- setup(e) {
544
- let t = e, n = C(""), r = 0;
545
- return D(() => [
546
- t.enabled,
547
- t.svgPathData,
548
- t.strokeWidth,
549
- t.highColor,
550
- t.lowColor,
551
- t.segments
552
- ], async ([e]) => {
553
- let i = ++r;
554
- if (!e) {
555
- n.value = "";
556
- return;
557
- }
558
- let a = await gt(t.svgPathData, null, {
559
- segments: t.segments,
560
- temperatureMode: "vertical",
561
- temperatureColors: [t.highColor, t.lowColor],
562
- attrs: {
563
- "stroke-width": t.strokeWidth,
564
- "stroke-linecap": "round",
565
- "stroke-linejoin": "round"
566
- },
567
- groupAttrs: { class: "vue-ui-sparkline-gradient" }
568
- });
569
- i === r && (n.value = a);
570
- }, { immediate: !0 }), (e, t) => (S(), v("g", { innerHTML: n.value }, null, 8, _t));
571
- }
572
- }, yt = /* @__PURE__ */ e({ default: () => G }), bt = ["id"], xt = ["id"], St = { style: { position: "relative" } }, Ct = [
573
- "xmlns",
574
- "viewBox",
575
- "aria-describedby"
576
- ], wt = ["width", "height"], Tt = ["id"], Et = [
577
- "id",
578
- "y1",
579
- "y2"
580
- ], Dt = ["stop-color", "offset"], Ot = { key: 1 }, kt = [
581
- "data-cy",
582
- "d",
583
- "fill"
584
- ], At = [
585
- "id",
586
- "d",
587
- "stroke-width"
588
- ], jt = [
589
- "d",
590
- "stroke",
591
- "stroke-width",
592
- "stroke-dasharray"
593
- ], Mt = [
594
- "d",
595
- "stroke",
596
- "stroke-width"
597
- ], Nt = [
598
- "id",
599
- "d",
600
- "stroke-width"
601
- ], Pt = [
602
- "d",
603
- "stroke",
604
- "stroke-width",
605
- "stroke-dasharray"
606
- ], Ft = [
607
- "d",
608
- "stroke",
609
- "stroke-width"
610
- ], It = [
611
- "x",
612
- "y",
613
- "width",
614
- "height",
615
- "fill",
616
- "rx"
617
- ], Lt = [
618
- "x1",
619
- "x2",
620
- "y1",
621
- "y2",
622
- "stroke",
623
- "stroke-width",
624
- "stroke-dasharray"
625
- ], Rt = [
626
- "x1",
627
- "x2",
628
- "y1",
629
- "y2",
630
- "stroke",
631
- "stroke-dasharray",
632
- "stroke-width"
633
- ], zt = [
634
- "cx",
635
- "cy",
636
- "r",
637
- "fill",
638
- "stroke",
639
- "stroke-width"
640
- ], Bt = [
641
- "x",
642
- "y",
643
- "font-size",
644
- "font-weight",
645
- "fill"
646
- ], Vt = [
647
- "x",
648
- "y",
649
- "height",
650
- "width",
651
- "onMouseenter",
652
- "onMouseleave",
653
- "onClick"
654
- ], Ht = {
655
- key: 0,
656
- style: {
657
- position: "absolute",
658
- top: "100%",
659
- left: "0",
660
- width: "100%"
661
- },
662
- "data-dom-to-png-ignore": "",
663
- "aria-hidden": "true"
664
- }, G = /*#__PURE__*/ xe({
665
- __name: "vue-ui-sparkline",
666
- props: {
667
- config: {
668
- type: Object,
669
- default() {
670
- return {};
671
- }
672
- },
673
- dataset: {
674
- type: Array,
675
- default() {
676
- return [];
677
- }
678
- },
679
- showInfo: {
680
- type: Boolean,
681
- default: !0
682
- },
683
- selectedIndex: {
684
- type: Number,
685
- default: void 0
686
- },
687
- heightRatio: {
688
- type: Number,
689
- default: 1
690
- },
691
- forcedPadding: {
692
- type: Number,
693
- default: 30
694
- }
695
- },
696
- emits: ["hoverIndex", "selectDatapoint"],
697
- setup(e, { emit: xe }) {
698
- let He = Me(() => import("./PackageVersion-DNTJUKh1.js").then((e) => e.t)), Ue = Me(() => import("./SparkTooltip-BE50SZQH.js")), { vue_ui_sparkline: We } = ge(), { isThemeValid: Ge, warnInvalidTheme: Ke } = be(), qe = De(), O = e, Je = g(() => Array.isArray(O.dataset) && O.dataset.length > 0), k = C(ue()), A = C(null), Xe = C(null), Ze = C(null), j = C(null), M = C(null), N = C(L());
699
- me({
700
- config: () => N.value,
701
- dataset: () => O.dataset,
702
- component: "VueUiSparkline",
703
- rules: [
704
- he.emptyArray,
705
- {
706
- test: (e) => e.length > 500,
707
- message: [
708
- "👀 The dataset has > 500 datapoints. Consider if you really need this level of detail.",
709
- "",
710
- "▶️ Use larger time scales, or aggregated values"
711
- ]
712
- },
713
- {
714
- test: (e) => e.length > 1095,
715
- message: [
716
- "👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
717
- "",
718
- "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
719
- ]
720
- }
721
- ]
722
- });
723
- function Qe(e) {
724
- return O.config?.skeletonDataset && Array.isArray(O.config.skeletonDataset) ? O.config.skeletonDataset.map((e) => ({
725
- period: "-",
726
- value: e
727
- })) : ie(e).map((e) => ({
728
- period: "-",
729
- value: e
730
- }));
731
- }
732
- let $e = g(() => o({
733
- defaultConfig: {
734
- gradientPath: { show: !1 },
735
- temperatureColors: { show: !1 },
736
- style: {
737
- backgroundColor: "#99999930",
738
- scaleMin: 0,
739
- scaleMax: null,
740
- animation: { show: !1 },
741
- line: {
742
- color: "#AAAAAA",
743
- pulse: { show: !1 },
744
- dashIndices: []
745
- },
746
- bar: { color: "#AAAAAA" },
747
- area: { color: "#CACACA" },
748
- zeroLine: { color: "#6A6A6A" },
749
- dataLabel: { show: !1 },
750
- tooltip: { show: !1 }
751
- }
752
- },
753
- userConfig: N.value.skeletonConfig ?? {}
754
- })), { loading: P, FINAL_DATASET: F, manualLoading: et } = _e({
755
- ...ze(O),
756
- FINAL_CONFIG: N,
757
- prepareConfig: L,
758
- callback: () => {
759
- Promise.resolve().then(async () => {
760
- await b(), _t();
761
- });
762
- },
763
- skeletonDataset: Qe(12),
764
- skeletonConfig: o({
765
- defaultConfig: N.value,
766
- userConfig: $e.value
767
- })
768
- }), { svgRef: I } = Ee({ config: N.value.style.title });
769
- function L() {
770
- let e = ye({
771
- userConfig: O.config,
772
- defaultConfig: We
773
- }), t = {}, n = e.theme;
774
- if (n) if (!Ge.value(e)) Ke(e), t = e;
775
- else {
776
- let r = ye({
777
- userConfig: Oe[n] || O.config,
778
- defaultConfig: e
779
- });
780
- t = { ...ye({
781
- userConfig: O.config,
782
- defaultConfig: r
783
- }) };
784
- }
785
- else t = e;
786
- return t;
787
- }
788
- let R = g(() => N.value?.style?.line.pulse || {}), tt = g(() => `${Math.max(200, Number(R.value.durationMs) || 4e3) / 1e3}s`), nt = C(0), rt = g(() => R.value?.begin || "0ms"), it = C("0;1"), at = g(() => R.value?.loop === !1 ? "1" : "indefinite"), ot = g(() => R.value?.loop === !1 ? "freeze" : void 0), st = g(() => R.value.trail.show && dt.value.lengthPx || 1), ct = g(() => !!R.value?.show && !Q.value && !qe.value && !P.value && (J.value?.length || 0) > 1);
789
- function lt() {
790
- if (!ct.value) {
791
- nt.value = 0;
792
- return;
793
- }
794
- let e = I.value;
795
- if (!e) return;
796
- let t = `#${G.value}`, n = e.querySelector?.(t);
797
- if (n && typeof n.getTotalLength == "function") {
798
- let e = n.getTotalLength();
799
- Number.isFinite(e) && e > 0 && (nt.value = e);
800
- return;
801
- }
802
- requestAnimationFrame(() => {
803
- let n = e.querySelector?.(t);
804
- if (n && typeof n.getTotalLength == "function") {
805
- let e = n.getTotalLength();
806
- Number.isFinite(e) && e > 0 && (nt.value = e);
807
- }
808
- });
809
- }
810
- let ut = g(() => {
811
- let e = R.value?.easing || "ease-in-out", t = {
812
- ease: [
813
- .25,
814
- .1,
815
- .25,
816
- 1
817
- ],
818
- "ease-in": [
819
- .42,
820
- 0,
821
- 1,
822
- 1
823
- ],
824
- "ease-out": [
825
- 0,
826
- 0,
827
- .58,
828
- 1
829
- ],
830
- "ease-in-out": [
831
- .42,
832
- 0,
833
- .58,
834
- 1
835
- ]
836
- };
837
- return e === "linear" ? {
838
- calcMode: "linear",
839
- keySplines: null,
840
- keyTimes: "0;1"
841
- } : e === "steps" ? {
842
- calcMode: "discrete",
843
- keySplines: null,
844
- keyTimes: "0;1"
845
- } : {
846
- calcMode: "spline",
847
- keySplines: (e === "cubic-bezier" ? Array.isArray(R.value?.cubicBezier) && R.value.cubicBezier.length === 4 ? R.value.cubicBezier : [
848
- .4,
849
- 0,
850
- .2,
851
- 1
852
- ] : t[e] || t["ease-in-out"]).join(" "),
853
- keyTimes: "0;1"
854
- };
855
- }), dt = g(() => {
856
- let e = R.value?.trail || {}, t = N.value.style.line.strokeWidth || 1;
857
- return {
858
- show: e.show !== !1,
859
- lengthPx: e.length,
860
- width: Math.max(1, Number(e.strokeWidth) || t * 2.2),
861
- opacity: Math.min(1, Math.max(0, Number(e.opacity) ?? .6)),
862
- fadeIn: .5,
863
- fadeOut: .2
864
- };
865
- }), z = g(() => r({
866
- data: F.value,
867
- threshold: N.value.downsample.threshold
868
- }));
869
- g(() => {
870
- if (!N.value.temperatureColors.show) return !1;
871
- let e = F.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
872
- return new Set(e).size <= 1;
873
- }), D(() => O.config, (e) => {
874
- P.value || (N.value = L()), Kt(), K.value.chartWidth = N.value.style.chartWidth;
875
- }, { deep: !0 }), D(() => O.dataset, (e) => {
876
- Array.isArray(e) && e.length > 0 && (et.value = !1), B.value = r({
877
- data: F.value.map((e) => ({
878
- ...e,
879
- value: [void 0].includes(e.value) ? null : e.value
880
- })),
881
- threshold: N.value.downsample.threshold
882
- });
883
- }, { deep: !0 });
884
- let B = C(V());
885
- function V() {
886
- return r({
887
- data: F.value.map((e) => N.value.style.animation.show && F.value.length > 1 ? {
888
- ...e,
889
- value: null
890
- } : {
891
- ...e,
892
- value: [void 0].includes(e.value) ? null : e.value
893
- }),
894
- threshold: N.value.downsample.threshold
895
- });
896
- }
897
- let H = Le(null), U = Le(null), ft = C(!1), pt = C(0), mt = C([]), ht = C(""), W = g(() => {
898
- let e = (z.value || []).map((e) => `${e.period}::${Number.isFinite(e.value) ? e.value : 0}`).join("|"), t = N.value?.style?.animation || {}, n = !!N.value?.gradientPath?.show && !N.value.temperatureColors.show;
899
- return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
900
- });
901
- function gt() {
902
- pt.value &&= (cancelAnimationFrame(pt.value), 0), mt.value.forEach((e) => clearTimeout(e)), mt.value = [], ft.value = !1;
903
- }
904
- function _t() {
905
- let e = N.value?.style?.animation || {}, t = z.value || [], n = W.value, r = !!N.value.gradientPath.show && !N.value.temperatureColors.show;
906
- if (n && n === ht.value && (ft.value || B.value.length === t.length)) return;
907
- if (gt(), r || !e.show || P.value || t.length <= 1 || qe.value) {
908
- B.value = t, ht.value = n;
909
- return;
910
- }
911
- ft.value = !0, ht.value = n, B.value = [];
912
- let i = Math.max(1, Number(e.animationFrames) || 1), a = Math.max(1, Math.floor(i / t.length)), o = 0, s = () => {
913
- if (n !== W.value) {
914
- gt();
915
- return;
916
- }
917
- if (o < t.length) {
918
- B.value.push(t[o]);
919
- let e = setTimeout(() => {
920
- pt.value = requestAnimationFrame(s);
921
- }, a);
922
- mt.value.push(e), o += 1;
923
- } else B.value = t, gt();
924
- };
925
- pt.value = requestAnimationFrame(s);
926
- }
927
- D(W, () => {
928
- _t();
929
- }), Ie(() => {
930
- Kt(), _t();
931
- }), Fe(() => {
932
- gt();
933
- });
934
- let yt = C(0);
935
- D(() => P.value, async (e) => {
936
- e || (await b(), yt.value += 1);
937
- }), D(() => ft.value, async (e) => {
938
- e || P.value || (await b(), yt.value += 1);
939
- });
940
- let G = g(() => `sparkline_line_path_${k.value}`), Ut = C(!0);
941
- async function Wt() {
942
- Ut.value = !1, await b(), Ut.value = !0, await b(), lt();
943
- }
944
- let Gt = g(() => N.value.debug);
945
- function Kt() {
946
- if (ae(O.dataset) ? (fe({
947
- componentName: "VueUiSparkline",
948
- type: "dataset",
949
- debug: Gt.value
950
- }), et.value = !0) : Gt.value && O.dataset.forEach((e, t) => {
951
- le({
952
- datasetObject: e,
953
- requiredAttributes: ["period", "value"]
954
- }).forEach((e) => {
955
- fe({
956
- componentName: "VueUiSparkline",
957
- type: "datasetSerieAttribute",
958
- property: e,
959
- index: t
960
- });
961
- });
962
- }), ae(O.dataset) || (et.value = N.value.loading), N.value.responsive) {
963
- let e = Se(() => {
964
- let { width: e, height: t } = Ce({
965
- chart: A.value,
966
- title: N.value.style.title.show && O.showInfo ? Xe.value : null,
967
- source: Ze.value
968
- });
969
- requestAnimationFrame(() => {
970
- K.value.width = e, K.value.height = t, K.value.chartWidth = N.value.style.chartWidth / 500 * e, K.value.padding = O.forcedPadding / 500 * e;
971
- });
972
- });
973
- H.value && (U.value && H.value.unobserve(U.value), H.value.disconnect()), H.value = new ResizeObserver(e), U.value = A.value.parentNode, H.value.observe(U.value);
974
- }
975
- }
976
- Fe(() => {
977
- H.value && (U.value && H.value.unobserve(U.value), H.value.disconnect());
978
- });
979
- let K = C({
980
- height: 80 * O.heightRatio,
981
- width: 500,
982
- chartWidth: N.value.style.chartWidth,
983
- padding: O.forcedPadding
984
- }), qt = xe, q = g(() => {
985
- let { top: e, right: t, bottom: n, left: r } = N.value.style.padding;
986
- return {
987
- top: e,
988
- left: r,
989
- right: K.value.width - t,
990
- bottom: K.value.height - n,
991
- start: O.showInfo && N.value.style.dataLabel.show && N.value.style.dataLabel.position === "left" ? K.value.width - K.value.chartWidth + r : K.value.padding + r,
992
- width: O.showInfo && N.value.style.dataLabel.show ? K.value.chartWidth - r - t : K.value.width - K.value.padding - r - t,
993
- height: K.value.height - e - n
994
- };
995
- }), Jt = g(() => [null, void 0].includes(N.value.style.scaleMin) ? Math.min(...B.value.map((e) => isNaN(e.value) || [
996
- void 0,
997
- null,
998
- "NaN",
999
- NaN,
1000
- Infinity,
1001
- -Infinity
1002
- ].includes(e.value) ? 0 : e.value || 0)) : N.value.style.scaleMin), Yt = g(() => [null, void 0].includes(N.value.style.scaleMax) ? Math.max(...B.value.map((e) => isNaN(e.value) || [
1003
- void 0,
1004
- null,
1005
- "NaN",
1006
- NaN,
1007
- Infinity,
1008
- -Infinity
1009
- ].includes(e.value) ? 0 : e.value || 0)) : N.value.style.scaleMax), Xt = g(() => {
1010
- let e = Jt.value >= 0 ? 0 : Jt.value;
1011
- return Math.abs(e);
1012
- }), Zt = g(() => Yt.value + Xt.value), Qt = g(() => q.value.bottom - q.value.height * $t(Xt.value));
1013
- function $t(e) {
1014
- return isNaN(e / Zt.value) ? 0 : e / Zt.value;
1015
- }
1016
- let en = g(() => z.value.length - 1 || 1), tn = C([]), nn = 0;
1017
- Be(() => {
1018
- let e = ++nn;
1019
- (async () => {
1020
- let t = await m({
1021
- values: z.value.map((e) => e.period),
1022
- maxDatapoints: z.value.length,
1023
- formatter: N.value.style.dataLabel.datetimeFormatter,
1024
- start: 0,
1025
- end: z.value.length
1026
- });
1027
- e === nn && (tn.value = t);
1028
- })();
1029
- });
1030
- let J = g(() => B.value.map((e, t) => {
1031
- let n = isNaN(e.value) || [
1032
- void 0,
1033
- "NaN",
1034
- NaN,
1035
- Infinity,
1036
- -Infinity
1037
- ].includes(e.value) ? 0 : e.value, r = q.value.width / en.value;
1038
- return {
1039
- value: e.value,
1040
- absoluteValue: n,
1041
- period: tn.value && tn.value[t] && tn.value[t].text ? tn.value[t].text : e.period,
1042
- plotValue: n + Xt.value,
1043
- toMax: $t(n + Xt.value),
1044
- x: q.value.start + t * r,
1045
- y: q.value.bottom - q.value.height * $t(n + Xt.value),
1046
- id: `plot_${k.value}_${t}`,
1047
- color: Q.value ? N.value.style.bar.color : N.value.style.area.useGradient ? f(N.value.style.line.color, .05 * (1 - t / en.value)) : N.value.style.line.color,
1048
- width: r
1049
- };
1050
- })), rn = g(() => O.selectedIndex !== void 0 && O.selectedIndex !== null && O.selectedIndex >= 0 && O.selectedIndex < J.value.length ? O.selectedIndex : M.value !== void 0 && M.value !== null && M.value >= 0 && M.value < J.value.length ? M.value : null), Y = C(void 0), X = C(void 0);
1051
- function an(e, t) {
1052
- N.value.events.datapointEnter && N.value.events.datapointEnter({
1053
- datapoint: e,
1054
- seriesIndex: t
1055
- }), M.value = t, j.value = t, Y.value = e, X.value ||= e, qt("hoverIndex", { index: t });
1056
- }
1057
- function on(e, t) {
1058
- N.value.events.datapointLeave && N.value.events.datapointLeave({
1059
- datapoint: e,
1060
- seriesIndex: t
1061
- }), X.value = Y.value, Y.value = void 0, M.value = null, j.value = null, qt("hoverIndex", { index: void 0 });
1062
- }
1063
- let Z = g(() => {
1064
- if (Je.value) {
1065
- let e = J.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
1066
- return {
1067
- latest: J.value[J.value.length - 1] ? J.value[J.value.length - 1].absoluteValue : 0,
1068
- sum: t,
1069
- average: t / J.value.length,
1070
- median: se(e),
1071
- trend: ne(J.value.map(({ x: e, y: t, absoluteValue: n }) => ({
1072
- x: e,
1073
- y: t,
1074
- value: n
1075
- }))).trend
1076
- };
1077
- }
1078
- return {
1079
- latest: null,
1080
- sum: null,
1081
- average: null,
1082
- median: null,
1083
- trend: null
1084
- };
1085
- }), sn = g(() => Je.value ? N.value.style.dataLabel.valueType === "latest" ? Z.value.latest : N.value.style.dataLabel.valueType === "sum" ? Z.value.sum : N.value.style.dataLabel.valueType === "average" ? Z.value.average : 0 : 0), Q = g(() => N.value.type && N.value.type === "bar");
1086
- function cn(e, t) {
1087
- N.value.events.datapointClick && N.value.events.datapointClick({
1088
- datapoint: e,
1089
- seriesIndex: t
1090
- }), qt("selectDatapoint", {
1091
- datapoint: e,
1092
- index: t
1093
- });
1094
- }
1095
- let ln = g(() => Array.isArray(N.value.style.line.dashIndices) && N.value.style.line.dashIndices.length > 0), un = g(() => N.value.style.line.cutNullValues);
1096
- function dn(e) {
1097
- return ![
1098
- null,
1099
- void 0,
1100
- "NaN",
1101
- NaN,
1102
- Infinity,
1103
- -Infinity
1104
- ].includes(e);
1105
- }
1106
- function fn(e, t) {
1107
- let n = e[t - 1], r = e[t + 1], i = !!n && !!r && n.value == null && r.value == null || !n && !!r && r.value == null || !!n && !r && n.value == null;
1108
- return dn(e[t]?.value) && i && un.value;
1109
- }
1110
- function pn(e, t) {
1111
- return Y.value && e.id === Y.value.id || rn.value === t || F.value.length === 1;
1112
- }
1113
- function mn(e, t) {
1114
- return Q.value || !dn(e?.value) ? !1 : N.value.style.plot.show && pn(e, t) || fn(J.value, t);
1115
- }
1116
- function hn(e, t) {
1117
- return Math.max(1, pn(e, t) ? N.value.style.plot.radius : N.value.style.plot.radius * .7);
1118
- }
1119
- function gn(e, t) {
1120
- return pn(e, t) ? N.value.style.plot.stroke : N.value.style.backgroundColor;
1121
- }
1122
- let _n = g(() => un.value ? J.value : J.value.filter((e) => e.value !== null)), vn = g(() => J.value.filter((e) => e.value !== null)), yn = g(() => vn.value.length > 1), bn = g(() => Q.value || !yn.value ? "" : un.value ? a(J.value) : l(_n.value)), xn = g(() => Q.value || !yn.value ? "" : un.value ? i(J.value) : ee(_n.value)), Sn = g(() => Q.value || !ln.value || !yn.value ? [] : s(_n.value, N.value.style.line.dashIndices)), Cn = g(() => Q.value || !ln.value || !yn.value ? [] : d(_n.value, N.value.style.line.dashIndices)), wn = g(() => Q.value || !N.value.style.area.show || !yn.value ? [] : N.value.style.line.smooth ? c(_n.value, q.value.bottom, un.value).filter(Boolean) : (un.value ? t(J.value, q.value.bottom) : oe(_n.value, q.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), Tn = g(() => Q.value || !N.value.gradientPath.show || N.value.temperatureColors.show ? "" : `M ${(N.value.style.line.smooth ? bn.value : xn.value) || "0,0"}`), En = g(() => {
1123
- if (!N.value.temperatureColors.show) return null;
1124
- let e = N.value.temperatureColors.colors;
1125
- return !Array.isArray(e) || !e.length ? null : e.map((e) => u(e));
1126
- }), $ = g(() => {
1127
- if (!N.value.temperatureColors.show) return null;
1128
- let e = N.value.temperatureColors.colors;
1129
- return !Array.isArray(e) || !e.length ? null : e.map((e) => u(e));
1130
- });
1131
- function Dn(e) {
1132
- if (!Number.isFinite(e?.y)) return 0;
1133
- let t = q.value.height || 1, n = (e.y - q.value.top) / t;
1134
- return Math.min(1, Math.max(0, n));
1135
- }
1136
- function On(e) {
1137
- let t = En.value;
1138
- return !Array.isArray(t) || !t.length ? e.color : te({
1139
- colors: t,
1140
- ratio: Dn(e)
1141
- });
1142
- }
1143
- D(() => [
1144
- ct.value,
1145
- G.value,
1146
- J.value.length,
1147
- K.value.width,
1148
- K.value.height,
1149
- N.value?.style?.line?.smooth
1150
- ], async () => {
1151
- await b(), lt();
1152
- }, { immediate: !0 }), Ie(async () => {
1153
- await b(), lt();
1154
- }), D(() => P.value, async (e) => {
1155
- e || await Wt();
1156
- }), D(() => ft.value, async (e) => {
1157
- e || P.value || await Wt();
1158
- }), D(() => O.selectedIndex, (e) => {
1159
- if (e == null) {
1160
- M.value = null, j.value = null, Y.value = void 0;
1161
- return;
1162
- }
1163
- if (e < 0 || e >= J.value.length) return;
1164
- let t = J.value[e];
1165
- t && (M.value = e, j.value = e, Y.value = t);
1166
- });
1167
- let kn = C(!1);
1168
- function An() {
1169
- let e = rn.value;
1170
- if (e !== null && e >= 0 && e < J.value.length) {
1171
- let t = J.value[e];
1172
- if (t) {
1173
- j.value = e, Y.value = t, M.value = e, kn.value = !0;
1174
- return;
1175
- }
1176
- }
1177
- j.value = null, !Y.value && J.value.length && an(J.value.at(-1), J.value.length - 1), kn.value = !0;
1178
- }
1179
- function jn() {
1180
- X.value = Y.value, (O.selectedIndex === void 0 || O.selectedIndex === null) && (j.value = null, Y.value = void 0, M.value = null, qt("hoverIndex", { index: void 0 })), kn.value = !1;
1181
- }
1182
- function Mn(e) {
1183
- if (!I.value || document.activeElement !== I.value) return;
1184
- X.value = Y.value;
1185
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1186
- if (!t && !n) return;
1187
- let r = J.value.length;
1188
- if (!r) return;
1189
- e.preventDefault(), e.stopPropagation();
1190
- let i = j.value, a = i !== null && i >= 0 && i < r, o = Y.value ? J.value.findIndex((e) => e.id === Y.value.id) : -1;
1191
- a ? n ? (i += 1, i >= r && (i = 0)) : t && (--i, i < 0 && (i = r - 1)) : o !== null && o >= 0 && o < r ? (i = n ? o + 1 : o - 1, i >= r && (i = 0), i < 0 && (i = r - 1)) : i = n ? 0 : r - 1;
1192
- let s = J.value[i];
1193
- s && (j.value = i, an(s, i));
1194
- }
1195
- let Nn = g(() => ({
1196
- headers: [N.value.translations.period, N.value.translations.value],
1197
- rows: J.value.map((e) => [e.period, e.absoluteValue])
1198
- }));
1199
- return (t, r) => (S(), v("div", {
1200
- ref_key: "sparklineChart",
1201
- ref: A,
1202
- class: "vue-data-ui-component vue-ui-sparkline",
1203
- id: k.value,
1204
- style: x(`width:100%;font-family:${N.value.style.fontFamily};`)
1205
- }, [
1206
- y("p", {
1207
- id: `chart-instructions-${k.value}`,
1208
- class: "sr-only"
1209
- }, Re(N.value.a11y.translations.keyboardNavigation), 9, xt),
1210
- Nn.value?.rows?.length ? (S(), ke(Te, {
1211
- key: 0,
1212
- uid: k.value,
1213
- head: Nn.value.headers,
1214
- body: Nn.value.rows,
1215
- notice: N.value.a11y.translations.tableAvailable,
1216
- caption: N.value.a11y.translations.tableCaption
1217
- }, null, 8, [
1218
- "uid",
1219
- "head",
1220
- "body",
1221
- "notice",
1222
- "caption"
1223
- ])) : _("", !0),
1224
- T(t.$slots, "before", Pe(Ne({
1225
- selected: Y.value,
1226
- latest: Z.value.latest,
1227
- sum: Z.value.sum,
1228
- average: Z.value.average,
1229
- median: Z.value.median,
1230
- trend: Z.value.trend
1231
- })), void 0, !0),
1232
- N.value.style.title.show && e.showInfo ? (S(), v("div", {
1233
- key: 1,
1234
- ref_key: "chartTitle",
1235
- ref: Xe,
1236
- class: "vue-ui-sparkline-title",
1237
- style: x(`display:flex;align-items:center;width:100%;color:${N.value.style.title.color};background:${N.value.style.backgroundColor};justify-content:${N.value.style.title.textAlign === "left" ? "flex-start" : N.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${N.value.style.title.fontSize * 2}px;font-size:${N.value.style.title.fontSize}px;font-weight:${N.value.style.title.bold ? "bold" : "normal"};`)
1238
- }, [y("span", { style: x(`padding:${N.value.style.title.textAlign === "left" ? "0 0 0 12px" : N.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`) }, Re(Y.value ? Y.value.period : N.value.style.title.text), 5)], 4)) : _("", !0),
1239
- y("div", St, [(S(), v("svg", {
1240
- ref_key: "svgRef",
1241
- ref: I,
1242
- xmlns: E(de),
1243
- viewBox: `0 0 ${K.value.width} ${K.value.height}`,
1244
- style: x(`background:${N.value.style.backgroundColor};overflow:visible;direction:ltr`),
1245
- tabindex: "0",
1246
- "aria-describedby": `chart-instructions-${k.value}`,
1247
- onMouseleave: r[0] ||= (e) => X.value = void 0,
1248
- onFocus: An,
1249
- onBlur: jn,
1250
- onKeydown: Mn
1251
- }, [
1252
- je(E(He)),
1253
- t.$slots["chart-background"] ? (S(), v("foreignObject", {
1254
- key: 0,
1255
- x: 0,
1256
- y: 0,
1257
- width: K.value.width <= 0 ? 10 : K.value.width,
1258
- height: K.value.height <= 0 ? 10 : K.value.height,
1259
- style: { pointerEvents: "none" }
1260
- }, [T(t.$slots, "chart-background", {}, void 0, !0)], 8, wt)) : _("", !0),
1261
- y("defs", null, [
1262
- je(we, {
1263
- t: "linear",
1264
- x1: "0%",
1265
- y1: "0%",
1266
- x2: "100%",
1267
- y2: "0%",
1268
- id: `sparkline_gradient_${k.value}`,
1269
- stops: [[
1270
- "0%",
1271
- E(n)(E(f)(N.value.style.area.color, .05), N.value.style.area.opacity),
1272
- 1
1273
- ], [
1274
- "100%",
1275
- E(n)(N.value.style.area.color, N.value.style.area.opacity),
1276
- 1
1277
- ]]
1278
- }, null, 8, ["id", "stops"]),
1279
- je(we, {
1280
- t: "linear",
1281
- x2: "0%",
1282
- y2: "100%",
1283
- id: `sparkline_bar_gradient_pos_${k.value}`,
1284
- stops: [[
1285
- "0%",
1286
- N.value.style.bar.color,
1287
- 1
1288
- ], [
1289
- "100%",
1290
- E(f)(N.value.style.bar.color, .05),
1291
- 1
1292
- ]]
1293
- }, null, 8, ["id", "stops"]),
1294
- je(we, {
1295
- t: "linear",
1296
- x2: "0%",
1297
- y2: "100%",
1298
- id: `sparkline_bar_gradient_neg_${k.value}`,
1299
- stops: [[
1300
- "0%",
1301
- E(f)(N.value.style.bar.color, .05),
1302
- 1
1303
- ], [
1304
- "100%",
1305
- N.value.style.bar.color,
1306
- 1
1307
- ]]
1308
- }, null, 8, ["id", "stops"]),
1309
- y("filter", {
1310
- id: `sparkline_pulse_glow_${k.value}`,
1311
- filterUnits: "userSpaceOnUse",
1312
- x: "-50",
1313
- y: "-50",
1314
- width: "100",
1315
- height: "100"
1316
- }, [...r[1] ||= [y("feGaussianBlur", {
1317
- in: "SourceGraphic",
1318
- stdDeviation: "3",
1319
- result: "blur"
1320
- }, null, -1), y("feMerge", null, [y("feMergeNode", { in: "blur" }), y("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, Tt),
1321
- N.value.temperatureColors.show && $.value ? (S(), v("linearGradient", {
1322
- key: 0,
1323
- id: `temperature_grad_sparkline_${k.value}`,
1324
- gradientUnits: "userSpaceOnUse",
1325
- x1: "0",
1326
- x2: "0",
1327
- y1: q.value.top,
1328
- y2: q.value.bottom
1329
- }, [(S(!0), v(h, null, w($.value, (e, t) => (S(), v("stop", {
1330
- key: `temperature_grad_stop_${t}_${k.value}`,
1331
- "stop-color": e,
1332
- offset: $.value.length === 1 ? "0%" : E(pe)(t, $.value.length)
1333
- }, null, 8, Dt))), 128))], 8, Et)) : _("", !0)
1334
- ]),
1335
- N.value.style.area.show && !Q.value && wn.value.length ? (S(), v("g", Ot, [(S(!0), v(h, null, w(wn.value, (e, t) => (S(), v("path", {
1336
- key: `sparkline_area_${t}_${k.value}`,
1337
- class: "vue-ui-sparkline-area",
1338
- "data-cy": N.value.style.line.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
1339
- d: e,
1340
- fill: N.value.style.area.useGradient ? `url(#sparkline_gradient_${k.value})` : E(n)(N.value.style.area.color, N.value.style.area.opacity),
1341
- "stroke-linecap": "round",
1342
- "stroke-linejoin": "round",
1343
- style: x({ transition: E(P) ? void 0 : "all 0.2s" })
1344
- }, null, 12, kt))), 128))])) : _("", !0),
1345
- N.value.style.line.smooth && !Q.value ? (S(), v(h, { key: 2 }, [y("path", {
1346
- id: G.value,
1347
- d: `M ${bn.value || "0,0"}`,
1348
- fill: "none",
1349
- stroke: "transparent",
1350
- "stroke-width": N.value.style.line.strokeWidth,
1351
- "stroke-linecap": "round",
1352
- "stroke-linejoin": "round"
1353
- }, null, 8, At), ln.value ? (S(!0), v(h, { key: 0 }, w(Sn.value, (e) => (S(), v("path", {
1354
- key: e.path,
1355
- class: "vue-ui-sparkline-path",
1356
- d: `M ${e.path}`,
1357
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
1358
- fill: "none",
1359
- "stroke-width": N.value.style.line.strokeWidth,
1360
- "stroke-linecap": "round",
1361
- "stroke-linejoin": "round",
1362
- "stroke-dasharray": e.dashed ? N.value.style.line.dashArray : 0,
1363
- style: x({ transition: E(P) ? void 0 : "all 0.2s" })
1364
- }, null, 12, jt))), 128)) : (S(), v("path", {
1365
- key: 1,
1366
- class: "vue-ui-sparkline-path",
1367
- d: `M ${bn.value || "0,0"}`,
1368
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
1369
- fill: "none",
1370
- "stroke-width": N.value.style.line.strokeWidth,
1371
- "stroke-linecap": "round",
1372
- "stroke-linejoin": "round",
1373
- style: x({ transition: E(P) ? void 0 : "all 0.2s" })
1374
- }, null, 12, Mt))], 64)) : _("", !0),
1375
- !N.value.style.line.smooth && !Q.value ? (S(), v(h, { key: 3 }, [y("path", {
1376
- id: G.value,
1377
- d: `M ${xn.value || "0,0"}`,
1378
- fill: "none",
1379
- stroke: "transparent",
1380
- "stroke-width": N.value.style.line.strokeWidth,
1381
- "stroke-linecap": "round",
1382
- "stroke-linejoin": "round"
1383
- }, null, 8, Nt), ln.value ? (S(!0), v(h, { key: 0 }, w(Cn.value, (e) => (S(), v("path", {
1384
- key: e.path,
1385
- class: "vue-ui-sparkline-path",
1386
- d: `M ${e.path}`,
1387
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
1388
- fill: "none",
1389
- "stroke-width": N.value.style.line.strokeWidth,
1390
- "stroke-linecap": "round",
1391
- "stroke-linejoin": "round",
1392
- "stroke-dasharray": e.dashed ? N.value.style.line.dashArray * 2 : 0,
1393
- style: x({ transition: E(P) ? void 0 : "all 0.2s" })
1394
- }, null, 12, Pt))), 128)) : (S(), v("path", {
1395
- key: 1,
1396
- class: "vue-ui-sparkline-path",
1397
- d: `M ${xn.value || "0,0"}`,
1398
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : N.value.style.line.color,
1399
- fill: "none",
1400
- "stroke-width": N.value.style.line.strokeWidth,
1401
- "stroke-linecap": "round",
1402
- "stroke-linejoin": "round",
1403
- style: x({ transition: E(P) ? void 0 : "all 0.2s" })
1404
- }, null, 12, Ft))], 64)) : _("", !0),
1405
- Tn.value && !$.value ? (S(), ke(vt, {
1406
- key: 4,
1407
- svgPathData: Tn.value,
1408
- enabled: N.value.gradientPath.show && !Q.value && !$.value,
1409
- strokeWidth: N.value.style.line.strokeWidth,
1410
- highColor: N.value.gradientPath.colors.high,
1411
- lowColor: N.value.gradientPath.colors.low,
1412
- segments: N.value.gradientPath.segments
1413
- }, null, 8, [
1414
- "svgPathData",
1415
- "enabled",
1416
- "strokeWidth",
1417
- "highColor",
1418
- "lowColor",
1419
- "segments"
1420
- ])) : _("", !0),
1421
- Ut.value && ct.value ? (S(), ke(Ye, {
1422
- key: 5,
1423
- uid: k.value,
1424
- svgRef: E(I),
1425
- pulsePathId: G.value,
1426
- pulsePathLength: nt.value,
1427
- pulseDur: tt.value,
1428
- pulseBegin: rt.value,
1429
- pulseRepeatCount: at.value,
1430
- pulseFillMode: ot.value,
1431
- pulseKeyPoints: it.value,
1432
- pulseMotion: ut.value,
1433
- pulse: R.value,
1434
- pulseTrail: dt.value,
1435
- pulseTrailLength: st.value,
1436
- prefersReducedMotion: E(qe),
1437
- loading: E(P),
1438
- isBar: Q.value
1439
- }, null, 8, [
1440
- "uid",
1441
- "svgRef",
1442
- "pulsePathId",
1443
- "pulsePathLength",
1444
- "pulseDur",
1445
- "pulseBegin",
1446
- "pulseRepeatCount",
1447
- "pulseFillMode",
1448
- "pulseKeyPoints",
1449
- "pulseMotion",
1450
- "pulse",
1451
- "pulseTrail",
1452
- "pulseTrailLength",
1453
- "prefersReducedMotion",
1454
- "loading",
1455
- "isBar"
1456
- ])) : _("", !0),
1457
- (S(!0), v(h, null, w(J.value, (e, t) => (S(), v("g", null, [Q.value ? (S(), v("rect", {
1458
- key: 0,
1459
- x: e.x - e.width / 2,
1460
- y: isNaN(e.absoluteValue > 0 ? e.y : Qt.value) ? 0 : e.absoluteValue > 0 ? e.y : Qt.value,
1461
- width: e.width,
1462
- height: isNaN(Math.abs(e.y - Qt.value)) ? 0 : Math.abs(e.y - Qt.value),
1463
- fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${k.value})` : `url(#sparkline_bar_gradient_neg_${k.value})`,
1464
- rx: N.value.style.bar.borderRadius
1465
- }, null, 8, It)) : _("", !0), N.value.style.verticalIndicator.show && (Y.value && e.id === Y.value.id || rn.value === t) ? (S(), v("line", {
1466
- key: 1,
1467
- x1: e.x,
1468
- x2: e.x,
1469
- y1: q.value.top - 6,
1470
- y2: q.value.bottom,
1471
- stroke: N.value.style.verticalIndicator.color || e.color,
1472
- "stroke-width": N.value.style.verticalIndicator.strokeWidth,
1473
- "stroke-linecap": "round",
1474
- "stroke-dasharray": N.value.style.verticalIndicator.strokeDasharray || 0
1475
- }, null, 8, Lt)) : _("", !0)]))), 256)),
1476
- Jt.value < 0 ? (S(), v("line", {
1477
- key: 6,
1478
- x1: q.value.start,
1479
- x2: q.value.start + q.value.width,
1480
- y1: E(ce)(Qt.value, q.value.bottom),
1481
- y2: E(ce)(Qt.value, q.value.bottom),
1482
- stroke: N.value.style.zeroLine.color,
1483
- "stroke-dasharray": N.value.style.zeroLine.strokeWidth * 2,
1484
- "stroke-width": N.value.style.zeroLine.strokeWidth,
1485
- "stroke-linecap": "round"
1486
- }, null, 8, Rt)) : _("", !0),
1487
- (S(!0), v(h, null, w(J.value, (e, t) => (S(), v("g", { key: `sparkline_plot_${e.id}` }, [mn(e, t) ? (S(), v("circle", {
1488
- key: 0,
1489
- cx: e.x,
1490
- cy: e.y,
1491
- r: hn(e, t),
1492
- fill: On(e),
1493
- stroke: gn(e, t),
1494
- "stroke-width": N.value.style.plot.strokeWidth
1495
- }, null, 8, zt)) : _("", !0)]))), 128)),
1496
- e.showInfo && N.value.style.dataLabel.show ? (S(), v("text", {
1497
- key: 7,
1498
- x: N.value.style.dataLabel.position === "left" ? 12 + N.value.style.dataLabel.offsetX : q.value.width + 12 + N.value.style.dataLabel.offsetX,
1499
- y: K.value.height / 2 + N.value.style.dataLabel.fontSize / 2.5 + N.value.style.dataLabel.offsetY,
1500
- "font-size": N.value.style.dataLabel.fontSize,
1501
- "font-weight": N.value.style.dataLabel.bold ? "bold" : "normal",
1502
- fill: N.value.style.dataLabel.color
1503
- }, Re(Y.value ? E(re)(N.value.style.dataLabel.formatter, Y.value.absoluteValue, E(p)({
1504
- p: N.value.style.dataLabel.prefix,
1505
- v: Y.value.absoluteValue,
1506
- s: N.value.style.dataLabel.suffix,
1507
- r: N.value.style.dataLabel.roundingValue
1508
- }), { datapoint: Y.value }) : E(re)(N.value.style.dataLabel.formatter, sn.value, E(p)({
1509
- p: N.value.style.dataLabel.prefix,
1510
- v: sn.value,
1511
- s: N.value.style.dataLabel.suffix,
1512
- r: N.value.style.dataLabel.roundingValue
1513
- }))), 9, Bt)) : _("", !0),
1514
- (S(!0), v(h, null, w(J.value, (e, t) => (S(), v("rect", {
1515
- x: e.x - (q.value.width / (en.value + 1) > K.value.padding ? K.value.padding : q.value.width / (en.value + 1)) / 2,
1516
- y: q.value.top - 6,
1517
- height: q.value.height + 6,
1518
- width: q.value.width / (en.value + 1) > K.value.padding ? K.value.padding : q.value.width / (en.value + 1),
1519
- fill: "transparent",
1520
- onMouseenter: () => an(e, t),
1521
- onMouseleave: () => on(e, t),
1522
- onClick: () => cn(e, t)
1523
- }, null, 40, Vt))), 256)),
1524
- T(t.$slots, "svg", { svg: {
1525
- ...K.value,
1526
- drawingArea: q.value,
1527
- timeLabels: tn.value,
1528
- series: J.value,
1529
- hoveredIndex: j.value
1530
- } }, void 0, !0)
1531
- ], 44, Ct)), t.$slots.hint ? (S(), v("div", Ht, [T(t.$slots, "hint", Pe(Ne({
1532
- hint: N.value.a11y.translations.keyboardNavigation,
1533
- isVisible: kn.value
1534
- })), void 0, !0)])) : _("", !0)]),
1535
- Y.value && N.value.style.tooltip.show ? (S(), ke(E(Ue), {
1536
- key: 2,
1537
- x: Y.value.x,
1538
- y: Y.value.y,
1539
- prevX: X.value.x,
1540
- prevY: X.value.y,
1541
- offsetY: N.value.style.plot.radius * 3 + N.value.style.tooltip.offsetY,
1542
- svgRef: E(I),
1543
- background: N.value.style.tooltip.backgroundColor,
1544
- color: N.value.style.tooltip.color,
1545
- fontSize: N.value.style.tooltip.fontSize,
1546
- borderWidth: N.value.style.tooltip.borderWidth,
1547
- borderColor: N.value.style.tooltip.borderColor,
1548
- borderRadius: N.value.style.tooltip.borderRadius,
1549
- backgroundOpacity: N.value.style.tooltip.backgroundOpacity
1550
- }, {
1551
- default: Ve(() => [T(t.$slots, "tooltip", Pe(Ne({ ...Y.value })), () => [Ae(Re(Y.value.period) + ": " + Re(E(re)(N.value.style.dataLabel.formatter, Y.value.absoluteValue, E(p)({
1552
- p: N.value.style.dataLabel.prefix,
1553
- v: Y.value.absoluteValue,
1554
- s: N.value.style.dataLabel.suffix,
1555
- r: N.value.style.dataLabel.roundingValue
1556
- }), { datapoint: Y.value })), 1)], !0)]),
1557
- _: 3
1558
- }, 8, [
1559
- "x",
1560
- "y",
1561
- "prevX",
1562
- "prevY",
1563
- "offsetY",
1564
- "svgRef",
1565
- "background",
1566
- "color",
1567
- "fontSize",
1568
- "borderWidth",
1569
- "borderColor",
1570
- "borderRadius",
1571
- "backgroundOpacity"
1572
- ])) : _("", !0),
1573
- t.$slots.source ? (S(), v("div", {
1574
- key: 3,
1575
- ref_key: "source",
1576
- ref: Ze,
1577
- dir: "auto"
1578
- }, [T(t.$slots, "source", {}, void 0, !0)], 512)) : _("", !0),
1579
- T(t.$slots, "skeleton", {}, () => [E(P) ? (S(), ke(ve, { key: 0 })) : _("", !0)], !0)
1580
- ], 12, bt));
1581
- }
1582
- }, [["__scopeId", "data-v-4d09c790"]]);
1583
- //#endregion
1584
- export { yt as n, G as t };