vue-data-ui 3.25.13 → 3.26.0
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.
- package/README.md +53 -53
- package/dist/{Arrow-BhZDUeMp.js → Arrow-Bt3aGRMb.js} +1 -1
- package/dist/{BaseDraggableDialog-Ck6R5Q0K.js → BaseDraggableDialog-C1Slb3Yh.js} +2 -2
- package/dist/{BaseIcon-Dlz7gfx0.js → BaseIcon-BV75ei8X.js} +1 -1
- package/dist/{BaseLegendToggle-DGG65LAR.js → BaseLegendToggle-DtS_Oj3B.js} +1 -1
- package/dist/{BaseZoomControls-BK0PxEa8.js → BaseZoomControls-DIhoeyZu.js} +2 -2
- package/dist/{ColorPicker-DMTwxvi_.js → ColorPicker--Y89hTnE.js} +2 -2
- package/dist/{DataTable-BD1eZ0zB.js → DataTable-DX5fToAo.js} +2 -2
- package/dist/{HillActions-CiP2m7Nz.js → HillActions-D6weVdns.js} +1 -1
- package/dist/{Legend-C0Ln0VNe.js → Legend-Dv90gh-6.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BjrMLISf.js → NonSvgPenAndPaper-D2BM5C1-.js} +3 -3
- package/dist/{PackageVersion-D5QkTJQU.js → PackageVersion-DhXk363L.js} +1 -1
- package/dist/{PenAndPaper-XdUD8uB3.js → PenAndPaper-DkQ4sEhs.js} +3 -3
- package/dist/{Shape-VCdxvFV9.js → Shape-B_kDj1gF.js} +1 -1
- package/dist/SlicerPreview-BgyIezm0.js +1730 -0
- package/dist/{SparkTooltip-B1gRxPfb.js → SparkTooltip-BNpyQ021.js} +1 -1
- package/dist/{Title-DeqmC-vN.js → Title-C2JKI5td.js} +1 -1
- package/dist/{Tooltip-DZ4a3XJQ.js → Tooltip-2NAb_Rrx.js} +1 -1
- package/dist/{UserOptions-wFD9vo9g.js → UserOptions-Dgn3StKw.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-DdqmzDdY.js → dom-to-png-DKdtTkNC.js} +1 -1
- package/dist/{exposedLib-BBtjpydc.js → exposedLib-DN6QRAx2.js} +1 -1
- package/dist/{img-W50sC9SC.js → img-CaIaBHA0.js} +1 -1
- package/dist/{labelUtils-Dvm-7rse.js → labelUtils-CD5XzcAo.js} +1 -1
- package/dist/{lib-DOpaUOQx.js → lib-CklJ7rIN.js} +29 -18
- package/dist/{package-Cmcke8zR.js → package-BVRea5S_.js} +1 -1
- package/dist/{pdf-zGbDDpCi.js → pdf-6hacmnKW.js} +1 -1
- package/dist/{render-common-CG1wuHZY.js → render-common-ChwuwzU3.js} +2 -2
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +110 -5
- package/dist/types/vue-ui-candlestick.d.ts +4 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +4 -0
- package/dist/types/vue-ui-quick-chart.d.ts +4 -0
- package/dist/types/vue-ui-sparkline.d.ts +5 -1
- package/dist/types/vue-ui-stackbar.d.ts +4 -0
- package/dist/types/vue-ui-stackline.d.ts +4 -0
- package/dist/types/vue-ui-xy-canvas.d.ts +2 -0
- package/dist/types/vue-ui-xy.d.ts +2 -0
- package/dist/{useConfig-C2uy4ltq.js → useConfig-DObkR9Aa.js} +49 -4
- package/dist/{useNestedProp-Bux0f4iY.js → useNestedProp-Tc9i6ZcN.js} +1 -1
- package/dist/{useObjectBindings-CEuNiBIT.js → useObjectBindings-CPmyIJxB.js} +9 -9
- package/dist/{usePrinter-BBBooAGP.js → usePrinter-Dp3X1vqr.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/vue-data-ui-Dr0uoRD_.js +191 -0
- package/dist/vue-data-ui.js +74 -74
- package/dist/{vue-ui-3d-bar-Ckauu3d4.js → vue-ui-3d-bar-BvJwq13N.js} +7 -7
- package/dist/{vue-ui-accordion-yHZMJLaY.js → vue-ui-accordion-15kKhkup.js} +4 -4
- package/dist/{vue-ui-age-pyramid-BczIt1-U.js → vue-ui-age-pyramid-CVzina7X.js} +7 -7
- package/dist/{vue-ui-annotator-BGB6K6u0.js → vue-ui-annotator-J4Wo2_DR.js} +7 -7
- package/dist/{vue-ui-bullet-BoTsLccZ.js → vue-ui-bullet-CuI5_uF1.js} +8 -8
- package/dist/{vue-ui-bump-B5ztSSQO.js → vue-ui-bump-GGNG4vwu.js} +7 -7
- package/dist/vue-ui-candlestick-Ca9dvzvk.js +2144 -0
- package/dist/{vue-ui-carousel-table-D-3KSWok.js → vue-ui-carousel-table-DOxh9sEm.js} +5 -5
- package/dist/{vue-ui-chestnut-W2l-W0_e.js → vue-ui-chestnut-DQhC_gB8.js} +6 -6
- package/dist/{vue-ui-chord-BFPQsMj8.js → vue-ui-chord-Blnvne2p.js} +9 -9
- package/dist/{vue-ui-circle-pack-BtPc1BR3.js → vue-ui-circle-pack-mNHA1U8B.js} +7 -7
- package/dist/{vue-ui-cursor-CpNOiwkt.js → vue-ui-cursor-D2hgivhn.js} +4 -4
- package/dist/{vue-ui-dag-i-zPwLcN.js → vue-ui-dag-DDSyO2ts.js} +8 -8
- package/dist/{vue-ui-dashboard-DtaW9a2P.js → vue-ui-dashboard-C9MnWAnE.js} +70 -70
- package/dist/{vue-ui-digits-BIlec9af.js → vue-ui-digits-h7H-yHd0.js} +4 -4
- package/dist/{vue-ui-donut-CJlBEyxu.js → vue-ui-donut-D-8OekQ5.js} +3 -3
- package/dist/vue-ui-donut-evolution-CJ6tIbgl.js +1869 -0
- package/dist/{vue-ui-donut-Bgf-n95J.js → vue-ui-donut-oY4iu5pY.js} +11 -11
- package/dist/{vue-ui-dumbbell-C112YLkC.js → vue-ui-dumbbell-52gWeLGK.js} +8 -8
- package/dist/{vue-ui-flow-j4bDg9Zd.js → vue-ui-flow-edMUCkcr.js} +8 -8
- package/dist/{vue-ui-funnel-CVHpfBCW.js → vue-ui-funnel-B08mSlHH.js} +7 -7
- package/dist/{vue-ui-galaxy-ChGpUWh8.js → vue-ui-galaxy-CV59UO9t.js} +10 -10
- package/dist/{vue-ui-gauge-Cp00vXfG.js → vue-ui-gauge-BnBzapom.js} +7 -7
- package/dist/{vue-ui-geo-B4hDk5NO.js → vue-ui-geo-BCmDw5me.js} +8 -8
- package/dist/{vue-ui-gizmo-D6nCCsS4.js → vue-ui-gizmo-BZBV8haQ.js} +4 -4
- package/dist/{vue-ui-heatmap-scVJc1cw.js → vue-ui-heatmap-CjiffI23.js} +8 -8
- package/dist/{vue-ui-hill-DnYUHGAK.js → vue-ui-hill-D5WV6zro.js} +7 -7
- package/dist/{vue-ui-history-plot-C5qAMaaW.js → vue-ui-history-plot-Bd06L1Od.js} +9 -9
- package/dist/{vue-ui-horizontal-bar-nEG4uvpv.js → vue-ui-horizontal-bar-B5Yp6Uql.js} +11 -11
- package/dist/{vue-ui-kpi-DOxId6xg.js → vue-ui-kpi-CNreX8BM.js} +4 -4
- package/dist/{vue-ui-label-BDKY7BI7.js → vue-ui-label-BDP67zvQ.js} +4 -4
- package/dist/{vue-ui-mini-loader-BknVs9VJ.js → vue-ui-mini-loader-pzS7SsP4.js} +3 -3
- package/dist/{vue-ui-molecule-_x232mMu.js → vue-ui-molecule-DqeRhja8.js} +6 -6
- package/dist/{vue-ui-mood-radar-D-F4855V.js → vue-ui-mood-radar-Cgl_QD-j.js} +8 -8
- package/dist/{vue-ui-nested-donuts-0E5IllFW.js → vue-ui-nested-donuts-MDPBZLnW.js} +10 -10
- package/dist/{vue-ui-onion-Eip0S1H7.js → vue-ui-onion-kgZ3uV3c.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-DO0sQdJw.js → vue-ui-parallel-coordinate-plot-CJbZCsPd.js} +10 -10
- package/dist/{vue-ui-quadrant-CA0ClWfL.js → vue-ui-quadrant-B9efnVWT.js} +10 -10
- package/dist/{vue-ui-quick-chart-D-VuAoll.js → vue-ui-quick-chart-hNOMlqTI.js} +1053 -681
- package/dist/{vue-ui-radar-BTD7Y0Ps.js → vue-ui-radar-DJO16PTU.js} +9 -9
- package/dist/{vue-ui-rating-C_Qj6gnP.js → vue-ui-rating-BYLWm5aG.js} +3 -3
- package/dist/{vue-ui-relation-circle-CcxLBVFV.js → vue-ui-relation-circle-DVF3RlHU.js} +7 -7
- package/dist/{vue-ui-ridgeline-BZrzbbhb.js → vue-ui-ridgeline-DvgIu54T.js} +10 -10
- package/dist/{vue-ui-rings-CO48GOP2.js → vue-ui-rings-DVU7F6bL.js} +11 -11
- package/dist/{vue-ui-scatter-DrxUgZbQ.js → vue-ui-scatter-BtlRfhTt.js} +10 -10
- package/dist/{vue-ui-skeleton-CeKjW4MX.js → vue-ui-skeleton-DcMhyC4L.js} +4 -4
- package/dist/{vue-ui-smiley-BvRwx69s.js → vue-ui-smiley-qHvZQJcB.js} +3 -3
- package/dist/{vue-ui-spark-trend-DnujGRyt.js → vue-ui-spark-trend-BuHZP190.js} +4 -4
- package/dist/{vue-ui-sparkbar-Cd_uhYGD.js → vue-ui-sparkbar-MH9VeqdO.js} +4 -4
- package/dist/{vue-ui-sparkgauge-hT31YEtt.js → vue-ui-sparkgauge-Bg_IFD0m.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-PKlTYhKA.js → vue-ui-sparkhistogram-DZu07vIL.js} +5 -5
- package/dist/vue-ui-sparkline-LwEiJPe6.js +2067 -0
- package/dist/{vue-ui-sparkstackbar-R0ij2vi1.js → vue-ui-sparkstackbar-hbIoybeq.js} +5 -5
- package/dist/vue-ui-stackbar-CaxNkWPz.js +2660 -0
- package/dist/vue-ui-stackline-BJqnZXeR.js +2829 -0
- package/dist/{vue-ui-strip-plot-DR3N56rS.js → vue-ui-strip-plot-BWK3JQr6.js} +8 -8
- package/dist/{vue-ui-table-Bg6BeLrf.js → vue-ui-table-CRWoH6dc.js} +6 -6
- package/dist/{vue-ui-table-heatmap-C1b1Pcp8.js → vue-ui-table-heatmap-Bu9RiTU0.js} +6 -6
- package/dist/{vue-ui-table-sparkline-CkVXyequ.js → vue-ui-table-sparkline-CTA_6-gu.js} +5 -5
- package/dist/{vue-ui-thermometer-CqkaMF7Z.js → vue-ui-thermometer-Y5CnROrM.js} +7 -7
- package/dist/{vue-ui-timer-CgJvNwBv.js → vue-ui-timer-BYEpxxDX.js} +6 -6
- package/dist/{vue-ui-tiremarks-B078YJ9M.js → vue-ui-tiremarks-DBndWNiA.js} +7 -7
- package/dist/{vue-ui-treemap-Cfjf8mDl.js → vue-ui-treemap-Cw8a0oFl.js} +10 -10
- package/dist/{vue-ui-waffle-BZIcPa0l.js → vue-ui-waffle-BvfD05mS.js} +11 -11
- package/dist/{vue-ui-wheel-CPTm8AHn.js → vue-ui-wheel-D6NsnLRc.js} +7 -7
- package/dist/{vue-ui-word-cloud-DnGblUwj.js → vue-ui-word-cloud-YrgMp1Fo.js} +8 -8
- package/dist/{vue-ui-world-KkcpeKqp.js → vue-ui-world-BMcqvuJH.js} +8 -8
- package/dist/{vue-ui-xy-ClCV7xA5.js → vue-ui-xy-B6wckF4S.js} +4 -4
- package/dist/vue-ui-xy-Bv7fhRbS.js +5769 -0
- package/dist/{vue-ui-xy-canvas-BlpCbXKR.js → vue-ui-xy-canvas-NzaEYHDR.js} +875 -560
- package/dist/{vue_ui_candlestick-J8jmJvxP.js → vue_ui_candlestick-BXSQY82k.js} +96 -9
- package/dist/{vue_ui_donut_evolution-D1yAAIHr.js → vue_ui_donut_evolution-C6951a2f.js} +35 -7
- package/dist/{vue_ui_quick_chart-mZBdml3Z.js → vue_ui_quick_chart-DByCqSYE.js} +45 -4
- package/dist/{vue_ui_sparkline-auZhap6Y.js → vue_ui_sparkline-b9pEUyGF.js} +33 -1
- package/dist/{vue_ui_stackbar-COOrQQdK.js → vue_ui_stackbar-DdjDL6aq.js} +88 -9
- package/dist/{vue_ui_stackline-DQqKPA9z.js → vue_ui_stackline-Bh0RuInt.js} +88 -9
- package/dist/{vue_ui_xy-BA3-_LCx.js → vue_ui_xy-CcJADijP.js} +78 -9
- package/dist/{vue_ui_xy_canvas-Cb6dg3eK.js → vue_ui_xy_canvas-DrNSzYWq.js} +88 -9
- package/package.json +1 -1
- package/dist/SlicerPreview-BJ4usfYd.js +0 -1708
- package/dist/vue-data-ui-BVzA0tEV.js +0 -280
- package/dist/vue-ui-candlestick-BJtdA4Yu.js +0 -1871
- package/dist/vue-ui-donut-evolution-C0BKntfL.js +0 -1552
- package/dist/vue-ui-sparkline-BSu1uRvP.js +0 -1610
- package/dist/vue-ui-stackbar-BrzzkGFk.js +0 -2369
- package/dist/vue-ui-stackline-zEX3gR3y.js +0 -2483
- package/dist/vue-ui-xy-C6lVqZnx.js +0 -5367
|
@@ -1,1610 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { $ as t, A as n, G as r, I as i, Jt as a, K as o, Kt as s, L as c, Mt as l, N as u, P as d, R as ee, Rt as f, S as te, Tt as ne, U as re, W as ie, X as ae, at as oe, ct as se, d as ce, i as le, k as ue, m as de, qt as fe, t as pe, tn as me, ut as he, vt as ge } from "./lib-DOpaUOQx.js";
|
|
3
|
-
import { n as p, t as _e } from "./useHints-Dq_w2E8B.js";
|
|
4
|
-
import { t as ve } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
-
import { t as ye } from "./useConfig-C2uy4ltq.js";
|
|
6
|
-
import { n as be, t as xe } from "./BaseScanner-Dzc8VT3j.js";
|
|
7
|
-
import { t as Se } from "./useNestedProp-Bux0f4iY.js";
|
|
8
|
-
import { t as Ce } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
-
import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
10
|
-
import { l as Te, t as Ee } from "./useResponsive-ZtArZtUf.js";
|
|
11
|
-
import { t as De } from "./DefGrad-DVBqDjhO.js";
|
|
12
|
-
import { t as Oe } from "./A11yDataTable-DdRsVULz.js";
|
|
13
|
-
import { t as ke } from "./useChartAccessibility-DYqac8yF.js";
|
|
14
|
-
import { t as Ae } from "./usePrefersMotion-BC-CsqR1.js";
|
|
15
|
-
import { t as je } from "./vue_ui_sparkline-auZhap6Y.js";
|
|
16
|
-
import { Fragment as m, computed as h, createBlock as Me, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as Ne, createVNode as Pe, defineAsyncComponent as Fe, guardReactiveProps as Ie, nextTick as y, normalizeProps as Le, normalizeStyle as b, onBeforeUnmount as Re, onMounted as ze, openBlock as x, ref as S, renderList as C, renderSlot as Be, shallowRef as Ve, toDisplayString as He, toRefs as Ue, unref as w, watch as T, watchEffect as We, withCtx as Ge } from "vue";
|
|
17
|
-
//#region src/atoms/SparklinePulse.vue
|
|
18
|
-
var Ke = {
|
|
19
|
-
key: 0,
|
|
20
|
-
style: { "pointer-events": "none" }
|
|
21
|
-
}, qe = [
|
|
22
|
-
"r",
|
|
23
|
-
"fill",
|
|
24
|
-
"filter"
|
|
25
|
-
], Je = [
|
|
26
|
-
"begin",
|
|
27
|
-
"dur",
|
|
28
|
-
"repeatCount",
|
|
29
|
-
"fill",
|
|
30
|
-
"calcMode",
|
|
31
|
-
"keySplines",
|
|
32
|
-
"keyTimes",
|
|
33
|
-
"keyPoints"
|
|
34
|
-
], Ye = ["href"], Xe = [
|
|
35
|
-
"dur",
|
|
36
|
-
"repeatCount",
|
|
37
|
-
"fill",
|
|
38
|
-
"values"
|
|
39
|
-
], Ze = ["r", "fill"], E = [
|
|
40
|
-
"begin",
|
|
41
|
-
"dur",
|
|
42
|
-
"repeatCount",
|
|
43
|
-
"calcMode",
|
|
44
|
-
"keySplines",
|
|
45
|
-
"keyTimes",
|
|
46
|
-
"keyPoints"
|
|
47
|
-
], Qe = ["href"], D = ["dur", "repeatCount"], $e = {
|
|
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 = h(() => Math.min(t.pulseTrailLength, 45)), r = h(() => !!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 T(() => t.loading, async (e) => {
|
|
136
|
-
if (e) {
|
|
137
|
-
i();
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
await y(), i();
|
|
141
|
-
}), T(() => t.pulsePathId, async () => {
|
|
142
|
-
await y(), i();
|
|
143
|
-
}), Re(() => {
|
|
144
|
-
i();
|
|
145
|
-
}), (t, i) => r.value ? (x(), _("g", Ke, [(x(!0), _(m, null, C(n.value, (t, n) => (x(), _(m, null, [n % 3 == 0 ? (x(), _("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
|
-
}, [v("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
|
-
}, [v("mpath", { href: `#${e.pulsePathId}` }, null, 8, Ye)], 8, Je), v("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, Xe)], 8, qe)) : g("", !0)], 64))), 256)), (x(), _("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
|
-
}, [v("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
|
-
}, [v("mpath", { href: `#${e.pulsePathId}` }, null, 8, Qe)], 8, E), v("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, D)], 8, Ze))])) : g("", !0);
|
|
189
|
-
}
|
|
190
|
-
}, et = {
|
|
191
|
-
canvas: null,
|
|
192
|
-
ctx: null
|
|
193
|
-
};
|
|
194
|
-
function tt() {
|
|
195
|
-
if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
|
|
196
|
-
if (!et.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
|
-
et.canvas = e, et.ctx = t;
|
|
202
|
-
}
|
|
203
|
-
return et.ctx;
|
|
204
|
-
}
|
|
205
|
-
function nt(e) {
|
|
206
|
-
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
207
|
-
}
|
|
208
|
-
function O(e) {
|
|
209
|
-
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
210
|
-
}
|
|
211
|
-
function k(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 = j(n, t), i = tt();
|
|
221
|
-
i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
|
|
222
|
-
let a = i.fillStyle;
|
|
223
|
-
if (i.fillStyle = r, i.fillStyle === a && !rt(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 A(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] = k(e[r], t);
|
|
237
|
-
return n;
|
|
238
|
-
}
|
|
239
|
-
function j(e, t = null) {
|
|
240
|
-
return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
|
|
241
|
-
}
|
|
242
|
-
function rt(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 M(e) {
|
|
247
|
-
let t = O(e / 255);
|
|
248
|
-
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
249
|
-
}
|
|
250
|
-
function N(e) {
|
|
251
|
-
let t = O(e), n;
|
|
252
|
-
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, nt(n * 255);
|
|
253
|
-
}
|
|
254
|
-
function P(e, t, n, r) {
|
|
255
|
-
let i = O(n);
|
|
256
|
-
if (r === "linearRGB") {
|
|
257
|
-
let n = M(e.red), r = M(e.green), a = M(e.blue), o = M(t.red), s = M(t.green), c = M(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
|
|
258
|
-
return {
|
|
259
|
-
red: N(l),
|
|
260
|
-
green: N(u),
|
|
261
|
-
blue: N(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 F(e, t, n) {
|
|
275
|
-
let r = e;
|
|
276
|
-
return r < t && (r = t), r > n && (r = n), r;
|
|
277
|
-
}
|
|
278
|
-
function I(e, t) {
|
|
279
|
-
let n = 10 ** t;
|
|
280
|
-
return Math.round(e * n) / n;
|
|
281
|
-
}
|
|
282
|
-
function L(e) {
|
|
283
|
-
return Number.isFinite(e) ? e.toString() : "0";
|
|
284
|
-
}
|
|
285
|
-
function R(e) {
|
|
286
|
-
let t = F(e, 0, 255).toString(16);
|
|
287
|
-
return t.length === 1 ? "0" + t : t;
|
|
288
|
-
}
|
|
289
|
-
function it(e) {
|
|
290
|
-
if (typeof e != "string") return;
|
|
291
|
-
let t = Number.parseFloat(e);
|
|
292
|
-
return Number.isFinite(t) ? t : void 0;
|
|
293
|
-
}
|
|
294
|
-
function at(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 ? F(a, 0, 1) : a;
|
|
299
|
-
}
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region src/SPG/index.js
|
|
302
|
-
var z = "http://www.w3.org/2000/svg";
|
|
303
|
-
function ot(e) {
|
|
304
|
-
if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
305
|
-
let t = document.createElementNS(z, "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(z, "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 B(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 ${L(I(l.x, i))} ${L(I(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 ${L(I(a.x, i))} ${L(I(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, te = `M ${L(I(l.x, i))} ${L(I(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), te += ` L ${L(I(a.x, i))} ${L(I(a.y, i))}`;
|
|
347
|
-
}
|
|
348
|
-
return {
|
|
349
|
-
pathData: te,
|
|
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 ft(e, t, n, r) {
|
|
371
|
-
let i = F(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 ht(pt(o.rgba, s.rgba, l, n));
|
|
376
|
-
}
|
|
377
|
-
function pt(e, t, n, r) {
|
|
378
|
-
let i = F(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: mt(l),
|
|
383
|
-
green: mt(u),
|
|
384
|
-
blue: mt(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 = F(e / 255, 0, 1);
|
|
397
|
-
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
398
|
-
}
|
|
399
|
-
function mt(e) {
|
|
400
|
-
let t = F(e, 0, 1), n;
|
|
401
|
-
return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, F(Math.round(n * 255), 0, 255);
|
|
402
|
-
}
|
|
403
|
-
function ht(e) {
|
|
404
|
-
let t = F(e.alpha, 0, 1), n = F(Math.round(e.red), 0, 255), r = F(Math.round(e.green), 0, 255), i = F(Math.round(e.blue), 0, 255);
|
|
405
|
-
return t >= 1 ? `#${R(n)}${R(r)}${R(i)}` : `rgba(${n}, ${r}, ${i}, ${I(t, 4).toString()})`;
|
|
406
|
-
}
|
|
407
|
-
function gt(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 H(e, t, n) {
|
|
418
|
-
return `<path d="${W(e)}" stroke="${W(t)}" ${n} />`;
|
|
419
|
-
}
|
|
420
|
-
function U(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 _t(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("&", "&").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
437
|
-
}
|
|
438
|
-
function vt(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 = it(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
|
|
447
|
-
a = ot(e);
|
|
448
|
-
let ee = a.pathElement, f = ee.getTotalLength(), te = i === null ? A(t, n.colorReferenceElement) : [];
|
|
449
|
-
if (i === null && (!(f > 0) || te.length === 1)) {
|
|
450
|
-
let t = _t([U({
|
|
451
|
-
pathData: e,
|
|
452
|
-
stroke: ht(te[0]),
|
|
453
|
-
segmentAttributeMap: c
|
|
454
|
-
})], l);
|
|
455
|
-
B(a), r(t);
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
let ne = 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 re = i === null ? null : A(n.temperatureColors, n.colorReferenceElement), ie = i === null ? (() => {
|
|
464
|
-
let e = dt(te), 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
|
-
})() : [], ae = st(f, d, n.maxSegmentLength), oe = ct(f, n.segments, ae), se = f / oe, ce = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, le = se * .45;
|
|
471
|
-
ce > le && (ce = le);
|
|
472
|
-
let ue = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, de = gt(c), fe = [], pe = i === null ? null : [], me = i === null ? null : [], he = 0, ge = i === null ? ie.length - 2 : 0, p = 0, _e = () => {
|
|
473
|
-
let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
474
|
-
for (; p < oe && performance.now() - e < t;) {
|
|
475
|
-
let e = p * se, t = (p + 1) * se, n = e, r = t;
|
|
476
|
-
if (p !== 0 && (n = e - ce), p !== oe - 1 && (r = t + ce), n = F(n, 0, f), r = F(r, 0, f), r > n) {
|
|
477
|
-
if (i !== null) {
|
|
478
|
-
let e = ut(ee, n, r, s, o, ue);
|
|
479
|
-
pe.push(e.pathData), me.push(e.bounds);
|
|
480
|
-
} else {
|
|
481
|
-
let e = (n + r) * .5 / f;
|
|
482
|
-
for (; he < ge && e > ie[he + 1].position;) he += 1;
|
|
483
|
-
let t = ft(ie, e, ne, he), i = lt(ee, n, r, s, o, ue);
|
|
484
|
-
fe.push(H(i, t, de));
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
p += 1;
|
|
488
|
-
}
|
|
489
|
-
if (p < oe) {
|
|
490
|
-
requestAnimationFrame(_e);
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
if (i !== null) {
|
|
494
|
-
let e = Infinity, t = -Infinity;
|
|
495
|
-
for (let n = 0; n < me.length; n += 1) {
|
|
496
|
-
let r = me[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
|
|
497
|
-
a < e && (e = a), o > t && (t = o);
|
|
498
|
-
}
|
|
499
|
-
let n = re[0], r = re[1];
|
|
500
|
-
fe.length = 0;
|
|
501
|
-
for (let a = 0; a < me.length; a += 1) {
|
|
502
|
-
let o = me[a], s = at(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = ht(i === "vertical" ? P(n, r, s, ne) : P(r, n, s, ne)), l = pe[a];
|
|
503
|
-
fe.push(H(l, c, de));
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
let c = _t(fe, l);
|
|
507
|
-
B(a), r(c);
|
|
508
|
-
};
|
|
509
|
-
requestAnimationFrame(_e);
|
|
510
|
-
} catch (e) {
|
|
511
|
-
B(a), i(e);
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
//#endregion
|
|
516
|
-
//#region src/atoms/SparklineGradientPath.vue
|
|
517
|
-
var yt = ["innerHTML"], bt = {
|
|
518
|
-
__name: "SparklineGradientPath",
|
|
519
|
-
props: {
|
|
520
|
-
svgPathData: {
|
|
521
|
-
type: String,
|
|
522
|
-
required: !0
|
|
523
|
-
},
|
|
524
|
-
enabled: {
|
|
525
|
-
type: Boolean,
|
|
526
|
-
required: !0
|
|
527
|
-
},
|
|
528
|
-
strokeWidth: {
|
|
529
|
-
type: Number,
|
|
530
|
-
required: !0
|
|
531
|
-
},
|
|
532
|
-
highColor: {
|
|
533
|
-
type: String,
|
|
534
|
-
required: !0
|
|
535
|
-
},
|
|
536
|
-
lowColor: {
|
|
537
|
-
type: String,
|
|
538
|
-
required: !0
|
|
539
|
-
},
|
|
540
|
-
segments: {
|
|
541
|
-
type: Number,
|
|
542
|
-
required: !0
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
setup(e) {
|
|
546
|
-
let t = e, n = S(""), r = 0;
|
|
547
|
-
return T(() => [
|
|
548
|
-
t.enabled,
|
|
549
|
-
t.svgPathData,
|
|
550
|
-
t.strokeWidth,
|
|
551
|
-
t.highColor,
|
|
552
|
-
t.lowColor,
|
|
553
|
-
t.segments
|
|
554
|
-
], async ([e]) => {
|
|
555
|
-
let i = ++r;
|
|
556
|
-
if (!e) {
|
|
557
|
-
n.value = "";
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
let a = await vt(t.svgPathData, null, {
|
|
561
|
-
segments: t.segments,
|
|
562
|
-
temperatureMode: "vertical",
|
|
563
|
-
temperatureColors: [t.highColor, t.lowColor],
|
|
564
|
-
attrs: {
|
|
565
|
-
"stroke-width": t.strokeWidth,
|
|
566
|
-
"stroke-linecap": "round",
|
|
567
|
-
"stroke-linejoin": "round"
|
|
568
|
-
},
|
|
569
|
-
groupAttrs: { class: "vue-ui-sparkline-gradient" }
|
|
570
|
-
});
|
|
571
|
-
i === r && (n.value = a);
|
|
572
|
-
}, { immediate: !0 }), (e, t) => (x(), _("g", { innerHTML: n.value }, null, 8, yt));
|
|
573
|
-
}
|
|
574
|
-
}, xt = /* @__PURE__ */ e({ default: () => Gt }), St = ["id"], Ct = ["id"], wt = { style: { position: "relative" } }, Tt = [
|
|
575
|
-
"xmlns",
|
|
576
|
-
"viewBox",
|
|
577
|
-
"aria-describedby"
|
|
578
|
-
], Et = ["width", "height"], Dt = ["id"], Ot = [
|
|
579
|
-
"id",
|
|
580
|
-
"y1",
|
|
581
|
-
"y2"
|
|
582
|
-
], kt = ["stop-color", "offset"], At = { key: 1 }, jt = [
|
|
583
|
-
"data-cy",
|
|
584
|
-
"d",
|
|
585
|
-
"fill"
|
|
586
|
-
], Mt = [
|
|
587
|
-
"id",
|
|
588
|
-
"d",
|
|
589
|
-
"stroke-width"
|
|
590
|
-
], Nt = [
|
|
591
|
-
"d",
|
|
592
|
-
"stroke",
|
|
593
|
-
"stroke-width",
|
|
594
|
-
"stroke-dasharray"
|
|
595
|
-
], Pt = [
|
|
596
|
-
"d",
|
|
597
|
-
"stroke",
|
|
598
|
-
"stroke-width"
|
|
599
|
-
], Ft = [
|
|
600
|
-
"id",
|
|
601
|
-
"d",
|
|
602
|
-
"stroke-width"
|
|
603
|
-
], It = [
|
|
604
|
-
"d",
|
|
605
|
-
"stroke",
|
|
606
|
-
"stroke-width",
|
|
607
|
-
"stroke-dasharray"
|
|
608
|
-
], Lt = [
|
|
609
|
-
"d",
|
|
610
|
-
"stroke",
|
|
611
|
-
"stroke-width"
|
|
612
|
-
], Rt = [
|
|
613
|
-
"x",
|
|
614
|
-
"y",
|
|
615
|
-
"width",
|
|
616
|
-
"height",
|
|
617
|
-
"fill",
|
|
618
|
-
"rx"
|
|
619
|
-
], zt = [
|
|
620
|
-
"x1",
|
|
621
|
-
"x2",
|
|
622
|
-
"y1",
|
|
623
|
-
"y2",
|
|
624
|
-
"stroke",
|
|
625
|
-
"stroke-width",
|
|
626
|
-
"stroke-dasharray"
|
|
627
|
-
], Bt = [
|
|
628
|
-
"x1",
|
|
629
|
-
"x2",
|
|
630
|
-
"y1",
|
|
631
|
-
"y2",
|
|
632
|
-
"stroke",
|
|
633
|
-
"stroke-dasharray",
|
|
634
|
-
"stroke-width"
|
|
635
|
-
], Vt = [
|
|
636
|
-
"cx",
|
|
637
|
-
"cy",
|
|
638
|
-
"r",
|
|
639
|
-
"fill",
|
|
640
|
-
"stroke",
|
|
641
|
-
"stroke-width"
|
|
642
|
-
], Ht = [
|
|
643
|
-
"x",
|
|
644
|
-
"y",
|
|
645
|
-
"font-size",
|
|
646
|
-
"font-weight",
|
|
647
|
-
"fill"
|
|
648
|
-
], Ut = [
|
|
649
|
-
"x",
|
|
650
|
-
"y",
|
|
651
|
-
"height",
|
|
652
|
-
"width",
|
|
653
|
-
"onMouseenter",
|
|
654
|
-
"onMouseleave",
|
|
655
|
-
"onClick"
|
|
656
|
-
], Wt = {
|
|
657
|
-
key: 0,
|
|
658
|
-
style: {
|
|
659
|
-
position: "absolute",
|
|
660
|
-
top: "100%",
|
|
661
|
-
left: "0",
|
|
662
|
-
width: "100%"
|
|
663
|
-
},
|
|
664
|
-
"data-dom-to-png-ignore": "",
|
|
665
|
-
"aria-hidden": "true"
|
|
666
|
-
}, Gt = /*#__PURE__*/ we({
|
|
667
|
-
__name: "vue-ui-sparkline",
|
|
668
|
-
props: {
|
|
669
|
-
config: {
|
|
670
|
-
type: Object,
|
|
671
|
-
default() {
|
|
672
|
-
return {};
|
|
673
|
-
}
|
|
674
|
-
},
|
|
675
|
-
dataset: {
|
|
676
|
-
type: Array,
|
|
677
|
-
default() {
|
|
678
|
-
return [];
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
showInfo: {
|
|
682
|
-
type: Boolean,
|
|
683
|
-
default: !0
|
|
684
|
-
},
|
|
685
|
-
selectedIndex: {
|
|
686
|
-
type: Number,
|
|
687
|
-
default: void 0
|
|
688
|
-
},
|
|
689
|
-
heightRatio: {
|
|
690
|
-
type: Number,
|
|
691
|
-
default: 1
|
|
692
|
-
},
|
|
693
|
-
forcedPadding: {
|
|
694
|
-
type: Number,
|
|
695
|
-
default: 30
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
emits: ["hoverIndex", "selectDatapoint"],
|
|
699
|
-
setup(e, { emit: we }) {
|
|
700
|
-
let Ke = Fe(() => import("./PackageVersion-D5QkTJQU.js").then((e) => e.t)), qe = Fe(() => import("./SparkTooltip-B1gRxPfb.js")), { vue_ui_sparkline: Je } = ye(), { isThemeValid: Ye, warnInvalidTheme: Xe } = Ce(), Ze = Ae(), E = e, Qe = h(() => Array.isArray(E.dataset) && E.dataset.length > 0), D = S(ae()), et = S(null), tt = S(null), nt = S(null), O = S(null), k = S(null), A = S(ot()), j = h(() => A.value.style.tooltip), rt = h(() => A.value.style.bar), M = h(() => A.value.style.line), N = h(() => A.value.style.area), P = h(() => A.value.style.dataLabel), F = h(() => A.value.style);
|
|
701
|
-
p({
|
|
702
|
-
config: () => A.value,
|
|
703
|
-
dataset: () => E.dataset,
|
|
704
|
-
component: "VueUiSparkline",
|
|
705
|
-
rules: [
|
|
706
|
-
_e.emptyArray,
|
|
707
|
-
{
|
|
708
|
-
test: (e) => e.length > 500,
|
|
709
|
-
message: [
|
|
710
|
-
"👀 The dataset has > 500 datapoints. Consider if you really need this level of detail.",
|
|
711
|
-
"",
|
|
712
|
-
"▶️ Use larger time scales, or aggregated values"
|
|
713
|
-
]
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
test: (e) => e.length > 1095,
|
|
717
|
-
message: [
|
|
718
|
-
"👀 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.",
|
|
719
|
-
"",
|
|
720
|
-
"▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
|
|
721
|
-
]
|
|
722
|
-
}
|
|
723
|
-
]
|
|
724
|
-
});
|
|
725
|
-
function I(e) {
|
|
726
|
-
return E.config?.skeletonDataset && Array.isArray(E.config.skeletonDataset) ? E.config.skeletonDataset.map((e) => ({
|
|
727
|
-
period: "-",
|
|
728
|
-
value: e
|
|
729
|
-
})) : se(e).map((e) => ({
|
|
730
|
-
period: "-",
|
|
731
|
-
value: e
|
|
732
|
-
}));
|
|
733
|
-
}
|
|
734
|
-
let L = h(() => me({
|
|
735
|
-
defaultConfig: {
|
|
736
|
-
gradientPath: { show: !1 },
|
|
737
|
-
temperatureColors: { show: !1 },
|
|
738
|
-
style: {
|
|
739
|
-
backgroundColor: "#99999930",
|
|
740
|
-
scaleMin: 0,
|
|
741
|
-
scaleMax: null,
|
|
742
|
-
animation: { show: !1 },
|
|
743
|
-
line: {
|
|
744
|
-
color: "#AAAAAA",
|
|
745
|
-
pulse: { show: !1 },
|
|
746
|
-
dashIndices: []
|
|
747
|
-
},
|
|
748
|
-
bar: { color: "#AAAAAA" },
|
|
749
|
-
area: { color: "#CACACA" },
|
|
750
|
-
zeroLine: { color: "#6A6A6A" },
|
|
751
|
-
dataLabel: { show: !1 },
|
|
752
|
-
tooltip: { show: !1 }
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
userConfig: A.value.skeletonConfig ?? {}
|
|
756
|
-
})), { loading: R, FINAL_DATASET: it, manualLoading: at } = be({
|
|
757
|
-
...Ue(E),
|
|
758
|
-
FINAL_CONFIG: A,
|
|
759
|
-
prepareConfig: ot,
|
|
760
|
-
callback: () => {
|
|
761
|
-
Promise.resolve().then(async () => {
|
|
762
|
-
await y(), Yt();
|
|
763
|
-
});
|
|
764
|
-
},
|
|
765
|
-
skeletonDataset: I(12),
|
|
766
|
-
skeletonConfig: me({
|
|
767
|
-
defaultConfig: A.value,
|
|
768
|
-
userConfig: L.value
|
|
769
|
-
})
|
|
770
|
-
}), { svgRef: z } = ke({ config: F.value.title });
|
|
771
|
-
function ot() {
|
|
772
|
-
let e = Se({
|
|
773
|
-
userConfig: E.config,
|
|
774
|
-
defaultConfig: Je
|
|
775
|
-
}), t = {}, n = e.theme;
|
|
776
|
-
if (n) {
|
|
777
|
-
if (!Ye.value(e)) Xe(e), t = e;
|
|
778
|
-
else {
|
|
779
|
-
let r = Se({
|
|
780
|
-
userConfig: je[n] || E.config,
|
|
781
|
-
defaultConfig: e
|
|
782
|
-
});
|
|
783
|
-
t = { ...Se({
|
|
784
|
-
userConfig: E.config,
|
|
785
|
-
defaultConfig: r
|
|
786
|
-
}) };
|
|
787
|
-
}
|
|
788
|
-
} else t = e;
|
|
789
|
-
return t;
|
|
790
|
-
}
|
|
791
|
-
let B = h(() => A.value?.style?.line.pulse || {}), st = h(() => `${Math.max(200, Number(B.value.durationMs) || 4e3) / 1e3}s`), ct = S(0), lt = h(() => B.value?.begin || "0ms"), ut = S("0;1"), dt = h(() => B.value?.loop === !1 ? "1" : "indefinite"), ft = h(() => B.value?.loop === !1 ? "freeze" : void 0), pt = h(() => B.value.trail.show && gt.value.lengthPx || 1), V = h(() => !!B.value?.show && !X.value && !Ze.value && !R.value && (q.value?.length || 0) > 1);
|
|
792
|
-
function mt() {
|
|
793
|
-
if (!V.value) {
|
|
794
|
-
ct.value = 0;
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
let e = z.value;
|
|
798
|
-
if (!e) return;
|
|
799
|
-
let t = `#${Zt.value}`, n = e.querySelector?.(t);
|
|
800
|
-
if (n && typeof n.getTotalLength == "function") {
|
|
801
|
-
let e = n.getTotalLength();
|
|
802
|
-
Number.isFinite(e) && e > 0 && (ct.value = e);
|
|
803
|
-
return;
|
|
804
|
-
}
|
|
805
|
-
requestAnimationFrame(() => {
|
|
806
|
-
let n = e.querySelector?.(t);
|
|
807
|
-
if (n && typeof n.getTotalLength == "function") {
|
|
808
|
-
let e = n.getTotalLength();
|
|
809
|
-
Number.isFinite(e) && e > 0 && (ct.value = e);
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
let ht = h(() => {
|
|
814
|
-
let e = B.value?.easing || "ease-in-out", t = {
|
|
815
|
-
ease: [
|
|
816
|
-
.25,
|
|
817
|
-
.1,
|
|
818
|
-
.25,
|
|
819
|
-
1
|
|
820
|
-
],
|
|
821
|
-
"ease-in": [
|
|
822
|
-
.42,
|
|
823
|
-
0,
|
|
824
|
-
1,
|
|
825
|
-
1
|
|
826
|
-
],
|
|
827
|
-
"ease-out": [
|
|
828
|
-
0,
|
|
829
|
-
0,
|
|
830
|
-
.58,
|
|
831
|
-
1
|
|
832
|
-
],
|
|
833
|
-
"ease-in-out": [
|
|
834
|
-
.42,
|
|
835
|
-
0,
|
|
836
|
-
.58,
|
|
837
|
-
1
|
|
838
|
-
]
|
|
839
|
-
};
|
|
840
|
-
return e === "linear" ? {
|
|
841
|
-
calcMode: "linear",
|
|
842
|
-
keySplines: null,
|
|
843
|
-
keyTimes: "0;1"
|
|
844
|
-
} : e === "steps" ? {
|
|
845
|
-
calcMode: "discrete",
|
|
846
|
-
keySplines: null,
|
|
847
|
-
keyTimes: "0;1"
|
|
848
|
-
} : {
|
|
849
|
-
calcMode: "spline",
|
|
850
|
-
keySplines: (e === "cubic-bezier" ? Array.isArray(B.value?.cubicBezier) && B.value.cubicBezier.length === 4 ? B.value.cubicBezier : [
|
|
851
|
-
.4,
|
|
852
|
-
0,
|
|
853
|
-
.2,
|
|
854
|
-
1
|
|
855
|
-
] : t[e] || t["ease-in-out"]).join(" "),
|
|
856
|
-
keyTimes: "0;1"
|
|
857
|
-
};
|
|
858
|
-
}), gt = h(() => {
|
|
859
|
-
let e = B.value?.trail || {}, t = M.value.strokeWidth || 1;
|
|
860
|
-
return {
|
|
861
|
-
show: e.show !== !1,
|
|
862
|
-
lengthPx: e.length,
|
|
863
|
-
width: Math.max(1, Number(e.strokeWidth) || t * 2.2),
|
|
864
|
-
opacity: Math.min(1, Math.max(0, Number(e.opacity) ?? .6)),
|
|
865
|
-
fadeIn: .5,
|
|
866
|
-
fadeOut: .2
|
|
867
|
-
};
|
|
868
|
-
}), H = h(() => l({
|
|
869
|
-
data: it.value,
|
|
870
|
-
threshold: A.value.downsample.threshold
|
|
871
|
-
}));
|
|
872
|
-
h(() => {
|
|
873
|
-
if (!A.value.temperatureColors.show) return !1;
|
|
874
|
-
let e = it.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
|
|
875
|
-
return new Set(e).size <= 1;
|
|
876
|
-
}), T(() => E.config, (e) => {
|
|
877
|
-
R.value || (A.value = ot()), tn(), G.value.chartWidth = F.value.chartWidth;
|
|
878
|
-
}, { deep: !0 }), T(() => E.dataset, (e) => {
|
|
879
|
-
Array.isArray(e) && e.length > 0 && (at.value = !1), U.value = l({
|
|
880
|
-
data: it.value.map((e) => ({
|
|
881
|
-
...e,
|
|
882
|
-
value: [void 0].includes(e.value) ? null : e.value
|
|
883
|
-
})),
|
|
884
|
-
threshold: A.value.downsample.threshold
|
|
885
|
-
});
|
|
886
|
-
}, { deep: !0 });
|
|
887
|
-
let U = S(_t());
|
|
888
|
-
function _t() {
|
|
889
|
-
return l({
|
|
890
|
-
data: it.value.map((e) => F.value.animation.show && it.value.length > 1 ? {
|
|
891
|
-
...e,
|
|
892
|
-
value: null
|
|
893
|
-
} : {
|
|
894
|
-
...e,
|
|
895
|
-
value: [void 0].includes(e.value) ? null : e.value
|
|
896
|
-
}),
|
|
897
|
-
threshold: A.value.downsample.threshold
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
let W = Ve(null), vt = Ve(null), yt = S(!1), xt = S(0), Gt = S([]), Kt = S(""), qt = h(() => {
|
|
901
|
-
let e = (H.value || []).map((e) => `${e.period}::${Number.isFinite(e.value) ? e.value : 0}`).join("|"), t = A.value?.style?.animation || {}, n = !!A.value?.gradientPath?.show && !A.value.temperatureColors.show;
|
|
902
|
-
return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
|
|
903
|
-
});
|
|
904
|
-
function Jt() {
|
|
905
|
-
xt.value &&= (cancelAnimationFrame(xt.value), 0), Gt.value.forEach((e) => clearTimeout(e)), Gt.value = [], yt.value = !1;
|
|
906
|
-
}
|
|
907
|
-
function Yt() {
|
|
908
|
-
let e = A.value?.style?.animation || {}, t = H.value || [], n = qt.value, r = !!A.value.gradientPath.show && !A.value.temperatureColors.show;
|
|
909
|
-
if (n && n === Kt.value && (yt.value || U.value.length === t.length)) return;
|
|
910
|
-
if (Jt(), r || !e.show || R.value || t.length <= 1 || Ze.value) {
|
|
911
|
-
U.value = t, Kt.value = n;
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
yt.value = !0, Kt.value = n, U.value = [];
|
|
915
|
-
let i = Math.max(1, Number(e.animationFrames) || 1), a = Math.max(1, Math.floor(i / t.length)), o = 0, s = () => {
|
|
916
|
-
if (n !== qt.value) {
|
|
917
|
-
Jt();
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
|
-
if (o < t.length) {
|
|
921
|
-
U.value.push(t[o]);
|
|
922
|
-
let e = setTimeout(() => {
|
|
923
|
-
xt.value = requestAnimationFrame(s);
|
|
924
|
-
}, a);
|
|
925
|
-
Gt.value.push(e), o += 1;
|
|
926
|
-
} else U.value = t, Jt();
|
|
927
|
-
};
|
|
928
|
-
xt.value = requestAnimationFrame(s);
|
|
929
|
-
}
|
|
930
|
-
T(qt, () => {
|
|
931
|
-
Yt();
|
|
932
|
-
}), ze(() => {
|
|
933
|
-
tn(), Yt();
|
|
934
|
-
}), Re(() => {
|
|
935
|
-
Jt();
|
|
936
|
-
});
|
|
937
|
-
let Xt = S(0);
|
|
938
|
-
T(() => R.value, async (e) => {
|
|
939
|
-
e || (await y(), Xt.value += 1);
|
|
940
|
-
}), T(() => yt.value, async (e) => {
|
|
941
|
-
e || R.value || (await y(), Xt.value += 1);
|
|
942
|
-
});
|
|
943
|
-
let Zt = h(() => `sparkline_line_path_${D.value}`), Qt = S(!0);
|
|
944
|
-
async function $t() {
|
|
945
|
-
Qt.value = !1, await y(), Qt.value = !0, await y(), mt();
|
|
946
|
-
}
|
|
947
|
-
let en = h(() => A.value.debug);
|
|
948
|
-
function tn() {
|
|
949
|
-
if (f(E.dataset) ? (oe({
|
|
950
|
-
componentName: "VueUiSparkline",
|
|
951
|
-
type: "dataset",
|
|
952
|
-
debug: en.value
|
|
953
|
-
}), at.value = !0) : en.value && E.dataset.forEach((e, t) => {
|
|
954
|
-
ge({
|
|
955
|
-
datasetObject: e,
|
|
956
|
-
requiredAttributes: ["period", "value"]
|
|
957
|
-
}).forEach((e) => {
|
|
958
|
-
oe({
|
|
959
|
-
componentName: "VueUiSparkline",
|
|
960
|
-
type: "datasetSerieAttribute",
|
|
961
|
-
property: e,
|
|
962
|
-
index: t
|
|
963
|
-
});
|
|
964
|
-
});
|
|
965
|
-
}), f(E.dataset) || (at.value = A.value.loading), A.value.responsive) {
|
|
966
|
-
let e = Te(() => {
|
|
967
|
-
let { width: e, height: t } = Ee({
|
|
968
|
-
chart: et.value,
|
|
969
|
-
title: F.value.title.show && E.showInfo ? tt.value : null,
|
|
970
|
-
source: nt.value
|
|
971
|
-
});
|
|
972
|
-
requestAnimationFrame(() => {
|
|
973
|
-
G.value.width = e, G.value.height = t, G.value.chartWidth = F.value.chartWidth / 500 * e, G.value.padding = E.forcedPadding / 500 * e;
|
|
974
|
-
});
|
|
975
|
-
});
|
|
976
|
-
W.value && (vt.value && W.value.unobserve(vt.value), W.value.disconnect()), W.value = new ResizeObserver(e), vt.value = et.value.parentNode, W.value.observe(vt.value);
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
Re(() => {
|
|
980
|
-
W.value && (vt.value && W.value.unobserve(vt.value), W.value.disconnect());
|
|
981
|
-
});
|
|
982
|
-
let G = S({
|
|
983
|
-
height: 80 * E.heightRatio,
|
|
984
|
-
width: 500,
|
|
985
|
-
chartWidth: F.value.chartWidth,
|
|
986
|
-
padding: E.forcedPadding
|
|
987
|
-
}), nn = we, K = h(() => {
|
|
988
|
-
let { top: e, right: t, bottom: n, left: r } = F.value.padding;
|
|
989
|
-
return {
|
|
990
|
-
top: e,
|
|
991
|
-
left: r,
|
|
992
|
-
right: G.value.width - t,
|
|
993
|
-
bottom: G.value.height - n,
|
|
994
|
-
start: E.showInfo && P.value.show && P.value.position === "left" ? G.value.width - G.value.chartWidth + r : G.value.padding + r,
|
|
995
|
-
width: E.showInfo && P.value.show ? G.value.chartWidth - r - t : G.value.width - G.value.padding - r - t,
|
|
996
|
-
height: G.value.height - e - n
|
|
997
|
-
};
|
|
998
|
-
}), rn = h(() => [null, void 0].includes(F.value.scaleMin) ? Math.min(...U.value.map((e) => isNaN(e.value) || [
|
|
999
|
-
void 0,
|
|
1000
|
-
null,
|
|
1001
|
-
"NaN",
|
|
1002
|
-
NaN,
|
|
1003
|
-
Infinity,
|
|
1004
|
-
-Infinity
|
|
1005
|
-
].includes(e.value) ? 0 : e.value || 0)) : F.value.scaleMin), an = h(() => [null, void 0].includes(F.value.scaleMax) ? Math.max(...U.value.map((e) => isNaN(e.value) || [
|
|
1006
|
-
void 0,
|
|
1007
|
-
null,
|
|
1008
|
-
"NaN",
|
|
1009
|
-
NaN,
|
|
1010
|
-
Infinity,
|
|
1011
|
-
-Infinity
|
|
1012
|
-
].includes(e.value) ? 0 : e.value || 0)) : F.value.scaleMax), on = h(() => {
|
|
1013
|
-
let e = rn.value >= 0 ? 0 : rn.value;
|
|
1014
|
-
return Math.abs(e);
|
|
1015
|
-
}), sn = h(() => an.value + on.value), cn = h(() => K.value.bottom - K.value.height * ln(on.value));
|
|
1016
|
-
function ln(e) {
|
|
1017
|
-
return isNaN(e / sn.value) ? 0 : e / sn.value;
|
|
1018
|
-
}
|
|
1019
|
-
let un = h(() => H.value.length - 1 || 1), dn = S([]), fn = 0;
|
|
1020
|
-
We(() => {
|
|
1021
|
-
let e = ++fn;
|
|
1022
|
-
(async () => {
|
|
1023
|
-
let t = await ve({
|
|
1024
|
-
values: H.value.map((e) => e.period),
|
|
1025
|
-
maxDatapoints: H.value.length,
|
|
1026
|
-
formatter: P.value.datetimeFormatter,
|
|
1027
|
-
start: 0,
|
|
1028
|
-
end: H.value.length
|
|
1029
|
-
});
|
|
1030
|
-
e === fn && (dn.value = t);
|
|
1031
|
-
})();
|
|
1032
|
-
});
|
|
1033
|
-
let q = h(() => U.value.map((e, t) => {
|
|
1034
|
-
let n = isNaN(e.value) || [
|
|
1035
|
-
void 0,
|
|
1036
|
-
"NaN",
|
|
1037
|
-
NaN,
|
|
1038
|
-
Infinity,
|
|
1039
|
-
-Infinity
|
|
1040
|
-
].includes(e.value) ? 0 : e.value, r = K.value.width / un.value;
|
|
1041
|
-
return {
|
|
1042
|
-
value: e.value,
|
|
1043
|
-
absoluteValue: n,
|
|
1044
|
-
period: dn.value && dn.value[t] && dn.value[t].text ? dn.value[t].text : e.period,
|
|
1045
|
-
plotValue: n + on.value,
|
|
1046
|
-
toMax: ln(n + on.value),
|
|
1047
|
-
sourceIndex: t,
|
|
1048
|
-
x: K.value.start + t * r,
|
|
1049
|
-
y: K.value.bottom - K.value.height * ln(n + on.value),
|
|
1050
|
-
id: `plot_${D.value}_${t}`,
|
|
1051
|
-
color: X.value ? rt.value.color : N.value.useGradient ? a(M.value.color, .05 * (1 - t / un.value)) : M.value.color,
|
|
1052
|
-
width: r
|
|
1053
|
-
};
|
|
1054
|
-
})), pn = h(() => E.selectedIndex !== void 0 && E.selectedIndex !== null && E.selectedIndex >= 0 && E.selectedIndex < q.value.length ? E.selectedIndex : k.value !== void 0 && k.value !== null && k.value >= 0 && k.value < q.value.length ? k.value : null), J = S(void 0), mn = S(void 0);
|
|
1055
|
-
function hn(e, t) {
|
|
1056
|
-
A.value.events.datapointEnter && A.value.events.datapointEnter({
|
|
1057
|
-
datapoint: e,
|
|
1058
|
-
seriesIndex: t
|
|
1059
|
-
}), k.value = t, O.value = t, J.value = e, mn.value ||= e, nn("hoverIndex", { index: t });
|
|
1060
|
-
}
|
|
1061
|
-
function gn(e, t) {
|
|
1062
|
-
A.value.events.datapointLeave && A.value.events.datapointLeave({
|
|
1063
|
-
datapoint: e,
|
|
1064
|
-
seriesIndex: t
|
|
1065
|
-
}), mn.value = J.value, J.value = void 0, k.value = null, O.value = null, nn("hoverIndex", { index: void 0 });
|
|
1066
|
-
}
|
|
1067
|
-
let Y = h(() => {
|
|
1068
|
-
if (Qe.value) {
|
|
1069
|
-
let e = q.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
|
|
1070
|
-
return {
|
|
1071
|
-
latest: q.value[q.value.length - 1] ? q.value[q.value.length - 1].absoluteValue : 0,
|
|
1072
|
-
sum: t,
|
|
1073
|
-
average: t / q.value.length,
|
|
1074
|
-
median: de(e),
|
|
1075
|
-
trend: ce(q.value.map(({ x: e, y: t, absoluteValue: n }) => ({
|
|
1076
|
-
x: e,
|
|
1077
|
-
y: t,
|
|
1078
|
-
value: n
|
|
1079
|
-
}))).trend
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
return {
|
|
1083
|
-
latest: null,
|
|
1084
|
-
sum: null,
|
|
1085
|
-
average: null,
|
|
1086
|
-
median: null,
|
|
1087
|
-
trend: null
|
|
1088
|
-
};
|
|
1089
|
-
}), _n = h(() => Qe.value ? P.value.valueType === "latest" ? Y.value.latest : P.value.valueType === "sum" ? Y.value.sum : P.value.valueType === "average" ? Y.value.average : 0 : 0), X = h(() => A.value.type && A.value.type === "bar");
|
|
1090
|
-
function vn(e, t) {
|
|
1091
|
-
A.value.events.datapointClick && A.value.events.datapointClick({
|
|
1092
|
-
datapoint: e,
|
|
1093
|
-
seriesIndex: t
|
|
1094
|
-
}), nn("selectDatapoint", {
|
|
1095
|
-
datapoint: e,
|
|
1096
|
-
index: t
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
let Z = h(() => M.value.cutNullValues);
|
|
1100
|
-
function yn(e) {
|
|
1101
|
-
return ![
|
|
1102
|
-
null,
|
|
1103
|
-
void 0,
|
|
1104
|
-
"NaN",
|
|
1105
|
-
NaN,
|
|
1106
|
-
Infinity,
|
|
1107
|
-
-Infinity
|
|
1108
|
-
].includes(e);
|
|
1109
|
-
}
|
|
1110
|
-
function bn(e, t) {
|
|
1111
|
-
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;
|
|
1112
|
-
return yn(e[t]?.value) && i && Z.value;
|
|
1113
|
-
}
|
|
1114
|
-
function xn(e, t) {
|
|
1115
|
-
return J.value && e.id === J.value.id || pn.value === t || it.value.length === 1;
|
|
1116
|
-
}
|
|
1117
|
-
function Sn(e, t) {
|
|
1118
|
-
return X.value || !yn(e?.value) ? !1 : F.value.plot.show && xn(e, t) || bn(q.value, t);
|
|
1119
|
-
}
|
|
1120
|
-
function Cn(e, t) {
|
|
1121
|
-
return Math.max(1, xn(e, t) ? F.value.plot.radius : F.value.plot.radius * .7);
|
|
1122
|
-
}
|
|
1123
|
-
function wn(e, t) {
|
|
1124
|
-
return xn(e, t) ? F.value.plot.stroke : F.value.backgroundColor;
|
|
1125
|
-
}
|
|
1126
|
-
let Q = h(() => Z.value ? q.value : q.value.filter((e) => e.value !== null)), Tn = h(() => Array.isArray(M.value.dashIndices) ? M.value.dashIndices.map((e) => Math.trunc(Number(e))).filter(Number.isFinite) : []), En = h(() => new Set(Tn.value));
|
|
1127
|
-
function Dn(e, t) {
|
|
1128
|
-
let n = e?.sourceIndex, r = t?.sourceIndex;
|
|
1129
|
-
if (!Number.isFinite(n) || !Number.isFinite(r)) return !1;
|
|
1130
|
-
let i = Math.min(n, r), a = Math.max(n, r);
|
|
1131
|
-
for (let e of Tn.value) if (e >= i && e <= a) return !0;
|
|
1132
|
-
return !1;
|
|
1133
|
-
}
|
|
1134
|
-
function On(e) {
|
|
1135
|
-
let t = /* @__PURE__ */ new Set();
|
|
1136
|
-
for (let n = 1; n < e.length; n += 1) Dn(e[n - 1], e[n]) && t.add(n - 1);
|
|
1137
|
-
return t;
|
|
1138
|
-
}
|
|
1139
|
-
function kn(e) {
|
|
1140
|
-
let t = /* @__PURE__ */ new Set();
|
|
1141
|
-
if (Z.value || !M.value.nullDashes?.show) return t;
|
|
1142
|
-
for (let n = 1; n < e.length; n += 1) {
|
|
1143
|
-
let r = e[n - 1]?.sourceIndex, i = e[n]?.sourceIndex;
|
|
1144
|
-
Number.isFinite(r) && Number.isFinite(i) && Math.abs(i - r) > 1 && t.add(n - 1);
|
|
1145
|
-
}
|
|
1146
|
-
return t;
|
|
1147
|
-
}
|
|
1148
|
-
let An = h(() => Z.value ? /* @__PURE__ */ new Set() : On(Q.value)), jn = h(() => kn(Q.value)), Mn = h(() => /* @__PURE__ */ new Set([...An.value, ...jn.value])), Nn = h(() => Z.value ? q.value.reduce((e, t, n) => (En.value.has(t.sourceIndex) && e.push(n), e), []) : []), Pn = h(() => Z.value ? Nn.value.length > 0 : Mn.value.size > 0), Fn = h(() => q.value.filter((e) => e.value !== null)), In = h(() => Fn.value.length > 1), Ln = h(() => X.value || !In.value ? "" : Z.value ? i(q.value) : d(Q.value)), Rn = h(() => X.value || !In.value ? "" : Z.value ? ie(q.value) : re(Q.value)), zn = h(() => X.value || !Pn.value || !In.value ? [] : Z.value ? c(q.value, Nn.value) : ee(Q.value, Mn.value)), Bn = h(() => X.value || !Pn.value || !In.value ? [] : Z.value ? r(q.value, Nn.value) : o(Q.value, Mn.value)), Vn = h(() => X.value || !N.value.show || !In.value ? [] : M.value.smooth ? u(Q.value, K.value.bottom, Z.value).filter(Boolean) : (Z.value ? n(q.value, K.value.bottom) : ue(Q.value, K.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), Hn = h(() => X.value || !A.value.gradientPath.show || A.value.temperatureColors.show ? "" : `M ${(M.value.smooth ? Ln.value : Rn.value) || "0,0"}`), Un = h(() => {
|
|
1149
|
-
if (!A.value.temperatureColors.show) return null;
|
|
1150
|
-
let e = A.value.temperatureColors.colors;
|
|
1151
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) => te(e));
|
|
1152
|
-
}), $ = h(() => {
|
|
1153
|
-
if (!A.value.temperatureColors.show) return null;
|
|
1154
|
-
let e = A.value.temperatureColors.colors;
|
|
1155
|
-
return !Array.isArray(e) || !e.length ? null : e.map((e) => te(e));
|
|
1156
|
-
});
|
|
1157
|
-
function Wn(e) {
|
|
1158
|
-
if (!Number.isFinite(e?.y)) return 0;
|
|
1159
|
-
let t = K.value.height || 1, n = (e.y - K.value.top) / t;
|
|
1160
|
-
return Math.min(1, Math.max(0, n));
|
|
1161
|
-
}
|
|
1162
|
-
function Gn(e) {
|
|
1163
|
-
let t = Un.value;
|
|
1164
|
-
return !Array.isArray(t) || !t.length ? e.color : ne({
|
|
1165
|
-
colors: t,
|
|
1166
|
-
ratio: Wn(e)
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
T(() => [
|
|
1170
|
-
V.value,
|
|
1171
|
-
Zt.value,
|
|
1172
|
-
q.value.length,
|
|
1173
|
-
G.value.width,
|
|
1174
|
-
G.value.height,
|
|
1175
|
-
A.value?.style?.line?.smooth
|
|
1176
|
-
], async () => {
|
|
1177
|
-
await y(), mt();
|
|
1178
|
-
}, { immediate: !0 }), ze(async () => {
|
|
1179
|
-
await y(), mt();
|
|
1180
|
-
}), T(() => R.value, async (e) => {
|
|
1181
|
-
e || await $t();
|
|
1182
|
-
}), T(() => yt.value, async (e) => {
|
|
1183
|
-
e || R.value || await $t();
|
|
1184
|
-
}), T(() => E.selectedIndex, (e) => {
|
|
1185
|
-
if (e == null) {
|
|
1186
|
-
k.value = null, O.value = null, J.value = void 0;
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
if (e < 0 || e >= q.value.length) return;
|
|
1190
|
-
let t = q.value[e];
|
|
1191
|
-
t && (k.value = e, O.value = e, J.value = t);
|
|
1192
|
-
});
|
|
1193
|
-
let Kn = S(!1);
|
|
1194
|
-
function qn() {
|
|
1195
|
-
let e = pn.value;
|
|
1196
|
-
if (e !== null && e >= 0 && e < q.value.length) {
|
|
1197
|
-
let t = q.value[e];
|
|
1198
|
-
if (t) {
|
|
1199
|
-
O.value = e, J.value = t, k.value = e, Kn.value = !0;
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
O.value = null, !J.value && q.value.length && hn(q.value.at(-1), q.value.length - 1), Kn.value = !0;
|
|
1204
|
-
}
|
|
1205
|
-
function Jn() {
|
|
1206
|
-
mn.value = J.value, (E.selectedIndex === void 0 || E.selectedIndex === null) && (O.value = null, J.value = void 0, k.value = null, nn("hoverIndex", { index: void 0 })), Kn.value = !1;
|
|
1207
|
-
}
|
|
1208
|
-
function Yn(e) {
|
|
1209
|
-
if (!z.value || document.activeElement !== z.value) return;
|
|
1210
|
-
mn.value = J.value;
|
|
1211
|
-
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
|
|
1212
|
-
if (!t && !n) return;
|
|
1213
|
-
let r = q.value.length;
|
|
1214
|
-
if (!r) return;
|
|
1215
|
-
e.preventDefault(), e.stopPropagation();
|
|
1216
|
-
let i = O.value, a = i !== null && i >= 0 && i < r, o = J.value ? q.value.findIndex((e) => e.id === J.value.id) : -1;
|
|
1217
|
-
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;
|
|
1218
|
-
let s = q.value[i];
|
|
1219
|
-
s && (O.value = i, hn(s, i));
|
|
1220
|
-
}
|
|
1221
|
-
let Xn = h(() => ({
|
|
1222
|
-
headers: [A.value.translations.period, A.value.translations.value],
|
|
1223
|
-
rows: q.value.map((e) => [e.period, e.absoluteValue])
|
|
1224
|
-
}));
|
|
1225
|
-
return (n, r) => (x(), _("div", {
|
|
1226
|
-
ref_key: "sparklineChart",
|
|
1227
|
-
ref: et,
|
|
1228
|
-
class: "vue-data-ui-component vue-ui-sparkline",
|
|
1229
|
-
id: D.value,
|
|
1230
|
-
style: b(`width:100%;font-family:${F.value.fontFamily};`)
|
|
1231
|
-
}, [
|
|
1232
|
-
v("p", {
|
|
1233
|
-
id: `chart-instructions-${D.value}`,
|
|
1234
|
-
class: "sr-only"
|
|
1235
|
-
}, He(A.value.a11y.translations.keyboardNavigation), 9, Ct),
|
|
1236
|
-
Xn.value?.rows?.length ? (x(), Me(Oe, {
|
|
1237
|
-
key: 0,
|
|
1238
|
-
uid: D.value,
|
|
1239
|
-
head: Xn.value.headers,
|
|
1240
|
-
body: Xn.value.rows,
|
|
1241
|
-
notice: A.value.a11y.translations.tableAvailable,
|
|
1242
|
-
caption: A.value.a11y.translations.tableCaption
|
|
1243
|
-
}, null, 8, [
|
|
1244
|
-
"uid",
|
|
1245
|
-
"head",
|
|
1246
|
-
"body",
|
|
1247
|
-
"notice",
|
|
1248
|
-
"caption"
|
|
1249
|
-
])) : g("", !0),
|
|
1250
|
-
Be(n.$slots, "before", Le(Ie({
|
|
1251
|
-
selected: J.value,
|
|
1252
|
-
latest: Y.value.latest,
|
|
1253
|
-
sum: Y.value.sum,
|
|
1254
|
-
average: Y.value.average,
|
|
1255
|
-
median: Y.value.median,
|
|
1256
|
-
trend: Y.value.trend
|
|
1257
|
-
})), void 0, !0),
|
|
1258
|
-
F.value.title.show && e.showInfo ? (x(), _("div", {
|
|
1259
|
-
key: 1,
|
|
1260
|
-
ref_key: "chartTitle",
|
|
1261
|
-
ref: tt,
|
|
1262
|
-
class: "vue-ui-sparkline-title",
|
|
1263
|
-
style: b(`display:flex;align-items:center;width:100%;color:${F.value.title.color};background:${F.value.backgroundColor};justify-content:${F.value.title.textAlign === "left" ? "flex-start" : F.value.title.textAlign === "right" ? "flex-end" : "center"};height:${F.value.title.fontSize * 2}px;font-size:${F.value.title.fontSize}px;font-weight:${F.value.title.bold ? "bold" : "normal"};`)
|
|
1264
|
-
}, [v("span", { style: b(`padding:${F.value.title.textAlign === "left" ? "0 0 0 12px" : F.value.title.textAlign === "right" ? "0 12px 0 0" : "0"}`) }, He(J.value ? J.value.period : F.value.title.text), 5)], 4)) : g("", !0),
|
|
1265
|
-
v("div", wt, [(x(), _("svg", {
|
|
1266
|
-
ref_key: "svgRef",
|
|
1267
|
-
ref: z,
|
|
1268
|
-
xmlns: w(pe),
|
|
1269
|
-
viewBox: `0 0 ${G.value.width} ${G.value.height}`,
|
|
1270
|
-
style: b(`background:${F.value.backgroundColor};overflow:visible;direction:ltr`),
|
|
1271
|
-
tabindex: "0",
|
|
1272
|
-
"aria-describedby": `chart-instructions-${D.value}`,
|
|
1273
|
-
onMouseleave: r[0] ||= (e) => mn.value = void 0,
|
|
1274
|
-
onFocus: qn,
|
|
1275
|
-
onBlur: Jn,
|
|
1276
|
-
onKeydown: Yn
|
|
1277
|
-
}, [
|
|
1278
|
-
Pe(w(Ke)),
|
|
1279
|
-
n.$slots["chart-background"] ? (x(), _("foreignObject", {
|
|
1280
|
-
key: 0,
|
|
1281
|
-
x: 0,
|
|
1282
|
-
y: 0,
|
|
1283
|
-
width: G.value.width <= 0 ? 10 : G.value.width,
|
|
1284
|
-
height: G.value.height <= 0 ? 10 : G.value.height,
|
|
1285
|
-
style: { pointerEvents: "none" }
|
|
1286
|
-
}, [Be(n.$slots, "chart-background", {}, void 0, !0)], 8, Et)) : g("", !0),
|
|
1287
|
-
v("defs", null, [
|
|
1288
|
-
Pe(De, {
|
|
1289
|
-
t: "linear",
|
|
1290
|
-
x1: "0%",
|
|
1291
|
-
y1: "0%",
|
|
1292
|
-
x2: "100%",
|
|
1293
|
-
y2: "0%",
|
|
1294
|
-
id: `sparkline_gradient_${D.value}`,
|
|
1295
|
-
stops: [[
|
|
1296
|
-
"0%",
|
|
1297
|
-
w(fe)(w(a)(N.value.color, .05), N.value.opacity),
|
|
1298
|
-
1
|
|
1299
|
-
], [
|
|
1300
|
-
"100%",
|
|
1301
|
-
w(fe)(N.value.color, N.value.opacity),
|
|
1302
|
-
1
|
|
1303
|
-
]]
|
|
1304
|
-
}, null, 8, ["id", "stops"]),
|
|
1305
|
-
Pe(De, {
|
|
1306
|
-
t: "linear",
|
|
1307
|
-
x2: "0%",
|
|
1308
|
-
y2: "100%",
|
|
1309
|
-
id: `sparkline_bar_gradient_pos_${D.value}`,
|
|
1310
|
-
stops: [[
|
|
1311
|
-
"0%",
|
|
1312
|
-
rt.value.color,
|
|
1313
|
-
1
|
|
1314
|
-
], [
|
|
1315
|
-
"100%",
|
|
1316
|
-
w(a)(rt.value.color, .05),
|
|
1317
|
-
1
|
|
1318
|
-
]]
|
|
1319
|
-
}, null, 8, ["id", "stops"]),
|
|
1320
|
-
Pe(De, {
|
|
1321
|
-
t: "linear",
|
|
1322
|
-
x2: "0%",
|
|
1323
|
-
y2: "100%",
|
|
1324
|
-
id: `sparkline_bar_gradient_neg_${D.value}`,
|
|
1325
|
-
stops: [[
|
|
1326
|
-
"0%",
|
|
1327
|
-
w(a)(rt.value.color, .05),
|
|
1328
|
-
1
|
|
1329
|
-
], [
|
|
1330
|
-
"100%",
|
|
1331
|
-
rt.value.color,
|
|
1332
|
-
1
|
|
1333
|
-
]]
|
|
1334
|
-
}, null, 8, ["id", "stops"]),
|
|
1335
|
-
v("filter", {
|
|
1336
|
-
id: `sparkline_pulse_glow_${D.value}`,
|
|
1337
|
-
filterUnits: "userSpaceOnUse",
|
|
1338
|
-
x: "-50",
|
|
1339
|
-
y: "-50",
|
|
1340
|
-
width: "100",
|
|
1341
|
-
height: "100"
|
|
1342
|
-
}, [...r[1] ||= [v("feGaussianBlur", {
|
|
1343
|
-
in: "SourceGraphic",
|
|
1344
|
-
stdDeviation: "3",
|
|
1345
|
-
result: "blur"
|
|
1346
|
-
}, null, -1), v("feMerge", null, [v("feMergeNode", { in: "blur" }), v("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, Dt),
|
|
1347
|
-
A.value.temperatureColors.show && $.value ? (x(), _("linearGradient", {
|
|
1348
|
-
key: 0,
|
|
1349
|
-
id: `temperature_grad_sparkline_${D.value}`,
|
|
1350
|
-
gradientUnits: "userSpaceOnUse",
|
|
1351
|
-
x1: "0",
|
|
1352
|
-
x2: "0",
|
|
1353
|
-
y1: K.value.top,
|
|
1354
|
-
y2: K.value.bottom
|
|
1355
|
-
}, [(x(!0), _(m, null, C($.value, (e, t) => (x(), _("stop", {
|
|
1356
|
-
key: `temperature_grad_stop_${t}_${D.value}`,
|
|
1357
|
-
"stop-color": e,
|
|
1358
|
-
offset: $.value.length === 1 ? "0%" : w(s)(t, $.value.length)
|
|
1359
|
-
}, null, 8, kt))), 128))], 8, Ot)) : g("", !0)
|
|
1360
|
-
]),
|
|
1361
|
-
N.value.show && !X.value && Vn.value.length ? (x(), _("g", At, [(x(!0), _(m, null, C(Vn.value, (e, t) => (x(), _("path", {
|
|
1362
|
-
key: `sparkline_area_${t}_${D.value}`,
|
|
1363
|
-
class: "vue-ui-sparkline-area",
|
|
1364
|
-
"data-cy": M.value.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
|
|
1365
|
-
d: e,
|
|
1366
|
-
fill: N.value.useGradient ? `url(#sparkline_gradient_${D.value})` : w(fe)(N.value.color, N.value.opacity),
|
|
1367
|
-
"stroke-linecap": "round",
|
|
1368
|
-
"stroke-linejoin": "round",
|
|
1369
|
-
style: b({ transition: w(R) ? void 0 : "all 0.2s" })
|
|
1370
|
-
}, null, 12, jt))), 128))])) : g("", !0),
|
|
1371
|
-
M.value.smooth && !X.value ? (x(), _(m, { key: 2 }, [v("path", {
|
|
1372
|
-
id: Zt.value,
|
|
1373
|
-
d: `M ${Ln.value || "0,0"}`,
|
|
1374
|
-
fill: "none",
|
|
1375
|
-
stroke: "transparent",
|
|
1376
|
-
"stroke-width": M.value.strokeWidth,
|
|
1377
|
-
"stroke-linecap": "round",
|
|
1378
|
-
"stroke-linejoin": "round"
|
|
1379
|
-
}, null, 8, Mt), Pn.value ? (x(!0), _(m, { key: 0 }, C(zn.value, (e) => (x(), _("path", {
|
|
1380
|
-
key: e.path,
|
|
1381
|
-
class: "vue-ui-sparkline-path",
|
|
1382
|
-
d: `M ${e.path}`,
|
|
1383
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${D.value})` : M.value.color,
|
|
1384
|
-
fill: "none",
|
|
1385
|
-
"stroke-width": M.value.strokeWidth,
|
|
1386
|
-
"stroke-linecap": "round",
|
|
1387
|
-
"stroke-linejoin": "round",
|
|
1388
|
-
"stroke-dasharray": e.dashed ? M.value.dashArray : 0,
|
|
1389
|
-
style: b({ transition: w(R) ? void 0 : "all 0.2s" })
|
|
1390
|
-
}, null, 12, Nt))), 128)) : (x(), _("path", {
|
|
1391
|
-
key: 1,
|
|
1392
|
-
class: "vue-ui-sparkline-path",
|
|
1393
|
-
d: `M ${Ln.value || "0,0"}`,
|
|
1394
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${D.value})` : M.value.color,
|
|
1395
|
-
fill: "none",
|
|
1396
|
-
"stroke-width": M.value.strokeWidth,
|
|
1397
|
-
"stroke-linecap": "round",
|
|
1398
|
-
"stroke-linejoin": "round",
|
|
1399
|
-
style: b({ transition: w(R) ? void 0 : "all 0.2s" })
|
|
1400
|
-
}, null, 12, Pt))], 64)) : g("", !0),
|
|
1401
|
-
!M.value.smooth && !X.value ? (x(), _(m, { key: 3 }, [v("path", {
|
|
1402
|
-
id: Zt.value,
|
|
1403
|
-
d: `M ${Rn.value || "0,0"}`,
|
|
1404
|
-
fill: "none",
|
|
1405
|
-
stroke: "transparent",
|
|
1406
|
-
"stroke-width": M.value.strokeWidth,
|
|
1407
|
-
"stroke-linecap": "round",
|
|
1408
|
-
"stroke-linejoin": "round"
|
|
1409
|
-
}, null, 8, Ft), Pn.value ? (x(!0), _(m, { key: 0 }, C(Bn.value, (e) => (x(), _("path", {
|
|
1410
|
-
key: e.path,
|
|
1411
|
-
class: "vue-ui-sparkline-path",
|
|
1412
|
-
d: `M ${e.path}`,
|
|
1413
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${D.value})` : M.value.color,
|
|
1414
|
-
fill: "none",
|
|
1415
|
-
"stroke-width": M.value.strokeWidth,
|
|
1416
|
-
"stroke-linecap": "round",
|
|
1417
|
-
"stroke-linejoin": "round",
|
|
1418
|
-
"stroke-dasharray": e.dashed ? M.value.dashArray * 2 : 0,
|
|
1419
|
-
style: b({ transition: w(R) ? void 0 : "all 0.2s" })
|
|
1420
|
-
}, null, 12, It))), 128)) : (x(), _("path", {
|
|
1421
|
-
key: 1,
|
|
1422
|
-
class: "vue-ui-sparkline-path",
|
|
1423
|
-
d: `M ${Rn.value || "0,0"}`,
|
|
1424
|
-
stroke: $.value ? `url(#temperature_grad_sparkline_${D.value})` : M.value.color,
|
|
1425
|
-
fill: "none",
|
|
1426
|
-
"stroke-width": M.value.strokeWidth,
|
|
1427
|
-
"stroke-linecap": "round",
|
|
1428
|
-
"stroke-linejoin": "round",
|
|
1429
|
-
style: b({ transition: w(R) ? void 0 : "all 0.2s" })
|
|
1430
|
-
}, null, 12, Lt))], 64)) : g("", !0),
|
|
1431
|
-
Hn.value && !$.value ? (x(), Me(bt, {
|
|
1432
|
-
key: 4,
|
|
1433
|
-
svgPathData: Hn.value,
|
|
1434
|
-
enabled: A.value.gradientPath.show && !X.value && !$.value,
|
|
1435
|
-
strokeWidth: M.value.strokeWidth,
|
|
1436
|
-
highColor: A.value.gradientPath.colors.high,
|
|
1437
|
-
lowColor: A.value.gradientPath.colors.low,
|
|
1438
|
-
segments: A.value.gradientPath.segments
|
|
1439
|
-
}, null, 8, [
|
|
1440
|
-
"svgPathData",
|
|
1441
|
-
"enabled",
|
|
1442
|
-
"strokeWidth",
|
|
1443
|
-
"highColor",
|
|
1444
|
-
"lowColor",
|
|
1445
|
-
"segments"
|
|
1446
|
-
])) : g("", !0),
|
|
1447
|
-
Qt.value && V.value ? (x(), Me($e, {
|
|
1448
|
-
key: 5,
|
|
1449
|
-
uid: D.value,
|
|
1450
|
-
svgRef: w(z),
|
|
1451
|
-
pulsePathId: Zt.value,
|
|
1452
|
-
pulsePathLength: ct.value,
|
|
1453
|
-
pulseDur: st.value,
|
|
1454
|
-
pulseBegin: lt.value,
|
|
1455
|
-
pulseRepeatCount: dt.value,
|
|
1456
|
-
pulseFillMode: ft.value,
|
|
1457
|
-
pulseKeyPoints: ut.value,
|
|
1458
|
-
pulseMotion: ht.value,
|
|
1459
|
-
pulse: B.value,
|
|
1460
|
-
pulseTrail: gt.value,
|
|
1461
|
-
pulseTrailLength: pt.value,
|
|
1462
|
-
prefersReducedMotion: w(Ze),
|
|
1463
|
-
loading: w(R),
|
|
1464
|
-
isBar: X.value
|
|
1465
|
-
}, null, 8, [
|
|
1466
|
-
"uid",
|
|
1467
|
-
"svgRef",
|
|
1468
|
-
"pulsePathId",
|
|
1469
|
-
"pulsePathLength",
|
|
1470
|
-
"pulseDur",
|
|
1471
|
-
"pulseBegin",
|
|
1472
|
-
"pulseRepeatCount",
|
|
1473
|
-
"pulseFillMode",
|
|
1474
|
-
"pulseKeyPoints",
|
|
1475
|
-
"pulseMotion",
|
|
1476
|
-
"pulse",
|
|
1477
|
-
"pulseTrail",
|
|
1478
|
-
"pulseTrailLength",
|
|
1479
|
-
"prefersReducedMotion",
|
|
1480
|
-
"loading",
|
|
1481
|
-
"isBar"
|
|
1482
|
-
])) : g("", !0),
|
|
1483
|
-
(x(!0), _(m, null, C(q.value, (e, t) => (x(), _("g", null, [X.value ? (x(), _("rect", {
|
|
1484
|
-
key: 0,
|
|
1485
|
-
x: e.x - e.width / 2,
|
|
1486
|
-
y: isNaN(e.absoluteValue > 0 ? e.y : cn.value) ? 0 : e.absoluteValue > 0 ? e.y : cn.value,
|
|
1487
|
-
width: e.width,
|
|
1488
|
-
height: isNaN(Math.abs(e.y - cn.value)) ? 0 : Math.abs(e.y - cn.value),
|
|
1489
|
-
fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${D.value})` : `url(#sparkline_bar_gradient_neg_${D.value})`,
|
|
1490
|
-
rx: rt.value.borderRadius
|
|
1491
|
-
}, null, 8, Rt)) : g("", !0), F.value.verticalIndicator.show && (J.value && e.id === J.value.id || pn.value === t) ? (x(), _("line", {
|
|
1492
|
-
key: 1,
|
|
1493
|
-
x1: e.x,
|
|
1494
|
-
x2: e.x,
|
|
1495
|
-
y1: K.value.top - 6,
|
|
1496
|
-
y2: K.value.bottom,
|
|
1497
|
-
stroke: F.value.verticalIndicator.color || e.color,
|
|
1498
|
-
"stroke-width": F.value.verticalIndicator.strokeWidth,
|
|
1499
|
-
"stroke-linecap": "round",
|
|
1500
|
-
"stroke-dasharray": F.value.verticalIndicator.strokeDasharray || 0
|
|
1501
|
-
}, null, 8, zt)) : g("", !0)]))), 256)),
|
|
1502
|
-
rn.value < 0 ? (x(), _("line", {
|
|
1503
|
-
key: 6,
|
|
1504
|
-
x1: K.value.start,
|
|
1505
|
-
x2: K.value.start + K.value.width,
|
|
1506
|
-
y1: w(he)(cn.value, K.value.bottom),
|
|
1507
|
-
y2: w(he)(cn.value, K.value.bottom),
|
|
1508
|
-
stroke: F.value.zeroLine.color,
|
|
1509
|
-
"stroke-dasharray": F.value.zeroLine.strokeWidth * 2,
|
|
1510
|
-
"stroke-width": F.value.zeroLine.strokeWidth,
|
|
1511
|
-
"stroke-linecap": "round"
|
|
1512
|
-
}, null, 8, Bt)) : g("", !0),
|
|
1513
|
-
(x(!0), _(m, null, C(q.value, (e, t) => (x(), _("g", { key: `sparkline_plot_${e.id}` }, [Sn(e, t) ? (x(), _("circle", {
|
|
1514
|
-
key: 0,
|
|
1515
|
-
cx: e.x,
|
|
1516
|
-
cy: e.y,
|
|
1517
|
-
r: Cn(e, t),
|
|
1518
|
-
fill: Gn(e),
|
|
1519
|
-
stroke: wn(e, t),
|
|
1520
|
-
"stroke-width": F.value.plot.strokeWidth
|
|
1521
|
-
}, null, 8, Vt)) : g("", !0)]))), 128)),
|
|
1522
|
-
e.showInfo && P.value.show ? (x(), _("text", {
|
|
1523
|
-
key: 7,
|
|
1524
|
-
x: P.value.position === "left" ? 12 + P.value.offsetX : K.value.width + 12 + P.value.offsetX,
|
|
1525
|
-
y: G.value.height / 2 + P.value.fontSize / 2.5 + P.value.offsetY,
|
|
1526
|
-
"font-size": P.value.fontSize,
|
|
1527
|
-
"font-weight": P.value.bold ? "bold" : "normal",
|
|
1528
|
-
fill: P.value.color
|
|
1529
|
-
}, He(J.value ? w(le)(P.value.formatter, J.value.absoluteValue, w(t)({
|
|
1530
|
-
p: P.value.prefix,
|
|
1531
|
-
v: J.value.absoluteValue,
|
|
1532
|
-
s: P.value.suffix,
|
|
1533
|
-
r: P.value.roundingValue
|
|
1534
|
-
}), { datapoint: J.value }) : w(le)(P.value.formatter, _n.value, w(t)({
|
|
1535
|
-
p: P.value.prefix,
|
|
1536
|
-
v: _n.value,
|
|
1537
|
-
s: P.value.suffix,
|
|
1538
|
-
r: P.value.roundingValue
|
|
1539
|
-
}))), 9, Ht)) : g("", !0),
|
|
1540
|
-
(x(!0), _(m, null, C(q.value, (e, t) => (x(), _("rect", {
|
|
1541
|
-
x: e.x - (K.value.width / (un.value + 1) > G.value.padding ? G.value.padding : K.value.width / (un.value + 1)) / 2,
|
|
1542
|
-
y: K.value.top - 6,
|
|
1543
|
-
height: K.value.height + 6,
|
|
1544
|
-
width: K.value.width / (un.value + 1) > G.value.padding ? G.value.padding : K.value.width / (un.value + 1),
|
|
1545
|
-
fill: "transparent",
|
|
1546
|
-
onMouseenter: () => hn(e, t),
|
|
1547
|
-
onMouseleave: () => gn(e, t),
|
|
1548
|
-
onClick: () => vn(e, t)
|
|
1549
|
-
}, null, 40, Ut))), 256)),
|
|
1550
|
-
Be(n.$slots, "svg", { svg: {
|
|
1551
|
-
...G.value,
|
|
1552
|
-
drawingArea: K.value,
|
|
1553
|
-
timeLabels: dn.value,
|
|
1554
|
-
series: q.value,
|
|
1555
|
-
hoveredIndex: O.value
|
|
1556
|
-
} }, void 0, !0)
|
|
1557
|
-
], 44, Tt)), n.$slots.hint ? (x(), _("div", Wt, [Be(n.$slots, "hint", Le(Ie({
|
|
1558
|
-
hint: A.value.a11y.translations.keyboardNavigation,
|
|
1559
|
-
isVisible: Kn.value
|
|
1560
|
-
})), void 0, !0)])) : g("", !0)]),
|
|
1561
|
-
J.value && j.value.show ? (x(), Me(w(qe), {
|
|
1562
|
-
key: 2,
|
|
1563
|
-
x: J.value.x,
|
|
1564
|
-
y: J.value.y,
|
|
1565
|
-
prevX: mn.value.x,
|
|
1566
|
-
prevY: mn.value.y,
|
|
1567
|
-
offsetY: F.value.plot.radius * 3 + j.value.offsetY,
|
|
1568
|
-
svgRef: w(z),
|
|
1569
|
-
background: j.value.backgroundColor,
|
|
1570
|
-
color: j.value.color,
|
|
1571
|
-
fontSize: j.value.fontSize,
|
|
1572
|
-
borderWidth: j.value.borderWidth,
|
|
1573
|
-
borderColor: j.value.borderColor,
|
|
1574
|
-
borderRadius: j.value.borderRadius,
|
|
1575
|
-
backgroundOpacity: j.value.backgroundOpacity
|
|
1576
|
-
}, {
|
|
1577
|
-
default: Ge(() => [Be(n.$slots, "tooltip", Le(Ie({ ...J.value })), () => [Ne(He(J.value.period) + ": " + He(w(le)(P.value.formatter, J.value.absoluteValue, w(t)({
|
|
1578
|
-
p: P.value.prefix,
|
|
1579
|
-
v: J.value.absoluteValue,
|
|
1580
|
-
s: P.value.suffix,
|
|
1581
|
-
r: P.value.roundingValue
|
|
1582
|
-
}), { datapoint: J.value })), 1)], !0)]),
|
|
1583
|
-
_: 3
|
|
1584
|
-
}, 8, [
|
|
1585
|
-
"x",
|
|
1586
|
-
"y",
|
|
1587
|
-
"prevX",
|
|
1588
|
-
"prevY",
|
|
1589
|
-
"offsetY",
|
|
1590
|
-
"svgRef",
|
|
1591
|
-
"background",
|
|
1592
|
-
"color",
|
|
1593
|
-
"fontSize",
|
|
1594
|
-
"borderWidth",
|
|
1595
|
-
"borderColor",
|
|
1596
|
-
"borderRadius",
|
|
1597
|
-
"backgroundOpacity"
|
|
1598
|
-
])) : g("", !0),
|
|
1599
|
-
n.$slots.source ? (x(), _("div", {
|
|
1600
|
-
key: 3,
|
|
1601
|
-
ref_key: "source",
|
|
1602
|
-
ref: nt,
|
|
1603
|
-
dir: "auto"
|
|
1604
|
-
}, [Be(n.$slots, "source", {}, void 0, !0)], 512)) : g("", !0),
|
|
1605
|
-
Be(n.$slots, "skeleton", {}, () => [w(R) ? (x(), Me(xe, { key: 0 })) : g("", !0)], !0)
|
|
1606
|
-
], 12, St));
|
|
1607
|
-
}
|
|
1608
|
-
}, [["__scopeId", "data-v-ffc8bf34"]]);
|
|
1609
|
-
//#endregion
|
|
1610
|
-
export { xt as n, Gt as t };
|