@astrato-io/visualizations 0.6.4 → 0.7.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/CHANGELOG.md +0 -0
- package/README.md +32 -2
- package/THIRD_PARTY_NOTICES.md +68 -205
- package/VISUALIZATION_DEFINITIONS.md +68 -114
- package/chunks/Button-BrGKp9Nm.js +110 -0
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
- package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
- package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-VtfFx2vJ.js} +51 -51
- package/chunks/MenuOption-ByRqhRdX.js +3934 -0
- package/chunks/Title-CO5dP1ma.js +1691 -0
- package/chunks/ToggleButton-KOBAimC1.js +112 -0
- package/chunks/app-filter-bar.compiler-TwVTeoj5.js +64 -0
- package/chunks/bar.compiler-DuQg8EUb.js +374 -0
- package/chunks/builder-DEDvNq1k.js +201 -0
- package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
- package/chunks/color-settings-3VRlf_Vw.js +6 -0
- package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
- package/chunks/coloring-CncX_JRX.js +278 -0
- package/chunks/{src-BC7cGcJ-.js → definitions-BPJQTx16.js} +650 -464
- package/chunks/{escobar-BGqT1EsE.js → escobar-DRhRMYRE.js} +6282 -4931
- package/chunks/event-bus-CrLB-Y8z.js +3 -0
- package/chunks/extend-preset-CUFNpmPe.js +4398 -0
- package/chunks/filter.compiler-w27dlv0C.js +70 -0
- package/chunks/filtering-cc7WqWpg.js +1153 -0
- package/chunks/handlers-TOT-7INo.js +12871 -0
- package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
- package/chunks/isEqual-B8loyPsC.js +12 -0
- package/chunks/label-format-type-weq1XfcX.js +8 -0
- package/chunks/line.compiler-Ct1WhN2p.js +198 -0
- package/chunks/logger-DpQtYQnX.js +1163 -0
- package/chunks/lookup-BWllin0q.js +36 -0
- package/chunks/{metadata-CPXdYoln.js → metadata-WABZrt7Y.js} +1 -1
- package/chunks/number.compiler-D8TPly-4.js +53 -0
- package/chunks/{src-C0LgoUWY.js → operations-Dh4v1Ovt.js} +7716 -7541
- package/chunks/{range-DrzdfBX4.js → range-Bi-7zT0k.js} +2 -2
- package/chunks/registry-KervaxqJ.js +31 -0
- package/chunks/render-wrappers-OEmtaM8g.js +2 -0
- package/chunks/{registry-CExpGJ1N.js → requirements-PAoRaJyb.js} +294 -326
- package/chunks/responsive.styles-DSiOGD7u.js +82 -0
- package/chunks/shared-Bn4N5QcZ.js +1218 -0
- package/chunks/src-77e3mC7i.js +391 -0
- package/chunks/standalone-B55oyW6c.js +689 -0
- package/chunks/{standalone-CY57qwZ-.js → standalone-BDhPQtzQ.js} +386 -352
- package/chunks/{standalone-BDCwI6Hn.js → standalone-BGkmozIb.js} +1108 -953
- package/chunks/standalone-BMTCb10X.js +179 -0
- package/chunks/standalone-BXKRE_Se.js +468 -0
- package/chunks/standalone-Bes8srx1.js +354 -0
- package/chunks/standalone-BjZp0QMe.js +2 -0
- package/chunks/{standalone-BH5NqDwp.js → standalone-BlMIwpEe.js} +687 -573
- package/chunks/{standalone-CCNtaJ7s.js → standalone-C8ZAEutO.js} +44 -43
- package/chunks/standalone-C8qAelL4.js +2 -0
- package/chunks/standalone-CJvIXsQE.js +743 -0
- package/chunks/standalone-CLmGb7nn2.js +355 -0
- package/chunks/{ui-D1HQNIBy.js → standalone-CM5XcAN5.js} +15946 -17658
- package/chunks/standalone-CXNP6-xD.js +420 -0
- package/chunks/{standalone-BYm1UjLr.js → standalone-D5Q5ngsD.js} +59 -57
- package/chunks/standalone-DLlyRIE6.js +287 -0
- package/chunks/standalone-DMcI1afI.js +396 -0
- package/chunks/{standalone-jiz0L2Dg.js → standalone-DN4S1MjT.js} +1113 -1094
- package/chunks/{standalone-QJ1kKMnO.js → standalone-DT0wKji7.js} +2 -2
- package/chunks/{standalone-D5vnf-9y.js → standalone-DVTJwsTY.js} +1110 -1035
- package/chunks/standalone-DW6NT205.js +518 -0
- package/chunks/standalone-DYQIQH4c.js +2095 -0
- package/chunks/standalone-D__XCp-h.js +1003 -0
- package/chunks/standalone-XTgSsTAa.js +354 -0
- package/chunks/standalone-XuGksArp.js +68 -0
- package/chunks/{standalone-CNyNHKVx.js → standalone-we5D5MIn.js} +176 -172
- package/chunks/table.compiler-DMeeHxb6.js +222 -0
- package/chunks/useFieldName-Cjn9KCVp.js +7 -0
- package/chunks/useSlotProps-DLbQp4lc.js +166 -0
- package/chunks/{utils-Ba9T0TqC.js → utils-vdmi_2PK.js} +6266 -6517
- package/chunks/{src-DvX5LU9T.js → view-BuwQugKb.js} +2893 -5956
- package/chunks/visualization-filters-Cc4KU-l-.js +7455 -0
- package/chunks/web-components-DqClFkgO.js +1185 -0
- package/chunks/with-html-element-D0uY2zjI.js +7328 -0
- package/definitions.js +3 -3
- package/docs/operations/astrato-app-filter-bar.md +17 -17
- package/docs/operations/bar.md +1006 -1071
- package/docs/operations/combo.md +717 -738
- package/docs/operations/date-picker.md +27 -27
- package/docs/operations/distribution-gauge.md +471 -607
- package/docs/operations/dot.md +787 -879
- package/docs/operations/filter.md +139 -163
- package/docs/operations/gauge.md +491 -627
- package/docs/operations/heatMap.md +834 -916
- package/docs/operations/histogram.md +166 -180
- package/docs/operations/iframe.md +5 -5
- package/docs/operations/image.md +16 -16
- package/docs/operations/index.md +12 -12
- package/docs/operations/line.md +811 -888
- package/docs/operations/number.md +470 -536
- package/docs/operations/pie.md +825 -958
- package/docs/operations/radar.md +599 -679
- package/docs/operations/sankey.md +462 -584
- package/docs/operations/scatter.md +823 -929
- package/docs/operations/shape.md +34 -34
- package/docs/operations/simpleTextObject.md +18 -25
- package/docs/operations/slider.md +33 -43
- package/docs/operations/table.md +1177 -1150
- package/docs/operations/tree.md +404 -397
- package/docs/operations/treemap.md +595 -673
- package/docs/operations/waterfall.md +369 -379
- package/docs/operations/word-cloud.md +512 -583
- package/getters.js +7 -7
- package/index.js +3 -1183
- package/metadata.js +18 -18
- package/operations.js +13 -13
- package/package.json +133 -88
- package/render.js +10 -0
- package/src/charts/bar.d.ts +1 -0
- package/src/charts/combo.d.ts +1 -0
- package/src/charts/dot.d.ts +1 -0
- package/src/charts/gauge-distribution.d.ts +1 -0
- package/src/charts/gauge.d.ts +1 -0
- package/src/charts/heat-map.d.ts +1 -0
- package/src/charts/histogram.d.ts +1 -0
- package/src/charts/line.d.ts +1 -0
- package/src/charts/pie.d.ts +1 -0
- package/src/charts/radar.d.ts +1 -0
- package/src/charts/sankey.d.ts +1 -0
- package/src/charts/scatter.d.ts +1 -0
- package/src/charts/table.d.ts +1 -0
- package/src/charts/tree.d.ts +1 -0
- package/src/charts/treemap.d.ts +1 -0
- package/src/charts/waterfall.d.ts +1 -0
- package/src/charts/word-cloud.d.ts +1 -0
- package/src/definitions/index.d.ts +2 -2
- package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
- package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
- package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1364 -0
- package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
- package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
- package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
- package/src/definitions/model/definitions/index.d.ts +23 -0
- package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
- package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
- package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
- package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
- package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +8 -8
- package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +10 -0
- package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
- package/src/definitions/model/definitions/types/index.d.ts +3 -0
- package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
- package/src/getters/index.d.ts +3 -3
- package/src/index.d.ts +1 -1
- package/src/objects/app-filter-bar.d.ts +1 -0
- package/src/objects/date-picker.d.ts +1 -0
- package/src/objects/filter.d.ts +1 -0
- package/src/objects/iframe.d.ts +1 -0
- package/src/objects/image.d.ts +1 -0
- package/src/objects/number.d.ts +1 -0
- package/src/objects/shape.d.ts +1 -0
- package/src/objects/slider.d.ts +1 -0
- package/src/objects/text.d.ts +1 -0
- package/src/operations/index.d.ts +3 -3
- package/src/registry/create-visualization-registry.d.ts +5 -0
- package/src/render/index.d.ts +34 -0
- package/src/runtime/index.d.ts +2 -2
- package/src/types.d.ts +9 -4
- package/src/web-components/index.d.ts +3 -3
- package/chunks/Radio-Ciu-F4CU.js +0 -957
- package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
- package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
- package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
- package/chunks/bar.compiler-oqaPzIut.js +0 -370
- package/chunks/coloring-C16AUZEi.js +0 -663
- package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
- package/chunks/event-bus-KiSiCJrC.js +0 -2683
- package/chunks/events-WZut5Ow6.js +0 -4
- package/chunks/filter.compiler-CuLtc_02.js +0 -60
- package/chunks/filtering-Yq4DEa0t.js +0 -953
- package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
- package/chunks/grouping-type-BX_9Ix5q.js +0 -3
- package/chunks/interfaces-VUY4_yVO.js +0 -8742
- package/chunks/line-settings-DfYTUyPz.js +0 -4
- package/chunks/line.compiler-BpA_6Tc7.js +0 -188
- package/chunks/number.compiler-DbkWcG4S.js +0 -44
- package/chunks/pie-uv42Eqal.js +0 -10
- package/chunks/requirements-DNhuShLS.js +0 -6
- package/chunks/shared-CKDL4hx9.js +0 -1171
- package/chunks/src-Cum_2NLV.js +0 -12145
- package/chunks/src-Dun_jXtz.js +0 -10295
- package/chunks/standalone-87YV_m9n.js +0 -687
- package/chunks/standalone-BLVAWLNJ.js +0 -385
- package/chunks/standalone-BPomtAVs.js +0 -2
- package/chunks/standalone-BXyBcUOQ.js +0 -2
- package/chunks/standalone-BllF4rDp.js +0 -383
- package/chunks/standalone-BmfMt74U.js +0 -726
- package/chunks/standalone-BqWyrnZI.js +0 -281
- package/chunks/standalone-C85u7U6I.js +0 -340
- package/chunks/standalone-CDQnr6qT.js +0 -345
- package/chunks/standalone-CZynjFG7.js +0 -12979
- package/chunks/standalone-DFPva_ku.js +0 -299
- package/chunks/standalone-DQxxNwF8.js +0 -675
- package/chunks/standalone-DS9T0FZ-.js +0 -830
- package/chunks/standalone-Dx3MLlrO.js +0 -512
- package/chunks/standalone-DzixzZAL.js +0 -411
- package/chunks/standalone-lBm9hQ-q.js +0 -179
- package/chunks/standalone-rJ45Zfl1.js +0 -68
- package/chunks/table.compiler-BrXkm4Fz.js +0 -213
- package/chunks/toInteger-DVZr-D1j.js +0 -11
- package/chunks/treemap-x_zmJoG7.js +0 -23
- package/chunks/types-dVVCsDWD.js +0 -4
- package/chunks/useFieldName-oqQ3bvnO.js +0 -7
- package/chunks/view-CLqWMV7Z.js +0 -156
- package/src/definitions/shared/index.d.ts +0 -5
- package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
- package/src/definitions/shared/lib/registry/index.d.ts +0 -3
- package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
- package/src/definitions/shared/lib/types/index.d.ts +0 -3
- package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
- /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Oi as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { r as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
import { Hi as t, Kr as n, Ui as r, Us as i, Wi as a, Wo as o, Yo as s, Yr as c, fn as l, qr as u, ta as d, xs as f, zr as p } from "./visualization-filters-Cc4KU-l-.js";
|
|
3
|
+
import { Ei as m, M as h, Rn as g, Xt as _, a as v, bn as y, j as b, mn as x, ri as S, s as C, u as ee, xr as te, z as ne } from "./utils-vdmi_2PK.js";
|
|
4
|
+
import { Oi as re } from "./handlers-TOT-7INo.js";
|
|
5
|
+
import { n as w } from "./isEqual-B8loyPsC.js";
|
|
6
|
+
import { s as ie } from "./logger-DpQtYQnX.js";
|
|
7
|
+
import { A as ae, C as oe, D as se, M as ce, N as le, S as ue, T as de, Xt as fe, a as pe, b as me, g as he, h as ge, in as T, k as _e, m as ve, qt as ye, v as be } from "./escobar-DRhRMYRE.js";
|
|
8
|
+
import { M as xe, _ as Se } from "./MenuOption-ByRqhRdX.js";
|
|
9
|
+
import { t as Ce } from "./ToggleButton-KOBAimC1.js";
|
|
10
|
+
import "./coloring-CncX_JRX.js";
|
|
11
|
+
import { s as we, t as Te } from "./src-77e3mC7i.js";
|
|
12
|
+
import { f as Ee, r as De, t as Oe, u as ke, y as Ae } from "./src-D9XogOrc.js";
|
|
13
|
+
import { a as je, i as Me, r as Ne, t as Pe } from "./accessors-DemrDevR.js";
|
|
14
|
+
import { r as Fe, t as Ie } from "./src-BOS6SqkZ.js";
|
|
15
|
+
var E = S(), Le = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, E.jsx)("svg", {
|
|
16
|
+
width: "16",
|
|
17
|
+
height: "16",
|
|
18
|
+
viewBox: "0 0 24 24",
|
|
19
|
+
fill: "none",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
children: /* @__PURE__ */ (0, E.jsx)("path", {
|
|
22
|
+
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
|
+
fill: e
|
|
24
|
+
})
|
|
25
|
+
}), D = /* @__PURE__ */ e(m()), Re = ({ vTheme: e, vSpec: r, id: i, layout: a }) => {
|
|
26
|
+
let o = e?.fonts?.general.fontFamily ?? "Roboto", s = {
|
|
27
|
+
...n,
|
|
28
|
+
...r.treeChartSettings?.nodeLayout?.border
|
|
29
|
+
};
|
|
30
|
+
s.enabled === !1 && (s.borderWidth = 0);
|
|
31
|
+
let l = {
|
|
32
|
+
...u,
|
|
33
|
+
...r.treeChartSettings?.nodeLayout.hoverStyle
|
|
34
|
+
}, d = r.treeChartSettings?.nodeLayout?.backgroundColor ?? c.backgroundColor, f = new Se(d).isLight() ? t.grey1 : t.grey5;
|
|
23
35
|
return `
|
|
24
|
-
#${
|
|
36
|
+
#${i} {
|
|
25
37
|
&[data-mode="view"] .tree-toolbar {
|
|
26
38
|
display: none;
|
|
27
39
|
}
|
|
@@ -29,19 +41,19 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
29
41
|
display: flex;
|
|
30
42
|
}
|
|
31
43
|
|
|
32
|
-
--link-color: ${
|
|
44
|
+
--link-color: ${t.grey3};
|
|
33
45
|
|
|
34
|
-
--border-color: ${
|
|
35
|
-
--border-width: ${
|
|
36
|
-
--border-color-edit: ${
|
|
37
|
-
--border-radius: ${
|
|
38
|
-
--border-color-selected: ${
|
|
46
|
+
--border-color: ${s.borderColor};
|
|
47
|
+
--border-width: ${s.borderWidth}px;
|
|
48
|
+
--border-color-edit: ${t.secondaryPurple};
|
|
49
|
+
--border-radius: ${s.borderRadius}px;
|
|
50
|
+
--border-color-selected: ${t.grey2};
|
|
39
51
|
|
|
40
|
-
--border-hover-width: ${
|
|
41
|
-
--border-hover-color: ${
|
|
52
|
+
--border-hover-width: ${l.borderWidth}px;
|
|
53
|
+
--border-hover-color: ${l.borderColor || s.borderColor};
|
|
42
54
|
|
|
43
55
|
--node-background: ${d};
|
|
44
|
-
--node-background-highlight: ${
|
|
56
|
+
--node-background-highlight: ${t.grey2};
|
|
45
57
|
--font-color: ${f};
|
|
46
58
|
|
|
47
59
|
.links-wrapper path {
|
|
@@ -68,14 +80,14 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
68
80
|
|
|
69
81
|
.button-content {
|
|
70
82
|
border:1px solid var(--border-color);
|
|
71
|
-
border-radius: ${Math.ceil(
|
|
83
|
+
border-radius: ${Math.ceil(s.borderRadius / 2)}px;
|
|
72
84
|
padding:1px 3px;
|
|
73
85
|
font-size:9px;
|
|
74
86
|
margin:auto auto;
|
|
75
87
|
background-color: var(--node-background);
|
|
76
88
|
}
|
|
77
89
|
&:hover .button-content {
|
|
78
|
-
background-color: ${
|
|
90
|
+
background-color: ${t.grey5};
|
|
79
91
|
}
|
|
80
92
|
}
|
|
81
93
|
|
|
@@ -93,7 +105,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
93
105
|
.node-content {
|
|
94
106
|
color: var(--font-color);
|
|
95
107
|
font-size: 12px;
|
|
96
|
-
font-family: ${
|
|
108
|
+
font-family: ${o}, sans-serif;
|
|
97
109
|
width: 100%;
|
|
98
110
|
height: 100%;
|
|
99
111
|
border: var(--border-width) solid var(--border-color);
|
|
@@ -131,7 +143,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
131
143
|
}
|
|
132
144
|
|
|
133
145
|
.dragging-active .drop-target .node-content::after {
|
|
134
|
-
background-color: ${
|
|
146
|
+
background-color: ${t.feedbackBlue};
|
|
135
147
|
opacity: 1;
|
|
136
148
|
}
|
|
137
149
|
|
|
@@ -150,7 +162,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
150
162
|
width: 100%;
|
|
151
163
|
height: 100%;
|
|
152
164
|
border-radius: var(--border-radius);
|
|
153
|
-
background-color: ${
|
|
165
|
+
background-color: ${t.grey2};
|
|
154
166
|
opacity: 0.2;
|
|
155
167
|
}
|
|
156
168
|
.node-excluded .node-foreign-object-div {
|
|
@@ -158,27 +170,27 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
|
|
|
158
170
|
}
|
|
159
171
|
}
|
|
160
172
|
|
|
161
|
-
${
|
|
162
|
-
},
|
|
163
|
-
function
|
|
173
|
+
${a.getCSS(i, r)}`;
|
|
174
|
+
}, ze = { depth: -1 }, Be = {}, Ve = {};
|
|
175
|
+
function He(e) {
|
|
164
176
|
return e.id;
|
|
165
177
|
}
|
|
166
|
-
function
|
|
178
|
+
function Ue(e) {
|
|
167
179
|
return e.parentId;
|
|
168
180
|
}
|
|
169
|
-
function
|
|
170
|
-
var e =
|
|
181
|
+
function We() {
|
|
182
|
+
var e = He, t = Ue, n;
|
|
171
183
|
function r(r) {
|
|
172
184
|
var i = Array.from(r), a = e, o = t, s, c, l, u, d, f, p, m, h = /* @__PURE__ */ new Map();
|
|
173
185
|
if (n != null) {
|
|
174
|
-
let e = i.map((e, t) =>
|
|
175
|
-
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(
|
|
186
|
+
let e = i.map((e, t) => Ge(n(e, t, r))), t = e.map(Ke), s = new Set(e).add("");
|
|
187
|
+
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(Ke(n)), i.push(Ve));
|
|
176
188
|
a = (t, n) => e[n], o = (e, n) => t[n];
|
|
177
189
|
}
|
|
178
|
-
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new
|
|
190
|
+
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new Ne(c), (p = a(c, l, r)) != null && (p += "") && (m = f.id = p, h.set(m, h.has(m) ? Be : f)), (p = o(c, l, r)) != null && (p += "") && (f.parent = p);
|
|
179
191
|
for (l = 0; l < s; ++l) if (f = i[l], p = f.parent) {
|
|
180
192
|
if (d = h.get(p), !d) throw Error("missing: " + p);
|
|
181
|
-
if (d ===
|
|
193
|
+
if (d === Be) throw Error("ambiguous: " + p);
|
|
182
194
|
d.children ? d.children.push(f) : d.children = [f], f.parent = d;
|
|
183
195
|
} else {
|
|
184
196
|
if (u) throw Error("multiple roots");
|
|
@@ -186,34 +198,34 @@ function Be() {
|
|
|
186
198
|
}
|
|
187
199
|
if (!u) throw Error("no root");
|
|
188
200
|
if (n != null) {
|
|
189
|
-
for (; u.data ===
|
|
190
|
-
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data ===
|
|
201
|
+
for (; u.data === Ve && u.children.length === 1;) u = u.children[0], --s;
|
|
202
|
+
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data === Ve); --e) f.data = null;
|
|
191
203
|
}
|
|
192
|
-
if (u.parent =
|
|
204
|
+
if (u.parent = ze, u.eachBefore(function(e) {
|
|
193
205
|
e.depth = e.parent.depth + 1, --s;
|
|
194
|
-
}).eachBefore(
|
|
206
|
+
}).eachBefore(Me), u.parent = null, s > 0) throw Error("cycle");
|
|
195
207
|
return u;
|
|
196
208
|
}
|
|
197
209
|
return r.id = function(t) {
|
|
198
|
-
return arguments.length ? (e =
|
|
210
|
+
return arguments.length ? (e = Pe(t), r) : e;
|
|
199
211
|
}, r.parentId = function(e) {
|
|
200
|
-
return arguments.length ? (t =
|
|
212
|
+
return arguments.length ? (t = Pe(e), r) : t;
|
|
201
213
|
}, r.path = function(e) {
|
|
202
|
-
return arguments.length ? (n =
|
|
214
|
+
return arguments.length ? (n = Pe(e), r) : n;
|
|
203
215
|
}, r;
|
|
204
216
|
}
|
|
205
|
-
function
|
|
217
|
+
function Ge(e) {
|
|
206
218
|
e = `${e}`;
|
|
207
219
|
let t = e.length;
|
|
208
|
-
return
|
|
220
|
+
return qe(e, t - 1) && !qe(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
|
|
209
221
|
}
|
|
210
|
-
function
|
|
222
|
+
function Ke(e) {
|
|
211
223
|
let t = e.length;
|
|
212
224
|
if (t < 2) return "";
|
|
213
|
-
for (; --t > 1 && !
|
|
225
|
+
for (; --t > 1 && !qe(e, t););
|
|
214
226
|
return e.slice(0, t);
|
|
215
227
|
}
|
|
216
|
-
function
|
|
228
|
+
function qe(e, t) {
|
|
217
229
|
if (e[t] === "/") {
|
|
218
230
|
let n = 0;
|
|
219
231
|
for (; t > 0 && e[--t] === "\\";) ++n;
|
|
@@ -221,39 +233,39 @@ function Ue(e, t) {
|
|
|
221
233
|
}
|
|
222
234
|
return !1;
|
|
223
235
|
}
|
|
224
|
-
function
|
|
236
|
+
function Je(e, t) {
|
|
225
237
|
return e.parent === t.parent ? 1 : 2;
|
|
226
238
|
}
|
|
227
|
-
function
|
|
239
|
+
function Ye(e) {
|
|
228
240
|
var t = e.children;
|
|
229
241
|
return t ? t[0] : e.t;
|
|
230
242
|
}
|
|
231
|
-
function
|
|
243
|
+
function Xe(e) {
|
|
232
244
|
var t = e.children;
|
|
233
245
|
return t ? t[t.length - 1] : e.t;
|
|
234
246
|
}
|
|
235
|
-
function
|
|
247
|
+
function Ze(e, t, n) {
|
|
236
248
|
var r = n / (t.i - e.i);
|
|
237
249
|
t.c -= r, t.s += n, e.c += r, t.z += n, t.m += n;
|
|
238
250
|
}
|
|
239
|
-
function
|
|
251
|
+
function Qe(e) {
|
|
240
252
|
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);
|
|
241
253
|
}
|
|
242
|
-
function
|
|
254
|
+
function $e(e, t, n) {
|
|
243
255
|
return e.a.parent === t.parent ? e.a : n;
|
|
244
256
|
}
|
|
245
|
-
function
|
|
257
|
+
function et(e, t) {
|
|
246
258
|
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;
|
|
247
259
|
}
|
|
248
|
-
|
|
249
|
-
function
|
|
250
|
-
for (var t = new
|
|
251
|
-
return (t.parent = new
|
|
260
|
+
et.prototype = Object.create(Ne.prototype);
|
|
261
|
+
function tt(e) {
|
|
262
|
+
for (var t = new et(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 et(a[o], o)), i.parent = n;
|
|
263
|
+
return (t.parent = new et(null, 0)).children = [t], t;
|
|
252
264
|
}
|
|
253
|
-
function
|
|
254
|
-
var e =
|
|
265
|
+
function nt() {
|
|
266
|
+
var e = Je, t = 1, n = 1, r = null;
|
|
255
267
|
function i(i) {
|
|
256
|
-
var s =
|
|
268
|
+
var s = tt(i);
|
|
257
269
|
if (s.eachAfter(a), s.parent.m = -s.z, s.eachBefore(o), r) i.eachBefore(c);
|
|
258
270
|
else {
|
|
259
271
|
var l = i, u = i, d = i;
|
|
@@ -270,7 +282,7 @@ function Qe() {
|
|
|
270
282
|
function a(t) {
|
|
271
283
|
var n = t.children, r = t.parent.children, i = t.i ? r[t.i - 1] : null;
|
|
272
284
|
if (n) {
|
|
273
|
-
|
|
285
|
+
Qe(t);
|
|
274
286
|
var a = (n[0].z + n[n.length - 1].z) / 2;
|
|
275
287
|
i ? (t.z = i.z + e(t._, i._), t.m = t.z - a) : t.z = a;
|
|
276
288
|
} else i && (t.z = i.z + e(t._, i._));
|
|
@@ -281,8 +293,8 @@ function Qe() {
|
|
|
281
293
|
}
|
|
282
294
|
function s(t, n, r) {
|
|
283
295
|
if (n) {
|
|
284
|
-
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 =
|
|
285
|
-
o && !
|
|
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 = Xe(o), i = Ye(i), o && i;) s = Ye(s), a = Xe(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (Ze($e(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
|
|
297
|
+
o && !Xe(a) && (a.t = o, a.m += u - l), i && !Ye(s) && (s.t = i, s.m += c - d, r = t);
|
|
286
298
|
}
|
|
287
299
|
return r;
|
|
288
300
|
}
|
|
@@ -297,14 +309,14 @@ function Qe() {
|
|
|
297
309
|
return arguments.length ? (r = !0, t = +e[0], n = +e[1], i) : r ? [t, n] : null;
|
|
298
310
|
}, i;
|
|
299
311
|
}
|
|
300
|
-
var
|
|
312
|
+
var O = "__root__", rt = "__total__", it = (e) => `__dimension__${JSON.stringify(e)}`, at = (e, t) => {
|
|
301
313
|
let n = e[t];
|
|
302
314
|
return n == null ? ["nil"] : [
|
|
303
315
|
"value",
|
|
304
316
|
typeof n,
|
|
305
317
|
n
|
|
306
318
|
];
|
|
307
|
-
},
|
|
319
|
+
}, k = (e, t) => {
|
|
308
320
|
if (t?.indicator !== "custom") return;
|
|
309
321
|
let n = t?.indicatorThreshold;
|
|
310
322
|
if (!n || e == null) return {
|
|
@@ -330,148 +342,150 @@ var k = "__root__", $e = "__total__", et = (e) => `__dimension__${JSON.stringify
|
|
|
330
342
|
color: null,
|
|
331
343
|
icon: void 0
|
|
332
344
|
};
|
|
333
|
-
},
|
|
334
|
-
let
|
|
345
|
+
}, ot = (e, t, n, r) => {
|
|
346
|
+
let a = {};
|
|
335
347
|
return e.slots?.forEach((n) => {
|
|
336
348
|
if (n.key === "main") return;
|
|
337
|
-
let
|
|
349
|
+
let o = {
|
|
338
350
|
enabled: n.enabled === !0,
|
|
339
351
|
label: "-",
|
|
340
352
|
value: null,
|
|
341
353
|
indicator: n.indicator ?? null
|
|
342
354
|
};
|
|
343
|
-
if (
|
|
344
|
-
let
|
|
355
|
+
if (o.enabled) {
|
|
356
|
+
let a = e.formatter;
|
|
345
357
|
if (n.source === "field") {
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
348
|
-
let e =
|
|
349
|
-
|
|
358
|
+
let s = r?.find((t) => t.parentId === e.dataItem.uniqueSignature && t.role === `tree-${n.key}`);
|
|
359
|
+
if (s) {
|
|
360
|
+
let e = i(s.dataItem);
|
|
361
|
+
s.formatter && (a = s.formatter), e && (o.value = t?.[e], o.label = o.value === null ? "-" : x(a?.format, o.value) ?? "-");
|
|
350
362
|
}
|
|
351
|
-
} else n.source === "variable" && (
|
|
352
|
-
|
|
363
|
+
} else n.source === "variable" && (o.value = n.propertyValue, o.label = o.value === null ? "-" : x(a?.format, o.value) ?? "-");
|
|
364
|
+
o.customIndicator = k(o.value, n);
|
|
353
365
|
}
|
|
354
|
-
|
|
355
|
-
}),
|
|
356
|
-
},
|
|
366
|
+
a[n.key] = { ...o };
|
|
367
|
+
}), a;
|
|
368
|
+
}, st = (e, t, n, r = !1) => {
|
|
357
369
|
if (n === 0 || e.data.id === "__total__") return !0;
|
|
358
370
|
let i = t ?? 2;
|
|
359
371
|
return e.depth - +!!r < i;
|
|
360
|
-
},
|
|
361
|
-
let
|
|
362
|
-
id:
|
|
372
|
+
}, ct = (e, t, n) => {
|
|
373
|
+
let r = [{
|
|
374
|
+
id: O,
|
|
363
375
|
parentId: null,
|
|
364
376
|
disabled: !1
|
|
365
377
|
}], a = /* @__PURE__ */ new Set();
|
|
366
378
|
e.measures.forEach((e) => {
|
|
367
379
|
a.add(e.dataItem.uniqueSignature);
|
|
368
380
|
});
|
|
369
|
-
let o = e.measures.filter((e) =>
|
|
381
|
+
let o = e.measures.filter((e) => p(e));
|
|
370
382
|
e.measures.forEach((e) => {
|
|
371
|
-
let t = e.dataItem.uniqueSignature, n = e.parentId && a.has(e.parentId) ? e.parentId :
|
|
372
|
-
|
|
383
|
+
let t = e.dataItem.uniqueSignature, n = e.parentId && a.has(e.parentId) ? e.parentId : O;
|
|
384
|
+
r.push({
|
|
373
385
|
id: t,
|
|
374
386
|
parentId: n,
|
|
375
|
-
disabled: !
|
|
387
|
+
disabled: !p(e)
|
|
376
388
|
});
|
|
377
389
|
});
|
|
378
|
-
let s =
|
|
390
|
+
let s = We().id((e) => e.id).parentId((e) => e.parentId)(r), c = [];
|
|
379
391
|
s.descendants().forEach((e) => {
|
|
380
392
|
if (e.data.disabled) return;
|
|
381
393
|
let t = e.ancestors().slice(1).find((e) => !e.data.disabled);
|
|
382
|
-
t ?
|
|
394
|
+
t ? c.push({
|
|
383
395
|
id: e.data.id,
|
|
384
396
|
parentId: t.data.id
|
|
385
|
-
}) :
|
|
397
|
+
}) : c.push({
|
|
386
398
|
id: e.data.id,
|
|
387
399
|
parentId: null
|
|
388
400
|
});
|
|
389
401
|
});
|
|
390
|
-
let u =
|
|
391
|
-
if (
|
|
392
|
-
id:
|
|
402
|
+
let u = c.flatMap((n) => {
|
|
403
|
+
if (n.id === "__root__") return [{
|
|
404
|
+
id: n.id,
|
|
393
405
|
parentId: null,
|
|
394
406
|
label: "Dummy Root",
|
|
395
407
|
value: {
|
|
396
408
|
label: "-",
|
|
397
409
|
value: null
|
|
398
410
|
}
|
|
399
|
-
};
|
|
400
|
-
let
|
|
401
|
-
return
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
411
|
+
}];
|
|
412
|
+
let r = o.find((e) => e.dataItem.uniqueSignature === n.id);
|
|
413
|
+
if (!r) return [];
|
|
414
|
+
let a = i(r.dataItem), s = t[0].items?.[0], c = r ? ot(r, s, o, e.supportingMeasures) : {}, u = s?.[a], d = r?.slots?.find((e) => e.key === "main");
|
|
415
|
+
return [{
|
|
416
|
+
id: n.id,
|
|
417
|
+
parentId: n.parentId,
|
|
418
|
+
label: l(r),
|
|
405
419
|
value: {
|
|
406
|
-
label:
|
|
407
|
-
value:
|
|
420
|
+
label: x(r.formatter?.format, t[0].items?.[0]?.[a]) ?? "-",
|
|
421
|
+
value: u
|
|
408
422
|
},
|
|
409
|
-
indicator:
|
|
410
|
-
customIndicator:
|
|
423
|
+
indicator: d?.indicator ?? null,
|
|
424
|
+
customIndicator: k(u, d),
|
|
411
425
|
brush: {
|
|
412
|
-
key: [
|
|
413
|
-
value:
|
|
426
|
+
key: [fe.sourceKey, fe.field].join("/"),
|
|
427
|
+
value: ye(r)
|
|
414
428
|
},
|
|
415
429
|
...c
|
|
416
|
-
};
|
|
417
|
-
}), d =
|
|
418
|
-
return d.sort((e, t) =>
|
|
430
|
+
}];
|
|
431
|
+
}), d = We().id((e) => e.id).parentId((e) => e.parentId)(u), f = o.map((e) => e.dataItem.uniqueSignature);
|
|
432
|
+
return d.sort((e, t) => f.indexOf(e.data.id) - f.indexOf(t.data.id)), d.descendants().forEach((e) => {
|
|
419
433
|
let t = !1;
|
|
420
|
-
t = e.data.id in
|
|
434
|
+
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);
|
|
421
435
|
}), d;
|
|
422
|
-
},
|
|
436
|
+
}, lt = (e, t, n) => {
|
|
423
437
|
if (t.itemsNotAffectedByFiltering?.pattern?.length && e.staticFilters.ignoreGlobalFilters && e.staticFilters.showGlobalFiltersEffect) {
|
|
424
438
|
let e = [0, ...t.itemsNotAffectedByFiltering.pattern.map((e) => n[e]).filter((e) => e !== null)].join("-");
|
|
425
439
|
return !t.itemsNotAffectedByFiltering.itemsMap?.[e];
|
|
426
440
|
}
|
|
427
441
|
return !1;
|
|
428
|
-
},
|
|
429
|
-
let { id: o, parentId: s, prop: c, measureProp: l, dataItemIdx: u, engineKey: d } = a, f = n?.slots?.find((e) => e.key === "main"), p = i && n ?
|
|
442
|
+
}, ut = (e, t, n, r, i, a) => {
|
|
443
|
+
let { id: o, parentId: s, prop: c, measureProp: l, dataItemIdx: u, engineKey: d } = a, f = n?.slots?.find((e) => e.key === "main"), p = i && n ? ot(n, r, [n], e.supportingMeasures) : {};
|
|
430
444
|
return {
|
|
431
445
|
id: o,
|
|
432
446
|
parentId: s,
|
|
433
447
|
label: String(r[c]),
|
|
434
448
|
row: +u,
|
|
435
|
-
value: i ? {
|
|
436
|
-
label:
|
|
449
|
+
value: i && n && l ? {
|
|
450
|
+
label: x(n.formatter?.format, r[l]) ?? "-",
|
|
437
451
|
value: r[l]
|
|
438
452
|
} : null,
|
|
439
453
|
indicator: f?.indicator ?? null,
|
|
440
|
-
customIndicator:
|
|
454
|
+
customIndicator: k(l ? r[l] : null, f),
|
|
441
455
|
brush: {
|
|
442
456
|
key: d,
|
|
443
457
|
value: r[c]
|
|
444
458
|
},
|
|
445
|
-
_excluded:
|
|
459
|
+
_excluded: lt(e, t, r),
|
|
446
460
|
...p
|
|
447
461
|
};
|
|
448
462
|
};
|
|
449
|
-
function
|
|
450
|
-
let r = t[0],
|
|
451
|
-
_ &&
|
|
452
|
-
let n =
|
|
453
|
-
if (!
|
|
463
|
+
function dt(e, t, n) {
|
|
464
|
+
let r = t[0], a = e.dimensions.filter((e) => p(e)), s = {}, c = a.map((t) => [i(t.dataItem), o(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"), m, h, g = /* @__PURE__ */ new Set(), _ = r.groupings, v = _ ? Object.keys(_) : void 0;
|
|
465
|
+
_ && v && v.forEach((t) => {
|
|
466
|
+
let n = _[t], i = r.items[+t], a = c.filter(([e]) => n[e] === 0);
|
|
467
|
+
if (!a.length) {
|
|
454
468
|
m = u ? i[u] : void 0, h = i;
|
|
455
469
|
return;
|
|
456
470
|
}
|
|
457
|
-
let [
|
|
458
|
-
|
|
471
|
+
let [o, f] = a.length ? a[a.length - 1] : ["", ""], p = it(a.map((e) => at(i, e[0]))), v = a.slice(0, -1), y = v.length ? it(v.map((e) => at(i, e[0]))) : d ? rt : O;
|
|
472
|
+
a.length < c.length && g.add(p), s[p] || (s[p] = ut(e, r, l, i, !!l, {
|
|
459
473
|
engineKey: f,
|
|
460
474
|
id: p,
|
|
461
|
-
parentId:
|
|
475
|
+
parentId: y,
|
|
462
476
|
measureProp: u,
|
|
463
|
-
prop:
|
|
477
|
+
prop: o,
|
|
464
478
|
dataItemIdx: +t
|
|
465
479
|
}));
|
|
466
480
|
}), r.items.forEach((t, n) => {
|
|
467
|
-
|
|
481
|
+
v?.includes(String(n)) || c.forEach(([i, a], o, c) => {
|
|
468
482
|
if (t[i] === void 0) {
|
|
469
483
|
console.warn(`Dimension property ${i} is missing in data item at index ${n}, skipping this dimension for this item`);
|
|
470
484
|
return;
|
|
471
485
|
}
|
|
472
|
-
let f =
|
|
473
|
-
|
|
474
|
-
engineKey:
|
|
486
|
+
let f = it(c.slice(0, o + 1).map((e) => at(t, e[0]))), p = o === 0 ? d ? rt : O : it(c.slice(0, o).map((e) => at(t, e[0])));
|
|
487
|
+
s[f] || (s[f] = ut(e, r, l, t, o === c.length - 1 && !!l, {
|
|
488
|
+
engineKey: a,
|
|
475
489
|
dataItemIdx: n,
|
|
476
490
|
id: f,
|
|
477
491
|
parentId: p,
|
|
@@ -480,42 +494,42 @@ function ct(e, t, n) {
|
|
|
480
494
|
}));
|
|
481
495
|
});
|
|
482
496
|
});
|
|
483
|
-
let
|
|
484
|
-
d &&
|
|
485
|
-
id:
|
|
486
|
-
parentId:
|
|
497
|
+
let y = m ?? Object.values(s).reduce((e, t) => e + (g.has(t.id) ? 0 : t.value?.value ?? 0), 0), b = h ?? r.totals, S = Object.values(s);
|
|
498
|
+
d && S.unshift({
|
|
499
|
+
id: rt,
|
|
500
|
+
parentId: O,
|
|
487
501
|
label: "Total",
|
|
488
502
|
row: -1,
|
|
489
503
|
value: l ? {
|
|
490
|
-
label:
|
|
491
|
-
value:
|
|
504
|
+
label: x(l.formatter?.format, y) ?? "-",
|
|
505
|
+
value: y
|
|
492
506
|
} : null,
|
|
493
|
-
indicator:
|
|
494
|
-
customIndicator:
|
|
495
|
-
...l ?
|
|
496
|
-
}),
|
|
497
|
-
id:
|
|
507
|
+
indicator: f?.indicator ?? null,
|
|
508
|
+
customIndicator: k(y, f),
|
|
509
|
+
...l ? ot(l, b, [l], e.supportingMeasures) : {}
|
|
510
|
+
}), S.unshift({
|
|
511
|
+
id: O,
|
|
498
512
|
parentId: null,
|
|
499
513
|
label: "Dummy Root",
|
|
500
514
|
row: -1,
|
|
501
515
|
value: null
|
|
502
516
|
});
|
|
503
|
-
let
|
|
504
|
-
return
|
|
517
|
+
let C = We().id((e) => e.id).parentId((e) => e.parentId)(S);
|
|
518
|
+
return C.sort((e, t) => (e.data.row ?? 0) - (t.data.row ?? 0)), C.descendants().forEach((t) => {
|
|
505
519
|
if (t.data.id === "__total__") return;
|
|
506
520
|
let r = !1;
|
|
507
|
-
r = t.data.id in n ? n[t.data.id] === !1 : !
|
|
508
|
-
}),
|
|
521
|
+
r = t.data.id in n ? n[t.data.id] === !1 : !st(t, e.treeChartSettings?.initialExpandedLevels, a.length, d), r && (t._children = t.children, t.children = void 0);
|
|
522
|
+
}), C;
|
|
509
523
|
}
|
|
510
|
-
var
|
|
511
|
-
let r = e.dimensions.filter(
|
|
512
|
-
return (0,
|
|
524
|
+
var ft = ({ vSpec: e, data: t, nodeExpandState: n }) => {
|
|
525
|
+
let r = e.dimensions.filter(p).length, [i, a] = (0, D.useState)(null);
|
|
526
|
+
return (0, D.useEffect)(() => {
|
|
513
527
|
if (r > 0) {
|
|
514
|
-
let r =
|
|
528
|
+
let r = dt(e, t, n.current);
|
|
515
529
|
a(r);
|
|
516
530
|
return;
|
|
517
531
|
}
|
|
518
|
-
let i =
|
|
532
|
+
let i = ct(e, t, n.current);
|
|
519
533
|
a(i);
|
|
520
534
|
}, [
|
|
521
535
|
t,
|
|
@@ -525,117 +539,117 @@ var lt = ({ vSpec: e, data: t, nodeExpandState: n }) => {
|
|
|
525
539
|
e.treeChartSettings?.nodeExpandState,
|
|
526
540
|
e.totals?.enabled
|
|
527
541
|
]), i;
|
|
528
|
-
},
|
|
542
|
+
}, pt = {
|
|
529
543
|
svg: "http://www.w3.org/2000/svg",
|
|
530
544
|
xhtml: "http://www.w3.org/1999/xhtml",
|
|
531
545
|
xlink: "http://www.w3.org/1999/xlink",
|
|
532
546
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
533
547
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
534
548
|
};
|
|
535
|
-
function
|
|
549
|
+
function mt(e) {
|
|
536
550
|
var t = e += "", n = t.indexOf(":");
|
|
537
|
-
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)),
|
|
538
|
-
space:
|
|
551
|
+
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), pt.hasOwnProperty(t) ? {
|
|
552
|
+
space: pt[t],
|
|
539
553
|
local: e
|
|
540
554
|
} : e;
|
|
541
555
|
}
|
|
542
|
-
function
|
|
556
|
+
function ht(e) {
|
|
543
557
|
return function() {
|
|
544
558
|
var t = this.ownerDocument, n = this.namespaceURI;
|
|
545
559
|
return n === "http://www.w3.org/1999/xhtml" && t.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? t.createElement(e) : t.createElementNS(n, e);
|
|
546
560
|
};
|
|
547
561
|
}
|
|
548
|
-
function
|
|
562
|
+
function gt(e) {
|
|
549
563
|
return function() {
|
|
550
564
|
return this.ownerDocument.createElementNS(e.space, e.local);
|
|
551
565
|
};
|
|
552
566
|
}
|
|
553
|
-
function
|
|
554
|
-
var t =
|
|
555
|
-
return (t.local ?
|
|
567
|
+
function _t(e) {
|
|
568
|
+
var t = mt(e);
|
|
569
|
+
return (t.local ? gt : ht)(t);
|
|
556
570
|
}
|
|
557
|
-
function
|
|
558
|
-
function
|
|
559
|
-
return e == null ?
|
|
571
|
+
function vt() {}
|
|
572
|
+
function yt(e) {
|
|
573
|
+
return e == null ? vt : function() {
|
|
560
574
|
return this.querySelector(e);
|
|
561
575
|
};
|
|
562
576
|
}
|
|
563
|
-
function
|
|
564
|
-
typeof e != "function" && (e =
|
|
577
|
+
function bt(e) {
|
|
578
|
+
typeof e != "function" && (e = yt(e));
|
|
565
579
|
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);
|
|
566
580
|
return new j(r, this._parents);
|
|
567
581
|
}
|
|
568
|
-
function
|
|
582
|
+
function xt(e) {
|
|
569
583
|
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
|
|
570
584
|
}
|
|
571
|
-
function
|
|
585
|
+
function St() {
|
|
572
586
|
return [];
|
|
573
587
|
}
|
|
574
|
-
function
|
|
575
|
-
return e == null ?
|
|
588
|
+
function Ct(e) {
|
|
589
|
+
return e == null ? St : function() {
|
|
576
590
|
return this.querySelectorAll(e);
|
|
577
591
|
};
|
|
578
592
|
}
|
|
579
|
-
function
|
|
593
|
+
function wt(e) {
|
|
580
594
|
return function() {
|
|
581
|
-
return
|
|
595
|
+
return xt(e.apply(this, arguments));
|
|
582
596
|
};
|
|
583
597
|
}
|
|
584
|
-
function
|
|
585
|
-
e = typeof e == "function" ?
|
|
598
|
+
function Tt(e) {
|
|
599
|
+
e = typeof e == "function" ? wt(e) : Ct(e);
|
|
586
600
|
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));
|
|
587
601
|
return new j(r, i);
|
|
588
602
|
}
|
|
589
|
-
function
|
|
603
|
+
function Et(e) {
|
|
590
604
|
return function() {
|
|
591
605
|
return this.matches(e);
|
|
592
606
|
};
|
|
593
607
|
}
|
|
594
|
-
function
|
|
608
|
+
function Dt(e) {
|
|
595
609
|
return function(t) {
|
|
596
610
|
return t.matches(e);
|
|
597
611
|
};
|
|
598
612
|
}
|
|
599
|
-
var
|
|
600
|
-
function
|
|
613
|
+
var Ot = Array.prototype.find;
|
|
614
|
+
function kt(e) {
|
|
601
615
|
return function() {
|
|
602
|
-
return
|
|
616
|
+
return Ot.call(this.children, e);
|
|
603
617
|
};
|
|
604
618
|
}
|
|
605
|
-
function
|
|
619
|
+
function At() {
|
|
606
620
|
return this.firstElementChild;
|
|
607
621
|
}
|
|
608
|
-
function
|
|
609
|
-
return this.select(e == null ?
|
|
622
|
+
function jt(e) {
|
|
623
|
+
return this.select(e == null ? At : kt(typeof e == "function" ? e : Dt(e)));
|
|
610
624
|
}
|
|
611
|
-
var
|
|
612
|
-
function
|
|
625
|
+
var Mt = Array.prototype.filter;
|
|
626
|
+
function Nt() {
|
|
613
627
|
return Array.from(this.children);
|
|
614
628
|
}
|
|
615
|
-
function
|
|
629
|
+
function Pt(e) {
|
|
616
630
|
return function() {
|
|
617
|
-
return
|
|
631
|
+
return Mt.call(this.children, e);
|
|
618
632
|
};
|
|
619
633
|
}
|
|
620
|
-
function
|
|
621
|
-
return this.selectAll(e == null ?
|
|
634
|
+
function Ft(e) {
|
|
635
|
+
return this.selectAll(e == null ? Nt : Pt(typeof e == "function" ? e : Dt(e)));
|
|
622
636
|
}
|
|
623
|
-
function
|
|
624
|
-
typeof e != "function" && (e =
|
|
637
|
+
function It(e) {
|
|
638
|
+
typeof e != "function" && (e = Et(e));
|
|
625
639
|
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);
|
|
626
640
|
return new j(r, this._parents);
|
|
627
641
|
}
|
|
628
|
-
function
|
|
642
|
+
function Lt(e) {
|
|
629
643
|
return Array(e.length);
|
|
630
644
|
}
|
|
631
|
-
function
|
|
632
|
-
return new j(this._enter || this._groups.map(
|
|
645
|
+
function Rt() {
|
|
646
|
+
return new j(this._enter || this._groups.map(Lt), this._parents);
|
|
633
647
|
}
|
|
634
|
-
function
|
|
648
|
+
function zt(e, t) {
|
|
635
649
|
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
|
|
636
650
|
}
|
|
637
|
-
|
|
638
|
-
constructor:
|
|
651
|
+
zt.prototype = {
|
|
652
|
+
constructor: zt,
|
|
639
653
|
appendChild: function(e) {
|
|
640
654
|
return this._parent.insertBefore(e, this._next);
|
|
641
655
|
},
|
|
@@ -649,30 +663,30 @@ It.prototype = {
|
|
|
649
663
|
return this._parent.querySelectorAll(e);
|
|
650
664
|
}
|
|
651
665
|
};
|
|
652
|
-
function
|
|
666
|
+
function Bt(e) {
|
|
653
667
|
return function() {
|
|
654
668
|
return e;
|
|
655
669
|
};
|
|
656
670
|
}
|
|
657
|
-
function
|
|
658
|
-
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new
|
|
671
|
+
function Vt(e, t, n, r, i, a) {
|
|
672
|
+
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new zt(e, a[o]);
|
|
659
673
|
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
|
|
660
674
|
}
|
|
661
|
-
function
|
|
675
|
+
function Ht(e, t, n, r, i, a, o) {
|
|
662
676
|
var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
|
|
663
677
|
for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
|
|
664
|
-
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new
|
|
678
|
+
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new zt(e, a[s]);
|
|
665
679
|
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
|
|
666
680
|
}
|
|
667
|
-
function
|
|
681
|
+
function Ut(e) {
|
|
668
682
|
return e.__data__;
|
|
669
683
|
}
|
|
670
|
-
function
|
|
671
|
-
if (!arguments.length) return Array.from(this,
|
|
672
|
-
var n = t ?
|
|
673
|
-
typeof e != "function" && (e =
|
|
684
|
+
function Wt(e, t) {
|
|
685
|
+
if (!arguments.length) return Array.from(this, Ut);
|
|
686
|
+
var n = t ? Ht : Vt, r = this._parents, i = this._groups;
|
|
687
|
+
typeof e != "function" && (e = Bt(e));
|
|
674
688
|
for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
|
|
675
|
-
var u = r[l], d = i[l], f = d.length, p =
|
|
689
|
+
var u = r[l], d = i[l], f = d.length, p = Gt(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
|
|
676
690
|
n(u, d, h, g, c[l] = Array(f), p, t);
|
|
677
691
|
for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
|
|
678
692
|
for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
|
|
@@ -681,27 +695,27 @@ function Vt(e, t) {
|
|
|
681
695
|
}
|
|
682
696
|
return o = new j(o, r), o._enter = s, o._exit = c, o;
|
|
683
697
|
}
|
|
684
|
-
function
|
|
698
|
+
function Gt(e) {
|
|
685
699
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
686
700
|
}
|
|
687
|
-
function
|
|
688
|
-
return new j(this._exit || this._groups.map(
|
|
701
|
+
function Kt() {
|
|
702
|
+
return new j(this._exit || this._groups.map(Lt), this._parents);
|
|
689
703
|
}
|
|
690
|
-
function
|
|
704
|
+
function qt(e, t, n) {
|
|
691
705
|
var r = this.enter(), i = this, a = this.exit();
|
|
692
706
|
return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
693
707
|
}
|
|
694
|
-
function
|
|
708
|
+
function Jt(e) {
|
|
695
709
|
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);
|
|
696
710
|
for (; c < i; ++c) s[c] = n[c];
|
|
697
711
|
return new j(s, this._parents);
|
|
698
712
|
}
|
|
699
|
-
function
|
|
713
|
+
function Yt() {
|
|
700
714
|
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);
|
|
701
715
|
return this;
|
|
702
716
|
}
|
|
703
|
-
function
|
|
704
|
-
e ||=
|
|
717
|
+
function Xt(e) {
|
|
718
|
+
e ||= Zt;
|
|
705
719
|
function t(t, n) {
|
|
706
720
|
return t && n ? e(t.__data__, n.__data__) : !t - !n;
|
|
707
721
|
}
|
|
@@ -711,129 +725,129 @@ function qt(e) {
|
|
|
711
725
|
}
|
|
712
726
|
return new j(i, this._parents).order();
|
|
713
727
|
}
|
|
714
|
-
function
|
|
728
|
+
function Zt(e, t) {
|
|
715
729
|
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
716
730
|
}
|
|
717
|
-
function
|
|
731
|
+
function Qt() {
|
|
718
732
|
var e = arguments[0];
|
|
719
733
|
return arguments[0] = this, e.apply(null, arguments), this;
|
|
720
734
|
}
|
|
721
|
-
function
|
|
735
|
+
function $t() {
|
|
722
736
|
return Array.from(this);
|
|
723
737
|
}
|
|
724
|
-
function
|
|
738
|
+
function en() {
|
|
725
739
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
|
|
726
740
|
var o = r[i];
|
|
727
741
|
if (o) return o;
|
|
728
742
|
}
|
|
729
743
|
return null;
|
|
730
744
|
}
|
|
731
|
-
function
|
|
745
|
+
function tn() {
|
|
732
746
|
let e = 0;
|
|
733
747
|
for (let t of this) ++e;
|
|
734
748
|
return e;
|
|
735
749
|
}
|
|
736
|
-
function
|
|
750
|
+
function nn() {
|
|
737
751
|
return !this.node();
|
|
738
752
|
}
|
|
739
|
-
function
|
|
753
|
+
function rn(e) {
|
|
740
754
|
for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
|
|
741
755
|
return this;
|
|
742
756
|
}
|
|
743
|
-
function
|
|
757
|
+
function an(e) {
|
|
744
758
|
return function() {
|
|
745
759
|
this.removeAttribute(e);
|
|
746
760
|
};
|
|
747
761
|
}
|
|
748
|
-
function
|
|
762
|
+
function on(e) {
|
|
749
763
|
return function() {
|
|
750
764
|
this.removeAttributeNS(e.space, e.local);
|
|
751
765
|
};
|
|
752
766
|
}
|
|
753
|
-
function
|
|
767
|
+
function sn(e, t) {
|
|
754
768
|
return function() {
|
|
755
769
|
this.setAttribute(e, t);
|
|
756
770
|
};
|
|
757
771
|
}
|
|
758
|
-
function
|
|
772
|
+
function cn(e, t) {
|
|
759
773
|
return function() {
|
|
760
774
|
this.setAttributeNS(e.space, e.local, t);
|
|
761
775
|
};
|
|
762
776
|
}
|
|
763
|
-
function
|
|
777
|
+
function ln(e, t) {
|
|
764
778
|
return function() {
|
|
765
779
|
var n = t.apply(this, arguments);
|
|
766
780
|
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
|
|
767
781
|
};
|
|
768
782
|
}
|
|
769
|
-
function
|
|
783
|
+
function un(e, t) {
|
|
770
784
|
return function() {
|
|
771
785
|
var n = t.apply(this, arguments);
|
|
772
786
|
n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
|
|
773
787
|
};
|
|
774
788
|
}
|
|
775
|
-
function
|
|
776
|
-
var n =
|
|
789
|
+
function dn(e, t) {
|
|
790
|
+
var n = mt(e);
|
|
777
791
|
if (arguments.length < 2) {
|
|
778
792
|
var r = this.node();
|
|
779
793
|
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
780
794
|
}
|
|
781
|
-
return this.each((t == null ? n.local ?
|
|
795
|
+
return this.each((t == null ? n.local ? on : an : typeof t == "function" ? n.local ? un : ln : n.local ? cn : sn)(n, t));
|
|
782
796
|
}
|
|
783
|
-
function
|
|
797
|
+
function fn(e) {
|
|
784
798
|
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
|
|
785
799
|
}
|
|
786
|
-
function
|
|
800
|
+
function pn(e) {
|
|
787
801
|
return function() {
|
|
788
802
|
this.style.removeProperty(e);
|
|
789
803
|
};
|
|
790
804
|
}
|
|
791
|
-
function
|
|
805
|
+
function mn(e, t, n) {
|
|
792
806
|
return function() {
|
|
793
807
|
this.style.setProperty(e, t, n);
|
|
794
808
|
};
|
|
795
809
|
}
|
|
796
|
-
function
|
|
810
|
+
function hn(e, t, n) {
|
|
797
811
|
return function() {
|
|
798
812
|
var r = t.apply(this, arguments);
|
|
799
813
|
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
|
|
800
814
|
};
|
|
801
815
|
}
|
|
802
|
-
function
|
|
803
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
816
|
+
function gn(e, t, n) {
|
|
817
|
+
return arguments.length > 1 ? this.each((t == null ? pn : typeof t == "function" ? hn : mn)(e, t, n ?? "")) : A(this.node(), e);
|
|
804
818
|
}
|
|
805
819
|
function A(e, t) {
|
|
806
|
-
return e.style.getPropertyValue(t) ||
|
|
820
|
+
return e.style.getPropertyValue(t) || fn(e).getComputedStyle(e, null).getPropertyValue(t);
|
|
807
821
|
}
|
|
808
|
-
function
|
|
822
|
+
function _n(e) {
|
|
809
823
|
return function() {
|
|
810
824
|
delete this[e];
|
|
811
825
|
};
|
|
812
826
|
}
|
|
813
|
-
function
|
|
827
|
+
function vn(e, t) {
|
|
814
828
|
return function() {
|
|
815
829
|
this[e] = t;
|
|
816
830
|
};
|
|
817
831
|
}
|
|
818
|
-
function
|
|
832
|
+
function yn(e, t) {
|
|
819
833
|
return function() {
|
|
820
834
|
var n = t.apply(this, arguments);
|
|
821
835
|
n == null ? delete this[e] : this[e] = n;
|
|
822
836
|
};
|
|
823
837
|
}
|
|
824
|
-
function
|
|
825
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
838
|
+
function bn(e, t) {
|
|
839
|
+
return arguments.length > 1 ? this.each((t == null ? _n : typeof t == "function" ? yn : vn)(e, t)) : this.node()[e];
|
|
826
840
|
}
|
|
827
|
-
function
|
|
841
|
+
function xn(e) {
|
|
828
842
|
return e.trim().split(/^|\s+/);
|
|
829
843
|
}
|
|
830
|
-
function
|
|
831
|
-
return e.classList || new
|
|
844
|
+
function Sn(e) {
|
|
845
|
+
return e.classList || new Cn(e);
|
|
832
846
|
}
|
|
833
|
-
function
|
|
834
|
-
this._node = e, this._names =
|
|
847
|
+
function Cn(e) {
|
|
848
|
+
this._node = e, this._names = xn(e.getAttribute("class") || "");
|
|
835
849
|
}
|
|
836
|
-
|
|
850
|
+
Cn.prototype = {
|
|
837
851
|
add: function(e) {
|
|
838
852
|
this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
839
853
|
},
|
|
@@ -845,123 +859,123 @@ bn.prototype = {
|
|
|
845
859
|
return this._names.indexOf(e) >= 0;
|
|
846
860
|
}
|
|
847
861
|
};
|
|
848
|
-
function
|
|
849
|
-
for (var n =
|
|
862
|
+
function wn(e, t) {
|
|
863
|
+
for (var n = Sn(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
|
|
850
864
|
}
|
|
851
|
-
function
|
|
852
|
-
for (var n =
|
|
865
|
+
function Tn(e, t) {
|
|
866
|
+
for (var n = Sn(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
|
|
853
867
|
}
|
|
854
|
-
function
|
|
868
|
+
function En(e) {
|
|
855
869
|
return function() {
|
|
856
|
-
|
|
870
|
+
wn(this, e);
|
|
857
871
|
};
|
|
858
872
|
}
|
|
859
|
-
function
|
|
873
|
+
function Dn(e) {
|
|
860
874
|
return function() {
|
|
861
|
-
|
|
875
|
+
Tn(this, e);
|
|
862
876
|
};
|
|
863
877
|
}
|
|
864
|
-
function
|
|
878
|
+
function On(e, t) {
|
|
865
879
|
return function() {
|
|
866
|
-
(t.apply(this, arguments) ?
|
|
880
|
+
(t.apply(this, arguments) ? wn : Tn)(this, e);
|
|
867
881
|
};
|
|
868
882
|
}
|
|
869
|
-
function
|
|
870
|
-
var n =
|
|
883
|
+
function kn(e, t) {
|
|
884
|
+
var n = xn(e + "");
|
|
871
885
|
if (arguments.length < 2) {
|
|
872
|
-
for (var r =
|
|
886
|
+
for (var r = Sn(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
|
|
873
887
|
return !0;
|
|
874
888
|
}
|
|
875
|
-
return this.each((typeof t == "function" ?
|
|
889
|
+
return this.each((typeof t == "function" ? On : t ? En : Dn)(n, t));
|
|
876
890
|
}
|
|
877
|
-
function
|
|
891
|
+
function An() {
|
|
878
892
|
this.textContent = "";
|
|
879
893
|
}
|
|
880
|
-
function
|
|
894
|
+
function jn(e) {
|
|
881
895
|
return function() {
|
|
882
896
|
this.textContent = e;
|
|
883
897
|
};
|
|
884
898
|
}
|
|
885
|
-
function
|
|
899
|
+
function Mn(e) {
|
|
886
900
|
return function() {
|
|
887
901
|
var t = e.apply(this, arguments);
|
|
888
902
|
this.textContent = t ?? "";
|
|
889
903
|
};
|
|
890
904
|
}
|
|
891
|
-
function
|
|
892
|
-
return arguments.length ? this.each(e == null ?
|
|
905
|
+
function Nn(e) {
|
|
906
|
+
return arguments.length ? this.each(e == null ? An : (typeof e == "function" ? Mn : jn)(e)) : this.node().textContent;
|
|
893
907
|
}
|
|
894
|
-
function
|
|
908
|
+
function Pn() {
|
|
895
909
|
this.innerHTML = "";
|
|
896
910
|
}
|
|
897
|
-
function
|
|
911
|
+
function Fn(e) {
|
|
898
912
|
return function() {
|
|
899
913
|
this.innerHTML = e;
|
|
900
914
|
};
|
|
901
915
|
}
|
|
902
|
-
function
|
|
916
|
+
function In(e) {
|
|
903
917
|
return function() {
|
|
904
918
|
var t = e.apply(this, arguments);
|
|
905
919
|
this.innerHTML = t ?? "";
|
|
906
920
|
};
|
|
907
921
|
}
|
|
908
|
-
function
|
|
909
|
-
return arguments.length ? this.each(e == null ?
|
|
922
|
+
function Ln(e) {
|
|
923
|
+
return arguments.length ? this.each(e == null ? Pn : (typeof e == "function" ? In : Fn)(e)) : this.node().innerHTML;
|
|
910
924
|
}
|
|
911
|
-
function
|
|
925
|
+
function Rn() {
|
|
912
926
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
913
927
|
}
|
|
914
|
-
function
|
|
915
|
-
return this.each(
|
|
928
|
+
function zn() {
|
|
929
|
+
return this.each(Rn);
|
|
916
930
|
}
|
|
917
|
-
function
|
|
931
|
+
function Bn() {
|
|
918
932
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
919
933
|
}
|
|
920
|
-
function
|
|
921
|
-
return this.each(
|
|
934
|
+
function Vn() {
|
|
935
|
+
return this.each(Bn);
|
|
922
936
|
}
|
|
923
|
-
function
|
|
924
|
-
var t = typeof e == "function" ? e :
|
|
937
|
+
function Hn(e) {
|
|
938
|
+
var t = typeof e == "function" ? e : _t(e);
|
|
925
939
|
return this.select(function() {
|
|
926
940
|
return this.appendChild(t.apply(this, arguments));
|
|
927
941
|
});
|
|
928
942
|
}
|
|
929
|
-
function
|
|
943
|
+
function Un() {
|
|
930
944
|
return null;
|
|
931
945
|
}
|
|
932
|
-
function
|
|
933
|
-
var n = typeof e == "function" ? e :
|
|
946
|
+
function Wn(e, t) {
|
|
947
|
+
var n = typeof e == "function" ? e : _t(e), r = t == null ? Un : typeof t == "function" ? t : yt(t);
|
|
934
948
|
return this.select(function() {
|
|
935
949
|
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
936
950
|
});
|
|
937
951
|
}
|
|
938
|
-
function
|
|
952
|
+
function Gn() {
|
|
939
953
|
var e = this.parentNode;
|
|
940
954
|
e && e.removeChild(this);
|
|
941
955
|
}
|
|
942
|
-
function
|
|
943
|
-
return this.each(
|
|
956
|
+
function Kn() {
|
|
957
|
+
return this.each(Gn);
|
|
944
958
|
}
|
|
945
|
-
function
|
|
959
|
+
function qn() {
|
|
946
960
|
var e = this.cloneNode(!1), t = this.parentNode;
|
|
947
961
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
948
962
|
}
|
|
949
|
-
function
|
|
963
|
+
function Jn() {
|
|
950
964
|
var e = this.cloneNode(!0), t = this.parentNode;
|
|
951
965
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
952
966
|
}
|
|
953
|
-
function
|
|
954
|
-
return this.select(e ?
|
|
967
|
+
function Yn(e) {
|
|
968
|
+
return this.select(e ? Jn : qn);
|
|
955
969
|
}
|
|
956
|
-
function
|
|
970
|
+
function Xn(e) {
|
|
957
971
|
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
958
972
|
}
|
|
959
|
-
function
|
|
973
|
+
function Zn(e) {
|
|
960
974
|
return function(t) {
|
|
961
975
|
e.call(this, t, this.__data__);
|
|
962
976
|
};
|
|
963
977
|
}
|
|
964
|
-
function
|
|
978
|
+
function Qn(e) {
|
|
965
979
|
return e.trim().split(/^|\s+/).map(function(e) {
|
|
966
980
|
var t = "", n = e.indexOf(".");
|
|
967
981
|
return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
|
|
@@ -970,7 +984,7 @@ function Yn(e) {
|
|
|
970
984
|
};
|
|
971
985
|
});
|
|
972
986
|
}
|
|
973
|
-
function
|
|
987
|
+
function $n(e) {
|
|
974
988
|
return function() {
|
|
975
989
|
var t = this.__on;
|
|
976
990
|
if (t) {
|
|
@@ -979,9 +993,9 @@ function Xn(e) {
|
|
|
979
993
|
}
|
|
980
994
|
};
|
|
981
995
|
}
|
|
982
|
-
function
|
|
996
|
+
function er(e, t, n) {
|
|
983
997
|
return function() {
|
|
984
|
-
var r = this.__on, i, a =
|
|
998
|
+
var r = this.__on, i, a = Zn(t);
|
|
985
999
|
if (r) {
|
|
986
1000
|
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
|
|
987
1001
|
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
|
|
@@ -997,8 +1011,8 @@ function Zn(e, t, n) {
|
|
|
997
1011
|
}, r ? r.push(i) : this.__on = [i];
|
|
998
1012
|
};
|
|
999
1013
|
}
|
|
1000
|
-
function
|
|
1001
|
-
var r =
|
|
1014
|
+
function tr(e, t, n) {
|
|
1015
|
+
var r = Qn(e + ""), i, a = r.length, o;
|
|
1002
1016
|
if (arguments.length < 2) {
|
|
1003
1017
|
var s = this.node().__on;
|
|
1004
1018
|
if (s) {
|
|
@@ -1006,87 +1020,87 @@ function Qn(e, t, n) {
|
|
|
1006
1020
|
}
|
|
1007
1021
|
return;
|
|
1008
1022
|
}
|
|
1009
|
-
for (s = t ?
|
|
1023
|
+
for (s = t ? er : $n, i = 0; i < a; ++i) this.each(s(r[i], t, n));
|
|
1010
1024
|
return this;
|
|
1011
1025
|
}
|
|
1012
|
-
function
|
|
1013
|
-
var r =
|
|
1026
|
+
function nr(e, t, n) {
|
|
1027
|
+
var r = fn(e), i = r.CustomEvent;
|
|
1014
1028
|
typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
|
|
1015
1029
|
}
|
|
1016
|
-
function
|
|
1030
|
+
function rr(e, t) {
|
|
1017
1031
|
return function() {
|
|
1018
|
-
return
|
|
1032
|
+
return nr(this, e, t);
|
|
1019
1033
|
};
|
|
1020
1034
|
}
|
|
1021
|
-
function
|
|
1035
|
+
function ir(e, t) {
|
|
1022
1036
|
return function() {
|
|
1023
|
-
return
|
|
1037
|
+
return nr(this, e, t.apply(this, arguments));
|
|
1024
1038
|
};
|
|
1025
1039
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return this.each((typeof t == "function" ?
|
|
1040
|
+
function ar(e, t) {
|
|
1041
|
+
return this.each((typeof t == "function" ? ir : rr)(e, t));
|
|
1028
1042
|
}
|
|
1029
|
-
function*
|
|
1043
|
+
function* or() {
|
|
1030
1044
|
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);
|
|
1031
1045
|
}
|
|
1032
|
-
var
|
|
1046
|
+
var sr = [null];
|
|
1033
1047
|
function j(e, t) {
|
|
1034
1048
|
this._groups = e, this._parents = t;
|
|
1035
1049
|
}
|
|
1036
1050
|
function M() {
|
|
1037
|
-
return new j([[document.documentElement]],
|
|
1051
|
+
return new j([[document.documentElement]], sr);
|
|
1038
1052
|
}
|
|
1039
|
-
function
|
|
1053
|
+
function cr() {
|
|
1040
1054
|
return this;
|
|
1041
1055
|
}
|
|
1042
1056
|
j.prototype = M.prototype = {
|
|
1043
1057
|
constructor: j,
|
|
1044
|
-
select:
|
|
1045
|
-
selectAll:
|
|
1046
|
-
selectChild:
|
|
1047
|
-
selectChildren:
|
|
1048
|
-
filter:
|
|
1049
|
-
data:
|
|
1050
|
-
enter:
|
|
1051
|
-
exit:
|
|
1052
|
-
join:
|
|
1053
|
-
merge:
|
|
1054
|
-
selection:
|
|
1055
|
-
order:
|
|
1056
|
-
sort:
|
|
1057
|
-
call:
|
|
1058
|
-
nodes:
|
|
1059
|
-
node:
|
|
1060
|
-
size:
|
|
1061
|
-
empty:
|
|
1062
|
-
each:
|
|
1063
|
-
attr:
|
|
1064
|
-
style:
|
|
1065
|
-
property:
|
|
1066
|
-
classed:
|
|
1067
|
-
text:
|
|
1068
|
-
html:
|
|
1069
|
-
raise:
|
|
1070
|
-
lower:
|
|
1071
|
-
append:
|
|
1072
|
-
insert:
|
|
1073
|
-
remove:
|
|
1074
|
-
clone:
|
|
1075
|
-
datum:
|
|
1076
|
-
on:
|
|
1077
|
-
dispatch:
|
|
1078
|
-
[Symbol.iterator]:
|
|
1058
|
+
select: bt,
|
|
1059
|
+
selectAll: Tt,
|
|
1060
|
+
selectChild: jt,
|
|
1061
|
+
selectChildren: Ft,
|
|
1062
|
+
filter: It,
|
|
1063
|
+
data: Wt,
|
|
1064
|
+
enter: Rt,
|
|
1065
|
+
exit: Kt,
|
|
1066
|
+
join: qt,
|
|
1067
|
+
merge: Jt,
|
|
1068
|
+
selection: cr,
|
|
1069
|
+
order: Yt,
|
|
1070
|
+
sort: Xt,
|
|
1071
|
+
call: Qt,
|
|
1072
|
+
nodes: $t,
|
|
1073
|
+
node: en,
|
|
1074
|
+
size: tn,
|
|
1075
|
+
empty: nn,
|
|
1076
|
+
each: rn,
|
|
1077
|
+
attr: dn,
|
|
1078
|
+
style: gn,
|
|
1079
|
+
property: bn,
|
|
1080
|
+
classed: kn,
|
|
1081
|
+
text: Nn,
|
|
1082
|
+
html: Ln,
|
|
1083
|
+
raise: zn,
|
|
1084
|
+
lower: Vn,
|
|
1085
|
+
append: Hn,
|
|
1086
|
+
insert: Wn,
|
|
1087
|
+
remove: Kn,
|
|
1088
|
+
clone: Yn,
|
|
1089
|
+
datum: Xn,
|
|
1090
|
+
on: tr,
|
|
1091
|
+
dispatch: ar,
|
|
1092
|
+
[Symbol.iterator]: or
|
|
1079
1093
|
};
|
|
1080
1094
|
function N(e) {
|
|
1081
|
-
return typeof e == "string" ? new j([[document.querySelector(e)]], [document.documentElement]) : new j([[e]],
|
|
1095
|
+
return typeof e == "string" ? new j([[document.querySelector(e)]], [document.documentElement]) : new j([[e]], sr);
|
|
1082
1096
|
}
|
|
1083
|
-
function
|
|
1097
|
+
function lr(e) {
|
|
1084
1098
|
let t;
|
|
1085
1099
|
for (; t = e.sourceEvent;) e = t;
|
|
1086
1100
|
return e;
|
|
1087
1101
|
}
|
|
1088
1102
|
function P(e, t) {
|
|
1089
|
-
if (e =
|
|
1103
|
+
if (e = lr(e), t === void 0 && (t = e.currentTarget), t) {
|
|
1090
1104
|
var n = t.ownerSVGElement || t;
|
|
1091
1105
|
if (n.createSVGPoint) {
|
|
1092
1106
|
var r = n.createSVGPoint();
|
|
@@ -1099,62 +1113,62 @@ function P(e, t) {
|
|
|
1099
1113
|
}
|
|
1100
1114
|
return [e.pageX, e.pageY];
|
|
1101
1115
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return typeof e == "string" ? new j([document.querySelectorAll(e)], [document.documentElement]) : new j([
|
|
1116
|
+
function ur(e) {
|
|
1117
|
+
return typeof e == "string" ? new j([document.querySelectorAll(e)], [document.documentElement]) : new j([xt(e)], sr);
|
|
1104
1118
|
}
|
|
1105
|
-
var
|
|
1106
|
-
let n = new
|
|
1107
|
-
return (new
|
|
1108
|
-
},
|
|
1119
|
+
var dr = /* @__PURE__ */ e(xe()), F = r[d.KPIChange], I = F.slots, fr = "#577f56", pr = "#9e4d53", L = (e) => typeof e == "number" && Number.isFinite(e), mr = (e, t) => {
|
|
1120
|
+
let n = new dr.default(e);
|
|
1121
|
+
return (new dr.default(t).isLight() ? n.lighten(.5).alpha(.5) : n.darken(.5).alpha(.5)).rgb().string();
|
|
1122
|
+
}, hr = (e, t) => {
|
|
1109
1123
|
if (!e.enabled) return "";
|
|
1110
1124
|
let n = L(e.value) ? e.value : null, r = n === null ? "" : n < 0 ? "negative" : "positive", i = "", a = "";
|
|
1111
1125
|
if (e.indicator === "inverse") r = r === "negative" ? "positive" : "negative";
|
|
1112
1126
|
else if (e.indicator === "none") r = "";
|
|
1113
1127
|
else if (e.indicator === "custom") {
|
|
1114
1128
|
r = "";
|
|
1115
|
-
let n = e.customIndicator?.color ?
|
|
1116
|
-
i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${
|
|
1129
|
+
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">${g.sanitize(e.customIndicator.icon)}</span>`);
|
|
1117
1131
|
}
|
|
1118
|
-
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${
|
|
1119
|
-
},
|
|
1132
|
+
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${g.sanitize(e.label ?? "-")}</span>${a}</div>`;
|
|
1133
|
+
}, gr = (e, t) => {
|
|
1120
1134
|
if (!e.enabled) return "";
|
|
1121
1135
|
let n = e.indicator, r = L(e.value) ? e.value : null, i = r === null ? "neutral" : r < 0 ? "negative" : "positive", a = "", o = r === null ? "" : r < 0 ? "arrow_downward" : "arrow_upward";
|
|
1122
1136
|
if (n === "inverse") i = i === "negative" ? "positive" : "negative";
|
|
1123
1137
|
else if (n === "none") i = "", o = void 0;
|
|
1124
1138
|
else if (n === "custom") {
|
|
1125
1139
|
i = "";
|
|
1126
|
-
let n = e.customIndicator?.color ?
|
|
1140
|
+
let n = e.customIndicator?.color ? mr(e.customIndicator.color, t) : "inherit";
|
|
1127
1141
|
a = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, o = e.customIndicator?.icon;
|
|
1128
1142
|
}
|
|
1129
|
-
let s = o ? `<span class="pill-icon">${
|
|
1130
|
-
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${
|
|
1131
|
-
},
|
|
1143
|
+
let s = o ? `<span class="pill-icon">${g.sanitize(o)}</span>` : "";
|
|
1144
|
+
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${g.sanitize(e.label ?? "-")}</span>${s}</div>`;
|
|
1145
|
+
}, _r = (e, t) => {
|
|
1132
1146
|
let n = e.value ?? {
|
|
1133
1147
|
label: "-",
|
|
1134
1148
|
value: null,
|
|
1135
1149
|
enabled: !1
|
|
1136
1150
|
}, r = "", i = "";
|
|
1137
|
-
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${
|
|
1138
|
-
},
|
|
1139
|
-
let n = e.data.diff ??
|
|
1140
|
-
return e.data._upToTheRootHighlighted &&
|
|
1141
|
-
<div class="node-content layout-a ${
|
|
1142
|
-
<div class="label">${
|
|
1151
|
+
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${g.sanitize(e.customIndicator.icon)}</span>`)), `<div class="value ${t ? "value-space" : ""}" style="${r}"><span class="value-label">${g.sanitize(n.label)}</span>${i}</div>`;
|
|
1152
|
+
}, vr = (e, t) => {
|
|
1153
|
+
let n = e.data.diff ?? a.diff.defaults, r = e.data.change ?? a.change.defaults, i = t.config.nodeDefaultBackground ?? "#ffffff", o = _r(e.data, !r.enabled), s = hr(n, i), c = gr(r, i), l = [];
|
|
1154
|
+
return e.data._upToTheRootHighlighted && l.push("node-highlight"), `
|
|
1155
|
+
<div class="node-content layout-a ${l.join(" ")}">
|
|
1156
|
+
<div class="label">${g.sanitize(e.data.label)}</div>
|
|
1143
1157
|
<div class="flex-row">
|
|
1144
|
-
${
|
|
1145
|
-
${
|
|
1158
|
+
${o}
|
|
1159
|
+
${c}
|
|
1146
1160
|
</div>
|
|
1147
|
-
${
|
|
1161
|
+
${s}
|
|
1148
1162
|
|
|
1149
1163
|
</div>
|
|
1150
1164
|
`;
|
|
1151
|
-
},
|
|
1165
|
+
}, yr = ({ node: e, config: t }) => e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
|
|
1152
1166
|
left: (e) => e ? "◀" : "▶",
|
|
1153
1167
|
bottom: (e) => e ? "▼" : "▲",
|
|
1154
1168
|
right: (e) => e ? "▶" : "◀",
|
|
1155
1169
|
top: (e) => e ? "▲" : "▼"
|
|
1156
1170
|
}[t.layout](e.children)} </div>`;
|
|
1157
|
-
function
|
|
1171
|
+
function br(e) {
|
|
1158
1172
|
if (e.data._upToTheRootHighlighted) {
|
|
1159
1173
|
N(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
1160
1174
|
return;
|
|
@@ -1163,26 +1177,30 @@ function _r(e) {
|
|
|
1163
1177
|
N(this).style("stroke-width", null).style("stroke", null);
|
|
1164
1178
|
return;
|
|
1165
1179
|
}
|
|
1166
|
-
let t = (L(e.data.diff?.value) ? e.data.diff.value : null) ?? (L(
|
|
1167
|
-
|
|
1168
|
-
let
|
|
1169
|
-
N(this).style("stroke",
|
|
1180
|
+
let t = (L(e.data.diff?.value) ? e.data.diff.value : null) ?? (L(a.diff.defaults.value) ? a.diff.defaults.value : 0), n = e.parent?.children?.flatMap((t) => t.id === e.id || !t.data.diff?.enabled || !L(t.data.diff?.value) ? [] : [Math.abs(t.data.diff.value)]) ?? [], r = n.length ? Math.max(...n) : 0, i = Math.abs(t) > r, o = t < 0, s = o ? pr : fr, c = e.data.diff?.indicator;
|
|
1181
|
+
c === "inverse" ? s = o ? fr : pr : c === "none" ? s = "var(--link-color)" : c === "custom" && (s = e.data.diff?.customIndicator?.color ?? "var(--link-color)");
|
|
1182
|
+
let l = i ? 2 : 1;
|
|
1183
|
+
N(this).style("stroke", s).style("stroke-width", l);
|
|
1170
1184
|
}
|
|
1171
|
-
var
|
|
1185
|
+
var xr = (e, t) => {
|
|
1172
1186
|
let n = {
|
|
1173
1187
|
...F.labelStyle,
|
|
1174
|
-
...t.treeChartSettings.nodeLayout?.labelStyle
|
|
1188
|
+
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1189
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? F.labelStyle?.fontSize
|
|
1175
1190
|
}, r = {
|
|
1176
1191
|
...F.valueStyle,
|
|
1177
|
-
...t.treeChartSettings.nodeLayout?.valueStyle
|
|
1192
|
+
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1193
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? F.valueStyle?.fontSize
|
|
1178
1194
|
}, i = {
|
|
1179
|
-
...I.change
|
|
1180
|
-
...I.change
|
|
1181
|
-
...t.treeChartSettings.nodeLayout?.slots?.change
|
|
1195
|
+
...I.change?.styling,
|
|
1196
|
+
...I.change?.styling?.fontStyle,
|
|
1197
|
+
...t.treeChartSettings.nodeLayout?.slots?.change,
|
|
1198
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.change?.fontSize ?? I.change?.styling?.fontSize
|
|
1182
1199
|
}, a = {
|
|
1183
|
-
...I.diff
|
|
1184
|
-
...I.diff
|
|
1185
|
-
...t.treeChartSettings.nodeLayout?.slots?.diff
|
|
1200
|
+
...I.diff?.styling,
|
|
1201
|
+
...I.diff?.styling?.fontStyle,
|
|
1202
|
+
...t.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1203
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? I.diff?.styling?.fontSize
|
|
1186
1204
|
};
|
|
1187
1205
|
return `
|
|
1188
1206
|
#${e} {
|
|
@@ -1310,63 +1328,68 @@ var vr = (e, t) => {
|
|
|
1310
1328
|
}
|
|
1311
1329
|
|
|
1312
1330
|
.positive {
|
|
1313
|
-
color: ${
|
|
1331
|
+
color: ${fr};
|
|
1314
1332
|
background-color: #e4fae8;
|
|
1315
1333
|
}
|
|
1316
1334
|
|
|
1317
1335
|
.negative {
|
|
1318
|
-
color: ${
|
|
1336
|
+
color: ${pr};
|
|
1319
1337
|
background-color: #fcecec;
|
|
1320
1338
|
}
|
|
1321
1339
|
}
|
|
1322
1340
|
}`;
|
|
1323
|
-
},
|
|
1341
|
+
}, Sr = {
|
|
1324
1342
|
name: "KPI Change",
|
|
1325
1343
|
...F,
|
|
1326
|
-
getNodeContent:
|
|
1327
|
-
getButtonContent:
|
|
1328
|
-
linkUpdate:
|
|
1329
|
-
getCSS:
|
|
1344
|
+
getNodeContent: vr,
|
|
1345
|
+
getButtonContent: yr,
|
|
1346
|
+
linkUpdate: br,
|
|
1347
|
+
getCSS: xr,
|
|
1330
1348
|
width: 180,
|
|
1331
1349
|
sizes: (e) => {
|
|
1332
1350
|
let t = {
|
|
1333
|
-
...I.diff
|
|
1334
|
-
...I.diff
|
|
1335
|
-
...e.treeChartSettings.nodeLayout?.slots?.diff
|
|
1351
|
+
...I.diff?.styling,
|
|
1352
|
+
...I.diff?.styling?.fontStyle,
|
|
1353
|
+
...e.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1354
|
+
fontSize: e.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? I.diff?.styling?.fontSize
|
|
1336
1355
|
}, n = {
|
|
1337
1356
|
...F.labelStyle,
|
|
1338
|
-
...e.treeChartSettings.nodeLayout?.labelStyle
|
|
1357
|
+
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1358
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? F.labelStyle?.fontSize
|
|
1339
1359
|
}, r = {
|
|
1340
1360
|
...F.valueStyle,
|
|
1341
|
-
...e.treeChartSettings.nodeLayout?.valueStyle
|
|
1361
|
+
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1362
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? F.valueStyle?.fontSize
|
|
1342
1363
|
};
|
|
1343
1364
|
return {
|
|
1344
|
-
label: Math.ceil(
|
|
1345
|
-
value: Math.ceil(
|
|
1346
|
-
diff: Math.ceil(
|
|
1365
|
+
label: Math.ceil(T(n.fontSize)) + 8,
|
|
1366
|
+
value: Math.ceil(T(r.fontSize)) + 8,
|
|
1367
|
+
diff: Math.ceil(T(t.fontSize)) + 16
|
|
1347
1368
|
};
|
|
1348
1369
|
},
|
|
1349
1370
|
height: (e, t) => {
|
|
1350
1371
|
let n = 20;
|
|
1351
|
-
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ??
|
|
1372
|
+
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ?? a.diff.defaults)?.enabled && (n += t?.diff ?? 0), n;
|
|
1352
1373
|
}
|
|
1353
|
-
}, R = d
|
|
1374
|
+
}, R = r[d.Basic], Cr = (e) => {
|
|
1354
1375
|
if (e.id === "__root__") return null;
|
|
1355
1376
|
let t = "", n = "";
|
|
1356
|
-
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${
|
|
1357
|
-
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${
|
|
1377
|
+
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${g.sanitize(e.data.customIndicator.icon)}</span>`));
|
|
1378
|
+
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${g.sanitize(e.data.value.label)}</span>${n}</div>` : "", i = [];
|
|
1358
1379
|
return e.data._upToTheRootHighlighted && i.push("node-highlight"), `
|
|
1359
1380
|
<div class="node-content layout-b ${i.join(" ")}">
|
|
1360
|
-
<div class="label">${
|
|
1381
|
+
<div class="label">${g.sanitize(e.data.label)}</div>
|
|
1361
1382
|
${r}
|
|
1362
1383
|
</div>`;
|
|
1363
|
-
},
|
|
1384
|
+
}, wr = (e, t) => {
|
|
1364
1385
|
let n = {
|
|
1365
1386
|
...R.labelStyle,
|
|
1366
|
-
...t.treeChartSettings.nodeLayout?.labelStyle
|
|
1387
|
+
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1388
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? R.labelStyle?.fontSize
|
|
1367
1389
|
}, r = {
|
|
1368
1390
|
...R.valueStyle,
|
|
1369
|
-
...t.treeChartSettings.nodeLayout?.valueStyle
|
|
1391
|
+
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1392
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? R.valueStyle?.fontSize
|
|
1370
1393
|
};
|
|
1371
1394
|
return `
|
|
1372
1395
|
#${e} {
|
|
@@ -1410,54 +1433,56 @@ var vr = (e, t) => {
|
|
|
1410
1433
|
}
|
|
1411
1434
|
}
|
|
1412
1435
|
}`;
|
|
1413
|
-
},
|
|
1436
|
+
}, Tr = {
|
|
1414
1437
|
name: "Basic",
|
|
1415
1438
|
...R,
|
|
1416
|
-
getNodeContent:
|
|
1417
|
-
getCSS:
|
|
1439
|
+
getNodeContent: Cr,
|
|
1440
|
+
getCSS: wr,
|
|
1418
1441
|
width: 140,
|
|
1419
1442
|
sizes: (e) => {
|
|
1420
1443
|
let t = {
|
|
1421
1444
|
...R.labelStyle,
|
|
1422
|
-
...e.treeChartSettings.nodeLayout?.labelStyle
|
|
1445
|
+
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1446
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? R.labelStyle?.fontSize
|
|
1423
1447
|
}, n = {
|
|
1424
1448
|
...R.valueStyle,
|
|
1425
|
-
...e.treeChartSettings.nodeLayout?.valueStyle
|
|
1449
|
+
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1450
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? R.valueStyle?.fontSize
|
|
1426
1451
|
};
|
|
1427
1452
|
return {
|
|
1428
|
-
label:
|
|
1429
|
-
value:
|
|
1453
|
+
label: T(t.fontSize) + 8,
|
|
1454
|
+
value: T(n.fontSize) + 8
|
|
1430
1455
|
};
|
|
1431
1456
|
},
|
|
1432
1457
|
height: (e, t) => {
|
|
1433
|
-
let n = 8 + t
|
|
1434
|
-
return e.data.value && (n += 8 + t
|
|
1458
|
+
let n = 8 + (t?.label ?? 0);
|
|
1459
|
+
return e.data.value && (n += 8 + (t?.value ?? 0)), n;
|
|
1435
1460
|
}
|
|
1436
|
-
},
|
|
1437
|
-
[
|
|
1438
|
-
[
|
|
1439
|
-
},
|
|
1461
|
+
}, Er = {
|
|
1462
|
+
[d.KPIChange]: Sr,
|
|
1463
|
+
[d.Basic]: Tr
|
|
1464
|
+
}, Dr = { passive: !1 }, z = {
|
|
1440
1465
|
capture: !0,
|
|
1441
1466
|
passive: !1
|
|
1442
1467
|
};
|
|
1443
|
-
function
|
|
1468
|
+
function Or(e) {
|
|
1444
1469
|
e.stopImmediatePropagation();
|
|
1445
1470
|
}
|
|
1446
1471
|
function B(e) {
|
|
1447
1472
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
1448
1473
|
}
|
|
1449
|
-
function
|
|
1474
|
+
function kr(e) {
|
|
1450
1475
|
var t = e.document.documentElement, n = N(e).on("dragstart.drag", B, z);
|
|
1451
1476
|
"onselectstart" in t ? n.on("selectstart.drag", B, z) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
1452
1477
|
}
|
|
1453
|
-
function
|
|
1478
|
+
function Ar(e, t) {
|
|
1454
1479
|
var n = e.document.documentElement, r = N(e).on("dragstart.drag", null);
|
|
1455
1480
|
t && (r.on("click.drag", B, z), setTimeout(function() {
|
|
1456
1481
|
r.on("click.drag", null);
|
|
1457
1482
|
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
1458
1483
|
}
|
|
1459
|
-
var
|
|
1460
|
-
function
|
|
1484
|
+
var V = (e) => () => e;
|
|
1485
|
+
function jr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
|
|
1461
1486
|
Object.defineProperties(this, {
|
|
1462
1487
|
type: {
|
|
1463
1488
|
value: e,
|
|
@@ -1512,34 +1537,34 @@ function kr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a
|
|
|
1512
1537
|
_: { value: u }
|
|
1513
1538
|
});
|
|
1514
1539
|
}
|
|
1515
|
-
|
|
1540
|
+
jr.prototype.on = function() {
|
|
1516
1541
|
var e = this._.on.apply(this._, arguments);
|
|
1517
1542
|
return e === this._ ? this : e;
|
|
1518
|
-
},
|
|
1519
|
-
function
|
|
1543
|
+
}, Ie();
|
|
1544
|
+
function Mr(e) {
|
|
1520
1545
|
return !e.ctrlKey && !e.button;
|
|
1521
1546
|
}
|
|
1522
|
-
function
|
|
1547
|
+
function Nr() {
|
|
1523
1548
|
return this.parentNode;
|
|
1524
1549
|
}
|
|
1525
|
-
function
|
|
1550
|
+
function Pr(e, t) {
|
|
1526
1551
|
return t ?? {
|
|
1527
1552
|
x: e.x,
|
|
1528
1553
|
y: e.y
|
|
1529
1554
|
};
|
|
1530
1555
|
}
|
|
1531
|
-
function
|
|
1556
|
+
function Fr() {
|
|
1532
1557
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1533
1558
|
}
|
|
1534
|
-
function
|
|
1535
|
-
var e =
|
|
1559
|
+
function Ir() {
|
|
1560
|
+
var e = Mr, t = Nr, n = Pr, r = Fr, i = {}, a = Fe("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
|
|
1536
1561
|
function f(e) {
|
|
1537
|
-
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _,
|
|
1562
|
+
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)");
|
|
1538
1563
|
}
|
|
1539
1564
|
function p(n, r) {
|
|
1540
1565
|
if (!(u || !e.call(this, n, r))) {
|
|
1541
1566
|
var i = y(this, t.call(this, n, r), n, r, "mouse");
|
|
1542
|
-
i && (N(n.view).on("mousemove.drag", m, z).on("mouseup.drag", h, z),
|
|
1567
|
+
i && (N(n.view).on("mousemove.drag", m, z).on("mouseup.drag", h, z), kr(n.view), Or(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
|
|
1543
1568
|
}
|
|
1544
1569
|
}
|
|
1545
1570
|
function m(e) {
|
|
@@ -1550,12 +1575,12 @@ function Pr() {
|
|
|
1550
1575
|
i.mouse("drag", e);
|
|
1551
1576
|
}
|
|
1552
1577
|
function h(e) {
|
|
1553
|
-
N(e.view).on("mousemove.drag mouseup.drag", null),
|
|
1578
|
+
N(e.view).on("mousemove.drag mouseup.drag", null), Ar(e.view, l), B(e), i.mouse("end", e);
|
|
1554
1579
|
}
|
|
1555
1580
|
function g(n, r) {
|
|
1556
1581
|
if (e.call(this, n, r)) {
|
|
1557
1582
|
var i = n.changedTouches, a = t.call(this, n, r), o = i.length, s, c;
|
|
1558
|
-
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (
|
|
1583
|
+
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (Or(n), c("start", n, i[s]));
|
|
1559
1584
|
}
|
|
1560
1585
|
}
|
|
1561
1586
|
function _(e) {
|
|
@@ -1566,11 +1591,11 @@ function Pr() {
|
|
|
1566
1591
|
var t = e.changedTouches, n = t.length, r, a;
|
|
1567
1592
|
for (u && clearTimeout(u), u = setTimeout(function() {
|
|
1568
1593
|
u = null;
|
|
1569
|
-
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (
|
|
1594
|
+
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (Or(e), a("end", e, t[r]));
|
|
1570
1595
|
}
|
|
1571
1596
|
function y(e, t, r, s, c, l) {
|
|
1572
1597
|
var u = a.copy(), d = P(l || r, t), p, m, h;
|
|
1573
|
-
if ((h = n.call(e, new
|
|
1598
|
+
if ((h = n.call(e, new jr("beforestart", {
|
|
1574
1599
|
sourceEvent: r,
|
|
1575
1600
|
target: f,
|
|
1576
1601
|
identifier: c,
|
|
@@ -1591,7 +1616,7 @@ function Pr() {
|
|
|
1591
1616
|
d = P(l || a, t), _ = o;
|
|
1592
1617
|
break;
|
|
1593
1618
|
}
|
|
1594
|
-
u.call(r, e, new
|
|
1619
|
+
u.call(r, e, new jr(r, {
|
|
1595
1620
|
sourceEvent: a,
|
|
1596
1621
|
subject: h,
|
|
1597
1622
|
target: f,
|
|
@@ -1606,13 +1631,13 @@ function Pr() {
|
|
|
1606
1631
|
};
|
|
1607
1632
|
}
|
|
1608
1633
|
return f.filter = function(t) {
|
|
1609
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
1634
|
+
return arguments.length ? (e = typeof t == "function" ? t : V(!!t), f) : e;
|
|
1610
1635
|
}, f.container = function(e) {
|
|
1611
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
1636
|
+
return arguments.length ? (t = typeof e == "function" ? e : V(e), f) : t;
|
|
1612
1637
|
}, f.subject = function(e) {
|
|
1613
|
-
return arguments.length ? (n = typeof e == "function" ? e :
|
|
1638
|
+
return arguments.length ? (n = typeof e == "function" ? e : V(e), f) : n;
|
|
1614
1639
|
}, f.touchable = function(e) {
|
|
1615
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
1640
|
+
return arguments.length ? (r = typeof e == "function" ? e : V(!!e), f) : r;
|
|
1616
1641
|
}, f.on = function() {
|
|
1617
1642
|
var e = a.on.apply(a, arguments);
|
|
1618
1643
|
return e === a ? f : e;
|
|
@@ -1620,74 +1645,74 @@ function Pr() {
|
|
|
1620
1645
|
return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
|
|
1621
1646
|
}, f;
|
|
1622
1647
|
}
|
|
1623
|
-
var
|
|
1648
|
+
var H = 0, Lr = 0, Rr = 0, zr = 1e3, Br, U, Vr = 0, W = 0, Hr = 0, G = typeof performance == "object" && performance.now ? performance : Date, Ur = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1624
1649
|
setTimeout(e, 17);
|
|
1625
1650
|
};
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1651
|
+
function Wr() {
|
|
1652
|
+
return W ||= (Ur(Gr), G.now() + Hr);
|
|
1628
1653
|
}
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1654
|
+
function Gr() {
|
|
1655
|
+
W = 0;
|
|
1631
1656
|
}
|
|
1632
|
-
function
|
|
1657
|
+
function Kr() {
|
|
1633
1658
|
this._call = this._time = this._next = null;
|
|
1634
1659
|
}
|
|
1635
|
-
|
|
1636
|
-
constructor:
|
|
1660
|
+
Kr.prototype = qr.prototype = {
|
|
1661
|
+
constructor: Kr,
|
|
1637
1662
|
restart: function(e, t, n) {
|
|
1638
1663
|
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
1639
|
-
n = (n == null ?
|
|
1664
|
+
n = (n == null ? Wr() : +n) + (t == null ? 0 : +t), !this._next && U !== this && (U ? U._next = this : Br = this, U = this), this._call = e, this._time = n, Qr();
|
|
1640
1665
|
},
|
|
1641
1666
|
stop: function() {
|
|
1642
|
-
this._call && (this._call = null, this._time = Infinity,
|
|
1667
|
+
this._call && (this._call = null, this._time = Infinity, Qr());
|
|
1643
1668
|
}
|
|
1644
1669
|
};
|
|
1645
|
-
function
|
|
1646
|
-
var r = new
|
|
1670
|
+
function qr(e, t, n) {
|
|
1671
|
+
var r = new Kr();
|
|
1647
1672
|
return r.restart(e, t, n), r;
|
|
1648
1673
|
}
|
|
1649
|
-
function
|
|
1650
|
-
|
|
1651
|
-
for (var e =
|
|
1652
|
-
--
|
|
1674
|
+
function Jr() {
|
|
1675
|
+
Wr(), ++H;
|
|
1676
|
+
for (var e = Br, t; e;) (t = W - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
1677
|
+
--H;
|
|
1653
1678
|
}
|
|
1654
|
-
function
|
|
1655
|
-
|
|
1679
|
+
function Yr() {
|
|
1680
|
+
W = (Vr = G.now()) + Hr, H = Lr = 0;
|
|
1656
1681
|
try {
|
|
1657
|
-
|
|
1682
|
+
Jr();
|
|
1658
1683
|
} finally {
|
|
1659
|
-
|
|
1684
|
+
H = 0, Zr(), W = 0;
|
|
1660
1685
|
}
|
|
1661
1686
|
}
|
|
1662
|
-
function
|
|
1663
|
-
var e =
|
|
1664
|
-
t >
|
|
1687
|
+
function Xr() {
|
|
1688
|
+
var e = G.now(), t = e - Vr;
|
|
1689
|
+
t > zr && (Hr -= t, Vr = e);
|
|
1665
1690
|
}
|
|
1666
|
-
function
|
|
1667
|
-
for (var e, t =
|
|
1668
|
-
|
|
1691
|
+
function Zr() {
|
|
1692
|
+
for (var e, t = Br, 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 : Br = n);
|
|
1693
|
+
U = e, Qr(r);
|
|
1669
1694
|
}
|
|
1670
|
-
function
|
|
1671
|
-
|
|
1695
|
+
function Qr(e) {
|
|
1696
|
+
H || (Lr &&= clearTimeout(Lr), e - W > 24 ? (e < Infinity && (Lr = setTimeout(Yr, e - G.now() - Hr)), Rr &&= clearInterval(Rr)) : (Rr ||= (Vr = G.now(), setInterval(Xr, zr)), H = 1, Ur(Yr)));
|
|
1672
1697
|
}
|
|
1673
|
-
function
|
|
1674
|
-
var r = new
|
|
1698
|
+
function $r(e, t, n) {
|
|
1699
|
+
var r = new Kr();
|
|
1675
1700
|
return t = t == null ? 0 : +t, r.restart((n) => {
|
|
1676
1701
|
r.stop(), e(n + t);
|
|
1677
1702
|
}, t, n), r;
|
|
1678
1703
|
}
|
|
1679
|
-
|
|
1680
|
-
var
|
|
1681
|
-
function
|
|
1704
|
+
Te(), be(), Ie();
|
|
1705
|
+
var ei = Fe("start", "end", "cancel", "interrupt"), ti = [];
|
|
1706
|
+
function ni(e, t, n, r, i, a) {
|
|
1682
1707
|
var o = e.__transition;
|
|
1683
1708
|
if (!o) e.__transition = {};
|
|
1684
1709
|
else if (n in o) return;
|
|
1685
|
-
|
|
1710
|
+
ii(e, n, {
|
|
1686
1711
|
name: t,
|
|
1687
1712
|
index: r,
|
|
1688
1713
|
group: i,
|
|
1689
|
-
on:
|
|
1690
|
-
tween:
|
|
1714
|
+
on: ei,
|
|
1715
|
+
tween: ti,
|
|
1691
1716
|
time: a.time,
|
|
1692
1717
|
delay: a.delay,
|
|
1693
1718
|
duration: a.duration,
|
|
@@ -1696,24 +1721,24 @@ function ei(e, t, n, r, i, a) {
|
|
|
1696
1721
|
state: 0
|
|
1697
1722
|
});
|
|
1698
1723
|
}
|
|
1699
|
-
function
|
|
1700
|
-
var n =
|
|
1724
|
+
function ri(e, t) {
|
|
1725
|
+
var n = q(e, t);
|
|
1701
1726
|
if (n.state > 0) throw Error("too late; already scheduled");
|
|
1702
1727
|
return n;
|
|
1703
1728
|
}
|
|
1704
|
-
function
|
|
1705
|
-
var n =
|
|
1729
|
+
function K(e, t) {
|
|
1730
|
+
var n = q(e, t);
|
|
1706
1731
|
if (n.state > 3) throw Error("too late; already running");
|
|
1707
1732
|
return n;
|
|
1708
1733
|
}
|
|
1709
|
-
function
|
|
1734
|
+
function q(e, t) {
|
|
1710
1735
|
var n = e.__transition;
|
|
1711
1736
|
if (!n || !(n = n[t])) throw Error("transition not found");
|
|
1712
1737
|
return n;
|
|
1713
1738
|
}
|
|
1714
|
-
function
|
|
1739
|
+
function ii(e, t, n) {
|
|
1715
1740
|
var r = e.__transition, i;
|
|
1716
|
-
r[t] = n, n.timer =
|
|
1741
|
+
r[t] = n, n.timer = qr(a, 0, n.time);
|
|
1717
1742
|
function a(e) {
|
|
1718
1743
|
n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
|
|
1719
1744
|
}
|
|
@@ -1721,10 +1746,10 @@ function ni(e, t, n) {
|
|
|
1721
1746
|
var l, u, d, f;
|
|
1722
1747
|
if (n.state !== 1) return c();
|
|
1723
1748
|
for (l in r) if (f = r[l], f.name === n.name) {
|
|
1724
|
-
if (f.state === 3) return
|
|
1749
|
+
if (f.state === 3) return $r(o);
|
|
1725
1750
|
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]);
|
|
1726
1751
|
}
|
|
1727
|
-
if (
|
|
1752
|
+
if ($r(function() {
|
|
1728
1753
|
n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
|
|
1729
1754
|
}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
|
|
1730
1755
|
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);
|
|
@@ -1740,7 +1765,7 @@ function ni(e, t, n) {
|
|
|
1740
1765
|
delete e.__transition;
|
|
1741
1766
|
}
|
|
1742
1767
|
}
|
|
1743
|
-
function
|
|
1768
|
+
function ai(e, t) {
|
|
1744
1769
|
var n = e.__transition, r, i, a = !0, o;
|
|
1745
1770
|
if (n) {
|
|
1746
1771
|
for (o in t = t == null ? null : t + "", n) {
|
|
@@ -1753,15 +1778,15 @@ function ri(e, t) {
|
|
|
1753
1778
|
a && delete e.__transition;
|
|
1754
1779
|
}
|
|
1755
1780
|
}
|
|
1756
|
-
function
|
|
1781
|
+
function oi(e) {
|
|
1757
1782
|
return this.each(function() {
|
|
1758
|
-
|
|
1783
|
+
ai(this, e);
|
|
1759
1784
|
});
|
|
1760
1785
|
}
|
|
1761
|
-
function
|
|
1786
|
+
function si(e, t) {
|
|
1762
1787
|
var n, r;
|
|
1763
1788
|
return function() {
|
|
1764
|
-
var i =
|
|
1789
|
+
var i = K(this, e), a = i.tween;
|
|
1765
1790
|
if (a !== n) {
|
|
1766
1791
|
r = n = a;
|
|
1767
1792
|
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
|
|
@@ -1772,11 +1797,11 @@ function ai(e, t) {
|
|
|
1772
1797
|
i.tween = r;
|
|
1773
1798
|
};
|
|
1774
1799
|
}
|
|
1775
|
-
function
|
|
1800
|
+
function ci(e, t, n) {
|
|
1776
1801
|
var r, i;
|
|
1777
1802
|
if (typeof n != "function") throw Error();
|
|
1778
1803
|
return function() {
|
|
1779
|
-
var a =
|
|
1804
|
+
var a = K(this, e), o = a.tween;
|
|
1780
1805
|
if (o !== r) {
|
|
1781
1806
|
i = (r = o).slice();
|
|
1782
1807
|
for (var s = {
|
|
@@ -1791,388 +1816,388 @@ function oi(e, t, n) {
|
|
|
1791
1816
|
a.tween = i;
|
|
1792
1817
|
};
|
|
1793
1818
|
}
|
|
1794
|
-
function
|
|
1819
|
+
function li(e, t) {
|
|
1795
1820
|
var n = this._id;
|
|
1796
1821
|
if (e += "", arguments.length < 2) {
|
|
1797
|
-
for (var r =
|
|
1822
|
+
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;
|
|
1798
1823
|
return null;
|
|
1799
1824
|
}
|
|
1800
|
-
return this.each((t == null ?
|
|
1825
|
+
return this.each((t == null ? si : ci)(n, e, t));
|
|
1801
1826
|
}
|
|
1802
|
-
function
|
|
1827
|
+
function ui(e, t, n) {
|
|
1803
1828
|
var r = e._id;
|
|
1804
1829
|
return e.each(function() {
|
|
1805
|
-
var e =
|
|
1830
|
+
var e = K(this, r);
|
|
1806
1831
|
(e.value ||= {})[t] = n.apply(this, arguments);
|
|
1807
1832
|
}), function(e) {
|
|
1808
|
-
return
|
|
1833
|
+
return q(e, r).value[t];
|
|
1809
1834
|
};
|
|
1810
1835
|
}
|
|
1811
|
-
function
|
|
1836
|
+
function di(e, t) {
|
|
1812
1837
|
var n;
|
|
1813
|
-
return (typeof t == "number" ?
|
|
1838
|
+
return (typeof t == "number" ? se : t instanceof we ? _e : (n = we(t)) ? (t = n, _e) : de)(e, t);
|
|
1814
1839
|
}
|
|
1815
|
-
|
|
1816
|
-
function
|
|
1840
|
+
be();
|
|
1841
|
+
function fi(e) {
|
|
1817
1842
|
return function() {
|
|
1818
1843
|
this.removeAttribute(e);
|
|
1819
1844
|
};
|
|
1820
1845
|
}
|
|
1821
|
-
function
|
|
1846
|
+
function pi(e) {
|
|
1822
1847
|
return function() {
|
|
1823
1848
|
this.removeAttributeNS(e.space, e.local);
|
|
1824
1849
|
};
|
|
1825
1850
|
}
|
|
1826
|
-
function
|
|
1851
|
+
function mi(e, t, n) {
|
|
1827
1852
|
var r, i = n + "", a;
|
|
1828
1853
|
return function() {
|
|
1829
1854
|
var o = this.getAttribute(e);
|
|
1830
1855
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1831
1856
|
};
|
|
1832
1857
|
}
|
|
1833
|
-
function
|
|
1858
|
+
function hi(e, t, n) {
|
|
1834
1859
|
var r, i = n + "", a;
|
|
1835
1860
|
return function() {
|
|
1836
1861
|
var o = this.getAttributeNS(e.space, e.local);
|
|
1837
1862
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1838
1863
|
};
|
|
1839
1864
|
}
|
|
1840
|
-
function
|
|
1865
|
+
function gi(e, t, n) {
|
|
1841
1866
|
var r, i, a;
|
|
1842
1867
|
return function() {
|
|
1843
1868
|
var o, s = n(this), c;
|
|
1844
1869
|
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)));
|
|
1845
1870
|
};
|
|
1846
1871
|
}
|
|
1847
|
-
function
|
|
1872
|
+
function _i(e, t, n) {
|
|
1848
1873
|
var r, i, a;
|
|
1849
1874
|
return function() {
|
|
1850
1875
|
var o, s = n(this), c;
|
|
1851
1876
|
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)));
|
|
1852
1877
|
};
|
|
1853
1878
|
}
|
|
1854
|
-
function
|
|
1855
|
-
var n =
|
|
1856
|
-
return this.attrTween(e, typeof t == "function" ? (n.local ?
|
|
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));
|
|
1857
1882
|
}
|
|
1858
|
-
function
|
|
1883
|
+
function yi(e, t) {
|
|
1859
1884
|
return function(n) {
|
|
1860
1885
|
this.setAttribute(e, t.call(this, n));
|
|
1861
1886
|
};
|
|
1862
1887
|
}
|
|
1863
|
-
function
|
|
1888
|
+
function bi(e, t) {
|
|
1864
1889
|
return function(n) {
|
|
1865
1890
|
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
1866
1891
|
};
|
|
1867
1892
|
}
|
|
1868
|
-
function
|
|
1893
|
+
function xi(e, t) {
|
|
1869
1894
|
var n, r;
|
|
1870
1895
|
function i() {
|
|
1871
1896
|
var i = t.apply(this, arguments);
|
|
1872
|
-
return i !== r && (n = (r = i) &&
|
|
1897
|
+
return i !== r && (n = (r = i) && bi(e, i)), n;
|
|
1873
1898
|
}
|
|
1874
1899
|
return i._value = t, i;
|
|
1875
1900
|
}
|
|
1876
|
-
function
|
|
1901
|
+
function Si(e, t) {
|
|
1877
1902
|
var n, r;
|
|
1878
1903
|
function i() {
|
|
1879
1904
|
var i = t.apply(this, arguments);
|
|
1880
|
-
return i !== r && (n = (r = i) &&
|
|
1905
|
+
return i !== r && (n = (r = i) && yi(e, i)), n;
|
|
1881
1906
|
}
|
|
1882
1907
|
return i._value = t, i;
|
|
1883
1908
|
}
|
|
1884
|
-
function
|
|
1909
|
+
function Ci(e, t) {
|
|
1885
1910
|
var n = "attr." + e;
|
|
1886
1911
|
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
1887
1912
|
if (t == null) return this.tween(n, null);
|
|
1888
1913
|
if (typeof t != "function") throw Error();
|
|
1889
|
-
var r =
|
|
1890
|
-
return this.tween(n, (r.local ?
|
|
1914
|
+
var r = mt(e);
|
|
1915
|
+
return this.tween(n, (r.local ? xi : Si)(r, t));
|
|
1891
1916
|
}
|
|
1892
|
-
function
|
|
1917
|
+
function wi(e, t) {
|
|
1893
1918
|
return function() {
|
|
1894
|
-
|
|
1919
|
+
ri(this, e).delay = +t.apply(this, arguments);
|
|
1895
1920
|
};
|
|
1896
1921
|
}
|
|
1897
|
-
function
|
|
1922
|
+
function Ti(e, t) {
|
|
1898
1923
|
return t = +t, function() {
|
|
1899
|
-
|
|
1924
|
+
ri(this, e).delay = t;
|
|
1900
1925
|
};
|
|
1901
1926
|
}
|
|
1902
|
-
function
|
|
1927
|
+
function Ei(e) {
|
|
1903
1928
|
var t = this._id;
|
|
1904
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1929
|
+
return arguments.length ? this.each((typeof e == "function" ? wi : Ti)(t, e)) : q(this.node(), t).delay;
|
|
1905
1930
|
}
|
|
1906
|
-
function
|
|
1931
|
+
function Di(e, t) {
|
|
1907
1932
|
return function() {
|
|
1908
|
-
|
|
1933
|
+
K(this, e).duration = +t.apply(this, arguments);
|
|
1909
1934
|
};
|
|
1910
1935
|
}
|
|
1911
|
-
function
|
|
1936
|
+
function Oi(e, t) {
|
|
1912
1937
|
return t = +t, function() {
|
|
1913
|
-
|
|
1938
|
+
K(this, e).duration = t;
|
|
1914
1939
|
};
|
|
1915
1940
|
}
|
|
1916
|
-
function
|
|
1941
|
+
function ki(e) {
|
|
1917
1942
|
var t = this._id;
|
|
1918
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1943
|
+
return arguments.length ? this.each((typeof e == "function" ? Di : Oi)(t, e)) : q(this.node(), t).duration;
|
|
1919
1944
|
}
|
|
1920
|
-
function
|
|
1945
|
+
function Ai(e, t) {
|
|
1921
1946
|
if (typeof t != "function") throw Error();
|
|
1922
1947
|
return function() {
|
|
1923
|
-
|
|
1948
|
+
K(this, e).ease = t;
|
|
1924
1949
|
};
|
|
1925
1950
|
}
|
|
1926
|
-
function
|
|
1951
|
+
function ji(e) {
|
|
1927
1952
|
var t = this._id;
|
|
1928
|
-
return arguments.length ? this.each(
|
|
1953
|
+
return arguments.length ? this.each(Ai(t, e)) : q(this.node(), t).ease;
|
|
1929
1954
|
}
|
|
1930
|
-
function
|
|
1955
|
+
function Mi(e, t) {
|
|
1931
1956
|
return function() {
|
|
1932
1957
|
var n = t.apply(this, arguments);
|
|
1933
1958
|
if (typeof n != "function") throw Error();
|
|
1934
|
-
|
|
1959
|
+
K(this, e).ease = n;
|
|
1935
1960
|
};
|
|
1936
1961
|
}
|
|
1937
|
-
function
|
|
1962
|
+
function Ni(e) {
|
|
1938
1963
|
if (typeof e != "function") throw Error();
|
|
1939
|
-
return this.each(
|
|
1964
|
+
return this.each(Mi(this._id, e));
|
|
1940
1965
|
}
|
|
1941
|
-
function
|
|
1942
|
-
typeof e != "function" && (e =
|
|
1966
|
+
function Pi(e) {
|
|
1967
|
+
typeof e != "function" && (e = Et(e));
|
|
1943
1968
|
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);
|
|
1944
|
-
return new
|
|
1969
|
+
return new J(r, this._parents, this._name, this._id);
|
|
1945
1970
|
}
|
|
1946
|
-
function
|
|
1971
|
+
function Fi(e) {
|
|
1947
1972
|
if (e._id !== this._id) throw Error();
|
|
1948
1973
|
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);
|
|
1949
1974
|
for (; s < r; ++s) o[s] = t[s];
|
|
1950
|
-
return new
|
|
1975
|
+
return new J(o, this._parents, this._name, this._id);
|
|
1951
1976
|
}
|
|
1952
|
-
function
|
|
1977
|
+
function Ii(e) {
|
|
1953
1978
|
return (e + "").trim().split(/^|\s+/).every(function(e) {
|
|
1954
1979
|
var t = e.indexOf(".");
|
|
1955
1980
|
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
|
|
1956
1981
|
});
|
|
1957
1982
|
}
|
|
1958
|
-
function
|
|
1959
|
-
var r, i, a =
|
|
1983
|
+
function Li(e, t, n) {
|
|
1984
|
+
var r, i, a = Ii(t) ? ri : K;
|
|
1960
1985
|
return function() {
|
|
1961
1986
|
var o = a(this, e), s = o.on;
|
|
1962
1987
|
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
|
|
1963
1988
|
};
|
|
1964
1989
|
}
|
|
1965
|
-
function
|
|
1990
|
+
function Ri(e, t) {
|
|
1966
1991
|
var n = this._id;
|
|
1967
|
-
return arguments.length < 2 ?
|
|
1992
|
+
return arguments.length < 2 ? q(this.node(), n).on.on(e) : this.each(Li(n, e, t));
|
|
1968
1993
|
}
|
|
1969
|
-
function
|
|
1994
|
+
function zi(e) {
|
|
1970
1995
|
return function() {
|
|
1971
1996
|
var t = this.parentNode;
|
|
1972
1997
|
for (var n in this.__transition) if (+n !== e) return;
|
|
1973
1998
|
t && t.removeChild(this);
|
|
1974
1999
|
};
|
|
1975
2000
|
}
|
|
1976
|
-
function
|
|
1977
|
-
return this.on("end.remove",
|
|
2001
|
+
function Bi() {
|
|
2002
|
+
return this.on("end.remove", zi(this._id));
|
|
1978
2003
|
}
|
|
1979
|
-
function
|
|
2004
|
+
function Vi(e) {
|
|
1980
2005
|
var t = this._name, n = this._id;
|
|
1981
|
-
typeof e != "function" && (e =
|
|
1982
|
-
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,
|
|
1983
|
-
return new
|
|
2006
|
+
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, ni(l[f], t, n, f, l, q(u, n)));
|
|
2008
|
+
return new J(a, this._parents, t, n);
|
|
1984
2009
|
}
|
|
1985
|
-
function
|
|
2010
|
+
function Hi(e) {
|
|
1986
2011
|
var t = this._name, n = this._id;
|
|
1987
|
-
typeof e != "function" && (e =
|
|
2012
|
+
typeof e != "function" && (e = Ct(e));
|
|
1988
2013
|
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]) {
|
|
1989
|
-
for (var f = e.call(u, u.__data__, d, c), p, m =
|
|
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]) && ni(p, t, n, h, f, m);
|
|
1990
2015
|
a.push(f), o.push(u);
|
|
1991
2016
|
}
|
|
1992
|
-
return new
|
|
2017
|
+
return new J(a, o, t, n);
|
|
1993
2018
|
}
|
|
1994
|
-
var
|
|
1995
|
-
function
|
|
1996
|
-
return new
|
|
2019
|
+
var Ui = M.prototype.constructor;
|
|
2020
|
+
function Wi() {
|
|
2021
|
+
return new Ui(this._groups, this._parents);
|
|
1997
2022
|
}
|
|
1998
|
-
|
|
1999
|
-
function
|
|
2023
|
+
be();
|
|
2024
|
+
function Gi(e, t) {
|
|
2000
2025
|
var n, r, i;
|
|
2001
2026
|
return function() {
|
|
2002
2027
|
var a = A(this, e), o = (this.style.removeProperty(e), A(this, e));
|
|
2003
2028
|
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
|
|
2004
2029
|
};
|
|
2005
2030
|
}
|
|
2006
|
-
function
|
|
2031
|
+
function Ki(e) {
|
|
2007
2032
|
return function() {
|
|
2008
2033
|
this.style.removeProperty(e);
|
|
2009
2034
|
};
|
|
2010
2035
|
}
|
|
2011
|
-
function
|
|
2036
|
+
function qi(e, t, n) {
|
|
2012
2037
|
var r, i = n + "", a;
|
|
2013
2038
|
return function() {
|
|
2014
2039
|
var o = A(this, e);
|
|
2015
2040
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2016
2041
|
};
|
|
2017
2042
|
}
|
|
2018
|
-
function
|
|
2043
|
+
function Ji(e, t, n) {
|
|
2019
2044
|
var r, i, a;
|
|
2020
2045
|
return function() {
|
|
2021
2046
|
var o = A(this, e), s = n(this), c = s + "";
|
|
2022
2047
|
return s ?? (c = s = (this.style.removeProperty(e), A(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
|
|
2023
2048
|
};
|
|
2024
2049
|
}
|
|
2025
|
-
function
|
|
2050
|
+
function Yi(e, t) {
|
|
2026
2051
|
var n, r, i, a = "style." + t, o = "end." + a, s;
|
|
2027
2052
|
return function() {
|
|
2028
|
-
var c =
|
|
2053
|
+
var c = K(this, e), l = c.on, u = c.value[a] == null ? s ||= Ki(t) : void 0;
|
|
2029
2054
|
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
|
|
2030
2055
|
};
|
|
2031
2056
|
}
|
|
2032
|
-
function
|
|
2033
|
-
var r = (e += "") == "transform" ?
|
|
2034
|
-
return t == null ? this.styleTween(e,
|
|
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);
|
|
2035
2060
|
}
|
|
2036
|
-
function
|
|
2061
|
+
function Zi(e, t, n) {
|
|
2037
2062
|
return function(r) {
|
|
2038
2063
|
this.style.setProperty(e, t.call(this, r), n);
|
|
2039
2064
|
};
|
|
2040
2065
|
}
|
|
2041
|
-
function
|
|
2066
|
+
function Qi(e, t, n) {
|
|
2042
2067
|
var r, i;
|
|
2043
2068
|
function a() {
|
|
2044
2069
|
var a = t.apply(this, arguments);
|
|
2045
|
-
return a !== i && (r = (i = a) &&
|
|
2070
|
+
return a !== i && (r = (i = a) && Zi(e, a, n)), r;
|
|
2046
2071
|
}
|
|
2047
2072
|
return a._value = t, a;
|
|
2048
2073
|
}
|
|
2049
|
-
function
|
|
2074
|
+
function $i(e, t, n) {
|
|
2050
2075
|
var r = "style." + (e += "");
|
|
2051
2076
|
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
2052
2077
|
if (t == null) return this.tween(r, null);
|
|
2053
2078
|
if (typeof t != "function") throw Error();
|
|
2054
|
-
return this.tween(r,
|
|
2079
|
+
return this.tween(r, Qi(e, t, n ?? ""));
|
|
2055
2080
|
}
|
|
2056
|
-
function
|
|
2081
|
+
function ea(e) {
|
|
2057
2082
|
return function() {
|
|
2058
2083
|
this.textContent = e;
|
|
2059
2084
|
};
|
|
2060
2085
|
}
|
|
2061
|
-
function
|
|
2086
|
+
function ta(e) {
|
|
2062
2087
|
return function() {
|
|
2063
2088
|
var t = e(this);
|
|
2064
2089
|
this.textContent = t ?? "";
|
|
2065
2090
|
};
|
|
2066
2091
|
}
|
|
2067
|
-
function
|
|
2068
|
-
return this.tween("text", typeof e == "function" ?
|
|
2092
|
+
function na(e) {
|
|
2093
|
+
return this.tween("text", typeof e == "function" ? ta(ui(this, "text", e)) : ea(e == null ? "" : e + ""));
|
|
2069
2094
|
}
|
|
2070
|
-
function
|
|
2095
|
+
function ra(e) {
|
|
2071
2096
|
return function(t) {
|
|
2072
2097
|
this.textContent = e.call(this, t);
|
|
2073
2098
|
};
|
|
2074
2099
|
}
|
|
2075
|
-
function
|
|
2100
|
+
function ia(e) {
|
|
2076
2101
|
var t, n;
|
|
2077
2102
|
function r() {
|
|
2078
2103
|
var r = e.apply(this, arguments);
|
|
2079
|
-
return r !== n && (t = (n = r) &&
|
|
2104
|
+
return r !== n && (t = (n = r) && ra(r)), t;
|
|
2080
2105
|
}
|
|
2081
2106
|
return r._value = e, r;
|
|
2082
2107
|
}
|
|
2083
|
-
function
|
|
2108
|
+
function aa(e) {
|
|
2084
2109
|
var t = "text";
|
|
2085
2110
|
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
|
|
2086
2111
|
if (e == null) return this.tween(t, null);
|
|
2087
2112
|
if (typeof e != "function") throw Error();
|
|
2088
|
-
return this.tween(t,
|
|
2113
|
+
return this.tween(t, ia(e));
|
|
2089
2114
|
}
|
|
2090
|
-
function
|
|
2091
|
-
for (var e = this._name, t = this._id, n =
|
|
2092
|
-
var u =
|
|
2093
|
-
|
|
2115
|
+
function oa() {
|
|
2116
|
+
for (var e = this._name, t = this._id, n = ua(), 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
|
+
var u = q(c, t);
|
|
2118
|
+
ni(c, e, n, l, o, {
|
|
2094
2119
|
time: u.time + u.delay + u.duration,
|
|
2095
2120
|
delay: 0,
|
|
2096
2121
|
duration: u.duration,
|
|
2097
2122
|
ease: u.ease
|
|
2098
2123
|
});
|
|
2099
2124
|
}
|
|
2100
|
-
return new
|
|
2125
|
+
return new J(r, this._parents, e, n);
|
|
2101
2126
|
}
|
|
2102
|
-
function
|
|
2127
|
+
function sa() {
|
|
2103
2128
|
var e, t, n = this, r = n._id, i = n.size();
|
|
2104
2129
|
return new Promise(function(a, o) {
|
|
2105
2130
|
var s = { value: o }, c = { value: function() {
|
|
2106
2131
|
--i === 0 && a();
|
|
2107
2132
|
} };
|
|
2108
2133
|
n.each(function() {
|
|
2109
|
-
var n =
|
|
2134
|
+
var n = K(this, r), i = n.on;
|
|
2110
2135
|
i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
|
|
2111
2136
|
}), i === 0 && a();
|
|
2112
2137
|
});
|
|
2113
2138
|
}
|
|
2114
|
-
var
|
|
2115
|
-
function
|
|
2139
|
+
var ca = 0;
|
|
2140
|
+
function J(e, t, n, r) {
|
|
2116
2141
|
this._groups = e, this._parents = t, this._name = n, this._id = r;
|
|
2117
2142
|
}
|
|
2118
|
-
function
|
|
2143
|
+
function la(e) {
|
|
2119
2144
|
return M().transition(e);
|
|
2120
2145
|
}
|
|
2121
|
-
function
|
|
2122
|
-
return ++
|
|
2123
|
-
}
|
|
2124
|
-
var
|
|
2125
|
-
|
|
2126
|
-
constructor:
|
|
2127
|
-
select:
|
|
2128
|
-
selectAll:
|
|
2129
|
-
selectChild:
|
|
2130
|
-
selectChildren:
|
|
2131
|
-
filter:
|
|
2132
|
-
merge:
|
|
2133
|
-
selection:
|
|
2134
|
-
transition:
|
|
2135
|
-
call:
|
|
2136
|
-
nodes:
|
|
2137
|
-
node:
|
|
2138
|
-
size:
|
|
2139
|
-
empty:
|
|
2140
|
-
each:
|
|
2141
|
-
on:
|
|
2142
|
-
attr:
|
|
2143
|
-
attrTween:
|
|
2144
|
-
style:
|
|
2145
|
-
styleTween:
|
|
2146
|
-
text:
|
|
2147
|
-
textTween:
|
|
2148
|
-
remove:
|
|
2149
|
-
tween:
|
|
2150
|
-
delay:
|
|
2151
|
-
duration:
|
|
2152
|
-
ease:
|
|
2153
|
-
easeVarying:
|
|
2154
|
-
end:
|
|
2155
|
-
[Symbol.iterator]:
|
|
2156
|
-
},
|
|
2157
|
-
var
|
|
2146
|
+
function ua() {
|
|
2147
|
+
return ++ca;
|
|
2148
|
+
}
|
|
2149
|
+
var Y = M.prototype;
|
|
2150
|
+
J.prototype = la.prototype = {
|
|
2151
|
+
constructor: J,
|
|
2152
|
+
select: Vi,
|
|
2153
|
+
selectAll: Hi,
|
|
2154
|
+
selectChild: Y.selectChild,
|
|
2155
|
+
selectChildren: Y.selectChildren,
|
|
2156
|
+
filter: Pi,
|
|
2157
|
+
merge: Fi,
|
|
2158
|
+
selection: Wi,
|
|
2159
|
+
transition: oa,
|
|
2160
|
+
call: Y.call,
|
|
2161
|
+
nodes: Y.nodes,
|
|
2162
|
+
node: Y.node,
|
|
2163
|
+
size: Y.size,
|
|
2164
|
+
empty: Y.empty,
|
|
2165
|
+
each: Y.each,
|
|
2166
|
+
on: Ri,
|
|
2167
|
+
attr: vi,
|
|
2168
|
+
attrTween: Ci,
|
|
2169
|
+
style: Xi,
|
|
2170
|
+
styleTween: $i,
|
|
2171
|
+
text: na,
|
|
2172
|
+
textTween: aa,
|
|
2173
|
+
remove: Bi,
|
|
2174
|
+
tween: li,
|
|
2175
|
+
delay: Ei,
|
|
2176
|
+
duration: ki,
|
|
2177
|
+
ease: ji,
|
|
2178
|
+
easeVarying: Ni,
|
|
2179
|
+
end: sa,
|
|
2180
|
+
[Symbol.iterator]: Y[Symbol.iterator]
|
|
2181
|
+
}, ge();
|
|
2182
|
+
var da = {
|
|
2158
2183
|
time: null,
|
|
2159
2184
|
delay: 0,
|
|
2160
2185
|
duration: 250,
|
|
2161
|
-
ease:
|
|
2186
|
+
ease: he
|
|
2162
2187
|
};
|
|
2163
|
-
function
|
|
2188
|
+
function fa(e, t) {
|
|
2164
2189
|
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
|
|
2165
2190
|
return n;
|
|
2166
2191
|
}
|
|
2167
|
-
function
|
|
2192
|
+
function pa(e) {
|
|
2168
2193
|
var t, n;
|
|
2169
|
-
e instanceof
|
|
2170
|
-
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]) &&
|
|
2171
|
-
return new
|
|
2194
|
+
e instanceof J ? (t = e._id, e = e._name) : (t = ua(), (n = da).time = Wr(), e = e == null ? null : e + "");
|
|
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]) && ni(c, e, t, l, o, n || fa(c, t));
|
|
2196
|
+
return new J(r, this._parents, e, t);
|
|
2172
2197
|
}
|
|
2173
|
-
M.prototype.interrupt =
|
|
2174
|
-
var
|
|
2175
|
-
function
|
|
2198
|
+
M.prototype.interrupt = oi, M.prototype.transition = pa;
|
|
2199
|
+
var ma = (e) => () => e;
|
|
2200
|
+
function ha(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
2176
2201
|
Object.defineProperties(this, {
|
|
2177
2202
|
type: {
|
|
2178
2203
|
value: e,
|
|
@@ -2197,16 +2222,16 @@ function pa(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
|
2197
2222
|
_: { value: i }
|
|
2198
2223
|
});
|
|
2199
2224
|
}
|
|
2200
|
-
function
|
|
2225
|
+
function X(e, t, n) {
|
|
2201
2226
|
this.k = e, this.x = t, this.y = n;
|
|
2202
2227
|
}
|
|
2203
|
-
|
|
2204
|
-
constructor:
|
|
2228
|
+
X.prototype = {
|
|
2229
|
+
constructor: X,
|
|
2205
2230
|
scale: function(e) {
|
|
2206
|
-
return e === 1 ? this : new
|
|
2231
|
+
return e === 1 ? this : new X(this.k * e, this.x, this.y);
|
|
2207
2232
|
},
|
|
2208
2233
|
translate: function(e, t) {
|
|
2209
|
-
return e === 0 & t === 0 ? this : new
|
|
2234
|
+
return e === 0 & t === 0 ? this : new X(this.k, this.x + this.k * e, this.y + this.k * t);
|
|
2210
2235
|
},
|
|
2211
2236
|
apply: function(e) {
|
|
2212
2237
|
return [e[0] * this.k + this.x, e[1] * this.k + this.y];
|
|
@@ -2236,47 +2261,47 @@ Y.prototype = {
|
|
|
2236
2261
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2237
2262
|
}
|
|
2238
2263
|
};
|
|
2239
|
-
var
|
|
2240
|
-
|
|
2241
|
-
function
|
|
2242
|
-
for (; !e.__zoom;) if (!(e = e.parentNode)) return
|
|
2264
|
+
var ga = new X(1, 0, 0);
|
|
2265
|
+
_a.prototype = X.prototype;
|
|
2266
|
+
function _a(e) {
|
|
2267
|
+
for (; !e.__zoom;) if (!(e = e.parentNode)) return ga;
|
|
2243
2268
|
return e.__zoom;
|
|
2244
2269
|
}
|
|
2245
|
-
function
|
|
2270
|
+
function va(e) {
|
|
2246
2271
|
e.stopImmediatePropagation();
|
|
2247
2272
|
}
|
|
2248
|
-
function
|
|
2273
|
+
function Z(e) {
|
|
2249
2274
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
2250
2275
|
}
|
|
2251
|
-
|
|
2252
|
-
function
|
|
2276
|
+
Ie(), be();
|
|
2277
|
+
function ya(e) {
|
|
2253
2278
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
2254
2279
|
}
|
|
2255
|
-
function
|
|
2280
|
+
function ba() {
|
|
2256
2281
|
var e = this;
|
|
2257
2282
|
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]];
|
|
2258
2283
|
}
|
|
2259
|
-
function
|
|
2260
|
-
return this.__zoom ||
|
|
2284
|
+
function xa() {
|
|
2285
|
+
return this.__zoom || ga;
|
|
2261
2286
|
}
|
|
2262
|
-
function
|
|
2287
|
+
function Sa(e) {
|
|
2263
2288
|
return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
|
|
2264
2289
|
}
|
|
2265
|
-
function
|
|
2290
|
+
function Ca() {
|
|
2266
2291
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
2267
2292
|
}
|
|
2268
|
-
function
|
|
2293
|
+
function wa(e, t, n) {
|
|
2269
2294
|
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];
|
|
2270
2295
|
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));
|
|
2271
2296
|
}
|
|
2272
|
-
function
|
|
2273
|
-
var e =
|
|
2297
|
+
function Ta() {
|
|
2298
|
+
var e = ya, t = ba, n = wa, r = Sa, i = Ca, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = me, l = Fe("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
|
|
2274
2299
|
function _(e) {
|
|
2275
|
-
e.property("__zoom",
|
|
2300
|
+
e.property("__zoom", xa).on("wheel.zoom", ee, { passive: !1 }).on("mousedown.zoom", te).on("dblclick.zoom", ne).filter(i).on("touchstart.zoom", re).on("touchmove.zoom", w).on("touchend.zoom touchcancel.zoom", ie).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2276
2301
|
}
|
|
2277
2302
|
_.transform = function(e, t, n, r) {
|
|
2278
2303
|
var i = e.selection ? e.selection() : e;
|
|
2279
|
-
i.property("__zoom",
|
|
2304
|
+
i.property("__zoom", xa), e === i ? i.interrupt().each(function() {
|
|
2280
2305
|
S(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
|
|
2281
2306
|
}) : x(e, t, n, r);
|
|
2282
2307
|
}, _.scaleBy = function(e, t, n, r) {
|
|
@@ -2295,15 +2320,15 @@ function Ca() {
|
|
|
2295
2320
|
}, _.translateTo = function(e, r, i, a, s) {
|
|
2296
2321
|
_.transform(e, function() {
|
|
2297
2322
|
var e = t.apply(this, arguments), s = this.__zoom, c = a == null ? b(e) : typeof a == "function" ? a.apply(this, arguments) : a;
|
|
2298
|
-
return n(
|
|
2323
|
+
return n(ga.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);
|
|
2299
2324
|
}, a, s);
|
|
2300
2325
|
};
|
|
2301
2326
|
function v(e, t) {
|
|
2302
|
-
return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new
|
|
2327
|
+
return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new X(t, e.x, e.y);
|
|
2303
2328
|
}
|
|
2304
2329
|
function y(e, t, n) {
|
|
2305
2330
|
var r = t[0] - n[0] * e.k, i = t[1] - n[1] * e.k;
|
|
2306
|
-
return r === e.x && i === e.y ? e : new
|
|
2331
|
+
return r === e.x && i === e.y ? e : new X(e.k, r, i);
|
|
2307
2332
|
}
|
|
2308
2333
|
function b(e) {
|
|
2309
2334
|
return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
|
|
@@ -2319,7 +2344,7 @@ function Ca() {
|
|
|
2319
2344
|
if (e === 1) e = f;
|
|
2320
2345
|
else {
|
|
2321
2346
|
var t = p(e), n = u / t[2];
|
|
2322
|
-
e = new
|
|
2347
|
+
e = new X(n, l[0] - t[0] * n, l[1] - t[1] * n);
|
|
2323
2348
|
}
|
|
2324
2349
|
o.zoom(null, e);
|
|
2325
2350
|
};
|
|
@@ -2346,7 +2371,7 @@ function Ca() {
|
|
|
2346
2371
|
},
|
|
2347
2372
|
emit: function(e) {
|
|
2348
2373
|
var t = N(this.that).datum();
|
|
2349
|
-
l.call(e, this.that, new
|
|
2374
|
+
l.call(e, this.that, new ha(e, {
|
|
2350
2375
|
sourceEvent: this.sourceEvent,
|
|
2351
2376
|
target: _,
|
|
2352
2377
|
type: e,
|
|
@@ -2360,50 +2385,50 @@ function Ca() {
|
|
|
2360
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 = P(t);
|
|
2361
2386
|
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);
|
|
2362
2387
|
else if (c.k === l) return;
|
|
2363
|
-
else s.mouse = [u, c.invert(u)],
|
|
2364
|
-
|
|
2388
|
+
else s.mouse = [u, c.invert(u)], ai(this), s.start();
|
|
2389
|
+
Z(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
|
|
2365
2390
|
function d() {
|
|
2366
2391
|
s.wheel = null, s.end();
|
|
2367
2392
|
}
|
|
2368
2393
|
}
|
|
2369
|
-
function
|
|
2394
|
+
function te(t, ...r) {
|
|
2370
2395
|
if (f || !e.apply(this, arguments)) return;
|
|
2371
2396
|
var i = t.currentTarget, a = S(this, r, !0).event(t), s = N(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", p, !0), c = P(t, i), l = t.clientX, u = t.clientY;
|
|
2372
|
-
|
|
2397
|
+
kr(t.view), va(t), a.mouse = [c, this.__zoom.invert(c)], ai(this), a.start();
|
|
2373
2398
|
function d(e) {
|
|
2374
|
-
if (
|
|
2399
|
+
if (Z(e), !a.moved) {
|
|
2375
2400
|
var t = e.clientX - l, r = e.clientY - u;
|
|
2376
2401
|
a.moved = t * t + r * r > h;
|
|
2377
2402
|
}
|
|
2378
2403
|
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = P(e, i), a.mouse[1]), a.extent, o));
|
|
2379
2404
|
}
|
|
2380
2405
|
function p(e) {
|
|
2381
|
-
s.on("mousemove.zoom mouseup.zoom", null),
|
|
2406
|
+
s.on("mousemove.zoom mouseup.zoom", null), Ar(e.view, a.moved), Z(e), a.event(e).end();
|
|
2382
2407
|
}
|
|
2383
2408
|
}
|
|
2384
|
-
function
|
|
2409
|
+
function ne(r, ...i) {
|
|
2385
2410
|
if (e.apply(this, arguments)) {
|
|
2386
2411
|
var a = this.__zoom, c = P(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);
|
|
2387
|
-
|
|
2412
|
+
Z(r), s > 0 ? N(this).transition().duration(s).call(x, d, c, r) : N(this).call(_.transform, d, c, r);
|
|
2388
2413
|
}
|
|
2389
2414
|
}
|
|
2390
|
-
function
|
|
2415
|
+
function re(t, ...n) {
|
|
2391
2416
|
if (e.apply(this, arguments)) {
|
|
2392
2417
|
var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
|
|
2393
|
-
for (
|
|
2418
|
+
for (va(t), s = 0; s < i; ++s) c = r[s], l = P(c, this), l = [
|
|
2394
2419
|
l,
|
|
2395
2420
|
this.__zoom.invert(l),
|
|
2396
2421
|
c.identifier
|
|
2397
2422
|
], a.touch0 ? !a.touch1 && a.touch0[2] !== l[2] && (a.touch1 = l, a.taps = 0) : (a.touch0 = l, o = !0, a.taps = 1 + !!u);
|
|
2398
2423
|
u &&= clearTimeout(u), o && (a.taps < 2 && (d = l[0], u = setTimeout(function() {
|
|
2399
2424
|
u = null;
|
|
2400
|
-
}, p)),
|
|
2425
|
+
}, p)), ai(this), a.start());
|
|
2401
2426
|
}
|
|
2402
2427
|
}
|
|
2403
|
-
function
|
|
2428
|
+
function w(e, ...t) {
|
|
2404
2429
|
if (this.__zooming) {
|
|
2405
2430
|
var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
|
|
2406
|
-
for (
|
|
2431
|
+
for (Z(e), s = 0; s < a; ++s) c = i[s], l = P(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
|
|
2407
2432
|
if (c = r.that.__zoom, r.touch1) {
|
|
2408
2433
|
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;
|
|
2409
2434
|
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];
|
|
@@ -2412,10 +2437,10 @@ function Ca() {
|
|
|
2412
2437
|
r.zoom("touch", n(y(c, l, u), r.extent, o));
|
|
2413
2438
|
}
|
|
2414
2439
|
}
|
|
2415
|
-
function
|
|
2440
|
+
function ie(e, ...t) {
|
|
2416
2441
|
if (this.__zooming) {
|
|
2417
2442
|
var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
|
|
2418
|
-
for (
|
|
2443
|
+
for (va(e), f && clearTimeout(f), f = setTimeout(function() {
|
|
2419
2444
|
f = null;
|
|
2420
2445
|
}, 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;
|
|
2421
2446
|
if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
|
|
@@ -2426,13 +2451,13 @@ function Ca() {
|
|
|
2426
2451
|
}
|
|
2427
2452
|
}
|
|
2428
2453
|
return _.wheelDelta = function(e) {
|
|
2429
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
2454
|
+
return arguments.length ? (r = typeof e == "function" ? e : ma(+e), _) : r;
|
|
2430
2455
|
}, _.filter = function(t) {
|
|
2431
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
2456
|
+
return arguments.length ? (e = typeof t == "function" ? t : ma(!!t), _) : e;
|
|
2432
2457
|
}, _.touchable = function(e) {
|
|
2433
|
-
return arguments.length ? (i = typeof e == "function" ? e :
|
|
2458
|
+
return arguments.length ? (i = typeof e == "function" ? e : ma(!!e), _) : i;
|
|
2434
2459
|
}, _.extent = function(e) {
|
|
2435
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
2460
|
+
return arguments.length ? (t = typeof e == "function" ? e : ma([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
|
|
2436
2461
|
}, _.scaleExtent = function(e) {
|
|
2437
2462
|
return arguments.length ? (a[0] = +e[0], a[1] = +e[1], _) : [a[0], a[1]];
|
|
2438
2463
|
}, _.translateExtent = function(e) {
|
|
@@ -2452,8 +2477,8 @@ function Ca() {
|
|
|
2452
2477
|
return arguments.length ? (g = +e, _) : g;
|
|
2453
2478
|
}, _;
|
|
2454
2479
|
}
|
|
2455
|
-
|
|
2456
|
-
var
|
|
2480
|
+
ae();
|
|
2481
|
+
var Ea = (e) => ({
|
|
2457
2482
|
left: {
|
|
2458
2483
|
nodeLeftX: () => 0,
|
|
2459
2484
|
nodeRightX: (e) => e.width,
|
|
@@ -2467,10 +2492,10 @@ var wa = (e) => ({
|
|
|
2467
2492
|
linkY: (e) => e.y,
|
|
2468
2493
|
linkCompactXStart: (e) => e.x + e.width / 2,
|
|
2469
2494
|
linkCompactYStart: (e) => e.y + (e.compactEven ? e.height / 2 : -e.height / 2),
|
|
2470
|
-
compactLinkMidX: (e) => e.firstCompactNode.x,
|
|
2471
|
-
compactLinkMidY: (e, t) => e.firstCompactNode.y + e.firstCompactNode
|
|
2472
|
-
linkParentX: (e) => e.parent.x + e.parent
|
|
2473
|
-
linkParentY: (e) => e.parent.y,
|
|
2495
|
+
compactLinkMidX: (e) => e.firstCompactNode?.x ?? e.x,
|
|
2496
|
+
compactLinkMidY: (e, t) => (e.firstCompactNode?.y ?? e.y) + (e.firstCompactNode?.flexCompactDim?.[0] ?? 0) / 4 + t.compactMarginPair(e) / 4,
|
|
2497
|
+
linkParentX: (e) => (e.parent?.x ?? e.x) + (e.parent?.width ?? 0),
|
|
2498
|
+
linkParentY: (e) => e.parent?.y ?? e.y,
|
|
2474
2499
|
buttonX: (e) => e.width,
|
|
2475
2500
|
buttonY: (e) => e.height / 2,
|
|
2476
2501
|
centerTransform: ({ rootMargin: e, centerY: t, scale: n }) => `translate(${e},${t}) scale(${n})`,
|
|
@@ -2499,8 +2524,8 @@ var wa = (e) => ({
|
|
|
2499
2524
|
linkJoinY: (e) => e.y + e.height,
|
|
2500
2525
|
linkCompactXStart: (e) => e.x + (e.compactEven ? e.width / 2 : -e.width / 2),
|
|
2501
2526
|
linkCompactYStart: (e) => e.y + e.height / 2,
|
|
2502
|
-
compactLinkMidX: (e, t) => e.firstCompactNode.x + e.firstCompactNode
|
|
2503
|
-
compactLinkMidY: (e) => e.firstCompactNode.y,
|
|
2527
|
+
compactLinkMidX: (e, t) => (e.firstCompactNode?.x ?? e.x) + (e.firstCompactNode?.flexCompactDim?.[0] ?? 0) / 4 + t.compactMarginPair(e) / 4,
|
|
2528
|
+
compactLinkMidY: (e) => e.firstCompactNode?.y ?? e.y,
|
|
2504
2529
|
compactDimension: {
|
|
2505
2530
|
sizeColumn: (e) => e.width,
|
|
2506
2531
|
sizeRow: (e) => e.height,
|
|
@@ -2508,8 +2533,8 @@ var wa = (e) => ({
|
|
|
2508
2533
|
},
|
|
2509
2534
|
linkX: (e) => e.x,
|
|
2510
2535
|
linkY: (e) => e.y,
|
|
2511
|
-
linkParentX: (e) => e.parent.x,
|
|
2512
|
-
linkParentY: (e) => e.parent.y + e.parent
|
|
2536
|
+
linkParentX: (e) => e.parent?.x ?? e.x,
|
|
2537
|
+
linkParentY: (e) => (e.parent?.y ?? e.y) + (e.parent?.height ?? 0),
|
|
2513
2538
|
buttonX: (e) => e.width / 2,
|
|
2514
2539
|
buttonY: (e) => e.height,
|
|
2515
2540
|
centerTransform: ({ rootMargin: e, scale: t, centerX: n }) => `translate(${n},${e}) scale(${t})`,
|
|
@@ -2530,8 +2555,8 @@ var wa = (e) => ({
|
|
|
2530
2555
|
linkJoinY: (e) => e.y - e.height,
|
|
2531
2556
|
linkCompactXStart: (e) => e.x + (e.compactEven ? e.width / 2 : -e.width / 2),
|
|
2532
2557
|
linkCompactYStart: (e) => e.y - e.height / 2,
|
|
2533
|
-
compactLinkMidX: (e, t) => e.firstCompactNode.x + e.firstCompactNode
|
|
2534
|
-
compactLinkMidY: (e) => e.firstCompactNode.y,
|
|
2558
|
+
compactLinkMidX: (e, t) => (e.firstCompactNode?.x ?? e.x) + (e.firstCompactNode?.flexCompactDim?.[0] ?? 0) / 4 + t.compactMarginPair(e) / 4,
|
|
2559
|
+
compactLinkMidY: (e) => e.firstCompactNode?.y ?? e.y,
|
|
2535
2560
|
linkX: (e) => e.x,
|
|
2536
2561
|
linkY: (e) => e.y,
|
|
2537
2562
|
compactDimension: {
|
|
@@ -2539,8 +2564,8 @@ var wa = (e) => ({
|
|
|
2539
2564
|
sizeRow: (e) => e.height,
|
|
2540
2565
|
reverse: (e) => e
|
|
2541
2566
|
},
|
|
2542
|
-
linkParentX: (e) => e.parent.x,
|
|
2543
|
-
linkParentY: (e) => e.parent.y - e.parent
|
|
2567
|
+
linkParentX: (e) => e.parent?.x ?? e.x,
|
|
2568
|
+
linkParentY: (e) => (e.parent?.y ?? e.y) - (e.parent?.height ?? 0),
|
|
2544
2569
|
buttonX: (e) => e.width / 2,
|
|
2545
2570
|
buttonY: () => 0,
|
|
2546
2571
|
centerTransform: ({ rootMargin: e, scale: t, centerX: n, chartHeight: r }) => `translate(${n},${r - e}) scale(${t})`,
|
|
@@ -2563,14 +2588,14 @@ var wa = (e) => ({
|
|
|
2563
2588
|
linkJoinY: (e) => e.y,
|
|
2564
2589
|
linkX: (e) => e.x,
|
|
2565
2590
|
linkY: (e) => e.y,
|
|
2566
|
-
linkParentX: (e) => e.parent.x - e.parent
|
|
2567
|
-
linkParentY: (e) => e.parent.y,
|
|
2591
|
+
linkParentX: (e) => (e.parent?.x ?? e.x) - (e.parent?.width ?? 0),
|
|
2592
|
+
linkParentY: (e) => e.parent?.y ?? e.y,
|
|
2568
2593
|
buttonX: () => 0,
|
|
2569
2594
|
buttonY: (e) => e.height / 2,
|
|
2570
2595
|
linkCompactXStart: (e) => e.x - e.width / 2,
|
|
2571
2596
|
linkCompactYStart: (e) => e.y + (e.compactEven ? e.height / 2 : -e.height / 2),
|
|
2572
|
-
compactLinkMidX: (e) => e.firstCompactNode.x,
|
|
2573
|
-
compactLinkMidY: (e, t) => e.firstCompactNode.y + e.firstCompactNode
|
|
2597
|
+
compactLinkMidX: (e) => e.firstCompactNode?.x ?? e.x,
|
|
2598
|
+
compactLinkMidY: (e, t) => (e.firstCompactNode?.y ?? e.y) + (e.firstCompactNode?.flexCompactDim?.[0] ?? 0) / 4 + t.compactMarginPair(e) / 4,
|
|
2574
2599
|
centerTransform: ({ rootMargin: e, centerY: t, scale: n, chartWidth: r }) => `translate(${r - e},${t}) scale(${n})`,
|
|
2575
2600
|
nodeFlexSize: ({ height: e, width: t, siblingsMargin: n, childrenMargin: r, config: i, node: a }) => i.compact && a.flexCompactDim ? [a.flexCompactDim[0], a.flexCompactDim[1]] : [e + n, t + r],
|
|
2576
2601
|
compactDimension: {
|
|
@@ -2587,7 +2612,7 @@ var wa = (e) => ({
|
|
|
2587
2612
|
nodeUpdateTransform: ({ x: e, y: t, width: n, height: r }) => `translate(${e - n},${t - r / 2})`
|
|
2588
2613
|
}
|
|
2589
2614
|
});
|
|
2590
|
-
function
|
|
2615
|
+
function Da(e, t, n) {
|
|
2591
2616
|
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;
|
|
2592
2617
|
d = Math.abs(o - i) / 2 < d ? Math.abs(o - i) / 2 : d;
|
|
2593
2618
|
let f = Math.abs(a - r) / 2 - d;
|
|
@@ -2605,7 +2630,7 @@ function Ta(e, t, n) {
|
|
|
2605
2630
|
${a - f * l} ${o}
|
|
2606
2631
|
L ${a} ${o}`;
|
|
2607
2632
|
}
|
|
2608
|
-
function
|
|
2633
|
+
function Oa(e, t, n, r = { sy: 0 }) {
|
|
2609
2634
|
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;
|
|
2610
2635
|
a += r.sy;
|
|
2611
2636
|
let f = Math.abs(o - i) / 2 < 15 ? Math.abs(o - i) / 2 : 15;
|
|
@@ -2621,7 +2646,7 @@ function Ea(e, t, n, r = { sy: 0 }) {
|
|
|
2621
2646
|
C ${o} ${a + p * d + f * d} ${o} ${a + p * d + f * d} ${o} ${s - p * d}
|
|
2622
2647
|
L ${o} ${s}`;
|
|
2623
2648
|
}
|
|
2624
|
-
function
|
|
2649
|
+
function ka({ node: e, config: t }) {
|
|
2625
2650
|
return e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
|
|
2626
2651
|
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">
|
|
2627
2652
|
<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"/>
|
|
@@ -2649,8 +2674,9 @@ function Da({ node: e, config: t }) {
|
|
|
2649
2674
|
`
|
|
2650
2675
|
}[t.layout](e.children)} </div>`;
|
|
2651
2676
|
}
|
|
2652
|
-
function
|
|
2653
|
-
|
|
2677
|
+
function Aa(e, t, n, r) {
|
|
2678
|
+
if (!e.parent) return "";
|
|
2679
|
+
let i = r.pagingStep(e.parent), a = e.parent.data._pagingStep ?? 0, o = (e.parent.data._directSubordinatesPaging ?? 0) - a;
|
|
2654
2680
|
return `
|
|
2655
2681
|
<div style="margin-top:90px;">
|
|
2656
2682
|
<div style="display:flex;width:170px;border-radius:20px;padding:5px 15px; padding-bottom:4px;;background-color:#E5E9F2">
|
|
@@ -2661,7 +2687,7 @@ function Oa(e, t, n, r) {
|
|
|
2661
2687
|
</div>
|
|
2662
2688
|
`;
|
|
2663
2689
|
}
|
|
2664
|
-
var
|
|
2690
|
+
var ja = () => {
|
|
2665
2691
|
let e = {
|
|
2666
2692
|
svgWidth: 800,
|
|
2667
2693
|
svgHeight: window.innerHeight - 100,
|
|
@@ -2695,13 +2721,14 @@ var ka = () => {
|
|
|
2695
2721
|
pagingStep: () => 5,
|
|
2696
2722
|
minPagingVisibleNodes: () => 2e3,
|
|
2697
2723
|
scaleExtent: [.05, 2.5],
|
|
2724
|
+
minFitScale: 0,
|
|
2698
2725
|
duration: 400,
|
|
2699
2726
|
setActiveNodeCentered: !0,
|
|
2700
2727
|
layout: "top",
|
|
2701
2728
|
compact: !0,
|
|
2702
2729
|
gridEnabled: !1,
|
|
2703
2730
|
gridRows: 0,
|
|
2704
|
-
createZoom: () =>
|
|
2731
|
+
createZoom: () => Ta(),
|
|
2705
2732
|
onZoomStart: () => {},
|
|
2706
2733
|
onZoom: () => {},
|
|
2707
2734
|
onZoomEnd: () => {},
|
|
@@ -2715,10 +2742,10 @@ var ka = () => {
|
|
|
2715
2742
|
onNodeParentChange() {},
|
|
2716
2743
|
onExpandOrCollapse: (e) => e,
|
|
2717
2744
|
nodeContent: (e) => e.id === "__root__" ? null : "<div class=\"node-content\"></div>",
|
|
2718
|
-
buttonContent:
|
|
2719
|
-
pagingButton:
|
|
2745
|
+
buttonContent: ka,
|
|
2746
|
+
pagingButton: Aa,
|
|
2720
2747
|
nodeUpdate: function() {
|
|
2721
|
-
N(this).select(".node-rect").attr("stroke",
|
|
2748
|
+
N(this).select(".node-rect").attr("stroke", null).attr("stroke-width", null);
|
|
2722
2749
|
},
|
|
2723
2750
|
nodeEnter: (e) => e,
|
|
2724
2751
|
nodeExit: (e) => e,
|
|
@@ -2727,137 +2754,154 @@ var ka = () => {
|
|
|
2727
2754
|
N(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
2728
2755
|
return;
|
|
2729
2756
|
}
|
|
2730
|
-
N(this).style("stroke",
|
|
2757
|
+
N(this).style("stroke", null).style("stroke-width", null), e.data._upToTheRootHighlighted && N(this).raise();
|
|
2731
2758
|
},
|
|
2732
|
-
hdiagonal:
|
|
2733
|
-
diagonal:
|
|
2734
|
-
linkGroupArc:
|
|
2735
|
-
};
|
|
2736
|
-
return e.layoutBindings =
|
|
2737
|
-
},
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2759
|
+
hdiagonal: Da,
|
|
2760
|
+
diagonal: Oa,
|
|
2761
|
+
linkGroupArc: ce().x((e) => e.x).y((e) => e.y)
|
|
2762
|
+
};
|
|
2763
|
+
return e.layoutBindings = Ea(e), e;
|
|
2764
|
+
}, Ma = (e) => Math.min(1, 9 / e), Na = (e, t, n, r) => {
|
|
2765
|
+
if (r === void 0 || t - e <= n) return (e + t) / 2;
|
|
2766
|
+
let i = n / 2;
|
|
2767
|
+
return Math.min(t - i, Math.max(e + i, r));
|
|
2768
|
+
}, Pa = ({ bounds: e, viewport: t, scaleExtent: n, minScale: r = 0, scale: i, focus: a }) => {
|
|
2769
|
+
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
|
+
return {
|
|
2771
|
+
k: h,
|
|
2772
|
+
x: u / 2 - h * Na(o, s, u / h, a?.x),
|
|
2773
|
+
y: d / 2 - h * Na(c, l, d / h, a?.y)
|
|
2774
|
+
};
|
|
2775
|
+
}, Fa = (e, t, r) => {
|
|
2776
|
+
let i = (0, D.useRef)(e.treeChartSettings?.transform), a = (0, D.useRef)(null);
|
|
2777
|
+
return a.current = (t) => {
|
|
2778
|
+
let i = ja(), a = t.treeOptions, o = {
|
|
2779
|
+
linkUpdate: i.linkUpdate,
|
|
2780
|
+
getButtonContent: i.buttonContent,
|
|
2781
|
+
...Er[a.layoutPreset]
|
|
2782
|
+
}, s = o.sizes ? o.sizes(e) : {}, l = {
|
|
2783
|
+
...o.labelStyle,
|
|
2784
|
+
...e.treeChartSettings?.nodeLayout?.labelStyle,
|
|
2785
|
+
fontSize: e.treeChartSettings?.nodeLayout?.labelStyle?.fontSize ?? o.labelStyle?.fontSize
|
|
2786
|
+
}, d = {
|
|
2787
|
+
...n,
|
|
2746
2788
|
...e.treeChartSettings?.nodeLayout?.border
|
|
2747
2789
|
};
|
|
2748
|
-
|
|
2749
|
-
let
|
|
2750
|
-
...
|
|
2790
|
+
d.enabled === !1 && (d.borderWidth = 0);
|
|
2791
|
+
let f = {
|
|
2792
|
+
...u,
|
|
2751
2793
|
...e.treeChartSettings?.nodeLayout.hoverStyle
|
|
2752
|
-
},
|
|
2753
|
-
|
|
2754
|
-
top:
|
|
2755
|
-
right:
|
|
2756
|
-
bottom:
|
|
2757
|
-
left:
|
|
2758
|
-
}).gridEnabled(
|
|
2759
|
-
zoomToFit:
|
|
2760
|
-
transform:
|
|
2794
|
+
}, 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 ?? c.backgroundColor).compact(a.compact).layout(a.directionOrigin).padding({
|
|
2796
|
+
top: p,
|
|
2797
|
+
right: p,
|
|
2798
|
+
bottom: p,
|
|
2799
|
+
left: p
|
|
2800
|
+
}).gridEnabled(a.gridLayoutEnabled).gridRows(a.gridLayoutRows).forceAutoFit(a.forceAutoFit).minFitScale(a.keepFitReadable ? Ma(T(l.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
|
+
zoomToFit: t.zoomToFit ?? !1,
|
|
2802
|
+
transform: t.transform
|
|
2761
2803
|
});
|
|
2762
|
-
}, (0,
|
|
2763
|
-
|
|
2804
|
+
}, (0, D.useCallback)((e, n) => {
|
|
2805
|
+
!e || !t.current || a.current?.({
|
|
2764
2806
|
root: e,
|
|
2765
|
-
container:
|
|
2766
|
-
treeOptions:
|
|
2807
|
+
container: t.current,
|
|
2808
|
+
treeOptions: n,
|
|
2767
2809
|
zoomToFit: !0,
|
|
2768
|
-
transform:
|
|
2810
|
+
transform: i.current ?? void 0
|
|
2769
2811
|
});
|
|
2770
2812
|
}, []);
|
|
2771
|
-
},
|
|
2813
|
+
}, Ia = {
|
|
2772
2814
|
directionOrigin: "top",
|
|
2773
2815
|
compact: !1,
|
|
2774
|
-
layoutPreset:
|
|
2816
|
+
layoutPreset: d.Basic,
|
|
2775
2817
|
forceAutoFit: !1,
|
|
2818
|
+
keepFitReadable: !0,
|
|
2776
2819
|
animate: !0,
|
|
2777
2820
|
interactive: !0,
|
|
2778
2821
|
gridLayoutEnabled: !1,
|
|
2779
2822
|
gridLayoutRows: 0
|
|
2780
|
-
},
|
|
2781
|
-
let n = {
|
|
2782
|
-
directionOrigin: e.treeChartSettings?.directionOrigin ??
|
|
2783
|
-
compact: e.treeChartSettings?.compact ??
|
|
2784
|
-
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ??
|
|
2785
|
-
forceAutoFit:
|
|
2823
|
+
}, La = (e, t) => {
|
|
2824
|
+
let n = t?.isPrintMode ?? !1, r = e.treeChartSettings?.forceAutoFit ?? Ia.forceAutoFit, i = {
|
|
2825
|
+
directionOrigin: e.treeChartSettings?.directionOrigin ?? Ia.directionOrigin,
|
|
2826
|
+
compact: e.treeChartSettings?.compact ?? Ia.compact,
|
|
2827
|
+
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ?? Ia.layoutPreset,
|
|
2828
|
+
forceAutoFit: r,
|
|
2829
|
+
keepFitReadable: !r && !n,
|
|
2786
2830
|
nodeWidth: e.treeChartSettings?.nodeLayout?.width,
|
|
2787
|
-
animate: !
|
|
2831
|
+
animate: !n,
|
|
2788
2832
|
interactive: t.disable?.interactions !== !0,
|
|
2789
2833
|
gridLayoutEnabled: e.treeChartSettings.gridLayout?.enabled ?? !1,
|
|
2790
2834
|
gridLayoutRows: e.treeChartSettings.gridLayout?.rows ?? 0
|
|
2791
2835
|
};
|
|
2792
2836
|
return {
|
|
2793
|
-
treeSettings:
|
|
2794
|
-
layout:
|
|
2837
|
+
treeSettings: i,
|
|
2838
|
+
layout: Er[i.layoutPreset || d.Basic]
|
|
2795
2839
|
};
|
|
2796
2840
|
};
|
|
2797
|
-
function
|
|
2841
|
+
function Ra(e) {
|
|
2798
2842
|
var t = 0, n = e.children, r = n && n.length;
|
|
2799
2843
|
if (!r) t = 1;
|
|
2800
2844
|
else for (; --r >= 0;) t += n[r].value;
|
|
2801
2845
|
e.value = t;
|
|
2802
2846
|
}
|
|
2803
|
-
function
|
|
2804
|
-
return this.eachAfter(
|
|
2847
|
+
function za() {
|
|
2848
|
+
return this.eachAfter(Ra);
|
|
2805
2849
|
}
|
|
2806
|
-
function
|
|
2850
|
+
function Ba(e) {
|
|
2807
2851
|
var t = this, n, r = [t], i, a, o;
|
|
2808
2852
|
do
|
|
2809
2853
|
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]);
|
|
2810
2854
|
while (r.length);
|
|
2811
2855
|
return this;
|
|
2812
2856
|
}
|
|
2813
|
-
function
|
|
2857
|
+
function Va(e) {
|
|
2814
2858
|
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]);
|
|
2815
2859
|
return this;
|
|
2816
2860
|
}
|
|
2817
|
-
function
|
|
2861
|
+
function Ha(e) {
|
|
2818
2862
|
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]);
|
|
2819
2863
|
for (; t = r.pop();) e(t);
|
|
2820
2864
|
return this;
|
|
2821
2865
|
}
|
|
2822
|
-
function
|
|
2866
|
+
function Ua(e) {
|
|
2823
2867
|
return this.eachAfter(function(t) {
|
|
2824
2868
|
for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
|
|
2825
2869
|
t.value = n;
|
|
2826
2870
|
});
|
|
2827
2871
|
}
|
|
2828
|
-
function
|
|
2872
|
+
function Wa(e) {
|
|
2829
2873
|
return this.eachBefore(function(t) {
|
|
2830
2874
|
t.children && t.children.sort(e);
|
|
2831
2875
|
});
|
|
2832
2876
|
}
|
|
2833
|
-
function
|
|
2834
|
-
for (var t = this, n =
|
|
2877
|
+
function Ga(e) {
|
|
2878
|
+
for (var t = this, n = Ka(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
|
|
2835
2879
|
for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
|
|
2836
2880
|
return r;
|
|
2837
2881
|
}
|
|
2838
|
-
function
|
|
2882
|
+
function Ka(e, t) {
|
|
2839
2883
|
if (e === t) return e;
|
|
2840
2884
|
var n = e.ancestors(), r = t.ancestors(), i = null;
|
|
2841
2885
|
for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
|
|
2842
2886
|
return i;
|
|
2843
2887
|
}
|
|
2844
|
-
function
|
|
2888
|
+
function qa() {
|
|
2845
2889
|
for (var e = this, t = [e]; e = e.parent;) t.push(e);
|
|
2846
2890
|
return t;
|
|
2847
2891
|
}
|
|
2848
|
-
function
|
|
2892
|
+
function Ja() {
|
|
2849
2893
|
var e = [];
|
|
2850
2894
|
return this.each(function(t) {
|
|
2851
2895
|
e.push(t);
|
|
2852
2896
|
}), e;
|
|
2853
2897
|
}
|
|
2854
|
-
function
|
|
2898
|
+
function Ya() {
|
|
2855
2899
|
var e = [];
|
|
2856
2900
|
return this.eachBefore(function(t) {
|
|
2857
2901
|
t.children || e.push(t);
|
|
2858
2902
|
}), e;
|
|
2859
2903
|
}
|
|
2860
|
-
function
|
|
2904
|
+
function Xa() {
|
|
2861
2905
|
var e = this, t = [];
|
|
2862
2906
|
return e.each(function(n) {
|
|
2863
2907
|
n !== e && t.push({
|
|
@@ -2866,47 +2910,47 @@ function Ga() {
|
|
|
2866
2910
|
});
|
|
2867
2911
|
}), t;
|
|
2868
2912
|
}
|
|
2869
|
-
function
|
|
2870
|
-
var n = new
|
|
2871
|
-
for (t ??=
|
|
2872
|
-
return n.eachBefore(
|
|
2913
|
+
function Za(e, t) {
|
|
2914
|
+
var n = new no(e), r = +e.value && (n.value = e.value), i, a = [n], o, s, c, l;
|
|
2915
|
+
for (t ??= $a; 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 no(s[c])), o.parent = i, o.depth = i.depth + 1;
|
|
2916
|
+
return n.eachBefore(to);
|
|
2873
2917
|
}
|
|
2874
|
-
function
|
|
2875
|
-
return
|
|
2918
|
+
function Qa() {
|
|
2919
|
+
return Za(this).eachBefore(eo);
|
|
2876
2920
|
}
|
|
2877
|
-
function
|
|
2921
|
+
function $a(e) {
|
|
2878
2922
|
return e.children;
|
|
2879
2923
|
}
|
|
2880
|
-
function
|
|
2924
|
+
function eo(e) {
|
|
2881
2925
|
e.data = e.data.data;
|
|
2882
2926
|
}
|
|
2883
|
-
function
|
|
2927
|
+
function to(e) {
|
|
2884
2928
|
var t = 0;
|
|
2885
2929
|
do
|
|
2886
2930
|
e.height = t;
|
|
2887
2931
|
while ((e = e.parent) && e.height < ++t);
|
|
2888
2932
|
}
|
|
2889
|
-
function
|
|
2933
|
+
function no(e) {
|
|
2890
2934
|
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
2891
2935
|
}
|
|
2892
|
-
|
|
2893
|
-
constructor:
|
|
2894
|
-
count:
|
|
2895
|
-
each:
|
|
2896
|
-
eachAfter:
|
|
2897
|
-
eachBefore:
|
|
2898
|
-
sum:
|
|
2899
|
-
sort:
|
|
2900
|
-
path:
|
|
2901
|
-
ancestors:
|
|
2902
|
-
descendants:
|
|
2903
|
-
leaves:
|
|
2904
|
-
links:
|
|
2905
|
-
copy:
|
|
2936
|
+
no.prototype = Za.prototype = {
|
|
2937
|
+
constructor: no,
|
|
2938
|
+
count: za,
|
|
2939
|
+
each: Ba,
|
|
2940
|
+
eachAfter: Ha,
|
|
2941
|
+
eachBefore: Va,
|
|
2942
|
+
sum: Ua,
|
|
2943
|
+
sort: Wa,
|
|
2944
|
+
path: Ga,
|
|
2945
|
+
ancestors: qa,
|
|
2946
|
+
descendants: Ja,
|
|
2947
|
+
leaves: Ya,
|
|
2948
|
+
links: Xa,
|
|
2949
|
+
copy: Qa
|
|
2906
2950
|
};
|
|
2907
|
-
var
|
|
2908
|
-
|
|
2909
|
-
var { version:
|
|
2951
|
+
var ro = ie();
|
|
2952
|
+
Oe();
|
|
2953
|
+
var { version: io } = {
|
|
2910
2954
|
name: "d3-flextree",
|
|
2911
2955
|
version: "2.1.2",
|
|
2912
2956
|
main: "build/d3-flextree.js",
|
|
@@ -2967,13 +3011,13 @@ var { version: $a } = {
|
|
|
2967
3011
|
"rollup-plugin-uglify": "^3.0.0",
|
|
2968
3012
|
"uglify-es": "^3.3.9"
|
|
2969
3013
|
}
|
|
2970
|
-
},
|
|
3014
|
+
}, ao = Object.freeze({
|
|
2971
3015
|
children: (e) => e.children,
|
|
2972
3016
|
nodeSize: (e) => e.data.size,
|
|
2973
3017
|
spacing: 0
|
|
2974
3018
|
});
|
|
2975
|
-
function
|
|
2976
|
-
let t = Object.assign({},
|
|
3019
|
+
function oo(e) {
|
|
3020
|
+
let t = Object.assign({}, ao, e);
|
|
2977
3021
|
function n(e) {
|
|
2978
3022
|
let n = t[e];
|
|
2979
3023
|
return typeof n == "function" ? n : () => n;
|
|
@@ -2984,7 +3028,7 @@ function to(e) {
|
|
|
2984
3028
|
}
|
|
2985
3029
|
function i() {
|
|
2986
3030
|
let e = n("nodeSize"), t = n("spacing");
|
|
2987
|
-
return class n extends
|
|
3031
|
+
return class n extends Za.prototype.constructor {
|
|
2988
3032
|
constructor(e) {
|
|
2989
3033
|
super(e);
|
|
2990
3034
|
}
|
|
@@ -3097,7 +3141,7 @@ function to(e) {
|
|
|
3097
3141
|
this.data.y = e;
|
|
3098
3142
|
}
|
|
3099
3143
|
update() {
|
|
3100
|
-
return
|
|
3144
|
+
return so(this), co(this), this;
|
|
3101
3145
|
}
|
|
3102
3146
|
};
|
|
3103
3147
|
}
|
|
@@ -3141,52 +3185,52 @@ function to(e) {
|
|
|
3141
3185
|
}
|
|
3142
3186
|
}), r;
|
|
3143
3187
|
}
|
|
3144
|
-
|
|
3145
|
-
var
|
|
3188
|
+
oo.version = io;
|
|
3189
|
+
var so = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
3146
3190
|
let [r, i] = t;
|
|
3147
|
-
|
|
3191
|
+
so(n, e.y + e.ySize);
|
|
3148
3192
|
let a = (r === 0 ? n.lExt : n.rExt).bottom;
|
|
3149
|
-
r !== 0 &&
|
|
3150
|
-
let o =
|
|
3193
|
+
r !== 0 && uo(e, r, i);
|
|
3194
|
+
let o = yo(a, r, i);
|
|
3151
3195
|
return [r + 1, o];
|
|
3152
|
-
}, [0, null]),
|
|
3196
|
+
}, [0, null]), lo(e), vo(e), e), co = (e, t, n) => {
|
|
3153
3197
|
t === void 0 && (t = -e.relX - e.prelim, n = 0);
|
|
3154
3198
|
let r = t + e.relX;
|
|
3155
|
-
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) =>
|
|
3156
|
-
},
|
|
3199
|
+
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) => co(t, r, e.x)), e;
|
|
3200
|
+
}, lo = (e) => {
|
|
3157
3201
|
(e.children || []).reduce((e, t) => {
|
|
3158
3202
|
let [n, r] = e, i = n + t.shift, a = r + i + t.change;
|
|
3159
3203
|
return t.relX += a, [i, a];
|
|
3160
3204
|
}, [0, 0]);
|
|
3161
|
-
},
|
|
3205
|
+
}, uo = (e, t, n) => {
|
|
3162
3206
|
let r = e.children[t - 1], i = e.children[t], a = r, o = r.relX, s = i, c = i.relX, l = !0;
|
|
3163
3207
|
for (; a && s;) {
|
|
3164
3208
|
a.bottom > n.lowY && (n = n.next);
|
|
3165
3209
|
let r = o + a.prelim - (c + s.prelim) + a.xSize / 2 + s.xSize / 2 + a.spacing(s);
|
|
3166
|
-
(r > 0 || r < 0 && l) && (c += r,
|
|
3210
|
+
(r > 0 || r < 0 && l) && (c += r, fo(i, r), po(e, t, n.index, r)), l = !1;
|
|
3167
3211
|
let u = a.bottom, d = s.bottom;
|
|
3168
|
-
u <= d && (a =
|
|
3212
|
+
u <= d && (a = ho(a), a && (o += a.relX)), u >= d && (s = mo(s), s && (c += s.relX));
|
|
3169
3213
|
}
|
|
3170
|
-
!a && s ?
|
|
3171
|
-
},
|
|
3214
|
+
!a && s ? go(e, t, s, c) : a && !s && _o(e, t, a, o);
|
|
3215
|
+
}, fo = (e, t) => {
|
|
3172
3216
|
e.relX += t, e.lExtRelX += t, e.rExtRelX += t;
|
|
3173
|
-
},
|
|
3217
|
+
}, po = (e, t, n, r) => {
|
|
3174
3218
|
let i = e.children[t], a = t - n;
|
|
3175
3219
|
if (a > 1) {
|
|
3176
3220
|
let t = r / a;
|
|
3177
3221
|
e.children[n + 1].shift += t, i.shift -= t, i.change -= r - t;
|
|
3178
3222
|
}
|
|
3179
|
-
},
|
|
3223
|
+
}, mo = (e) => e.hasChildren ? e.firstChild : e.lThr, ho = (e) => e.hasChildren ? e.lastChild : e.rThr, go = (e, t, n, r) => {
|
|
3180
3224
|
let i = e.firstChild, a = i.lExt, o = e.children[t];
|
|
3181
3225
|
a.lThr = n;
|
|
3182
3226
|
let s = r - n.relX - i.lExtRelX;
|
|
3183
3227
|
a.relX += s, a.prelim -= s, i.lExt = o.lExt, i.lExtRelX = o.lExtRelX;
|
|
3184
|
-
},
|
|
3228
|
+
}, _o = (e, t, n, r) => {
|
|
3185
3229
|
let i = e.children[t], a = i.rExt, o = e.children[t - 1];
|
|
3186
3230
|
a.rThr = n;
|
|
3187
3231
|
let s = r - n.relX - i.rExtRelX;
|
|
3188
3232
|
a.relX += s, a.prelim -= s, i.rExt = o.rExt, i.rExtRelX = o.rExtRelX;
|
|
3189
|
-
},
|
|
3233
|
+
}, vo = (e) => {
|
|
3190
3234
|
if (e.hasChildren) {
|
|
3191
3235
|
let t = e.firstChild, n = e.lastChild, r = (t.prelim + t.relX - t.xSize / 2 + n.relX + n.prelim + n.xSize / 2) / 2;
|
|
3192
3236
|
Object.assign(e, {
|
|
@@ -3197,7 +3241,7 @@ var no = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3197
3241
|
rExtRelX: n.rExtRelX
|
|
3198
3242
|
});
|
|
3199
3243
|
}
|
|
3200
|
-
},
|
|
3244
|
+
}, yo = (e, t, n) => {
|
|
3201
3245
|
for (; n !== null && e >= n.lowY;) n = n.next;
|
|
3202
3246
|
return {
|
|
3203
3247
|
lowY: e,
|
|
@@ -3205,22 +3249,25 @@ var no = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3205
3249
|
next: n
|
|
3206
3250
|
};
|
|
3207
3251
|
};
|
|
3208
|
-
|
|
3209
|
-
var
|
|
3252
|
+
ae();
|
|
3253
|
+
var Q = {
|
|
3210
3254
|
selection: M,
|
|
3211
3255
|
select: N,
|
|
3212
|
-
max:
|
|
3213
|
-
min:
|
|
3214
|
-
sum:
|
|
3215
|
-
cumsum:
|
|
3216
|
-
tree:
|
|
3217
|
-
stratify:
|
|
3218
|
-
zoom:
|
|
3219
|
-
zoomIdentity:
|
|
3220
|
-
linkHorizontal:
|
|
3221
|
-
flextree:
|
|
3222
|
-
},
|
|
3256
|
+
max: Ee,
|
|
3257
|
+
min: ke,
|
|
3258
|
+
sum: De,
|
|
3259
|
+
cumsum: Ae,
|
|
3260
|
+
tree: nt,
|
|
3261
|
+
stratify: We,
|
|
3262
|
+
zoom: Ta,
|
|
3263
|
+
zoomIdentity: ga,
|
|
3264
|
+
linkHorizontal: ce,
|
|
3265
|
+
flextree: oo
|
|
3266
|
+
}, bo = class {
|
|
3223
3267
|
stateInternal = {
|
|
3268
|
+
allNodes: [],
|
|
3269
|
+
dragStartX: 0,
|
|
3270
|
+
dragStartY: 0,
|
|
3224
3271
|
root: null,
|
|
3225
3272
|
lastTransform: {
|
|
3226
3273
|
x: 0,
|
|
@@ -3231,17 +3278,15 @@ var Z = {
|
|
|
3231
3278
|
};
|
|
3232
3279
|
getConfig;
|
|
3233
3280
|
constructor() {
|
|
3234
|
-
let e =
|
|
3281
|
+
let e = ja();
|
|
3235
3282
|
this.getConfig = () => e, Object.keys(e).forEach((t) => {
|
|
3236
|
-
this[t]
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
return this;
|
|
3240
|
-
};
|
|
3283
|
+
Object.assign(this, { [t]: function(...n) {
|
|
3284
|
+
return n.length ? (e[t] = n[0], this) : e[t];
|
|
3285
|
+
} });
|
|
3241
3286
|
}), this.initializeEnterExitUpdatePattern(), this.extendHierarchyNodePrototype();
|
|
3242
3287
|
}
|
|
3243
3288
|
init() {
|
|
3244
|
-
let e = this.getChartState(), t = this.getConfig(), n =
|
|
3289
|
+
let e = this.getChartState(), t = this.getConfig(), n = Q.select(t.container), r = t.container.getBoundingClientRect();
|
|
3245
3290
|
e.containerRect = r;
|
|
3246
3291
|
let i = n.patternify({
|
|
3247
3292
|
tag: "svg",
|
|
@@ -3267,10 +3312,10 @@ var Z = {
|
|
|
3267
3312
|
o &&= (t.onNodeLeave(o), null);
|
|
3268
3313
|
}).on("mousemove", (e) => {
|
|
3269
3314
|
let n = e.target.closest("g.node"), r = null;
|
|
3270
|
-
n && ([...e.target.classList].includes("node-button-foreign-object") || (r =
|
|
3315
|
+
n && ([...e.target.classList].includes("node-button-foreign-object") || (r = Q.select(n).datum(), r.parent || (r = null))), o && o !== r && t.onNodeLeave(o), r && o !== r && t.onNodeHover(r), o = r;
|
|
3271
3316
|
}), e.chart = a;
|
|
3272
|
-
let s = { zoom:
|
|
3273
|
-
s.zoom =
|
|
3317
|
+
let s = { zoom: t.createZoom() }, c = !1;
|
|
3318
|
+
s.zoom = s.zoom.clickDistance(10).on("start", (e) => {
|
|
3274
3319
|
t.onZoomStart(e);
|
|
3275
3320
|
}).on("end", (n) => {
|
|
3276
3321
|
c && (e.userTransform = {
|
|
@@ -3286,7 +3331,8 @@ var Z = {
|
|
|
3286
3331
|
let l = i.on("mousedown.zoom");
|
|
3287
3332
|
i.on("mousedown.zoom", null), i.on("mousedown.zoom", (e) => {
|
|
3288
3333
|
c = !0, setTimeout(() => {
|
|
3289
|
-
|
|
3334
|
+
let t = i.node();
|
|
3335
|
+
t && l?.call(t, e, void 0);
|
|
3290
3336
|
}, 0);
|
|
3291
3337
|
});
|
|
3292
3338
|
}
|
|
@@ -3294,13 +3340,13 @@ var Z = {
|
|
|
3294
3340
|
return this.stateInternal;
|
|
3295
3341
|
}
|
|
3296
3342
|
initializeEnterExitUpdatePattern() {
|
|
3297
|
-
|
|
3298
|
-
let t = e.selector, n = e.tag, r = e.data
|
|
3343
|
+
Q.selection.prototype.patternify = function(e) {
|
|
3344
|
+
let t = e.selector, n = e.tag, r = e.data ?? [t], i = this.selectAll("." + t).data(r, (e, t) => e && typeof e == "object" && "id" in e && typeof e.id == "string" ? e.id : t);
|
|
3299
3345
|
return i.exit().remove(), i = i.enter().append(n).merge(i), i.attr("class", t), i;
|
|
3300
3346
|
};
|
|
3301
3347
|
}
|
|
3302
3348
|
extendHierarchyNodePrototype() {
|
|
3303
|
-
|
|
3349
|
+
je.prototype.allDescendants || (je.prototype.allDescendants = function() {
|
|
3304
3350
|
let e = [];
|
|
3305
3351
|
this.each((t) => {
|
|
3306
3352
|
e.push(t);
|
|
@@ -3327,13 +3373,13 @@ var Z = {
|
|
|
3327
3373
|
render(e = {}) {
|
|
3328
3374
|
let t = this.getConfig(), n = this.getChartState();
|
|
3329
3375
|
if (!t.root?.children || t.root.children.length == 0) return this;
|
|
3330
|
-
let r =
|
|
3376
|
+
let r = t.container.getBoundingClientRect();
|
|
3331
3377
|
if (n.containerRect = r, !r.width || !r.height) return this;
|
|
3332
3378
|
let i = {
|
|
3333
3379
|
chartWidth: r.width,
|
|
3334
3380
|
chartHeight: r.height
|
|
3335
3381
|
};
|
|
3336
|
-
|
|
3382
|
+
n.calc = i, n.calc.centerX = i.chartWidth / 2, n.calc.centerY = i.chartHeight / 2, n.flexTreeLayout = oo({ nodeSize: (e) => {
|
|
3337
3383
|
let n = t.nodeWidth(e), r = t.nodeHeight(e), i = t.siblingsMargin(e), a = t.childrenMargin(e);
|
|
3338
3384
|
return t.layoutBindings[t.layout].nodeFlexSize({
|
|
3339
3385
|
config: t,
|
|
@@ -3343,16 +3389,16 @@ var Z = {
|
|
|
3343
3389
|
siblingsMargin: i,
|
|
3344
3390
|
childrenMargin: a
|
|
3345
3391
|
});
|
|
3346
|
-
} }).spacing((e, n) => e.parent == n.parent ? 0 : t.neighbourMargin(e, n)), this.setLayouts()
|
|
3392
|
+
} }).spacing((e, n) => e.parent == n.parent ? 0 : t.neighbourMargin(e, n)), this.setLayouts();
|
|
3393
|
+
let a = n.svg;
|
|
3394
|
+
return !a || !n.root ? this : (a.attr("width", r.width).attr("height", r.height), this.update(n.root, e), this);
|
|
3347
3395
|
}
|
|
3348
3396
|
groupBy(e, t, n) {
|
|
3349
3397
|
let r = {};
|
|
3350
3398
|
return e.forEach((e) => {
|
|
3351
3399
|
let n = t(e);
|
|
3352
3400
|
r[n] || (r[n] = []), r[n].push(e);
|
|
3353
|
-
}), Object.
|
|
3354
|
-
r[e] = n(r[e]);
|
|
3355
|
-
}), Object.entries(r);
|
|
3401
|
+
}), Object.entries(r).map(([e, t]) => [e, n(t)]);
|
|
3356
3402
|
}
|
|
3357
3403
|
calculateCompactFlexDimensions(e) {
|
|
3358
3404
|
let t = this.getConfig();
|
|
@@ -3365,7 +3411,7 @@ var Z = {
|
|
|
3365
3411
|
n.forEach((e, t) => {
|
|
3366
3412
|
t || (e.firstCompact = !0), t % 2 ? e.compactEven = !1 : e.compactEven = !0, e.row = Math.floor(t / 2);
|
|
3367
3413
|
});
|
|
3368
|
-
let r =
|
|
3414
|
+
let r = Q.max(n.filter((e) => e.compactEven), t.layoutBindings[t.layout].compactDimension.sizeColumn), i = Q.max(n.filter((e) => !e.compactEven), t.layoutBindings[t.layout].compactDimension.sizeColumn), a = Math.max(r ?? 0, i ?? 0) * 2, o = this.groupBy(n, (e) => e.row, (e) => Q.max(e, (e) => t.layoutBindings[t.layout].compactDimension.sizeRow(e) + t.compactMarginBetween()) ?? 0), s = Q.sum(o.map((e) => e[1]));
|
|
3369
3415
|
n.forEach((e) => {
|
|
3370
3416
|
e.firstCompactNode = n[0], e.firstCompact ? e.flexCompactDim = [a + t.compactMarginPair(e), s - t.compactMarginBetween()] : e.flexCompactDim = [0, 0];
|
|
3371
3417
|
}), e.flexCompactDim = null;
|
|
@@ -3377,17 +3423,18 @@ var Z = {
|
|
|
3377
3423
|
e.eachBefore((e) => {
|
|
3378
3424
|
if (e.children) {
|
|
3379
3425
|
let n = e.children.filter((e) => e.flexCompactDim), r = n[0];
|
|
3380
|
-
if (!r) return;
|
|
3426
|
+
if (!r?.flexCompactDim) return;
|
|
3427
|
+
let i = r.flexCompactDim[0];
|
|
3381
3428
|
n.forEach((e, n) => {
|
|
3382
|
-
n == 0 && (r.x -=
|
|
3429
|
+
n == 0 && (r.x -= i / 2), n & n % 2 - 1 ? e.x = r.x + i * .25 - t.compactMarginPair(e) / 4 : n && (e.x = r.x + i * .75 + t.compactMarginPair(e) / 4);
|
|
3383
3430
|
});
|
|
3384
|
-
let
|
|
3385
|
-
r.x = r.x +
|
|
3386
|
-
let
|
|
3387
|
-
Math.abs(
|
|
3388
|
-
let
|
|
3431
|
+
let a = r.x + i * .5;
|
|
3432
|
+
r.x = r.x + i * .25 - t.compactMarginPair(r) / 4;
|
|
3433
|
+
let o = e.x - a;
|
|
3434
|
+
Math.abs(o) < 10 && n.forEach((e) => e.x += o);
|
|
3435
|
+
let s = this.groupBy(n, (e) => e.row, (e) => Q.max(e, (e) => t.layoutBindings[t.layout].compactDimension.sizeRow(e)) ?? 0), c = Q.cumsum(s.map((e) => e[1] + t.compactMarginBetween()));
|
|
3389
3436
|
n.forEach((e) => {
|
|
3390
|
-
e.row ? e.y = r.y +
|
|
3437
|
+
e.row ? e.y = r.y + c[e.row - 1] : e.y = r.y;
|
|
3391
3438
|
});
|
|
3392
3439
|
}
|
|
3393
3440
|
});
|
|
@@ -3395,7 +3442,7 @@ var Z = {
|
|
|
3395
3442
|
calculateGridLayout(e) {
|
|
3396
3443
|
let t = this.getChartState(), n = this.getConfig(), r = e.descendants().slice(1);
|
|
3397
3444
|
if (e.x = 0, e.y = 0, !r.length) return e;
|
|
3398
|
-
let i =
|
|
3445
|
+
let i = Q.max(r, (e) => e.width) ?? 0, a = Q.max(r, (e) => e.height) ?? 0, o = Q.max(r, (e) => n.siblingsMargin(e)) ?? 0, s = Math.max(1, i + o), c = Math.max(1, a + o), l = Math.max(1, Math.floor((t.calc?.chartWidth ?? s) / s)), u = n.layout === "top" || n.layout === "bottom", d = Math.max(0, Math.floor(n.gridRows)), f = d === 0 ? l : u ? Math.ceil(r.length / d) : d, p = Math.ceil(r.length / f);
|
|
3399
3446
|
return r.forEach((e, t) => {
|
|
3400
3447
|
let i, a;
|
|
3401
3448
|
if (u) {
|
|
@@ -3424,12 +3471,13 @@ var Z = {
|
|
|
3424
3471
|
}
|
|
3425
3472
|
update({ x0: e, y0: t }, n = {}) {
|
|
3426
3473
|
let r = this.getChartState(), i = this.getConfig();
|
|
3474
|
+
if (!r.root || !r.flexTreeLayout || !r.svg || !r.zoomBehavior || !r.linksWrapper || !r.nodesWrapper) return;
|
|
3427
3475
|
i.compact && !i.gridEnabled && this.calculateCompactFlexDimensions(r.root);
|
|
3428
3476
|
let a = i.gridEnabled ? this.calculateGridLayout(r.root) : r.flexTreeLayout(r.root);
|
|
3429
3477
|
i.compact && !i.gridEnabled && this.calculateCompactFlexPositions(r.root), i.forceAutoFit ? (r.svg.attr("cursor", "default"), r.zoomBehavior.filter(() => !1)) : (r.svg.attr("cursor", "grab"), r.zoomBehavior.filter(() => !0));
|
|
3430
3478
|
let o = a.descendants().slice(1), s = r.root.children?.length || 0, c = i.gridEnabled ? [] : a.descendants().slice(s + 1);
|
|
3431
3479
|
i.gridEnabled || o.forEach((e) => i.layoutBindings[i.layout].swap(e));
|
|
3432
|
-
let l = r.linksWrapper.selectAll("path.link").data(c, (e) => i.nodeId(e.data)), u = l.enter().insert("path", "g").attr("class", "link").attr("d", (e) => {
|
|
3480
|
+
let l = r.linksWrapper.selectAll("path.link").data(c, (e) => i.nodeId(e.data) ?? ""), u = l.enter().insert("path", "g").attr("class", "link").attr("d", (e) => {
|
|
3433
3481
|
let t = {
|
|
3434
3482
|
x: i.layoutBindings[i.layout].linkJoinX(e.parent || e),
|
|
3435
3483
|
y: i.layoutBindings[i.layout].linkJoinY(e.parent || e)
|
|
@@ -3458,13 +3506,10 @@ var Z = {
|
|
|
3458
3506
|
};
|
|
3459
3507
|
return i.layoutBindings[i.layout].diagonal(t, t, null, { sy: i.linkYOffset });
|
|
3460
3508
|
}).remove();
|
|
3461
|
-
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) => {
|
|
3462
|
-
let t = e.data;
|
|
3463
|
-
if (t.brush) return t.brush.key;
|
|
3464
|
-
}).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) => {
|
|
3509
|
+
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) => {
|
|
3465
3510
|
[...e.srcElement.classList].includes("node-button-foreign-object") || i.onNodeClick(t);
|
|
3466
|
-
}).call(
|
|
3467
|
-
return r.dragEnabled && t.depth > 0;
|
|
3511
|
+
}).call(Ir().filter(function(e, t) {
|
|
3512
|
+
return r.dragEnabled === !0 && t.depth > 0;
|
|
3468
3513
|
}).on("start", function(e, t) {
|
|
3469
3514
|
d.onDragStart(this, e, t);
|
|
3470
3515
|
}).on("drag", function(e) {
|
|
@@ -3509,18 +3554,15 @@ var Z = {
|
|
|
3509
3554
|
})},${i.layoutBindings[i.layout].buttonY({
|
|
3510
3555
|
width: e,
|
|
3511
3556
|
height: t
|
|
3512
|
-
})})`).attr("display", ({ data: e }) => !i.gridEnabled && e._directSubordinates > 0 ? null : "none").attr("opacity", ({ children: e, _children: t }) => e || t ? 1 : 0), m.select(".node-button-foreign-object .node-button-div").html((e) => i.buttonContent({
|
|
3557
|
+
})})`).attr("display", ({ data: e }) => !i.gridEnabled && (e._directSubordinates ?? 0) > 0 ? null : "none").attr("opacity", ({ children: e, _children: t }) => e || t ? 1 : 0), m.select(".node-button-foreign-object .node-button-div").html((e) => i.buttonContent({
|
|
3513
3558
|
node: e,
|
|
3514
3559
|
config: i
|
|
3515
|
-
})), m.attr("data-value", (e) =>
|
|
3516
|
-
let t = e.data;
|
|
3517
|
-
if (t.brush) return t.brush.value;
|
|
3518
|
-
}), m.each(i.nodeUpdate);
|
|
3560
|
+
})), m.attr("data-value", (e) => e.data.brush?.value ?? null), m.each(i.nodeUpdate);
|
|
3519
3561
|
let h = f.exit();
|
|
3520
3562
|
h.each(i.nodeExit);
|
|
3521
3563
|
let g = h.data().reduce((e, t) => e.depth < t.depth ? e : t, { depth: Infinity });
|
|
3522
3564
|
h.attr("opacity", 1).transition().duration(i.duration).attr("transform", () => {
|
|
3523
|
-
let { x: e, y: t, width: n, height: r } = g.parent
|
|
3565
|
+
let { x: e, y: t, width: n, height: r } = g.parent ?? g;
|
|
3524
3566
|
return `translate(${i.layoutBindings[i.layout].nodeJoinX({
|
|
3525
3567
|
x: e,
|
|
3526
3568
|
y: t,
|
|
@@ -3533,7 +3575,7 @@ var Z = {
|
|
|
3533
3575
|
height: r
|
|
3534
3576
|
})})`;
|
|
3535
3577
|
}).on("end", function() {
|
|
3536
|
-
|
|
3578
|
+
Q.select(this).remove();
|
|
3537
3579
|
}).attr("opacity", 0), o.forEach((e) => {
|
|
3538
3580
|
e.x0 = e.x, e.y0 = e.y;
|
|
3539
3581
|
});
|
|
@@ -3543,7 +3585,7 @@ var Z = {
|
|
|
3543
3585
|
_.data._centeredWithDescendants && (e = i.compact ? _.descendants().filter((e, t) => t < 7) : _.descendants().filter((e, t, n) => {
|
|
3544
3586
|
let r = Math.round(n.length / 2);
|
|
3545
3587
|
return n.length % 2 ? t > r - 2 && t < r + 2 - 1 : t > r - 2 && t < r + 2;
|
|
3546
|
-
})), _.data._centeredWithDescendants =
|
|
3588
|
+
})), _.data._centeredWithDescendants = !1, _.data._centered = !1, this.fit({
|
|
3547
3589
|
animate: !0,
|
|
3548
3590
|
scale: !1,
|
|
3549
3591
|
nodes: e
|
|
@@ -3564,21 +3606,21 @@ var Z = {
|
|
|
3564
3606
|
}
|
|
3565
3607
|
restyleForeignObjectElements(e) {
|
|
3566
3608
|
let t = this.getChartState(), n = this.getConfig();
|
|
3567
|
-
t.svg
|
|
3568
|
-
return n.nodeContent.
|
|
3609
|
+
t.svg?.selectAll(".node-foreign-object").filter((t) => !e || e.has(t)).classed("node-excluded", (e) => e.data._excluded === !0).attr("width", ({ width: e }) => e).attr("height", ({ height: e }) => e).attr("x", () => 0).attr("y", () => 0), t.svg?.selectAll(".node-foreign-object-div").filter((t) => !e || e.has(t)).style("width", ({ width: e }) => `${e}px`).style("height", ({ height: e }) => `${e}px`).html(function(e, t, r) {
|
|
3610
|
+
return n.nodeContent.call(this, e, t, r, n);
|
|
3569
3611
|
});
|
|
3570
3612
|
}
|
|
3571
3613
|
onButtonClick(e, t) {
|
|
3572
3614
|
let n = this.getConfig();
|
|
3573
|
-
t.parent && (n.setActiveNodeCentered && (t.data._centered = !0, t.data._centeredWithDescendants = !0), t.children ? (t._children = t.children, t.children =
|
|
3615
|
+
t.parent && (n.setActiveNodeCentered && (t.data._centered = !0, t.data._centeredWithDescendants = !0), t.children ? (t._children = t.children, t.children = void 0) : (t.children = t._children, t._children = void 0), this.updateNodesState(), e.stopPropagation(), n.onExpandOrCollapse(t));
|
|
3574
3616
|
}
|
|
3575
3617
|
updateNodesState() {
|
|
3576
3618
|
let e = this.getChartState();
|
|
3577
|
-
this.setLayouts(), this.update(e.root);
|
|
3619
|
+
this.setLayouts(), e.root && this.update(e.root);
|
|
3578
3620
|
}
|
|
3579
3621
|
setLayouts() {
|
|
3580
3622
|
let e = this.getChartState(), t = this.getConfig();
|
|
3581
|
-
e.root = t.root, e.root.each((e) => {
|
|
3623
|
+
e.root = t.root, e.root && (e.root.each((e) => {
|
|
3582
3624
|
let n = e._hierarchyHeight || e.height, r = t.nodeWidth(e), i = t.nodeHeight(e);
|
|
3583
3625
|
Object.assign(e, {
|
|
3584
3626
|
width: r,
|
|
@@ -3591,13 +3633,13 @@ var Z = {
|
|
|
3591
3633
|
_directSubordinatesPaging: (e.children || e._children || []).length,
|
|
3592
3634
|
_totalSubordinates: e.allDescendants().length - 1
|
|
3593
3635
|
});
|
|
3594
|
-
});
|
|
3636
|
+
}));
|
|
3595
3637
|
}
|
|
3596
3638
|
collapse(e) {
|
|
3597
|
-
e.children &&= (e._children = e.children, e._children.forEach((e) => this.collapse(e)),
|
|
3639
|
+
e.children &&= (e._children = e.children, e._children.forEach((e) => this.collapse(e)), void 0);
|
|
3598
3640
|
}
|
|
3599
3641
|
expand(e) {
|
|
3600
|
-
e._children &&= (e.children = e._children, e.children.forEach((e) => this.expand(e)),
|
|
3642
|
+
e._children &&= (e.children = e._children, e.children.forEach((e) => this.expand(e)), void 0);
|
|
3601
3643
|
}
|
|
3602
3644
|
enableDrag() {
|
|
3603
3645
|
let e = this.getChartState();
|
|
@@ -3611,7 +3653,7 @@ var Z = {
|
|
|
3611
3653
|
let r = this.getChartState();
|
|
3612
3654
|
r.dragNode = n;
|
|
3613
3655
|
let i = t.subject.width / 2;
|
|
3614
|
-
r.dragStartX = t.x - i, r.dragStartY =
|
|
3656
|
+
r.dragStartX = t.x - i, r.dragStartY = t.y, r.isDragStarting = !0, N(e).classed("dragging", !0);
|
|
3615
3657
|
}
|
|
3616
3658
|
onDrag(e, t) {
|
|
3617
3659
|
let n = this.getChartState(), r = this.getConfig();
|
|
@@ -3620,7 +3662,7 @@ var Z = {
|
|
|
3620
3662
|
if (n.isDragStarting) {
|
|
3621
3663
|
n.isDragStarting = !1, r.container.classList.add("dragging-active"), i.raise();
|
|
3622
3664
|
let e = t.subject.descendants(), a = [...e || [], t.subject], o = e.filter((e) => e.data.id !== t.subject.id);
|
|
3623
|
-
n.linksWrapper
|
|
3665
|
+
n.linksWrapper?.selectAll("path.link").data(a, (e) => r.nodeId(e.data) ?? "").remove(), o && n.nodesWrapper?.selectAll("g.node").data(o, (e) => r.nodeId(e.data) ?? "").remove();
|
|
3624
3666
|
}
|
|
3625
3667
|
n.dropNode = null;
|
|
3626
3668
|
let a = {
|
|
@@ -3632,7 +3674,7 @@ var Z = {
|
|
|
3632
3674
|
bottom: t.y + t.subject.height,
|
|
3633
3675
|
midX: t.x + t.subject.width / 2,
|
|
3634
3676
|
midY: t.y + t.subject.height / 2
|
|
3635
|
-
}, o =
|
|
3677
|
+
}, o = ur("g.node:not(.dragging)");
|
|
3636
3678
|
o.classed("drop-target", !1), o.filter(function(e) {
|
|
3637
3679
|
let t = {
|
|
3638
3680
|
left: e.x,
|
|
@@ -3640,9 +3682,8 @@ var Z = {
|
|
|
3640
3682
|
top: e.y,
|
|
3641
3683
|
bottom: e.y + e.height
|
|
3642
3684
|
};
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
}).classed("drop-target", !0), n.dragStartX += parseFloat(t.dx), n.dragStartY += parseFloat(t.dy), i.attr("transform", "translate(" + n.dragStartX + "," + n.dragStartY + ")");
|
|
3685
|
+
return n.dragNode?.parent === e ? !1 : a.midX > t.left && a.midX < t.right && a.midY > t.top && a.midY < t.bottom && this.classList.contains("droppable") ? (n.dropNode = e, !0) : !1;
|
|
3686
|
+
}).classed("drop-target", !0), n.dragStartX += t.dx, n.dragStartY += t.dy, i.attr("transform", "translate(" + n.dragStartX + "," + n.dragStartY + ")");
|
|
3646
3687
|
}
|
|
3647
3688
|
onDragEnd(e, t) {
|
|
3648
3689
|
this.getConfig().container.classList.remove("dragging-active");
|
|
@@ -3652,11 +3693,11 @@ var Z = {
|
|
|
3652
3693
|
this.render();
|
|
3653
3694
|
return;
|
|
3654
3695
|
}
|
|
3655
|
-
if (t.subject.parent
|
|
3696
|
+
if (t.subject.parent?.id === n.dropNode.id) {
|
|
3656
3697
|
this.render();
|
|
3657
3698
|
return;
|
|
3658
3699
|
}
|
|
3659
|
-
N(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) ||
|
|
3700
|
+
N(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();
|
|
3660
3701
|
}
|
|
3661
3702
|
}
|
|
3662
3703
|
zoomed(e) {
|
|
@@ -3665,32 +3706,57 @@ var Z = {
|
|
|
3665
3706
|
let r = e.transform;
|
|
3666
3707
|
t.lastTransform = r, n.attr("transform", r.toString());
|
|
3667
3708
|
}
|
|
3668
|
-
zoomTreeBounds({ x0: e, x1: t, y0: n, y1: r,
|
|
3709
|
+
zoomTreeBounds({ x0: e, x1: t, y0: n, y1: r, focus: i, params: a = {
|
|
3669
3710
|
animate: !0,
|
|
3670
3711
|
scale: !0,
|
|
3671
3712
|
onCompleted: void 0
|
|
3672
3713
|
} }) {
|
|
3673
|
-
let {
|
|
3674
|
-
|
|
3714
|
+
let { svg: o, zoomBehavior: s, lastTransform: c, containerRect: l } = this.getChartState();
|
|
3715
|
+
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: _ } = Pa({
|
|
3717
|
+
bounds: {
|
|
3718
|
+
x0: e,
|
|
3719
|
+
x1: t,
|
|
3720
|
+
y0: n,
|
|
3721
|
+
y1: r
|
|
3722
|
+
},
|
|
3723
|
+
viewport: {
|
|
3724
|
+
width: u,
|
|
3725
|
+
height: d
|
|
3726
|
+
},
|
|
3727
|
+
scaleExtent: p,
|
|
3728
|
+
minScale: m,
|
|
3729
|
+
scale: a.scale ? void 0 : c.k,
|
|
3730
|
+
focus: i
|
|
3731
|
+
}), v = Q.zoomIdentity.translate(g, _).scale(h);
|
|
3732
|
+
o.transition().duration(a.animate ? f : 0).call(s.transform, v);
|
|
3675
3733
|
}
|
|
3676
3734
|
applyTransform(e, t = !1) {
|
|
3677
3735
|
let { zoomBehavior: n, lastTransform: r, svg: i } = this.getChartState(), { duration: a } = this.getConfig();
|
|
3678
3736
|
if (e.k === r.k && e.x === r.x && e.y === r.y) return;
|
|
3679
|
-
let o =
|
|
3680
|
-
i && i.transition().duration(t ? 0 : a).call(n.transform, o);
|
|
3737
|
+
let o = Q.zoomIdentity.translate(e.x, e.y).scale(e.k);
|
|
3738
|
+
i && n && i.transition().duration(t ? 0 : a).call(n.transform, o);
|
|
3681
3739
|
}
|
|
3682
3740
|
fit({ animate: e = !0, nodes: t, scale: n = !0, onCompleted: r } = {}) {
|
|
3683
|
-
let i = this.getChartState(), a = this.getConfig(), { root: o } = i
|
|
3741
|
+
let i = this.getChartState(), a = this.getConfig(), { root: o } = i;
|
|
3742
|
+
if (!o) return this;
|
|
3743
|
+
let s = a.layoutBindings[a.layout], c = t || (a.gridEnabled ? o.descendants().slice(1) : o.descendants()), l = Q.min(c, (e) => e.x + s.nodeLeftX(e)), u = Q.max(c, (e) => e.x + s.nodeRightX(e)), d = Q.min(c, (e) => e.y + s.nodeTopY(e)), f = Q.max(c, (e) => e.y + s.nodeBottomY(e));
|
|
3744
|
+
if (l === void 0 || u === void 0 || d === void 0 || f === void 0) return this;
|
|
3745
|
+
let p = t ? void 0 : o.id === "__root__" ? o.children?.[0] : o;
|
|
3684
3746
|
return this.zoomTreeBounds({
|
|
3685
3747
|
params: {
|
|
3686
3748
|
animate: e,
|
|
3687
3749
|
scale: n,
|
|
3688
3750
|
onCompleted: r
|
|
3689
3751
|
},
|
|
3690
|
-
x0:
|
|
3691
|
-
x1:
|
|
3692
|
-
y0:
|
|
3693
|
-
y1:
|
|
3752
|
+
x0: l - a.padding.left,
|
|
3753
|
+
x1: u + a.padding.right,
|
|
3754
|
+
y0: d - a.padding.top,
|
|
3755
|
+
y1: f + a.padding.bottom,
|
|
3756
|
+
focus: p ? {
|
|
3757
|
+
x: p.x + (s.nodeLeftX(p) + s.nodeRightX(p)) / 2,
|
|
3758
|
+
y: p.y + (s.nodeTopY(p) + s.nodeBottomY(p)) / 2
|
|
3759
|
+
} : void 0
|
|
3694
3760
|
}), this;
|
|
3695
3761
|
}
|
|
3696
3762
|
unsetUserTransform() {
|
|
@@ -3699,21 +3765,24 @@ var Z = {
|
|
|
3699
3765
|
}
|
|
3700
3766
|
zoomIn() {
|
|
3701
3767
|
let { svg: e, zoomBehavior: t } = this.getChartState();
|
|
3702
|
-
e.transition().call(t.scaleBy, 1.3);
|
|
3768
|
+
e && t && e.transition().call(t.scaleBy, 1.3);
|
|
3703
3769
|
}
|
|
3704
3770
|
zoomOut() {
|
|
3705
3771
|
let { svg: e, zoomBehavior: t } = this.getChartState();
|
|
3706
|
-
e.transition().call(t.scaleBy, .78);
|
|
3772
|
+
e && t && e.transition().call(t.scaleBy, .78);
|
|
3707
3773
|
}
|
|
3708
3774
|
destroy() {
|
|
3709
3775
|
let e = this.getChartState();
|
|
3710
3776
|
e.svg && (e.svg.selectAll("*").remove(), e.svg = null, e.chart = null);
|
|
3711
3777
|
}
|
|
3712
|
-
},
|
|
3713
|
-
let r =
|
|
3714
|
-
|
|
3778
|
+
}, $ = ve(), xo = (e, t, n) => {
|
|
3779
|
+
let r = String(n);
|
|
3780
|
+
return Array.from(e.querySelectorAll(".node[data-brush][data-value]")).find((e) => e.getAttribute("data-brush") === t && e.getAttribute("data-value") === r);
|
|
3781
|
+
}, So = (e, t, n) => {
|
|
3782
|
+
let r = y(), i = (0, D.useCallback)((t) => {
|
|
3783
|
+
t.data.brush && r.daedalus.emitEvent(le.Brush, {
|
|
3715
3784
|
data: {
|
|
3716
|
-
action:
|
|
3785
|
+
action: $.BrushEventAction.Hover,
|
|
3717
3786
|
data: [{
|
|
3718
3787
|
id: t.data.brush.key,
|
|
3719
3788
|
values: [t.data.brush.value]
|
|
@@ -3721,10 +3790,10 @@ var Z = {
|
|
|
3721
3790
|
},
|
|
3722
3791
|
emitter: e
|
|
3723
3792
|
});
|
|
3724
|
-
}, [r, e]), a = (0,
|
|
3725
|
-
t.data.brush && r.daedalus.emitEvent(
|
|
3793
|
+
}, [r, e]), a = (0, D.useCallback)((t) => {
|
|
3794
|
+
t.data.brush && r.daedalus.emitEvent(le.Brush, {
|
|
3726
3795
|
data: {
|
|
3727
|
-
action:
|
|
3796
|
+
action: $.BrushEventAction.Blur,
|
|
3728
3797
|
data: [{
|
|
3729
3798
|
id: t.data.brush.key,
|
|
3730
3799
|
values: [t.data.brush.value]
|
|
@@ -3732,50 +3801,50 @@ var Z = {
|
|
|
3732
3801
|
},
|
|
3733
3802
|
emitter: e
|
|
3734
3803
|
});
|
|
3735
|
-
}, [r, e]), o = (0,
|
|
3736
|
-
return o.current
|
|
3804
|
+
}, [r, e]), o = (0, D.useRef)();
|
|
3805
|
+
return o.current = (r) => {
|
|
3737
3806
|
if (r.emitter !== e && !(!t || !n.interactive)) switch (r.data.action) {
|
|
3738
|
-
case
|
|
3807
|
+
case $.BrushEventAction.Hover:
|
|
3739
3808
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3740
3809
|
n.forEach((n) => {
|
|
3741
|
-
t
|
|
3810
|
+
xo(t, e, n)?.classList.add("hovered");
|
|
3742
3811
|
});
|
|
3743
3812
|
});
|
|
3744
3813
|
break;
|
|
3745
|
-
case
|
|
3814
|
+
case $.BrushEventAction.Blur:
|
|
3746
3815
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3747
3816
|
n.forEach((n) => {
|
|
3748
|
-
t
|
|
3817
|
+
xo(t, e, n)?.classList.remove("hovered");
|
|
3749
3818
|
});
|
|
3750
3819
|
});
|
|
3751
3820
|
break;
|
|
3752
|
-
case
|
|
3821
|
+
case $.BrushEventAction.End:
|
|
3753
3822
|
t.querySelectorAll(".node.hovered").forEach((e) => e.classList.remove("hovered"));
|
|
3754
3823
|
break;
|
|
3755
3824
|
}
|
|
3756
|
-
},
|
|
3757
|
-
action:
|
|
3758
|
-
handler: ({ payload: e }) => e && o.current
|
|
3825
|
+
}, b({
|
|
3826
|
+
action: le.Brush,
|
|
3827
|
+
handler: ({ payload: e }) => e && o.current?.(e)
|
|
3759
3828
|
}, []), {
|
|
3760
3829
|
onTreeNodeHover: i,
|
|
3761
3830
|
onTreeNodeLeave: a
|
|
3762
3831
|
};
|
|
3763
|
-
},
|
|
3764
|
-
let { variables: t, variablesFetched: n, updateVariable: r } =
|
|
3832
|
+
}, Co = (e) => {
|
|
3833
|
+
let { variables: t, variablesFetched: n, updateVariable: r } = v();
|
|
3765
3834
|
return {
|
|
3766
|
-
variables: (0,
|
|
3835
|
+
variables: (0, D.useMemo)(() => {
|
|
3767
3836
|
let n = {};
|
|
3768
3837
|
return e.measures?.forEach((e) => {
|
|
3769
|
-
!e.slots || !
|
|
3770
|
-
let
|
|
3771
|
-
if (!
|
|
3772
|
-
let
|
|
3773
|
-
n[
|
|
3774
|
-
id:
|
|
3838
|
+
!e.slots || !p(e) || Object.values(e.slots).filter((e) => e.enabled && e.source === "variable" && e.propertyValue?.type === "variable").forEach((r) => {
|
|
3839
|
+
let a = r.propertyValue.variableName;
|
|
3840
|
+
if (!a) return;
|
|
3841
|
+
let o = t.find((e) => e.name === a);
|
|
3842
|
+
n[a] || (n[a] = {
|
|
3843
|
+
id: o?.id ?? null,
|
|
3775
3844
|
measureId: []
|
|
3776
3845
|
});
|
|
3777
|
-
let
|
|
3778
|
-
n[
|
|
3846
|
+
let s = i(e.dataItem);
|
|
3847
|
+
n[a].measureId.includes(s) || n[a].measureId.push(s);
|
|
3779
3848
|
});
|
|
3780
3849
|
}), n;
|
|
3781
3850
|
}, [
|
|
@@ -3786,122 +3855,125 @@ var Z = {
|
|
|
3786
3855
|
updateVariable: r,
|
|
3787
3856
|
variablesFetched: n
|
|
3788
3857
|
};
|
|
3789
|
-
},
|
|
3790
|
-
let n = e.dimensions.filter(
|
|
3858
|
+
}, wo = (e, t) => {
|
|
3859
|
+
let n = e.dimensions.filter(p), r = n.map((e) => i(e.dataItem)), a = n.length, o = (0, D.useMemo)(() => C(n.map((e) => ({
|
|
3791
3860
|
dataItem: e.dataItem,
|
|
3792
3861
|
dateLevel: void 0,
|
|
3793
3862
|
datePart: void 0,
|
|
3794
|
-
operator:
|
|
3795
|
-
})), { ignoreApplied: !0 }), [r]),
|
|
3796
|
-
if (!
|
|
3797
|
-
let { key: t, value: n } = e.data.brush, r =
|
|
3863
|
+
operator: ro.FilterOperator.InList
|
|
3864
|
+
})), { ignoreApplied: !0 }), [r]), s = (0, D.useCallback)((e) => {
|
|
3865
|
+
if (!a || !o?.length || !e.data.brush) return;
|
|
3866
|
+
let { key: t, value: n } = e.data.brush, r = o.find((e) => e.fieldKey === t && pe(e.operators));
|
|
3798
3867
|
if (!r) return;
|
|
3799
|
-
let
|
|
3800
|
-
r.state.pending && r.state.pending.includes(n) && (
|
|
3801
|
-
}, [
|
|
3802
|
-
return (0,
|
|
3803
|
-
t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")),
|
|
3868
|
+
let i = (r.operators.pending ?? r.operators.applied ?? r.operators.initial) === ro.FilterOperator.NotInList ? "off" : "on";
|
|
3869
|
+
r.state.pending && r.state.pending.includes(n) && (i = i === "off" ? "on" : "off"), r.onClick(n, { [i]: !0 });
|
|
3870
|
+
}, [o, r]);
|
|
3871
|
+
return (0, D.useEffect)(() => {
|
|
3872
|
+
t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")), o.forEach(({ fieldKey: e, state: n }) => {
|
|
3804
3873
|
n.pending !== null && n.pending.forEach((n) => {
|
|
3805
|
-
t
|
|
3874
|
+
e && xo(t, e, n)?.classList.add("selected");
|
|
3806
3875
|
});
|
|
3807
3876
|
}));
|
|
3808
|
-
}, [t, JSON.stringify(
|
|
3809
|
-
},
|
|
3877
|
+
}, [t, JSON.stringify(o)]), { onTreeNodeClick: s };
|
|
3878
|
+
}, To = (e, t) => {
|
|
3810
3879
|
e.next({
|
|
3811
|
-
action:
|
|
3880
|
+
action: w.SaveLocalVSpec,
|
|
3812
3881
|
payload: { vSpecChange: { treeChartSettings: { ...t } } },
|
|
3813
3882
|
mergeWith(e, t, n) {
|
|
3814
3883
|
if (n === "nodeExpandState") return t;
|
|
3815
3884
|
}
|
|
3816
3885
|
});
|
|
3817
|
-
},
|
|
3818
|
-
let
|
|
3886
|
+
}, Eo = 80, Do = (e, t, n, r) => {
|
|
3887
|
+
let a = (0, D.useRef)(e.treeChartSettings?.nodeExpandState ?? {}), o = r.forceAutoFit, s = ee(), c = Co(s), l = h(), u = ne(), d = e.dimensions.filter(p), f = d.length, [m] = (0, D.useState)(e.treeChartSettings?.transform ?? null), [g, _] = (0, D.useState)(m ?? {
|
|
3819
3888
|
k: 1,
|
|
3820
3889
|
x: 0,
|
|
3821
3890
|
y: 0
|
|
3822
|
-
}),
|
|
3823
|
-
|
|
3891
|
+
}), v = (0, D.useRef)(e.treeChartSettings?.transform), { onTreeNodeHover: y, onTreeNodeLeave: b } = So(n, t.current, r), { onTreeNodeClick: x } = wo(e, t.current), S = (0, D.useRef)(new bo()), C = (0, D.useRef)(null), te = !e.treeChartSettings.gridLayout?.enabled && e.treeChartSettings?.nodeLayout?.hoverStyle?.enabled, w = (0, D.useCallback)(() => {
|
|
3892
|
+
C.current &&= (clearTimeout(C.current), null);
|
|
3824
3893
|
}, []);
|
|
3825
|
-
return
|
|
3826
|
-
r.interactive &&
|
|
3894
|
+
return S.current.onNodeHover((e) => {
|
|
3895
|
+
r.interactive && y(e), te && (w(), S.current.highlight(e));
|
|
3827
3896
|
}).onNodeLeave((e) => {
|
|
3828
|
-
r.interactive &&
|
|
3829
|
-
|
|
3830
|
-
},
|
|
3897
|
+
r.interactive && b(e), te && (w(), C.current = setTimeout(() => {
|
|
3898
|
+
S.current.highlight(null), C.current = null;
|
|
3899
|
+
}, Eo));
|
|
3831
3900
|
}).onNodeClick((e) => {
|
|
3832
|
-
r.interactive &&
|
|
3901
|
+
r.interactive && x(e);
|
|
3833
3902
|
}).onNodeParentChange((t) => {
|
|
3834
|
-
if (
|
|
3903
|
+
if (f > 0) return;
|
|
3835
3904
|
let n = e.measures.find((e) => e.dataItem.uniqueSignature === t.data.id);
|
|
3836
|
-
n &&
|
|
3905
|
+
n && re(u, e.measures, i(n.dataItem), !t.parent || t.parent.data.id === "__root__" ? void 0 : t.parent.data.id);
|
|
3837
3906
|
}).onExpandOrCollapse((t) => {
|
|
3838
|
-
let n =
|
|
3839
|
-
r === n ? delete
|
|
3840
|
-
|
|
3907
|
+
let n = st(t, e.treeChartSettings?.initialExpandedLevels, d.length, e.totals?.enabled ?? !1), r = !((t._children?.length ?? 0) > 0 && !t.children?.length);
|
|
3908
|
+
r === n ? delete a.current[t.data.id] : a.current[t.data.id] = r, To(l, { nodeExpandState: a.current }), !(f > 0) && Object.values(c.variables).filter((e) => e.measureId.includes(t.data.id)).forEach((e) => {
|
|
3909
|
+
e.id && c.updateVariable(e.id, r, ro.VariableType.boolean);
|
|
3841
3910
|
});
|
|
3842
3911
|
}).onUserZoom(() => {
|
|
3843
|
-
|
|
3912
|
+
v.current = null;
|
|
3844
3913
|
}).onZoomEnd((e) => {
|
|
3845
|
-
if (
|
|
3914
|
+
if (o) return;
|
|
3846
3915
|
let t = {
|
|
3847
3916
|
k: e.transform.k,
|
|
3848
3917
|
x: e.transform.x,
|
|
3849
3918
|
y: e.transform.y
|
|
3850
3919
|
};
|
|
3851
|
-
t.k === g.k && t.x === g.x && t.y === g.y || (
|
|
3852
|
-
nodeExpandState:
|
|
3920
|
+
t.k === g.k && t.x === g.x && t.y === g.y || (_(t), To(l, {
|
|
3921
|
+
nodeExpandState: a.current,
|
|
3853
3922
|
transform: t
|
|
3854
3923
|
}));
|
|
3855
|
-
}), (0,
|
|
3856
|
-
e.treeChartSettings?.nodeExpandState && (
|
|
3857
|
-
}, [e.treeChartSettings?.nodeExpandState]), (0,
|
|
3858
|
-
|
|
3859
|
-
}, [
|
|
3860
|
-
|
|
3924
|
+
}), (0, D.useEffect)(() => () => w(), [w]), (0, D.useEffect)(() => {
|
|
3925
|
+
e.treeChartSettings?.nodeExpandState && (a.current = e.treeChartSettings.nodeExpandState ?? {});
|
|
3926
|
+
}, [e.treeChartSettings?.nodeExpandState]), (0, D.useEffect)(() => {
|
|
3927
|
+
s.treeChartSettings?.nodeExpandState || (a.current = {});
|
|
3928
|
+
}, [s.treeChartSettings?.initialExpandedLevels]), (0, D.useEffect)(() => {
|
|
3929
|
+
v.current = e.treeChartSettings?.transform, S.current && S.current.unsetUserTransform(), !(!e.treeChartSettings?.transform || !S.current) && S.current.applyTransform(e.treeChartSettings.transform);
|
|
3861
3930
|
}, [e.treeChartSettings?.transform]), {
|
|
3862
|
-
chart:
|
|
3863
|
-
expandedState:
|
|
3864
|
-
};
|
|
3865
|
-
},
|
|
3866
|
-
|
|
3931
|
+
chart: S.current,
|
|
3932
|
+
expandedState: a
|
|
3933
|
+
};
|
|
3934
|
+
}, Oo = ({ vSpec: e, vTheme: t, data: n, elementSize: r = {
|
|
3935
|
+
width: 0,
|
|
3936
|
+
height: 0
|
|
3937
|
+
}, vizProperties: i }) => {
|
|
3938
|
+
let a = i?.isEditMode ?? !1, o = i?.isPrintMode ?? !1, c = e?.treeChartSettings?.gridLayout?.enabled, l = e.dimensions.filter(p).length, u = e.measures.filter(p), d = (0, D.useRef)("tree-" + s(10)), f = (0, D.useRef)(null), m = e.treeChartSettings?.forceAutoFit === !0, { layout: h, treeSettings: g } = La(e, i), { chart: _, expandedState: v } = Do(e, f, d.current, g), y = Fa(e, f, _), b = ft({
|
|
3867
3939
|
vSpec: e,
|
|
3868
3940
|
data: n,
|
|
3869
|
-
nodeExpandState:
|
|
3870
|
-
}), [
|
|
3871
|
-
(0,
|
|
3941
|
+
nodeExpandState: v
|
|
3942
|
+
}), [x, S] = (0, D.useState)(!1);
|
|
3943
|
+
(0, D.useLayoutEffect)(() => (_ && _.init(), () => {
|
|
3872
3944
|
_?.destroy();
|
|
3873
|
-
}), [
|
|
3874
|
-
|
|
3875
|
-
}, [
|
|
3876
|
-
!
|
|
3945
|
+
}), [f.current]), (0, D.useEffect)(() => {
|
|
3946
|
+
x ? _.enableDrag() : _.disableDrag();
|
|
3947
|
+
}, [x]), (0, D.useEffect)(() => {
|
|
3948
|
+
!f.current || !_ || !r.width || !r.height || y(b, g);
|
|
3877
3949
|
}, [
|
|
3878
3950
|
r.width,
|
|
3879
3951
|
r.height,
|
|
3880
|
-
|
|
3952
|
+
y
|
|
3881
3953
|
]);
|
|
3882
|
-
let
|
|
3883
|
-
(0,
|
|
3884
|
-
|
|
3954
|
+
let C = a && l === 0 && !c;
|
|
3955
|
+
(0, D.useEffect)(() => {
|
|
3956
|
+
f.current && y(b, g);
|
|
3885
3957
|
}, [
|
|
3886
|
-
|
|
3958
|
+
b,
|
|
3887
3959
|
JSON.stringify(g),
|
|
3888
|
-
|
|
3960
|
+
y
|
|
3889
3961
|
]);
|
|
3890
|
-
let
|
|
3962
|
+
let ee = Re({
|
|
3891
3963
|
vTheme: t,
|
|
3892
3964
|
vSpec: e,
|
|
3893
|
-
id:
|
|
3965
|
+
id: d.current,
|
|
3894
3966
|
layout: h
|
|
3895
3967
|
});
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3968
|
+
return /* @__PURE__ */ (0, E.jsxs)("div", {
|
|
3897
3969
|
style: {
|
|
3898
3970
|
width: "100%",
|
|
3899
3971
|
height: "100%"
|
|
3900
3972
|
},
|
|
3901
|
-
id:
|
|
3902
|
-
"data-mode":
|
|
3973
|
+
id: d.current,
|
|
3974
|
+
"data-mode": a ? "edit" : "view",
|
|
3903
3975
|
children: [
|
|
3904
|
-
!
|
|
3976
|
+
!o && /* @__PURE__ */ (0, E.jsxs)("div", {
|
|
3905
3977
|
className: "tree-toolbar",
|
|
3906
3978
|
style: {
|
|
3907
3979
|
position: "absolute",
|
|
@@ -3911,33 +3983,36 @@ var Z = {
|
|
|
3911
3983
|
top: 0,
|
|
3912
3984
|
gap: 10
|
|
3913
3985
|
},
|
|
3914
|
-
children: [
|
|
3986
|
+
children: [C && /* @__PURE__ */ (0, E.jsx)(Ce, {
|
|
3915
3987
|
size: "small",
|
|
3916
3988
|
value: "organize",
|
|
3917
|
-
selected:
|
|
3918
|
-
onChange: () =>
|
|
3919
|
-
disabled:
|
|
3920
|
-
children: /* @__PURE__ */ (0,
|
|
3921
|
-
}), !m && /* @__PURE__ */ (0,
|
|
3989
|
+
selected: x,
|
|
3990
|
+
onChange: () => S(!x),
|
|
3991
|
+
disabled: u.length < 2,
|
|
3992
|
+
children: /* @__PURE__ */ (0, E.jsx)(Le, {})
|
|
3993
|
+
}), !m && /* @__PURE__ */ (0, E.jsx)(Ce, {
|
|
3922
3994
|
value: "",
|
|
3923
3995
|
size: "small",
|
|
3924
3996
|
onClick: () => _?.fit(),
|
|
3925
|
-
children: /* @__PURE__ */ (0,
|
|
3997
|
+
children: /* @__PURE__ */ (0, E.jsx)(te, {})
|
|
3926
3998
|
})]
|
|
3927
3999
|
}),
|
|
3928
|
-
/* @__PURE__ */ (0,
|
|
3929
|
-
/* @__PURE__ */ (0,
|
|
4000
|
+
/* @__PURE__ */ (0, E.jsx)("style", { children: ee }),
|
|
4001
|
+
/* @__PURE__ */ (0, E.jsx)("div", {
|
|
3930
4002
|
style: {
|
|
3931
4003
|
width: "100%",
|
|
3932
4004
|
height: "100%"
|
|
3933
4005
|
},
|
|
3934
|
-
ref:
|
|
4006
|
+
ref: f
|
|
3935
4007
|
})
|
|
3936
4008
|
]
|
|
3937
4009
|
});
|
|
3938
|
-
},
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
4010
|
+
}, ko = _((e) => {
|
|
4011
|
+
let { vSpec: t, data: n } = e;
|
|
4012
|
+
return !t || !n || !f(t) ? null : /* @__PURE__ */ (0, E.jsx)(Oo, {
|
|
4013
|
+
...e,
|
|
4014
|
+
vSpec: t,
|
|
4015
|
+
data: n
|
|
4016
|
+
});
|
|
3942
4017
|
});
|
|
3943
|
-
export {
|
|
4018
|
+
export { ko as Tree };
|