@iota-uz/sdk 0.40.2 → 0.41.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/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-odKNeG0I.js → CascadePanel-mTDlx6tE.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-DS6Aj-mH.js → ChartDataEquivalent-DR1skdKB.js} +1 -1
- package/dist/lens/{ChartPanel-jBHgzXvE.js → ChartPanel-D-5C8_dH.js} +196 -195
- package/dist/lens/{CoveragePanel-DJBkno95.js → CoveragePanel-BDPclYah.js} +1 -1
- package/dist/lens/{GaugePanel-C7OP3lSD.js → GaugePanel-UWr1r0Nz.js} +1 -1
- package/dist/lens/{MapPanel-DKH9XQ3v.js → MapPanel-B6tkBG3k.js} +3 -3
- package/dist/lens/{MetricFlowPanel-DoG-Z7eY.js → MetricFlowPanel-BaZ5tA7H.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-CQRnPzmg.js → MetricHierarchyPanel-O3AXYOcB.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-7jpgouaq.js → MetricRelationshipPanel-9rjtNzzr.js} +2 -2
- package/dist/lens/{PrintReport-R3wm1wHI.js → PrintReport-RGui8r34.js} +5 -5
- package/dist/lens/{TablePanel-CxseNMoa.js → TablePanel-w8IdnCMz.js} +1 -1
- package/dist/lens/{adapter-CY6pdOaG.js → adapter-f_DO7Xmh.js} +5508 -5483
- package/dist/lens/charts/echarts/options.d.ts +13 -0
- package/dist/lens/charts/echarts/options.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-DaBLm9LN.js → dashboardEdit-DWiZSYxB.js} +1 -1
- package/dist/lens/{index-CK47GOOR.js → index-BaNOkwCZ.js} +1 -1
- package/dist/lens/{index-DGHwvvd1.js → index-DLIY9WtX.js} +4519 -4212
- package/dist/lens/index.js +1 -1
- package/dist/lens/{install-C99l3DlG.js → install-BFRS39uE.js} +1 -1
- package/dist/lens/{install-LwZr5b3c.js → install-CwiEGQ3t.js} +1 -1
- package/dist/lens/{install-Dfe-R2a1.js → install-DdT57QNU.js} +1 -1
- package/dist/lens/{install-CEMUnr4B.js → install-e8KK9NUr.js} +1 -1
- package/dist/lens/{keys-DRnLTb3T.js → keys-yelWfTWG.js} +2 -2
- package/dist/lens/{metricViews-Uga35rVO.js → metricViews-BO-FAMl_.js} +1 -1
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/PanelExportMenu.d.ts +12 -2
- package/dist/lens/panels/PanelExportMenu.d.ts.map +1 -1
- package/dist/lens/panels/PanelFrame.d.ts.map +1 -1
- package/dist/lens/{prefetch-DvGDW65r.js → prefetch-fI7nAEVN.js} +2 -2
- package/dist/lens/{prefetchPanels-BngJI8s2.js → prefetchPanels-DiKMg9qy.js} +1 -1
- package/dist/lens/{print-BKdOYqt0.js → print-CS337l5-.js} +1 -1
- package/dist/lens/runtime/format.d.ts.map +1 -1
- package/dist/lens/runtime/messages.d.ts +17 -0
- package/dist/lens/runtime/messages.d.ts.map +1 -0
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/{scales-CtjgzrH0.js → scales-CCApvt_k.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/dist/solid-ui/index.js +2009 -2002
- package/dist/solid-ui/index.server.js +9 -24
- package/dist/solid-ui/overlays/Dialog.d.ts +2 -0
- package/dist/solid-ui/overlays/Dialog.d.ts.map +1 -1
- package/dist/solid-ui/overlays/Drawer.d.ts.map +1 -1
- package/dist/solid-ui/standalone.css +1 -1
- package/dist/styles.css +169 -0
- package/package.json +1 -1
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { insert as i, memo as
|
|
1
|
+
import { insert as i, memo as q, effect as Y, setAttribute as E, createComponent as K, className as Ye, template as k, addEventListener as $t, style as ct, use as xt, setStyleProperty as _t, delegateEvents as It } from "solid-js/web";
|
|
2
2
|
import { createSignal as le, createMemo as R, onCleanup as Be, untrack as ze, createEffect as xe, For as Ge, Show as ne } from "solid-js";
|
|
3
3
|
import { r as Ct } from "./adapter-CgoRd_uP.js";
|
|
4
|
-
import { C as Lt, f as kt } from "./keys-
|
|
5
|
-
import { s as Ft, o as De, c as At, a as Kt, b as Tt, d as Rt, f as Et } from "./scales-
|
|
6
|
-
import { H as Ht, u as Fe, g as dt, I as Bt, J as nt, K as ot, l as Mt, M as Ot, N as Nt, O as Ut, Q as Vt, a as Pt, R as zt, T as Dt, U as rt, m as ut, n as gt, k as mt, V as qt, W as Wt, o as Zt, X as jt, Y as Qt, Z as Yt, _ as Gt, $ as
|
|
7
|
-
import { C as rn, c as an } from "./ChartDataEquivalent-
|
|
8
|
-
var ln = /* @__PURE__ */
|
|
4
|
+
import { C as Lt, f as kt } from "./keys-yelWfTWG.js";
|
|
5
|
+
import { s as Ft, o as De, c as At, a as Kt, b as Tt, d as Rt, f as Et } from "./scales-CCApvt_k.js";
|
|
6
|
+
import { H as Ht, u as Fe, g as dt, I as Bt, J as nt, K as ot, l as Mt, M as Ot, N as Nt, O as Ut, Q as Vt, a as Pt, R as zt, T as Dt, U as rt, m as ut, n as gt, k as mt, V as qt, W as Wt, o as Zt, X as jt, Y as Qt, Z as Yt, _ as Gt, $ as D, a0 as at, a1 as Jt, a2 as qe, a3 as Xt, a4 as en, a5 as tn, a6 as nn, a7 as on } from "./index-DLIY9WtX.js";
|
|
7
|
+
import { C as rn, c as an } from "./ChartDataEquivalent-DR1skdKB.js";
|
|
8
|
+
var ln = /* @__PURE__ */ k("<div class=lens-temporal-controls>"), sn = /* @__PURE__ */ k("<button class=lens-temporal-toggle type=button>"), cn = /* @__PURE__ */ k("<select class=lens-temporal-select><option value>"), dn = /* @__PURE__ */ k("<option>"), un = /* @__PURE__ */ k("<span class=lens-chart-source-note role=note>"), gn = /* @__PURE__ */ k("<span class=lens-chart-log-scale role=note><span>"), mn = /* @__PURE__ */ k("<span class=lens-chart-period-note role=note>"), hn = /* @__PURE__ */ k("<button class=lens-chart-collapse-other type=button>"), fn = /* @__PURE__ */ k("<button class=lens-chart-reset-zoom type=button>"), vn = /* @__PURE__ */ k("<div class=lens-chart-notes><span class=lens-chart-notes-actions>"), wn = /* @__PURE__ */ k("<div><div class=lens-chart-area>"), pn = /* @__PURE__ */ k("<div class=lens-chart-empty role=status><span class=lens-chart-empty-note></span><button class=lens-chart-empty-action type=button>"), yn = /* @__PURE__ */ k("<span class=lens-chart-compact-empty>"), bn = /* @__PURE__ */ k("<strong class=lens-chart-compact-value>"), Sn = /* @__PURE__ */ k("<span class=lens-chart-compact-label>"), $n = /* @__PURE__ */ k('<button class="lens-chart-compact lens-chart-compact-action"type=button>'), xn = /* @__PURE__ */ k("<div class=lens-chart-compact role=img>"), _n = /* @__PURE__ */ k("<span class=lens-plot-total><span class=lens-panel-total-label>:</span> "), In = /* @__PURE__ */ k('<div class=lens-chart-legend-shell><div class=lens-chart-legend-scroll-frame><ul class=lens-chart-legend role=region></ul><span aria-hidden=true class="lens-chart-legend-edge lens-chart-legend-edge-top"></span><span aria-hidden=true class="lens-chart-legend-edge lens-chart-legend-edge-bottom">'), Cn = /* @__PURE__ */ k("<div class=lens-chart-legend-controls><div class=lens-chart-legend-tools role=group>"), Qe = /* @__PURE__ */ k("<button type=button>"), Ln = /* @__PURE__ */ k("<button class=lens-chart-legend-invert type=button>"), kn = /* @__PURE__ */ k("<label class=lens-chart-legend-search><span class=lens:sr-only></span><input class=lens-facet-search type=search>"), Fn = /* @__PURE__ */ k("<li class=lens-chart-legend-item><button type=button><span aria-hidden=true class=lens-chart-legend-mark></span><span class=lens-chart-legend-label></span><span aria-hidden=true class=lens-chart-legend-visibility>"), An = /* @__PURE__ */ k("<li class=lens-chart-legend-heading>"), ht = /* @__PURE__ */ k("<span class=lens-chart-legend-value>"), Kn = /* @__PURE__ */ k("<button class=lens-chart-legend-overflow type=button>"), Tn = /* @__PURE__ */ k('<ul class="lens-chart-legend lens-chart-overlay-legend"><li class=lens-chart-legend-heading>'), Rn = /* @__PURE__ */ k("<li class=lens-chart-legend-item><button type=button><span aria-hidden=true class=lens-chart-overlay-mark></span><span class=lens-chart-legend-label>"), En = /* @__PURE__ */ k("<span aria-hidden=true class=lens-chart-legend-separator>·");
|
|
9
9
|
const Hn = 0.02, Bn = on, Mn = 4;
|
|
10
10
|
function On(e) {
|
|
11
|
-
const t =
|
|
11
|
+
const t = D(), o = D(e.encoding.label ? e.format[e.encoding.label] : void 0), a = D(e.encoding.value ? e.format[e.encoding.value] : void 0), m = D(e.encoding.previous ? e.format[e.encoding.previous] : void 0), l = D(e.encoding.lower ? e.format[e.encoding.lower] : void 0), _ = D(e.encoding.q1 ? e.format[e.encoding.q1] : void 0), I = D(e.encoding.median ? e.format[e.encoding.median] : void 0), b = D(e.encoding.q3 ? e.format[e.encoding.q3] : void 0), $ = D(e.encoding.upper ? e.format[e.encoding.upper] : void 0), S = D(e.encoding.id ? e.format[e.encoding.id] : void 0), H = D(e.encoding.series ? e.format[e.encoding.series] : void 0), v = D(e.encoding.category ? e.format[e.encoding.category] : void 0), g = D(e.encoding.cut ? e.format[e.encoding.cut] : void 0), M = D(e.encoding.cutLabel ? e.format[e.encoding.cutLabel] : void 0), W = D(e.encoding.final ? e.format[e.encoding.final] : void 0), oe = at(e.encoding.value ? e.format[e.encoding.value] : void 0), Q = at(e.encoding.median ? e.format[e.encoding.median] : void 0), w = R(() => {
|
|
12
12
|
const se = {
|
|
13
13
|
label: o,
|
|
14
14
|
value: a,
|
|
15
|
-
previous:
|
|
15
|
+
previous: m,
|
|
16
16
|
lower: l,
|
|
17
17
|
q1: _,
|
|
18
18
|
median: I,
|
|
19
19
|
q3: b,
|
|
20
20
|
upper: $,
|
|
21
21
|
id: S,
|
|
22
|
-
series:
|
|
22
|
+
series: H,
|
|
23
23
|
category: v,
|
|
24
|
-
cut:
|
|
24
|
+
cut: g,
|
|
25
25
|
cutLabel: M,
|
|
26
|
-
final:
|
|
26
|
+
final: W
|
|
27
27
|
}, ge = /* @__PURE__ */ new Map();
|
|
28
28
|
for (const J of Jt) {
|
|
29
29
|
const re = e.encoding[J], X = se[J];
|
|
30
30
|
re && X && ge.set(re, X);
|
|
31
31
|
}
|
|
32
32
|
return (J, re) => (ge.get(J) ?? t)(re);
|
|
33
|
-
}),
|
|
33
|
+
}), Z = R(() => {
|
|
34
34
|
const se = e.encoding.value, ge = e.encoding.median;
|
|
35
35
|
return (J, re) => se && J === se ? oe(re) : ge && J === ge ? Q(re) : w()(J, re);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
format: w(),
|
|
39
|
-
formatAxis:
|
|
39
|
+
formatAxis: Z()
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function We(e, t, o) {
|
|
43
43
|
var I, b;
|
|
44
|
-
const a = t.encoding.id ? e.columns.findIndex(($) => $.name === t.encoding.id) : -1,
|
|
44
|
+
const a = t.encoding.id ? e.columns.findIndex(($) => $.name === t.encoding.id) : -1, m = [t.encoding.category, t.encoding.label].find(($) => !!$ && e.columns.some((S) => S.name === $)), l = e.columns.findIndex(($) => $.name === m), _ = a >= 0 ? (I = e.rows[o]) == null ? void 0 : I[a] : (b = e.rows[o]) == null ? void 0 : b[l];
|
|
45
45
|
return String(typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" ? _ : o);
|
|
46
46
|
}
|
|
47
47
|
function lt(e, t, o) {
|
|
@@ -49,16 +49,16 @@ function lt(e, t, o) {
|
|
|
49
49
|
if (((I = t.radial) == null ? void 0 : I.mode) === "partition" && t.encoding.series) {
|
|
50
50
|
const b = e.columns.findIndex(($) => $.name === t.encoding.series);
|
|
51
51
|
if (b >= 0) {
|
|
52
|
-
const $ = e.rows.findIndex((S,
|
|
53
|
-
const v = S[b],
|
|
54
|
-
return Ct(
|
|
52
|
+
const $ = e.rows.findIndex((S, H) => {
|
|
53
|
+
const v = S[b], g = typeof v == "string" || typeof v == "number" || typeof v == "bigint" ? String(v) : "";
|
|
54
|
+
return Ct(g, We(e, t, H)) === o;
|
|
55
55
|
});
|
|
56
56
|
if ($ >= 0) return $;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
const a = e.rows.findIndex((b, $) => We(e, t, $) === o);
|
|
60
60
|
if (a >= 0) return a;
|
|
61
|
-
const
|
|
61
|
+
const m = t.encoding.category ?? t.encoding.label, l = e.columns.findIndex((b) => b.name === m), _ = e.columns.findIndex((b) => b.name === t.encoding.series);
|
|
62
62
|
return l < 0 ? -1 : e.rows.findIndex((b) => kt(ke(b[l]), _ >= 0 ? ke(b[_]) : "") === o);
|
|
63
63
|
}
|
|
64
64
|
function ft(e, t) {
|
|
@@ -68,8 +68,8 @@ function Nn(e, t, o) {
|
|
|
68
68
|
var l;
|
|
69
69
|
const a = ft(e, t);
|
|
70
70
|
if (a < 0) return We(e, t, o);
|
|
71
|
-
const
|
|
72
|
-
return String(typeof
|
|
71
|
+
const m = (l = e.rows[o]) == null ? void 0 : l[a];
|
|
72
|
+
return String(typeof m == "string" || typeof m == "number" || typeof m == "bigint" ? m : o);
|
|
73
73
|
}
|
|
74
74
|
function ve(e) {
|
|
75
75
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
@@ -82,8 +82,8 @@ function ke(e) {
|
|
|
82
82
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "";
|
|
83
83
|
}
|
|
84
84
|
function Un(e, t) {
|
|
85
|
-
const
|
|
86
|
-
return
|
|
85
|
+
const m = (t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? [t.encoding.label, t.encoding.category] : [t.encoding.category, t.encoding.label]).reduce((l, _) => l >= 0 || !_ ? l : e.columns.findIndex((I) => I.name === _), -1);
|
|
86
|
+
return m < 0 ? 0 : new Set(e.rows.map((l) => l[m]).filter((l) => l != null).map(String)).size;
|
|
87
87
|
}
|
|
88
88
|
function Vn(e, t) {
|
|
89
89
|
const o = e.columns.findIndex((a) => a.name === t.encoding.series);
|
|
@@ -91,8 +91,8 @@ function Vn(e, t) {
|
|
|
91
91
|
}
|
|
92
92
|
const vt = "__lens_other__", Pn = "__lens_topn_group";
|
|
93
93
|
function st(e, t) {
|
|
94
|
-
var S,
|
|
95
|
-
const o = e.columns.findIndex((v) => v.name === Pn), a = e.columns.findIndex((v) => v.name === (t.encoding.label ?? t.encoding.category)),
|
|
94
|
+
var S, H;
|
|
95
|
+
const o = e.columns.findIndex((v) => v.name === Pn), a = e.columns.findIndex((v) => v.name === (t.encoding.label ?? t.encoding.category)), m = e.columns.findIndex((v) => v.name === t.encoding.id), l = e.columns.findIndex((v) => v.name === t.encoding.value);
|
|
96
96
|
if (o < 0 || a < 0 || l < 0) return {
|
|
97
97
|
frame: e,
|
|
98
98
|
collapsed: !1
|
|
@@ -103,8 +103,8 @@ function st(e, t) {
|
|
|
103
103
|
collapsed: !1
|
|
104
104
|
};
|
|
105
105
|
const I = e.rows.filter((v) => !_.includes(v)).map((v) => [...v]), b = new Array(e.columns.length).fill(null);
|
|
106
|
-
b[o] = (S = _[0]) == null ? void 0 : S[o], b[a] = (
|
|
107
|
-
const $ = e.colors ? [...e.colors.filter((v,
|
|
106
|
+
b[o] = (S = _[0]) == null ? void 0 : S[o], b[a] = (H = _[0]) == null ? void 0 : H[o], m >= 0 && (b[m] = vt), b[l] = _.reduce((v, g) => v + (ve(g[l]) ?? 0), 0), I.push(b);
|
|
107
|
+
const $ = e.colors ? [...e.colors.filter((v, g) => !_.includes(e.rows[g])), qe()] : [...I.slice(0, -1).map(() => ""), qe()];
|
|
108
108
|
return {
|
|
109
109
|
frame: {
|
|
110
110
|
...e,
|
|
@@ -119,31 +119,31 @@ function it(e, t, o) {
|
|
|
119
119
|
frame: e,
|
|
120
120
|
collapsed: !1
|
|
121
121
|
};
|
|
122
|
-
const a = e.columns.findIndex((
|
|
122
|
+
const a = e.columns.findIndex((g) => g.name === (t.encoding.label ?? t.encoding.category)), m = e.columns.findIndex((g) => g.name === t.encoding.id), l = e.columns.findIndex((g) => g.name === t.encoding.value);
|
|
123
123
|
if (a < 0 || l < 0) return {
|
|
124
124
|
frame: e,
|
|
125
125
|
collapsed: !1
|
|
126
126
|
};
|
|
127
|
-
const _ = e.total ?? e.rows.reduce((
|
|
127
|
+
const _ = e.total ?? e.rows.reduce((g, M) => g + (ve(M[l]) ?? 0), 0);
|
|
128
128
|
if (!Number.isFinite(_) || _ <= 0) return {
|
|
129
129
|
frame: e,
|
|
130
130
|
collapsed: !1
|
|
131
131
|
};
|
|
132
|
-
const I = e.rows.map((
|
|
132
|
+
const I = e.rows.map((g, M) => ({
|
|
133
133
|
index: M,
|
|
134
|
-
value: ve(
|
|
134
|
+
value: ve(g[l]) ?? 0
|
|
135
135
|
})).filter(({
|
|
136
|
-
value:
|
|
137
|
-
}) =>
|
|
136
|
+
value: g
|
|
137
|
+
}) => g / _ < Hn);
|
|
138
138
|
if (I.length === 0) return {
|
|
139
139
|
frame: e,
|
|
140
140
|
collapsed: !1
|
|
141
141
|
};
|
|
142
142
|
const b = new Set(I.map(({
|
|
143
|
-
index:
|
|
144
|
-
}) =>
|
|
145
|
-
S[a] = o,
|
|
146
|
-
const
|
|
143
|
+
index: g
|
|
144
|
+
}) => g)), $ = e.rows.filter((g, M) => !b.has(M)).map((g) => [...g]), S = new Array(e.columns.length).fill(null);
|
|
145
|
+
S[a] = o, m >= 0 && (S[m] = vt), S[l] = I.reduce((g, M) => g + M.value, 0), $.push(S);
|
|
146
|
+
const H = e.rows.map((g, M) => M).filter((g) => !b.has(g)), v = e.colors ? [...e.colors.filter((g, M) => !b.has(M)), qe()] : [...H.map(() => ""), qe()];
|
|
147
147
|
return {
|
|
148
148
|
frame: {
|
|
149
149
|
...e,
|
|
@@ -156,16 +156,16 @@ function it(e, t, o) {
|
|
|
156
156
|
function to(e) {
|
|
157
157
|
var tt;
|
|
158
158
|
const t = e.panel, o = Ht(t.id), a = Fe(), {
|
|
159
|
-
document:
|
|
159
|
+
document: m,
|
|
160
160
|
navigation: l
|
|
161
161
|
} = dt(), {
|
|
162
162
|
drillInto: _
|
|
163
163
|
} = Bt(), {
|
|
164
164
|
format: I,
|
|
165
165
|
formatAxis: b
|
|
166
|
-
} = On(t), [$, S] = le(), [
|
|
166
|
+
} = On(t), [$, S] = le(), [H, v] = le(!1), [g, M] = le(0), W = typeof window > "u" ? {
|
|
167
167
|
regression: !1
|
|
168
|
-
} : nt(new URL(window.location.href), t.id), [oe, Q] = le(
|
|
168
|
+
} : nt(new URL(window.location.href), t.id), [oe, Q] = le(W.regression), [w, Z] = le(W.movingAverage), [se, ge] = le(/* @__PURE__ */ new Set()), [J, re] = le(typeof window > "u" ? /* @__PURE__ */ new Set() : ot(new URL(window.location.href), t.id)), X = R(() => J()), _e = () => l.panelId === t.id && l.path.length > 0, ee = R(() => _e() ? Mt(m, l.path) : t.drillRoot ? m.drill.edges[t.drillRoot] : void 0), Ie = () => ee() ? ee().children.some(({
|
|
169
169
|
target: n
|
|
170
170
|
}) => n) : !!t.drillRoot, G = () => !!t.drillRoot || !!ee(), x = Ot(t);
|
|
171
171
|
let ie;
|
|
@@ -196,7 +196,7 @@ function to(e) {
|
|
|
196
196
|
}, we = R(() => {
|
|
197
197
|
var u;
|
|
198
198
|
if (!((u = be()) != null && u.dimension)) return;
|
|
199
|
-
const n = Ke.values[Ut], r = Array.isArray(n) ? n : n ? [n] : [], s = `${be().dimension}:`, d = new Set(r.filter((
|
|
199
|
+
const n = Ke.values[Ut], r = Array.isArray(n) ? n : n ? [n] : [], s = `${be().dimension}:`, d = new Set(r.filter((z) => z.startsWith(s)).map((z) => z.slice(s.length)));
|
|
200
200
|
return d.size > 0 ? d : void 0;
|
|
201
201
|
}), Ze = R(() => {
|
|
202
202
|
if (!we() || !be() || !o.data) return;
|
|
@@ -228,7 +228,7 @@ function to(e) {
|
|
|
228
228
|
if (typeof window > "u") return;
|
|
229
229
|
const n = () => {
|
|
230
230
|
const r = nt(new URL(window.location.href), t.id);
|
|
231
|
-
Q(r.regression),
|
|
231
|
+
Q(r.regression), Z(r.movingAverage);
|
|
232
232
|
};
|
|
233
233
|
window.addEventListener("popstate", n), Be(() => window.removeEventListener("popstate", n));
|
|
234
234
|
}), xe(() => {
|
|
@@ -240,9 +240,9 @@ function to(e) {
|
|
|
240
240
|
r.search !== n.search && window.history.replaceState(window.history.state, "", r);
|
|
241
241
|
});
|
|
242
242
|
const C = R(() => {
|
|
243
|
-
var
|
|
243
|
+
var z, te;
|
|
244
244
|
if (!o.data || X().size === 0) return o.data;
|
|
245
|
-
const n = o.data.rows.map((ue, $e) => !X().has(Nn(o.data, t, $e))), r = o.data.rows.filter((ue, $e) => n[$e]), s = (
|
|
245
|
+
const n = o.data.rows.map((ue, $e) => !X().has(Nn(o.data, t, $e))), r = o.data.rows.filter((ue, $e) => n[$e]), s = (z = o.data.colors) == null ? void 0 : z.filter((ue, $e) => n[$e]), d = o.data.columns.findIndex((ue) => ue.name === t.encoding.value), u = ((te = t.radial) == null ? void 0 : te.mode) === "partition" || d < 0 ? o.data.total : r.reduce((ue, $e) => ue + (ve($e[d]) ?? 0), 0);
|
|
246
246
|
return {
|
|
247
247
|
...o.data,
|
|
248
248
|
rows: r,
|
|
@@ -259,17 +259,17 @@ function to(e) {
|
|
|
259
259
|
};
|
|
260
260
|
const r = st(n, t);
|
|
261
261
|
return r.collapsed ? r : it(n, t, a("chart.other", "Other"));
|
|
262
|
-
}),
|
|
262
|
+
}), h = () => {
|
|
263
263
|
const n = y();
|
|
264
264
|
return n.collapsed && n.frame ? an(n.frame, t, n.frame.rows.length - 1) : void 0;
|
|
265
|
-
},
|
|
265
|
+
}, L = R(() => H() || !y().collapsed ? C() : y().frame), B = R(() => {
|
|
266
266
|
var n;
|
|
267
|
-
return
|
|
267
|
+
return L() ? Ft(L(), t.encoding, t.valueAxis, (n = t.presentation) == null ? void 0 : n.valueSpreadThreshold) : !1;
|
|
268
268
|
}), O = R(() => {
|
|
269
|
-
if (!o.data ||
|
|
269
|
+
if (!o.data || H()) return o.data;
|
|
270
270
|
const n = st(o.data, t);
|
|
271
271
|
return n.collapsed ? n.frame : it(o.data, t, a("chart.other", "Other")).frame;
|
|
272
|
-
}),
|
|
272
|
+
}), f = R(() => {
|
|
273
273
|
var r, s;
|
|
274
274
|
if (!o.data || X().size === 0 || !t.encoding.value || ((r = t.radial) == null ? void 0 : r.mode) === "partition") return;
|
|
275
275
|
const n = o.data.columns.findIndex((d) => d.name === t.encoding.value);
|
|
@@ -284,15 +284,15 @@ function to(e) {
|
|
|
284
284
|
}), N = () => {
|
|
285
285
|
var n;
|
|
286
286
|
return X().size > 0 && (((n = C()) == null ? void 0 : n.rows.length) ?? 0) === 0;
|
|
287
|
-
},
|
|
287
|
+
}, V = () => {
|
|
288
288
|
var n, r;
|
|
289
289
|
return ((r = ((n = o.data) == null ? void 0 : n.presentation) ?? t.presentation) == null ? void 0 : r.keepTotalBadge) === !0;
|
|
290
|
-
}, ce = () => o.data && (o.data.rows.length > 0 ||
|
|
290
|
+
}, ce = () => o.data && (o.data.rows.length > 0 || V()) ? o.data.total ?? (V() || _e() || t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? T() : void 0) ?? t.total : void 0, me = R(() => ce() === void 0 || N() && !V() ? null : X().size > 0 ? f() ?? null : ce()), de = () => {
|
|
291
291
|
var n;
|
|
292
292
|
return ((n = o.data) == null ? void 0 : n.presentation) ?? t.presentation;
|
|
293
293
|
}, p = () => {
|
|
294
294
|
var n;
|
|
295
|
-
return (n =
|
|
295
|
+
return (n = L()) == null ? void 0 : n.colors;
|
|
296
296
|
}, F = (n) => {
|
|
297
297
|
const r = new Set(X());
|
|
298
298
|
r.has(n) ? r.delete(n) : r.add(n), c(r);
|
|
@@ -302,10 +302,10 @@ function to(e) {
|
|
|
302
302
|
var r;
|
|
303
303
|
return !!((r = rt(ee(), n)) != null && r.target);
|
|
304
304
|
};
|
|
305
|
-
}),
|
|
305
|
+
}), P = R(() => ut(o.data, t)), U = R(() => gt(m.theme, t, o.data, !_e())), Se = R(() => mt(m.theme, t, {
|
|
306
306
|
colors: p(),
|
|
307
307
|
positional: !_e(),
|
|
308
|
-
labels:
|
|
308
|
+
labels: P()
|
|
309
309
|
})), Ee = R(() => {
|
|
310
310
|
var r;
|
|
311
311
|
const n = new Set(se());
|
|
@@ -325,40 +325,40 @@ function to(e) {
|
|
|
325
325
|
window: u
|
|
326
326
|
}) => De.average(u) === n);
|
|
327
327
|
if (r) {
|
|
328
|
-
|
|
328
|
+
Z((u) => u === r.window ? void 0 : r.window);
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
ge((u) => {
|
|
332
|
-
const
|
|
333
|
-
return
|
|
332
|
+
const z = new Set(u);
|
|
333
|
+
return z.has(n) ? z.delete(n) : z.add(n), z;
|
|
334
334
|
});
|
|
335
335
|
}, j = (ae === "line" || ae === "area") && t.temporal && (t.temporal.regression || (tt = t.temporal.movingAverages) != null && tt.length) ? (() => {
|
|
336
336
|
var n = ln();
|
|
337
337
|
return i(n, (() => {
|
|
338
|
-
var r =
|
|
338
|
+
var r = q(() => !!t.temporal.regression);
|
|
339
339
|
return () => r() && (() => {
|
|
340
340
|
var s = sn();
|
|
341
|
-
return s.$$click = () => Q((d) => !d), i(s, () => a("chart.regression", "Trend")), Y(() =>
|
|
341
|
+
return s.$$click = () => Q((d) => !d), i(s, () => a("chart.regression", "Trend")), Y(() => E(s, "aria-pressed", oe())), s;
|
|
342
342
|
})();
|
|
343
343
|
})(), null), i(n, (() => {
|
|
344
|
-
var r =
|
|
344
|
+
var r = q(() => {
|
|
345
345
|
var s;
|
|
346
346
|
return !!((s = t.temporal.movingAverages) != null && s.length);
|
|
347
347
|
});
|
|
348
348
|
return () => r() && (() => {
|
|
349
349
|
var s = cn(), d = s.firstChild;
|
|
350
|
-
return s.addEventListener("change", (u) =>
|
|
350
|
+
return s.addEventListener("change", (u) => Z(u.target.value ? Number(u.target.value) : void 0)), i(d, () => a("chart.movingAverage", "Moving average")), i(s, K(Ge, {
|
|
351
351
|
get each() {
|
|
352
352
|
return t.temporal.movingAverages;
|
|
353
353
|
},
|
|
354
354
|
children: ({
|
|
355
355
|
window: u,
|
|
356
|
-
label:
|
|
356
|
+
label: z
|
|
357
357
|
}) => (() => {
|
|
358
358
|
var te = dn();
|
|
359
|
-
return te.value = u, i(te,
|
|
359
|
+
return te.value = u, i(te, z || `SMA ${u}`), te;
|
|
360
360
|
})()
|
|
361
|
-
}), null), Y(() =>
|
|
361
|
+
}), null), Y(() => E(s, "aria-label", a("chart.movingAverage", "Moving average"))), Y(() => s.value = w() ?? ""), s;
|
|
362
362
|
})();
|
|
363
363
|
})(), null), n;
|
|
364
364
|
})() : void 0, pe = R(() => ({
|
|
@@ -383,27 +383,27 @@ function to(e) {
|
|
|
383
383
|
copied: a("explore.copied", "Copied")
|
|
384
384
|
})), ye = R(() => {
|
|
385
385
|
var n, r;
|
|
386
|
-
return
|
|
386
|
+
return L() ? {
|
|
387
387
|
kind: ae,
|
|
388
|
-
frame:
|
|
388
|
+
frame: L(),
|
|
389
389
|
encoding: t.encoding,
|
|
390
390
|
format: I,
|
|
391
391
|
formatAxis: b,
|
|
392
|
-
formatTooltip: (s, d, u) => jt(d, u, t.format[s],
|
|
392
|
+
formatTooltip: (s, d, u) => jt(d, u, t.format[s], m.meta.locale),
|
|
393
393
|
// The plot abbreviates because a label has to fit beside a mark; the
|
|
394
394
|
// tooltip is where a reader who stopped to point gets the whole number, and
|
|
395
395
|
// the clipboard gets the machine value behind it.
|
|
396
396
|
formatExact: (s, d) => {
|
|
397
397
|
var u;
|
|
398
|
-
return Zt(d, t.format[s], ((u =
|
|
398
|
+
return Zt(d, t.format[s], ((u = m.meta) == null ? void 0 : u.locale) ?? "en");
|
|
399
399
|
},
|
|
400
400
|
rawValue: (s, d) => Wt(d, t.format[s]),
|
|
401
401
|
categoryFormatDefined: !!(t.encoding.category && t.format[t.encoding.category]),
|
|
402
|
-
locale: (n =
|
|
402
|
+
locale: (n = m.meta) == null ? void 0 : n.locale,
|
|
403
403
|
shareDecimalSeparator: t.encoding.value ? (r = t.format[t.encoding.value]) == null ? void 0 : r.decimalSeparator : void 0,
|
|
404
404
|
tooltipTotalLabel: a("panel.total", "Total"),
|
|
405
405
|
labels: pe(),
|
|
406
|
-
theme:
|
|
406
|
+
theme: m.theme,
|
|
407
407
|
// An explicit pick wins; otherwise the mark the page is currently filtered
|
|
408
408
|
// by carries the same outline, so the source panel states its own selection
|
|
409
409
|
// across a reload or a shared URL, not only in the click that made it.
|
|
@@ -431,7 +431,7 @@ function to(e) {
|
|
|
431
431
|
format: (d) => I(n ?? "", d),
|
|
432
432
|
isTime: ((r = o.data) == null ? void 0 : r.columns.some((d) => d.name === n && d.type === "time")) === !0,
|
|
433
433
|
hasDeclaredFormat: !!(n && t.format[n]),
|
|
434
|
-
locale: (s =
|
|
434
|
+
locale: (s = m.meta) == null ? void 0 : s.locale
|
|
435
435
|
}),
|
|
436
436
|
hidden: Ee()
|
|
437
437
|
});
|
|
@@ -440,7 +440,7 @@ function to(e) {
|
|
|
440
440
|
return G() ? fe ? !!(((n = ee()) == null ? void 0 : n.children.length) ?? t.drillRoot) : Ie() : !!x.action;
|
|
441
441
|
}, Je = ae === "histogram" || ae === "boxplot" || ae === "heatmap", Ve = () => Te() && !Je, je = (n, r, s) => {
|
|
442
442
|
const d = y(), u = d.frame ? d.frame.rows.length - 1 : -1;
|
|
443
|
-
if (d.collapsed && !!(n ===
|
|
443
|
+
if (d.collapsed && !!(n === h() || d.frame && lt(d.frame, t, n) === u)) {
|
|
444
444
|
v((ue) => !ue);
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
@@ -459,10 +459,10 @@ function to(e) {
|
|
|
459
459
|
ee() && !(te != null && te.target) || (S(n), _((te == null ? void 0 : te.key) ?? n, t.id));
|
|
460
460
|
}, [wt, pt] = le(), Xe = () => {
|
|
461
461
|
var n, r;
|
|
462
|
-
return !!
|
|
463
|
-
}, yt = () => !Ve() && he().length > 0 && !!
|
|
462
|
+
return !!L() && (!Ve() && ((n = de()) == null ? void 0 : n.legend) === "below" || nn(ae, wt(), (r = de()) == null ? void 0 : r.sliceLabels));
|
|
463
|
+
}, yt = () => !Ve() && he().length > 0 && !!L(), Ce = () => He() || y().collapsed, bt = t.encoding.category ?? t.encoding.label, et = () => {
|
|
464
464
|
var n;
|
|
465
|
-
return (ae === "line" || ae === "area") && ((n =
|
|
465
|
+
return (ae === "line" || ae === "area") && ((n = L()) == null ? void 0 : n.columns.some((r) => r.name === bt && r.type === "time")) === !0;
|
|
466
466
|
}, Pe = () => he().find((n) => n.kind === "incomplete" && n.active), St = () => be() ? a("chart.filterHint", "Select to filter the page") : a("chart.drillHint", "Select to explore"), Le = R(() => ye() && He() ? {
|
|
467
467
|
...ye(),
|
|
468
468
|
actionHint: St()
|
|
@@ -479,7 +479,7 @@ function to(e) {
|
|
|
479
479
|
var n = wn(), r = n.firstChild;
|
|
480
480
|
return i(r, K(ne, {
|
|
481
481
|
get when() {
|
|
482
|
-
return
|
|
482
|
+
return q(() => {
|
|
483
483
|
var s, d;
|
|
484
484
|
return ((s = de()) == null ? void 0 : s.totalBadge) === "plot" && ae !== "donut" && ((d = t.radial) == null ? void 0 : d.mode) !== "partition";
|
|
485
485
|
})() && me() !== null;
|
|
@@ -494,7 +494,7 @@ function to(e) {
|
|
|
494
494
|
}
|
|
495
495
|
}), null), i(r, K(ne, {
|
|
496
496
|
get when() {
|
|
497
|
-
return
|
|
497
|
+
return B() || Pe() || et() || we() || H() && y().collapsed;
|
|
498
498
|
},
|
|
499
499
|
get children() {
|
|
500
500
|
var s = vn(), d = s.firstChild;
|
|
@@ -508,13 +508,13 @@ function to(e) {
|
|
|
508
508
|
}
|
|
509
509
|
}), d), i(s, K(ne, {
|
|
510
510
|
get when() {
|
|
511
|
-
return
|
|
511
|
+
return B();
|
|
512
512
|
},
|
|
513
513
|
get children() {
|
|
514
|
-
var u = gn(),
|
|
514
|
+
var u = gn(), z = u.firstChild;
|
|
515
515
|
return i(u, K(Gt, {
|
|
516
516
|
"aria-hidden": "true"
|
|
517
|
-
}),
|
|
517
|
+
}), z), i(z, () => a("chart.logScale", "Logarithmic scale")), Y(() => E(u, "title", a("chart.logScaleHint", "Values are shown on a logarithmic scale"))), u;
|
|
518
518
|
}
|
|
519
519
|
}), d), i(s, K(ne, {
|
|
520
520
|
get when() {
|
|
@@ -526,7 +526,7 @@ function to(e) {
|
|
|
526
526
|
}
|
|
527
527
|
}), d), i(d, K(ne, {
|
|
528
528
|
get when() {
|
|
529
|
-
return
|
|
529
|
+
return q(() => !!H())() && y().collapsed;
|
|
530
530
|
},
|
|
531
531
|
get children() {
|
|
532
532
|
var u = hn();
|
|
@@ -538,7 +538,7 @@ function to(e) {
|
|
|
538
538
|
},
|
|
539
539
|
get children() {
|
|
540
540
|
var u = fn();
|
|
541
|
-
return u.$$click = () => M((
|
|
541
|
+
return u.$$click = () => M((z) => z + 1), i(u, () => a("chart.resetZoom", "Reset zoom")), u;
|
|
542
542
|
}
|
|
543
543
|
}), null), s;
|
|
544
544
|
}
|
|
@@ -553,7 +553,7 @@ function to(e) {
|
|
|
553
553
|
}
|
|
554
554
|
}), null), i(r, K(ne, {
|
|
555
555
|
get when() {
|
|
556
|
-
return
|
|
556
|
+
return q(() => !!(!N() && Le()))() && Ve();
|
|
557
557
|
},
|
|
558
558
|
get children() {
|
|
559
559
|
return K(Dn, {
|
|
@@ -571,7 +571,7 @@ function to(e) {
|
|
|
571
571
|
}
|
|
572
572
|
}), null), i(r, K(ne, {
|
|
573
573
|
get when() {
|
|
574
|
-
return
|
|
574
|
+
return q(() => !!(!N() && Le()))() && !Ve();
|
|
575
575
|
},
|
|
576
576
|
get children() {
|
|
577
577
|
return [K(rn, {
|
|
@@ -619,7 +619,7 @@ function to(e) {
|
|
|
619
619
|
return Ce() ? je : void 0;
|
|
620
620
|
},
|
|
621
621
|
get resetZoomKey() {
|
|
622
|
-
return
|
|
622
|
+
return g();
|
|
623
623
|
}
|
|
624
624
|
})];
|
|
625
625
|
}
|
|
@@ -637,7 +637,7 @@ function to(e) {
|
|
|
637
637
|
}
|
|
638
638
|
}), null), i(n, K(ne, {
|
|
639
639
|
get when() {
|
|
640
|
-
return
|
|
640
|
+
return q(() => !!Xe())() && O();
|
|
641
641
|
},
|
|
642
642
|
get children() {
|
|
643
643
|
return K(Wn, {
|
|
@@ -665,68 +665,68 @@ function to(e) {
|
|
|
665
665
|
function zn(e) {
|
|
666
666
|
const t = Fe();
|
|
667
667
|
return (() => {
|
|
668
|
-
var o = pn(), a = o.firstChild,
|
|
669
|
-
return i(a, () => t("chart.allSeriesHidden", "All series are hidden")), $t(
|
|
668
|
+
var o = pn(), a = o.firstChild, m = a.nextSibling;
|
|
669
|
+
return i(a, () => t("chart.allSeriesHidden", "All series are hidden")), $t(m, "click", e.onShowAll, !0), i(m, () => t("chart.showAllSeries", "Show all series")), o;
|
|
670
670
|
})();
|
|
671
671
|
}
|
|
672
672
|
function Dn(e) {
|
|
673
673
|
var oe, Q;
|
|
674
|
-
const t = Fe(), o = [e.panel.encoding.category, e.panel.encoding.label].find((w) => w !== void 0 && e.frame.columns.some((
|
|
674
|
+
const t = Fe(), o = [e.panel.encoding.category, e.panel.encoding.label].find((w) => w !== void 0 && e.frame.columns.some((Z) => Z.name === w)), a = e.panel.encoding.value, m = e.frame.columns.findIndex((w) => w.name === o), l = e.frame.columns.findIndex((w) => w.name === a), _ = D(a ? e.panel.format[a] : void 0), I = l < 0 ? void 0 : e.frame.rows.reduce((w, Z) => w + (ve(Z[l]) ?? 0), 0), b = m < 0 || (oe = e.frame.rows[0]) == null ? void 0 : oe[m], $ = ke(b), S = _(I), H = e.panel.encoding.id ?? o, v = e.frame.columns.findIndex((w) => w.name === H), g = ke(v < 0 || (Q = e.frame.rows[0]) == null ? void 0 : Q[v]), M = q(() => q(() => e.frame.rows.length === 0)() ? (() => {
|
|
675
675
|
var w = yn();
|
|
676
676
|
return i(w, () => t("panel.empty", "No data")), w;
|
|
677
677
|
})() : [$ && (() => {
|
|
678
678
|
var w = Sn();
|
|
679
|
-
return
|
|
679
|
+
return E(w, "title", $), i(w, $), w;
|
|
680
680
|
})(), (() => {
|
|
681
681
|
var w = bn();
|
|
682
682
|
return i(w, S), w;
|
|
683
|
-
})()]),
|
|
684
|
-
return e.actionable &&
|
|
683
|
+
})()]), W = e.frame.rows.length === 0 ? t("panel.empty", "No data") : [$, S].filter(Boolean).join(" / ");
|
|
684
|
+
return e.actionable && g && e.frame.rows.length > 0 ? (() => {
|
|
685
685
|
var w = $n();
|
|
686
686
|
return w.$$click = () => {
|
|
687
|
-
var
|
|
688
|
-
return (
|
|
689
|
-
}, i(w, M), Y(() =>
|
|
690
|
-
name: $ ??
|
|
687
|
+
var Z;
|
|
688
|
+
return (Z = e.onSelect) == null ? void 0 : Z.call(e, g);
|
|
689
|
+
}, i(w, M), Y(() => E(w, "aria-label", `${W}. ${t("chart.openMark", "Open {name}", {
|
|
690
|
+
name: $ ?? g
|
|
691
691
|
})}`)), w;
|
|
692
692
|
})() : (() => {
|
|
693
693
|
var w = xn();
|
|
694
|
-
return
|
|
694
|
+
return E(w, "aria-label", W), i(w, M), w;
|
|
695
695
|
})();
|
|
696
696
|
}
|
|
697
697
|
function qn(e) {
|
|
698
|
-
const t = Fe(), o =
|
|
698
|
+
const t = Fe(), o = D(e.panel.encoding.value ? e.panel.format[e.panel.encoding.value] : void 0);
|
|
699
699
|
return (() => {
|
|
700
|
-
var a = _n(),
|
|
701
|
-
return
|
|
700
|
+
var a = _n(), m = a.firstChild, l = m.firstChild;
|
|
701
|
+
return m.nextSibling, i(m, () => t("panel.total", "Total"), l), i(a, () => o(e.total), null), a;
|
|
702
702
|
})();
|
|
703
703
|
}
|
|
704
704
|
function Wn(e) {
|
|
705
705
|
var Ne, Re;
|
|
706
706
|
const t = e.panel, o = e.frame, {
|
|
707
707
|
document: a,
|
|
708
|
-
navigation:
|
|
708
|
+
navigation: m
|
|
709
709
|
} = dt(), l = Fe(), [_, I] = le("");
|
|
710
710
|
let b;
|
|
711
711
|
const [$, S] = le({
|
|
712
712
|
top: !1,
|
|
713
713
|
bottom: !1
|
|
714
|
-
}), [
|
|
714
|
+
}), [H, v] = le(0), [g, M] = le(!1), W = ft(o, t), oe = W >= 0 ? t.encoding.series : [t.encoding.label, t.encoding.category].find((c) => c !== void 0 && o.columns.some((C) => C.name === c)), Q = t.encoding.value, w = D(Q ? t.format[Q] : void 0), Z = o.columns.findIndex((c) => c.name === oe), se = o.columns.findIndex((c) => c.name === Q), ge = D(oe ? t.format[oe] : void 0), J = () => m.panelId === t.id && m.path.length > 0, re = ut(o, t), X = gt(a.theme, t, o, !J()), _e = mt(a.theme, t, {
|
|
715
715
|
colors: o.colors,
|
|
716
716
|
positional: !J(),
|
|
717
717
|
labels: re
|
|
718
718
|
}), ee = t.encoding.id ? o.columns.findIndex((c) => c.name === t.encoding.id) : -1, Ie = t.encoding.series ? o.columns.findIndex((c) => c.name === t.encoding.series) : -1, G = ((Ne = t.radial) == null ? void 0 : Ne.mode) === "partition", x = R(() => {
|
|
719
719
|
var me, de;
|
|
720
720
|
const c = o.rows.map((p, F) => {
|
|
721
|
-
const A = ee >= 0 ? p[ee] : p[
|
|
721
|
+
const A = ee >= 0 ? p[ee] : p[Z];
|
|
722
722
|
return String(typeof A == "string" || typeof A == "number" || typeof A == "bigint" ? A : F);
|
|
723
723
|
}), C = o.rows.map((p, F) => {
|
|
724
|
-
if (
|
|
725
|
-
const A = p[
|
|
724
|
+
if (W < 0) return c[F];
|
|
725
|
+
const A = p[W];
|
|
726
726
|
return String(typeof A == "string" || typeof A == "number" || typeof A == "bigint" ? A : F);
|
|
727
727
|
});
|
|
728
728
|
let y = o.rows.map((p, F) => F);
|
|
729
|
-
if (
|
|
729
|
+
if (W >= 0 || G) {
|
|
730
730
|
const p = /* @__PURE__ */ new Set();
|
|
731
731
|
y = [];
|
|
732
732
|
for (let F = 0; F < o.rows.length; F += 1) {
|
|
@@ -734,38 +734,38 @@ function Wn(e) {
|
|
|
734
734
|
p.has(A) || (p.add(A), y.push(F));
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
const
|
|
737
|
+
const h = y.map((p) => C[p]), L = new Map(y.map((p, F) => [p, F])), B = /* @__PURE__ */ new Map();
|
|
738
738
|
G && c.forEach((p) => {
|
|
739
|
-
|
|
739
|
+
B.has(p) || B.set(p, B.size);
|
|
740
740
|
});
|
|
741
|
-
const O = new Map((((me = t.radial) == null ? void 0 : me.rings) ?? []).map((p) => [p.key, p.total])),
|
|
741
|
+
const O = new Map((((me = t.radial) == null ? void 0 : me.rings) ?? []).map((p) => [p.key, p.total])), f = /* @__PURE__ */ new Map();
|
|
742
742
|
for (let p = 0; p < o.rows.length; p += 1) {
|
|
743
|
-
const F = Ie >= 0 ? (de = o.rows[p]) == null ? void 0 : de[Ie] : void 0, A = G && typeof F == "string" ? F : "",
|
|
744
|
-
denominator:
|
|
743
|
+
const F = Ie >= 0 ? (de = o.rows[p]) == null ? void 0 : de[Ie] : void 0, A = G && typeof F == "string" ? F : "", P = G ? O.get(A) ?? e.total : e.total, U = G ? A : String(P), Se = f.get(U) ?? {
|
|
744
|
+
denominator: P,
|
|
745
745
|
indices: []
|
|
746
746
|
};
|
|
747
|
-
Se.indices.push(p),
|
|
747
|
+
Se.indices.push(p), f.set(U, Se);
|
|
748
748
|
}
|
|
749
749
|
const T = /* @__PURE__ */ new Map();
|
|
750
750
|
for (const {
|
|
751
751
|
denominator: p,
|
|
752
752
|
indices: F
|
|
753
|
-
} of
|
|
754
|
-
const A = F.map((
|
|
753
|
+
} of f.values()) {
|
|
754
|
+
const A = F.map((P) => {
|
|
755
755
|
var U;
|
|
756
|
-
return se >= 0 ? ve((U = o.rows[
|
|
756
|
+
return se >= 0 ? ve((U = o.rows[P]) == null ? void 0 : U[se]) : void 0;
|
|
757
757
|
});
|
|
758
|
-
Rt(A, p).forEach((
|
|
758
|
+
Rt(A, p).forEach((P, U) => T.set(F[U], P));
|
|
759
759
|
}
|
|
760
760
|
const N = /* @__PURE__ */ new Map();
|
|
761
761
|
G && c.forEach((p) => N.set(p, (N.get(p) ?? 0) + 1));
|
|
762
|
-
const
|
|
762
|
+
const V = /* @__PURE__ */ new Map();
|
|
763
763
|
se >= 0 && o.rows.forEach((p, F) => {
|
|
764
764
|
var U;
|
|
765
765
|
const A = ve(p[se]);
|
|
766
766
|
if (A === void 0) return;
|
|
767
|
-
const
|
|
768
|
-
|
|
767
|
+
const P = C[F];
|
|
768
|
+
W >= 0 && Q && ((U = t.format[Q]) == null ? void 0 : U.kind) !== "percent" ? V.set(P, (V.get(P) ?? 0) + A) : V.set(P, A);
|
|
769
769
|
});
|
|
770
770
|
const ce = /* @__PURE__ */ new Map();
|
|
771
771
|
return G && Ie >= 0 && y.forEach((p) => {
|
|
@@ -773,43 +773,43 @@ function Wn(e) {
|
|
|
773
773
|
const F = (A = o.rows[p]) == null ? void 0 : A[Ie];
|
|
774
774
|
typeof F == "string" && ce.set(p, F);
|
|
775
775
|
}), {
|
|
776
|
-
allKeys:
|
|
777
|
-
categoryOrder:
|
|
776
|
+
allKeys: h,
|
|
777
|
+
categoryOrder: B,
|
|
778
778
|
entries: y,
|
|
779
779
|
entryKeys: C,
|
|
780
|
-
entryPositions:
|
|
780
|
+
entryPositions: L,
|
|
781
781
|
ringByIndex: ce,
|
|
782
782
|
rowKeys: c,
|
|
783
783
|
rowsPerKey: N,
|
|
784
784
|
shares: T,
|
|
785
|
-
valueByKey:
|
|
785
|
+
valueByKey: V
|
|
786
786
|
};
|
|
787
787
|
}), ie = (c, C, y) => {
|
|
788
|
-
var
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
return _e(c, x().categoryOrder.get(x().rowKeys[C]) ?? C,
|
|
792
|
-
}, Me = ((Re = e.presentation) == null ? void 0 : Re.legendValue) === "percent", Ae = (c) =>
|
|
788
|
+
var B;
|
|
789
|
+
if (W >= 0) return X(x().entryKeys[C], y);
|
|
790
|
+
const h = ee >= 0 ? (B = o.rows[C]) == null ? void 0 : B[ee] : void 0, L = typeof h == "string" && h.trim() !== "" ? h : void 0;
|
|
791
|
+
return _e(c, x().categoryOrder.get(x().rowKeys[C]) ?? C, L);
|
|
792
|
+
}, Me = ((Re = e.presentation) == null ? void 0 : Re.legendValue) === "percent", Ae = (c) => W >= 0 ? "value" : Me ? "percent" : G ? x().rowsPerKey.get(x().rowKeys[c]) === 1 ? "percent" : "none" : "value", Oe = () => _().trim().toLocaleLowerCase(), Ke = R(() => Oe() === "" ? x().entries : x().entries.filter((c) => {
|
|
793
793
|
var y;
|
|
794
|
-
const C = (y = o.rows[c]) == null ? void 0 : y[
|
|
794
|
+
const C = (y = o.rows[c]) == null ? void 0 : y[Z];
|
|
795
795
|
return ke(C).toLocaleLowerCase().includes(Oe());
|
|
796
796
|
}));
|
|
797
797
|
xe(() => {
|
|
798
798
|
const c = b;
|
|
799
799
|
if (!c) return;
|
|
800
|
-
|
|
800
|
+
g(), Ke().length;
|
|
801
801
|
const C = () => {
|
|
802
|
-
const
|
|
802
|
+
const h = c.scrollTop + c.clientHeight, L = c.scrollHeight > c.clientHeight + 1;
|
|
803
803
|
if (S({
|
|
804
|
-
top:
|
|
805
|
-
bottom:
|
|
806
|
-
}), !
|
|
804
|
+
top: L && c.scrollTop > 1,
|
|
805
|
+
bottom: L && h < c.scrollHeight - 1
|
|
806
|
+
}), !L) {
|
|
807
807
|
v(0);
|
|
808
808
|
return;
|
|
809
809
|
}
|
|
810
|
-
const
|
|
810
|
+
const B = c.querySelectorAll(".lens-chart-legend-item");
|
|
811
811
|
let O = 0;
|
|
812
|
-
for (const
|
|
812
|
+
for (const f of B) f.offsetTop + f.offsetHeight > h + 1 && (O += 1);
|
|
813
813
|
v(O);
|
|
814
814
|
};
|
|
815
815
|
C(), c.addEventListener("scroll", C, {
|
|
@@ -825,115 +825,116 @@ function Wn(e) {
|
|
|
825
825
|
e.onSetHidden(C ? /* @__PURE__ */ new Set() : new Set(x().allKeys.filter((y) => y !== c)));
|
|
826
826
|
}, we = () => x().allKeys.length > 0 && x().allKeys.every((c) => e.hidden.has(c)), Ze = () => x().allKeys.every((c) => !e.hidden.has(c)), ae = () => x().allKeys.length > Mn, Te = () => x().entries.length >= Bn;
|
|
827
827
|
return K(ne, {
|
|
828
|
-
when:
|
|
828
|
+
when: Z >= 0,
|
|
829
829
|
get children() {
|
|
830
830
|
var c = In(), C = c.firstChild, y = C.firstChild;
|
|
831
831
|
return i(c, (() => {
|
|
832
|
-
var
|
|
833
|
-
return () =>
|
|
834
|
-
var
|
|
835
|
-
return i(
|
|
836
|
-
var O =
|
|
832
|
+
var h = q(() => !!ae());
|
|
833
|
+
return () => h() && (() => {
|
|
834
|
+
var L = Cn(), B = L.firstChild;
|
|
835
|
+
return i(B, (() => {
|
|
836
|
+
var O = q(() => !!Te());
|
|
837
837
|
return () => O() ? [(() => {
|
|
838
|
-
var
|
|
839
|
-
return
|
|
838
|
+
var f = Qe();
|
|
839
|
+
return f.$$click = () => e.onSetHidden(new Set(x().allKeys)), i(f, () => l("chart.legendHideAll", "Hide all")), Y(() => E(f, "aria-pressed", we())), f;
|
|
840
840
|
})(), (() => {
|
|
841
|
-
var
|
|
842
|
-
return
|
|
841
|
+
var f = Qe();
|
|
842
|
+
return f.$$click = () => e.onSetHidden(/* @__PURE__ */ new Set()), i(f, () => l("chart.legendShowAll", "Show all")), Y(() => E(f, "aria-pressed", Ze())), f;
|
|
843
843
|
})(), (() => {
|
|
844
|
-
var
|
|
845
|
-
return
|
|
846
|
-
var N = l("chart.legendInvert", "Invert"),
|
|
847
|
-
return N !== T.e &&
|
|
844
|
+
var f = Ln();
|
|
845
|
+
return f.$$click = () => e.onSetHidden(new Set(x().allKeys.filter((T) => !e.hidden.has(T)))), i(f, K(Xt, {})), Y((T) => {
|
|
846
|
+
var N = l("chart.legendInvert", "Invert"), V = l("chart.legendInvert", "Invert");
|
|
847
|
+
return N !== T.e && E(f, "aria-label", T.e = N), V !== T.t && E(f, "title", T.t = V), T;
|
|
848
848
|
}, {
|
|
849
849
|
e: void 0,
|
|
850
850
|
t: void 0
|
|
851
|
-
}),
|
|
851
|
+
}), f;
|
|
852
852
|
})()] : (() => {
|
|
853
|
-
var
|
|
854
|
-
return
|
|
855
|
-
var T =
|
|
853
|
+
var f = Qe();
|
|
854
|
+
return f.$$click = () => e.onSetHidden(we() ? /* @__PURE__ */ new Set() : new Set(x().allKeys)), i(f, (() => {
|
|
855
|
+
var T = q(() => !!we());
|
|
856
856
|
return () => T() ? l("chart.legendShowAll", "Show all") : l("chart.legendHideAll", "Hide all");
|
|
857
|
-
})()),
|
|
857
|
+
})()), f;
|
|
858
858
|
})();
|
|
859
|
-
})()), i(
|
|
860
|
-
var O =
|
|
859
|
+
})()), i(L, (() => {
|
|
860
|
+
var O = q(() => !!Te());
|
|
861
861
|
return () => O() && (() => {
|
|
862
|
-
var
|
|
863
|
-
return i(T, () => l("chart.legendSearch", "Search legend")), N.addEventListener("change", (
|
|
862
|
+
var f = kn(), T = f.firstChild, N = T.nextSibling;
|
|
863
|
+
return i(T, () => l("chart.legendSearch", "Search legend")), N.addEventListener("change", (V) => I(V.currentTarget.value)), Y(() => E(N, "placeholder", l("chart.legendSearch", "Search legend"))), Y(() => N.value = _()), f;
|
|
864
864
|
})();
|
|
865
865
|
})(), null), Y((O) => {
|
|
866
|
-
var
|
|
867
|
-
return
|
|
866
|
+
var f = l("chart.legendControls", "Legend controls"), T = Te() ? "many" : "one";
|
|
867
|
+
return f !== O.e && E(B, "aria-label", O.e = f), T !== O.t && E(B, "data-members", O.t = T), O;
|
|
868
868
|
}, {
|
|
869
869
|
e: void 0,
|
|
870
870
|
t: void 0
|
|
871
|
-
}),
|
|
871
|
+
}), L;
|
|
872
872
|
})();
|
|
873
|
-
})(), C), xt((
|
|
874
|
-
b =
|
|
873
|
+
})(), C), xt((h) => {
|
|
874
|
+
b = h;
|
|
875
875
|
}, y), i(y, K(Ge, {
|
|
876
876
|
get each() {
|
|
877
877
|
return Ke();
|
|
878
878
|
},
|
|
879
|
-
children: (
|
|
879
|
+
children: (h, L) => {
|
|
880
880
|
var p, F, A;
|
|
881
|
-
const
|
|
881
|
+
const B = o.rows[h], O = x().entryPositions.get(h) ?? h, f = B[Z], T = f == null ? "" : ge(f), N = x().entryKeys[h], V = () => e.hidden.has(N), ce = x().ringByIndex.get(h), me = L() > 0 ? x().ringByIndex.get(Ke()[L() - 1]) : void 0, de = ((A = (F = (p = t.radial) == null ? void 0 : p.rings) == null ? void 0 : F.find((P) => P.key === ce)) == null ? void 0 : A.label) ?? ce;
|
|
882
882
|
return [ce && ce !== me && (() => {
|
|
883
|
-
var
|
|
884
|
-
return i(
|
|
883
|
+
var P = An();
|
|
884
|
+
return i(P, de), P;
|
|
885
885
|
})(), (() => {
|
|
886
|
-
var
|
|
886
|
+
var P = Fn(), U = P.firstChild, Se = U.firstChild, Ee = Se.nextSibling, Ue = Ee.nextSibling;
|
|
887
887
|
return U.$$dblclick = () => be(N), U.$$click = () => e.onToggle(N), i(Ee, T), i(U, (() => {
|
|
888
|
-
var j =
|
|
888
|
+
var j = q(() => Ae(h) !== "none");
|
|
889
889
|
return () => j() && (() => {
|
|
890
890
|
var pe = ht();
|
|
891
891
|
return i(pe, (() => {
|
|
892
|
-
var ye =
|
|
892
|
+
var ye = q(() => Ae(h) === "percent");
|
|
893
893
|
return () => {
|
|
894
894
|
var he, fe;
|
|
895
|
-
return ye() ? Et(x().shares.get(
|
|
895
|
+
return ye() ? Et(x().shares.get(h), (he = a.meta) == null ? void 0 : he.locale, Q ? (fe = t.format[Q]) == null ? void 0 : fe.decimalSeparator : void 0) : w(x().valueByKey.get(N));
|
|
896
896
|
};
|
|
897
897
|
})()), pe;
|
|
898
898
|
})();
|
|
899
899
|
})(), Ue), i(Ue, (() => {
|
|
900
|
-
var j =
|
|
900
|
+
var j = q(() => !!V());
|
|
901
901
|
return () => j() ? K(en, {}) : K(tn, {});
|
|
902
902
|
})()), Y((j) => {
|
|
903
|
-
var pe = !
|
|
904
|
-
return pe !== j.e &&
|
|
903
|
+
var pe = !V(), ye = `lens-chart-legend-toggle${V() ? " lens-chart-legend-hidden" : ""}`, he = `lens-panel-${t.id}-legend-series-${O}`, fe = l("chart.legendToggleHint", "Click to toggle · double-click to isolate"), He = ie(T, h, O);
|
|
904
|
+
return pe !== j.e && E(U, "aria-pressed", j.e = pe), ye !== j.t && Ye(U, j.t = ye), he !== j.a && E(U, "data-testid", j.a = he), fe !== j.o && E(U, "title", j.o = fe), He !== j.i && _t(Se, "background", j.i = He), j;
|
|
905
905
|
}, {
|
|
906
906
|
e: void 0,
|
|
907
907
|
t: void 0,
|
|
908
908
|
a: void 0,
|
|
909
909
|
o: void 0,
|
|
910
910
|
i: void 0
|
|
911
|
-
}),
|
|
911
|
+
}), P;
|
|
912
912
|
})()];
|
|
913
913
|
}
|
|
914
914
|
})), i(c, (() => {
|
|
915
|
-
var
|
|
916
|
-
return () =>
|
|
917
|
-
var
|
|
918
|
-
return
|
|
919
|
-
var
|
|
920
|
-
return () =>
|
|
921
|
-
count: String(
|
|
915
|
+
var h = q(() => !!(H() > 0 || g()));
|
|
916
|
+
return () => h() && (() => {
|
|
917
|
+
var L = Kn();
|
|
918
|
+
return L.$$click = () => M((B) => !B), i(L, (() => {
|
|
919
|
+
var B = q(() => !!g());
|
|
920
|
+
return () => B() ? l("chart.legendCollapse", "Show fewer") : l("chart.legendMore", "{count} more", {
|
|
921
|
+
count: String(H())
|
|
922
922
|
});
|
|
923
|
-
})()),
|
|
923
|
+
})()), L;
|
|
924
924
|
})();
|
|
925
|
-
})(), null), Y((
|
|
926
|
-
var
|
|
925
|
+
})(), null), Y((h) => {
|
|
926
|
+
var L = H() > 0 && !g() || void 0, B = g() ? {
|
|
927
927
|
"--lens-chart-legend-max": "none"
|
|
928
|
-
} : void 0,
|
|
929
|
-
return
|
|
928
|
+
} : void 0, O = $().bottom || void 0, f = $().top || void 0, T = l("chart.legendControls", "Legend controls"), N = `lens-panel-${t.id}-legend`, V = $().top || $().bottom ? 0 : void 0;
|
|
929
|
+
return L !== h.e && E(c, "data-collapsed", h.e = L), h.t = ct(c, B, h.t), O !== h.a && E(C, "data-overflow-bottom", h.a = O), f !== h.o && E(C, "data-overflow-top", h.o = f), T !== h.i && E(y, "aria-label", h.i = T), N !== h.n && E(y, "data-testid", h.n = N), V !== h.s && E(y, "tabindex", h.s = V), h;
|
|
930
930
|
}, {
|
|
931
931
|
e: void 0,
|
|
932
932
|
t: void 0,
|
|
933
933
|
a: void 0,
|
|
934
934
|
o: void 0,
|
|
935
935
|
i: void 0,
|
|
936
|
-
n: void 0
|
|
936
|
+
n: void 0,
|
|
937
|
+
s: void 0
|
|
937
938
|
}), c;
|
|
938
939
|
}
|
|
939
940
|
});
|
|
@@ -941,24 +942,24 @@ function Wn(e) {
|
|
|
941
942
|
function Zn(e) {
|
|
942
943
|
const t = Fe(), o = t("chart.legendOverlays", "Chart marks");
|
|
943
944
|
return (() => {
|
|
944
|
-
var a = Tn(),
|
|
945
|
-
return
|
|
945
|
+
var a = Tn(), m = a.firstChild;
|
|
946
|
+
return E(a, "aria-label", o), i(m, o), i(a, K(Ge, {
|
|
946
947
|
get each() {
|
|
947
948
|
return e.overlays;
|
|
948
949
|
},
|
|
949
950
|
children: (l) => (() => {
|
|
950
951
|
var _ = Rn(), I = _.firstChild, b = I.firstChild, $ = b.nextSibling;
|
|
951
952
|
return I.$$click = () => e.onToggle(l.id), i($, () => l.label), i(I, (() => {
|
|
952
|
-
var S =
|
|
953
|
+
var S = q(() => !!l.detail);
|
|
953
954
|
return () => S() && [En(), (() => {
|
|
954
|
-
var
|
|
955
|
-
return i(
|
|
955
|
+
var H = ht();
|
|
956
|
+
return i(H, () => l.detail), H;
|
|
956
957
|
})()];
|
|
957
958
|
})(), null), Y((S) => {
|
|
958
|
-
var
|
|
959
|
+
var H = l.active, v = `lens-chart-legend-toggle${l.active ? "" : " lens-chart-legend-hidden"}`, g = t("chart.legendToggleOverlay", "Show or hide this mark"), M = l.stroke, W = {
|
|
959
960
|
"--lens-overlay-ink": `var(${Tt(l.tone)})`
|
|
960
961
|
};
|
|
961
|
-
return
|
|
962
|
+
return H !== S.e && E(I, "aria-pressed", S.e = H), v !== S.t && Ye(I, S.t = v), g !== S.a && E(I, "title", S.a = g), M !== S.o && E(b, "data-stroke", S.o = M), S.i = ct(b, W, S.i), S;
|
|
962
963
|
}, {
|
|
963
964
|
e: void 0,
|
|
964
965
|
t: void 0,
|