@svgrid/grid-wc 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -110
- package/dist/GridMenus-B1mC1aPp.js +1077 -0
- package/dist/SvChartMenu-CBMKm7Xb.js +413 -0
- package/dist/SvDateRangeInput-BrYTQEMM.js +197 -0
- package/dist/SvDateTimePicker-CnLlqNDQ.js +766 -0
- package/dist/SvField-Bmzp3ObZ.js +147 -0
- package/dist/SvGridCellEditor-B005dmV1.js +560 -0
- package/dist/SvGridChart-4TcL9Rj2.js +3702 -0
- package/dist/SvGridChartBuilder-C4OL4XYx.js +1165 -0
- package/dist/SvGridChartPanel-CfHA8Ioq.js +1743 -0
- package/dist/SvGridChartView-Ci-9_EJ0.js +45 -0
- package/dist/SvGridDropdown-BlA6iw9m.js +257 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +178 -7
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +77 -2
- package/dist/{shadow/cell-formatting-C0OsDmi_.js → cell-formatting-Eypm-id0.js} +1 -1
- package/dist/chart/SvChartMenu-C-sbGNk8.js +586 -0
- package/dist/chart/chart-export-BHGuh_kZ.js +127 -0
- package/dist/chart/chart-export-pdf-BjkkIEkE.js +104 -0
- package/dist/chart/chart-summary-B86RFA3M.js +137 -0
- package/dist/chart/chart-trend-DP6DSsBa.js +56 -0
- package/dist/chart/chart-validate-CD6ptiwg.js +180 -0
- package/dist/chart/client-BuB0wIgc.js +2757 -0
- package/dist/chart/sv-chart-element.d.ts +98 -0
- package/dist/chart/sv-chart-element.js +7282 -0
- package/dist/chart-DoqdUoGg.js +4398 -0
- package/dist/chart-export-pdf-BirUdchl.js +104 -0
- package/dist/chart-summary-BP9i-v8M.js +137 -0
- package/dist/chart-validate-CD6ptiwg.js +180 -0
- package/dist/{shadow/client-DjwUji8D.js → client-DEF0GRjE.js} +1 -1
- package/dist/{shadow/column-resize-DvCRUrN3.js → column-resize-DUPgynvc.js} +3 -3
- package/dist/date-format-DMTwV8NC.js +1128 -0
- package/dist/{export-format-B6FUgOll.js → export-format-uGayRKWM.js} +3 -3
- package/dist/focus-trap-DvlOlOGM.js +65 -0
- package/dist/list-option-DrRyivWp.js +82 -0
- package/dist/react/chart.d.ts +99 -0
- package/dist/react/chart.js +49 -0
- package/dist/react/index.d.ts +28 -0
- package/dist/react/index.js +4 -1
- package/dist/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
- package/dist/shadow/GridMenus-B1mC1aPp.js +1077 -0
- package/dist/shadow/SvChartMenu-CBMKm7Xb.js +413 -0
- package/dist/shadow/SvDateRangeInput-BrYTQEMM.js +197 -0
- package/dist/shadow/SvDateTimePicker-CnLlqNDQ.js +766 -0
- package/dist/shadow/SvField-Bmzp3ObZ.js +147 -0
- package/dist/shadow/SvGridCellEditor-B005dmV1.js +560 -0
- package/dist/shadow/SvGridChart-4TcL9Rj2.js +3702 -0
- package/dist/shadow/SvGridChartBuilder-C4OL4XYx.js +1165 -0
- package/dist/shadow/SvGridChartPanel-CfHA8Ioq.js +1743 -0
- package/dist/shadow/SvGridChartView-Ci-9_EJ0.js +45 -0
- package/dist/shadow/SvGridDropdown-BlA6iw9m.js +257 -0
- package/dist/{cell-formatting-C0OsDmi_.js → shadow/cell-formatting-Eypm-id0.js} +1 -1
- package/dist/shadow/chart-DoqdUoGg.js +4398 -0
- package/dist/shadow/chart-export-pdf-BirUdchl.js +104 -0
- package/dist/shadow/chart-summary-BP9i-v8M.js +137 -0
- package/dist/shadow/chart-validate-CD6ptiwg.js +180 -0
- package/dist/{client-DjwUji8D.js → shadow/client-DEF0GRjE.js} +1 -1
- package/dist/{column-resize-DvCRUrN3.js → shadow/column-resize-DUPgynvc.js} +3 -3
- package/dist/shadow/date-format-DMTwV8NC.js +1128 -0
- package/dist/shadow/{export-format-C8kZGZfz.js → export-format-DhdZREP1.js} +3 -3
- package/dist/shadow/focus-trap-DvlOlOGM.js +65 -0
- package/dist/shadow/list-option-DrRyivWp.js +82 -0
- package/dist/shadow/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
- package/dist/shadow/sv-grid-shadow-element.d.ts +15 -0
- package/dist/shadow/sv-grid-shadow-element.js +4853 -3626
- package/dist/shadow/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
- package/dist/sv-grid-element.d.ts +15 -0
- package/dist/sv-grid-element.js +4809 -3612
- package/dist/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
- package/dist/vue/chart.d.ts +64 -0
- package/dist/vue/chart.js +41 -0
- package/dist/vue/index.d.ts +11 -2
- package/dist/vue/index.js +4 -1
- package/package.json +18 -5
- package/dist/GridMenus-DpmS1pzo.js +0 -1121
- package/dist/SvDateRangeInput-u4ibte8S.js +0 -196
- package/dist/SvDateTimePicker-DVFiDxUq.js +0 -765
- package/dist/SvField-ChCI-O2O.js +0 -146
- package/dist/SvGridCellEditor-DvsQyE9a.js +0 -550
- package/dist/SvGridChart-yK5Zv85y.js +0 -1199
- package/dist/SvGridChartPanel-B38_VjXM.js +0 -584
- package/dist/SvGridChartView-ScXTF6t-.js +0 -50
- package/dist/SvGridDropdown-DnAESFDu.js +0 -256
- package/dist/chart-uvs3sFJA.js +0 -1220
- package/dist/date-format-CPHqTHN6.js +0 -1127
- package/dist/shadow/GridMenus-DpmS1pzo.js +0 -1121
- package/dist/shadow/SvDateRangeInput-u4ibte8S.js +0 -196
- package/dist/shadow/SvDateTimePicker-DVFiDxUq.js +0 -765
- package/dist/shadow/SvField-ChCI-O2O.js +0 -146
- package/dist/shadow/SvGridCellEditor-DvsQyE9a.js +0 -550
- package/dist/shadow/SvGridChart-yK5Zv85y.js +0 -1199
- package/dist/shadow/SvGridChartPanel-B38_VjXM.js +0 -584
- package/dist/shadow/SvGridChartView-ScXTF6t-.js +0 -50
- package/dist/shadow/SvGridDropdown-DnAESFDu.js +0 -256
- package/dist/shadow/chart-uvs3sFJA.js +0 -1220
- package/dist/shadow/date-format-CPHqTHN6.js +0 -1127
|
@@ -1,1199 +0,0 @@
|
|
|
1
|
-
import { i as e, n as t, t as n } from "./chart-uvs3sFJA.js";
|
|
2
|
-
import { $ as r, A as i, E as a, F as o, H as s, I as c, J as l, K as u, L as d, M as f, O as p, R as m, T as h, V as g, X as _, Y as v, Z as y, a as b, et as ee, f as x, j as S, k as C, n as w, nt as T, q as E, rt as D, tt as te, v as O, w as k, y as A } from "./client-DjwUji8D.js";
|
|
3
|
-
//#region ../grid/dist/SvGridChart.svelte
|
|
4
|
-
var ne = S("<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>"), re = S("<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>"), ie = f("<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>"), ae = f("<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>"), oe = f("<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>"), se = f("<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>"), ce = f("<defs></defs>"), le = f("<line class=\"sv-grid-chart-gridline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>", 1), ue = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), de = f("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), fe = f("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), pe = f("<!><!><!><!>", 1), me = f("<line></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>", 1), he = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>"), ge = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), _e = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), ve = f("<line class=\"sv-grid-chart-gridline svelte-5rb6rd\" opacity=\"0.5\"></line>"), ye = f("<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), be = f("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), xe = f("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Se = f("<text class=\"sv-grid-chart-axis-title svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Ce = f("<!><!><!><!><!><!><!>", 1), we = f("<path class=\"sv-grid-chart-band\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), Te = f("<path class=\"sv-grid-chart-area\" fill-opacity=\"0.15\" stroke=\"none\"></path>"), Ee = f("<text class=\"sv-grid-chart-datalabel svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), De = f("<circle></circle><!>", 1), Oe = f("<g><!><!><path class=\"sv-grid-chart-linepath\" fill=\"none\" stroke-width=\"2\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), ke = f("<text> </text>"), Ae = f("<text text-anchor=\"middle\"> </text>"), je = f("<rect class=\"sv-grid-chart-bar svelte-5rb6rd\" rx=\"1\"></rect><!>", 1), Me = f("<circle class=\"sv-grid-chart-scatter svelte-5rb6rd\" fill-opacity=\"0.7\"></circle>"), Ne = f("<line class=\"sv-grid-chart-refline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-reflabel svelte-5rb6rd\" text-anchor=\"end\"> </text>", 1), Pe = f("<line class=\"sv-grid-chart-refline svelte-5rb6rd\"></line><text class=\"sv-grid-chart-reflabel svelte-5rb6rd\" text-anchor=\"start\"> </text>", 1), Fe = f("<path class=\"sv-grid-chart-overlay svelte-5rb6rd\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>"), Ie = f("<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), Le = f("<line class=\"sv-grid-chart-crosshair svelte-5rb6rd\"></line>"), Re = f("<line class=\"sv-grid-chart-crosshair svelte-5rb6rd\"></line>"), ze = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), Be = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), Ve = f("<text class=\"sv-grid-chart-heatlabel svelte-5rb6rd\" text-anchor=\"middle\"> </text>"), He = f("<rect class=\"sv-grid-chart-heatcell svelte-5rb6rd\"></rect><!>", 1), Ue = f("<stop></stop>"), We = f("<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), Ge = f("<!><!><!><!>", 1), Ke = f("<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), qe = f("<circle class=\"sv-grid-chart-radar-ring svelte-5rb6rd\"></circle>"), Je = f("<line class=\"sv-grid-chart-radar-spoke svelte-5rb6rd\"></line><text class=\"sv-grid-chart-axis svelte-5rb6rd\"> </text>", 1), Ye = f("<circle class=\"sv-grid-chart-radar-dot svelte-5rb6rd\" r=\"3\"></circle>"), Xe = f("<path class=\"sv-grid-chart-radar-poly svelte-5rb6rd\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), Ze = f("<!><!><!>", 1), Qe = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"start\"> </text>"), $e = f("<text class=\"sv-grid-chart-axis svelte-5rb6rd\" text-anchor=\"end\"> </text>"), et = f("<rect rx=\"2\"></rect>"), tt = f("<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), nt = f("<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), rt = f("<!><!><!><!>", 1), it = f("<line></line>"), at = f("<path fill=\"none\" stroke-width=\"6\" stroke-linecap=\"round\" opacity=\"0.85\"></path>"), ot = f("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), st = f("<!><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), ct = f("<text class=\"sv-grid-chart-treemap-label svelte-5rb6rd\"> </text>"), lt = f("<text class=\"sv-grid-chart-treemap-value svelte-5rb6rd\" opacity=\"0.85\"> </text>"), ut = f("<rect class=\"sv-grid-chart-treemap-cell svelte-5rb6rd\"></rect><!><!>", 1), dt = f("<path class=\"sv-grid-chart-sankey-link svelte-5rb6rd\" fill=\"none\" stroke-opacity=\"0.35\"></path>"), ft = f("<rect class=\"sv-grid-chart-sankey-node svelte-5rb6rd\"></rect><text class=\"sv-grid-chart-sankey-label svelte-5rb6rd\"> </text>", 1), pt = f("<!><!>", 1), mt = f("<text class=\"sv-grid-chart-datalabel on-bar svelte-5rb6rd\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), ht = f("<path class=\"sv-grid-chart-slice svelte-5rb6rd\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), gt = f("<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), _t = f("<rect class=\"sv-grid-chart-cat-hit svelte-5rb6rd\"></rect>"), vt = f("<rect class=\"sv-grid-chart-zoom-rect svelte-5rb6rd\"></rect>"), yt = f("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), bt = f("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), xt = f("<rect opacity=\"0.55\"></rect>"), St = f("<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>"), Ct = S("<div class=\"sv-grid-chart-empty svelte-5rb6rd\">No data</div>"), wt = S("<span class=\"sv-grid-chart-tooltip-dot svelte-5rb6rd\"></span>"), Tt = S("<span class=\"sv-grid-chart-tooltip-row-label svelte-5rb6rd\"> </span>"), Et = S("<span class=\"sv-grid-chart-tooltip-row svelte-5rb6rd\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-5rb6rd\"> </span></span>"), Dt = S("<div><span class=\"sv-grid-chart-tooltip-title svelte-5rb6rd\"> </span> <!></div>"), Ot = S("<button type=\"button\"><span class=\"sv-grid-chart-swatch svelte-5rb6rd\"></span> </button>"), kt = S("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-5rb6rd\"> </button>"), At = S("<div class=\"sv-grid-chart-legend svelte-5rb6rd\"><!> <!></div>"), jt = S("<th> </th>"), Mt = S("<td> </td>"), Nt = S("<tr></tr>"), Pt = S("<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 j(o, f) {
|
|
6
|
-
te(f, !0);
|
|
7
|
-
let S = w(f, "legend", 3, !0), j = w(f, "interactive", 3, !0), Ft = w(f, "dataLabels", 3, !1), It = w(f, "zoomable", 3, !1), Lt = w(f, "brush", 3, !1), Rt = w(f, "brushHeight", 3, 88), zt = r(() => f.toolbar ?? (It() || !!f.onDrill)), M = (t) => f.formatValue ? f.formatValue(t) : f.spec.valueFormat ? e(t, f.spec.valueFormat) : Number.isFinite(t) ? t.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(t), Bt = y(v(/* @__PURE__ */ new Set())), N = y(null), Vt = y(null), Ht = r(() => f.spec.palette ?? n), Ut = `svgc-${Math.random().toString(36).slice(2, 8)}`, P = r(() => f.spec.series.map((e, t) => ({
|
|
8
|
-
...e,
|
|
9
|
-
color: e.color ?? m(Ht)[t % m(Ht).length]
|
|
10
|
-
}))), Wt = r(() => f.spec.series.map((e, t) => e.pattern ? e.pattern : f.spec.patternFallback ? [
|
|
11
|
-
"stripe",
|
|
12
|
-
"crosshatch",
|
|
13
|
-
"dots",
|
|
14
|
-
"diagonal"
|
|
15
|
-
][t % 4] : "solid")), Gt = r(() => {
|
|
16
|
-
let e = {};
|
|
17
|
-
return m(P).forEach((t, n) => {
|
|
18
|
-
let r = m(Wt)[n];
|
|
19
|
-
e[t.label] = r === "solid" || !r ? t.color : `url(#${Ut}-pat-${n})`;
|
|
20
|
-
}), e;
|
|
21
|
-
}), Kt = r(() => m(P).map((e, t) => ({
|
|
22
|
-
id: `${Ut}-pat-${t}`,
|
|
23
|
-
color: e.color,
|
|
24
|
-
kind: m(Wt)[t] ?? "solid"
|
|
25
|
-
})).filter((e) => e.kind !== "solid")), qt = r(() => {
|
|
26
|
-
if (m(N) == null) return m(Bt);
|
|
27
|
-
let e = f.spec.type === "pie" ? f.spec.categories : f.spec.series.map((e) => e.label);
|
|
28
|
-
return new Set(e.filter((e) => e !== m(N)));
|
|
29
|
-
}), F = y(null), Jt = r(() => m(F) !== null);
|
|
30
|
-
function Yt() {
|
|
31
|
-
_(F, null);
|
|
32
|
-
}
|
|
33
|
-
let I = y(null), L = y(null), R = y(null), z = r(() => {
|
|
34
|
-
if (!m(L) || !m(R)) return null;
|
|
35
|
-
let e = Math.min(m(L).x, m(R).x), t = Math.min(m(L).y, m(R).y), n = Math.abs(m(R).x - m(L).x), r = Math.abs(m(R).y - m(L).y);
|
|
36
|
-
return n > 4 && r > 4 ? {
|
|
37
|
-
x: e,
|
|
38
|
-
y: t,
|
|
39
|
-
w: n,
|
|
40
|
-
h: r
|
|
41
|
-
} : null;
|
|
42
|
-
});
|
|
43
|
-
function Xt(e) {
|
|
44
|
-
if (!m(I)) return null;
|
|
45
|
-
let t = m(I).getBoundingClientRect();
|
|
46
|
-
return {
|
|
47
|
-
x: (e.clientX - t.left) / t.width * m(W).width,
|
|
48
|
-
y: (e.clientY - t.top) / t.height * m(W).height
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function Zt(e) {
|
|
52
|
-
let t = m(G) ? e.y - m(W).plot.y : e.x - m(W).plot.x, n = Math.floor(t / m(K));
|
|
53
|
-
return Math.max(0, Math.min(m(U).categories.length - 1, n));
|
|
54
|
-
}
|
|
55
|
-
function Qt(e) {
|
|
56
|
-
if (!It() || !m(un)) return;
|
|
57
|
-
let t = Xt(e);
|
|
58
|
-
t && (t.x < m(W).plot.x || t.x > m(W).plot.x + m(W).plot.w || t.y < m(W).plot.y || t.y > m(W).plot.y + m(W).plot.h || (_(L, t, !0), _(R, t, !0), e.target.setPointerCapture?.(e.pointerId)));
|
|
59
|
-
}
|
|
60
|
-
function $t(e) {
|
|
61
|
-
m(L) && _(R, Xt(e), !0);
|
|
62
|
-
}
|
|
63
|
-
function en() {
|
|
64
|
-
if (!m(L) || !m(R)) {
|
|
65
|
-
_(L, null), _(R, null);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
let e = m(z);
|
|
69
|
-
if (e) {
|
|
70
|
-
let t = Zt({
|
|
71
|
-
x: e.x,
|
|
72
|
-
y: e.y
|
|
73
|
-
}), n = Zt({
|
|
74
|
-
x: e.x + e.w,
|
|
75
|
-
y: e.y + e.h
|
|
76
|
-
}), r = m(F) ? m(F).i0 : 0, i = r + Math.min(t, n), a = r + Math.max(t, n);
|
|
77
|
-
a > i && _(F, {
|
|
78
|
-
i0: i,
|
|
79
|
-
i1: a
|
|
80
|
-
}, !0);
|
|
81
|
-
}
|
|
82
|
-
_(L, null), _(R, null);
|
|
83
|
-
}
|
|
84
|
-
function tn() {
|
|
85
|
-
It() && m(Jt) && Yt();
|
|
86
|
-
}
|
|
87
|
-
let nn = r(() => Lt() && f.spec.type !== "pie" && f.spec.type !== "heatmap"), rn = r(() => ({
|
|
88
|
-
...f.spec,
|
|
89
|
-
height: Rt(),
|
|
90
|
-
yAxisTitle: void 0,
|
|
91
|
-
y2AxisTitle: void 0,
|
|
92
|
-
xAxisTitle: void 0,
|
|
93
|
-
referenceLines: void 0,
|
|
94
|
-
annotations: void 0,
|
|
95
|
-
series: m(P).filter((e) => !m(qt).has(e.label))
|
|
96
|
-
})), B = r(() => m(nn) ? t(m(rn)) : null), an = r(() => {
|
|
97
|
-
let e = f.spec.categories.length;
|
|
98
|
-
return !m(F) || e === 0 ? {
|
|
99
|
-
t0: 0,
|
|
100
|
-
t1: 1
|
|
101
|
-
} : {
|
|
102
|
-
t0: m(F).i0 / e,
|
|
103
|
-
t1: (m(F).i1 + 1) / e
|
|
104
|
-
};
|
|
105
|
-
}), V = y(null);
|
|
106
|
-
function on(e, t) {
|
|
107
|
-
let n = t.getBoundingClientRect();
|
|
108
|
-
return m(B) ? (e.clientX - n.left) / n.width * m(B).width : 0;
|
|
109
|
-
}
|
|
110
|
-
function sn(e, t) {
|
|
111
|
-
if (!m(B)) return;
|
|
112
|
-
let n = e.currentTarget, r = on(e, n.ownerSVGElement ?? n);
|
|
113
|
-
_(V, {
|
|
114
|
-
mode: t,
|
|
115
|
-
startX: r,
|
|
116
|
-
startT0: m(an).t0,
|
|
117
|
-
startT1: m(an).t1
|
|
118
|
-
}, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
|
|
119
|
-
}
|
|
120
|
-
function cn(e) {
|
|
121
|
-
if (!m(V) || !m(B)) return;
|
|
122
|
-
let t = (on(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - m(V).startX) / m(B).plot.w, n = f.spec.categories.length;
|
|
123
|
-
if (n === 0) return;
|
|
124
|
-
let r = m(V).startT0, i = m(V).startT1;
|
|
125
|
-
if (m(V).mode === "move") {
|
|
126
|
-
let e = i - r;
|
|
127
|
-
r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
|
|
128
|
-
} else m(V).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 ? _(F, null) : _(F, {
|
|
131
|
-
i0: a,
|
|
132
|
-
i1: Math.max(a, o)
|
|
133
|
-
}, !0);
|
|
134
|
-
}
|
|
135
|
-
function H(e) {
|
|
136
|
-
_(V, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
137
|
-
}
|
|
138
|
-
let U = r(() => {
|
|
139
|
-
if (f.spec.type === "pie") {
|
|
140
|
-
let e = m(P)[0];
|
|
141
|
-
if (!e) return f.spec;
|
|
142
|
-
let t = e.values.map((e, t) => m(qt).has(f.spec.categories[t] ?? String(t)) ? 0 : e);
|
|
143
|
-
return {
|
|
144
|
-
...f.spec,
|
|
145
|
-
series: [{
|
|
146
|
-
...e,
|
|
147
|
-
values: t
|
|
148
|
-
}]
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
let e = m(P).filter((e) => !m(qt).has(e.label));
|
|
152
|
-
if (!m(F)) return {
|
|
153
|
-
...f.spec,
|
|
154
|
-
series: e
|
|
155
|
-
};
|
|
156
|
-
let t = Math.max(0, m(F).i0), n = Math.min(f.spec.categories.length - 1, m(F).i1), r = (e) => e.slice(t, n + 1);
|
|
157
|
-
return {
|
|
158
|
-
...f.spec,
|
|
159
|
-
categories: r(f.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
|
-
}), ln = y(!1), W = r(() => t(f.width || f.height ? {
|
|
167
|
-
...m(U),
|
|
168
|
-
width: f.width,
|
|
169
|
-
height: f.height
|
|
170
|
-
} : m(U), m(ln) ? "dark" : "light")), un = r(() => f.spec.type !== "pie" && f.spec.type !== "heatmap" && f.spec.type !== "funnel" && f.spec.type !== "radar" && f.spec.type !== "calendar" && f.spec.type !== "gauge" && f.spec.type !== "treemap" && f.spec.type !== "sankey"), dn = r(() => f.spec.type === "scatter"), fn = r(() => f.spec.type === "heatmap"), pn = r(() => f.spec.type === "funnel"), mn = r(() => f.spec.type === "radar"), hn = r(() => f.spec.type === "calendar"), gn = r(() => f.spec.type === "gauge"), _n = r(() => f.spec.type === "treemap"), vn = r(() => f.spec.type === "sankey"), G = r(() => m(W).orientation === "horizontal"), K = r(() => (m(G) ? m(W).plot.h : m(W).plot.w) / Math.max(1, m(U).categories.length)), yn = (e) => m(Vt) && m(Vt) !== e ? .18 : 1, bn = r(() => f.spec.type === "pie" ? f.spec.categories.map((e, t) => ({
|
|
171
|
-
label: e,
|
|
172
|
-
color: m(Ht)[t % m(Ht).length],
|
|
173
|
-
off: m(Bt).has(e)
|
|
174
|
-
})) : m(P).map((e) => ({
|
|
175
|
-
label: e.label,
|
|
176
|
-
color: e.color,
|
|
177
|
-
off: m(Bt).has(e.label)
|
|
178
|
-
}))), xn = y(!1), Sn = r(() => m(bn).length > 10), Cn = r(() => m(Sn) && !m(xn) ? m(bn).slice(0, 10) : m(bn)), wn = r(() => f.spec.type === "pie" ? m(W).slices.every((e) => e.value <= 0) : f.spec.type === "scatter" ? m(W).scatterPoints.length === 0 : f.spec.type === "heatmap" ? m(W).heatmapCells.length === 0 : f.spec.type === "funnel" ? m(W).funnelSegments.length === 0 : f.spec.type === "radar" ? m(W).radarSeries.length === 0 : f.spec.type === "calendar" ? m(W).calendarCells.length === 0 : f.spec.type === "gauge" ? !m(W).gauge : f.spec.type === "treemap" ? m(W).treemapCells.length === 0 : f.spec.type === "sankey" ? m(W).sankeyNodes.length === 0 : m(W).bars.length === 0 && m(W).lines.every((e) => e.points.every((e) => !e.defined)));
|
|
179
|
-
function Tn(e) {
|
|
180
|
-
if (!j()) return;
|
|
181
|
-
if (m(N) != null) {
|
|
182
|
-
_(N, null);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
let t = new Set(m(Bt));
|
|
186
|
-
t.has(e) ? t.delete(e) : t.add(e), _(Bt, t, !0);
|
|
187
|
-
}
|
|
188
|
-
function En(e) {
|
|
189
|
-
j() && _(N, m(N) === e ? null : e, !0);
|
|
190
|
-
}
|
|
191
|
-
let Dn = r(() => {
|
|
192
|
-
if (f.spec.type === "pie") {
|
|
193
|
-
let e = m(P)[0];
|
|
194
|
-
return {
|
|
195
|
-
cols: ["Category", "Value"],
|
|
196
|
-
rows: f.spec.categories.map((t, n) => [t, M(e?.values[n] ?? 0)])
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
if (m(dn)) {
|
|
200
|
-
let e = [];
|
|
201
|
-
for (let t of m(P)) for (let n of t.points ?? []) e.push([
|
|
202
|
-
t.label,
|
|
203
|
-
M(n.x),
|
|
204
|
-
M(n.y),
|
|
205
|
-
n.r == null ? "" : M(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", ...m(P).map((e) => e.label)],
|
|
219
|
-
rows: f.spec.categories.map((e, t) => [e, ...m(P).map((e) => M(e.values[t] ?? 0))])
|
|
220
|
-
};
|
|
221
|
-
});
|
|
222
|
-
function q(e, t = 12) {
|
|
223
|
-
return e.length > t ? e.slice(0, t - 1) + "…" : e;
|
|
224
|
-
}
|
|
225
|
-
let On = (e, t) => f.formatValue ? f.formatValue(e) : t, kn = y(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
|
-
s(() => {
|
|
239
|
-
if (!m(kn) || typeof window > "u") return;
|
|
240
|
-
let e = m(kn), t = () => {
|
|
241
|
-
_(ln, 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 = y(null), Y = y(null);
|
|
255
|
-
function X(e, t, n, r) {
|
|
256
|
-
if (!j() || !m(kn) || r.length === 0) return;
|
|
257
|
-
let i = m(kn).getBoundingClientRect(), a = Math.max(70, Math.min(i.width - 70, e - i.left)), o = t - i.top;
|
|
258
|
-
_(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 m(U).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: M(e.value)
|
|
275
|
-
}));
|
|
276
|
-
}
|
|
277
|
-
function Mn(e, t, n) {
|
|
278
|
-
_(Y, n, !0), X(e, t, m(U).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
|
-
_(Y, null), _(J, null);
|
|
286
|
-
}
|
|
287
|
-
function Pn(e, t, n, r, i) {
|
|
288
|
-
X(e, t, n, [{ value: `${M(r)} · ${i.toFixed(1)}%` }]);
|
|
289
|
-
}
|
|
290
|
-
function Fn(e, t, n) {
|
|
291
|
-
let r = [{
|
|
292
|
-
label: "x",
|
|
293
|
-
value: M(n.x)
|
|
294
|
-
}, {
|
|
295
|
-
label: "y",
|
|
296
|
-
value: M(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: M(n.value)
|
|
304
|
-
}]);
|
|
305
|
-
}
|
|
306
|
-
function Ln(e, t, n) {
|
|
307
|
-
let r = [{ value: M(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: M(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 m(U).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
|
-
f.onSelect?.(a), i && i.length && f.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 = m(U).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 (!f.onSelect) return;
|
|
373
|
-
e.preventDefault(), Q(m(U).categories[t] ?? "", "", 0, t);
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function Vn(e, t, n) {
|
|
378
|
-
f.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(t, t, n));
|
|
379
|
-
}
|
|
380
|
-
let Hn = y("idle");
|
|
381
|
-
function Un() {
|
|
382
|
-
if (!m(I)) return null;
|
|
383
|
-
let e = m(I).cloneNode(!0);
|
|
384
|
-
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
|
|
385
|
-
let t = m(I).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 = m(I)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? m(W).width)), i = Math.max(1, Math.round(n?.height ?? m(W).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
|
-
_(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), _(Hn, "ok");
|
|
437
|
-
} catch {
|
|
438
|
-
_(Hn, "err");
|
|
439
|
-
}
|
|
440
|
-
setTimeout(() => _(Hn, "idle"), 1500);
|
|
441
|
-
}
|
|
442
|
-
var Jn = Pt(), Yn = u(Jn), Xn = (e) => {
|
|
443
|
-
var t = re(), n = u(t), r = (e) => {
|
|
444
|
-
var t = ne();
|
|
445
|
-
c("click", t, Yt), C(e, t);
|
|
446
|
-
};
|
|
447
|
-
a(n, (e) => {
|
|
448
|
-
It() && m(Jt) && e(r);
|
|
449
|
-
});
|
|
450
|
-
var i = l(n, 2), o = l(i, 2), s = l(o, 2), d = u(s, !0);
|
|
451
|
-
D(s), D(t), g(() => p(d, m(Hn) === "ok" ? "✓ Copied" : "Copy")), c("click", i, () => Kn("png")), c("click", o, () => Kn("svg")), c("click", s, qn), C(e, t);
|
|
452
|
-
};
|
|
453
|
-
a(Yn, (e) => {
|
|
454
|
-
m(zt) && e(Xn);
|
|
455
|
-
});
|
|
456
|
-
var $ = l(Yn, 2);
|
|
457
|
-
let Zn;
|
|
458
|
-
var Qn = u($), $n = (e) => {
|
|
459
|
-
var t = ce();
|
|
460
|
-
k(t, 21, () => m(Kt), (e) => e.id, (e, t) => {
|
|
461
|
-
var n = i(), r = E(n), o = (e) => {
|
|
462
|
-
var n = ie(), r = u(n);
|
|
463
|
-
T(), D(n), g(() => {
|
|
464
|
-
x(n, "id", m(t).id), x(r, "fill", m(t).color);
|
|
465
|
-
}), C(e, n);
|
|
466
|
-
}, s = (e) => {
|
|
467
|
-
var n = ae(), r = u(n);
|
|
468
|
-
T(), D(n), g(() => {
|
|
469
|
-
x(n, "id", m(t).id), x(r, "fill", m(t).color);
|
|
470
|
-
}), C(e, n);
|
|
471
|
-
}, c = (e) => {
|
|
472
|
-
var n = oe(), r = u(n);
|
|
473
|
-
T(), D(n), g(() => {
|
|
474
|
-
x(n, "id", m(t).id), x(r, "fill", m(t).color);
|
|
475
|
-
}), C(e, n);
|
|
476
|
-
}, l = (e) => {
|
|
477
|
-
var n = se(), r = u(n);
|
|
478
|
-
T(), D(n), g(() => {
|
|
479
|
-
x(n, "id", m(t).id), x(r, "fill", m(t).color);
|
|
480
|
-
}), C(e, n);
|
|
481
|
-
};
|
|
482
|
-
a(r, (e) => {
|
|
483
|
-
m(t).kind === "stripe" ? e(o) : m(t).kind === "crosshatch" ? e(s, 1) : m(t).kind === "dots" ? e(c, 2) : m(t).kind === "diagonal" && e(l, 3);
|
|
484
|
-
}), C(e, n);
|
|
485
|
-
}), D(t), C(e, t);
|
|
486
|
-
};
|
|
487
|
-
a(Qn, (e) => {
|
|
488
|
-
m(Kt).length && e($n);
|
|
489
|
-
});
|
|
490
|
-
var er = l(Qn), tr = (e) => {
|
|
491
|
-
var t = pe(), n = E(t);
|
|
492
|
-
k(n, 17, () => m(W).valueTicks, (e) => e.label + e.x, (e, t) => {
|
|
493
|
-
var n = le(), r = E(n), i = l(r), a = u(i, !0);
|
|
494
|
-
D(i), g(() => {
|
|
495
|
-
x(r, "x1", m(t).x), x(r, "y1", m(W).plot.y), x(r, "x2", m(t).x), x(r, "y2", m(W).plot.y + m(W).plot.h), x(i, "x", m(t).x), x(i, "y", m(W).plot.y + m(W).plot.h + 14), p(a, m(t).label);
|
|
496
|
-
}), C(e, n);
|
|
497
|
-
});
|
|
498
|
-
var r = l(n);
|
|
499
|
-
k(r, 17, () => m(W).catTicks, (e) => e.value, (e, t) => {
|
|
500
|
-
var n = ue(), r = u(n, !0);
|
|
501
|
-
D(n), g((e) => {
|
|
502
|
-
x(n, "x", m(W).plot.x - 6), x(n, "y", m(t).y + 3), p(r, e);
|
|
503
|
-
}, [() => q(m(t).label, 18)]), C(e, n);
|
|
504
|
-
});
|
|
505
|
-
var i = l(r), o = (e) => {
|
|
506
|
-
var t = de();
|
|
507
|
-
x(t, "x", 13);
|
|
508
|
-
var n = u(t, !0);
|
|
509
|
-
D(t), g(() => {
|
|
510
|
-
x(t, "y", m(W).plot.y + m(W).plot.h / 2), x(t, "transform", `rotate(-90 13 ${m(W).plot.y + m(W).plot.h / 2})`), p(n, f.spec.yAxisTitle);
|
|
511
|
-
}), C(e, t);
|
|
512
|
-
};
|
|
513
|
-
a(i, (e) => {
|
|
514
|
-
f.spec.yAxisTitle && e(o);
|
|
515
|
-
});
|
|
516
|
-
var s = l(i), c = (e) => {
|
|
517
|
-
var t = fe(), n = u(t, !0);
|
|
518
|
-
D(t), g(() => {
|
|
519
|
-
x(t, "x", m(W).plot.x + m(W).plot.w / 2), x(t, "y", m(W).height - 3), p(n, f.spec.xAxisTitle);
|
|
520
|
-
}), C(e, t);
|
|
521
|
-
};
|
|
522
|
-
a(s, (e) => {
|
|
523
|
-
f.spec.xAxisTitle && e(c);
|
|
524
|
-
}), C(e, t);
|
|
525
|
-
}, nr = (e) => {
|
|
526
|
-
var t = Ce(), n = E(t);
|
|
527
|
-
k(n, 17, () => m(W).yTicks, (e) => e.value, (e, t) => {
|
|
528
|
-
var n = me(), r = E(n);
|
|
529
|
-
let i;
|
|
530
|
-
var a = l(r), o = u(a, !0);
|
|
531
|
-
D(a), g((e) => {
|
|
532
|
-
i = A(r, 0, "sv-grid-chart-gridline svelte-5rb6rd", null, i, { "is-zero": m(t).value === 0 }), x(r, "x1", m(W).plot.x), x(r, "y1", m(t).y), x(r, "x2", m(W).plot.x + m(W).plot.w), x(r, "y2", m(t).y), x(a, "x", m(W).plot.x - 6), x(a, "y", m(t).y + 3), p(o, e);
|
|
533
|
-
}, [() => On(m(t).value, m(t).label)]), C(e, n);
|
|
534
|
-
});
|
|
535
|
-
var o = l(n), s = (e) => {
|
|
536
|
-
var t = i(), n = E(t);
|
|
537
|
-
k(n, 17, () => m(W).y2Ticks, (e) => e.value, (e, t) => {
|
|
538
|
-
var n = he(), r = u(n, !0);
|
|
539
|
-
D(n), g((e) => {
|
|
540
|
-
x(n, "x", m(W).plot.x + m(W).plot.w + 6), x(n, "y", m(t).y + 3), p(r, e);
|
|
541
|
-
}, [() => On(m(t).value, m(t).label)]), C(e, n);
|
|
542
|
-
}), C(e, t);
|
|
543
|
-
};
|
|
544
|
-
a(o, (e) => {
|
|
545
|
-
m(W).hasRightAxis && e(s);
|
|
546
|
-
});
|
|
547
|
-
var c = l(o);
|
|
548
|
-
k(c, 17, () => m(W).xTicks, (e) => e.label + e.x, (e, t) => {
|
|
549
|
-
var n = i(), r = E(n), o = (e) => {
|
|
550
|
-
var n = ge(), r = u(n, !0);
|
|
551
|
-
D(n), g((e) => {
|
|
552
|
-
x(n, "x", m(t).x), x(n, "y", m(W).plot.y + m(W).plot.h + 12), x(n, "transform", `rotate(-40 ${m(t).x} ${m(W).plot.y + m(W).plot.h + 12})`), p(r, e);
|
|
553
|
-
}, [() => q(m(t).label)]), C(e, n);
|
|
554
|
-
}, s = (e) => {
|
|
555
|
-
var n = _e(), r = u(n, !0);
|
|
556
|
-
D(n), g((e) => {
|
|
557
|
-
x(n, "x", m(t).x), x(n, "y", m(W).plot.y + m(W).plot.h + 16), p(r, e);
|
|
558
|
-
}, [() => q(m(t).label, 16)]), C(e, n);
|
|
559
|
-
};
|
|
560
|
-
a(r, (e) => {
|
|
561
|
-
m(W).xLabelRotated ? e(o) : e(s, -1);
|
|
562
|
-
}), C(e, n);
|
|
563
|
-
});
|
|
564
|
-
var d = l(c);
|
|
565
|
-
k(d, 17, () => m(W).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
|
|
566
|
-
let n = r(() => m(W).plot.y + m(W).plot.h + (m(W).xLabelRotated ? 46 : 32));
|
|
567
|
-
var i = ye(), o = E(i), s = l(o), c = (e) => {
|
|
568
|
-
var r = ve();
|
|
569
|
-
g(() => {
|
|
570
|
-
x(r, "x1", m(t).x0), x(r, "y1", m(W).plot.y + m(W).plot.h), x(r, "x2", m(t).x0), x(r, "y2", m(n) - 9);
|
|
571
|
-
}), C(e, r);
|
|
572
|
-
};
|
|
573
|
-
a(s, (e) => {
|
|
574
|
-
m(t).x0 > m(W).plot.x + 1 && e(c);
|
|
575
|
-
});
|
|
576
|
-
var d = l(s), f = u(d, !0);
|
|
577
|
-
D(d), g((e) => {
|
|
578
|
-
x(o, "x1", m(t).x0 + 3), x(o, "y1", m(n) - 9), x(o, "x2", m(t).x1 - 3), x(o, "y2", m(n) - 9), x(d, "x", m(t).xCenter), x(d, "y", m(n)), p(f, e);
|
|
579
|
-
}, [() => q(m(t).label, Math.max(4, Math.floor((m(t).x1 - m(t).x0) / 7)))]), C(e, i);
|
|
580
|
-
});
|
|
581
|
-
var h = l(d), _ = (e) => {
|
|
582
|
-
var t = be();
|
|
583
|
-
x(t, "x", 13);
|
|
584
|
-
var n = u(t, !0);
|
|
585
|
-
D(t), g(() => {
|
|
586
|
-
x(t, "y", m(W).plot.y + m(W).plot.h / 2), x(t, "transform", `rotate(-90 13 ${m(W).plot.y + m(W).plot.h / 2})`), p(n, f.spec.yAxisTitle);
|
|
587
|
-
}), C(e, t);
|
|
588
|
-
};
|
|
589
|
-
a(h, (e) => {
|
|
590
|
-
f.spec.yAxisTitle && e(_);
|
|
591
|
-
});
|
|
592
|
-
var v = l(h), y = (e) => {
|
|
593
|
-
var t = xe(), n = u(t, !0);
|
|
594
|
-
D(t), g(() => {
|
|
595
|
-
x(t, "x", m(W).width - 5), x(t, "y", m(W).plot.y + m(W).plot.h / 2), x(t, "transform", `rotate(90 ${m(W).width - 5} ${m(W).plot.y + m(W).plot.h / 2})`), p(n, f.spec.y2AxisTitle);
|
|
596
|
-
}), C(e, t);
|
|
597
|
-
};
|
|
598
|
-
a(v, (e) => {
|
|
599
|
-
f.spec.y2AxisTitle && e(y);
|
|
600
|
-
});
|
|
601
|
-
var b = l(v), ee = (e) => {
|
|
602
|
-
var t = Se(), n = u(t, !0);
|
|
603
|
-
D(t), g(() => {
|
|
604
|
-
x(t, "x", m(W).plot.x + m(W).plot.w / 2), x(t, "y", m(W).height - 3), p(n, f.spec.xAxisTitle);
|
|
605
|
-
}), C(e, t);
|
|
606
|
-
};
|
|
607
|
-
a(b, (e) => {
|
|
608
|
-
f.spec.xAxisTitle && e(ee);
|
|
609
|
-
}), C(e, t);
|
|
610
|
-
};
|
|
611
|
-
a(er, (e) => {
|
|
612
|
-
m(G) ? e(tr) : m(un) && e(nr, 1);
|
|
613
|
-
});
|
|
614
|
-
var rr = l(er);
|
|
615
|
-
k(rr, 19, () => m(W).lines, (e, t) => e.label + t, (e, t) => {
|
|
616
|
-
var n = Oe(), r = u(n), o = (e) => {
|
|
617
|
-
var n = we();
|
|
618
|
-
g(() => {
|
|
619
|
-
x(n, "d", m(t).bandPath), x(n, "fill", m(t).color);
|
|
620
|
-
}), C(e, n);
|
|
621
|
-
};
|
|
622
|
-
a(r, (e) => {
|
|
623
|
-
m(t).bandPath && e(o);
|
|
624
|
-
});
|
|
625
|
-
var s = l(r), c = (e) => {
|
|
626
|
-
var n = Te();
|
|
627
|
-
g(() => {
|
|
628
|
-
x(n, "d", m(t).areaPath), x(n, "fill", m(Gt)[m(t).label] ?? m(t).color);
|
|
629
|
-
}), C(e, n);
|
|
630
|
-
};
|
|
631
|
-
a(s, (e) => {
|
|
632
|
-
m(t).areaPath && e(c);
|
|
633
|
-
});
|
|
634
|
-
var d = l(s), f = l(d);
|
|
635
|
-
k(f, 17, () => m(t).points, h, (e, n, r) => {
|
|
636
|
-
var o = i(), s = E(o), c = (e) => {
|
|
637
|
-
var i = De(), o = E(i);
|
|
638
|
-
let s;
|
|
639
|
-
var c = l(o), d = (e) => {
|
|
640
|
-
var t = Ee(), r = u(t, !0);
|
|
641
|
-
D(t), g((e) => {
|
|
642
|
-
x(t, "x", m(n).x), x(t, "y", m(n).y - 7), p(r, e);
|
|
643
|
-
}, [() => M(m(n).value)]), C(e, t);
|
|
644
|
-
};
|
|
645
|
-
a(c, (e) => {
|
|
646
|
-
Ft() && e(d);
|
|
647
|
-
}), g(() => {
|
|
648
|
-
s = A(o, 0, "sv-grid-chart-dot svelte-5rb6rd", null, s, { "is-active": m(Y) === r }), x(o, "cx", m(n).x), x(o, "cy", m(n).y), x(o, "r", m(Y) === r ? 4 : 3), x(o, "fill", m(t).color);
|
|
649
|
-
}), C(e, i);
|
|
650
|
-
};
|
|
651
|
-
a(s, (e) => {
|
|
652
|
-
m(n).defined && e(c);
|
|
653
|
-
}), C(e, o);
|
|
654
|
-
}), D(n), g((e) => {
|
|
655
|
-
O(n, e), x(d, "d", m(t).path), x(d, "stroke", m(t).color);
|
|
656
|
-
}, [() => `opacity:${yn(m(t).label)}`]), C(e, n);
|
|
657
|
-
});
|
|
658
|
-
var ir = l(rr);
|
|
659
|
-
k(ir, 17, () => m(W).bars, h, (e, t) => {
|
|
660
|
-
var n = je(), r = E(n), i = l(r), o = (e) => {
|
|
661
|
-
var n = ke();
|
|
662
|
-
let r;
|
|
663
|
-
var i = u(n, !0);
|
|
664
|
-
D(n), g((e) => {
|
|
665
|
-
r = A(n, 0, "sv-grid-chart-datalabel svelte-5rb6rd", null, r, { "on-bar": f.spec.stacked || f.spec.stacked100 }), x(n, "x", f.spec.stacked || f.spec.stacked100 ? m(t).x + m(t).w / 2 : m(t).value >= 0 ? m(t).x + m(t).w + 3 : m(t).x - 3), x(n, "y", m(t).y + m(t).h / 2 + 3), x(n, "text-anchor", f.spec.stacked || f.spec.stacked100 ? "middle" : m(t).value >= 0 ? "start" : "end"), p(i, e);
|
|
666
|
-
}, [() => M(m(t).value)]), C(e, n);
|
|
667
|
-
}, s = (e) => {
|
|
668
|
-
var n = Ae();
|
|
669
|
-
let r;
|
|
670
|
-
var i = u(n, !0);
|
|
671
|
-
D(n), g((e) => {
|
|
672
|
-
r = A(n, 0, "sv-grid-chart-datalabel svelte-5rb6rd", null, r, { "on-bar": f.spec.stacked || f.spec.stacked100 }), x(n, "x", m(t).x + m(t).w / 2), x(n, "y", f.spec.stacked || f.spec.stacked100 ? m(t).y + m(t).h / 2 + 3 : m(t).value >= 0 ? m(t).y - 3 : m(t).y + m(t).h + 11), p(i, e);
|
|
673
|
-
}, [() => M(m(t).value)]), C(e, n);
|
|
674
|
-
};
|
|
675
|
-
a(i, (e) => {
|
|
676
|
-
Ft() && m(G) && m(t).w > 18 ? e(o) : Ft() && !m(G) && m(t).h > 13 && e(s, 1);
|
|
677
|
-
}), g((e) => {
|
|
678
|
-
x(r, "x", m(t).x), x(r, "y", m(t).y), x(r, "width", m(t).w), x(r, "height", m(t).h), x(r, "fill", m(Gt)[m(t).series] ?? m(t).color), O(r, e);
|
|
679
|
-
}, [() => `opacity:${yn(m(t).series)}`]), C(e, n);
|
|
680
|
-
});
|
|
681
|
-
var ar = l(ir);
|
|
682
|
-
k(ar, 17, () => m(W).scatterPoints, h, (e, t) => {
|
|
683
|
-
var n = Me();
|
|
684
|
-
g((e) => {
|
|
685
|
-
x(n, "cx", m(t).cx), x(n, "cy", m(t).cy), x(n, "r", m(t).r), x(n, "fill", m(t).color), x(n, "stroke", m(t).color), O(n, e);
|
|
686
|
-
}, [() => `opacity:${yn(m(t).series)}`]), c("mousemove", n, (e) => Fn(e.clientX, e.clientY, m(t))), d("mouseleave", n, Z), C(e, n);
|
|
687
|
-
});
|
|
688
|
-
var or = l(ar);
|
|
689
|
-
k(or, 17, () => m(W).referenceLines, h, (e, t) => {
|
|
690
|
-
var n = Ne(), r = E(n), i = l(r), a = u(i, !0);
|
|
691
|
-
D(i), g(() => {
|
|
692
|
-
x(r, "x1", m(W).plot.x), x(r, "y1", m(t).y), x(r, "x2", m(W).plot.x + m(W).plot.w), x(r, "y2", m(t).y), x(r, "stroke", m(t).color), x(r, "stroke-dasharray", m(t).dashed ? "5 4" : void 0), x(i, "x", m(W).plot.x + m(W).plot.w - 3), x(i, "y", m(t).y - 3), x(i, "fill", m(t).color), p(a, m(t).label);
|
|
693
|
-
}), C(e, n);
|
|
694
|
-
});
|
|
695
|
-
var sr = l(or);
|
|
696
|
-
k(sr, 17, () => m(W).referenceLinesV, h, (e, t) => {
|
|
697
|
-
var n = Pe(), r = E(n), i = l(r), a = u(i, !0);
|
|
698
|
-
D(i), g(() => {
|
|
699
|
-
x(r, "x1", m(t).x), x(r, "y1", m(W).plot.y), x(r, "x2", m(t).x), x(r, "y2", m(W).plot.y + m(W).plot.h), x(r, "stroke", m(t).color), x(r, "stroke-dasharray", m(t).dashed ? "5 4" : void 0), x(i, "x", m(t).x + 3), x(i, "y", m(W).plot.y + 9), x(i, "fill", m(t).color), p(a, m(t).label);
|
|
700
|
-
}), C(e, n);
|
|
701
|
-
});
|
|
702
|
-
var cr = l(sr);
|
|
703
|
-
k(cr, 19, () => m(W).overlays, (e, t) => e.label + t, (e, t) => {
|
|
704
|
-
var n = Fe();
|
|
705
|
-
g(() => {
|
|
706
|
-
x(n, "d", m(t).path), x(n, "stroke", m(t).color);
|
|
707
|
-
}), C(e, n);
|
|
708
|
-
});
|
|
709
|
-
var lr = l(cr);
|
|
710
|
-
k(lr, 19, () => m(W).annotations, (e, t) => e.label + t, (e, t) => {
|
|
711
|
-
let n = r(() => m(t).placement === "left" ? -8 : m(t).placement === "right" ? 8 : 0), i = r(() => m(t).placement === "bottom" ? 14 : m(t).placement === "top" ? -8 : 0), a = r(() => m(t).placement === "left" ? "end" : m(t).placement === "right" ? "start" : "middle");
|
|
712
|
-
var o = Ie(), s = E(o), c = l(s), d = u(c, !0);
|
|
713
|
-
D(c), g(() => {
|
|
714
|
-
x(s, "cx", m(t).x), x(s, "cy", m(t).y), x(s, "fill", m(t).color), x(c, "x", m(t).x + m(n)), x(c, "y", m(t).y + m(i)), x(c, "text-anchor", m(a)), x(c, "fill", m(t).color), p(d, m(t).label);
|
|
715
|
-
}), C(e, o);
|
|
716
|
-
});
|
|
717
|
-
var ur = l(lr), dr = (e) => {
|
|
718
|
-
var t = i(), n = E(t), o = (e) => {
|
|
719
|
-
let t = r(() => m(W).plot.y + m(K) * m(Y) + m(K) / 2);
|
|
720
|
-
var n = Le();
|
|
721
|
-
g(() => {
|
|
722
|
-
x(n, "x1", m(W).plot.x), x(n, "y1", m(t)), x(n, "x2", m(W).plot.x + m(W).plot.w), x(n, "y2", m(t));
|
|
723
|
-
}), C(e, n);
|
|
724
|
-
}, s = (e) => {
|
|
725
|
-
let t = r(() => m(W).lines[0]?.points[m(Y)]), n = r(() => m(t) && Number.isFinite(m(t).x) ? m(t).x : m(W).plot.x + m(K) * m(Y) + m(K) / 2);
|
|
726
|
-
var i = Re();
|
|
727
|
-
g(() => {
|
|
728
|
-
x(i, "x1", m(n)), x(i, "y1", m(W).plot.y), x(i, "x2", m(n)), x(i, "y2", m(W).plot.y + m(W).plot.h);
|
|
729
|
-
}), C(e, i);
|
|
730
|
-
};
|
|
731
|
-
a(n, (e) => {
|
|
732
|
-
m(G) ? e(o) : e(s, -1);
|
|
733
|
-
}), C(e, t);
|
|
734
|
-
};
|
|
735
|
-
a(ur, (e) => {
|
|
736
|
-
m(un) && m(Y) !== null && e(dr);
|
|
737
|
-
});
|
|
738
|
-
var fr = l(ur), pr = (e) => {
|
|
739
|
-
var t = Ge(), n = E(t);
|
|
740
|
-
k(n, 17, () => m(W).heatmapRowTicks, (e) => e.value, (e, t) => {
|
|
741
|
-
var n = ze(), r = u(n, !0);
|
|
742
|
-
D(n), g((e) => {
|
|
743
|
-
x(n, "x", m(W).plot.x - 8), x(n, "y", m(t).y + 3), p(r, e);
|
|
744
|
-
}, [() => q(m(t).label, 22)]), C(e, n);
|
|
745
|
-
});
|
|
746
|
-
var i = l(n);
|
|
747
|
-
k(i, 19, () => m(W).heatmapColTicks, (e, t) => e.label + t, (e, t) => {
|
|
748
|
-
var n = Be(), r = u(n, !0);
|
|
749
|
-
D(n), g((e) => {
|
|
750
|
-
x(n, "x", m(t).x), x(n, "y", m(W).plot.y + m(W).plot.h + 14), p(r, e);
|
|
751
|
-
}, [() => q(m(t).label, 14)]), C(e, n);
|
|
752
|
-
});
|
|
753
|
-
var o = l(i);
|
|
754
|
-
k(o, 17, () => m(W).heatmapCells, h, (e, t) => {
|
|
755
|
-
var n = He(), r = E(n), i = l(r), o = (e) => {
|
|
756
|
-
var n = Ve(), r = u(n, !0);
|
|
757
|
-
D(n), g((e) => {
|
|
758
|
-
x(n, "x", m(t).x + m(t).w / 2), x(n, "y", m(t).y + m(t).h / 2 + 3), x(n, "fill", m(t).textColor), p(r, e);
|
|
759
|
-
}, [() => M(m(t).value)]), C(e, n);
|
|
760
|
-
};
|
|
761
|
-
a(i, (e) => {
|
|
762
|
-
Ft() && m(t).w > 22 && m(t).h > 14 && e(o);
|
|
763
|
-
}), g((e) => {
|
|
764
|
-
x(r, "x", m(t).x), x(r, "y", m(t).y), x(r, "width", m(t).w), x(r, "height", m(t).h), x(r, "fill", m(t).color), x(r, "role", f.onSelect ? "button" : "presentation"), x(r, "tabindex", f.onSelect ? 0 : void 0), x(r, "aria-label", e);
|
|
765
|
-
}, [() => `${m(t).rowLabel} ${m(t).colLabel}: ${M(m(t).value)}`]), c("mousemove", r, (e) => In(e.clientX, e.clientY, m(t))), d("mouseleave", r, Z), c("click", r, () => Q(m(t).colLabel, m(t).rowLabel, m(t).value)), c("keydown", r, (e) => {
|
|
766
|
-
f.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(m(t).colLabel, m(t).rowLabel, m(t).value));
|
|
767
|
-
}), C(e, n);
|
|
768
|
-
});
|
|
769
|
-
var s = l(o), _ = (e) => {
|
|
770
|
-
let t = r(() => m(W).plot.x + m(W).plot.w + 14), n = r(() => m(W).plot.h - 20), i = r(() => m(W).heatmapLegend);
|
|
771
|
-
var a = We(), o = E(a), s = u(o);
|
|
772
|
-
k(s, 21, () => m(i), h, (e, t, n) => {
|
|
773
|
-
var r = Ue();
|
|
774
|
-
g(() => {
|
|
775
|
-
x(r, "offset", `${n / (m(i).length - 1) * 100}%`), x(r, "stop-color", m(t).color);
|
|
776
|
-
}), C(e, r);
|
|
777
|
-
}), D(s), D(o);
|
|
778
|
-
var c = l(o), d = l(c), f = u(d, !0);
|
|
779
|
-
D(d);
|
|
780
|
-
var _ = l(d), v = u(_, !0);
|
|
781
|
-
D(_), g(() => {
|
|
782
|
-
x(s, "id", `${Ut}-heatscale`), x(c, "x", m(t)), x(c, "y", m(W).plot.y + 10), x(c, "height", m(n)), x(c, "fill", `url(#${Ut}-heatscale)`), x(d, "x", m(t) + 14), x(d, "y", m(W).plot.y + 14), p(f, m(i)[m(i).length - 1].label), x(_, "x", m(t) + 14), x(_, "y", m(W).plot.y + 10 + m(n)), p(v, m(i)[0].label);
|
|
783
|
-
}), C(e, a);
|
|
784
|
-
};
|
|
785
|
-
a(s, (e) => {
|
|
786
|
-
m(W).heatmapLegend.length && e(_);
|
|
787
|
-
}), C(e, t);
|
|
788
|
-
};
|
|
789
|
-
a(fr, (e) => {
|
|
790
|
-
m(fn) && e(pr);
|
|
791
|
-
});
|
|
792
|
-
var mr = l(fr), hr = (e) => {
|
|
793
|
-
var t = i(), n = E(t);
|
|
794
|
-
k(n, 17, () => m(W).funnelSegments, h, (e, t, n) => {
|
|
795
|
-
var r = Ke(), i = E(r), a = l(i), o = u(a, !0);
|
|
796
|
-
D(a);
|
|
797
|
-
var s = l(a), h = u(s);
|
|
798
|
-
D(s), g((e, n, r, c) => {
|
|
799
|
-
x(i, "d", m(t).path), x(i, "fill", m(t).color), x(i, "role", f.onSelect ? "button" : "presentation"), x(i, "tabindex", f.onSelect ? 0 : void 0), x(i, "aria-label", e), x(a, "x", m(t).cx), x(a, "y", m(t).cy - 3), x(a, "fill", m(t).textColor), p(o, n), x(s, "x", m(t).cx), x(s, "y", m(t).cy + 11), x(s, "fill", m(t).textColor), p(h, `${r ?? ""} · ${c ?? ""}%`);
|
|
800
|
-
}, [
|
|
801
|
-
() => `${m(t).label}: ${M(m(t).value)}`,
|
|
802
|
-
() => q(m(t).label, 24),
|
|
803
|
-
() => M(m(t).value),
|
|
804
|
-
() => (m(t).conversion * 100).toFixed(0)
|
|
805
|
-
]), c("mousemove", i, (e) => Ln(e.clientX, e.clientY, m(t))), d("mouseleave", i, Z), c("click", i, () => Q(m(t).label, m(t).label, m(t).value, n)), c("keydown", i, (e) => {
|
|
806
|
-
f.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(m(t).label, m(t).label, m(t).value, n));
|
|
807
|
-
}), C(e, r);
|
|
808
|
-
}), C(e, t);
|
|
809
|
-
};
|
|
810
|
-
a(mr, (e) => {
|
|
811
|
-
m(pn) && e(hr);
|
|
812
|
-
});
|
|
813
|
-
var gr = l(mr), _r = (e) => {
|
|
814
|
-
let t = r(() => m(W).radarCenter);
|
|
815
|
-
var n = Ze(), i = E(n);
|
|
816
|
-
k(i, 17, () => m(W).radarRings, h, (e, n, i) => {
|
|
817
|
-
let a = r(() => m(t).r * ((i + 1) / m(W).radarRings.length));
|
|
818
|
-
var o = qe();
|
|
819
|
-
g(() => {
|
|
820
|
-
x(o, "cx", m(t).cx), x(o, "cy", m(t).cy), x(o, "r", m(a));
|
|
821
|
-
}), C(e, o);
|
|
822
|
-
});
|
|
823
|
-
var a = l(i);
|
|
824
|
-
k(a, 17, () => m(W).radarAxes, h, (e, n) => {
|
|
825
|
-
let i = r(() => m(n).x - m(t).cx), a = r(() => m(n).y - m(t).cy), o = r(() => m(t).cx + m(i) * 1.08), s = r(() => m(t).cy + m(a) * 1.08);
|
|
826
|
-
var c = Je(), d = E(c), f = l(d), h = u(f, !0);
|
|
827
|
-
D(f), g((e) => {
|
|
828
|
-
x(d, "x1", m(t).cx), x(d, "y1", m(t).cy), x(d, "x2", m(n).x), x(d, "y2", m(n).y), x(f, "x", m(o)), x(f, "y", m(s) + 3), x(f, "text-anchor", e), p(h, m(n).label);
|
|
829
|
-
}, [() => Math.abs(m(i)) < 1 ? "middle" : m(i) > 0 ? "start" : "end"]), C(e, c);
|
|
830
|
-
});
|
|
831
|
-
var o = l(a);
|
|
832
|
-
k(o, 17, () => m(W).radarSeries, h, (e, t) => {
|
|
833
|
-
var n = Xe(), r = E(n), i = l(r);
|
|
834
|
-
k(i, 17, () => m(t).points, h, (e, n) => {
|
|
835
|
-
var r = Ye();
|
|
836
|
-
g(() => {
|
|
837
|
-
x(r, "cx", m(n).x), x(r, "cy", m(n).y), x(r, "fill", m(t).color);
|
|
838
|
-
}), c("mousemove", r, (e) => Rn(e.clientX, e.clientY, m(t).label, m(n).axis, m(n).value, m(t).color)), d("mouseleave", r, Z), C(e, r);
|
|
839
|
-
}), g((e) => {
|
|
840
|
-
x(r, "d", m(t).path), x(r, "fill", m(t).color), x(r, "stroke", m(t).color), O(r, e);
|
|
841
|
-
}, [() => `opacity:${yn(m(t).label)}`]), C(e, n);
|
|
842
|
-
}), C(e, n);
|
|
843
|
-
};
|
|
844
|
-
a(gr, (e) => {
|
|
845
|
-
m(mn) && m(W).radarCenter && e(_r);
|
|
846
|
-
});
|
|
847
|
-
var vr = l(gr), yr = (e) => {
|
|
848
|
-
var t = rt(), n = E(t);
|
|
849
|
-
k(n, 17, () => m(W).calendarMonthTicks, h, (e, t) => {
|
|
850
|
-
var n = Qe(), r = u(n, !0);
|
|
851
|
-
D(n), g(() => {
|
|
852
|
-
x(n, "x", m(t).x), x(n, "y", m(W).plot.y - 8), p(r, m(t).label);
|
|
853
|
-
}), C(e, n);
|
|
854
|
-
});
|
|
855
|
-
var o = l(n);
|
|
856
|
-
k(o, 16, () => [
|
|
857
|
-
"Mon",
|
|
858
|
-
"Wed",
|
|
859
|
-
"Fri"
|
|
860
|
-
], h, (e, t, n) => {
|
|
861
|
-
let o = r(() => [
|
|
862
|
-
1,
|
|
863
|
-
3,
|
|
864
|
-
5
|
|
865
|
-
][n]), s = r(() => m(W).calendarCells[m(o)]);
|
|
866
|
-
var c = i(), l = E(c), d = (e) => {
|
|
867
|
-
var n = $e(), r = u(n, !0);
|
|
868
|
-
D(n), g(() => {
|
|
869
|
-
x(n, "x", m(W).plot.x - 6), x(n, "y", m(s).y + m(s).size / 2 + 3), p(r, t);
|
|
870
|
-
}), C(e, n);
|
|
871
|
-
};
|
|
872
|
-
a(l, (e) => {
|
|
873
|
-
m(s) && e(d);
|
|
874
|
-
}), C(e, c);
|
|
875
|
-
});
|
|
876
|
-
var s = l(o);
|
|
877
|
-
k(s, 17, () => m(W).calendarCells, h, (e, t) => {
|
|
878
|
-
var n = et();
|
|
879
|
-
let r;
|
|
880
|
-
g((e) => {
|
|
881
|
-
r = A(n, 0, "sv-grid-chart-calendar-cell svelte-5rb6rd", null, r, { "is-blank": !m(t).defined }), x(n, "x", m(t).x + 1), x(n, "y", m(t).y + 1), x(n, "width", m(t).size - 2), x(n, "height", m(t).size - 2), x(n, "fill", m(t).defined ? m(t).color : "transparent"), x(n, "aria-label", e);
|
|
882
|
-
}, [() => `${m(t).date}: ${m(t).defined ? M(m(t).value) : "no data"}`]), c("mousemove", n, (e) => m(t).defined && X(e.clientX, e.clientY, m(t).date, [{
|
|
883
|
-
color: m(t).color,
|
|
884
|
-
value: M(m(t).value)
|
|
885
|
-
}])), d("mouseleave", n, Z), C(e, n);
|
|
886
|
-
});
|
|
887
|
-
var f = l(s), _ = (e) => {
|
|
888
|
-
let t = r(() => m(W).plot.x + m(W).plot.w + 12), n = r(() => m(W).plot.y + 4);
|
|
889
|
-
var i = nt(), a = E(i), o = l(a);
|
|
890
|
-
k(o, 17, () => m(W).calendarLegend, h, (e, r, i) => {
|
|
891
|
-
var a = tt(), o = E(a), s = l(o), c = u(s, !0);
|
|
892
|
-
D(s), g(() => {
|
|
893
|
-
x(o, "x", m(t)), x(o, "y", m(n) + 6 + i * 13), x(o, "fill", m(r).color), x(s, "x", m(t) + 14), x(s, "y", m(n) + 14 + i * 13), p(c, m(r).label);
|
|
894
|
-
}), C(e, a);
|
|
895
|
-
});
|
|
896
|
-
var s = l(o);
|
|
897
|
-
g(() => {
|
|
898
|
-
x(a, "x", m(t)), x(a, "y", m(n)), x(s, "x", m(t)), x(s, "y", m(n) + 12 + m(W).calendarLegend.length * 13);
|
|
899
|
-
}), C(e, i);
|
|
900
|
-
};
|
|
901
|
-
a(f, (e) => {
|
|
902
|
-
m(W).calendarLegend.length && e(_);
|
|
903
|
-
}), C(e, t);
|
|
904
|
-
};
|
|
905
|
-
a(vr, (e) => {
|
|
906
|
-
m(hn) && e(yr);
|
|
907
|
-
});
|
|
908
|
-
var br = l(vr), xr = (e) => {
|
|
909
|
-
let t = r(() => m(W).gauge);
|
|
910
|
-
var n = st(), i = E(n);
|
|
911
|
-
k(i, 17, () => m(t).ticks, h, (e, t) => {
|
|
912
|
-
var n = it();
|
|
913
|
-
let r;
|
|
914
|
-
g(() => {
|
|
915
|
-
r = A(n, 0, "sv-grid-chart-gauge-tick svelte-5rb6rd", null, r, { "is-major": m(t).major }), x(n, "x1", m(t).x1), x(n, "y1", m(t).y1), x(n, "x2", m(t).x2), x(n, "y2", m(t).y2);
|
|
916
|
-
}), C(e, n);
|
|
917
|
-
});
|
|
918
|
-
var o = l(i), s = l(o);
|
|
919
|
-
k(s, 17, () => m(t).rangePaths, h, (e, t) => {
|
|
920
|
-
var n = at();
|
|
921
|
-
g(() => {
|
|
922
|
-
x(n, "d", m(t).path), x(n, "stroke", m(t).color);
|
|
923
|
-
}), C(e, n);
|
|
924
|
-
});
|
|
925
|
-
var c = l(s), d = l(c), f = (e) => {
|
|
926
|
-
var n = ot();
|
|
927
|
-
g(() => {
|
|
928
|
-
x(n, "x1", m(t).target.x1), x(n, "y1", m(t).target.y1), x(n, "x2", m(t).target.x2), x(n, "y2", m(t).target.y2);
|
|
929
|
-
}), C(e, n);
|
|
930
|
-
};
|
|
931
|
-
a(d, (e) => {
|
|
932
|
-
m(t).target && e(f);
|
|
933
|
-
});
|
|
934
|
-
var _ = l(d), v = l(_), y = l(v), b = l(y), ee = u(b, !0);
|
|
935
|
-
D(b);
|
|
936
|
-
var S = l(b), w = u(S, !0);
|
|
937
|
-
D(S);
|
|
938
|
-
var T = l(S), te = u(T);
|
|
939
|
-
D(T), g((e, n, r) => {
|
|
940
|
-
x(o, "d", m(t).trackPath), x(c, "d", m(t).valuePath), x(c, "stroke", m(t).valueColor ?? "var(--sg-accent, #2563eb)"), x(_, "d", m(t).needle.path), x(_, "fill", m(t).valueColor ?? "var(--sg-accent, #2563eb)"), x(v, "cx", m(t).cx), x(v, "cy", m(t).cy), x(v, "r", m(t).needle.hubR), x(y, "cx", m(t).cx), x(y, "cy", m(t).cy), x(b, "x", m(t).minLabel.x), x(b, "y", m(t).minLabel.y), p(ee, e), x(S, "x", m(t).maxLabel.x), x(S, "y", m(t).maxLabel.y), p(w, n), x(T, "x", m(t).cx), x(T, "y", m(t).cy + 38), p(te, `${r ?? ""}${m(t).unit ? ` ${m(t).unit}` : ""}`);
|
|
941
|
-
}, [
|
|
942
|
-
() => M(m(t).min),
|
|
943
|
-
() => M(m(t).max),
|
|
944
|
-
() => M(m(t).value)
|
|
945
|
-
]), C(e, n);
|
|
946
|
-
};
|
|
947
|
-
a(br, (e) => {
|
|
948
|
-
m(gn) && m(W).gauge && e(xr);
|
|
949
|
-
});
|
|
950
|
-
var Sr = l(br), Cr = (e) => {
|
|
951
|
-
var t = i(), n = E(t);
|
|
952
|
-
k(n, 17, () => m(W).treemapCells, h, (e, t) => {
|
|
953
|
-
var n = ut(), r = E(n), i = l(r), o = (e) => {
|
|
954
|
-
var n = ct(), r = u(n, !0);
|
|
955
|
-
D(n), g((e) => {
|
|
956
|
-
x(n, "x", m(t).x + 4), x(n, "y", m(t).y + 12), x(n, "fill", m(t).textColor), p(r, e);
|
|
957
|
-
}, [() => q(m(t).name, Math.max(3, Math.floor(m(t).w / 7)))]), C(e, n);
|
|
958
|
-
};
|
|
959
|
-
a(i, (e) => {
|
|
960
|
-
m(t).w > 36 && m(t).h > 18 && e(o);
|
|
961
|
-
});
|
|
962
|
-
var s = l(i), h = (e) => {
|
|
963
|
-
var n = lt(), r = u(n, !0);
|
|
964
|
-
D(n), g((e) => {
|
|
965
|
-
x(n, "x", m(t).x + 4), x(n, "y", m(t).y + 24), x(n, "fill", m(t).textColor), p(r, e);
|
|
966
|
-
}, [() => M(m(t).value)]), C(e, n);
|
|
967
|
-
};
|
|
968
|
-
a(s, (e) => {
|
|
969
|
-
m(t).w > 60 && m(t).h > 30 && e(h);
|
|
970
|
-
}), g((e) => {
|
|
971
|
-
x(r, "x", m(t).x), x(r, "y", m(t).y), x(r, "width", m(t).w), x(r, "height", m(t).h), x(r, "fill", m(t).color), x(r, "role", f.onSelect ? "button" : "presentation"), x(r, "tabindex", f.onSelect ? 0 : void 0), x(r, "aria-label", e);
|
|
972
|
-
}, [() => `${m(t).name}: ${M(m(t).value)}`]), c("mousemove", r, (e) => X(e.clientX, e.clientY, m(t).name, [{
|
|
973
|
-
color: m(t).color,
|
|
974
|
-
value: M(m(t).value)
|
|
975
|
-
}])), d("mouseleave", r, Z), c("click", r, () => Q(m(t).name, "", m(t).value)), c("keydown", r, (e) => {
|
|
976
|
-
f.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Q(m(t).name, "", m(t).value));
|
|
977
|
-
}), C(e, n);
|
|
978
|
-
}), C(e, t);
|
|
979
|
-
};
|
|
980
|
-
a(Sr, (e) => {
|
|
981
|
-
m(_n) && e(Cr);
|
|
982
|
-
});
|
|
983
|
-
var wr = l(Sr), Tr = (e) => {
|
|
984
|
-
var t = pt(), n = E(t);
|
|
985
|
-
k(n, 17, () => m(W).sankeyLinks, h, (e, t) => {
|
|
986
|
-
var n = dt();
|
|
987
|
-
g((e) => {
|
|
988
|
-
x(n, "d", m(t).path), x(n, "stroke", m(t).color), x(n, "stroke-width", m(t).width), x(n, "aria-label", e);
|
|
989
|
-
}, [() => `${m(t).source} -> ${m(t).target}: ${M(m(t).value)}`]), c("mousemove", n, (e) => X(e.clientX, e.clientY, `${m(t).source} -> ${m(t).target}`, [{
|
|
990
|
-
color: m(t).color,
|
|
991
|
-
value: M(m(t).value)
|
|
992
|
-
}])), d("mouseleave", n, Z), C(e, n);
|
|
993
|
-
});
|
|
994
|
-
var r = l(n);
|
|
995
|
-
k(r, 17, () => m(W).sankeyNodes, h, (e, t) => {
|
|
996
|
-
var n = ft(), r = E(n);
|
|
997
|
-
x(r, "tabindex", 0);
|
|
998
|
-
var i = l(r), a = u(i, !0);
|
|
999
|
-
D(i), g((e) => {
|
|
1000
|
-
x(r, "x", m(t).x), x(r, "y", m(t).y), x(r, "width", m(t).w), x(r, "height", m(t).h), x(r, "fill", m(t).color), x(r, "aria-label", e), x(i, "x", m(t).column === 0 ? m(t).x + m(t).w + 4 : m(t).x - 4), x(i, "y", m(t).y + m(t).h / 2 + 3), x(i, "text-anchor", m(t).column === 0 ? "start" : "end"), p(a, m(t).label);
|
|
1001
|
-
}, [() => `${m(t).label}: in ${M(m(t).totalIn)}, out ${M(m(t).totalOut)}`]), c("mousemove", r, (e) => X(e.clientX, e.clientY, m(t).label, [{
|
|
1002
|
-
label: "in",
|
|
1003
|
-
value: M(m(t).totalIn)
|
|
1004
|
-
}, {
|
|
1005
|
-
label: "out",
|
|
1006
|
-
value: M(m(t).totalOut)
|
|
1007
|
-
}])), d("mouseleave", r, Z), d("focus", r, (e) => {
|
|
1008
|
-
let n = e.currentTarget.getBoundingClientRect();
|
|
1009
|
-
X(n.left + n.width / 2, n.top, m(t).label, [{
|
|
1010
|
-
label: "in",
|
|
1011
|
-
value: M(m(t).totalIn)
|
|
1012
|
-
}, {
|
|
1013
|
-
label: "out",
|
|
1014
|
-
value: M(m(t).totalOut)
|
|
1015
|
-
}]);
|
|
1016
|
-
}), d("blur", r, Z), C(e, n);
|
|
1017
|
-
}), C(e, t);
|
|
1018
|
-
};
|
|
1019
|
-
a(wr, (e) => {
|
|
1020
|
-
m(vn) && e(Tr);
|
|
1021
|
-
});
|
|
1022
|
-
var Er = l(wr);
|
|
1023
|
-
k(Er, 17, () => m(W).slices, h, (e, t, n) => {
|
|
1024
|
-
var r = ht(), i = E(r), o = l(i), s = (e) => {
|
|
1025
|
-
var n = mt(), r = u(n);
|
|
1026
|
-
D(n), g((e) => {
|
|
1027
|
-
x(n, "x", m(t).cx), x(n, "y", m(t).cy), p(r, `${e ?? ""}%`);
|
|
1028
|
-
}, [() => m(t).percent.toFixed(0)]), C(e, n);
|
|
1029
|
-
};
|
|
1030
|
-
a(o, (e) => {
|
|
1031
|
-
Ft() && m(t).percent >= 6 && e(s);
|
|
1032
|
-
}), g((e) => {
|
|
1033
|
-
x(i, "d", m(t).path), x(i, "fill", m(t).color), x(i, "role", f.onSelect ? "button" : "presentation"), x(i, "tabindex", f.onSelect ? 0 : void 0), x(i, "aria-label", e);
|
|
1034
|
-
}, [() => `${m(t).label}: ${M(m(t).value)}, ${m(t).percent.toFixed(1)}%`]), c("mousemove", i, (e) => Pn(e.clientX, e.clientY, m(t).label, m(t).value, m(t).percent)), d("mouseleave", i, Z), d("focus", i, (e) => {
|
|
1035
|
-
let n = e.currentTarget.getBoundingClientRect();
|
|
1036
|
-
Pn(n.left + n.width / 2, n.top, m(t).label, m(t).value, m(t).percent);
|
|
1037
|
-
}), d("blur", i, Z), c("click", i, () => Q(m(t).label, m(t).label, m(t).value, n)), c("keydown", i, (e) => Vn(e, m(t).label, m(t).value)), C(e, r);
|
|
1038
|
-
});
|
|
1039
|
-
var Dr = l(Er), Or = (e) => {
|
|
1040
|
-
var t = gt(), n = E(t), r = u(n, !0);
|
|
1041
|
-
D(n);
|
|
1042
|
-
var i = l(n);
|
|
1043
|
-
g((e) => {
|
|
1044
|
-
x(n, "x", m(W).donut.cx), x(n, "y", m(W).donut.cy - 4), p(r, e), x(i, "x", m(W).donut.cx), x(i, "y", m(W).donut.cy + 11);
|
|
1045
|
-
}, [() => M(m(W).donut.total)]), C(e, t);
|
|
1046
|
-
};
|
|
1047
|
-
a(Dr, (e) => {
|
|
1048
|
-
m(W).donut && e(Or);
|
|
1049
|
-
});
|
|
1050
|
-
var kr = l(Dr), Ar = (e) => {
|
|
1051
|
-
var t = i(), n = E(t);
|
|
1052
|
-
k(n, 19, () => m(U).categories, (e, t) => e + t, (e, t, n) => {
|
|
1053
|
-
let i = r(() => m(W).lines[0]?.points), a = r(() => m(i)?.[m(n)]?.x), o = r(() => !m(G) && m(i) && m(i).length === m(U).categories.length && Number.isFinite(m(a))), s = r(() => m(o) && m(n) > 0 ? m(i)[m(n) - 1].x : null), l = r(() => m(o) && m(n) < m(i).length - 1 ? m(i)[m(n) + 1].x : null), u = r(() => m(o) ? m(s) == null ? m(W).plot.x : (m(s) + m(a)) / 2 : m(W).plot.x + m(K) * m(n)), p = r(() => m(o) ? m(l) == null ? m(W).plot.x + m(W).plot.w : (m(a) + m(l)) / 2 : m(W).plot.x + m(K) * (m(n) + 1));
|
|
1054
|
-
var h = _t();
|
|
1055
|
-
g((e, t) => {
|
|
1056
|
-
x(h, "x", m(G) ? m(W).plot.x : m(u)), x(h, "y", m(G) ? m(W).plot.y + m(K) * m(n) : m(W).plot.y), x(h, "width", e), x(h, "height", m(G) ? m(K) : m(W).plot.h), x(h, "role", f.onSelect ? "button" : "img"), x(h, "tabindex", j() ? m(n) === 0 ? 0 : -1 : void 0), x(h, "data-cat-index", m(n)), x(h, "aria-label", t);
|
|
1057
|
-
}, [() => m(G) ? m(W).plot.w : Math.max(0, m(p) - m(u)), () => `${m(t)}: ${jn(m(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), c("mousemove", h, (e) => Mn(e.clientX, e.clientY, m(n))), d("mouseleave", h, Z), d("focus", h, (e) => Nn(e.currentTarget, m(n))), d("blur", h, Z), c("click", h, () => Q(m(t), "", 0, m(n))), c("keydown", h, (e) => Bn(e, m(n))), C(e, h);
|
|
1058
|
-
}), C(e, t);
|
|
1059
|
-
};
|
|
1060
|
-
a(kr, (e) => {
|
|
1061
|
-
m(un) && !m(dn) && e(Ar);
|
|
1062
|
-
});
|
|
1063
|
-
var jr = l(kr), Mr = (e) => {
|
|
1064
|
-
var t = vt();
|
|
1065
|
-
g(() => {
|
|
1066
|
-
x(t, "x", m(z).x), x(t, "y", m(z).y), x(t, "width", m(z).w), x(t, "height", m(z).h);
|
|
1067
|
-
}), C(e, t);
|
|
1068
|
-
};
|
|
1069
|
-
a(jr, (e) => {
|
|
1070
|
-
m(z) && e(Mr);
|
|
1071
|
-
}), D($), b($, (e) => _(I, e), () => m(I));
|
|
1072
|
-
var Nr = l($, 2), Pr = (e) => {
|
|
1073
|
-
let t = r(() => m(B).plot.x + m(an).t0 * m(B).plot.w), n = r(() => (m(an).t1 - m(an).t0) * m(B).plot.w);
|
|
1074
|
-
var i = St(), o = u(i);
|
|
1075
|
-
k(o, 17, () => m(B).lines, h, (e, t) => {
|
|
1076
|
-
var n = bt(), r = E(n), i = (e) => {
|
|
1077
|
-
var n = yt();
|
|
1078
|
-
g(() => {
|
|
1079
|
-
x(n, "d", m(t).areaPath), x(n, "fill", m(t).color);
|
|
1080
|
-
}), C(e, n);
|
|
1081
|
-
};
|
|
1082
|
-
a(r, (e) => {
|
|
1083
|
-
m(t).areaPath && e(i);
|
|
1084
|
-
});
|
|
1085
|
-
var o = l(r);
|
|
1086
|
-
g(() => {
|
|
1087
|
-
x(o, "d", m(t).path), x(o, "stroke", m(t).color);
|
|
1088
|
-
}), C(e, n);
|
|
1089
|
-
});
|
|
1090
|
-
var s = l(o);
|
|
1091
|
-
k(s, 17, () => m(B).bars, h, (e, t) => {
|
|
1092
|
-
var n = xt();
|
|
1093
|
-
g(() => {
|
|
1094
|
-
x(n, "x", m(t).x), x(n, "y", m(t).y), x(n, "width", m(t).w), x(n, "height", m(t).h), x(n, "fill", m(t).color);
|
|
1095
|
-
}), C(e, n);
|
|
1096
|
-
});
|
|
1097
|
-
var f = l(s), p = l(f), _ = l(p), v = l(_), y = l(v);
|
|
1098
|
-
D(i), g(() => {
|
|
1099
|
-
x(i, "viewBox", `0 0 ${m(B).width} ${m(B).height}`), x(f, "x", m(B).plot.x), x(f, "y", m(B).plot.y), x(f, "width", m(t) - m(B).plot.x), x(f, "height", m(B).plot.h), x(p, "x", m(t) + m(n)), x(p, "y", m(B).plot.y), x(p, "width", m(B).plot.x + m(B).plot.w - (m(t) + m(n))), x(p, "height", m(B).plot.h), x(_, "x", m(t)), x(_, "y", m(B).plot.y), x(_, "width", m(n)), x(_, "height", m(B).plot.h), x(v, "x", m(t) - 4), x(v, "y", m(B).plot.y), x(v, "height", m(B).plot.h), x(y, "x", m(t) + m(n) - 4), x(y, "y", m(B).plot.y), x(y, "height", m(B).plot.h);
|
|
1100
|
-
}), c("pointermove", i, cn), c("pointerdown", _, (e) => sn(e, "move")), c("pointerup", _, H), d("pointercancel", _, H), c("pointerdown", v, (e) => sn(e, "left")), c("pointerup", v, H), d("pointercancel", v, H), c("pointerdown", y, (e) => sn(e, "right")), c("pointerup", y, H), d("pointercancel", y, H), C(e, i);
|
|
1101
|
-
};
|
|
1102
|
-
a(Nr, (e) => {
|
|
1103
|
-
m(nn) && m(B) && e(Pr);
|
|
1104
|
-
});
|
|
1105
|
-
var Fr = l(Nr, 2), Ir = (e) => {
|
|
1106
|
-
var t = Ct();
|
|
1107
|
-
C(e, t);
|
|
1108
|
-
};
|
|
1109
|
-
a(Fr, (e) => {
|
|
1110
|
-
m(wn) && e(Ir);
|
|
1111
|
-
});
|
|
1112
|
-
var Lr = l(Fr, 2), Rr = (e) => {
|
|
1113
|
-
var t = Dt();
|
|
1114
|
-
let n;
|
|
1115
|
-
var r = u(t), i = u(r, !0);
|
|
1116
|
-
D(r);
|
|
1117
|
-
var o = l(r, 2);
|
|
1118
|
-
k(o, 17, () => m(J).rows, h, (e, t) => {
|
|
1119
|
-
var n = Et(), r = u(n), i = (e) => {
|
|
1120
|
-
var n = wt();
|
|
1121
|
-
g(() => O(n, `background:${m(t).color}`)), C(e, n);
|
|
1122
|
-
};
|
|
1123
|
-
a(r, (e) => {
|
|
1124
|
-
m(t).color && e(i);
|
|
1125
|
-
});
|
|
1126
|
-
var o = l(r, 2), s = (e) => {
|
|
1127
|
-
var n = Tt(), r = u(n, !0);
|
|
1128
|
-
D(n), g(() => p(r, m(t).label)), C(e, n);
|
|
1129
|
-
};
|
|
1130
|
-
a(o, (e) => {
|
|
1131
|
-
m(t).label && e(s);
|
|
1132
|
-
});
|
|
1133
|
-
var c = l(o, 2), d = u(c, !0);
|
|
1134
|
-
D(c), D(n), g(() => p(d, m(t).value)), C(e, n);
|
|
1135
|
-
}), D(t), g(() => {
|
|
1136
|
-
n = A(t, 1, "sv-grid-chart-tooltip svelte-5rb6rd", null, n, { "is-below": m(J).below }), O(t, `left:${m(J).left}px; top:${m(J).top}px;`), p(i, m(J).title);
|
|
1137
|
-
}), C(e, t);
|
|
1138
|
-
};
|
|
1139
|
-
a(Lr, (e) => {
|
|
1140
|
-
m(J) && e(Rr);
|
|
1141
|
-
});
|
|
1142
|
-
var zr = l(Lr, 2), Br = (e) => {
|
|
1143
|
-
var t = At(), n = u(t);
|
|
1144
|
-
k(n, 17, () => m(Cn), (e) => e.label, (e, t) => {
|
|
1145
|
-
var n = Ot();
|
|
1146
|
-
let r;
|
|
1147
|
-
var i = u(n), a = l(i);
|
|
1148
|
-
D(n), g(() => {
|
|
1149
|
-
r = A(n, 1, "sv-grid-chart-legend-item svelte-5rb6rd", null, r, {
|
|
1150
|
-
"is-off": m(t).off,
|
|
1151
|
-
"is-isolated": m(N) === m(t).label
|
|
1152
|
-
}), n.disabled = !j(), x(n, "aria-pressed", !m(t).off), x(n, "title", j() ? `${m(t).off ? "Show" : "Hide"} ${m(t).label} · double-click to isolate` : m(t).label), O(i, `background:${m(t).off ? "transparent" : m(t).color}; border-color:${m(t).color}`), p(a, ` ${m(t).label ?? ""}`);
|
|
1153
|
-
}), c("click", n, () => Tn(m(t).label)), c("dblclick", n, () => En(m(t).label)), d("pointerenter", n, () => j() && _(Vt, m(t).label, !0)), d("pointerleave", n, () => _(Vt, null)), C(e, n);
|
|
1154
|
-
});
|
|
1155
|
-
var r = l(n, 2), i = (e) => {
|
|
1156
|
-
var t = kt(), n = u(t, !0);
|
|
1157
|
-
D(t), g(() => p(n, m(xn) ? "Show less" : `+${m(bn).length - 10} more`)), c("click", t, () => _(xn, !m(xn))), C(e, t);
|
|
1158
|
-
};
|
|
1159
|
-
a(r, (e) => {
|
|
1160
|
-
m(Sn) && e(i);
|
|
1161
|
-
}), D(t), C(e, t);
|
|
1162
|
-
};
|
|
1163
|
-
a(zr, (e) => {
|
|
1164
|
-
S() && m(bn).length && e(Br);
|
|
1165
|
-
});
|
|
1166
|
-
var Vr = l(zr, 2), Hr = u(Vr), Ur = u(Hr);
|
|
1167
|
-
D(Hr);
|
|
1168
|
-
var Wr = l(Hr), Gr = u(Wr);
|
|
1169
|
-
k(Gr, 20, () => m(Dn).cols, (e) => e, (e, t) => {
|
|
1170
|
-
var n = jt(), r = u(n, !0);
|
|
1171
|
-
D(n), g(() => p(r, t)), C(e, n);
|
|
1172
|
-
}), D(Gr), D(Wr);
|
|
1173
|
-
var Kr = l(Wr);
|
|
1174
|
-
k(Kr, 21, () => m(Dn).rows, h, (e, t) => {
|
|
1175
|
-
var n = Nt();
|
|
1176
|
-
k(n, 21, () => m(t), h, (e, t) => {
|
|
1177
|
-
var n = Mt(), r = u(n, !0);
|
|
1178
|
-
D(n), g(() => p(r, m(t))), C(e, n);
|
|
1179
|
-
}), D(n), C(e, n);
|
|
1180
|
-
}), D(Kr), D(Vr), D(Jn), b(Jn, (e) => _(kn, e), () => m(kn)), g(() => {
|
|
1181
|
-
Zn = A($, 0, "sv-grid-chart-svg svelte-5rb6rd", null, Zn, {
|
|
1182
|
-
"is-interactive": j(),
|
|
1183
|
-
"is-clickable": !!f.onSelect || !!f.onDrill,
|
|
1184
|
-
"is-zoomable": It() && m(un),
|
|
1185
|
-
"is-dragging": !!m(L)
|
|
1186
|
-
}), x($, "viewBox", `0 0 ${m(W).width} ${m(W).height}`), x($, "aria-label", `${f.spec.type} chart`), x($, "aria-describedby", `${Ut}-table`), x(Vr, "id", `${Ut}-table`), p(Ur, `${f.spec.type ?? ""} chart data`);
|
|
1187
|
-
}), c("pointerdown", $, Qt), c("pointermove", $, $t), c("pointerup", $, en), d("pointercancel", $, en), c("dblclick", $, tn), C(o, Jn), ee();
|
|
1188
|
-
}
|
|
1189
|
-
o([
|
|
1190
|
-
"click",
|
|
1191
|
-
"pointerdown",
|
|
1192
|
-
"pointermove",
|
|
1193
|
-
"pointerup",
|
|
1194
|
-
"dblclick",
|
|
1195
|
-
"mousemove",
|
|
1196
|
-
"keydown"
|
|
1197
|
-
]);
|
|
1198
|
-
//#endregion
|
|
1199
|
-
export { j as t };
|