@astrato-io/visualizations 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -25
- package/THIRD_PARTY_NOTICES.md +307 -378
- package/chunks/{Button-BrGKp9Nm.js → Button-5CxPEACP.js} +11 -11
- package/chunks/CircularProgress-DFS-LQb7.js +765 -0
- package/chunks/FieldTypeIcon-pSVQFemC.js +22 -0
- package/chunks/LinearProgress-CjIQfkNA.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-Cb7B7x6z.js} +1384 -1002
- package/chunks/Title-CtFw1bVg.js +1804 -0
- package/chunks/ToggleButton-Br9HCPCv.js +150 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-B9775gLJ.js} +3 -3
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-B7wlH_Ro.js} +4 -4
- package/chunks/{builder-DEDvNq1k.js → builder-Dxo7D7c6.js} +118 -55
- package/chunks/{coloring-CncX_JRX.js → coloring-B-Wa8D5P.js} +3 -3
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-DNpzD9tY.js} +26 -26
- package/chunks/{escobar-DRhRMYRE.js → escobar-C4Nm3eJ7.js} +4436 -4802
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-BVKFtoe-.js} +46 -46
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-BlS3zoy_.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-CGuLpg7u.js} +494 -270
- package/chunks/{handlers-TOT-7INo.js → handlers-CMbyj5y1.js} +1513 -1454
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-DYQgVEKG.js} +8 -8
- package/chunks/{isEqual-B8loyPsC.js → isEqual-DBg_b35N.js} +1 -1
- package/chunks/isFocusVisible-B1_z03UT.js +144 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-Bo9i9qag.js} +7 -7
- package/chunks/{logger-DpQtYQnX.js → logger-3lng-wOw.js} +7 -3
- package/chunks/{metadata-WABZrt7Y.js → metadata-Fmx1swpK.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CdLd5aGW.js} +7 -7
- package/chunks/{operations-Dh4v1Ovt.js → operations-HSqnCRvv.js} +9156 -9112
- package/chunks/{range-Bi-7zT0k.js → range-CzO4isKK.js} +2 -2
- package/chunks/react-dom-BwZT0N3F.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-CAuvgMxi.js} +1 -1
- package/chunks/{requirements-PAoRaJyb.js → requirements-CYpVh65U.js} +330 -302
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/{shared-Bn4N5QcZ.js → shared-DFoJxjVN.js} +401 -401
- package/chunks/{standalone-D__XCp-h.js → standalone-530a5lvf.js} +306 -306
- package/chunks/{standalone-CXNP6-xD.js → standalone-5DnapeHH.js} +112 -112
- package/chunks/{standalone-XTgSsTAa.js → standalone-B4jrf4KE.js} +70 -70
- package/chunks/{standalone-Bes8srx1.js → standalone-B6s_xG2u.js} +14 -14
- package/chunks/{standalone-DVTJwsTY.js → standalone-BDrQMxLi.js} +623 -614
- package/chunks/standalone-BMoJXGYe.js +2 -0
- package/chunks/{standalone-CLmGb7nn2.js → standalone-BfvGggeM2.js} +76 -76
- package/chunks/{standalone-D5Q5ngsD.js → standalone-BvWdpUL3.js} +26 -26
- package/chunks/{standalone-we5D5MIn.js → standalone-C6XDHYAM.js} +31 -31
- package/chunks/standalone-CMJJIi9v.js +2 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-CNkHsynO.js} +28 -28
- package/chunks/{standalone-BMTCb10X.js → standalone-CPUiiWNP.js} +5 -5
- package/chunks/{standalone-XuGksArp.js → standalone-CXniic5x.js} +9 -9
- package/chunks/standalone-C_Jd4gkj.js +6 -0
- package/chunks/{standalone-DW6NT205.js → standalone-CiaaibTa.js} +142 -142
- package/chunks/standalone-CoQxJ6ov.js +3638 -0
- package/chunks/{standalone-CM5XcAN5.js → standalone-Cu73fzSr.js} +7660 -7534
- package/chunks/standalone-DBeXQrwH.js +468 -0
- package/chunks/{standalone-DMcI1afI.js → standalone-DMCwtebn.js} +81 -81
- package/chunks/{standalone-BlMIwpEe.js → standalone-DWPfdP0A.js} +800 -668
- package/chunks/{standalone-DLlyRIE6.js → standalone-DpSRmAWx.js} +59 -59
- package/chunks/{standalone-BGkmozIb.js → standalone-DuwTOBXH.js} +256 -256
- package/chunks/{standalone-BDhPQtzQ.js → standalone-LFVgLhia.js} +234 -234
- package/chunks/{standalone-B55oyW6c.js → standalone-kzAhwH19.js} +149 -149
- package/chunks/{standalone-DN4S1MjT.js → standalone-mb7LwEiq.js} +885 -885
- package/chunks/{standalone-CJvIXsQE.js → standalone-r4ObFvys.js} +155 -155
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-C1qjqXaT.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-mWrD_uk_.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-DYYD4Zzf.js} +7593 -12707
- package/chunks/{view-BuwQugKb.js → view-7fH6mGmY.js} +2034 -2070
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-mVnsnvLP.js} +3581 -3555
- package/chunks/with-html-element-B0Clt4jY.js +15901 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +1 -1
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +2 -2
- package/docs/operations/line.md +1 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +66 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +1191 -3
- package/metadata.js +15 -16
- package/operations.js +5 -5
- package/package.json +67 -102
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +348 -348
- package/src/definitions/model/definitions/schema-registry.d.ts +101 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +8 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +29 -29
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/getters/index.d.ts +3 -3
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +3 -3
- package/src/runtime/index.d.ts +2 -2
- package/src/types.d.ts +4 -8
- package/src/visualization-catalog.d.ts +26 -26
- package/src/web-components/index.d.ts +3 -3
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/registry-KervaxqJ.js +0 -31
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-DT0wKji7.js +0 -6
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/web-components-DqClFkgO.js +0 -1185
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
- package/render.js +0 -10
- package/src/charts/bar.d.ts +0 -1
- package/src/charts/combo.d.ts +0 -1
- package/src/charts/dot.d.ts +0 -1
- package/src/charts/gauge-distribution.d.ts +0 -1
- package/src/charts/gauge.d.ts +0 -1
- package/src/charts/heat-map.d.ts +0 -1
- package/src/charts/histogram.d.ts +0 -1
- package/src/charts/line.d.ts +0 -1
- package/src/charts/pie.d.ts +0 -1
- package/src/charts/radar.d.ts +0 -1
- package/src/charts/sankey.d.ts +0 -1
- package/src/charts/scatter.d.ts +0 -1
- package/src/charts/table.d.ts +0 -1
- package/src/charts/tree.d.ts +0 -1
- package/src/charts/treemap.d.ts +0 -1
- package/src/charts/waterfall.d.ts +0 -1
- package/src/charts/word-cloud.d.ts +0 -1
- package/src/objects/app-filter-bar.d.ts +0 -1
- package/src/objects/date-picker.d.ts +0 -1
- package/src/objects/filter.d.ts +0 -1
- package/src/objects/iframe.d.ts +0 -1
- package/src/objects/image.d.ts +0 -1
- package/src/objects/number.d.ts +0 -1
- package/src/objects/shape.d.ts +0 -1
- package/src/objects/slider.d.ts +0 -1
- package/src/objects/text.d.ts +0 -1
- package/src/registry/create-visualization-registry.d.ts +0 -5
- package/src/render/index.d.ts +0 -34
- /package/chunks/{src-BOS6SqkZ.js → src-BOS6SqkZ2.js} +0 -0
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Hi as t, Kr as n, Ui as r, Us as i,
|
|
3
|
-
import {
|
|
4
|
-
import { Oi as
|
|
5
|
-
import { n as
|
|
6
|
-
import { s as
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import "./coloring-
|
|
11
|
-
import { s as
|
|
12
|
-
import { f as
|
|
13
|
-
import {
|
|
14
|
-
import { r as
|
|
15
|
-
|
|
2
|
+
import { Hi as t, Kr as n, Ui as r, Us as i, Ut as a, Wi as o, Wo as s, Yo as c, Yr as l, qr as u, ta as d, xs as f, zr as p } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { Ht as m, Jt as h, M as g, Ot as _, Yn as v, c as y, d as b, ei as x, fn as S, j as C, jr as ee, o as w, z as te } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { Oi as ne } from "./handlers-CMbyj5y1.js";
|
|
5
|
+
import { n as T } from "./isEqual-DBg_b35N.js";
|
|
6
|
+
import { s as re } from "./logger-3lng-wOw.js";
|
|
7
|
+
import { A as E, C as ie, D as ae, M as oe, N as se, S as ce, T as le, Xt as ue, a as de, b as fe, g as pe, h as me, k as he, m as ge, qt as _e, rn as D, v as ve } from "./escobar-C4Nm3eJ7.js";
|
|
8
|
+
import { _ as ye, z as be } from "./MenuOption-Cb7B7x6z.js";
|
|
9
|
+
import { t as xe } from "./ToggleButton-Br9HCPCv.js";
|
|
10
|
+
import "./coloring-B-Wa8D5P.js";
|
|
11
|
+
import { s as Se, t as Ce } from "./src-77e3mC7i.js";
|
|
12
|
+
import { f as we, r as Te, t as Ee, u as De, y as Oe } from "./src-D9XogOrc.js";
|
|
13
|
+
import { t as ke } from "./builder-Dxo7D7c6.js";
|
|
14
|
+
import { a as Ae, i as je, r as Me, t as Ne } from "./accessors-DemrDevR.js";
|
|
15
|
+
import { r as Pe, t as Fe } from "./src-BOS6SqkZ2.js";
|
|
16
|
+
var O = ee(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("svg", {
|
|
16
17
|
width: "16",
|
|
17
18
|
height: "16",
|
|
18
19
|
viewBox: "0 0 24 24",
|
|
19
20
|
fill: "none",
|
|
20
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
children: /* @__PURE__ */ (0,
|
|
22
|
+
children: /* @__PURE__ */ (0, O.jsx)("path", {
|
|
22
23
|
d: "M3 17.46V20.5C3 20.78 3.22 21 3.5 21H6.54C6.67 21 6.8 20.95 6.89 20.85L17.81 9.94L14.06 6.19L3.15 17.1C3.05 17.2 3 17.32 3 17.46ZM20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C17.98 2.9 17.35 2.9 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04Z",
|
|
23
24
|
fill: e
|
|
24
25
|
})
|
|
25
|
-
}),
|
|
26
|
+
}), k = /* @__PURE__ */ e(x()), Le = ({ vTheme: e, vSpec: r, id: i, layout: a }) => {
|
|
26
27
|
let o = e?.fonts?.general.fontFamily ?? "Roboto", s = {
|
|
27
28
|
...n,
|
|
28
29
|
...r.treeChartSettings?.nodeLayout?.border
|
|
29
30
|
};
|
|
30
31
|
s.enabled === !1 && (s.borderWidth = 0);
|
|
31
|
-
let
|
|
32
|
+
let c = {
|
|
32
33
|
...u,
|
|
33
34
|
...r.treeChartSettings?.nodeLayout.hoverStyle
|
|
34
|
-
}, d = r.treeChartSettings?.nodeLayout?.backgroundColor ??
|
|
35
|
+
}, d = r.treeChartSettings?.nodeLayout?.backgroundColor ?? l.backgroundColor, f = new ye(d).isLight() ? t.grey1 : t.grey5;
|
|
35
36
|
return `
|
|
36
37
|
#${i} {
|
|
37
38
|
&[data-mode="view"] .tree-toolbar {
|
|
@@ -49,8 +50,8 @@ var E = S(), Le = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, E.jsx)("sv
|
|
|
49
50
|
--border-radius: ${s.borderRadius}px;
|
|
50
51
|
--border-color-selected: ${t.grey2};
|
|
51
52
|
|
|
52
|
-
--border-hover-width: ${
|
|
53
|
-
--border-hover-color: ${
|
|
53
|
+
--border-hover-width: ${c.borderWidth}px;
|
|
54
|
+
--border-hover-color: ${c.borderColor || s.borderColor};
|
|
54
55
|
|
|
55
56
|
--node-background: ${d};
|
|
56
57
|
--node-background-highlight: ${t.grey2};
|
|
@@ -171,26 +172,26 @@ var E = S(), Le = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, E.jsx)("sv
|
|
|
171
172
|
}
|
|
172
173
|
|
|
173
174
|
${a.getCSS(i, r)}`;
|
|
174
|
-
},
|
|
175
|
-
function
|
|
175
|
+
}, Re = { depth: -1 }, ze = {}, Be = {};
|
|
176
|
+
function Ve(e) {
|
|
176
177
|
return e.id;
|
|
177
178
|
}
|
|
178
|
-
function
|
|
179
|
+
function He(e) {
|
|
179
180
|
return e.parentId;
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
-
var e =
|
|
182
|
+
function Ue() {
|
|
183
|
+
var e = Ve, t = He, n;
|
|
183
184
|
function r(r) {
|
|
184
185
|
var i = Array.from(r), a = e, o = t, s, c, l, u, d, f, p, m, h = /* @__PURE__ */ new Map();
|
|
185
186
|
if (n != null) {
|
|
186
|
-
let e = i.map((e, t) =>
|
|
187
|
-
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(
|
|
187
|
+
let e = i.map((e, t) => We(n(e, t, r))), t = e.map(Ge), s = new Set(e).add("");
|
|
188
|
+
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(Ge(n)), i.push(Be));
|
|
188
189
|
a = (t, n) => e[n], o = (e, n) => t[n];
|
|
189
190
|
}
|
|
190
|
-
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new
|
|
191
|
+
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new Me(c), (p = a(c, l, r)) != null && (p += "") && (m = f.id = p, h.set(m, h.has(m) ? ze : f)), (p = o(c, l, r)) != null && (p += "") && (f.parent = p);
|
|
191
192
|
for (l = 0; l < s; ++l) if (f = i[l], p = f.parent) {
|
|
192
193
|
if (d = h.get(p), !d) throw Error("missing: " + p);
|
|
193
|
-
if (d ===
|
|
194
|
+
if (d === ze) throw Error("ambiguous: " + p);
|
|
194
195
|
d.children ? d.children.push(f) : d.children = [f], f.parent = d;
|
|
195
196
|
} else {
|
|
196
197
|
if (u) throw Error("multiple roots");
|
|
@@ -198,34 +199,34 @@ function We() {
|
|
|
198
199
|
}
|
|
199
200
|
if (!u) throw Error("no root");
|
|
200
201
|
if (n != null) {
|
|
201
|
-
for (; u.data ===
|
|
202
|
-
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data ===
|
|
202
|
+
for (; u.data === Be && u.children.length === 1;) u = u.children[0], --s;
|
|
203
|
+
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data === Be); --e) f.data = null;
|
|
203
204
|
}
|
|
204
|
-
if (u.parent =
|
|
205
|
+
if (u.parent = Re, u.eachBefore(function(e) {
|
|
205
206
|
e.depth = e.parent.depth + 1, --s;
|
|
206
|
-
}).eachBefore(
|
|
207
|
+
}).eachBefore(je), u.parent = null, s > 0) throw Error("cycle");
|
|
207
208
|
return u;
|
|
208
209
|
}
|
|
209
210
|
return r.id = function(t) {
|
|
210
|
-
return arguments.length ? (e =
|
|
211
|
+
return arguments.length ? (e = Ne(t), r) : e;
|
|
211
212
|
}, r.parentId = function(e) {
|
|
212
|
-
return arguments.length ? (t =
|
|
213
|
+
return arguments.length ? (t = Ne(e), r) : t;
|
|
213
214
|
}, r.path = function(e) {
|
|
214
|
-
return arguments.length ? (n =
|
|
215
|
+
return arguments.length ? (n = Ne(e), r) : n;
|
|
215
216
|
}, r;
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
+
function We(e) {
|
|
218
219
|
e = `${e}`;
|
|
219
220
|
let t = e.length;
|
|
220
|
-
return
|
|
221
|
+
return Ke(e, t - 1) && !Ke(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
+
function Ge(e) {
|
|
223
224
|
let t = e.length;
|
|
224
225
|
if (t < 2) return "";
|
|
225
|
-
for (; --t > 1 && !
|
|
226
|
+
for (; --t > 1 && !Ke(e, t););
|
|
226
227
|
return e.slice(0, t);
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
+
function Ke(e, t) {
|
|
229
230
|
if (e[t] === "/") {
|
|
230
231
|
let n = 0;
|
|
231
232
|
for (; t > 0 && e[--t] === "\\";) ++n;
|
|
@@ -233,39 +234,39 @@ function qe(e, t) {
|
|
|
233
234
|
}
|
|
234
235
|
return !1;
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
+
function qe(e, t) {
|
|
237
238
|
return e.parent === t.parent ? 1 : 2;
|
|
238
239
|
}
|
|
239
|
-
function
|
|
240
|
+
function Je(e) {
|
|
240
241
|
var t = e.children;
|
|
241
242
|
return t ? t[0] : e.t;
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
+
function Ye(e) {
|
|
244
245
|
var t = e.children;
|
|
245
246
|
return t ? t[t.length - 1] : e.t;
|
|
246
247
|
}
|
|
247
|
-
function
|
|
248
|
+
function Xe(e, t, n) {
|
|
248
249
|
var r = n / (t.i - e.i);
|
|
249
250
|
t.c -= r, t.s += n, e.c += r, t.z += n, t.m += n;
|
|
250
251
|
}
|
|
251
|
-
function
|
|
252
|
+
function Ze(e) {
|
|
252
253
|
for (var t = 0, n = 0, r = e.children, i = r.length, a; --i >= 0;) a = r[i], a.z += t, a.m += t, t += a.s + (n += a.c);
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function Qe(e, t, n) {
|
|
255
256
|
return e.a.parent === t.parent ? e.a : n;
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
+
function $e(e, t) {
|
|
258
259
|
this._ = e, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = t;
|
|
259
260
|
}
|
|
260
|
-
|
|
261
|
-
function
|
|
262
|
-
for (var t = new
|
|
263
|
-
return (t.parent = new
|
|
261
|
+
$e.prototype = Object.create(Me.prototype);
|
|
262
|
+
function et(e) {
|
|
263
|
+
for (var t = new $e(e, 0), n, r = [t], i, a, o, s; n = r.pop();) if (a = n._.children) for (n.children = Array(s = a.length), o = s - 1; o >= 0; --o) r.push(i = n.children[o] = new $e(a[o], o)), i.parent = n;
|
|
264
|
+
return (t.parent = new $e(null, 0)).children = [t], t;
|
|
264
265
|
}
|
|
265
|
-
function
|
|
266
|
-
var e =
|
|
266
|
+
function tt() {
|
|
267
|
+
var e = qe, t = 1, n = 1, r = null;
|
|
267
268
|
function i(i) {
|
|
268
|
-
var s =
|
|
269
|
+
var s = et(i);
|
|
269
270
|
if (s.eachAfter(a), s.parent.m = -s.z, s.eachBefore(o), r) i.eachBefore(c);
|
|
270
271
|
else {
|
|
271
272
|
var l = i, u = i, d = i;
|
|
@@ -282,7 +283,7 @@ function nt() {
|
|
|
282
283
|
function a(t) {
|
|
283
284
|
var n = t.children, r = t.parent.children, i = t.i ? r[t.i - 1] : null;
|
|
284
285
|
if (n) {
|
|
285
|
-
|
|
286
|
+
Ze(t);
|
|
286
287
|
var a = (n[0].z + n[n.length - 1].z) / 2;
|
|
287
288
|
i ? (t.z = i.z + e(t._, i._), t.m = t.z - a) : t.z = a;
|
|
288
289
|
} else i && (t.z = i.z + e(t._, i._));
|
|
@@ -293,8 +294,8 @@ function nt() {
|
|
|
293
294
|
}
|
|
294
295
|
function s(t, n, r) {
|
|
295
296
|
if (n) {
|
|
296
|
-
for (var i = t, a = t, o = n, s = i.parent.children[0], c = i.m, l = a.m, u = o.m, d = s.m, f; o =
|
|
297
|
-
o && !
|
|
297
|
+
for (var i = t, a = t, o = n, s = i.parent.children[0], c = i.m, l = a.m, u = o.m, d = s.m, f; o = Ye(o), i = Je(i), o && i;) s = Je(s), a = Ye(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (Xe(Qe(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
|
|
298
|
+
o && !Ye(a) && (a.t = o, a.m += u - l), i && !Je(s) && (s.t = i, s.m += c - d, r = t);
|
|
298
299
|
}
|
|
299
300
|
return r;
|
|
300
301
|
}
|
|
@@ -309,14 +310,14 @@ function nt() {
|
|
|
309
310
|
return arguments.length ? (r = !0, t = +e[0], n = +e[1], i) : r ? [t, n] : null;
|
|
310
311
|
}, i;
|
|
311
312
|
}
|
|
312
|
-
var
|
|
313
|
+
var A = "__root__", nt = "__total__", rt = (e) => `__dimension__${JSON.stringify(e)}`, it = (e, t) => {
|
|
313
314
|
let n = e[t];
|
|
314
315
|
return n == null ? ["nil"] : [
|
|
315
316
|
"value",
|
|
316
317
|
typeof n,
|
|
317
318
|
n
|
|
318
319
|
];
|
|
319
|
-
},
|
|
320
|
+
}, at = (e, t) => {
|
|
320
321
|
if (t?.indicator !== "custom") return;
|
|
321
322
|
let n = t?.indicatorThreshold;
|
|
322
323
|
if (!n || e == null) return {
|
|
@@ -358,10 +359,10 @@ var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify
|
|
|
358
359
|
let s = r?.find((t) => t.parentId === e.dataItem.uniqueSignature && t.role === `tree-${n.key}`);
|
|
359
360
|
if (s) {
|
|
360
361
|
let e = i(s.dataItem);
|
|
361
|
-
s.formatter && (a = s.formatter), e && (o.value = t?.[e], o.label = o.value === null ? "-" :
|
|
362
|
+
s.formatter && (a = s.formatter), e && (o.value = t?.[e], o.label = o.value === null ? "-" : m(a?.format, o.value) ?? "-");
|
|
362
363
|
}
|
|
363
|
-
} else n.source === "variable" && (o.value = n.propertyValue, o.label = o.value === null ? "-" :
|
|
364
|
-
o.customIndicator =
|
|
364
|
+
} else n.source === "variable" && (o.value = n.propertyValue, o.label = o.value === null ? "-" : m(a?.format, o.value) ?? "-");
|
|
365
|
+
o.customIndicator = at(o.value, n);
|
|
365
366
|
}
|
|
366
367
|
a[n.key] = { ...o };
|
|
367
368
|
}), a;
|
|
@@ -371,35 +372,35 @@ var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify
|
|
|
371
372
|
return e.depth - +!!r < i;
|
|
372
373
|
}, ct = (e, t, n) => {
|
|
373
374
|
let r = [{
|
|
374
|
-
id:
|
|
375
|
+
id: A,
|
|
375
376
|
parentId: null,
|
|
376
377
|
disabled: !1
|
|
377
|
-
}],
|
|
378
|
+
}], o = /* @__PURE__ */ new Set();
|
|
378
379
|
e.measures.forEach((e) => {
|
|
379
|
-
|
|
380
|
+
o.add(e.dataItem.uniqueSignature);
|
|
380
381
|
});
|
|
381
|
-
let
|
|
382
|
+
let s = e.measures.filter((e) => p(e));
|
|
382
383
|
e.measures.forEach((e) => {
|
|
383
|
-
let t = e.dataItem.uniqueSignature, n = e.parentId &&
|
|
384
|
+
let t = e.dataItem.uniqueSignature, n = e.parentId && o.has(e.parentId) ? e.parentId : A;
|
|
384
385
|
r.push({
|
|
385
386
|
id: t,
|
|
386
387
|
parentId: n,
|
|
387
388
|
disabled: !p(e)
|
|
388
389
|
});
|
|
389
390
|
});
|
|
390
|
-
let
|
|
391
|
-
|
|
391
|
+
let c = Ue().id((e) => e.id).parentId((e) => e.parentId)(r), l = [];
|
|
392
|
+
c.descendants().forEach((e) => {
|
|
392
393
|
if (e.data.disabled) return;
|
|
393
394
|
let t = e.ancestors().slice(1).find((e) => !e.data.disabled);
|
|
394
|
-
t ?
|
|
395
|
+
t ? l.push({
|
|
395
396
|
id: e.data.id,
|
|
396
397
|
parentId: t.data.id
|
|
397
|
-
}) :
|
|
398
|
+
}) : l.push({
|
|
398
399
|
id: e.data.id,
|
|
399
400
|
parentId: null
|
|
400
401
|
});
|
|
401
402
|
});
|
|
402
|
-
let u =
|
|
403
|
+
let u = l.flatMap((n) => {
|
|
403
404
|
if (n.id === "__root__") return [{
|
|
404
405
|
id: n.id,
|
|
405
406
|
parentId: null,
|
|
@@ -409,26 +410,26 @@ var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify
|
|
|
409
410
|
value: null
|
|
410
411
|
}
|
|
411
412
|
}];
|
|
412
|
-
let r =
|
|
413
|
+
let r = s.find((e) => e.dataItem.uniqueSignature === n.id);
|
|
413
414
|
if (!r) return [];
|
|
414
|
-
let
|
|
415
|
+
let o = i(r.dataItem), c = t[0].items?.[0], l = r ? ot(r, c, s, e.supportingMeasures) : {}, u = c?.[o], d = r?.slots?.find((e) => e.key === "main");
|
|
415
416
|
return [{
|
|
416
417
|
id: n.id,
|
|
417
418
|
parentId: n.parentId,
|
|
418
|
-
label:
|
|
419
|
+
label: a(r),
|
|
419
420
|
value: {
|
|
420
|
-
label:
|
|
421
|
+
label: m(r.formatter?.format, t[0].items?.[0]?.[o]) ?? "-",
|
|
421
422
|
value: u
|
|
422
423
|
},
|
|
423
424
|
indicator: d?.indicator ?? null,
|
|
424
|
-
customIndicator:
|
|
425
|
+
customIndicator: at(u, d),
|
|
425
426
|
brush: {
|
|
426
|
-
key: [
|
|
427
|
-
value:
|
|
427
|
+
key: [ue.sourceKey, ue.field].join("/"),
|
|
428
|
+
value: _e(r)
|
|
428
429
|
},
|
|
429
|
-
...
|
|
430
|
+
...l
|
|
430
431
|
}];
|
|
431
|
-
}), d =
|
|
432
|
+
}), d = Ue().id((e) => e.id).parentId((e) => e.parentId)(u), f = s.map((e) => e.dataItem.uniqueSignature);
|
|
432
433
|
return d.sort((e, t) => f.indexOf(e.data.id) - f.indexOf(t.data.id)), d.descendants().forEach((e) => {
|
|
433
434
|
let t = !1;
|
|
434
435
|
t = e.data.id in n ? n[e.data.id] === !1 : e.data.expanded?.enabled ? e.data.expanded.value === !1 : !1, t && (e._children = e.children, e.children = void 0);
|
|
@@ -447,11 +448,11 @@ var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify
|
|
|
447
448
|
label: String(r[c]),
|
|
448
449
|
row: +u,
|
|
449
450
|
value: i && n && l ? {
|
|
450
|
-
label:
|
|
451
|
+
label: m(n.formatter?.format, r[l]) ?? "-",
|
|
451
452
|
value: r[l]
|
|
452
453
|
} : null,
|
|
453
454
|
indicator: f?.indicator ?? null,
|
|
454
|
-
customIndicator:
|
|
455
|
+
customIndicator: at(l ? r[l] : null, f),
|
|
455
456
|
brush: {
|
|
456
457
|
key: d,
|
|
457
458
|
value: r[c]
|
|
@@ -461,30 +462,30 @@ var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify
|
|
|
461
462
|
};
|
|
462
463
|
};
|
|
463
464
|
function dt(e, t, n) {
|
|
464
|
-
let r = t[0], a = e.dimensions.filter((e) => p(e)),
|
|
465
|
-
|
|
466
|
-
let n =
|
|
465
|
+
let r = t[0], a = e.dimensions.filter((e) => p(e)), o = {}, c = a.map((t) => [i(t.dataItem), s(e.referencedData, t.dataItem.internalKey) ?? i(t.dataItem)]), l = e.measures.filter((e) => p(e))[0], u = l ? i(l.dataItem) : null, d = e.totals?.enabled ?? !1, f = l?.slots?.find((e) => e.key === "main"), h, g, _ = /* @__PURE__ */ new Set(), v = r.groupings, y = v ? Object.keys(v) : void 0;
|
|
466
|
+
v && y && y.forEach((t) => {
|
|
467
|
+
let n = v[t], i = r.items[+t], a = c.filter(([e]) => n[e] === 0);
|
|
467
468
|
if (!a.length) {
|
|
468
|
-
|
|
469
|
+
h = u ? i[u] : void 0, g = i;
|
|
469
470
|
return;
|
|
470
471
|
}
|
|
471
|
-
let [
|
|
472
|
-
a.length < c.length &&
|
|
472
|
+
let [s, f] = a.length ? a[a.length - 1] : ["", ""], p = rt(a.map((e) => it(i, e[0]))), m = a.slice(0, -1), y = m.length ? rt(m.map((e) => it(i, e[0]))) : d ? nt : A;
|
|
473
|
+
a.length < c.length && _.add(p), o[p] || (o[p] = ut(e, r, l, i, !!l, {
|
|
473
474
|
engineKey: f,
|
|
474
475
|
id: p,
|
|
475
476
|
parentId: y,
|
|
476
477
|
measureProp: u,
|
|
477
|
-
prop:
|
|
478
|
+
prop: s,
|
|
478
479
|
dataItemIdx: +t
|
|
479
480
|
}));
|
|
480
481
|
}), r.items.forEach((t, n) => {
|
|
481
|
-
|
|
482
|
+
y?.includes(String(n)) || c.forEach(([i, a], s, c) => {
|
|
482
483
|
if (t[i] === void 0) {
|
|
483
484
|
console.warn(`Dimension property ${i} is missing in data item at index ${n}, skipping this dimension for this item`);
|
|
484
485
|
return;
|
|
485
486
|
}
|
|
486
|
-
let f =
|
|
487
|
-
|
|
487
|
+
let f = rt(c.slice(0, s + 1).map((e) => it(t, e[0]))), p = s === 0 ? d ? nt : A : rt(c.slice(0, s).map((e) => it(t, e[0])));
|
|
488
|
+
o[f] || (o[f] = ut(e, r, l, t, s === c.length - 1 && !!l, {
|
|
488
489
|
engineKey: a,
|
|
489
490
|
dataItemIdx: n,
|
|
490
491
|
id: f,
|
|
@@ -494,27 +495,27 @@ function dt(e, t, n) {
|
|
|
494
495
|
}));
|
|
495
496
|
});
|
|
496
497
|
});
|
|
497
|
-
let
|
|
498
|
+
let b = h ?? Object.values(o).reduce((e, t) => e + (_.has(t.id) ? 0 : t.value?.value ?? 0), 0), x = g ?? r.totals, S = Object.values(o);
|
|
498
499
|
d && S.unshift({
|
|
499
|
-
id:
|
|
500
|
-
parentId:
|
|
500
|
+
id: nt,
|
|
501
|
+
parentId: A,
|
|
501
502
|
label: "Total",
|
|
502
503
|
row: -1,
|
|
503
504
|
value: l ? {
|
|
504
|
-
label:
|
|
505
|
-
value:
|
|
505
|
+
label: m(l.formatter?.format, b) ?? "-",
|
|
506
|
+
value: b
|
|
506
507
|
} : null,
|
|
507
508
|
indicator: f?.indicator ?? null,
|
|
508
|
-
customIndicator:
|
|
509
|
-
...l ? ot(l,
|
|
509
|
+
customIndicator: at(b, f),
|
|
510
|
+
...l ? ot(l, x, [l], e.supportingMeasures) : {}
|
|
510
511
|
}), S.unshift({
|
|
511
|
-
id:
|
|
512
|
+
id: A,
|
|
512
513
|
parentId: null,
|
|
513
514
|
label: "Dummy Root",
|
|
514
515
|
row: -1,
|
|
515
516
|
value: null
|
|
516
517
|
});
|
|
517
|
-
let C =
|
|
518
|
+
let C = Ue().id((e) => e.id).parentId((e) => e.parentId)(S);
|
|
518
519
|
return C.sort((e, t) => (e.data.row ?? 0) - (t.data.row ?? 0)), C.descendants().forEach((t) => {
|
|
519
520
|
if (t.data.id === "__total__") return;
|
|
520
521
|
let r = !1;
|
|
@@ -522,8 +523,8 @@ function dt(e, t, n) {
|
|
|
522
523
|
}), C;
|
|
523
524
|
}
|
|
524
525
|
var ft = ({ vSpec: e, data: t, nodeExpandState: n }) => {
|
|
525
|
-
let r = e.dimensions.filter(p).length, [i, a] = (0,
|
|
526
|
-
return (0,
|
|
526
|
+
let r = e.dimensions.filter(p).length, [i, a] = (0, k.useState)(null);
|
|
527
|
+
return (0, k.useEffect)(() => {
|
|
527
528
|
if (r > 0) {
|
|
528
529
|
let r = dt(e, t, n.current);
|
|
529
530
|
a(r);
|
|
@@ -577,7 +578,7 @@ function yt(e) {
|
|
|
577
578
|
function bt(e) {
|
|
578
579
|
typeof e != "function" && (e = yt(e));
|
|
579
580
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = Array(o), c, l, u = 0; u < o; ++u) (c = a[u]) && (l = e.call(c, c.__data__, u, a)) && ("__data__" in c && (l.__data__ = c.__data__), s[u] = l);
|
|
580
|
-
return new
|
|
581
|
+
return new M(r, this._parents);
|
|
581
582
|
}
|
|
582
583
|
function xt(e) {
|
|
583
584
|
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
|
|
@@ -598,7 +599,7 @@ function wt(e) {
|
|
|
598
599
|
function Tt(e) {
|
|
599
600
|
e = typeof e == "function" ? wt(e) : Ct(e);
|
|
600
601
|
for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
|
|
601
|
-
return new
|
|
602
|
+
return new M(r, i);
|
|
602
603
|
}
|
|
603
604
|
function Et(e) {
|
|
604
605
|
return function() {
|
|
@@ -637,13 +638,13 @@ function Ft(e) {
|
|
|
637
638
|
function It(e) {
|
|
638
639
|
typeof e != "function" && (e = Et(e));
|
|
639
640
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
640
|
-
return new
|
|
641
|
+
return new M(r, this._parents);
|
|
641
642
|
}
|
|
642
643
|
function Lt(e) {
|
|
643
644
|
return Array(e.length);
|
|
644
645
|
}
|
|
645
646
|
function Rt() {
|
|
646
|
-
return new
|
|
647
|
+
return new M(this._enter || this._groups.map(Lt), this._parents);
|
|
647
648
|
}
|
|
648
649
|
function zt(e, t) {
|
|
649
650
|
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
|
|
@@ -693,13 +694,13 @@ function Wt(e, t) {
|
|
|
693
694
|
y._next = b || null;
|
|
694
695
|
}
|
|
695
696
|
}
|
|
696
|
-
return o = new
|
|
697
|
+
return o = new M(o, r), o._enter = s, o._exit = c, o;
|
|
697
698
|
}
|
|
698
699
|
function Gt(e) {
|
|
699
700
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
700
701
|
}
|
|
701
702
|
function Kt() {
|
|
702
|
-
return new
|
|
703
|
+
return new M(this._exit || this._groups.map(Lt), this._parents);
|
|
703
704
|
}
|
|
704
705
|
function qt(e, t, n) {
|
|
705
706
|
var r = this.enter(), i = this, a = this.exit();
|
|
@@ -708,7 +709,7 @@ function qt(e, t, n) {
|
|
|
708
709
|
function Jt(e) {
|
|
709
710
|
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
|
|
710
711
|
for (; c < i; ++c) s[c] = n[c];
|
|
711
|
-
return new
|
|
712
|
+
return new M(s, this._parents);
|
|
712
713
|
}
|
|
713
714
|
function Yt() {
|
|
714
715
|
for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
@@ -723,7 +724,7 @@ function Xt(e) {
|
|
|
723
724
|
for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
|
|
724
725
|
c.sort(t);
|
|
725
726
|
}
|
|
726
|
-
return new
|
|
727
|
+
return new M(i, this._parents).order();
|
|
727
728
|
}
|
|
728
729
|
function Zt(e, t) {
|
|
729
730
|
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
@@ -814,9 +815,9 @@ function hn(e, t, n) {
|
|
|
814
815
|
};
|
|
815
816
|
}
|
|
816
817
|
function gn(e, t, n) {
|
|
817
|
-
return arguments.length > 1 ? this.each((t == null ? pn : typeof t == "function" ? hn : mn)(e, t, n ?? "")) :
|
|
818
|
+
return arguments.length > 1 ? this.each((t == null ? pn : typeof t == "function" ? hn : mn)(e, t, n ?? "")) : j(this.node(), e);
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
+
function j(e, t) {
|
|
820
821
|
return e.style.getPropertyValue(t) || fn(e).getComputedStyle(e, null).getPropertyValue(t);
|
|
821
822
|
}
|
|
822
823
|
function _n(e) {
|
|
@@ -1044,17 +1045,17 @@ function* or() {
|
|
|
1044
1045
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
|
|
1045
1046
|
}
|
|
1046
1047
|
var sr = [null];
|
|
1047
|
-
function
|
|
1048
|
+
function M(e, t) {
|
|
1048
1049
|
this._groups = e, this._parents = t;
|
|
1049
1050
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return new
|
|
1051
|
+
function N() {
|
|
1052
|
+
return new M([[document.documentElement]], sr);
|
|
1052
1053
|
}
|
|
1053
1054
|
function cr() {
|
|
1054
1055
|
return this;
|
|
1055
1056
|
}
|
|
1056
|
-
|
|
1057
|
-
constructor:
|
|
1057
|
+
M.prototype = N.prototype = {
|
|
1058
|
+
constructor: M,
|
|
1058
1059
|
select: bt,
|
|
1059
1060
|
selectAll: Tt,
|
|
1060
1061
|
selectChild: jt,
|
|
@@ -1091,15 +1092,15 @@ j.prototype = M.prototype = {
|
|
|
1091
1092
|
dispatch: ar,
|
|
1092
1093
|
[Symbol.iterator]: or
|
|
1093
1094
|
};
|
|
1094
|
-
function
|
|
1095
|
-
return typeof e == "string" ? new
|
|
1095
|
+
function P(e) {
|
|
1096
|
+
return typeof e == "string" ? new M([[document.querySelector(e)]], [document.documentElement]) : new M([[e]], sr);
|
|
1096
1097
|
}
|
|
1097
1098
|
function lr(e) {
|
|
1098
1099
|
let t;
|
|
1099
1100
|
for (; t = e.sourceEvent;) e = t;
|
|
1100
1101
|
return e;
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function F(e, t) {
|
|
1103
1104
|
if (e = lr(e), t === void 0 && (t = e.currentTarget), t) {
|
|
1104
1105
|
var n = t.ownerSVGElement || t;
|
|
1105
1106
|
if (n.createSVGPoint) {
|
|
@@ -1114,25 +1115,25 @@ function P(e, t) {
|
|
|
1114
1115
|
return [e.pageX, e.pageY];
|
|
1115
1116
|
}
|
|
1116
1117
|
function ur(e) {
|
|
1117
|
-
return typeof e == "string" ? new
|
|
1118
|
+
return typeof e == "string" ? new M([document.querySelectorAll(e)], [document.documentElement]) : new M([xt(e)], sr);
|
|
1118
1119
|
}
|
|
1119
|
-
var dr = /* @__PURE__ */ e(
|
|
1120
|
+
var dr = /* @__PURE__ */ e(be()), I = r[d.KPIChange], L = I.slots, fr = "#577f56", pr = "#9e4d53", R = (e) => typeof e == "number" && Number.isFinite(e), mr = (e, t) => {
|
|
1120
1121
|
let n = new dr.default(e);
|
|
1121
1122
|
return (new dr.default(t).isLight() ? n.lighten(.5).alpha(.5) : n.darken(.5).alpha(.5)).rgb().string();
|
|
1122
1123
|
}, hr = (e, t) => {
|
|
1123
1124
|
if (!e.enabled) return "";
|
|
1124
|
-
let n =
|
|
1125
|
+
let n = R(e.value) ? e.value : null, r = n === null ? "" : n < 0 ? "negative" : "positive", i = "", a = "";
|
|
1125
1126
|
if (e.indicator === "inverse") r = r === "negative" ? "positive" : "negative";
|
|
1126
1127
|
else if (e.indicator === "none") r = "";
|
|
1127
1128
|
else if (e.indicator === "custom") {
|
|
1128
1129
|
r = "";
|
|
1129
1130
|
let n = e.customIndicator?.color ? mr(e.customIndicator.color, t) : "inherit";
|
|
1130
|
-
i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${
|
|
1131
|
+
i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${S.sanitize(e.customIndicator.icon)}</span>`);
|
|
1131
1132
|
}
|
|
1132
|
-
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${
|
|
1133
|
+
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${S.sanitize(e.label ?? "-")}</span>${a}</div>`;
|
|
1133
1134
|
}, gr = (e, t) => {
|
|
1134
1135
|
if (!e.enabled) return "";
|
|
1135
|
-
let n = e.indicator, r =
|
|
1136
|
+
let n = e.indicator, r = R(e.value) ? e.value : null, i = r === null ? "neutral" : r < 0 ? "negative" : "positive", a = "", o = r === null ? "" : r < 0 ? "arrow_downward" : "arrow_upward";
|
|
1136
1137
|
if (n === "inverse") i = i === "negative" ? "positive" : "negative";
|
|
1137
1138
|
else if (n === "none") i = "", o = void 0;
|
|
1138
1139
|
else if (n === "custom") {
|
|
@@ -1140,22 +1141,22 @@ var dr = /* @__PURE__ */ e(xe()), F = r[d.KPIChange], I = F.slots, fr = "#577f56
|
|
|
1140
1141
|
let n = e.customIndicator?.color ? mr(e.customIndicator.color, t) : "inherit";
|
|
1141
1142
|
a = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, o = e.customIndicator?.icon;
|
|
1142
1143
|
}
|
|
1143
|
-
let s = o ? `<span class="pill-icon">${
|
|
1144
|
-
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${
|
|
1144
|
+
let s = o ? `<span class="pill-icon">${S.sanitize(o)}</span>` : "";
|
|
1145
|
+
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${S.sanitize(e.label ?? "-")}</span>${s}</div>`;
|
|
1145
1146
|
}, _r = (e, t) => {
|
|
1146
1147
|
let n = e.value ?? {
|
|
1147
1148
|
label: "-",
|
|
1148
1149
|
value: null,
|
|
1149
1150
|
enabled: !1
|
|
1150
1151
|
}, r = "", i = "";
|
|
1151
|
-
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${
|
|
1152
|
+
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${S.sanitize(e.customIndicator.icon)}</span>`)), `<div class="value ${t ? "value-space" : ""}" style="${r}"><span class="value-label">${S.sanitize(n.label)}</span>${i}</div>`;
|
|
1152
1153
|
}, vr = (e, t) => {
|
|
1153
|
-
let n = e.data.diff ??
|
|
1154
|
+
let n = e.data.diff ?? o.diff.defaults, r = e.data.change ?? o.change.defaults, i = t.config.nodeDefaultBackground ?? "#ffffff", a = _r(e.data, !r.enabled), s = hr(n, i), c = gr(r, i), l = [];
|
|
1154
1155
|
return e.data._upToTheRootHighlighted && l.push("node-highlight"), `
|
|
1155
1156
|
<div class="node-content layout-a ${l.join(" ")}">
|
|
1156
|
-
<div class="label">${
|
|
1157
|
+
<div class="label">${S.sanitize(e.data.label)}</div>
|
|
1157
1158
|
<div class="flex-row">
|
|
1158
|
-
${
|
|
1159
|
+
${a}
|
|
1159
1160
|
${c}
|
|
1160
1161
|
</div>
|
|
1161
1162
|
${s}
|
|
@@ -1170,37 +1171,37 @@ var dr = /* @__PURE__ */ e(xe()), F = r[d.KPIChange], I = F.slots, fr = "#577f56
|
|
|
1170
1171
|
}[t.layout](e.children)} </div>`;
|
|
1171
1172
|
function br(e) {
|
|
1172
1173
|
if (e.data._upToTheRootHighlighted) {
|
|
1173
|
-
|
|
1174
|
+
P(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
1174
1175
|
return;
|
|
1175
1176
|
}
|
|
1176
1177
|
if (!e.data.diff?.enabled) {
|
|
1177
|
-
|
|
1178
|
+
P(this).style("stroke-width", null).style("stroke", null);
|
|
1178
1179
|
return;
|
|
1179
1180
|
}
|
|
1180
|
-
let t = (
|
|
1181
|
-
c === "inverse" ? s =
|
|
1181
|
+
let t = (R(e.data.diff?.value) ? e.data.diff.value : null) ?? (R(o.diff.defaults.value) ? o.diff.defaults.value : 0), n = e.parent?.children?.flatMap((t) => t.id === e.id || !t.data.diff?.enabled || !R(t.data.diff?.value) ? [] : [Math.abs(t.data.diff.value)]) ?? [], r = n.length ? Math.max(...n) : 0, i = Math.abs(t) > r, a = t < 0, s = a ? pr : fr, c = e.data.diff?.indicator;
|
|
1182
|
+
c === "inverse" ? s = a ? fr : pr : c === "none" ? s = "var(--link-color)" : c === "custom" && (s = e.data.diff?.customIndicator?.color ?? "var(--link-color)");
|
|
1182
1183
|
let l = i ? 2 : 1;
|
|
1183
|
-
|
|
1184
|
+
P(this).style("stroke", s).style("stroke-width", l);
|
|
1184
1185
|
}
|
|
1185
1186
|
var xr = (e, t) => {
|
|
1186
1187
|
let n = {
|
|
1187
|
-
...
|
|
1188
|
+
...I.labelStyle,
|
|
1188
1189
|
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1189
|
-
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
1190
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? I.labelStyle?.fontSize
|
|
1190
1191
|
}, r = {
|
|
1191
|
-
...
|
|
1192
|
+
...I.valueStyle,
|
|
1192
1193
|
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1193
|
-
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
1194
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? I.valueStyle?.fontSize
|
|
1194
1195
|
}, i = {
|
|
1195
|
-
...
|
|
1196
|
-
...
|
|
1196
|
+
...L.change?.styling,
|
|
1197
|
+
...L.change?.styling?.fontStyle,
|
|
1197
1198
|
...t.treeChartSettings.nodeLayout?.slots?.change,
|
|
1198
|
-
fontSize: t.treeChartSettings.nodeLayout?.slots?.change?.fontSize ??
|
|
1199
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.change?.fontSize ?? L.change?.styling?.fontSize
|
|
1199
1200
|
}, a = {
|
|
1200
|
-
...
|
|
1201
|
-
...
|
|
1201
|
+
...L.diff?.styling,
|
|
1202
|
+
...L.diff?.styling?.fontStyle,
|
|
1202
1203
|
...t.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1203
|
-
fontSize: t.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ??
|
|
1204
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? L.diff?.styling?.fontSize
|
|
1204
1205
|
};
|
|
1205
1206
|
return `
|
|
1206
1207
|
#${e} {
|
|
@@ -1340,7 +1341,7 @@ var xr = (e, t) => {
|
|
|
1340
1341
|
}`;
|
|
1341
1342
|
}, Sr = {
|
|
1342
1343
|
name: "KPI Change",
|
|
1343
|
-
...
|
|
1344
|
+
...I,
|
|
1344
1345
|
getNodeContent: vr,
|
|
1345
1346
|
getButtonContent: yr,
|
|
1346
1347
|
linkUpdate: br,
|
|
@@ -1348,48 +1349,48 @@ var xr = (e, t) => {
|
|
|
1348
1349
|
width: 180,
|
|
1349
1350
|
sizes: (e) => {
|
|
1350
1351
|
let t = {
|
|
1351
|
-
...
|
|
1352
|
-
...
|
|
1352
|
+
...L.diff?.styling,
|
|
1353
|
+
...L.diff?.styling?.fontStyle,
|
|
1353
1354
|
...e.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1354
|
-
fontSize: e.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ??
|
|
1355
|
+
fontSize: e.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? L.diff?.styling?.fontSize
|
|
1355
1356
|
}, n = {
|
|
1356
|
-
...
|
|
1357
|
+
...I.labelStyle,
|
|
1357
1358
|
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1358
|
-
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
1359
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? I.labelStyle?.fontSize
|
|
1359
1360
|
}, r = {
|
|
1360
|
-
...
|
|
1361
|
+
...I.valueStyle,
|
|
1361
1362
|
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1362
|
-
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
1363
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? I.valueStyle?.fontSize
|
|
1363
1364
|
};
|
|
1364
1365
|
return {
|
|
1365
|
-
label: Math.ceil(
|
|
1366
|
-
value: Math.ceil(
|
|
1367
|
-
diff: Math.ceil(
|
|
1366
|
+
label: Math.ceil(D(n.fontSize)) + 8,
|
|
1367
|
+
value: Math.ceil(D(r.fontSize)) + 8,
|
|
1368
|
+
diff: Math.ceil(D(t.fontSize)) + 16
|
|
1368
1369
|
};
|
|
1369
1370
|
},
|
|
1370
1371
|
height: (e, t) => {
|
|
1371
1372
|
let n = 20;
|
|
1372
|
-
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ??
|
|
1373
|
+
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ?? o.diff.defaults)?.enabled && (n += t?.diff ?? 0), n;
|
|
1373
1374
|
}
|
|
1374
|
-
},
|
|
1375
|
+
}, z = r[d.Basic], Cr = (e) => {
|
|
1375
1376
|
if (e.id === "__root__") return null;
|
|
1376
1377
|
let t = "", n = "";
|
|
1377
|
-
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${
|
|
1378
|
-
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${
|
|
1378
|
+
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${S.sanitize(e.data.customIndicator.icon)}</span>`));
|
|
1379
|
+
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${S.sanitize(e.data.value.label)}</span>${n}</div>` : "", i = [];
|
|
1379
1380
|
return e.data._upToTheRootHighlighted && i.push("node-highlight"), `
|
|
1380
1381
|
<div class="node-content layout-b ${i.join(" ")}">
|
|
1381
|
-
<div class="label">${
|
|
1382
|
+
<div class="label">${S.sanitize(e.data.label)}</div>
|
|
1382
1383
|
${r}
|
|
1383
1384
|
</div>`;
|
|
1384
1385
|
}, wr = (e, t) => {
|
|
1385
1386
|
let n = {
|
|
1386
|
-
...
|
|
1387
|
+
...z.labelStyle,
|
|
1387
1388
|
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1388
|
-
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
1389
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? z.labelStyle?.fontSize
|
|
1389
1390
|
}, r = {
|
|
1390
|
-
...
|
|
1391
|
+
...z.valueStyle,
|
|
1391
1392
|
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1392
|
-
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
1393
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? z.valueStyle?.fontSize
|
|
1393
1394
|
};
|
|
1394
1395
|
return `
|
|
1395
1396
|
#${e} {
|
|
@@ -1435,23 +1436,23 @@ var xr = (e, t) => {
|
|
|
1435
1436
|
}`;
|
|
1436
1437
|
}, Tr = {
|
|
1437
1438
|
name: "Basic",
|
|
1438
|
-
...
|
|
1439
|
+
...z,
|
|
1439
1440
|
getNodeContent: Cr,
|
|
1440
1441
|
getCSS: wr,
|
|
1441
1442
|
width: 140,
|
|
1442
1443
|
sizes: (e) => {
|
|
1443
1444
|
let t = {
|
|
1444
|
-
...
|
|
1445
|
+
...z.labelStyle,
|
|
1445
1446
|
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1446
|
-
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
1447
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? z.labelStyle?.fontSize
|
|
1447
1448
|
}, n = {
|
|
1448
|
-
...
|
|
1449
|
+
...z.valueStyle,
|
|
1449
1450
|
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1450
|
-
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
1451
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? z.valueStyle?.fontSize
|
|
1451
1452
|
};
|
|
1452
1453
|
return {
|
|
1453
|
-
label:
|
|
1454
|
-
value:
|
|
1454
|
+
label: D(t.fontSize) + 8,
|
|
1455
|
+
value: D(n.fontSize) + 8
|
|
1455
1456
|
};
|
|
1456
1457
|
},
|
|
1457
1458
|
height: (e, t) => {
|
|
@@ -1461,28 +1462,28 @@ var xr = (e, t) => {
|
|
|
1461
1462
|
}, Er = {
|
|
1462
1463
|
[d.KPIChange]: Sr,
|
|
1463
1464
|
[d.Basic]: Tr
|
|
1464
|
-
}, Dr = { passive: !1 },
|
|
1465
|
+
}, Dr = { passive: !1 }, B = {
|
|
1465
1466
|
capture: !0,
|
|
1466
1467
|
passive: !1
|
|
1467
1468
|
};
|
|
1468
1469
|
function Or(e) {
|
|
1469
1470
|
e.stopImmediatePropagation();
|
|
1470
1471
|
}
|
|
1471
|
-
function
|
|
1472
|
+
function V(e) {
|
|
1472
1473
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
1473
1474
|
}
|
|
1474
1475
|
function kr(e) {
|
|
1475
|
-
var t = e.document.documentElement, n =
|
|
1476
|
-
"onselectstart" in t ? n.on("selectstart.drag",
|
|
1476
|
+
var t = e.document.documentElement, n = P(e).on("dragstart.drag", V, B);
|
|
1477
|
+
"onselectstart" in t ? n.on("selectstart.drag", V, B) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
1477
1478
|
}
|
|
1478
1479
|
function Ar(e, t) {
|
|
1479
|
-
var n = e.document.documentElement, r =
|
|
1480
|
-
t && (r.on("click.drag",
|
|
1480
|
+
var n = e.document.documentElement, r = P(e).on("dragstart.drag", null);
|
|
1481
|
+
t && (r.on("click.drag", V, B), setTimeout(function() {
|
|
1481
1482
|
r.on("click.drag", null);
|
|
1482
1483
|
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
1483
1484
|
}
|
|
1484
|
-
var
|
|
1485
|
-
function
|
|
1485
|
+
var jr = (e) => () => e;
|
|
1486
|
+
function Mr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
|
|
1486
1487
|
Object.defineProperties(this, {
|
|
1487
1488
|
type: {
|
|
1488
1489
|
value: e,
|
|
@@ -1537,45 +1538,45 @@ function jr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a
|
|
|
1537
1538
|
_: { value: u }
|
|
1538
1539
|
});
|
|
1539
1540
|
}
|
|
1540
|
-
|
|
1541
|
+
Mr.prototype.on = function() {
|
|
1541
1542
|
var e = this._.on.apply(this._, arguments);
|
|
1542
1543
|
return e === this._ ? this : e;
|
|
1543
|
-
},
|
|
1544
|
-
function
|
|
1544
|
+
}, Fe();
|
|
1545
|
+
function Nr(e) {
|
|
1545
1546
|
return !e.ctrlKey && !e.button;
|
|
1546
1547
|
}
|
|
1547
|
-
function
|
|
1548
|
+
function Pr() {
|
|
1548
1549
|
return this.parentNode;
|
|
1549
1550
|
}
|
|
1550
|
-
function
|
|
1551
|
+
function Fr(e, t) {
|
|
1551
1552
|
return t ?? {
|
|
1552
1553
|
x: e.x,
|
|
1553
1554
|
y: e.y
|
|
1554
1555
|
};
|
|
1555
1556
|
}
|
|
1556
|
-
function
|
|
1557
|
+
function Ir() {
|
|
1557
1558
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1558
1559
|
}
|
|
1559
|
-
function
|
|
1560
|
-
var e =
|
|
1560
|
+
function Lr() {
|
|
1561
|
+
var e = Nr, t = Pr, n = Fr, r = Ir, i = {}, a = Pe("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
|
|
1561
1562
|
function f(e) {
|
|
1562
1563
|
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, Dr).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1563
1564
|
}
|
|
1564
1565
|
function p(n, r) {
|
|
1565
1566
|
if (!(u || !e.call(this, n, r))) {
|
|
1566
1567
|
var i = y(this, t.call(this, n, r), n, r, "mouse");
|
|
1567
|
-
i && (
|
|
1568
|
+
i && (P(n.view).on("mousemove.drag", m, B).on("mouseup.drag", h, B), kr(n.view), Or(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
|
|
1568
1569
|
}
|
|
1569
1570
|
}
|
|
1570
1571
|
function m(e) {
|
|
1571
|
-
if (
|
|
1572
|
+
if (V(e), !l) {
|
|
1572
1573
|
var t = e.clientX - s, n = e.clientY - c;
|
|
1573
1574
|
l = t * t + n * n > d;
|
|
1574
1575
|
}
|
|
1575
1576
|
i.mouse("drag", e);
|
|
1576
1577
|
}
|
|
1577
1578
|
function h(e) {
|
|
1578
|
-
|
|
1579
|
+
P(e.view).on("mousemove.drag mouseup.drag", null), Ar(e.view, l), V(e), i.mouse("end", e);
|
|
1579
1580
|
}
|
|
1580
1581
|
function g(n, r) {
|
|
1581
1582
|
if (e.call(this, n, r)) {
|
|
@@ -1585,7 +1586,7 @@ function Ir() {
|
|
|
1585
1586
|
}
|
|
1586
1587
|
function _(e) {
|
|
1587
1588
|
var t = e.changedTouches, n = t.length, r, a;
|
|
1588
|
-
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (
|
|
1589
|
+
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (V(e), a("drag", e, t[r]));
|
|
1589
1590
|
}
|
|
1590
1591
|
function v(e) {
|
|
1591
1592
|
var t = e.changedTouches, n = t.length, r, a;
|
|
@@ -1594,8 +1595,8 @@ function Ir() {
|
|
|
1594
1595
|
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (Or(e), a("end", e, t[r]));
|
|
1595
1596
|
}
|
|
1596
1597
|
function y(e, t, r, s, c, l) {
|
|
1597
|
-
var u = a.copy(), d =
|
|
1598
|
-
if ((h = n.call(e, new
|
|
1598
|
+
var u = a.copy(), d = F(l || r, t), p, m, h;
|
|
1599
|
+
if ((h = n.call(e, new Mr("beforestart", {
|
|
1599
1600
|
sourceEvent: r,
|
|
1600
1601
|
target: f,
|
|
1601
1602
|
identifier: c,
|
|
@@ -1613,10 +1614,10 @@ function Ir() {
|
|
|
1613
1614
|
break;
|
|
1614
1615
|
case "end": delete i[c], --o;
|
|
1615
1616
|
case "drag":
|
|
1616
|
-
d =
|
|
1617
|
+
d = F(l || a, t), _ = o;
|
|
1617
1618
|
break;
|
|
1618
1619
|
}
|
|
1619
|
-
u.call(r, e, new
|
|
1620
|
+
u.call(r, e, new Mr(r, {
|
|
1620
1621
|
sourceEvent: a,
|
|
1621
1622
|
subject: h,
|
|
1622
1623
|
target: f,
|
|
@@ -1631,13 +1632,13 @@ function Ir() {
|
|
|
1631
1632
|
};
|
|
1632
1633
|
}
|
|
1633
1634
|
return f.filter = function(t) {
|
|
1634
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
1635
|
+
return arguments.length ? (e = typeof t == "function" ? t : jr(!!t), f) : e;
|
|
1635
1636
|
}, f.container = function(e) {
|
|
1636
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
1637
|
+
return arguments.length ? (t = typeof e == "function" ? e : jr(e), f) : t;
|
|
1637
1638
|
}, f.subject = function(e) {
|
|
1638
|
-
return arguments.length ? (n = typeof e == "function" ? e :
|
|
1639
|
+
return arguments.length ? (n = typeof e == "function" ? e : jr(e), f) : n;
|
|
1639
1640
|
}, f.touchable = function(e) {
|
|
1640
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
1641
|
+
return arguments.length ? (r = typeof e == "function" ? e : jr(!!e), f) : r;
|
|
1641
1642
|
}, f.on = function() {
|
|
1642
1643
|
var e = a.on.apply(a, arguments);
|
|
1643
1644
|
return e === a ? f : e;
|
|
@@ -1645,74 +1646,74 @@ function Ir() {
|
|
|
1645
1646
|
return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
|
|
1646
1647
|
}, f;
|
|
1647
1648
|
}
|
|
1648
|
-
var H = 0,
|
|
1649
|
+
var H = 0, Rr = 0, zr = 0, Br = 1e3, Vr, U, Hr = 0, W = 0, Ur = 0, G = typeof performance == "object" && performance.now ? performance : Date, Wr = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1649
1650
|
setTimeout(e, 17);
|
|
1650
1651
|
};
|
|
1651
|
-
function Wr() {
|
|
1652
|
-
return W ||= (Ur(Gr), G.now() + Hr);
|
|
1653
|
-
}
|
|
1654
1652
|
function Gr() {
|
|
1655
|
-
W
|
|
1653
|
+
return W ||= (Wr(Kr), G.now() + Ur);
|
|
1656
1654
|
}
|
|
1657
1655
|
function Kr() {
|
|
1656
|
+
W = 0;
|
|
1657
|
+
}
|
|
1658
|
+
function qr() {
|
|
1658
1659
|
this._call = this._time = this._next = null;
|
|
1659
1660
|
}
|
|
1660
|
-
|
|
1661
|
-
constructor:
|
|
1661
|
+
qr.prototype = Jr.prototype = {
|
|
1662
|
+
constructor: qr,
|
|
1662
1663
|
restart: function(e, t, n) {
|
|
1663
1664
|
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
1664
|
-
n = (n == null ?
|
|
1665
|
+
n = (n == null ? Gr() : +n) + (t == null ? 0 : +t), !this._next && U !== this && (U ? U._next = this : Vr = this, U = this), this._call = e, this._time = n, $r();
|
|
1665
1666
|
},
|
|
1666
1667
|
stop: function() {
|
|
1667
|
-
this._call && (this._call = null, this._time = Infinity,
|
|
1668
|
+
this._call && (this._call = null, this._time = Infinity, $r());
|
|
1668
1669
|
}
|
|
1669
1670
|
};
|
|
1670
|
-
function
|
|
1671
|
-
var r = new
|
|
1671
|
+
function Jr(e, t, n) {
|
|
1672
|
+
var r = new qr();
|
|
1672
1673
|
return r.restart(e, t, n), r;
|
|
1673
1674
|
}
|
|
1674
|
-
function
|
|
1675
|
-
|
|
1676
|
-
for (var e =
|
|
1675
|
+
function Yr() {
|
|
1676
|
+
Gr(), ++H;
|
|
1677
|
+
for (var e = Vr, t; e;) (t = W - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
1677
1678
|
--H;
|
|
1678
1679
|
}
|
|
1679
|
-
function
|
|
1680
|
-
W = (
|
|
1680
|
+
function Xr() {
|
|
1681
|
+
W = (Hr = G.now()) + Ur, H = Rr = 0;
|
|
1681
1682
|
try {
|
|
1682
|
-
|
|
1683
|
+
Yr();
|
|
1683
1684
|
} finally {
|
|
1684
|
-
H = 0,
|
|
1685
|
+
H = 0, Qr(), W = 0;
|
|
1685
1686
|
}
|
|
1686
1687
|
}
|
|
1687
|
-
function Xr() {
|
|
1688
|
-
var e = G.now(), t = e - Vr;
|
|
1689
|
-
t > zr && (Hr -= t, Vr = e);
|
|
1690
|
-
}
|
|
1691
1688
|
function Zr() {
|
|
1692
|
-
|
|
1693
|
-
|
|
1689
|
+
var e = G.now(), t = e - Hr;
|
|
1690
|
+
t > Br && (Ur -= t, Hr = e);
|
|
1694
1691
|
}
|
|
1695
|
-
function Qr(
|
|
1696
|
-
|
|
1692
|
+
function Qr() {
|
|
1693
|
+
for (var e, t = Vr, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Vr = n);
|
|
1694
|
+
U = e, $r(r);
|
|
1697
1695
|
}
|
|
1698
|
-
function $r(e
|
|
1699
|
-
|
|
1696
|
+
function $r(e) {
|
|
1697
|
+
H || (Rr &&= clearTimeout(Rr), e - W > 24 ? (e < Infinity && (Rr = setTimeout(Xr, e - G.now() - Ur)), zr &&= clearInterval(zr)) : (zr ||= (Hr = G.now(), setInterval(Zr, Br)), H = 1, Wr(Xr)));
|
|
1698
|
+
}
|
|
1699
|
+
function ei(e, t, n) {
|
|
1700
|
+
var r = new qr();
|
|
1700
1701
|
return t = t == null ? 0 : +t, r.restart((n) => {
|
|
1701
1702
|
r.stop(), e(n + t);
|
|
1702
1703
|
}, t, n), r;
|
|
1703
1704
|
}
|
|
1704
|
-
|
|
1705
|
-
var
|
|
1706
|
-
function
|
|
1705
|
+
Ce(), ve(), Fe();
|
|
1706
|
+
var ti = Pe("start", "end", "cancel", "interrupt"), ni = [];
|
|
1707
|
+
function ri(e, t, n, r, i, a) {
|
|
1707
1708
|
var o = e.__transition;
|
|
1708
1709
|
if (!o) e.__transition = {};
|
|
1709
1710
|
else if (n in o) return;
|
|
1710
|
-
|
|
1711
|
+
ai(e, n, {
|
|
1711
1712
|
name: t,
|
|
1712
1713
|
index: r,
|
|
1713
1714
|
group: i,
|
|
1714
|
-
on:
|
|
1715
|
-
tween:
|
|
1715
|
+
on: ti,
|
|
1716
|
+
tween: ni,
|
|
1716
1717
|
time: a.time,
|
|
1717
1718
|
delay: a.delay,
|
|
1718
1719
|
duration: a.duration,
|
|
@@ -1721,7 +1722,7 @@ function ni(e, t, n, r, i, a) {
|
|
|
1721
1722
|
state: 0
|
|
1722
1723
|
});
|
|
1723
1724
|
}
|
|
1724
|
-
function
|
|
1725
|
+
function ii(e, t) {
|
|
1725
1726
|
var n = q(e, t);
|
|
1726
1727
|
if (n.state > 0) throw Error("too late; already scheduled");
|
|
1727
1728
|
return n;
|
|
@@ -1736,9 +1737,9 @@ function q(e, t) {
|
|
|
1736
1737
|
if (!n || !(n = n[t])) throw Error("transition not found");
|
|
1737
1738
|
return n;
|
|
1738
1739
|
}
|
|
1739
|
-
function
|
|
1740
|
+
function ai(e, t, n) {
|
|
1740
1741
|
var r = e.__transition, i;
|
|
1741
|
-
r[t] = n, n.timer =
|
|
1742
|
+
r[t] = n, n.timer = Jr(a, 0, n.time);
|
|
1742
1743
|
function a(e) {
|
|
1743
1744
|
n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
|
|
1744
1745
|
}
|
|
@@ -1746,10 +1747,10 @@ function ii(e, t, n) {
|
|
|
1746
1747
|
var l, u, d, f;
|
|
1747
1748
|
if (n.state !== 1) return c();
|
|
1748
1749
|
for (l in r) if (f = r[l], f.name === n.name) {
|
|
1749
|
-
if (f.state === 3) return
|
|
1750
|
+
if (f.state === 3) return ei(o);
|
|
1750
1751
|
f.state === 4 ? (f.state = 6, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = 6, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
|
|
1751
1752
|
}
|
|
1752
|
-
if (
|
|
1753
|
+
if (ei(function() {
|
|
1753
1754
|
n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
|
|
1754
1755
|
}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
|
|
1755
1756
|
for (n.state = 3, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
|
|
@@ -1765,7 +1766,7 @@ function ii(e, t, n) {
|
|
|
1765
1766
|
delete e.__transition;
|
|
1766
1767
|
}
|
|
1767
1768
|
}
|
|
1768
|
-
function
|
|
1769
|
+
function oi(e, t) {
|
|
1769
1770
|
var n = e.__transition, r, i, a = !0, o;
|
|
1770
1771
|
if (n) {
|
|
1771
1772
|
for (o in t = t == null ? null : t + "", n) {
|
|
@@ -1778,12 +1779,12 @@ function ai(e, t) {
|
|
|
1778
1779
|
a && delete e.__transition;
|
|
1779
1780
|
}
|
|
1780
1781
|
}
|
|
1781
|
-
function
|
|
1782
|
+
function si(e) {
|
|
1782
1783
|
return this.each(function() {
|
|
1783
|
-
|
|
1784
|
+
oi(this, e);
|
|
1784
1785
|
});
|
|
1785
1786
|
}
|
|
1786
|
-
function
|
|
1787
|
+
function ci(e, t) {
|
|
1787
1788
|
var n, r;
|
|
1788
1789
|
return function() {
|
|
1789
1790
|
var i = K(this, e), a = i.tween;
|
|
@@ -1797,7 +1798,7 @@ function si(e, t) {
|
|
|
1797
1798
|
i.tween = r;
|
|
1798
1799
|
};
|
|
1799
1800
|
}
|
|
1800
|
-
function
|
|
1801
|
+
function li(e, t, n) {
|
|
1801
1802
|
var r, i;
|
|
1802
1803
|
if (typeof n != "function") throw Error();
|
|
1803
1804
|
return function() {
|
|
@@ -1816,15 +1817,15 @@ function ci(e, t, n) {
|
|
|
1816
1817
|
a.tween = i;
|
|
1817
1818
|
};
|
|
1818
1819
|
}
|
|
1819
|
-
function
|
|
1820
|
+
function ui(e, t) {
|
|
1820
1821
|
var n = this._id;
|
|
1821
1822
|
if (e += "", arguments.length < 2) {
|
|
1822
1823
|
for (var r = q(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
|
|
1823
1824
|
return null;
|
|
1824
1825
|
}
|
|
1825
|
-
return this.each((t == null ?
|
|
1826
|
+
return this.each((t == null ? ci : li)(n, e, t));
|
|
1826
1827
|
}
|
|
1827
|
-
function
|
|
1828
|
+
function di(e, t, n) {
|
|
1828
1829
|
var r = e._id;
|
|
1829
1830
|
return e.each(function() {
|
|
1830
1831
|
var e = K(this, r);
|
|
@@ -1833,289 +1834,289 @@ function ui(e, t, n) {
|
|
|
1833
1834
|
return q(e, r).value[t];
|
|
1834
1835
|
};
|
|
1835
1836
|
}
|
|
1836
|
-
function
|
|
1837
|
+
function fi(e, t) {
|
|
1837
1838
|
var n;
|
|
1838
|
-
return (typeof t == "number" ?
|
|
1839
|
+
return (typeof t == "number" ? ae : t instanceof Se ? he : (n = Se(t)) ? (t = n, he) : le)(e, t);
|
|
1839
1840
|
}
|
|
1840
|
-
|
|
1841
|
-
function
|
|
1841
|
+
ve();
|
|
1842
|
+
function pi(e) {
|
|
1842
1843
|
return function() {
|
|
1843
1844
|
this.removeAttribute(e);
|
|
1844
1845
|
};
|
|
1845
1846
|
}
|
|
1846
|
-
function
|
|
1847
|
+
function mi(e) {
|
|
1847
1848
|
return function() {
|
|
1848
1849
|
this.removeAttributeNS(e.space, e.local);
|
|
1849
1850
|
};
|
|
1850
1851
|
}
|
|
1851
|
-
function
|
|
1852
|
+
function hi(e, t, n) {
|
|
1852
1853
|
var r, i = n + "", a;
|
|
1853
1854
|
return function() {
|
|
1854
1855
|
var o = this.getAttribute(e);
|
|
1855
1856
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1856
1857
|
};
|
|
1857
1858
|
}
|
|
1858
|
-
function
|
|
1859
|
+
function gi(e, t, n) {
|
|
1859
1860
|
var r, i = n + "", a;
|
|
1860
1861
|
return function() {
|
|
1861
1862
|
var o = this.getAttributeNS(e.space, e.local);
|
|
1862
1863
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1863
1864
|
};
|
|
1864
1865
|
}
|
|
1865
|
-
function
|
|
1866
|
+
function _i(e, t, n) {
|
|
1866
1867
|
var r, i, a;
|
|
1867
1868
|
return function() {
|
|
1868
1869
|
var o, s = n(this), c;
|
|
1869
1870
|
return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1870
1871
|
};
|
|
1871
1872
|
}
|
|
1872
|
-
function
|
|
1873
|
+
function vi(e, t, n) {
|
|
1873
1874
|
var r, i, a;
|
|
1874
1875
|
return function() {
|
|
1875
1876
|
var o, s = n(this), c;
|
|
1876
1877
|
return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1877
1878
|
};
|
|
1878
1879
|
}
|
|
1879
|
-
function vi(e, t) {
|
|
1880
|
-
var n = mt(e), r = n === "transform" ? oe : di;
|
|
1881
|
-
return this.attrTween(e, typeof t == "function" ? (n.local ? _i : gi)(n, r, ui(this, "attr." + e, t)) : t == null ? (n.local ? pi : fi)(n) : (n.local ? hi : mi)(n, r, t));
|
|
1882
|
-
}
|
|
1883
1880
|
function yi(e, t) {
|
|
1881
|
+
var n = mt(e), r = n === "transform" ? ie : fi;
|
|
1882
|
+
return this.attrTween(e, typeof t == "function" ? (n.local ? vi : _i)(n, r, di(this, "attr." + e, t)) : t == null ? (n.local ? mi : pi)(n) : (n.local ? gi : hi)(n, r, t));
|
|
1883
|
+
}
|
|
1884
|
+
function bi(e, t) {
|
|
1884
1885
|
return function(n) {
|
|
1885
1886
|
this.setAttribute(e, t.call(this, n));
|
|
1886
1887
|
};
|
|
1887
1888
|
}
|
|
1888
|
-
function
|
|
1889
|
+
function xi(e, t) {
|
|
1889
1890
|
return function(n) {
|
|
1890
1891
|
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
1891
1892
|
};
|
|
1892
1893
|
}
|
|
1893
|
-
function
|
|
1894
|
+
function Si(e, t) {
|
|
1894
1895
|
var n, r;
|
|
1895
1896
|
function i() {
|
|
1896
1897
|
var i = t.apply(this, arguments);
|
|
1897
|
-
return i !== r && (n = (r = i) &&
|
|
1898
|
+
return i !== r && (n = (r = i) && xi(e, i)), n;
|
|
1898
1899
|
}
|
|
1899
1900
|
return i._value = t, i;
|
|
1900
1901
|
}
|
|
1901
|
-
function
|
|
1902
|
+
function Ci(e, t) {
|
|
1902
1903
|
var n, r;
|
|
1903
1904
|
function i() {
|
|
1904
1905
|
var i = t.apply(this, arguments);
|
|
1905
|
-
return i !== r && (n = (r = i) &&
|
|
1906
|
+
return i !== r && (n = (r = i) && bi(e, i)), n;
|
|
1906
1907
|
}
|
|
1907
1908
|
return i._value = t, i;
|
|
1908
1909
|
}
|
|
1909
|
-
function
|
|
1910
|
+
function wi(e, t) {
|
|
1910
1911
|
var n = "attr." + e;
|
|
1911
1912
|
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
1912
1913
|
if (t == null) return this.tween(n, null);
|
|
1913
1914
|
if (typeof t != "function") throw Error();
|
|
1914
1915
|
var r = mt(e);
|
|
1915
|
-
return this.tween(n, (r.local ?
|
|
1916
|
+
return this.tween(n, (r.local ? Si : Ci)(r, t));
|
|
1916
1917
|
}
|
|
1917
|
-
function
|
|
1918
|
+
function Ti(e, t) {
|
|
1918
1919
|
return function() {
|
|
1919
|
-
|
|
1920
|
+
ii(this, e).delay = +t.apply(this, arguments);
|
|
1920
1921
|
};
|
|
1921
1922
|
}
|
|
1922
|
-
function
|
|
1923
|
+
function Ei(e, t) {
|
|
1923
1924
|
return t = +t, function() {
|
|
1924
|
-
|
|
1925
|
+
ii(this, e).delay = t;
|
|
1925
1926
|
};
|
|
1926
1927
|
}
|
|
1927
|
-
function
|
|
1928
|
+
function Di(e) {
|
|
1928
1929
|
var t = this._id;
|
|
1929
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1930
|
+
return arguments.length ? this.each((typeof e == "function" ? Ti : Ei)(t, e)) : q(this.node(), t).delay;
|
|
1930
1931
|
}
|
|
1931
|
-
function
|
|
1932
|
+
function Oi(e, t) {
|
|
1932
1933
|
return function() {
|
|
1933
1934
|
K(this, e).duration = +t.apply(this, arguments);
|
|
1934
1935
|
};
|
|
1935
1936
|
}
|
|
1936
|
-
function
|
|
1937
|
+
function ki(e, t) {
|
|
1937
1938
|
return t = +t, function() {
|
|
1938
1939
|
K(this, e).duration = t;
|
|
1939
1940
|
};
|
|
1940
1941
|
}
|
|
1941
|
-
function
|
|
1942
|
+
function Ai(e) {
|
|
1942
1943
|
var t = this._id;
|
|
1943
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1944
|
+
return arguments.length ? this.each((typeof e == "function" ? Oi : ki)(t, e)) : q(this.node(), t).duration;
|
|
1944
1945
|
}
|
|
1945
|
-
function
|
|
1946
|
+
function ji(e, t) {
|
|
1946
1947
|
if (typeof t != "function") throw Error();
|
|
1947
1948
|
return function() {
|
|
1948
1949
|
K(this, e).ease = t;
|
|
1949
1950
|
};
|
|
1950
1951
|
}
|
|
1951
|
-
function
|
|
1952
|
+
function Mi(e) {
|
|
1952
1953
|
var t = this._id;
|
|
1953
|
-
return arguments.length ? this.each(
|
|
1954
|
+
return arguments.length ? this.each(ji(t, e)) : q(this.node(), t).ease;
|
|
1954
1955
|
}
|
|
1955
|
-
function
|
|
1956
|
+
function Ni(e, t) {
|
|
1956
1957
|
return function() {
|
|
1957
1958
|
var n = t.apply(this, arguments);
|
|
1958
1959
|
if (typeof n != "function") throw Error();
|
|
1959
1960
|
K(this, e).ease = n;
|
|
1960
1961
|
};
|
|
1961
1962
|
}
|
|
1962
|
-
function
|
|
1963
|
+
function Pi(e) {
|
|
1963
1964
|
if (typeof e != "function") throw Error();
|
|
1964
|
-
return this.each(
|
|
1965
|
+
return this.each(Ni(this._id, e));
|
|
1965
1966
|
}
|
|
1966
|
-
function
|
|
1967
|
+
function Fi(e) {
|
|
1967
1968
|
typeof e != "function" && (e = Et(e));
|
|
1968
1969
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
1969
1970
|
return new J(r, this._parents, this._name, this._id);
|
|
1970
1971
|
}
|
|
1971
|
-
function
|
|
1972
|
+
function Ii(e) {
|
|
1972
1973
|
if (e._id !== this._id) throw Error();
|
|
1973
1974
|
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
|
|
1974
1975
|
for (; s < r; ++s) o[s] = t[s];
|
|
1975
1976
|
return new J(o, this._parents, this._name, this._id);
|
|
1976
1977
|
}
|
|
1977
|
-
function
|
|
1978
|
+
function Li(e) {
|
|
1978
1979
|
return (e + "").trim().split(/^|\s+/).every(function(e) {
|
|
1979
1980
|
var t = e.indexOf(".");
|
|
1980
1981
|
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
|
|
1981
1982
|
});
|
|
1982
1983
|
}
|
|
1983
|
-
function
|
|
1984
|
-
var r, i, a =
|
|
1984
|
+
function Ri(e, t, n) {
|
|
1985
|
+
var r, i, a = Li(t) ? ii : K;
|
|
1985
1986
|
return function() {
|
|
1986
1987
|
var o = a(this, e), s = o.on;
|
|
1987
1988
|
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
|
|
1988
1989
|
};
|
|
1989
1990
|
}
|
|
1990
|
-
function
|
|
1991
|
+
function zi(e, t) {
|
|
1991
1992
|
var n = this._id;
|
|
1992
|
-
return arguments.length < 2 ? q(this.node(), n).on.on(e) : this.each(
|
|
1993
|
+
return arguments.length < 2 ? q(this.node(), n).on.on(e) : this.each(Ri(n, e, t));
|
|
1993
1994
|
}
|
|
1994
|
-
function
|
|
1995
|
+
function Bi(e) {
|
|
1995
1996
|
return function() {
|
|
1996
1997
|
var t = this.parentNode;
|
|
1997
1998
|
for (var n in this.__transition) if (+n !== e) return;
|
|
1998
1999
|
t && t.removeChild(this);
|
|
1999
2000
|
};
|
|
2000
2001
|
}
|
|
2001
|
-
function
|
|
2002
|
-
return this.on("end.remove",
|
|
2002
|
+
function Vi() {
|
|
2003
|
+
return this.on("end.remove", Bi(this._id));
|
|
2003
2004
|
}
|
|
2004
|
-
function
|
|
2005
|
+
function Hi(e) {
|
|
2005
2006
|
var t = this._name, n = this._id;
|
|
2006
2007
|
typeof e != "function" && (e = yt(e));
|
|
2007
|
-
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d,
|
|
2008
|
+
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d, ri(l[f], t, n, f, l, q(u, n)));
|
|
2008
2009
|
return new J(a, this._parents, t, n);
|
|
2009
2010
|
}
|
|
2010
|
-
function
|
|
2011
|
+
function Ui(e) {
|
|
2011
2012
|
var t = this._name, n = this._id;
|
|
2012
2013
|
typeof e != "function" && (e = Ct(e));
|
|
2013
2014
|
for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, u, d = 0; d < l; ++d) if (u = c[d]) {
|
|
2014
|
-
for (var f = e.call(u, u.__data__, d, c), p, m = q(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) &&
|
|
2015
|
+
for (var f = e.call(u, u.__data__, d, c), p, m = q(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && ri(p, t, n, h, f, m);
|
|
2015
2016
|
a.push(f), o.push(u);
|
|
2016
2017
|
}
|
|
2017
2018
|
return new J(a, o, t, n);
|
|
2018
2019
|
}
|
|
2019
|
-
var
|
|
2020
|
-
function
|
|
2021
|
-
return new
|
|
2020
|
+
var Wi = N.prototype.constructor;
|
|
2021
|
+
function Gi() {
|
|
2022
|
+
return new Wi(this._groups, this._parents);
|
|
2022
2023
|
}
|
|
2023
|
-
|
|
2024
|
-
function
|
|
2024
|
+
ve();
|
|
2025
|
+
function Ki(e, t) {
|
|
2025
2026
|
var n, r, i;
|
|
2026
2027
|
return function() {
|
|
2027
|
-
var a =
|
|
2028
|
+
var a = j(this, e), o = (this.style.removeProperty(e), j(this, e));
|
|
2028
2029
|
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
|
|
2029
2030
|
};
|
|
2030
2031
|
}
|
|
2031
|
-
function
|
|
2032
|
+
function qi(e) {
|
|
2032
2033
|
return function() {
|
|
2033
2034
|
this.style.removeProperty(e);
|
|
2034
2035
|
};
|
|
2035
2036
|
}
|
|
2036
|
-
function
|
|
2037
|
+
function Ji(e, t, n) {
|
|
2037
2038
|
var r, i = n + "", a;
|
|
2038
2039
|
return function() {
|
|
2039
|
-
var o =
|
|
2040
|
+
var o = j(this, e);
|
|
2040
2041
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2041
2042
|
};
|
|
2042
2043
|
}
|
|
2043
|
-
function
|
|
2044
|
+
function Yi(e, t, n) {
|
|
2044
2045
|
var r, i, a;
|
|
2045
2046
|
return function() {
|
|
2046
|
-
var o =
|
|
2047
|
-
return s ?? (c = s = (this.style.removeProperty(e),
|
|
2047
|
+
var o = j(this, e), s = n(this), c = s + "";
|
|
2048
|
+
return s ?? (c = s = (this.style.removeProperty(e), j(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
|
|
2048
2049
|
};
|
|
2049
2050
|
}
|
|
2050
|
-
function
|
|
2051
|
+
function Xi(e, t) {
|
|
2051
2052
|
var n, r, i, a = "style." + t, o = "end." + a, s;
|
|
2052
2053
|
return function() {
|
|
2053
|
-
var c = K(this, e), l = c.on, u = c.value[a] == null ? s ||=
|
|
2054
|
+
var c = K(this, e), l = c.on, u = c.value[a] == null ? s ||= qi(t) : void 0;
|
|
2054
2055
|
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
|
|
2055
2056
|
};
|
|
2056
2057
|
}
|
|
2057
|
-
function Xi(e, t, n) {
|
|
2058
|
-
var r = (e += "") == "transform" ? ue : di;
|
|
2059
|
-
return t == null ? this.styleTween(e, Gi(e, r)).on("end.style." + e, Ki(e)) : typeof t == "function" ? this.styleTween(e, Ji(e, r, ui(this, "style." + e, t))).each(Yi(this._id, e)) : this.styleTween(e, qi(e, r, t), n).on("end.style." + e, null);
|
|
2060
|
-
}
|
|
2061
2058
|
function Zi(e, t, n) {
|
|
2059
|
+
var r = (e += "") == "transform" ? ce : fi;
|
|
2060
|
+
return t == null ? this.styleTween(e, Ki(e, r)).on("end.style." + e, qi(e)) : typeof t == "function" ? this.styleTween(e, Yi(e, r, di(this, "style." + e, t))).each(Xi(this._id, e)) : this.styleTween(e, Ji(e, r, t), n).on("end.style." + e, null);
|
|
2061
|
+
}
|
|
2062
|
+
function Qi(e, t, n) {
|
|
2062
2063
|
return function(r) {
|
|
2063
2064
|
this.style.setProperty(e, t.call(this, r), n);
|
|
2064
2065
|
};
|
|
2065
2066
|
}
|
|
2066
|
-
function
|
|
2067
|
+
function $i(e, t, n) {
|
|
2067
2068
|
var r, i;
|
|
2068
2069
|
function a() {
|
|
2069
2070
|
var a = t.apply(this, arguments);
|
|
2070
|
-
return a !== i && (r = (i = a) &&
|
|
2071
|
+
return a !== i && (r = (i = a) && Qi(e, a, n)), r;
|
|
2071
2072
|
}
|
|
2072
2073
|
return a._value = t, a;
|
|
2073
2074
|
}
|
|
2074
|
-
function
|
|
2075
|
+
function ea(e, t, n) {
|
|
2075
2076
|
var r = "style." + (e += "");
|
|
2076
2077
|
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
2077
2078
|
if (t == null) return this.tween(r, null);
|
|
2078
2079
|
if (typeof t != "function") throw Error();
|
|
2079
|
-
return this.tween(r,
|
|
2080
|
+
return this.tween(r, $i(e, t, n ?? ""));
|
|
2080
2081
|
}
|
|
2081
|
-
function
|
|
2082
|
+
function ta(e) {
|
|
2082
2083
|
return function() {
|
|
2083
2084
|
this.textContent = e;
|
|
2084
2085
|
};
|
|
2085
2086
|
}
|
|
2086
|
-
function
|
|
2087
|
+
function na(e) {
|
|
2087
2088
|
return function() {
|
|
2088
2089
|
var t = e(this);
|
|
2089
2090
|
this.textContent = t ?? "";
|
|
2090
2091
|
};
|
|
2091
2092
|
}
|
|
2092
|
-
function na(e) {
|
|
2093
|
-
return this.tween("text", typeof e == "function" ? ta(ui(this, "text", e)) : ea(e == null ? "" : e + ""));
|
|
2094
|
-
}
|
|
2095
2093
|
function ra(e) {
|
|
2094
|
+
return this.tween("text", typeof e == "function" ? na(di(this, "text", e)) : ta(e == null ? "" : e + ""));
|
|
2095
|
+
}
|
|
2096
|
+
function ia(e) {
|
|
2096
2097
|
return function(t) {
|
|
2097
2098
|
this.textContent = e.call(this, t);
|
|
2098
2099
|
};
|
|
2099
2100
|
}
|
|
2100
|
-
function
|
|
2101
|
+
function aa(e) {
|
|
2101
2102
|
var t, n;
|
|
2102
2103
|
function r() {
|
|
2103
2104
|
var r = e.apply(this, arguments);
|
|
2104
|
-
return r !== n && (t = (n = r) &&
|
|
2105
|
+
return r !== n && (t = (n = r) && ia(r)), t;
|
|
2105
2106
|
}
|
|
2106
2107
|
return r._value = e, r;
|
|
2107
2108
|
}
|
|
2108
|
-
function
|
|
2109
|
+
function oa(e) {
|
|
2109
2110
|
var t = "text";
|
|
2110
2111
|
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
|
|
2111
2112
|
if (e == null) return this.tween(t, null);
|
|
2112
2113
|
if (typeof e != "function") throw Error();
|
|
2113
|
-
return this.tween(t,
|
|
2114
|
+
return this.tween(t, aa(e));
|
|
2114
2115
|
}
|
|
2115
|
-
function
|
|
2116
|
-
for (var e = this._name, t = this._id, n =
|
|
2116
|
+
function sa() {
|
|
2117
|
+
for (var e = this._name, t = this._id, n = da(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
|
|
2117
2118
|
var u = q(c, t);
|
|
2118
|
-
|
|
2119
|
+
ri(c, e, n, l, o, {
|
|
2119
2120
|
time: u.time + u.delay + u.duration,
|
|
2120
2121
|
delay: 0,
|
|
2121
2122
|
duration: u.duration,
|
|
@@ -2124,7 +2125,7 @@ function oa() {
|
|
|
2124
2125
|
}
|
|
2125
2126
|
return new J(r, this._parents, e, n);
|
|
2126
2127
|
}
|
|
2127
|
-
function
|
|
2128
|
+
function ca() {
|
|
2128
2129
|
var e, t, n = this, r = n._id, i = n.size();
|
|
2129
2130
|
return new Promise(function(a, o) {
|
|
2130
2131
|
var s = { value: o }, c = { value: function() {
|
|
@@ -2136,68 +2137,68 @@ function sa() {
|
|
|
2136
2137
|
}), i === 0 && a();
|
|
2137
2138
|
});
|
|
2138
2139
|
}
|
|
2139
|
-
var
|
|
2140
|
+
var la = 0;
|
|
2140
2141
|
function J(e, t, n, r) {
|
|
2141
2142
|
this._groups = e, this._parents = t, this._name = n, this._id = r;
|
|
2142
2143
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2144
|
+
function ua(e) {
|
|
2145
|
+
return N().transition(e);
|
|
2145
2146
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return ++
|
|
2147
|
+
function da() {
|
|
2148
|
+
return ++la;
|
|
2148
2149
|
}
|
|
2149
|
-
var Y =
|
|
2150
|
-
J.prototype =
|
|
2150
|
+
var Y = N.prototype;
|
|
2151
|
+
J.prototype = ua.prototype = {
|
|
2151
2152
|
constructor: J,
|
|
2152
|
-
select:
|
|
2153
|
-
selectAll:
|
|
2153
|
+
select: Hi,
|
|
2154
|
+
selectAll: Ui,
|
|
2154
2155
|
selectChild: Y.selectChild,
|
|
2155
2156
|
selectChildren: Y.selectChildren,
|
|
2156
|
-
filter:
|
|
2157
|
-
merge:
|
|
2158
|
-
selection:
|
|
2159
|
-
transition:
|
|
2157
|
+
filter: Fi,
|
|
2158
|
+
merge: Ii,
|
|
2159
|
+
selection: Gi,
|
|
2160
|
+
transition: sa,
|
|
2160
2161
|
call: Y.call,
|
|
2161
2162
|
nodes: Y.nodes,
|
|
2162
2163
|
node: Y.node,
|
|
2163
2164
|
size: Y.size,
|
|
2164
2165
|
empty: Y.empty,
|
|
2165
2166
|
each: Y.each,
|
|
2166
|
-
on:
|
|
2167
|
-
attr:
|
|
2168
|
-
attrTween:
|
|
2169
|
-
style:
|
|
2170
|
-
styleTween:
|
|
2171
|
-
text:
|
|
2172
|
-
textTween:
|
|
2173
|
-
remove:
|
|
2174
|
-
tween:
|
|
2175
|
-
delay:
|
|
2176
|
-
duration:
|
|
2177
|
-
ease:
|
|
2178
|
-
easeVarying:
|
|
2179
|
-
end:
|
|
2167
|
+
on: zi,
|
|
2168
|
+
attr: yi,
|
|
2169
|
+
attrTween: wi,
|
|
2170
|
+
style: Zi,
|
|
2171
|
+
styleTween: ea,
|
|
2172
|
+
text: ra,
|
|
2173
|
+
textTween: oa,
|
|
2174
|
+
remove: Vi,
|
|
2175
|
+
tween: ui,
|
|
2176
|
+
delay: Di,
|
|
2177
|
+
duration: Ai,
|
|
2178
|
+
ease: Mi,
|
|
2179
|
+
easeVarying: Pi,
|
|
2180
|
+
end: ca,
|
|
2180
2181
|
[Symbol.iterator]: Y[Symbol.iterator]
|
|
2181
|
-
},
|
|
2182
|
-
var
|
|
2182
|
+
}, me();
|
|
2183
|
+
var fa = {
|
|
2183
2184
|
time: null,
|
|
2184
2185
|
delay: 0,
|
|
2185
2186
|
duration: 250,
|
|
2186
|
-
ease:
|
|
2187
|
+
ease: pe
|
|
2187
2188
|
};
|
|
2188
|
-
function
|
|
2189
|
+
function pa(e, t) {
|
|
2189
2190
|
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
|
|
2190
2191
|
return n;
|
|
2191
2192
|
}
|
|
2192
|
-
function
|
|
2193
|
+
function ma(e) {
|
|
2193
2194
|
var t, n;
|
|
2194
|
-
e instanceof J ? (t = e._id, e = e._name) : (t =
|
|
2195
|
-
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) &&
|
|
2195
|
+
e instanceof J ? (t = e._id, e = e._name) : (t = da(), (n = fa).time = Gr(), e = e == null ? null : e + "");
|
|
2196
|
+
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && ri(c, e, t, l, o, n || pa(c, t));
|
|
2196
2197
|
return new J(r, this._parents, e, t);
|
|
2197
2198
|
}
|
|
2198
|
-
|
|
2199
|
-
var
|
|
2200
|
-
function
|
|
2199
|
+
N.prototype.interrupt = si, N.prototype.transition = ma;
|
|
2200
|
+
var ha = (e) => () => e;
|
|
2201
|
+
function ga(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
2201
2202
|
Object.defineProperties(this, {
|
|
2202
2203
|
type: {
|
|
2203
2204
|
value: e,
|
|
@@ -2261,47 +2262,47 @@ X.prototype = {
|
|
|
2261
2262
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2262
2263
|
}
|
|
2263
2264
|
};
|
|
2264
|
-
var
|
|
2265
|
-
|
|
2266
|
-
function
|
|
2267
|
-
for (; !e.__zoom;) if (!(e = e.parentNode)) return
|
|
2265
|
+
var _a = new X(1, 0, 0);
|
|
2266
|
+
va.prototype = X.prototype;
|
|
2267
|
+
function va(e) {
|
|
2268
|
+
for (; !e.__zoom;) if (!(e = e.parentNode)) return _a;
|
|
2268
2269
|
return e.__zoom;
|
|
2269
2270
|
}
|
|
2270
|
-
function
|
|
2271
|
+
function ya(e) {
|
|
2271
2272
|
e.stopImmediatePropagation();
|
|
2272
2273
|
}
|
|
2273
2274
|
function Z(e) {
|
|
2274
2275
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
2275
2276
|
}
|
|
2276
|
-
|
|
2277
|
-
function
|
|
2277
|
+
Fe(), ve();
|
|
2278
|
+
function ba(e) {
|
|
2278
2279
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
2279
2280
|
}
|
|
2280
|
-
function
|
|
2281
|
+
function xa() {
|
|
2281
2282
|
var e = this;
|
|
2282
2283
|
return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
2283
2284
|
}
|
|
2284
|
-
function
|
|
2285
|
-
return this.__zoom ||
|
|
2285
|
+
function Sa() {
|
|
2286
|
+
return this.__zoom || _a;
|
|
2286
2287
|
}
|
|
2287
|
-
function
|
|
2288
|
+
function Ca(e) {
|
|
2288
2289
|
return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
|
|
2289
2290
|
}
|
|
2290
|
-
function
|
|
2291
|
+
function wa() {
|
|
2291
2292
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
2292
2293
|
}
|
|
2293
|
-
function
|
|
2294
|
+
function Ta(e, t, n) {
|
|
2294
2295
|
var r = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], a = e.invertY(t[0][1]) - n[0][1], o = e.invertY(t[1][1]) - n[1][1];
|
|
2295
2296
|
return e.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o));
|
|
2296
2297
|
}
|
|
2297
|
-
function
|
|
2298
|
-
var e =
|
|
2298
|
+
function Ea() {
|
|
2299
|
+
var e = ba, t = xa, n = Ta, r = Ca, i = wa, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = fe, l = Pe("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
|
|
2299
2300
|
function _(e) {
|
|
2300
|
-
e.property("__zoom",
|
|
2301
|
+
e.property("__zoom", Sa).on("wheel.zoom", ee, { passive: !1 }).on("mousedown.zoom", w).on("dblclick.zoom", te).filter(i).on("touchstart.zoom", ne).on("touchmove.zoom", T).on("touchend.zoom touchcancel.zoom", re).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2301
2302
|
}
|
|
2302
2303
|
_.transform = function(e, t, n, r) {
|
|
2303
2304
|
var i = e.selection ? e.selection() : e;
|
|
2304
|
-
i.property("__zoom",
|
|
2305
|
+
i.property("__zoom", Sa), e === i ? i.interrupt().each(function() {
|
|
2305
2306
|
S(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
|
|
2306
2307
|
}) : x(e, t, n, r);
|
|
2307
2308
|
}, _.scaleBy = function(e, t, n, r) {
|
|
@@ -2320,7 +2321,7 @@ function Ta() {
|
|
|
2320
2321
|
}, _.translateTo = function(e, r, i, a, s) {
|
|
2321
2322
|
_.transform(e, function() {
|
|
2322
2323
|
var e = t.apply(this, arguments), s = this.__zoom, c = a == null ? b(e) : typeof a == "function" ? a.apply(this, arguments) : a;
|
|
2323
|
-
return n(
|
|
2324
|
+
return n(_a.translate(c[0], c[1]).scale(s.k).translate(typeof r == "function" ? -r.apply(this, arguments) : -r, typeof i == "function" ? -i.apply(this, arguments) : -i), e, o);
|
|
2324
2325
|
}, a, s);
|
|
2325
2326
|
};
|
|
2326
2327
|
function v(e, t) {
|
|
@@ -2370,8 +2371,8 @@ function Ta() {
|
|
|
2370
2371
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
2371
2372
|
},
|
|
2372
2373
|
emit: function(e) {
|
|
2373
|
-
var t =
|
|
2374
|
-
l.call(e, this.that, new
|
|
2374
|
+
var t = P(this.that).datum();
|
|
2375
|
+
l.call(e, this.that, new ga(e, {
|
|
2375
2376
|
sourceEvent: this.sourceEvent,
|
|
2376
2377
|
target: _,
|
|
2377
2378
|
type: e,
|
|
@@ -2382,53 +2383,53 @@ function Ta() {
|
|
|
2382
2383
|
};
|
|
2383
2384
|
function ee(t, ...i) {
|
|
2384
2385
|
if (!e.apply(this, arguments)) return;
|
|
2385
|
-
var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u =
|
|
2386
|
+
var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u = F(t);
|
|
2386
2387
|
if (s.wheel) (s.mouse[0][0] !== u[0] || s.mouse[0][1] !== u[1]) && (s.mouse[1] = c.invert(s.mouse[0] = u)), clearTimeout(s.wheel);
|
|
2387
2388
|
else if (c.k === l) return;
|
|
2388
|
-
else s.mouse = [u, c.invert(u)],
|
|
2389
|
+
else s.mouse = [u, c.invert(u)], oi(this), s.start();
|
|
2389
2390
|
Z(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
|
|
2390
2391
|
function d() {
|
|
2391
2392
|
s.wheel = null, s.end();
|
|
2392
2393
|
}
|
|
2393
2394
|
}
|
|
2394
|
-
function
|
|
2395
|
+
function w(t, ...r) {
|
|
2395
2396
|
if (f || !e.apply(this, arguments)) return;
|
|
2396
|
-
var i = t.currentTarget, a = S(this, r, !0).event(t), s =
|
|
2397
|
-
kr(t.view),
|
|
2397
|
+
var i = t.currentTarget, a = S(this, r, !0).event(t), s = P(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", p, !0), c = F(t, i), l = t.clientX, u = t.clientY;
|
|
2398
|
+
kr(t.view), ya(t), a.mouse = [c, this.__zoom.invert(c)], oi(this), a.start();
|
|
2398
2399
|
function d(e) {
|
|
2399
2400
|
if (Z(e), !a.moved) {
|
|
2400
2401
|
var t = e.clientX - l, r = e.clientY - u;
|
|
2401
2402
|
a.moved = t * t + r * r > h;
|
|
2402
2403
|
}
|
|
2403
|
-
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] =
|
|
2404
|
+
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = F(e, i), a.mouse[1]), a.extent, o));
|
|
2404
2405
|
}
|
|
2405
2406
|
function p(e) {
|
|
2406
2407
|
s.on("mousemove.zoom mouseup.zoom", null), Ar(e.view, a.moved), Z(e), a.event(e).end();
|
|
2407
2408
|
}
|
|
2408
2409
|
}
|
|
2409
|
-
function
|
|
2410
|
+
function te(r, ...i) {
|
|
2410
2411
|
if (e.apply(this, arguments)) {
|
|
2411
|
-
var a = this.__zoom, c =
|
|
2412
|
-
Z(r), s > 0 ?
|
|
2412
|
+
var a = this.__zoom, c = F(r.changedTouches ? r.changedTouches[0] : r, this), l = a.invert(c), u = a.k * (r.shiftKey ? .5 : 2), d = n(y(v(a, u), c, l), t.apply(this, i), o);
|
|
2413
|
+
Z(r), s > 0 ? P(this).transition().duration(s).call(x, d, c, r) : P(this).call(_.transform, d, c, r);
|
|
2413
2414
|
}
|
|
2414
2415
|
}
|
|
2415
|
-
function
|
|
2416
|
+
function ne(t, ...n) {
|
|
2416
2417
|
if (e.apply(this, arguments)) {
|
|
2417
2418
|
var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
|
|
2418
|
-
for (
|
|
2419
|
+
for (ya(t), s = 0; s < i; ++s) c = r[s], l = F(c, this), l = [
|
|
2419
2420
|
l,
|
|
2420
2421
|
this.__zoom.invert(l),
|
|
2421
2422
|
c.identifier
|
|
2422
2423
|
], a.touch0 ? !a.touch1 && a.touch0[2] !== l[2] && (a.touch1 = l, a.taps = 0) : (a.touch0 = l, o = !0, a.taps = 1 + !!u);
|
|
2423
2424
|
u &&= clearTimeout(u), o && (a.taps < 2 && (d = l[0], u = setTimeout(function() {
|
|
2424
2425
|
u = null;
|
|
2425
|
-
}, p)),
|
|
2426
|
+
}, p)), oi(this), a.start());
|
|
2426
2427
|
}
|
|
2427
2428
|
}
|
|
2428
|
-
function
|
|
2429
|
+
function T(e, ...t) {
|
|
2429
2430
|
if (this.__zooming) {
|
|
2430
2431
|
var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
|
|
2431
|
-
for (Z(e), s = 0; s < a; ++s) c = i[s], l =
|
|
2432
|
+
for (Z(e), s = 0; s < a; ++s) c = i[s], l = F(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
|
|
2432
2433
|
if (c = r.that.__zoom, r.touch1) {
|
|
2433
2434
|
var d = r.touch0[0], f = r.touch0[1], p = r.touch1[0], m = r.touch1[1], h = (h = p[0] - d[0]) * h + (h = p[1] - d[1]) * h, g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g;
|
|
2434
2435
|
c = v(c, Math.sqrt(h / g)), l = [(d[0] + p[0]) / 2, (d[1] + p[1]) / 2], u = [(f[0] + m[0]) / 2, (f[1] + m[1]) / 2];
|
|
@@ -2437,27 +2438,27 @@ function Ta() {
|
|
|
2437
2438
|
r.zoom("touch", n(y(c, l, u), r.extent, o));
|
|
2438
2439
|
}
|
|
2439
2440
|
}
|
|
2440
|
-
function
|
|
2441
|
+
function re(e, ...t) {
|
|
2441
2442
|
if (this.__zooming) {
|
|
2442
2443
|
var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
|
|
2443
|
-
for (
|
|
2444
|
+
for (ya(e), f && clearTimeout(f), f = setTimeout(function() {
|
|
2444
2445
|
f = null;
|
|
2445
2446
|
}, p), a = 0; a < i; ++a) o = r[a], n.touch0 && n.touch0[2] === o.identifier ? delete n.touch0 : n.touch1 && n.touch1[2] === o.identifier && delete n.touch1;
|
|
2446
2447
|
if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
|
|
2447
|
-
else if (n.end(), n.taps === 2 && (o =
|
|
2448
|
-
var s =
|
|
2448
|
+
else if (n.end(), n.taps === 2 && (o = F(o, this), Math.hypot(d[0] - o[0], d[1] - o[1]) < g)) {
|
|
2449
|
+
var s = P(this).on("dblclick.zoom");
|
|
2449
2450
|
s && s.apply(this, arguments);
|
|
2450
2451
|
}
|
|
2451
2452
|
}
|
|
2452
2453
|
}
|
|
2453
2454
|
return _.wheelDelta = function(e) {
|
|
2454
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
2455
|
+
return arguments.length ? (r = typeof e == "function" ? e : ha(+e), _) : r;
|
|
2455
2456
|
}, _.filter = function(t) {
|
|
2456
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
2457
|
+
return arguments.length ? (e = typeof t == "function" ? t : ha(!!t), _) : e;
|
|
2457
2458
|
}, _.touchable = function(e) {
|
|
2458
|
-
return arguments.length ? (i = typeof e == "function" ? e :
|
|
2459
|
+
return arguments.length ? (i = typeof e == "function" ? e : ha(!!e), _) : i;
|
|
2459
2460
|
}, _.extent = function(e) {
|
|
2460
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
2461
|
+
return arguments.length ? (t = typeof e == "function" ? e : ha([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
|
|
2461
2462
|
}, _.scaleExtent = function(e) {
|
|
2462
2463
|
return arguments.length ? (a[0] = +e[0], a[1] = +e[1], _) : [a[0], a[1]];
|
|
2463
2464
|
}, _.translateExtent = function(e) {
|
|
@@ -2477,8 +2478,8 @@ function Ta() {
|
|
|
2477
2478
|
return arguments.length ? (g = +e, _) : g;
|
|
2478
2479
|
}, _;
|
|
2479
2480
|
}
|
|
2480
|
-
|
|
2481
|
-
var
|
|
2481
|
+
E();
|
|
2482
|
+
var Da = (e) => ({
|
|
2482
2483
|
left: {
|
|
2483
2484
|
nodeLeftX: () => 0,
|
|
2484
2485
|
nodeRightX: (e) => e.width,
|
|
@@ -2612,7 +2613,7 @@ var Ea = (e) => ({
|
|
|
2612
2613
|
nodeUpdateTransform: ({ x: e, y: t, width: n, height: r }) => `translate(${e - n},${t - r / 2})`
|
|
2613
2614
|
}
|
|
2614
2615
|
});
|
|
2615
|
-
function
|
|
2616
|
+
function Oa(e, t, n) {
|
|
2616
2617
|
let r = e.x, i = e.y, a = t.x, o = t.y, s = n && n.x != null ? n.x : r, c = n && n.y != null ? n.y : i, l = a - r < 0 ? -1 : 1, u = o - i < 0 ? -1 : 1, d = Math.abs(a - r) / 2 < 35 ? Math.abs(a - r) / 2 : 35;
|
|
2617
2618
|
d = Math.abs(o - i) / 2 < d ? Math.abs(o - i) / 2 : d;
|
|
2618
2619
|
let f = Math.abs(a - r) / 2 - d;
|
|
@@ -2630,7 +2631,7 @@ function Da(e, t, n) {
|
|
|
2630
2631
|
${a - f * l} ${o}
|
|
2631
2632
|
L ${a} ${o}`;
|
|
2632
2633
|
}
|
|
2633
|
-
function
|
|
2634
|
+
function ka(e, t, n, r = { sy: 0 }) {
|
|
2634
2635
|
let i = e.x, a = e.y, o = t.x, s = t.y, c = n && n.x != null ? n.x : i, l = n && n.y != null ? n.y : a, u = o - i < 0 ? -1 : 1, d = s - a < 0 ? -1 : 1;
|
|
2635
2636
|
a += r.sy;
|
|
2636
2637
|
let f = Math.abs(o - i) / 2 < 15 ? Math.abs(o - i) / 2 : 15;
|
|
@@ -2646,7 +2647,7 @@ function Oa(e, t, n, r = { sy: 0 }) {
|
|
|
2646
2647
|
C ${o} ${a + p * d + f * d} ${o} ${a + p * d + f * d} ${o} ${s - p * d}
|
|
2647
2648
|
L ${o} ${s}`;
|
|
2648
2649
|
}
|
|
2649
|
-
function
|
|
2650
|
+
function Aa({ node: e, config: t }) {
|
|
2650
2651
|
return e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
|
|
2651
2652
|
left: (t) => t ? `<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2652
2653
|
<path d="M14.283 3.50094L6.51 11.4749C6.37348 11.615 6.29707 11.8029 6.29707 11.9984C6.29707 12.194 6.37348 12.3819 6.51 12.5219L14.283 20.4989C14.3466 20.5643 14.4226 20.6162 14.5066 20.6516C14.5906 20.6871 14.6808 20.7053 14.772 20.7053C14.8632 20.7053 14.9534 20.6871 15.0374 20.6516C15.1214 20.6162 15.1974 20.5643 15.261 20.4989C15.3918 20.365 15.4651 20.1852 15.4651 19.9979C15.4651 19.8107 15.3918 19.6309 15.261 19.4969L7.9515 11.9984L15.261 4.50144C15.3914 4.36756 15.4643 4.18807 15.4643 4.00119C15.4643 3.81431 15.3914 3.63482 15.261 3.50094C15.1974 3.43563 15.1214 3.38371 15.0374 3.34827C14.9534 3.31282 14.8632 3.29456 14.772 3.29456C14.6808 3.29456 14.5906 3.31282 14.5066 3.34827C14.4226 3.38371 14.3466 3.43563 14.283 3.50094V3.50094Z" fill="#716E7B" stroke="#716E7B"/>
|
|
@@ -2674,7 +2675,7 @@ function ka({ node: e, config: t }) {
|
|
|
2674
2675
|
`
|
|
2675
2676
|
}[t.layout](e.children)} </div>`;
|
|
2676
2677
|
}
|
|
2677
|
-
function
|
|
2678
|
+
function ja(e, t, n, r) {
|
|
2678
2679
|
if (!e.parent) return "";
|
|
2679
2680
|
let i = r.pagingStep(e.parent), a = e.parent.data._pagingStep ?? 0, o = (e.parent.data._directSubordinatesPaging ?? 0) - a;
|
|
2680
2681
|
return `
|
|
@@ -2687,7 +2688,7 @@ function Aa(e, t, n, r) {
|
|
|
2687
2688
|
</div>
|
|
2688
2689
|
`;
|
|
2689
2690
|
}
|
|
2690
|
-
var
|
|
2691
|
+
var Ma = () => {
|
|
2691
2692
|
let e = {
|
|
2692
2693
|
svgWidth: 800,
|
|
2693
2694
|
svgHeight: window.innerHeight - 100,
|
|
@@ -2728,7 +2729,7 @@ var ja = () => {
|
|
|
2728
2729
|
compact: !0,
|
|
2729
2730
|
gridEnabled: !1,
|
|
2730
2731
|
gridRows: 0,
|
|
2731
|
-
createZoom: () =>
|
|
2732
|
+
createZoom: () => Ea(),
|
|
2732
2733
|
onZoomStart: () => {},
|
|
2733
2734
|
onZoom: () => {},
|
|
2734
2735
|
onZoomEnd: () => {},
|
|
@@ -2742,44 +2743,44 @@ var ja = () => {
|
|
|
2742
2743
|
onNodeParentChange() {},
|
|
2743
2744
|
onExpandOrCollapse: (e) => e,
|
|
2744
2745
|
nodeContent: (e) => e.id === "__root__" ? null : "<div class=\"node-content\"></div>",
|
|
2745
|
-
buttonContent:
|
|
2746
|
-
pagingButton:
|
|
2746
|
+
buttonContent: Aa,
|
|
2747
|
+
pagingButton: ja,
|
|
2747
2748
|
nodeUpdate: function() {
|
|
2748
|
-
|
|
2749
|
+
P(this).select(".node-rect").attr("stroke", null).attr("stroke-width", null);
|
|
2749
2750
|
},
|
|
2750
2751
|
nodeEnter: (e) => e,
|
|
2751
2752
|
nodeExit: (e) => e,
|
|
2752
2753
|
linkUpdate: function(e) {
|
|
2753
2754
|
if (e.data._upToTheRootHighlighted) {
|
|
2754
|
-
|
|
2755
|
+
P(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
2755
2756
|
return;
|
|
2756
2757
|
}
|
|
2757
|
-
|
|
2758
|
+
P(this).style("stroke", null).style("stroke-width", null), e.data._upToTheRootHighlighted && P(this).raise();
|
|
2758
2759
|
},
|
|
2759
|
-
hdiagonal:
|
|
2760
|
-
diagonal:
|
|
2761
|
-
linkGroupArc:
|
|
2760
|
+
hdiagonal: Oa,
|
|
2761
|
+
diagonal: ka,
|
|
2762
|
+
linkGroupArc: oe().x((e) => e.x).y((e) => e.y)
|
|
2762
2763
|
};
|
|
2763
|
-
return e.layoutBindings =
|
|
2764
|
-
},
|
|
2764
|
+
return e.layoutBindings = Da(e), e;
|
|
2765
|
+
}, Na = (e) => Math.min(1, 9 / e), Pa = (e, t, n, r) => {
|
|
2765
2766
|
if (r === void 0 || t - e <= n) return (e + t) / 2;
|
|
2766
2767
|
let i = n / 2;
|
|
2767
2768
|
return Math.min(t - i, Math.max(e + i, r));
|
|
2768
|
-
},
|
|
2769
|
+
}, Fa = ({ bounds: e, viewport: t, scaleExtent: n, minScale: r = 0, scale: i, focus: a }) => {
|
|
2769
2770
|
let { x0: o, x1: s, y0: c, y1: l } = e, { width: u, height: d } = t, [f, p] = n, m = 1 / Math.max((s - o) / u, (l - c) / d), h = i ?? Math.min(p, Math.max(Math.max(f, Math.min(r, p)), m));
|
|
2770
2771
|
return {
|
|
2771
2772
|
k: h,
|
|
2772
|
-
x: u / 2 - h *
|
|
2773
|
-
y: d / 2 - h *
|
|
2773
|
+
x: u / 2 - h * Pa(o, s, u / h, a?.x),
|
|
2774
|
+
y: d / 2 - h * Pa(c, l, d / h, a?.y)
|
|
2774
2775
|
};
|
|
2775
|
-
},
|
|
2776
|
-
let i = (0,
|
|
2776
|
+
}, Ia = (e, t, r) => {
|
|
2777
|
+
let i = (0, k.useRef)(e.treeChartSettings?.transform), a = (0, k.useRef)(null);
|
|
2777
2778
|
return a.current = (t) => {
|
|
2778
|
-
let i =
|
|
2779
|
+
let i = Ma(), a = t.treeOptions, o = {
|
|
2779
2780
|
linkUpdate: i.linkUpdate,
|
|
2780
2781
|
getButtonContent: i.buttonContent,
|
|
2781
2782
|
...Er[a.layoutPreset]
|
|
2782
|
-
}, s = o.sizes ? o.sizes(e) : {},
|
|
2783
|
+
}, s = o.sizes ? o.sizes(e) : {}, c = {
|
|
2783
2784
|
...o.labelStyle,
|
|
2784
2785
|
...e.treeChartSettings?.nodeLayout?.labelStyle,
|
|
2785
2786
|
fontSize: e.treeChartSettings?.nodeLayout?.labelStyle?.fontSize ?? o.labelStyle?.fontSize
|
|
@@ -2792,16 +2793,16 @@ var ja = () => {
|
|
|
2792
2793
|
...u,
|
|
2793
2794
|
...e.treeChartSettings?.nodeLayout.hoverStyle
|
|
2794
2795
|
}, p = f.enabled ? f.borderWidth : 0;
|
|
2795
|
-
r.nodeWidth((e) => (a.nodeWidth ? a.nodeWidth : typeof o.width == "function" ? o.width(e) : o.width) + (d.borderWidth ?? 0) * 2).nodeHeight((e) => (e.id === "__root__" ? 0 : typeof o.height == "function" ? o.height(e, s) : o.height) + (d.borderWidth ?? 0) * 2).nodeDefaultBackground(e.treeChartSettings?.nodeLayout?.backgroundColor ??
|
|
2796
|
+
r.nodeWidth((e) => (a.nodeWidth ? a.nodeWidth : typeof o.width == "function" ? o.width(e) : o.width) + (d.borderWidth ?? 0) * 2).nodeHeight((e) => (e.id === "__root__" ? 0 : typeof o.height == "function" ? o.height(e, s) : o.height) + (d.borderWidth ?? 0) * 2).nodeDefaultBackground(e.treeChartSettings?.nodeLayout?.backgroundColor ?? l.backgroundColor).compact(a.compact).layout(a.directionOrigin).padding({
|
|
2796
2797
|
top: p,
|
|
2797
2798
|
right: p,
|
|
2798
2799
|
bottom: p,
|
|
2799
2800
|
left: p
|
|
2800
|
-
}).gridEnabled(a.gridLayoutEnabled).gridRows(a.gridLayoutRows).forceAutoFit(a.forceAutoFit).minFitScale(a.keepFitReadable ?
|
|
2801
|
+
}).gridEnabled(a.gridLayoutEnabled).gridRows(a.gridLayoutRows).forceAutoFit(a.forceAutoFit).minFitScale(a.keepFitReadable ? Na(D(c.fontSize)) : 0).setActiveNodeCentered(!a.forceAutoFit).duration(a.animate === !1 ? 0 : 400).root(t.root).linkUpdate(o.linkUpdate).buttonContent(o.getButtonContent).container(t.container).nodeContent((e) => o.getNodeContent(e, { config: r.getConfig() })).render({
|
|
2801
2802
|
zoomToFit: t.zoomToFit ?? !1,
|
|
2802
2803
|
transform: t.transform
|
|
2803
2804
|
});
|
|
2804
|
-
}, (0,
|
|
2805
|
+
}, (0, k.useCallback)((e, n) => {
|
|
2805
2806
|
!e || !t.current || a.current?.({
|
|
2806
2807
|
root: e,
|
|
2807
2808
|
container: t.current,
|
|
@@ -2810,7 +2811,7 @@ var ja = () => {
|
|
|
2810
2811
|
transform: i.current ?? void 0
|
|
2811
2812
|
});
|
|
2812
2813
|
}, []);
|
|
2813
|
-
},
|
|
2814
|
+
}, La = {
|
|
2814
2815
|
directionOrigin: "top",
|
|
2815
2816
|
compact: !1,
|
|
2816
2817
|
layoutPreset: d.Basic,
|
|
@@ -2820,11 +2821,11 @@ var ja = () => {
|
|
|
2820
2821
|
interactive: !0,
|
|
2821
2822
|
gridLayoutEnabled: !1,
|
|
2822
2823
|
gridLayoutRows: 0
|
|
2823
|
-
},
|
|
2824
|
-
let n = t?.isPrintMode ?? !1, r = e.treeChartSettings?.forceAutoFit ??
|
|
2825
|
-
directionOrigin: e.treeChartSettings?.directionOrigin ??
|
|
2826
|
-
compact: e.treeChartSettings?.compact ??
|
|
2827
|
-
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ??
|
|
2824
|
+
}, Ra = (e, t) => {
|
|
2825
|
+
let n = t?.isPrintMode ?? !1, r = e.treeChartSettings?.forceAutoFit ?? La.forceAutoFit, i = {
|
|
2826
|
+
directionOrigin: e.treeChartSettings?.directionOrigin ?? La.directionOrigin,
|
|
2827
|
+
compact: e.treeChartSettings?.compact ?? La.compact,
|
|
2828
|
+
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ?? La.layoutPreset,
|
|
2828
2829
|
forceAutoFit: r,
|
|
2829
2830
|
keepFitReadable: !r && !n,
|
|
2830
2831
|
nodeWidth: e.treeChartSettings?.nodeLayout?.width,
|
|
@@ -2838,70 +2839,70 @@ var ja = () => {
|
|
|
2838
2839
|
layout: Er[i.layoutPreset || d.Basic]
|
|
2839
2840
|
};
|
|
2840
2841
|
};
|
|
2841
|
-
function
|
|
2842
|
+
function za(e) {
|
|
2842
2843
|
var t = 0, n = e.children, r = n && n.length;
|
|
2843
2844
|
if (!r) t = 1;
|
|
2844
2845
|
else for (; --r >= 0;) t += n[r].value;
|
|
2845
2846
|
e.value = t;
|
|
2846
2847
|
}
|
|
2847
|
-
function
|
|
2848
|
-
return this.eachAfter(
|
|
2848
|
+
function Ba() {
|
|
2849
|
+
return this.eachAfter(za);
|
|
2849
2850
|
}
|
|
2850
|
-
function
|
|
2851
|
+
function Va(e) {
|
|
2851
2852
|
var t = this, n, r = [t], i, a, o;
|
|
2852
2853
|
do
|
|
2853
2854
|
for (n = r.reverse(), r = []; t = n.pop();) if (e(t), i = t.children, i) for (a = 0, o = i.length; a < o; ++a) r.push(i[a]);
|
|
2854
2855
|
while (r.length);
|
|
2855
2856
|
return this;
|
|
2856
2857
|
}
|
|
2857
|
-
function
|
|
2858
|
+
function Ha(e) {
|
|
2858
2859
|
for (var t = this, n = [t], r, i; t = n.pop();) if (e(t), r = t.children, r) for (i = r.length - 1; i >= 0; --i) n.push(r[i]);
|
|
2859
2860
|
return this;
|
|
2860
2861
|
}
|
|
2861
|
-
function
|
|
2862
|
+
function Ua(e) {
|
|
2862
2863
|
for (var t = this, n = [t], r = [], i, a, o; t = n.pop();) if (r.push(t), i = t.children, i) for (a = 0, o = i.length; a < o; ++a) n.push(i[a]);
|
|
2863
2864
|
for (; t = r.pop();) e(t);
|
|
2864
2865
|
return this;
|
|
2865
2866
|
}
|
|
2866
|
-
function
|
|
2867
|
+
function Wa(e) {
|
|
2867
2868
|
return this.eachAfter(function(t) {
|
|
2868
2869
|
for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
|
|
2869
2870
|
t.value = n;
|
|
2870
2871
|
});
|
|
2871
2872
|
}
|
|
2872
|
-
function
|
|
2873
|
+
function Ga(e) {
|
|
2873
2874
|
return this.eachBefore(function(t) {
|
|
2874
2875
|
t.children && t.children.sort(e);
|
|
2875
2876
|
});
|
|
2876
2877
|
}
|
|
2877
|
-
function
|
|
2878
|
-
for (var t = this, n =
|
|
2878
|
+
function Ka(e) {
|
|
2879
|
+
for (var t = this, n = qa(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
|
|
2879
2880
|
for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
|
|
2880
2881
|
return r;
|
|
2881
2882
|
}
|
|
2882
|
-
function
|
|
2883
|
+
function qa(e, t) {
|
|
2883
2884
|
if (e === t) return e;
|
|
2884
2885
|
var n = e.ancestors(), r = t.ancestors(), i = null;
|
|
2885
2886
|
for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
|
|
2886
2887
|
return i;
|
|
2887
2888
|
}
|
|
2888
|
-
function
|
|
2889
|
+
function Ja() {
|
|
2889
2890
|
for (var e = this, t = [e]; e = e.parent;) t.push(e);
|
|
2890
2891
|
return t;
|
|
2891
2892
|
}
|
|
2892
|
-
function
|
|
2893
|
+
function Ya() {
|
|
2893
2894
|
var e = [];
|
|
2894
2895
|
return this.each(function(t) {
|
|
2895
2896
|
e.push(t);
|
|
2896
2897
|
}), e;
|
|
2897
2898
|
}
|
|
2898
|
-
function
|
|
2899
|
+
function Xa() {
|
|
2899
2900
|
var e = [];
|
|
2900
2901
|
return this.eachBefore(function(t) {
|
|
2901
2902
|
t.children || e.push(t);
|
|
2902
2903
|
}), e;
|
|
2903
2904
|
}
|
|
2904
|
-
function
|
|
2905
|
+
function Za() {
|
|
2905
2906
|
var e = this, t = [];
|
|
2906
2907
|
return e.each(function(n) {
|
|
2907
2908
|
n !== e && t.push({
|
|
@@ -2910,47 +2911,47 @@ function Xa() {
|
|
|
2910
2911
|
});
|
|
2911
2912
|
}), t;
|
|
2912
2913
|
}
|
|
2913
|
-
function
|
|
2914
|
-
var n = new
|
|
2915
|
-
for (t ??=
|
|
2916
|
-
return n.eachBefore(
|
|
2914
|
+
function Qa(e, t) {
|
|
2915
|
+
var n = new ro(e), r = +e.value && (n.value = e.value), i, a = [n], o, s, c, l;
|
|
2916
|
+
for (t ??= eo; i = a.pop();) if (r && (i.value = +i.data.value), (s = t(i.data)) && (l = s.length)) for (i.children = Array(l), c = l - 1; c >= 0; --c) a.push(o = i.children[c] = new ro(s[c])), o.parent = i, o.depth = i.depth + 1;
|
|
2917
|
+
return n.eachBefore(no);
|
|
2917
2918
|
}
|
|
2918
|
-
function
|
|
2919
|
-
return
|
|
2919
|
+
function $a() {
|
|
2920
|
+
return Qa(this).eachBefore(to);
|
|
2920
2921
|
}
|
|
2921
|
-
function
|
|
2922
|
+
function eo(e) {
|
|
2922
2923
|
return e.children;
|
|
2923
2924
|
}
|
|
2924
|
-
function
|
|
2925
|
+
function to(e) {
|
|
2925
2926
|
e.data = e.data.data;
|
|
2926
2927
|
}
|
|
2927
|
-
function
|
|
2928
|
+
function no(e) {
|
|
2928
2929
|
var t = 0;
|
|
2929
2930
|
do
|
|
2930
2931
|
e.height = t;
|
|
2931
2932
|
while ((e = e.parent) && e.height < ++t);
|
|
2932
2933
|
}
|
|
2933
|
-
function
|
|
2934
|
+
function ro(e) {
|
|
2934
2935
|
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
2935
2936
|
}
|
|
2936
|
-
|
|
2937
|
-
constructor:
|
|
2938
|
-
count:
|
|
2939
|
-
each:
|
|
2940
|
-
eachAfter:
|
|
2941
|
-
eachBefore:
|
|
2942
|
-
sum:
|
|
2943
|
-
sort:
|
|
2944
|
-
path:
|
|
2945
|
-
ancestors:
|
|
2946
|
-
descendants:
|
|
2947
|
-
leaves:
|
|
2948
|
-
links:
|
|
2949
|
-
copy:
|
|
2937
|
+
ro.prototype = Qa.prototype = {
|
|
2938
|
+
constructor: ro,
|
|
2939
|
+
count: Ba,
|
|
2940
|
+
each: Va,
|
|
2941
|
+
eachAfter: Ua,
|
|
2942
|
+
eachBefore: Ha,
|
|
2943
|
+
sum: Wa,
|
|
2944
|
+
sort: Ga,
|
|
2945
|
+
path: Ka,
|
|
2946
|
+
ancestors: Ja,
|
|
2947
|
+
descendants: Ya,
|
|
2948
|
+
leaves: Xa,
|
|
2949
|
+
links: Za,
|
|
2950
|
+
copy: $a
|
|
2950
2951
|
};
|
|
2951
|
-
var
|
|
2952
|
-
|
|
2953
|
-
var { version:
|
|
2952
|
+
var io = re();
|
|
2953
|
+
Ee();
|
|
2954
|
+
var { version: ao } = {
|
|
2954
2955
|
name: "d3-flextree",
|
|
2955
2956
|
version: "2.1.2",
|
|
2956
2957
|
main: "build/d3-flextree.js",
|
|
@@ -3011,13 +3012,13 @@ var { version: io } = {
|
|
|
3011
3012
|
"rollup-plugin-uglify": "^3.0.0",
|
|
3012
3013
|
"uglify-es": "^3.3.9"
|
|
3013
3014
|
}
|
|
3014
|
-
},
|
|
3015
|
+
}, oo = Object.freeze({
|
|
3015
3016
|
children: (e) => e.children,
|
|
3016
3017
|
nodeSize: (e) => e.data.size,
|
|
3017
3018
|
spacing: 0
|
|
3018
3019
|
});
|
|
3019
|
-
function
|
|
3020
|
-
let t = Object.assign({},
|
|
3020
|
+
function so(e) {
|
|
3021
|
+
let t = Object.assign({}, oo, e);
|
|
3021
3022
|
function n(e) {
|
|
3022
3023
|
let n = t[e];
|
|
3023
3024
|
return typeof n == "function" ? n : () => n;
|
|
@@ -3028,7 +3029,7 @@ function oo(e) {
|
|
|
3028
3029
|
}
|
|
3029
3030
|
function i() {
|
|
3030
3031
|
let e = n("nodeSize"), t = n("spacing");
|
|
3031
|
-
return class n extends
|
|
3032
|
+
return class n extends Qa.prototype.constructor {
|
|
3032
3033
|
constructor(e) {
|
|
3033
3034
|
super(e);
|
|
3034
3035
|
}
|
|
@@ -3141,7 +3142,7 @@ function oo(e) {
|
|
|
3141
3142
|
this.data.y = e;
|
|
3142
3143
|
}
|
|
3143
3144
|
update() {
|
|
3144
|
-
return
|
|
3145
|
+
return co(this), lo(this), this;
|
|
3145
3146
|
}
|
|
3146
3147
|
};
|
|
3147
3148
|
}
|
|
@@ -3185,52 +3186,52 @@ function oo(e) {
|
|
|
3185
3186
|
}
|
|
3186
3187
|
}), r;
|
|
3187
3188
|
}
|
|
3188
|
-
|
|
3189
|
-
var
|
|
3189
|
+
so.version = ao;
|
|
3190
|
+
var co = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
3190
3191
|
let [r, i] = t;
|
|
3191
|
-
|
|
3192
|
+
co(n, e.y + e.ySize);
|
|
3192
3193
|
let a = (r === 0 ? n.lExt : n.rExt).bottom;
|
|
3193
|
-
r !== 0 &&
|
|
3194
|
-
let o =
|
|
3194
|
+
r !== 0 && fo(e, r, i);
|
|
3195
|
+
let o = bo(a, r, i);
|
|
3195
3196
|
return [r + 1, o];
|
|
3196
|
-
}, [0, null]),
|
|
3197
|
+
}, [0, null]), uo(e), yo(e), e), lo = (e, t, n) => {
|
|
3197
3198
|
t === void 0 && (t = -e.relX - e.prelim, n = 0);
|
|
3198
3199
|
let r = t + e.relX;
|
|
3199
|
-
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) =>
|
|
3200
|
-
},
|
|
3200
|
+
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) => lo(t, r, e.x)), e;
|
|
3201
|
+
}, uo = (e) => {
|
|
3201
3202
|
(e.children || []).reduce((e, t) => {
|
|
3202
3203
|
let [n, r] = e, i = n + t.shift, a = r + i + t.change;
|
|
3203
3204
|
return t.relX += a, [i, a];
|
|
3204
3205
|
}, [0, 0]);
|
|
3205
|
-
},
|
|
3206
|
+
}, fo = (e, t, n) => {
|
|
3206
3207
|
let r = e.children[t - 1], i = e.children[t], a = r, o = r.relX, s = i, c = i.relX, l = !0;
|
|
3207
3208
|
for (; a && s;) {
|
|
3208
3209
|
a.bottom > n.lowY && (n = n.next);
|
|
3209
3210
|
let r = o + a.prelim - (c + s.prelim) + a.xSize / 2 + s.xSize / 2 + a.spacing(s);
|
|
3210
|
-
(r > 0 || r < 0 && l) && (c += r,
|
|
3211
|
+
(r > 0 || r < 0 && l) && (c += r, po(i, r), mo(e, t, n.index, r)), l = !1;
|
|
3211
3212
|
let u = a.bottom, d = s.bottom;
|
|
3212
|
-
u <= d && (a =
|
|
3213
|
+
u <= d && (a = go(a), a && (o += a.relX)), u >= d && (s = ho(s), s && (c += s.relX));
|
|
3213
3214
|
}
|
|
3214
|
-
!a && s ?
|
|
3215
|
-
},
|
|
3215
|
+
!a && s ? _o(e, t, s, c) : a && !s && vo(e, t, a, o);
|
|
3216
|
+
}, po = (e, t) => {
|
|
3216
3217
|
e.relX += t, e.lExtRelX += t, e.rExtRelX += t;
|
|
3217
|
-
},
|
|
3218
|
+
}, mo = (e, t, n, r) => {
|
|
3218
3219
|
let i = e.children[t], a = t - n;
|
|
3219
3220
|
if (a > 1) {
|
|
3220
3221
|
let t = r / a;
|
|
3221
3222
|
e.children[n + 1].shift += t, i.shift -= t, i.change -= r - t;
|
|
3222
3223
|
}
|
|
3223
|
-
},
|
|
3224
|
+
}, ho = (e) => e.hasChildren ? e.firstChild : e.lThr, go = (e) => e.hasChildren ? e.lastChild : e.rThr, _o = (e, t, n, r) => {
|
|
3224
3225
|
let i = e.firstChild, a = i.lExt, o = e.children[t];
|
|
3225
3226
|
a.lThr = n;
|
|
3226
3227
|
let s = r - n.relX - i.lExtRelX;
|
|
3227
3228
|
a.relX += s, a.prelim -= s, i.lExt = o.lExt, i.lExtRelX = o.lExtRelX;
|
|
3228
|
-
},
|
|
3229
|
+
}, vo = (e, t, n, r) => {
|
|
3229
3230
|
let i = e.children[t], a = i.rExt, o = e.children[t - 1];
|
|
3230
3231
|
a.rThr = n;
|
|
3231
3232
|
let s = r - n.relX - i.rExtRelX;
|
|
3232
3233
|
a.relX += s, a.prelim -= s, i.rExt = o.rExt, i.rExtRelX = o.rExtRelX;
|
|
3233
|
-
},
|
|
3234
|
+
}, yo = (e) => {
|
|
3234
3235
|
if (e.hasChildren) {
|
|
3235
3236
|
let t = e.firstChild, n = e.lastChild, r = (t.prelim + t.relX - t.xSize / 2 + n.relX + n.prelim + n.xSize / 2) / 2;
|
|
3236
3237
|
Object.assign(e, {
|
|
@@ -3241,7 +3242,7 @@ var so = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3241
3242
|
rExtRelX: n.rExtRelX
|
|
3242
3243
|
});
|
|
3243
3244
|
}
|
|
3244
|
-
},
|
|
3245
|
+
}, bo = (e, t, n) => {
|
|
3245
3246
|
for (; n !== null && e >= n.lowY;) n = n.next;
|
|
3246
3247
|
return {
|
|
3247
3248
|
lowY: e,
|
|
@@ -3249,21 +3250,21 @@ var so = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3249
3250
|
next: n
|
|
3250
3251
|
};
|
|
3251
3252
|
};
|
|
3252
|
-
|
|
3253
|
+
E();
|
|
3253
3254
|
var Q = {
|
|
3254
|
-
selection:
|
|
3255
|
-
select:
|
|
3256
|
-
max:
|
|
3257
|
-
min:
|
|
3258
|
-
sum:
|
|
3259
|
-
cumsum:
|
|
3260
|
-
tree:
|
|
3261
|
-
stratify:
|
|
3262
|
-
zoom:
|
|
3263
|
-
zoomIdentity:
|
|
3264
|
-
linkHorizontal:
|
|
3265
|
-
flextree:
|
|
3266
|
-
},
|
|
3255
|
+
selection: N,
|
|
3256
|
+
select: P,
|
|
3257
|
+
max: we,
|
|
3258
|
+
min: De,
|
|
3259
|
+
sum: Te,
|
|
3260
|
+
cumsum: Oe,
|
|
3261
|
+
tree: tt,
|
|
3262
|
+
stratify: Ue,
|
|
3263
|
+
zoom: Ea,
|
|
3264
|
+
zoomIdentity: _a,
|
|
3265
|
+
linkHorizontal: oe,
|
|
3266
|
+
flextree: so
|
|
3267
|
+
}, xo = class {
|
|
3267
3268
|
stateInternal = {
|
|
3268
3269
|
allNodes: [],
|
|
3269
3270
|
dragStartX: 0,
|
|
@@ -3278,7 +3279,7 @@ var Q = {
|
|
|
3278
3279
|
};
|
|
3279
3280
|
getConfig;
|
|
3280
3281
|
constructor() {
|
|
3281
|
-
let e =
|
|
3282
|
+
let e = Ma();
|
|
3282
3283
|
this.getConfig = () => e, Object.keys(e).forEach((t) => {
|
|
3283
3284
|
Object.assign(this, { [t]: function(...n) {
|
|
3284
3285
|
return n.length ? (e[t] = n[0], this) : e[t];
|
|
@@ -3346,7 +3347,7 @@ var Q = {
|
|
|
3346
3347
|
};
|
|
3347
3348
|
}
|
|
3348
3349
|
extendHierarchyNodePrototype() {
|
|
3349
|
-
|
|
3350
|
+
Ae.prototype.allDescendants || (Ae.prototype.allDescendants = function() {
|
|
3350
3351
|
let e = [];
|
|
3351
3352
|
this.each((t) => {
|
|
3352
3353
|
e.push(t);
|
|
@@ -3379,7 +3380,7 @@ var Q = {
|
|
|
3379
3380
|
chartWidth: r.width,
|
|
3380
3381
|
chartHeight: r.height
|
|
3381
3382
|
};
|
|
3382
|
-
n.calc = i, n.calc.centerX = i.chartWidth / 2, n.calc.centerY = i.chartHeight / 2, n.flexTreeLayout =
|
|
3383
|
+
n.calc = i, n.calc.centerX = i.chartWidth / 2, n.calc.centerY = i.chartHeight / 2, n.flexTreeLayout = so({ nodeSize: (e) => {
|
|
3383
3384
|
let n = t.nodeWidth(e), r = t.nodeHeight(e), i = t.siblingsMargin(e), a = t.childrenMargin(e);
|
|
3384
3385
|
return t.layoutBindings[t.layout].nodeFlexSize({
|
|
3385
3386
|
config: t,
|
|
@@ -3508,7 +3509,7 @@ var Q = {
|
|
|
3508
3509
|
}).remove();
|
|
3509
3510
|
let d = this, f = r.nodesWrapper.selectAll("g.node").data(o, ({ data: e }) => i.nodeId(e) ?? ""), p = f.enter().append("g").attr("data-brush", (e) => e.data.brush?.key ?? null).attr("class", "node").attr("transform", (n) => n == r.root ? `translate(${e},${t})` : `translate(${i.layoutBindings[i.layout].nodeJoinX(n.parent || n)},${i.layoutBindings[i.layout].nodeJoinY(n.parent || n)})`).classed("draggable droppable", !0).on("click.node", (e, t) => {
|
|
3510
3511
|
[...e.srcElement.classList].includes("node-button-foreign-object") || i.onNodeClick(t);
|
|
3511
|
-
}).call(
|
|
3512
|
+
}).call(Lr().filter(function(e, t) {
|
|
3512
3513
|
return r.dragEnabled === !0 && t.depth > 0;
|
|
3513
3514
|
}).on("start", function(e, t) {
|
|
3514
3515
|
d.onDragStart(this, e, t);
|
|
@@ -3653,12 +3654,12 @@ var Q = {
|
|
|
3653
3654
|
let r = this.getChartState();
|
|
3654
3655
|
r.dragNode = n;
|
|
3655
3656
|
let i = t.subject.width / 2;
|
|
3656
|
-
r.dragStartX = t.x - i, r.dragStartY = t.y, r.isDragStarting = !0,
|
|
3657
|
+
r.dragStartX = t.x - i, r.dragStartY = t.y, r.isDragStarting = !0, P(e).classed("dragging", !0);
|
|
3657
3658
|
}
|
|
3658
3659
|
onDrag(e, t) {
|
|
3659
3660
|
let n = this.getChartState(), r = this.getConfig();
|
|
3660
3661
|
if (!n.dragNode) return;
|
|
3661
|
-
let i =
|
|
3662
|
+
let i = P(e);
|
|
3662
3663
|
if (n.isDragStarting) {
|
|
3663
3664
|
n.isDragStarting = !1, r.container.classList.add("dragging-active"), i.raise();
|
|
3664
3665
|
let e = t.subject.descendants(), a = [...e || [], t.subject], o = e.filter((e) => e.data.id !== t.subject.id);
|
|
@@ -3689,7 +3690,7 @@ var Q = {
|
|
|
3689
3690
|
this.getConfig().container.classList.remove("dragging-active");
|
|
3690
3691
|
let n = this.getChartState();
|
|
3691
3692
|
if (n.dragNode) {
|
|
3692
|
-
if (
|
|
3693
|
+
if (P(e).classed("dragging", !1), !n.dropNode) {
|
|
3693
3694
|
this.render();
|
|
3694
3695
|
return;
|
|
3695
3696
|
}
|
|
@@ -3697,7 +3698,7 @@ var Q = {
|
|
|
3697
3698
|
this.render();
|
|
3698
3699
|
return;
|
|
3699
3700
|
}
|
|
3700
|
-
|
|
3701
|
+
P(e).remove(), n.dragNode.parent = n.dropNode, n.dragNode.parent && (n.dragNode.parent.children = n.dragNode.parent.children?.filter((e) => e.id !== n.dragNode?.id) || void 0), this.getConfig().onNodeParentChange?.(n.dragNode), n.dropNode = null, n.dragNode = null, this.render();
|
|
3701
3702
|
}
|
|
3702
3703
|
}
|
|
3703
3704
|
zoomed(e) {
|
|
@@ -3713,7 +3714,7 @@ var Q = {
|
|
|
3713
3714
|
} }) {
|
|
3714
3715
|
let { svg: o, zoomBehavior: s, lastTransform: c, containerRect: l } = this.getChartState();
|
|
3715
3716
|
if (!o || !s || !l) return;
|
|
3716
|
-
let { width: u, height: d } = l, { duration: f, scaleExtent: p, minFitScale: m } = this.getConfig(), { k: h, x: g, y: _ } =
|
|
3717
|
+
let { width: u, height: d } = l, { duration: f, scaleExtent: p, minFitScale: m } = this.getConfig(), { k: h, x: g, y: _ } = Fa({
|
|
3717
3718
|
bounds: {
|
|
3718
3719
|
x0: e,
|
|
3719
3720
|
x1: t,
|
|
@@ -3775,12 +3776,12 @@ var Q = {
|
|
|
3775
3776
|
let e = this.getChartState();
|
|
3776
3777
|
e.svg && (e.svg.selectAll("*").remove(), e.svg = null, e.chart = null);
|
|
3777
3778
|
}
|
|
3778
|
-
}, $ =
|
|
3779
|
+
}, $ = ge(), So = (e, t, n) => {
|
|
3779
3780
|
let r = String(n);
|
|
3780
3781
|
return Array.from(e.querySelectorAll(".node[data-brush][data-value]")).find((e) => e.getAttribute("data-brush") === t && e.getAttribute("data-value") === r);
|
|
3781
|
-
},
|
|
3782
|
-
let r =
|
|
3783
|
-
t.data.brush && r.daedalus.emitEvent(
|
|
3782
|
+
}, Co = (e, t, n) => {
|
|
3783
|
+
let r = h(), i = (0, k.useCallback)((t) => {
|
|
3784
|
+
t.data.brush && r.daedalus.emitEvent(se.Brush, {
|
|
3784
3785
|
data: {
|
|
3785
3786
|
action: $.BrushEventAction.Hover,
|
|
3786
3787
|
data: [{
|
|
@@ -3790,8 +3791,8 @@ var Q = {
|
|
|
3790
3791
|
},
|
|
3791
3792
|
emitter: e
|
|
3792
3793
|
});
|
|
3793
|
-
}, [r, e]), a = (0,
|
|
3794
|
-
t.data.brush && r.daedalus.emitEvent(
|
|
3794
|
+
}, [r, e]), a = (0, k.useCallback)((t) => {
|
|
3795
|
+
t.data.brush && r.daedalus.emitEvent(se.Brush, {
|
|
3795
3796
|
data: {
|
|
3796
3797
|
action: $.BrushEventAction.Blur,
|
|
3797
3798
|
data: [{
|
|
@@ -3801,20 +3802,20 @@ var Q = {
|
|
|
3801
3802
|
},
|
|
3802
3803
|
emitter: e
|
|
3803
3804
|
});
|
|
3804
|
-
}, [r, e]), o = (0,
|
|
3805
|
+
}, [r, e]), o = (0, k.useRef)(void 0);
|
|
3805
3806
|
return o.current = (r) => {
|
|
3806
3807
|
if (r.emitter !== e && !(!t || !n.interactive)) switch (r.data.action) {
|
|
3807
3808
|
case $.BrushEventAction.Hover:
|
|
3808
3809
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3809
3810
|
n.forEach((n) => {
|
|
3810
|
-
|
|
3811
|
+
So(t, e, n)?.classList.add("hovered");
|
|
3811
3812
|
});
|
|
3812
3813
|
});
|
|
3813
3814
|
break;
|
|
3814
3815
|
case $.BrushEventAction.Blur:
|
|
3815
3816
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3816
3817
|
n.forEach((n) => {
|
|
3817
|
-
|
|
3818
|
+
So(t, e, n)?.classList.remove("hovered");
|
|
3818
3819
|
});
|
|
3819
3820
|
});
|
|
3820
3821
|
break;
|
|
@@ -3822,17 +3823,17 @@ var Q = {
|
|
|
3822
3823
|
t.querySelectorAll(".node.hovered").forEach((e) => e.classList.remove("hovered"));
|
|
3823
3824
|
break;
|
|
3824
3825
|
}
|
|
3825
|
-
},
|
|
3826
|
-
action:
|
|
3826
|
+
}, C({
|
|
3827
|
+
action: se.Brush,
|
|
3827
3828
|
handler: ({ payload: e }) => e && o.current?.(e)
|
|
3828
3829
|
}, []), {
|
|
3829
3830
|
onTreeNodeHover: i,
|
|
3830
3831
|
onTreeNodeLeave: a
|
|
3831
3832
|
};
|
|
3832
|
-
},
|
|
3833
|
-
let { variables: t, variablesFetched: n, updateVariable: r } =
|
|
3833
|
+
}, wo = (e) => {
|
|
3834
|
+
let { variables: t, variablesFetched: n, updateVariable: r } = w();
|
|
3834
3835
|
return {
|
|
3835
|
-
variables: (0,
|
|
3836
|
+
variables: (0, k.useMemo)(() => {
|
|
3836
3837
|
let n = {};
|
|
3837
3838
|
return e.measures?.forEach((e) => {
|
|
3838
3839
|
!e.slots || !p(e) || Object.values(e.slots).filter((e) => e.enabled && e.source === "variable" && e.propertyValue?.type === "variable").forEach((r) => {
|
|
@@ -3855,61 +3856,69 @@ var Q = {
|
|
|
3855
3856
|
updateVariable: r,
|
|
3856
3857
|
variablesFetched: n
|
|
3857
3858
|
};
|
|
3858
|
-
},
|
|
3859
|
-
let n = e.dimensions.filter(p), r = n.map((e) => i(e.dataItem)), a = n.length, o = (0,
|
|
3859
|
+
}, To = (e, t) => {
|
|
3860
|
+
let n = e.dimensions.filter(p), r = n.map((e) => i(e.dataItem)), a = n.length, o = (0, k.useMemo)(() => y(n.map((e) => ({
|
|
3860
3861
|
dataItem: e.dataItem,
|
|
3861
3862
|
dateLevel: void 0,
|
|
3862
3863
|
datePart: void 0,
|
|
3863
|
-
operator:
|
|
3864
|
-
})), { ignoreApplied: !0 }), [r]), s = (0,
|
|
3864
|
+
operator: io.FilterOperator.InList
|
|
3865
|
+
})), { ignoreApplied: !0 }), [r]), s = (0, k.useCallback)((e) => {
|
|
3865
3866
|
if (!a || !o?.length || !e.data.brush) return;
|
|
3866
|
-
let { key: t, value: n } = e.data.brush, r = o.find((e) => e.fieldKey === t &&
|
|
3867
|
+
let { key: t, value: n } = e.data.brush, r = o.find((e) => e.fieldKey === t && de(e.operators));
|
|
3867
3868
|
if (!r) return;
|
|
3868
|
-
let i = (r.operators.pending ?? r.operators.applied ?? r.operators.initial) ===
|
|
3869
|
+
let i = (r.operators.pending ?? r.operators.applied ?? r.operators.initial) === io.FilterOperator.NotInList ? "off" : "on";
|
|
3869
3870
|
r.state.pending && r.state.pending.includes(n) && (i = i === "off" ? "on" : "off"), r.onClick(n, { [i]: !0 });
|
|
3870
3871
|
}, [o, r]);
|
|
3871
|
-
return (0,
|
|
3872
|
+
return (0, k.useEffect)(() => {
|
|
3872
3873
|
t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")), o.forEach(({ fieldKey: e, state: n }) => {
|
|
3873
3874
|
n.pending !== null && n.pending.forEach((n) => {
|
|
3874
|
-
e &&
|
|
3875
|
+
e && So(t, e, n)?.classList.add("selected");
|
|
3875
3876
|
});
|
|
3876
3877
|
}));
|
|
3877
3878
|
}, [t, JSON.stringify(o)]), { onTreeNodeClick: s };
|
|
3878
|
-
},
|
|
3879
|
+
}, Eo = (e, t) => {
|
|
3879
3880
|
e.next({
|
|
3880
|
-
action:
|
|
3881
|
+
action: T.SaveLocalVSpec,
|
|
3881
3882
|
payload: { vSpecChange: { treeChartSettings: { ...t } } },
|
|
3882
3883
|
mergeWith(e, t, n) {
|
|
3883
3884
|
if (n === "nodeExpandState") return t;
|
|
3884
3885
|
}
|
|
3885
3886
|
});
|
|
3886
|
-
},
|
|
3887
|
-
let a = (0,
|
|
3887
|
+
}, Do = 80, Oo = (e, t, n, r) => {
|
|
3888
|
+
let a = (0, k.useRef)(e.treeChartSettings?.nodeExpandState ?? {}), o = r.forceAutoFit, s = b(), c = wo(s), l = g(), u = te(), d = h(), f = e.dimensions.filter(p), m = f.length, [_] = (0, k.useState)(e.treeChartSettings?.transform ?? null), [v, y] = (0, k.useState)(_ ?? {
|
|
3888
3889
|
k: 1,
|
|
3889
3890
|
x: 0,
|
|
3890
3891
|
y: 0
|
|
3891
|
-
}),
|
|
3892
|
-
|
|
3892
|
+
}), x = (0, k.useRef)(e.treeChartSettings?.transform), { onTreeNodeHover: S, onTreeNodeLeave: C } = Co(n, t.current, r), { onTreeNodeClick: ee } = To(e, t.current), w = (0, k.useRef)(new xo()), T = (0, k.useRef)(null), re = !e.treeChartSettings.gridLayout?.enabled && e.treeChartSettings?.nodeLayout?.hoverStyle?.enabled, E = (0, k.useCallback)(() => {
|
|
3893
|
+
T.current &&= (clearTimeout(T.current), null);
|
|
3893
3894
|
}, []);
|
|
3894
|
-
return
|
|
3895
|
-
r.interactive &&
|
|
3895
|
+
return w.current.onNodeHover((e) => {
|
|
3896
|
+
r.interactive && S(e), re && (E(), w.current.highlight(e));
|
|
3896
3897
|
}).onNodeLeave((e) => {
|
|
3897
|
-
r.interactive &&
|
|
3898
|
-
|
|
3899
|
-
},
|
|
3898
|
+
r.interactive && C(e), re && (E(), T.current = setTimeout(() => {
|
|
3899
|
+
w.current.highlight(null), T.current = null;
|
|
3900
|
+
}, Do));
|
|
3900
3901
|
}).onNodeClick((e) => {
|
|
3901
|
-
r.interactive
|
|
3902
|
+
if (!r.interactive) return;
|
|
3903
|
+
let t = m > 0 ? e.data.id === "__total__" ? "total" : "dimension" : "measure", n = e.data.value?.value, i = t === "dimension" ? e.data.brush?.value : n;
|
|
3904
|
+
ke({
|
|
3905
|
+
id: "onNodeClick",
|
|
3906
|
+
nodeName: e.data.label,
|
|
3907
|
+
nodeType: t,
|
|
3908
|
+
...i == null ? {} : { nodeValue: i },
|
|
3909
|
+
...n == null ? {} : { measureValue: n }
|
|
3910
|
+
}, { vBackendAPI: d }), ee(e);
|
|
3902
3911
|
}).onNodeParentChange((t) => {
|
|
3903
|
-
if (
|
|
3912
|
+
if (m > 0) return;
|
|
3904
3913
|
let n = e.measures.find((e) => e.dataItem.uniqueSignature === t.data.id);
|
|
3905
|
-
n &&
|
|
3914
|
+
n && ne(u, e.measures, i(n.dataItem), !t.parent || t.parent.data.id === "__root__" ? void 0 : t.parent.data.id);
|
|
3906
3915
|
}).onExpandOrCollapse((t) => {
|
|
3907
|
-
let n = st(t, e.treeChartSettings?.initialExpandedLevels,
|
|
3908
|
-
r === n ? delete a.current[t.data.id] : a.current[t.data.id] = r,
|
|
3909
|
-
e.id && c.updateVariable(e.id, r,
|
|
3916
|
+
let n = st(t, e.treeChartSettings?.initialExpandedLevels, f.length, e.totals?.enabled ?? !1), r = !((t._children?.length ?? 0) > 0 && !t.children?.length);
|
|
3917
|
+
r === n ? delete a.current[t.data.id] : a.current[t.data.id] = r, Eo(l, { nodeExpandState: a.current }), !(m > 0) && Object.values(c.variables).filter((e) => e.measureId.includes(t.data.id)).forEach((e) => {
|
|
3918
|
+
e.id && c.updateVariable(e.id, r, io.VariableType.boolean);
|
|
3910
3919
|
});
|
|
3911
3920
|
}).onUserZoom(() => {
|
|
3912
|
-
|
|
3921
|
+
x.current = null;
|
|
3913
3922
|
}).onZoomEnd((e) => {
|
|
3914
3923
|
if (o) return;
|
|
3915
3924
|
let t = {
|
|
@@ -3917,55 +3926,55 @@ var Q = {
|
|
|
3917
3926
|
x: e.transform.x,
|
|
3918
3927
|
y: e.transform.y
|
|
3919
3928
|
};
|
|
3920
|
-
t.k ===
|
|
3929
|
+
t.k === v.k && t.x === v.x && t.y === v.y || (y(t), Eo(l, {
|
|
3921
3930
|
nodeExpandState: a.current,
|
|
3922
3931
|
transform: t
|
|
3923
3932
|
}));
|
|
3924
|
-
}), (0,
|
|
3933
|
+
}), (0, k.useEffect)(() => () => E(), [E]), (0, k.useEffect)(() => {
|
|
3925
3934
|
e.treeChartSettings?.nodeExpandState && (a.current = e.treeChartSettings.nodeExpandState ?? {});
|
|
3926
|
-
}, [e.treeChartSettings?.nodeExpandState]), (0,
|
|
3935
|
+
}, [e.treeChartSettings?.nodeExpandState]), (0, k.useEffect)(() => {
|
|
3927
3936
|
s.treeChartSettings?.nodeExpandState || (a.current = {});
|
|
3928
|
-
}, [s.treeChartSettings?.initialExpandedLevels]), (0,
|
|
3929
|
-
|
|
3937
|
+
}, [s.treeChartSettings?.initialExpandedLevels]), (0, k.useEffect)(() => {
|
|
3938
|
+
x.current = e.treeChartSettings?.transform, w.current && w.current.unsetUserTransform(), !(!e.treeChartSettings?.transform || !w.current) && w.current.applyTransform(e.treeChartSettings.transform);
|
|
3930
3939
|
}, [e.treeChartSettings?.transform]), {
|
|
3931
|
-
chart:
|
|
3940
|
+
chart: w.current,
|
|
3932
3941
|
expandedState: a
|
|
3933
3942
|
};
|
|
3934
|
-
},
|
|
3943
|
+
}, ko = ({ vSpec: e, vTheme: t, data: n, elementSize: r = {
|
|
3935
3944
|
width: 0,
|
|
3936
3945
|
height: 0
|
|
3937
3946
|
}, vizProperties: i }) => {
|
|
3938
|
-
let a = i?.isEditMode ?? !1, o = i?.isPrintMode ?? !1,
|
|
3947
|
+
let a = i?.isEditMode ?? !1, o = i?.isPrintMode ?? !1, s = e?.treeChartSettings?.gridLayout?.enabled, l = e.dimensions.filter(p).length, u = e.measures.filter(p), d = (0, k.useRef)("tree-" + c(10)), f = (0, k.useRef)(null), m = e.treeChartSettings?.forceAutoFit === !0, { layout: h, treeSettings: g } = Ra(e, i), { chart: _, expandedState: y } = Oo(e, f, d.current, g), b = Ia(e, f, _), x = ft({
|
|
3939
3948
|
vSpec: e,
|
|
3940
3949
|
data: n,
|
|
3941
|
-
nodeExpandState:
|
|
3942
|
-
}), [
|
|
3943
|
-
(0,
|
|
3944
|
-
_
|
|
3945
|
-
}), [
|
|
3946
|
-
|
|
3947
|
-
}, [
|
|
3948
|
-
!f.current || !_ || !r.width || !r.height ||
|
|
3950
|
+
nodeExpandState: y
|
|
3951
|
+
}), [S, C] = (0, k.useState)(!1);
|
|
3952
|
+
(0, k.useLayoutEffect)(() => (f.current && _.container(f.current).init(), () => {
|
|
3953
|
+
_.destroy();
|
|
3954
|
+
}), [_]), (0, k.useEffect)(() => {
|
|
3955
|
+
S ? _.enableDrag() : _.disableDrag();
|
|
3956
|
+
}, [S]), (0, k.useEffect)(() => {
|
|
3957
|
+
!f.current || !_ || !r.width || !r.height || b(x, g);
|
|
3949
3958
|
}, [
|
|
3950
3959
|
r.width,
|
|
3951
3960
|
r.height,
|
|
3952
|
-
|
|
3961
|
+
b
|
|
3953
3962
|
]);
|
|
3954
|
-
let
|
|
3955
|
-
(0,
|
|
3956
|
-
f.current &&
|
|
3963
|
+
let ee = a && l === 0 && !s;
|
|
3964
|
+
(0, k.useEffect)(() => {
|
|
3965
|
+
f.current && b(x, g);
|
|
3957
3966
|
}, [
|
|
3958
|
-
|
|
3967
|
+
x,
|
|
3959
3968
|
JSON.stringify(g),
|
|
3960
|
-
|
|
3969
|
+
b
|
|
3961
3970
|
]);
|
|
3962
|
-
let
|
|
3971
|
+
let w = Le({
|
|
3963
3972
|
vTheme: t,
|
|
3964
3973
|
vSpec: e,
|
|
3965
3974
|
id: d.current,
|
|
3966
3975
|
layout: h
|
|
3967
3976
|
});
|
|
3968
|
-
return /* @__PURE__ */ (0,
|
|
3977
|
+
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
3969
3978
|
style: {
|
|
3970
3979
|
width: "100%",
|
|
3971
3980
|
height: "100%"
|
|
@@ -3973,7 +3982,7 @@ var Q = {
|
|
|
3973
3982
|
id: d.current,
|
|
3974
3983
|
"data-mode": a ? "edit" : "view",
|
|
3975
3984
|
children: [
|
|
3976
|
-
!o && /* @__PURE__ */ (0,
|
|
3985
|
+
!o && /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
3977
3986
|
className: "tree-toolbar",
|
|
3978
3987
|
style: {
|
|
3979
3988
|
position: "absolute",
|
|
@@ -3983,22 +3992,22 @@ var Q = {
|
|
|
3983
3992
|
top: 0,
|
|
3984
3993
|
gap: 10
|
|
3985
3994
|
},
|
|
3986
|
-
children: [
|
|
3995
|
+
children: [ee && /* @__PURE__ */ (0, O.jsx)(xe, {
|
|
3987
3996
|
size: "small",
|
|
3988
3997
|
value: "organize",
|
|
3989
|
-
selected:
|
|
3990
|
-
onChange: () =>
|
|
3998
|
+
selected: S,
|
|
3999
|
+
onChange: () => C(!S),
|
|
3991
4000
|
disabled: u.length < 2,
|
|
3992
|
-
children: /* @__PURE__ */ (0,
|
|
3993
|
-
}), !m && /* @__PURE__ */ (0,
|
|
4001
|
+
children: /* @__PURE__ */ (0, O.jsx)(Ie, {})
|
|
4002
|
+
}), !m && /* @__PURE__ */ (0, O.jsx)(xe, {
|
|
3994
4003
|
value: "",
|
|
3995
4004
|
size: "small",
|
|
3996
4005
|
onClick: () => _?.fit(),
|
|
3997
|
-
children: /* @__PURE__ */ (0,
|
|
4006
|
+
children: /* @__PURE__ */ (0, O.jsx)(v, {})
|
|
3998
4007
|
})]
|
|
3999
4008
|
}),
|
|
4000
|
-
/* @__PURE__ */ (0,
|
|
4001
|
-
/* @__PURE__ */ (0,
|
|
4009
|
+
/* @__PURE__ */ (0, O.jsx)("style", { children: w }),
|
|
4010
|
+
/* @__PURE__ */ (0, O.jsx)("div", {
|
|
4002
4011
|
style: {
|
|
4003
4012
|
width: "100%",
|
|
4004
4013
|
height: "100%"
|
|
@@ -4007,12 +4016,12 @@ var Q = {
|
|
|
4007
4016
|
})
|
|
4008
4017
|
]
|
|
4009
4018
|
});
|
|
4010
|
-
},
|
|
4019
|
+
}, Ao = _((e) => {
|
|
4011
4020
|
let { vSpec: t, data: n } = e;
|
|
4012
|
-
return !t || !n || !f(t) ? null : /* @__PURE__ */ (0,
|
|
4021
|
+
return !t || !n || !f(t) ? null : /* @__PURE__ */ (0, O.jsx)(ko, {
|
|
4013
4022
|
...e,
|
|
4014
4023
|
vSpec: t,
|
|
4015
4024
|
data: n
|
|
4016
4025
|
});
|
|
4017
4026
|
});
|
|
4018
|
-
export {
|
|
4027
|
+
export { Ao as Tree };
|