@svgrid/grid-wc 2.2.1 → 2.5.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/dist/GridMenus-Boz00ms0.js +1000 -0
- package/dist/SvDateTimePicker-Ch1Vug8H.js +1885 -0
- package/dist/SvGridChart-BztTavvw.js +1199 -0
- package/dist/{SvGridChartPanel-Co6RTvAr.js → SvGridChartPanel-Ca5HWIZ3.js} +266 -258
- package/dist/SvGridChartView-AcWj_tcs.js +50 -0
- package/dist/SvGridDropdown-BXqvR1cs.js +256 -0
- package/dist/cell-formatting-C0OsDmi_.js +86 -0
- package/dist/{chart-CSZhFIR9.js → chart-uvs3sFJA.js} +21 -13
- package/dist/{client-DOa609yZ.js → client-DoXxrq8q.js} +870 -946
- package/dist/dismissable-xj_k_fnZ.js +186 -0
- package/dist/{export-format-DsOZUiL3.js → export-format-B6FUgOll.js} +7 -6
- package/dist/sv-grid-element.js +4099 -3329
- package/dist/{fill-patterns-BWj5Zuhp.js → svelte-virtualizer.svelte-ZL3wxPzD.js} +270 -306
- package/package.json +3 -3
- package/dist/GridMenus-CdOznO0T.js +0 -417
- package/dist/SvDateTimePicker-Duf-XIOa.js +0 -2011
- package/dist/SvGridChart-EY7OOxv6.js +0 -1192
- package/dist/SvGridChartView-BOOZMn2C.js +0 -50
- package/dist/SvGridDropdown-N9LVZsIs.js +0 -251
- package/dist/conditional-formatting-Dz-bxLJ2.js +0 -265
- package/dist/dismissable-DvhBKm3q.js +0 -41
- package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
|
@@ -1,1192 +0,0 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, F as i, G as a, I as o, J as s, K as c, L as l, O as u, P as d, Q as f, T as p, V as m, X as h, Y as g, _, a as v, d as y, et as b, j as x, k as S, n as C, nt as w, q as T, rt as E, tt as ee, v as D, w as O } from "./client-DOa609yZ.js";
|
|
2
|
-
import { i as te, n as ne, t as re } from "./chart-CSZhFIR9.js";
|
|
3
|
-
//#region ../grid/dist/SvGridChart.svelte
|
|
4
|
-
var ie = e("<button type=\"button\" class=\"sv-grid-chart-tool svelte-5rb6rd\" title=\"Reset zoom (or double-click the plot)\"><svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"></path><path d=\"M21 17a9 9 0 0 0-15-6.7L3 13\"></path></svg> Reset zoom</button>"), ae = e("<div class=\"sv-grid-chart-toolbar svelte-5rb6rd\"><!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-5rb6rd\" title=\"Download PNG\">PNG</button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-5rb6rd\" title=\"Download SVG\">SVG</button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-5rb6rd\" title=\"Copy chart as image\"> </button></div>"), oe = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\"><rect width=\"6\" height=\"6\"></rect><rect width=\"3\" height=\"6\" fill=\"rgba(255,255,255,0.35)\"></rect></pattern>"), se = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><path d=\"M0 0L6 6 M6 0L0 6\" stroke=\"rgba(255,255,255,0.45)\" stroke-width=\"1\"></path></pattern>"), ce = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><circle cx=\"3\" cy=\"3\" r=\"1.2\" fill=\"rgba(255,255,255,0.55)\"></circle></pattern>"), le = x("<pattern width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(-45)\"><rect width=\"8\" height=\"8\"></rect><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"8\" stroke=\"rgba(0,0,0,0.18)\" stroke-width=\"2\"></line></pattern>"), ue = x("<defs></defs>"), de = x("<line class=\"sv-grid-chart-gridline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>", 1), fe = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), pe = x("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), me = x("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), he = x("<!><!><!><!>", 1), ge = x("<line></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>", 1), _e = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>"), ve = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), ye = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), be = x("<line class=\"sv-grid-chart-gridline svelte-5rb6rd\" opacity=\"0.5\"></line>"), xe = x("<line class=\"sv-grid-chart-gridline svelte-5rb6rd\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-5rb6rd\" text-anchor=\"middle\"> </text>", 1), Se = x("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Ce = x("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), we = x("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Te = x("<!><!><!><!><!><!><!>", 1), Ee = x("<path class=\"sv-grid-chart-band\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), De = x("<path class=\"sv-grid-chart-area\" fill-opacity=\"0.15\" stroke=\"none\"></path>"), Oe = x("<text class=\"sv-grid-chart-datalabel svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), ke = x("<circle></circle><!>", 1), Ae = x("<g><!><!><path class=\"sv-grid-chart-linepath\" fill=\"none\" stroke-width=\"2\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), je = x("<text> </text>"), Me = x("<text text-anchor=\"middle\"> </text>"), Ne = x("<rect class=\"sv-grid-chart-bar svelte-5rb6rd\" rx=\"1\"></rect><!>", 1), Pe = x("<circle class=\"sv-grid-chart-scatter svelte-5rb6rd\" fill-opacity=\"0.7\"></circle>"), Fe = x("<line class=\"sv-grid-chart-refline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-reflabel svelte-5rb6rd\" text-anchor=\"end\"> </text>", 1), Ie = x("<line class=\"sv-grid-chart-refline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-reflabel svelte-5rb6rd\" text-anchor=\"start\"> </text>", 1), Le = x("<path class=\"sv-grid-chart-overlay svelte-5rb6rd\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>"), Re = x("<circle class=\"sv-grid-chart-annotation-marker svelte-5rb6rd\" r=\"4\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-5rb6rd\"> </text>", 1), ze = x("<line class=\"sv-grid-chart-crosshair svelte-5rb6rd\"></line>"), Be = x("<line class=\"sv-grid-chart-crosshair svelte-5rb6rd\"></line>"), Ve = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), He = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Ue = x("<text class=\"sv-grid-chart-heatlabel svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), We = x("<rect class=\"sv-grid-chart-heatcell svelte-5rb6rd\"></rect><!>", 1), Ge = x("<stop></stop>"), Ke = x("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-5rb6rd\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>", 1), qe = x("<!><!><!><!>", 1), Je = x("<path class=\"sv-grid-chart-funnel-seg svelte-5rb6rd\"></path><text class=\"sv-grid-chart-funnel-label svelte-5rb6rd\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-5rb6rd\" text-anchor=\"middle\"> </text>", 1), Ye = x("<circle class=\"sv-grid-chart-radar-ring svelte-5rb6rd\"></circle>"), Xe = x("<line class=\"sv-grid-chart-radar-spoke svelte-5rb6rd\"></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\"> </text>", 1), Ze = x("<circle class=\"sv-grid-chart-radar-dot svelte-5rb6rd\" r=\"3\"></circle>"), Qe = x("<path class=\"sv-grid-chart-radar-poly svelte-5rb6rd\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), $e = x("<!><!><!>", 1), et = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>"), tt = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), nt = x("<rect rx=\"2\"></rect>"), rt = x("<rect class=\"sv-grid-chart-calendar-legend svelte-5rb6rd\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>", 1), it = x("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\">More</text>", 1), at = x("<!><!><!><!>", 1), ot = x("<line></line>"), st = x("<path fill=\"none\" stroke-width=\"6\" stroke-linecap=\"round\" opacity=\"0.85\"></path>"), ct = x("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), lt = x("<!><path fill=\"none\" stroke=\"var(--sg-border, #e2e8f0)\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path class=\"sv-grid-chart-gauge-needle svelte-5rb6rd\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-5rb6rd\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-5rb6rd\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-5rb6rd\" text-anchor=\"middle\"> </text>", 1), ut = x("<text class=\"sv-grid-chart-treemap-label svelte-5rb6rd\"> </text>"), dt = x("<text class=\"sv-grid-chart-treemap-value svelte-5rb6rd\" opacity=\"0.85\"> </text>"), ft = x("<rect class=\"sv-grid-chart-treemap-cell svelte-5rb6rd\"></rect><!><!>", 1), pt = x("<path class=\"sv-grid-chart-sankey-link svelte-5rb6rd\" fill=\"none\" stroke-opacity=\"0.35\"></path>"), mt = x("<rect class=\"sv-grid-chart-sankey-node svelte-5rb6rd\"></rect><text class=\"sv-grid-chart-sankey-label svelte-5rb6rd\"> </text>", 1), ht = x("<!><!>", 1), gt = x("<text class=\"sv-grid-chart-datalabel on-bar svelte-5rb6rd\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), _t = x("<path class=\"sv-grid-chart-slice svelte-5rb6rd\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), vt = x("<text class=\"sv-grid-chart-donut-total svelte-5rb6rd\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-5rb6rd\" text-anchor=\"middle\">Total</text>", 1), yt = x("<rect class=\"sv-grid-chart-cat-hit svelte-5rb6rd\"></rect>"), bt = x("<rect class=\"sv-grid-chart-zoom-rect svelte-5rb6rd\"></rect>"), xt = x("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), St = x("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Ct = x("<rect opacity=\"0.55\"></rect>"), wt = x("<svg class=\"sv-grid-chart-brush svelte-5rb6rd\" width=\"100%\" role=\"img\" aria-label=\"Range brush\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-5rb6rd\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-5rb6rd\"></rect><rect class=\"sv-grid-chart-brush-window svelte-5rb6rd\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-5rb6rd\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-5rb6rd\" width=\"8\"></rect></svg>"), Tt = e("<div class=\"sv-grid-chart-empty svelte-5rb6rd\">No data</div>"), Et = e("<span class=\"sv-grid-chart-tooltip-dot svelte-5rb6rd\"></span>"), Dt = e("<span class=\"sv-grid-chart-tooltip-row-label svelte-5rb6rd\"> </span>"), Ot = e("<span class=\"sv-grid-chart-tooltip-row svelte-5rb6rd\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-5rb6rd\"> </span></span>"), kt = e("<div><span class=\"sv-grid-chart-tooltip-title svelte-5rb6rd\"> </span> <!></div>"), At = e("<button type=\"button\"><span class=\"sv-grid-chart-swatch svelte-5rb6rd\"></span> </button>"), jt = e("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-5rb6rd\"> </button>"), Mt = e("<div class=\"sv-grid-chart-legend svelte-5rb6rd\"><!> <!></div>"), Nt = e("<th> </th>"), Pt = e("<td> </td>"), Ft = e("<tr></tr>"), It = e("<div class=\"sv-grid-chart svelte-5rb6rd\"><!> <svg width=\"100%\" role=\"img\"><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <table class=\"sv-grid-chart-sr-only svelte-5rb6rd\"><caption> </caption><thead><tr></tr></thead><tbody></tbody></table></div>");
|
|
5
|
-
function k(e, d) {
|
|
6
|
-
ee(d, !0);
|
|
7
|
-
let x = C(d, "legend", 3, !0), k = C(d, "interactive", 3, !0), Lt = C(d, "dataLabels", 3, !1), Rt = C(d, "zoomable", 3, !1), zt = C(d, "brush", 3, !1), Bt = C(d, "brushHeight", 3, 88), Vt = f(() => d.toolbar ?? (Rt() || !!d.onDrill)), A = (e) => d.formatValue ? d.formatValue(e) : d.spec.valueFormat ? te(e, d.spec.valueFormat) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), Ht = h(s(/* @__PURE__ */ new Set())), j = h(null), Ut = h(null), Wt = f(() => d.spec.palette ?? re), M = `svgc-${Math.random().toString(36).slice(2, 8)}`, N = f(() => d.spec.series.map((e, t) => ({
|
|
8
|
-
...e,
|
|
9
|
-
color: e.color ?? l(Wt)[t % l(Wt).length]
|
|
10
|
-
}))), Gt = f(() => d.spec.series.map((e, t) => e.pattern ? e.pattern : d.spec.patternFallback ? [
|
|
11
|
-
"stripe",
|
|
12
|
-
"crosshatch",
|
|
13
|
-
"dots",
|
|
14
|
-
"diagonal"
|
|
15
|
-
][t % 4] : "solid")), Kt = f(() => {
|
|
16
|
-
let e = {};
|
|
17
|
-
return l(N).forEach((t, n) => {
|
|
18
|
-
let r = l(Gt)[n];
|
|
19
|
-
e[t.label] = r === "solid" || !r ? t.color : `url(#${M}-pat-${n})`;
|
|
20
|
-
}), e;
|
|
21
|
-
}), qt = f(() => l(N).map((e, t) => ({
|
|
22
|
-
id: `${M}-pat-${t}`,
|
|
23
|
-
color: e.color,
|
|
24
|
-
kind: l(Gt)[t] ?? "solid"
|
|
25
|
-
})).filter((e) => e.kind !== "solid")), Jt = f(() => {
|
|
26
|
-
if (l(j) == null) return l(Ht);
|
|
27
|
-
let e = d.spec.type === "pie" ? d.spec.categories : d.spec.series.map((e) => e.label);
|
|
28
|
-
return new Set(e.filter((e) => e !== l(j)));
|
|
29
|
-
}), P = h(null), Yt = f(() => l(P) !== null);
|
|
30
|
-
function Xt() {
|
|
31
|
-
g(P, null);
|
|
32
|
-
}
|
|
33
|
-
let F = h(null), I = h(null), L = h(null), R = f(() => {
|
|
34
|
-
if (!l(I) || !l(L)) return null;
|
|
35
|
-
let e = Math.min(l(I).x, l(L).x), t = Math.min(l(I).y, l(L).y), n = Math.abs(l(L).x - l(I).x), r = Math.abs(l(L).y - l(I).y);
|
|
36
|
-
return n > 4 && r > 4 ? {
|
|
37
|
-
x: e,
|
|
38
|
-
y: t,
|
|
39
|
-
w: n,
|
|
40
|
-
h: r
|
|
41
|
-
} : null;
|
|
42
|
-
});
|
|
43
|
-
function Zt(e) {
|
|
44
|
-
if (!l(F)) return null;
|
|
45
|
-
let t = l(F).getBoundingClientRect();
|
|
46
|
-
return {
|
|
47
|
-
x: (e.clientX - t.left) / t.width * l(U).width,
|
|
48
|
-
y: (e.clientY - t.top) / t.height * l(U).height
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function Qt(e) {
|
|
52
|
-
let t = l(W) ? e.y - l(U).plot.y : e.x - l(U).plot.x, n = Math.floor(t / l(G));
|
|
53
|
-
return Math.max(0, Math.min(l(H).categories.length - 1, n));
|
|
54
|
-
}
|
|
55
|
-
function $t(e) {
|
|
56
|
-
if (!Rt() || !l(dn)) return;
|
|
57
|
-
let t = Zt(e);
|
|
58
|
-
t && (t.x < l(U).plot.x || t.x > l(U).plot.x + l(U).plot.w || t.y < l(U).plot.y || t.y > l(U).plot.y + l(U).plot.h || (g(I, t, !0), g(L, t, !0), e.target.setPointerCapture?.(e.pointerId)));
|
|
59
|
-
}
|
|
60
|
-
function en(e) {
|
|
61
|
-
l(I) && g(L, Zt(e), !0);
|
|
62
|
-
}
|
|
63
|
-
function tn() {
|
|
64
|
-
if (!l(I) || !l(L)) {
|
|
65
|
-
g(I, null), g(L, null);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
let e = l(R);
|
|
69
|
-
if (e) {
|
|
70
|
-
let t = Qt({
|
|
71
|
-
x: e.x,
|
|
72
|
-
y: e.y
|
|
73
|
-
}), n = Qt({
|
|
74
|
-
x: e.x + e.w,
|
|
75
|
-
y: e.y + e.h
|
|
76
|
-
}), r = l(P) ? l(P).i0 : 0, i = r + Math.min(t, n), a = r + Math.max(t, n);
|
|
77
|
-
a > i && g(P, {
|
|
78
|
-
i0: i,
|
|
79
|
-
i1: a
|
|
80
|
-
}, !0);
|
|
81
|
-
}
|
|
82
|
-
g(I, null), g(L, null);
|
|
83
|
-
}
|
|
84
|
-
function nn() {
|
|
85
|
-
Rt() && l(Yt) && Xt();
|
|
86
|
-
}
|
|
87
|
-
let rn = f(() => zt() && d.spec.type !== "pie" && d.spec.type !== "heatmap"), an = f(() => ({
|
|
88
|
-
...d.spec,
|
|
89
|
-
height: Bt(),
|
|
90
|
-
yAxisTitle: void 0,
|
|
91
|
-
y2AxisTitle: void 0,
|
|
92
|
-
xAxisTitle: void 0,
|
|
93
|
-
referenceLines: void 0,
|
|
94
|
-
annotations: void 0,
|
|
95
|
-
series: l(N).filter((e) => !l(Jt).has(e.label))
|
|
96
|
-
})), z = f(() => l(rn) ? ne(l(an)) : null), on = f(() => {
|
|
97
|
-
let e = d.spec.categories.length;
|
|
98
|
-
return !l(P) || e === 0 ? {
|
|
99
|
-
t0: 0,
|
|
100
|
-
t1: 1
|
|
101
|
-
} : {
|
|
102
|
-
t0: l(P).i0 / e,
|
|
103
|
-
t1: (l(P).i1 + 1) / e
|
|
104
|
-
};
|
|
105
|
-
}), B = h(null);
|
|
106
|
-
function sn(e, t) {
|
|
107
|
-
let n = t.getBoundingClientRect();
|
|
108
|
-
return l(z) ? (e.clientX - n.left) / n.width * l(z).width : 0;
|
|
109
|
-
}
|
|
110
|
-
function cn(e, t) {
|
|
111
|
-
if (!l(z)) return;
|
|
112
|
-
let n = e.currentTarget;
|
|
113
|
-
g(B, {
|
|
114
|
-
mode: t,
|
|
115
|
-
startX: sn(e, n.ownerSVGElement ?? n),
|
|
116
|
-
startT0: l(on).t0,
|
|
117
|
-
startT1: l(on).t1
|
|
118
|
-
}, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
|
|
119
|
-
}
|
|
120
|
-
function ln(e) {
|
|
121
|
-
if (!l(B) || !l(z)) return;
|
|
122
|
-
let t = (sn(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - l(B).startX) / l(z).plot.w, n = d.spec.categories.length;
|
|
123
|
-
if (n === 0) return;
|
|
124
|
-
let r = l(B).startT0, i = l(B).startT1;
|
|
125
|
-
if (l(B).mode === "move") {
|
|
126
|
-
let e = i - r;
|
|
127
|
-
r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
|
|
128
|
-
} else l(B).mode === "left" ? r = Math.max(0, Math.min(i - 1 / n, r + t)) : i = Math.min(1, Math.max(r + 1 / n, i + t));
|
|
129
|
-
let a = Math.max(0, Math.floor(r * n)), o = Math.min(n - 1, Math.ceil(i * n) - 1);
|
|
130
|
-
a === 0 && o === n - 1 ? g(P, null) : g(P, {
|
|
131
|
-
i0: a,
|
|
132
|
-
i1: Math.max(a, o)
|
|
133
|
-
}, !0);
|
|
134
|
-
}
|
|
135
|
-
function V(e) {
|
|
136
|
-
g(B, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
137
|
-
}
|
|
138
|
-
let H = f(() => {
|
|
139
|
-
if (d.spec.type === "pie") {
|
|
140
|
-
let e = l(N)[0];
|
|
141
|
-
if (!e) return d.spec;
|
|
142
|
-
let t = e.values.map((e, t) => l(Jt).has(d.spec.categories[t] ?? String(t)) ? 0 : e);
|
|
143
|
-
return {
|
|
144
|
-
...d.spec,
|
|
145
|
-
series: [{
|
|
146
|
-
...e,
|
|
147
|
-
values: t
|
|
148
|
-
}]
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
let e = l(N).filter((e) => !l(Jt).has(e.label));
|
|
152
|
-
if (!l(P)) return {
|
|
153
|
-
...d.spec,
|
|
154
|
-
series: e
|
|
155
|
-
};
|
|
156
|
-
let t = Math.max(0, l(P).i0), n = Math.min(d.spec.categories.length - 1, l(P).i1), r = (e) => e.slice(t, n + 1);
|
|
157
|
-
return {
|
|
158
|
-
...d.spec,
|
|
159
|
-
categories: r(d.spec.categories),
|
|
160
|
-
series: e.map((e) => ({
|
|
161
|
-
...e,
|
|
162
|
-
values: r(e.values),
|
|
163
|
-
rowIds: e.rowIds ? r(e.rowIds) : void 0
|
|
164
|
-
}))
|
|
165
|
-
};
|
|
166
|
-
}), un = h(!1), U = f(() => ne(d.width || d.height ? {
|
|
167
|
-
...l(H),
|
|
168
|
-
width: d.width,
|
|
169
|
-
height: d.height
|
|
170
|
-
} : l(H), l(un) ? "dark" : "light")), dn = f(() => d.spec.type !== "pie" && d.spec.type !== "heatmap" && d.spec.type !== "funnel" && d.spec.type !== "radar" && d.spec.type !== "calendar" && d.spec.type !== "gauge" && d.spec.type !== "treemap" && d.spec.type !== "sankey"), fn = f(() => d.spec.type === "scatter"), pn = f(() => d.spec.type === "heatmap"), mn = f(() => d.spec.type === "funnel"), hn = f(() => d.spec.type === "radar"), gn = f(() => d.spec.type === "calendar"), _n = f(() => d.spec.type === "gauge"), vn = f(() => d.spec.type === "treemap"), yn = f(() => d.spec.type === "sankey"), W = f(() => l(U).orientation === "horizontal"), G = f(() => (l(W) ? l(U).plot.h : l(U).plot.w) / Math.max(1, l(H).categories.length)), bn = (e) => l(Ut) && l(Ut) !== e ? .18 : 1, xn = f(() => d.spec.type === "pie" ? d.spec.categories.map((e, t) => ({
|
|
171
|
-
label: e,
|
|
172
|
-
color: l(Wt)[t % l(Wt).length],
|
|
173
|
-
off: l(Ht).has(e)
|
|
174
|
-
})) : l(N).map((e) => ({
|
|
175
|
-
label: e.label,
|
|
176
|
-
color: e.color,
|
|
177
|
-
off: l(Ht).has(e.label)
|
|
178
|
-
}))), Sn = h(!1), Cn = f(() => l(xn).length > 10), wn = f(() => l(Cn) && !l(Sn) ? l(xn).slice(0, 10) : l(xn)), Tn = f(() => d.spec.type === "pie" ? l(U).slices.every((e) => e.value <= 0) : d.spec.type === "scatter" ? l(U).scatterPoints.length === 0 : d.spec.type === "heatmap" ? l(U).heatmapCells.length === 0 : d.spec.type === "funnel" ? l(U).funnelSegments.length === 0 : d.spec.type === "radar" ? l(U).radarSeries.length === 0 : d.spec.type === "calendar" ? l(U).calendarCells.length === 0 : d.spec.type === "gauge" ? !l(U).gauge : d.spec.type === "treemap" ? l(U).treemapCells.length === 0 : d.spec.type === "sankey" ? l(U).sankeyNodes.length === 0 : l(U).bars.length === 0 && l(U).lines.every((e) => e.points.every((e) => !e.defined)));
|
|
179
|
-
function En(e) {
|
|
180
|
-
if (!k()) return;
|
|
181
|
-
if (l(j) != null) {
|
|
182
|
-
g(j, null);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
let t = new Set(l(Ht));
|
|
186
|
-
t.has(e) ? t.delete(e) : t.add(e), g(Ht, t, !0);
|
|
187
|
-
}
|
|
188
|
-
function Dn(e) {
|
|
189
|
-
k() && g(j, l(j) === e ? null : e, !0);
|
|
190
|
-
}
|
|
191
|
-
let On = f(() => {
|
|
192
|
-
if (d.spec.type === "pie") {
|
|
193
|
-
let e = l(N)[0];
|
|
194
|
-
return {
|
|
195
|
-
cols: ["Category", "Value"],
|
|
196
|
-
rows: d.spec.categories.map((t, n) => [t, A(e?.values[n] ?? 0)])
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
if (l(fn)) {
|
|
200
|
-
let e = [];
|
|
201
|
-
for (let t of l(N)) for (let n of t.points ?? []) e.push([
|
|
202
|
-
t.label,
|
|
203
|
-
A(n.x),
|
|
204
|
-
A(n.y),
|
|
205
|
-
n.r == null ? "" : A(n.r)
|
|
206
|
-
]);
|
|
207
|
-
return {
|
|
208
|
-
cols: [
|
|
209
|
-
"Series",
|
|
210
|
-
"X",
|
|
211
|
-
"Y",
|
|
212
|
-
"Size"
|
|
213
|
-
],
|
|
214
|
-
rows: e
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
return {
|
|
218
|
-
cols: ["Category", ...l(N).map((e) => e.label)],
|
|
219
|
-
rows: d.spec.categories.map((e, t) => [e, ...l(N).map((e) => A(e.values[t] ?? 0))])
|
|
220
|
-
};
|
|
221
|
-
});
|
|
222
|
-
function K(e, t = 12) {
|
|
223
|
-
return e.length > t ? e.slice(0, t - 1) + "…" : e;
|
|
224
|
-
}
|
|
225
|
-
let kn = (e, t) => d.formatValue ? d.formatValue(e) : t, q = h(null);
|
|
226
|
-
function An(e) {
|
|
227
|
-
if (!e) return !1;
|
|
228
|
-
let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
|
|
229
|
-
if (i.length === 6) t = parseInt(i.slice(0, 2), 16), n = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
|
|
230
|
-
else {
|
|
231
|
-
let i = /rgba?\(([^)]+)\)/.exec(e);
|
|
232
|
-
if (!i) return !1;
|
|
233
|
-
let a = i[1].split(",").map((e) => parseFloat(e));
|
|
234
|
-
t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
|
|
235
|
-
}
|
|
236
|
-
return .299 * t + .587 * n + .114 * r < 128;
|
|
237
|
-
}
|
|
238
|
-
m(() => {
|
|
239
|
-
if (!l(q) || typeof window > "u") return;
|
|
240
|
-
let e = l(q), t = () => {
|
|
241
|
-
g(un, An(getComputedStyle(e).getPropertyValue("--sg-bg")), !0);
|
|
242
|
-
};
|
|
243
|
-
t();
|
|
244
|
-
let n = new MutationObserver(t);
|
|
245
|
-
return n.observe(document.documentElement, {
|
|
246
|
-
attributes: !0,
|
|
247
|
-
attributeFilter: [
|
|
248
|
-
"data-theme",
|
|
249
|
-
"class",
|
|
250
|
-
"style"
|
|
251
|
-
]
|
|
252
|
-
}), () => n.disconnect();
|
|
253
|
-
});
|
|
254
|
-
let J = h(null), Y = h(null);
|
|
255
|
-
function X(e, t, n, r) {
|
|
256
|
-
if (!k() || !l(q) || r.length === 0) return;
|
|
257
|
-
let i = l(q).getBoundingClientRect(), a = Math.max(70, Math.min(i.width - 70, e - i.left)), o = t - i.top;
|
|
258
|
-
g(J, {
|
|
259
|
-
left: a,
|
|
260
|
-
top: o,
|
|
261
|
-
below: o < 44,
|
|
262
|
-
title: n,
|
|
263
|
-
rows: r
|
|
264
|
-
}, !0);
|
|
265
|
-
}
|
|
266
|
-
function jn(e) {
|
|
267
|
-
return l(H).series.map((t) => ({
|
|
268
|
-
label: t.label,
|
|
269
|
-
color: t.color,
|
|
270
|
-
value: t.values[e]
|
|
271
|
-
})).filter((e) => Number.isFinite(e.value)).map((e) => ({
|
|
272
|
-
label: e.label,
|
|
273
|
-
color: e.color,
|
|
274
|
-
value: A(e.value)
|
|
275
|
-
}));
|
|
276
|
-
}
|
|
277
|
-
function Mn(e, t, n) {
|
|
278
|
-
g(Y, n, !0), X(e, t, l(H).categories[n] ?? "", jn(n));
|
|
279
|
-
}
|
|
280
|
-
function Nn(e, t) {
|
|
281
|
-
let n = e.getBoundingClientRect();
|
|
282
|
-
Mn(n.left + n.width / 2, n.top + 12, t);
|
|
283
|
-
}
|
|
284
|
-
function Z() {
|
|
285
|
-
g(Y, null), g(J, null);
|
|
286
|
-
}
|
|
287
|
-
function Pn(e, t, n, r, i) {
|
|
288
|
-
X(e, t, n, [{ value: `${A(r)} · ${i.toFixed(1)}%` }]);
|
|
289
|
-
}
|
|
290
|
-
function Fn(e, t, n) {
|
|
291
|
-
let r = [{
|
|
292
|
-
label: "x",
|
|
293
|
-
value: A(n.x)
|
|
294
|
-
}, {
|
|
295
|
-
label: "y",
|
|
296
|
-
value: A(n.y)
|
|
297
|
-
}];
|
|
298
|
-
X(e, t, n.label || n.series, r);
|
|
299
|
-
}
|
|
300
|
-
function In(e, t, n) {
|
|
301
|
-
X(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
|
|
302
|
-
color: n.color,
|
|
303
|
-
value: A(n.value)
|
|
304
|
-
}]);
|
|
305
|
-
}
|
|
306
|
-
function Ln(e, t, n) {
|
|
307
|
-
let r = [{ value: A(n.value) }, {
|
|
308
|
-
label: "conversion",
|
|
309
|
-
value: `${(n.conversion * 100).toFixed(1)}%`
|
|
310
|
-
}];
|
|
311
|
-
n.dropoff > 0 && r.push({
|
|
312
|
-
label: "drop-off",
|
|
313
|
-
value: `${(n.dropoff * 100).toFixed(1)}%`
|
|
314
|
-
}), X(e, t, n.label, r);
|
|
315
|
-
}
|
|
316
|
-
function Rn(e, t, n, r, i, a) {
|
|
317
|
-
X(e, t, `${n} · ${r}`, [{
|
|
318
|
-
color: a,
|
|
319
|
-
value: A(i)
|
|
320
|
-
}]);
|
|
321
|
-
}
|
|
322
|
-
function Q(e, t, n, r) {
|
|
323
|
-
let i;
|
|
324
|
-
if (r !== void 0) {
|
|
325
|
-
let e = [];
|
|
326
|
-
for (let n of l(H).series) {
|
|
327
|
-
if (!n.rowIds || t && n.label !== t) continue;
|
|
328
|
-
let i = n.rowIds[r];
|
|
329
|
-
i?.length && e.push(i);
|
|
330
|
-
}
|
|
331
|
-
e.length && (i = e.flat());
|
|
332
|
-
}
|
|
333
|
-
let a = {
|
|
334
|
-
category: e,
|
|
335
|
-
series: t,
|
|
336
|
-
value: n,
|
|
337
|
-
rowIds: i
|
|
338
|
-
};
|
|
339
|
-
d.onSelect?.(a), i && i.length && d.onDrill?.(a);
|
|
340
|
-
}
|
|
341
|
-
function zn(e, t) {
|
|
342
|
-
let n = e.ownerSVGElement ?? e.closest("svg");
|
|
343
|
-
if (!n) return;
|
|
344
|
-
let r = n.querySelector(`[data-cat-index="${t}"]`);
|
|
345
|
-
r && (r.focus?.(), Nn(r, t));
|
|
346
|
-
}
|
|
347
|
-
function Bn(e, t) {
|
|
348
|
-
let n = l(H).categories.length - 1, r = e.currentTarget;
|
|
349
|
-
switch (e.key) {
|
|
350
|
-
case "ArrowRight":
|
|
351
|
-
case "ArrowDown":
|
|
352
|
-
e.preventDefault(), zn(r, Math.min(n, t + 1));
|
|
353
|
-
return;
|
|
354
|
-
case "ArrowLeft":
|
|
355
|
-
case "ArrowUp":
|
|
356
|
-
e.preventDefault(), zn(r, Math.max(0, t - 1));
|
|
357
|
-
return;
|
|
358
|
-
case "Home":
|
|
359
|
-
e.preventDefault(), zn(r, 0);
|
|
360
|
-
return;
|
|
361
|
-
case "End":
|
|
362
|
-
e.preventDefault(), zn(r, n);
|
|
363
|
-
return;
|
|
364
|
-
case "PageDown":
|
|
365
|
-
e.preventDefault(), zn(r, Math.min(n, t + Math.max(1, Math.floor(n / 10))));
|
|
366
|
-
return;
|
|
367
|
-
case "PageUp":
|
|
368
|
-
e.preventDefault(), zn(r, Math.max(0, t - Math.max(1, Math.floor(n / 10))));
|
|
369
|
-
return;
|
|
370
|
-
case "Enter":
|
|
371
|
-
case " ":
|
|
372
|
-
if (!d.onSelect) return;
|
|
373
|
-
e.preventDefault(), Q(l(H).categories[t] ?? "", "", 0, t);
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function Vn(e, t, n) {
|
|
378
|
-
d.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(t, t, n));
|
|
379
|
-
}
|
|
380
|
-
let Hn = h("idle");
|
|
381
|
-
function Un() {
|
|
382
|
-
if (!l(F)) return null;
|
|
383
|
-
let e = l(F).cloneNode(!0);
|
|
384
|
-
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
|
|
385
|
-
let t = l(F).getBoundingClientRect();
|
|
386
|
-
t.width && e.setAttribute("width", String(Math.round(t.width))), t.height && e.setAttribute("height", String(Math.round(t.height)));
|
|
387
|
-
let n = document.createElement("style"), r = Array.from(document.styleSheets), i = [];
|
|
388
|
-
for (let e of r) try {
|
|
389
|
-
for (let t of Array.from(e.cssRules ?? [])) {
|
|
390
|
-
let e = t.cssText;
|
|
391
|
-
e.includes(".sv-grid-chart") && i.push(e);
|
|
392
|
-
}
|
|
393
|
-
} catch {}
|
|
394
|
-
return n.textContent = i.join("\n"), e.insertBefore(n, e.firstChild), new XMLSerializer().serializeToString(e);
|
|
395
|
-
}
|
|
396
|
-
function Wn(e, t) {
|
|
397
|
-
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
398
|
-
r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
|
|
399
|
-
}
|
|
400
|
-
async function Gn(e) {
|
|
401
|
-
return new Promise((t) => {
|
|
402
|
-
let n = l(F)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? l(U).width)), i = Math.max(1, Math.round(n?.height ?? l(U).height)), a = window.devicePixelRatio || 1, o = document.createElement("canvas");
|
|
403
|
-
o.width = r * a, o.height = i * a;
|
|
404
|
-
let s = o.getContext("2d");
|
|
405
|
-
if (!s) {
|
|
406
|
-
t(null);
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
let c = new Image();
|
|
410
|
-
c.onload = () => {
|
|
411
|
-
s.scale(a, a), s.drawImage(c, 0, 0, r, i), o.toBlob((e) => t(e), "image/png");
|
|
412
|
-
}, c.onerror = () => t(null), c.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
async function Kn(e) {
|
|
416
|
-
let t = Un();
|
|
417
|
-
if (!t) return;
|
|
418
|
-
let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
419
|
-
if (e === "svg") {
|
|
420
|
-
Wn(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
|
|
421
|
-
return;
|
|
422
|
-
}
|
|
423
|
-
let r = await Gn(t);
|
|
424
|
-
r && Wn(r, `chart-${n}.png`);
|
|
425
|
-
}
|
|
426
|
-
async function qn() {
|
|
427
|
-
let e = Un();
|
|
428
|
-
if (!e) {
|
|
429
|
-
g(Hn, "err");
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
try {
|
|
433
|
-
let t = await Gn(e);
|
|
434
|
-
if (!t) throw Error("rasterize failed");
|
|
435
|
-
let n = window.ClipboardItem;
|
|
436
|
-
n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), g(Hn, "ok");
|
|
437
|
-
} catch {
|
|
438
|
-
g(Hn, "err");
|
|
439
|
-
}
|
|
440
|
-
setTimeout(() => g(Hn, "idle"), 1500);
|
|
441
|
-
}
|
|
442
|
-
var Jn = It(), Yn = a(Jn), Xn = (e) => {
|
|
443
|
-
var n = ae(), o = a(n), s = (e) => {
|
|
444
|
-
var t = ie();
|
|
445
|
-
i("click", t, Xt), u(e, t);
|
|
446
|
-
};
|
|
447
|
-
p(o, (e) => {
|
|
448
|
-
Rt() && l(Yt) && e(s);
|
|
449
|
-
});
|
|
450
|
-
var c = T(o, 2), d = T(c, 2), f = T(d, 2), m = a(f, !0);
|
|
451
|
-
E(f), E(n), t(() => r(m, l(Hn) === "ok" ? "✓ Copied" : "Copy")), i("click", c, () => Kn("png")), i("click", d, () => Kn("svg")), i("click", f, qn), u(e, n);
|
|
452
|
-
};
|
|
453
|
-
p(Yn, (e) => {
|
|
454
|
-
l(Vt) && e(Xn);
|
|
455
|
-
});
|
|
456
|
-
var $ = T(Yn, 2);
|
|
457
|
-
let Zn;
|
|
458
|
-
var Qn = a($), $n = (e) => {
|
|
459
|
-
var r = ue();
|
|
460
|
-
n(r, 21, () => l(qt), (e) => e.id, (e, n) => {
|
|
461
|
-
var r = S(), i = c(r), o = (e) => {
|
|
462
|
-
var r = oe(), i = a(r);
|
|
463
|
-
w(), E(r), t(() => {
|
|
464
|
-
y(r, "id", l(n).id), y(i, "fill", l(n).color);
|
|
465
|
-
}), u(e, r);
|
|
466
|
-
}, s = (e) => {
|
|
467
|
-
var r = se(), i = a(r);
|
|
468
|
-
w(), E(r), t(() => {
|
|
469
|
-
y(r, "id", l(n).id), y(i, "fill", l(n).color);
|
|
470
|
-
}), u(e, r);
|
|
471
|
-
}, d = (e) => {
|
|
472
|
-
var r = ce(), i = a(r);
|
|
473
|
-
w(), E(r), t(() => {
|
|
474
|
-
y(r, "id", l(n).id), y(i, "fill", l(n).color);
|
|
475
|
-
}), u(e, r);
|
|
476
|
-
}, f = (e) => {
|
|
477
|
-
var r = le(), i = a(r);
|
|
478
|
-
w(), E(r), t(() => {
|
|
479
|
-
y(r, "id", l(n).id), y(i, "fill", l(n).color);
|
|
480
|
-
}), u(e, r);
|
|
481
|
-
};
|
|
482
|
-
p(i, (e) => {
|
|
483
|
-
l(n).kind === "stripe" ? e(o) : l(n).kind === "crosshatch" ? e(s, 1) : l(n).kind === "dots" ? e(d, 2) : l(n).kind === "diagonal" && e(f, 3);
|
|
484
|
-
}), u(e, r);
|
|
485
|
-
}), E(r), u(e, r);
|
|
486
|
-
};
|
|
487
|
-
p(Qn, (e) => {
|
|
488
|
-
l(qt).length && e($n);
|
|
489
|
-
});
|
|
490
|
-
var er = T(Qn), tr = (e) => {
|
|
491
|
-
var i = he(), o = c(i);
|
|
492
|
-
n(o, 17, () => l(U).valueTicks, (e) => e.label + e.x, (e, n) => {
|
|
493
|
-
var i = de(), o = c(i), s = T(o), d = a(s, !0);
|
|
494
|
-
E(s), t(() => {
|
|
495
|
-
y(o, "x1", l(n).x), y(o, "y1", l(U).plot.y), y(o, "x2", l(n).x), y(o, "y2", l(U).plot.y + l(U).plot.h), y(s, "x", l(n).x), y(s, "y", l(U).plot.y + l(U).plot.h + 14), r(d, l(n).label);
|
|
496
|
-
}), u(e, i);
|
|
497
|
-
});
|
|
498
|
-
var s = T(o);
|
|
499
|
-
n(s, 17, () => l(U).catTicks, (e) => e.value, (e, n) => {
|
|
500
|
-
var i = fe(), o = a(i, !0);
|
|
501
|
-
E(i), t((e) => {
|
|
502
|
-
y(i, "x", l(U).plot.x - 6), y(i, "y", l(n).y + 3), r(o, e);
|
|
503
|
-
}, [() => K(l(n).label, 18)]), u(e, i);
|
|
504
|
-
});
|
|
505
|
-
var f = T(s), m = (e) => {
|
|
506
|
-
var n = pe();
|
|
507
|
-
y(n, "x", 13);
|
|
508
|
-
var i = a(n, !0);
|
|
509
|
-
E(n), t(() => {
|
|
510
|
-
y(n, "y", l(U).plot.y + l(U).plot.h / 2), y(n, "transform", `rotate(-90 13 ${l(U).plot.y + l(U).plot.h / 2})`), r(i, d.spec.yAxisTitle);
|
|
511
|
-
}), u(e, n);
|
|
512
|
-
};
|
|
513
|
-
p(f, (e) => {
|
|
514
|
-
d.spec.yAxisTitle && e(m);
|
|
515
|
-
});
|
|
516
|
-
var h = T(f), g = (e) => {
|
|
517
|
-
var n = me(), i = a(n, !0);
|
|
518
|
-
E(n), t(() => {
|
|
519
|
-
y(n, "x", l(U).plot.x + l(U).plot.w / 2), y(n, "y", l(U).height - 3), r(i, d.spec.xAxisTitle);
|
|
520
|
-
}), u(e, n);
|
|
521
|
-
};
|
|
522
|
-
p(h, (e) => {
|
|
523
|
-
d.spec.xAxisTitle && e(g);
|
|
524
|
-
}), u(e, i);
|
|
525
|
-
}, nr = (e) => {
|
|
526
|
-
var i = Te(), o = c(i);
|
|
527
|
-
n(o, 17, () => l(U).yTicks, (e) => e.value, (e, n) => {
|
|
528
|
-
var i = ge(), o = c(i);
|
|
529
|
-
let s;
|
|
530
|
-
var d = T(o), f = a(d, !0);
|
|
531
|
-
E(d), t((e) => {
|
|
532
|
-
s = D(o, 0, "sv-grid-chart-gridline svelte-5rb6rd", null, s, { "is-zero": l(n).value === 0 }), y(o, "x1", l(U).plot.x), y(o, "y1", l(n).y), y(o, "x2", l(U).plot.x + l(U).plot.w), y(o, "y2", l(n).y), y(d, "x", l(U).plot.x - 6), y(d, "y", l(n).y + 3), r(f, e);
|
|
533
|
-
}, [() => kn(l(n).value, l(n).label)]), u(e, i);
|
|
534
|
-
});
|
|
535
|
-
var s = T(o), m = (e) => {
|
|
536
|
-
var i = S();
|
|
537
|
-
n(c(i), 17, () => l(U).y2Ticks, (e) => e.value, (e, n) => {
|
|
538
|
-
var i = _e(), o = a(i, !0);
|
|
539
|
-
E(i), t((e) => {
|
|
540
|
-
y(i, "x", l(U).plot.x + l(U).plot.w + 6), y(i, "y", l(n).y + 3), r(o, e);
|
|
541
|
-
}, [() => kn(l(n).value, l(n).label)]), u(e, i);
|
|
542
|
-
}), u(e, i);
|
|
543
|
-
};
|
|
544
|
-
p(s, (e) => {
|
|
545
|
-
l(U).hasRightAxis && e(m);
|
|
546
|
-
});
|
|
547
|
-
var h = T(s);
|
|
548
|
-
n(h, 17, () => l(U).xTicks, (e) => e.label + e.x, (e, n) => {
|
|
549
|
-
var i = S(), o = c(i), s = (e) => {
|
|
550
|
-
var i = ve(), o = a(i, !0);
|
|
551
|
-
E(i), t((e) => {
|
|
552
|
-
y(i, "x", l(n).x), y(i, "y", l(U).plot.y + l(U).plot.h + 12), y(i, "transform", `rotate(-40 ${l(n).x} ${l(U).plot.y + l(U).plot.h + 12})`), r(o, e);
|
|
553
|
-
}, [() => K(l(n).label)]), u(e, i);
|
|
554
|
-
}, d = (e) => {
|
|
555
|
-
var i = ye(), o = a(i, !0);
|
|
556
|
-
E(i), t((e) => {
|
|
557
|
-
y(i, "x", l(n).x), y(i, "y", l(U).plot.y + l(U).plot.h + 16), r(o, e);
|
|
558
|
-
}, [() => K(l(n).label, 16)]), u(e, i);
|
|
559
|
-
};
|
|
560
|
-
p(o, (e) => {
|
|
561
|
-
l(U).xLabelRotated ? e(s) : e(d, -1);
|
|
562
|
-
}), u(e, i);
|
|
563
|
-
});
|
|
564
|
-
var g = T(h);
|
|
565
|
-
n(g, 17, () => l(U).categoryGroupTicks, (e) => e.label + e.x0, (e, n) => {
|
|
566
|
-
let i = f(() => l(U).plot.y + l(U).plot.h + (l(U).xLabelRotated ? 46 : 32));
|
|
567
|
-
var o = xe(), s = c(o), d = T(s), m = (e) => {
|
|
568
|
-
var r = be();
|
|
569
|
-
t(() => {
|
|
570
|
-
y(r, "x1", l(n).x0), y(r, "y1", l(U).plot.y + l(U).plot.h), y(r, "x2", l(n).x0), y(r, "y2", l(i) - 9);
|
|
571
|
-
}), u(e, r);
|
|
572
|
-
};
|
|
573
|
-
p(d, (e) => {
|
|
574
|
-
l(n).x0 > l(U).plot.x + 1 && e(m);
|
|
575
|
-
});
|
|
576
|
-
var h = T(d), g = a(h, !0);
|
|
577
|
-
E(h), t((e) => {
|
|
578
|
-
y(s, "x1", l(n).x0 + 3), y(s, "y1", l(i) - 9), y(s, "x2", l(n).x1 - 3), y(s, "y2", l(i) - 9), y(h, "x", l(n).xCenter), y(h, "y", l(i)), r(g, e);
|
|
579
|
-
}, [() => K(l(n).label, Math.max(4, Math.floor((l(n).x1 - l(n).x0) / 7)))]), u(e, o);
|
|
580
|
-
});
|
|
581
|
-
var _ = T(g), v = (e) => {
|
|
582
|
-
var n = Se();
|
|
583
|
-
y(n, "x", 13);
|
|
584
|
-
var i = a(n, !0);
|
|
585
|
-
E(n), t(() => {
|
|
586
|
-
y(n, "y", l(U).plot.y + l(U).plot.h / 2), y(n, "transform", `rotate(-90 13 ${l(U).plot.y + l(U).plot.h / 2})`), r(i, d.spec.yAxisTitle);
|
|
587
|
-
}), u(e, n);
|
|
588
|
-
};
|
|
589
|
-
p(_, (e) => {
|
|
590
|
-
d.spec.yAxisTitle && e(v);
|
|
591
|
-
});
|
|
592
|
-
var b = T(_), x = (e) => {
|
|
593
|
-
var n = Ce(), i = a(n, !0);
|
|
594
|
-
E(n), t(() => {
|
|
595
|
-
y(n, "x", l(U).width - 5), y(n, "y", l(U).plot.y + l(U).plot.h / 2), y(n, "transform", `rotate(90 ${l(U).width - 5} ${l(U).plot.y + l(U).plot.h / 2})`), r(i, d.spec.y2AxisTitle);
|
|
596
|
-
}), u(e, n);
|
|
597
|
-
};
|
|
598
|
-
p(b, (e) => {
|
|
599
|
-
d.spec.y2AxisTitle && e(x);
|
|
600
|
-
});
|
|
601
|
-
var C = T(b), w = (e) => {
|
|
602
|
-
var n = we(), i = a(n, !0);
|
|
603
|
-
E(n), t(() => {
|
|
604
|
-
y(n, "x", l(U).plot.x + l(U).plot.w / 2), y(n, "y", l(U).height - 3), r(i, d.spec.xAxisTitle);
|
|
605
|
-
}), u(e, n);
|
|
606
|
-
};
|
|
607
|
-
p(C, (e) => {
|
|
608
|
-
d.spec.xAxisTitle && e(w);
|
|
609
|
-
}), u(e, i);
|
|
610
|
-
};
|
|
611
|
-
p(er, (e) => {
|
|
612
|
-
l(W) ? e(tr) : l(dn) && e(nr, 1);
|
|
613
|
-
});
|
|
614
|
-
var rr = T(er);
|
|
615
|
-
n(rr, 19, () => l(U).lines, (e, t) => e.label + t, (e, i) => {
|
|
616
|
-
var o = Ae(), s = a(o), d = (e) => {
|
|
617
|
-
var n = Ee();
|
|
618
|
-
t(() => {
|
|
619
|
-
y(n, "d", l(i).bandPath), y(n, "fill", l(i).color);
|
|
620
|
-
}), u(e, n);
|
|
621
|
-
};
|
|
622
|
-
p(s, (e) => {
|
|
623
|
-
l(i).bandPath && e(d);
|
|
624
|
-
});
|
|
625
|
-
var f = T(s), m = (e) => {
|
|
626
|
-
var n = De();
|
|
627
|
-
t(() => {
|
|
628
|
-
y(n, "d", l(i).areaPath), y(n, "fill", l(Kt)[l(i).label] ?? l(i).color);
|
|
629
|
-
}), u(e, n);
|
|
630
|
-
};
|
|
631
|
-
p(f, (e) => {
|
|
632
|
-
l(i).areaPath && e(m);
|
|
633
|
-
});
|
|
634
|
-
var h = T(f);
|
|
635
|
-
n(T(h), 17, () => l(i).points, O, (e, n, o) => {
|
|
636
|
-
var s = S(), d = c(s), f = (e) => {
|
|
637
|
-
var s = ke(), d = c(s);
|
|
638
|
-
let f;
|
|
639
|
-
var m = T(d), h = (e) => {
|
|
640
|
-
var i = Oe(), o = a(i, !0);
|
|
641
|
-
E(i), t((e) => {
|
|
642
|
-
y(i, "x", l(n).x), y(i, "y", l(n).y - 7), r(o, e);
|
|
643
|
-
}, [() => A(l(n).value)]), u(e, i);
|
|
644
|
-
};
|
|
645
|
-
p(m, (e) => {
|
|
646
|
-
Lt() && e(h);
|
|
647
|
-
}), t(() => {
|
|
648
|
-
f = D(d, 0, "sv-grid-chart-dot svelte-5rb6rd", null, f, { "is-active": l(Y) === o }), y(d, "cx", l(n).x), y(d, "cy", l(n).y), y(d, "r", l(Y) === o ? 4 : 3), y(d, "fill", l(i).color);
|
|
649
|
-
}), u(e, s);
|
|
650
|
-
};
|
|
651
|
-
p(d, (e) => {
|
|
652
|
-
l(n).defined && e(f);
|
|
653
|
-
}), u(e, s);
|
|
654
|
-
}), E(o), t((e) => {
|
|
655
|
-
_(o, e), y(h, "d", l(i).path), y(h, "stroke", l(i).color);
|
|
656
|
-
}, [() => `opacity:${bn(l(i).label)}`]), u(e, o);
|
|
657
|
-
});
|
|
658
|
-
var ir = T(rr);
|
|
659
|
-
n(ir, 17, () => l(U).bars, O, (e, n) => {
|
|
660
|
-
var i = Ne(), o = c(i), s = T(o), f = (e) => {
|
|
661
|
-
var i = je();
|
|
662
|
-
let o;
|
|
663
|
-
var s = a(i, !0);
|
|
664
|
-
E(i), t((e) => {
|
|
665
|
-
o = D(i, 0, "sv-grid-chart-datalabel svelte-5rb6rd", null, o, { "on-bar": d.spec.stacked || d.spec.stacked100 }), y(i, "x", d.spec.stacked || d.spec.stacked100 ? l(n).x + l(n).w / 2 : l(n).value >= 0 ? l(n).x + l(n).w + 3 : l(n).x - 3), y(i, "y", l(n).y + l(n).h / 2 + 3), y(i, "text-anchor", d.spec.stacked || d.spec.stacked100 ? "middle" : l(n).value >= 0 ? "start" : "end"), r(s, e);
|
|
666
|
-
}, [() => A(l(n).value)]), u(e, i);
|
|
667
|
-
}, m = (e) => {
|
|
668
|
-
var i = Me();
|
|
669
|
-
let o;
|
|
670
|
-
var s = a(i, !0);
|
|
671
|
-
E(i), t((e) => {
|
|
672
|
-
o = D(i, 0, "sv-grid-chart-datalabel svelte-5rb6rd", null, o, { "on-bar": d.spec.stacked || d.spec.stacked100 }), y(i, "x", l(n).x + l(n).w / 2), y(i, "y", d.spec.stacked || d.spec.stacked100 ? l(n).y + l(n).h / 2 + 3 : l(n).value >= 0 ? l(n).y - 3 : l(n).y + l(n).h + 11), r(s, e);
|
|
673
|
-
}, [() => A(l(n).value)]), u(e, i);
|
|
674
|
-
};
|
|
675
|
-
p(s, (e) => {
|
|
676
|
-
Lt() && l(W) && l(n).w > 18 ? e(f) : Lt() && !l(W) && l(n).h > 13 && e(m, 1);
|
|
677
|
-
}), t((e) => {
|
|
678
|
-
y(o, "x", l(n).x), y(o, "y", l(n).y), y(o, "width", l(n).w), y(o, "height", l(n).h), y(o, "fill", l(Kt)[l(n).series] ?? l(n).color), _(o, e);
|
|
679
|
-
}, [() => `opacity:${bn(l(n).series)}`]), u(e, i);
|
|
680
|
-
});
|
|
681
|
-
var ar = T(ir);
|
|
682
|
-
n(ar, 17, () => l(U).scatterPoints, O, (e, n) => {
|
|
683
|
-
var r = Pe();
|
|
684
|
-
t((e) => {
|
|
685
|
-
y(r, "cx", l(n).cx), y(r, "cy", l(n).cy), y(r, "r", l(n).r), y(r, "fill", l(n).color), y(r, "stroke", l(n).color), _(r, e);
|
|
686
|
-
}, [() => `opacity:${bn(l(n).series)}`]), i("mousemove", r, (e) => Fn(e.clientX, e.clientY, l(n))), o("mouseleave", r, Z), u(e, r);
|
|
687
|
-
});
|
|
688
|
-
var or = T(ar);
|
|
689
|
-
n(or, 17, () => l(U).referenceLines, O, (e, n) => {
|
|
690
|
-
var i = Fe(), o = c(i), s = T(o), d = a(s, !0);
|
|
691
|
-
E(s), t(() => {
|
|
692
|
-
y(o, "x1", l(U).plot.x), y(o, "y1", l(n).y), y(o, "x2", l(U).plot.x + l(U).plot.w), y(o, "y2", l(n).y), y(o, "stroke", l(n).color), y(o, "stroke-dasharray", l(n).dashed ? "5 4" : void 0), y(s, "x", l(U).plot.x + l(U).plot.w - 3), y(s, "y", l(n).y - 3), y(s, "fill", l(n).color), r(d, l(n).label);
|
|
693
|
-
}), u(e, i);
|
|
694
|
-
});
|
|
695
|
-
var sr = T(or);
|
|
696
|
-
n(sr, 17, () => l(U).referenceLinesV, O, (e, n) => {
|
|
697
|
-
var i = Ie(), o = c(i), s = T(o), d = a(s, !0);
|
|
698
|
-
E(s), t(() => {
|
|
699
|
-
y(o, "x1", l(n).x), y(o, "y1", l(U).plot.y), y(o, "x2", l(n).x), y(o, "y2", l(U).plot.y + l(U).plot.h), y(o, "stroke", l(n).color), y(o, "stroke-dasharray", l(n).dashed ? "5 4" : void 0), y(s, "x", l(n).x + 3), y(s, "y", l(U).plot.y + 9), y(s, "fill", l(n).color), r(d, l(n).label);
|
|
700
|
-
}), u(e, i);
|
|
701
|
-
});
|
|
702
|
-
var cr = T(sr);
|
|
703
|
-
n(cr, 19, () => l(U).overlays, (e, t) => e.label + t, (e, n) => {
|
|
704
|
-
var r = Le();
|
|
705
|
-
t(() => {
|
|
706
|
-
y(r, "d", l(n).path), y(r, "stroke", l(n).color);
|
|
707
|
-
}), u(e, r);
|
|
708
|
-
});
|
|
709
|
-
var lr = T(cr);
|
|
710
|
-
n(lr, 19, () => l(U).annotations, (e, t) => e.label + t, (e, n) => {
|
|
711
|
-
let i = f(() => l(n).placement === "left" ? -8 : l(n).placement === "right" ? 8 : 0), o = f(() => l(n).placement === "bottom" ? 14 : l(n).placement === "top" ? -8 : 0), s = f(() => l(n).placement === "left" ? "end" : l(n).placement === "right" ? "start" : "middle");
|
|
712
|
-
var d = Re(), p = c(d), m = T(p), h = a(m, !0);
|
|
713
|
-
E(m), t(() => {
|
|
714
|
-
y(p, "cx", l(n).x), y(p, "cy", l(n).y), y(p, "fill", l(n).color), y(m, "x", l(n).x + l(i)), y(m, "y", l(n).y + l(o)), y(m, "text-anchor", l(s)), y(m, "fill", l(n).color), r(h, l(n).label);
|
|
715
|
-
}), u(e, d);
|
|
716
|
-
});
|
|
717
|
-
var ur = T(lr), dr = (e) => {
|
|
718
|
-
var n = S(), r = c(n), i = (e) => {
|
|
719
|
-
let n = f(() => l(U).plot.y + l(G) * l(Y) + l(G) / 2);
|
|
720
|
-
var r = ze();
|
|
721
|
-
t(() => {
|
|
722
|
-
y(r, "x1", l(U).plot.x), y(r, "y1", l(n)), y(r, "x2", l(U).plot.x + l(U).plot.w), y(r, "y2", l(n));
|
|
723
|
-
}), u(e, r);
|
|
724
|
-
}, a = (e) => {
|
|
725
|
-
let n = f(() => l(U).lines[0]?.points[l(Y)]), r = f(() => l(n) && Number.isFinite(l(n).x) ? l(n).x : l(U).plot.x + l(G) * l(Y) + l(G) / 2);
|
|
726
|
-
var i = Be();
|
|
727
|
-
t(() => {
|
|
728
|
-
y(i, "x1", l(r)), y(i, "y1", l(U).plot.y), y(i, "x2", l(r)), y(i, "y2", l(U).plot.y + l(U).plot.h);
|
|
729
|
-
}), u(e, i);
|
|
730
|
-
};
|
|
731
|
-
p(r, (e) => {
|
|
732
|
-
l(W) ? e(i) : e(a, -1);
|
|
733
|
-
}), u(e, n);
|
|
734
|
-
};
|
|
735
|
-
p(ur, (e) => {
|
|
736
|
-
l(dn) && l(Y) !== null && e(dr);
|
|
737
|
-
});
|
|
738
|
-
var fr = T(ur), pr = (e) => {
|
|
739
|
-
var s = qe(), m = c(s);
|
|
740
|
-
n(m, 17, () => l(U).heatmapRowTicks, (e) => e.value, (e, n) => {
|
|
741
|
-
var i = Ve(), o = a(i, !0);
|
|
742
|
-
E(i), t((e) => {
|
|
743
|
-
y(i, "x", l(U).plot.x - 8), y(i, "y", l(n).y + 3), r(o, e);
|
|
744
|
-
}, [() => K(l(n).label, 22)]), u(e, i);
|
|
745
|
-
});
|
|
746
|
-
var h = T(m);
|
|
747
|
-
n(h, 19, () => l(U).heatmapColTicks, (e, t) => e.label + t, (e, n) => {
|
|
748
|
-
var i = He(), o = a(i, !0);
|
|
749
|
-
E(i), t((e) => {
|
|
750
|
-
y(i, "x", l(n).x), y(i, "y", l(U).plot.y + l(U).plot.h + 14), r(o, e);
|
|
751
|
-
}, [() => K(l(n).label, 14)]), u(e, i);
|
|
752
|
-
});
|
|
753
|
-
var g = T(h);
|
|
754
|
-
n(g, 17, () => l(U).heatmapCells, O, (e, n) => {
|
|
755
|
-
var s = We(), f = c(s), m = T(f), h = (e) => {
|
|
756
|
-
var i = Ue(), o = a(i, !0);
|
|
757
|
-
E(i), t((e) => {
|
|
758
|
-
y(i, "x", l(n).x + l(n).w / 2), y(i, "y", l(n).y + l(n).h / 2 + 3), y(i, "fill", l(n).textColor), r(o, e);
|
|
759
|
-
}, [() => A(l(n).value)]), u(e, i);
|
|
760
|
-
};
|
|
761
|
-
p(m, (e) => {
|
|
762
|
-
Lt() && l(n).w > 22 && l(n).h > 14 && e(h);
|
|
763
|
-
}), t((e) => {
|
|
764
|
-
y(f, "x", l(n).x), y(f, "y", l(n).y), y(f, "width", l(n).w), y(f, "height", l(n).h), y(f, "fill", l(n).color), y(f, "role", d.onSelect ? "button" : "presentation"), y(f, "tabindex", d.onSelect ? 0 : void 0), y(f, "aria-label", e);
|
|
765
|
-
}, [() => `${l(n).rowLabel} ${l(n).colLabel}: ${A(l(n).value)}`]), i("mousemove", f, (e) => In(e.clientX, e.clientY, l(n))), o("mouseleave", f, Z), i("click", f, () => Q(l(n).colLabel, l(n).rowLabel, l(n).value)), i("keydown", f, (e) => {
|
|
766
|
-
d.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(l(n).colLabel, l(n).rowLabel, l(n).value));
|
|
767
|
-
}), u(e, s);
|
|
768
|
-
});
|
|
769
|
-
var _ = T(g), v = (e) => {
|
|
770
|
-
let i = f(() => l(U).plot.x + l(U).plot.w + 14), o = f(() => l(U).plot.h - 20), s = f(() => l(U).heatmapLegend);
|
|
771
|
-
var d = Ke(), p = c(d), m = a(p);
|
|
772
|
-
n(m, 21, () => l(s), O, (e, n, r) => {
|
|
773
|
-
var i = Ge();
|
|
774
|
-
t(() => {
|
|
775
|
-
y(i, "offset", `${r / (l(s).length - 1) * 100}%`), y(i, "stop-color", l(n).color);
|
|
776
|
-
}), u(e, i);
|
|
777
|
-
}), E(m), E(p);
|
|
778
|
-
var h = T(p), g = T(h), _ = a(g, !0);
|
|
779
|
-
E(g);
|
|
780
|
-
var v = T(g), b = a(v, !0);
|
|
781
|
-
E(v), t(() => {
|
|
782
|
-
y(m, "id", `${M}-heatscale`), y(h, "x", l(i)), y(h, "y", l(U).plot.y + 10), y(h, "height", l(o)), y(h, "fill", `url(#${M}-heatscale)`), y(g, "x", l(i) + 14), y(g, "y", l(U).plot.y + 14), r(_, l(s)[l(s).length - 1].label), y(v, "x", l(i) + 14), y(v, "y", l(U).plot.y + 10 + l(o)), r(b, l(s)[0].label);
|
|
783
|
-
}), u(e, d);
|
|
784
|
-
};
|
|
785
|
-
p(_, (e) => {
|
|
786
|
-
l(U).heatmapLegend.length && e(v);
|
|
787
|
-
}), u(e, s);
|
|
788
|
-
};
|
|
789
|
-
p(fr, (e) => {
|
|
790
|
-
l(pn) && e(pr);
|
|
791
|
-
});
|
|
792
|
-
var mr = T(fr), hr = (e) => {
|
|
793
|
-
var s = S();
|
|
794
|
-
n(c(s), 17, () => l(U).funnelSegments, O, (e, n, s) => {
|
|
795
|
-
var f = Je(), p = c(f), m = T(p), h = a(m, !0);
|
|
796
|
-
E(m);
|
|
797
|
-
var g = T(m), _ = a(g);
|
|
798
|
-
E(g), t((e, t, i, a) => {
|
|
799
|
-
y(p, "d", l(n).path), y(p, "fill", l(n).color), y(p, "role", d.onSelect ? "button" : "presentation"), y(p, "tabindex", d.onSelect ? 0 : void 0), y(p, "aria-label", e), y(m, "x", l(n).cx), y(m, "y", l(n).cy - 3), y(m, "fill", l(n).textColor), r(h, t), y(g, "x", l(n).cx), y(g, "y", l(n).cy + 11), y(g, "fill", l(n).textColor), r(_, `${i ?? ""} · ${a ?? ""}%`);
|
|
800
|
-
}, [
|
|
801
|
-
() => `${l(n).label}: ${A(l(n).value)}`,
|
|
802
|
-
() => K(l(n).label, 24),
|
|
803
|
-
() => A(l(n).value),
|
|
804
|
-
() => (l(n).conversion * 100).toFixed(0)
|
|
805
|
-
]), i("mousemove", p, (e) => Ln(e.clientX, e.clientY, l(n))), o("mouseleave", p, Z), i("click", p, () => Q(l(n).label, l(n).label, l(n).value, s)), i("keydown", p, (e) => {
|
|
806
|
-
d.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(l(n).label, l(n).label, l(n).value, s));
|
|
807
|
-
}), u(e, f);
|
|
808
|
-
}), u(e, s);
|
|
809
|
-
};
|
|
810
|
-
p(mr, (e) => {
|
|
811
|
-
l(mn) && e(hr);
|
|
812
|
-
});
|
|
813
|
-
var gr = T(mr), _r = (e) => {
|
|
814
|
-
let s = f(() => l(U).radarCenter);
|
|
815
|
-
var d = $e(), p = c(d);
|
|
816
|
-
n(p, 17, () => l(U).radarRings, O, (e, n, r) => {
|
|
817
|
-
let i = f(() => l(s).r * ((r + 1) / l(U).radarRings.length));
|
|
818
|
-
var a = Ye();
|
|
819
|
-
t(() => {
|
|
820
|
-
y(a, "cx", l(s).cx), y(a, "cy", l(s).cy), y(a, "r", l(i));
|
|
821
|
-
}), u(e, a);
|
|
822
|
-
});
|
|
823
|
-
var m = T(p);
|
|
824
|
-
n(m, 17, () => l(U).radarAxes, O, (e, n) => {
|
|
825
|
-
let i = f(() => l(n).x - l(s).cx), o = f(() => l(n).y - l(s).cy), d = f(() => l(s).cx + l(i) * 1.08), p = f(() => l(s).cy + l(o) * 1.08);
|
|
826
|
-
var m = Xe(), h = c(m), g = T(h), _ = a(g, !0);
|
|
827
|
-
E(g), t((e) => {
|
|
828
|
-
y(h, "x1", l(s).cx), y(h, "y1", l(s).cy), y(h, "x2", l(n).x), y(h, "y2", l(n).y), y(g, "x", l(d)), y(g, "y", l(p) + 3), y(g, "text-anchor", e), r(_, l(n).label);
|
|
829
|
-
}, [() => Math.abs(l(i)) < 1 ? "middle" : l(i) > 0 ? "start" : "end"]), u(e, m);
|
|
830
|
-
}), n(T(m), 17, () => l(U).radarSeries, O, (e, r) => {
|
|
831
|
-
var a = Qe(), s = c(a);
|
|
832
|
-
n(T(s), 17, () => l(r).points, O, (e, n) => {
|
|
833
|
-
var a = Ze();
|
|
834
|
-
t(() => {
|
|
835
|
-
y(a, "cx", l(n).x), y(a, "cy", l(n).y), y(a, "fill", l(r).color);
|
|
836
|
-
}), i("mousemove", a, (e) => Rn(e.clientX, e.clientY, l(r).label, l(n).axis, l(n).value, l(r).color)), o("mouseleave", a, Z), u(e, a);
|
|
837
|
-
}), t((e) => {
|
|
838
|
-
y(s, "d", l(r).path), y(s, "fill", l(r).color), y(s, "stroke", l(r).color), _(s, e);
|
|
839
|
-
}, [() => `opacity:${bn(l(r).label)}`]), u(e, a);
|
|
840
|
-
}), u(e, d);
|
|
841
|
-
};
|
|
842
|
-
p(gr, (e) => {
|
|
843
|
-
l(hn) && l(U).radarCenter && e(_r);
|
|
844
|
-
});
|
|
845
|
-
var vr = T(gr), yr = (e) => {
|
|
846
|
-
var s = at(), d = c(s);
|
|
847
|
-
n(d, 17, () => l(U).calendarMonthTicks, O, (e, n) => {
|
|
848
|
-
var i = et(), o = a(i, !0);
|
|
849
|
-
E(i), t(() => {
|
|
850
|
-
y(i, "x", l(n).x), y(i, "y", l(U).plot.y - 8), r(o, l(n).label);
|
|
851
|
-
}), u(e, i);
|
|
852
|
-
});
|
|
853
|
-
var m = T(d);
|
|
854
|
-
n(m, 16, () => [
|
|
855
|
-
"Mon",
|
|
856
|
-
"Wed",
|
|
857
|
-
"Fri"
|
|
858
|
-
], O, (e, n, i) => {
|
|
859
|
-
let o = f(() => [
|
|
860
|
-
1,
|
|
861
|
-
3,
|
|
862
|
-
5
|
|
863
|
-
][i]), s = f(() => l(U).calendarCells[l(o)]);
|
|
864
|
-
var d = S(), m = c(d), h = (e) => {
|
|
865
|
-
var i = tt(), o = a(i, !0);
|
|
866
|
-
E(i), t(() => {
|
|
867
|
-
y(i, "x", l(U).plot.x - 6), y(i, "y", l(s).y + l(s).size / 2 + 3), r(o, n);
|
|
868
|
-
}), u(e, i);
|
|
869
|
-
};
|
|
870
|
-
p(m, (e) => {
|
|
871
|
-
l(s) && e(h);
|
|
872
|
-
}), u(e, d);
|
|
873
|
-
});
|
|
874
|
-
var h = T(m);
|
|
875
|
-
n(h, 17, () => l(U).calendarCells, O, (e, n) => {
|
|
876
|
-
var r = nt();
|
|
877
|
-
let a;
|
|
878
|
-
t((e) => {
|
|
879
|
-
a = D(r, 0, "sv-grid-chart-calendar-cell svelte-5rb6rd", null, a, { "is-blank": !l(n).defined }), y(r, "x", l(n).x + 1), y(r, "y", l(n).y + 1), y(r, "width", l(n).size - 2), y(r, "height", l(n).size - 2), y(r, "fill", l(n).defined ? l(n).color : "transparent"), y(r, "aria-label", e);
|
|
880
|
-
}, [() => `${l(n).date}: ${l(n).defined ? A(l(n).value) : "no data"}`]), i("mousemove", r, (e) => l(n).defined && X(e.clientX, e.clientY, l(n).date, [{
|
|
881
|
-
color: l(n).color,
|
|
882
|
-
value: A(l(n).value)
|
|
883
|
-
}])), o("mouseleave", r, Z), u(e, r);
|
|
884
|
-
});
|
|
885
|
-
var g = T(h), _ = (e) => {
|
|
886
|
-
let i = f(() => l(U).plot.x + l(U).plot.w + 12), o = f(() => l(U).plot.y + 4);
|
|
887
|
-
var s = it(), d = c(s), p = T(d);
|
|
888
|
-
n(p, 17, () => l(U).calendarLegend, O, (e, n, s) => {
|
|
889
|
-
var d = rt(), f = c(d), p = T(f), m = a(p, !0);
|
|
890
|
-
E(p), t(() => {
|
|
891
|
-
y(f, "x", l(i)), y(f, "y", l(o) + 6 + s * 13), y(f, "fill", l(n).color), y(p, "x", l(i) + 14), y(p, "y", l(o) + 14 + s * 13), r(m, l(n).label);
|
|
892
|
-
}), u(e, d);
|
|
893
|
-
});
|
|
894
|
-
var m = T(p);
|
|
895
|
-
t(() => {
|
|
896
|
-
y(d, "x", l(i)), y(d, "y", l(o)), y(m, "x", l(i)), y(m, "y", l(o) + 12 + l(U).calendarLegend.length * 13);
|
|
897
|
-
}), u(e, s);
|
|
898
|
-
};
|
|
899
|
-
p(g, (e) => {
|
|
900
|
-
l(U).calendarLegend.length && e(_);
|
|
901
|
-
}), u(e, s);
|
|
902
|
-
};
|
|
903
|
-
p(vr, (e) => {
|
|
904
|
-
l(gn) && e(yr);
|
|
905
|
-
});
|
|
906
|
-
var br = T(vr), xr = (e) => {
|
|
907
|
-
let i = f(() => l(U).gauge);
|
|
908
|
-
var o = lt(), s = c(o);
|
|
909
|
-
n(s, 17, () => l(i).ticks, O, (e, n) => {
|
|
910
|
-
var r = ot();
|
|
911
|
-
let i;
|
|
912
|
-
t(() => {
|
|
913
|
-
i = D(r, 0, "sv-grid-chart-gauge-tick svelte-5rb6rd", null, i, { "is-major": l(n).major }), y(r, "x1", l(n).x1), y(r, "y1", l(n).y1), y(r, "x2", l(n).x2), y(r, "y2", l(n).y2);
|
|
914
|
-
}), u(e, r);
|
|
915
|
-
});
|
|
916
|
-
var d = T(s), m = T(d);
|
|
917
|
-
n(m, 17, () => l(i).rangePaths, O, (e, n) => {
|
|
918
|
-
var r = st();
|
|
919
|
-
t(() => {
|
|
920
|
-
y(r, "d", l(n).path), y(r, "stroke", l(n).color);
|
|
921
|
-
}), u(e, r);
|
|
922
|
-
});
|
|
923
|
-
var h = T(m), g = T(h), _ = (e) => {
|
|
924
|
-
var n = ct();
|
|
925
|
-
t(() => {
|
|
926
|
-
y(n, "x1", l(i).target.x1), y(n, "y1", l(i).target.y1), y(n, "x2", l(i).target.x2), y(n, "y2", l(i).target.y2);
|
|
927
|
-
}), u(e, n);
|
|
928
|
-
};
|
|
929
|
-
p(g, (e) => {
|
|
930
|
-
l(i).target && e(_);
|
|
931
|
-
});
|
|
932
|
-
var v = T(g), b = T(v), x = T(b), S = T(x), C = a(S, !0);
|
|
933
|
-
E(S);
|
|
934
|
-
var w = T(S), ee = a(w, !0);
|
|
935
|
-
E(w);
|
|
936
|
-
var te = T(w), ne = a(te);
|
|
937
|
-
E(te), t((e, t, n) => {
|
|
938
|
-
y(d, "d", l(i).trackPath), y(h, "d", l(i).valuePath), y(h, "stroke", l(i).valueColor ?? "var(--sg-accent, #2563eb)"), y(v, "d", l(i).needle.path), y(v, "fill", l(i).valueColor ?? "var(--sg-accent, #2563eb)"), y(b, "cx", l(i).cx), y(b, "cy", l(i).cy), y(b, "r", l(i).needle.hubR), y(x, "cx", l(i).cx), y(x, "cy", l(i).cy), y(S, "x", l(i).minLabel.x), y(S, "y", l(i).minLabel.y), r(C, e), y(w, "x", l(i).maxLabel.x), y(w, "y", l(i).maxLabel.y), r(ee, t), y(te, "x", l(i).cx), y(te, "y", l(i).cy + 38), r(ne, `${n ?? ""}${l(i).unit ? ` ${l(i).unit}` : ""}`);
|
|
939
|
-
}, [
|
|
940
|
-
() => A(l(i).min),
|
|
941
|
-
() => A(l(i).max),
|
|
942
|
-
() => A(l(i).value)
|
|
943
|
-
]), u(e, o);
|
|
944
|
-
};
|
|
945
|
-
p(br, (e) => {
|
|
946
|
-
l(_n) && l(U).gauge && e(xr);
|
|
947
|
-
});
|
|
948
|
-
var Sr = T(br), Cr = (e) => {
|
|
949
|
-
var s = S();
|
|
950
|
-
n(c(s), 17, () => l(U).treemapCells, O, (e, n) => {
|
|
951
|
-
var s = ft(), f = c(s), m = T(f), h = (e) => {
|
|
952
|
-
var i = ut(), o = a(i, !0);
|
|
953
|
-
E(i), t((e) => {
|
|
954
|
-
y(i, "x", l(n).x + 4), y(i, "y", l(n).y + 12), y(i, "fill", l(n).textColor), r(o, e);
|
|
955
|
-
}, [() => K(l(n).name, Math.max(3, Math.floor(l(n).w / 7)))]), u(e, i);
|
|
956
|
-
};
|
|
957
|
-
p(m, (e) => {
|
|
958
|
-
l(n).w > 36 && l(n).h > 18 && e(h);
|
|
959
|
-
});
|
|
960
|
-
var g = T(m), _ = (e) => {
|
|
961
|
-
var i = dt(), o = a(i, !0);
|
|
962
|
-
E(i), t((e) => {
|
|
963
|
-
y(i, "x", l(n).x + 4), y(i, "y", l(n).y + 24), y(i, "fill", l(n).textColor), r(o, e);
|
|
964
|
-
}, [() => A(l(n).value)]), u(e, i);
|
|
965
|
-
};
|
|
966
|
-
p(g, (e) => {
|
|
967
|
-
l(n).w > 60 && l(n).h > 30 && e(_);
|
|
968
|
-
}), t((e) => {
|
|
969
|
-
y(f, "x", l(n).x), y(f, "y", l(n).y), y(f, "width", l(n).w), y(f, "height", l(n).h), y(f, "fill", l(n).color), y(f, "role", d.onSelect ? "button" : "presentation"), y(f, "tabindex", d.onSelect ? 0 : void 0), y(f, "aria-label", e);
|
|
970
|
-
}, [() => `${l(n).name}: ${A(l(n).value)}`]), i("mousemove", f, (e) => X(e.clientX, e.clientY, l(n).name, [{
|
|
971
|
-
color: l(n).color,
|
|
972
|
-
value: A(l(n).value)
|
|
973
|
-
}])), o("mouseleave", f, Z), i("click", f, () => Q(l(n).name, "", l(n).value)), i("keydown", f, (e) => {
|
|
974
|
-
d.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(l(n).name, "", l(n).value));
|
|
975
|
-
}), u(e, s);
|
|
976
|
-
}), u(e, s);
|
|
977
|
-
};
|
|
978
|
-
p(Sr, (e) => {
|
|
979
|
-
l(vn) && e(Cr);
|
|
980
|
-
});
|
|
981
|
-
var wr = T(Sr), Tr = (e) => {
|
|
982
|
-
var s = ht(), d = c(s);
|
|
983
|
-
n(d, 17, () => l(U).sankeyLinks, O, (e, n) => {
|
|
984
|
-
var r = pt();
|
|
985
|
-
t((e) => {
|
|
986
|
-
y(r, "d", l(n).path), y(r, "stroke", l(n).color), y(r, "stroke-width", l(n).width), y(r, "aria-label", e);
|
|
987
|
-
}, [() => `${l(n).source} -> ${l(n).target}: ${A(l(n).value)}`]), i("mousemove", r, (e) => X(e.clientX, e.clientY, `${l(n).source} -> ${l(n).target}`, [{
|
|
988
|
-
color: l(n).color,
|
|
989
|
-
value: A(l(n).value)
|
|
990
|
-
}])), o("mouseleave", r, Z), u(e, r);
|
|
991
|
-
}), n(T(d), 17, () => l(U).sankeyNodes, O, (e, n) => {
|
|
992
|
-
var s = mt(), d = c(s);
|
|
993
|
-
y(d, "tabindex", 0);
|
|
994
|
-
var f = T(d), p = a(f, !0);
|
|
995
|
-
E(f), t((e) => {
|
|
996
|
-
y(d, "x", l(n).x), y(d, "y", l(n).y), y(d, "width", l(n).w), y(d, "height", l(n).h), y(d, "fill", l(n).color), y(d, "aria-label", e), y(f, "x", l(n).column === 0 ? l(n).x + l(n).w + 4 : l(n).x - 4), y(f, "y", l(n).y + l(n).h / 2 + 3), y(f, "text-anchor", l(n).column === 0 ? "start" : "end"), r(p, l(n).label);
|
|
997
|
-
}, [() => `${l(n).label}: in ${A(l(n).totalIn)}, out ${A(l(n).totalOut)}`]), i("mousemove", d, (e) => X(e.clientX, e.clientY, l(n).label, [{
|
|
998
|
-
label: "in",
|
|
999
|
-
value: A(l(n).totalIn)
|
|
1000
|
-
}, {
|
|
1001
|
-
label: "out",
|
|
1002
|
-
value: A(l(n).totalOut)
|
|
1003
|
-
}])), o("mouseleave", d, Z), o("focus", d, (e) => {
|
|
1004
|
-
let t = e.currentTarget.getBoundingClientRect();
|
|
1005
|
-
X(t.left + t.width / 2, t.top, l(n).label, [{
|
|
1006
|
-
label: "in",
|
|
1007
|
-
value: A(l(n).totalIn)
|
|
1008
|
-
}, {
|
|
1009
|
-
label: "out",
|
|
1010
|
-
value: A(l(n).totalOut)
|
|
1011
|
-
}]);
|
|
1012
|
-
}), o("blur", d, Z), u(e, s);
|
|
1013
|
-
}), u(e, s);
|
|
1014
|
-
};
|
|
1015
|
-
p(wr, (e) => {
|
|
1016
|
-
l(yn) && e(Tr);
|
|
1017
|
-
});
|
|
1018
|
-
var Er = T(wr);
|
|
1019
|
-
n(Er, 17, () => l(U).slices, O, (e, n, s) => {
|
|
1020
|
-
var f = _t(), m = c(f), h = T(m), g = (e) => {
|
|
1021
|
-
var i = gt(), o = a(i);
|
|
1022
|
-
E(i), t((e) => {
|
|
1023
|
-
y(i, "x", l(n).cx), y(i, "y", l(n).cy), r(o, `${e ?? ""}%`);
|
|
1024
|
-
}, [() => l(n).percent.toFixed(0)]), u(e, i);
|
|
1025
|
-
};
|
|
1026
|
-
p(h, (e) => {
|
|
1027
|
-
Lt() && l(n).percent >= 6 && e(g);
|
|
1028
|
-
}), t((e) => {
|
|
1029
|
-
y(m, "d", l(n).path), y(m, "fill", l(n).color), y(m, "role", d.onSelect ? "button" : "presentation"), y(m, "tabindex", d.onSelect ? 0 : void 0), y(m, "aria-label", e);
|
|
1030
|
-
}, [() => `${l(n).label}: ${A(l(n).value)}, ${l(n).percent.toFixed(1)}%`]), i("mousemove", m, (e) => Pn(e.clientX, e.clientY, l(n).label, l(n).value, l(n).percent)), o("mouseleave", m, Z), o("focus", m, (e) => {
|
|
1031
|
-
let t = e.currentTarget.getBoundingClientRect();
|
|
1032
|
-
Pn(t.left + t.width / 2, t.top, l(n).label, l(n).value, l(n).percent);
|
|
1033
|
-
}), o("blur", m, Z), i("click", m, () => Q(l(n).label, l(n).label, l(n).value, s)), i("keydown", m, (e) => Vn(e, l(n).label, l(n).value)), u(e, f);
|
|
1034
|
-
});
|
|
1035
|
-
var Dr = T(Er), Or = (e) => {
|
|
1036
|
-
var n = vt(), i = c(n), o = a(i, !0);
|
|
1037
|
-
E(i);
|
|
1038
|
-
var s = T(i);
|
|
1039
|
-
t((e) => {
|
|
1040
|
-
y(i, "x", l(U).donut.cx), y(i, "y", l(U).donut.cy - 4), r(o, e), y(s, "x", l(U).donut.cx), y(s, "y", l(U).donut.cy + 11);
|
|
1041
|
-
}, [() => A(l(U).donut.total)]), u(e, n);
|
|
1042
|
-
};
|
|
1043
|
-
p(Dr, (e) => {
|
|
1044
|
-
l(U).donut && e(Or);
|
|
1045
|
-
});
|
|
1046
|
-
var kr = T(Dr), Ar = (e) => {
|
|
1047
|
-
var r = S();
|
|
1048
|
-
n(c(r), 19, () => l(H).categories, (e, t) => e + t, (e, n, r) => {
|
|
1049
|
-
let a = f(() => l(U).lines[0]?.points), s = f(() => l(a)?.[l(r)]?.x), c = f(() => !l(W) && l(a) && l(a).length === l(H).categories.length && Number.isFinite(l(s))), p = f(() => l(c) && l(r) > 0 ? l(a)[l(r) - 1].x : null), m = f(() => l(c) && l(r) < l(a).length - 1 ? l(a)[l(r) + 1].x : null), h = f(() => l(c) ? l(p) == null ? l(U).plot.x : (l(p) + l(s)) / 2 : l(U).plot.x + l(G) * l(r)), g = f(() => l(c) ? l(m) == null ? l(U).plot.x + l(U).plot.w : (l(s) + l(m)) / 2 : l(U).plot.x + l(G) * (l(r) + 1));
|
|
1050
|
-
var _ = yt();
|
|
1051
|
-
t((e, t) => {
|
|
1052
|
-
y(_, "x", l(W) ? l(U).plot.x : l(h)), y(_, "y", l(W) ? l(U).plot.y + l(G) * l(r) : l(U).plot.y), y(_, "width", e), y(_, "height", l(W) ? l(G) : l(U).plot.h), y(_, "role", d.onSelect ? "button" : "img"), y(_, "tabindex", k() ? l(r) === 0 ? 0 : -1 : void 0), y(_, "data-cat-index", l(r)), y(_, "aria-label", t);
|
|
1053
|
-
}, [() => l(W) ? l(U).plot.w : Math.max(0, l(g) - l(h)), () => `${l(n)}: ${jn(l(r)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), i("mousemove", _, (e) => Mn(e.clientX, e.clientY, l(r))), o("mouseleave", _, Z), o("focus", _, (e) => Nn(e.currentTarget, l(r))), o("blur", _, Z), i("click", _, () => Q(l(n), "", 0, l(r))), i("keydown", _, (e) => Bn(e, l(r))), u(e, _);
|
|
1054
|
-
}), u(e, r);
|
|
1055
|
-
};
|
|
1056
|
-
p(kr, (e) => {
|
|
1057
|
-
l(dn) && !l(fn) && e(Ar);
|
|
1058
|
-
});
|
|
1059
|
-
var jr = T(kr), Mr = (e) => {
|
|
1060
|
-
var n = bt();
|
|
1061
|
-
t(() => {
|
|
1062
|
-
y(n, "x", l(R).x), y(n, "y", l(R).y), y(n, "width", l(R).w), y(n, "height", l(R).h);
|
|
1063
|
-
}), u(e, n);
|
|
1064
|
-
};
|
|
1065
|
-
p(jr, (e) => {
|
|
1066
|
-
l(R) && e(Mr);
|
|
1067
|
-
}), E($), v($, (e) => g(F, e), () => l(F));
|
|
1068
|
-
var Nr = T($, 2), Pr = (e) => {
|
|
1069
|
-
let r = f(() => l(z).plot.x + l(on).t0 * l(z).plot.w), s = f(() => (l(on).t1 - l(on).t0) * l(z).plot.w);
|
|
1070
|
-
var d = wt(), m = a(d);
|
|
1071
|
-
n(m, 17, () => l(z).lines, O, (e, n) => {
|
|
1072
|
-
var r = St(), i = c(r), a = (e) => {
|
|
1073
|
-
var r = xt();
|
|
1074
|
-
t(() => {
|
|
1075
|
-
y(r, "d", l(n).areaPath), y(r, "fill", l(n).color);
|
|
1076
|
-
}), u(e, r);
|
|
1077
|
-
};
|
|
1078
|
-
p(i, (e) => {
|
|
1079
|
-
l(n).areaPath && e(a);
|
|
1080
|
-
});
|
|
1081
|
-
var o = T(i);
|
|
1082
|
-
t(() => {
|
|
1083
|
-
y(o, "d", l(n).path), y(o, "stroke", l(n).color);
|
|
1084
|
-
}), u(e, r);
|
|
1085
|
-
});
|
|
1086
|
-
var h = T(m);
|
|
1087
|
-
n(h, 17, () => l(z).bars, O, (e, n) => {
|
|
1088
|
-
var r = Ct();
|
|
1089
|
-
t(() => {
|
|
1090
|
-
y(r, "x", l(n).x), y(r, "y", l(n).y), y(r, "width", l(n).w), y(r, "height", l(n).h), y(r, "fill", l(n).color);
|
|
1091
|
-
}), u(e, r);
|
|
1092
|
-
});
|
|
1093
|
-
var g = T(h), _ = T(g), v = T(_), b = T(v), x = T(b);
|
|
1094
|
-
E(d), t(() => {
|
|
1095
|
-
y(d, "viewBox", `0 0 ${l(z).width} ${l(z).height}`), y(g, "x", l(z).plot.x), y(g, "y", l(z).plot.y), y(g, "width", l(r) - l(z).plot.x), y(g, "height", l(z).plot.h), y(_, "x", l(r) + l(s)), y(_, "y", l(z).plot.y), y(_, "width", l(z).plot.x + l(z).plot.w - (l(r) + l(s))), y(_, "height", l(z).plot.h), y(v, "x", l(r)), y(v, "y", l(z).plot.y), y(v, "width", l(s)), y(v, "height", l(z).plot.h), y(b, "x", l(r) - 4), y(b, "y", l(z).plot.y), y(b, "height", l(z).plot.h), y(x, "x", l(r) + l(s) - 4), y(x, "y", l(z).plot.y), y(x, "height", l(z).plot.h);
|
|
1096
|
-
}), i("pointermove", d, ln), i("pointerdown", v, (e) => cn(e, "move")), i("pointerup", v, V), o("pointercancel", v, V), i("pointerdown", b, (e) => cn(e, "left")), i("pointerup", b, V), o("pointercancel", b, V), i("pointerdown", x, (e) => cn(e, "right")), i("pointerup", x, V), o("pointercancel", x, V), u(e, d);
|
|
1097
|
-
};
|
|
1098
|
-
p(Nr, (e) => {
|
|
1099
|
-
l(rn) && l(z) && e(Pr);
|
|
1100
|
-
});
|
|
1101
|
-
var Fr = T(Nr, 2), Ir = (e) => {
|
|
1102
|
-
u(e, Tt());
|
|
1103
|
-
};
|
|
1104
|
-
p(Fr, (e) => {
|
|
1105
|
-
l(Tn) && e(Ir);
|
|
1106
|
-
});
|
|
1107
|
-
var Lr = T(Fr, 2), Rr = (e) => {
|
|
1108
|
-
var i = kt();
|
|
1109
|
-
let o;
|
|
1110
|
-
var s = a(i), c = a(s, !0);
|
|
1111
|
-
E(s), n(T(s, 2), 17, () => l(J).rows, O, (e, n) => {
|
|
1112
|
-
var i = Ot(), o = a(i), s = (e) => {
|
|
1113
|
-
var r = Et();
|
|
1114
|
-
t(() => _(r, `background:${l(n).color}`)), u(e, r);
|
|
1115
|
-
};
|
|
1116
|
-
p(o, (e) => {
|
|
1117
|
-
l(n).color && e(s);
|
|
1118
|
-
});
|
|
1119
|
-
var c = T(o, 2), d = (e) => {
|
|
1120
|
-
var i = Dt(), o = a(i, !0);
|
|
1121
|
-
E(i), t(() => r(o, l(n).label)), u(e, i);
|
|
1122
|
-
};
|
|
1123
|
-
p(c, (e) => {
|
|
1124
|
-
l(n).label && e(d);
|
|
1125
|
-
});
|
|
1126
|
-
var f = T(c, 2), m = a(f, !0);
|
|
1127
|
-
E(f), E(i), t(() => r(m, l(n).value)), u(e, i);
|
|
1128
|
-
}), E(i), t(() => {
|
|
1129
|
-
o = D(i, 1, "sv-grid-chart-tooltip svelte-5rb6rd", null, o, { "is-below": l(J).below }), _(i, `left:${l(J).left}px; top:${l(J).top}px;`), r(c, l(J).title);
|
|
1130
|
-
}), u(e, i);
|
|
1131
|
-
};
|
|
1132
|
-
p(Lr, (e) => {
|
|
1133
|
-
l(J) && e(Rr);
|
|
1134
|
-
});
|
|
1135
|
-
var zr = T(Lr, 2), Br = (e) => {
|
|
1136
|
-
var s = Mt(), c = a(s);
|
|
1137
|
-
n(c, 17, () => l(wn), (e) => e.label, (e, n) => {
|
|
1138
|
-
var s = At();
|
|
1139
|
-
let c;
|
|
1140
|
-
var d = a(s), f = T(d);
|
|
1141
|
-
E(s), t(() => {
|
|
1142
|
-
c = D(s, 1, "sv-grid-chart-legend-item svelte-5rb6rd", null, c, {
|
|
1143
|
-
"is-off": l(n).off,
|
|
1144
|
-
"is-isolated": l(j) === l(n).label
|
|
1145
|
-
}), s.disabled = !k(), y(s, "aria-pressed", !l(n).off), y(s, "title", k() ? `${l(n).off ? "Show" : "Hide"} ${l(n).label} · double-click to isolate` : l(n).label), _(d, `background:${l(n).off ? "transparent" : l(n).color}; border-color:${l(n).color}`), r(f, ` ${l(n).label ?? ""}`);
|
|
1146
|
-
}), i("click", s, () => En(l(n).label)), i("dblclick", s, () => Dn(l(n).label)), o("pointerenter", s, () => k() && g(Ut, l(n).label, !0)), o("pointerleave", s, () => g(Ut, null)), u(e, s);
|
|
1147
|
-
});
|
|
1148
|
-
var d = T(c, 2), f = (e) => {
|
|
1149
|
-
var n = jt(), o = a(n, !0);
|
|
1150
|
-
E(n), t(() => r(o, l(Sn) ? "Show less" : `+${l(xn).length - 10} more`)), i("click", n, () => g(Sn, !l(Sn))), u(e, n);
|
|
1151
|
-
};
|
|
1152
|
-
p(d, (e) => {
|
|
1153
|
-
l(Cn) && e(f);
|
|
1154
|
-
}), E(s), u(e, s);
|
|
1155
|
-
};
|
|
1156
|
-
p(zr, (e) => {
|
|
1157
|
-
x() && l(xn).length && e(Br);
|
|
1158
|
-
});
|
|
1159
|
-
var Vr = T(zr, 2), Hr = a(Vr), Ur = a(Hr);
|
|
1160
|
-
E(Hr);
|
|
1161
|
-
var Wr = T(Hr), Gr = a(Wr);
|
|
1162
|
-
n(Gr, 20, () => l(On).cols, (e) => e, (e, n) => {
|
|
1163
|
-
var i = Nt(), o = a(i, !0);
|
|
1164
|
-
E(i), t(() => r(o, n)), u(e, i);
|
|
1165
|
-
}), E(Gr), E(Wr);
|
|
1166
|
-
var Kr = T(Wr);
|
|
1167
|
-
n(Kr, 21, () => l(On).rows, O, (e, i) => {
|
|
1168
|
-
var o = Ft();
|
|
1169
|
-
n(o, 21, () => l(i), O, (e, n) => {
|
|
1170
|
-
var i = Pt(), o = a(i, !0);
|
|
1171
|
-
E(i), t(() => r(o, l(n))), u(e, i);
|
|
1172
|
-
}), E(o), u(e, o);
|
|
1173
|
-
}), E(Kr), E(Vr), E(Jn), v(Jn, (e) => g(q, e), () => l(q)), t(() => {
|
|
1174
|
-
Zn = D($, 0, "sv-grid-chart-svg svelte-5rb6rd", null, Zn, {
|
|
1175
|
-
"is-interactive": k(),
|
|
1176
|
-
"is-clickable": !!d.onSelect || !!d.onDrill,
|
|
1177
|
-
"is-zoomable": Rt() && l(dn),
|
|
1178
|
-
"is-dragging": !!l(I)
|
|
1179
|
-
}), y($, "viewBox", `0 0 ${l(U).width} ${l(U).height}`), y($, "aria-label", `${d.spec.type} chart`), y($, "aria-describedby", `${M}-table`), y(Vr, "id", `${M}-table`), r(Ur, `${d.spec.type ?? ""} chart data`);
|
|
1180
|
-
}), i("pointerdown", $, $t), i("pointermove", $, en), i("pointerup", $, tn), o("pointercancel", $, tn), i("dblclick", $, nn), u(e, Jn), b();
|
|
1181
|
-
}
|
|
1182
|
-
d([
|
|
1183
|
-
"click",
|
|
1184
|
-
"pointerdown",
|
|
1185
|
-
"pointermove",
|
|
1186
|
-
"pointerup",
|
|
1187
|
-
"dblclick",
|
|
1188
|
-
"mousemove",
|
|
1189
|
-
"keydown"
|
|
1190
|
-
]);
|
|
1191
|
-
//#endregion
|
|
1192
|
-
export { k as t };
|