@astrato-io/visualizations 0.6.4 → 0.6.5

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/THIRD_PARTY_NOTICES.md +94 -4
  3. package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
  4. package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-B1FeWaen.js} +54 -54
  5. package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
  6. package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
  7. package/chunks/{src-Cum_2NLV.js → builder-B6dWSIdD.js} +5779 -5635
  8. package/chunks/{coloring-C16AUZEi.js → coloring-B1XAfg6b.js} +234 -233
  9. package/chunks/{src-BC7cGcJ-.js → definitions-D3OVqmXl.js} +438 -360
  10. package/chunks/{escobar-BGqT1EsE.js → escobar-eDjtGpkC.js} +4645 -4619
  11. package/chunks/filter.compiler-DBsyRBJt.js +70 -0
  12. package/chunks/{filtering-Yq4DEa0t.js → filtering-tqjAyJH5.js} +432 -313
  13. package/chunks/{grouping-type-BX_9Ix5q.js → grouping-type-On4s9Thj.js} +1 -1
  14. package/chunks/handlers-VTBfIZYZ.js +13072 -0
  15. package/chunks/isEqual-BDxAhUo8.js +7514 -0
  16. package/chunks/line.compiler-CzdM5Ld0.js +198 -0
  17. package/chunks/{metadata-CPXdYoln.js → metadata-BGElBy5Z.js} +1 -1
  18. package/chunks/number.compiler-G-R7y16P.js +53 -0
  19. package/chunks/{src-C0LgoUWY.js → operations-CTNUX6Sy.js} +9576 -9432
  20. package/chunks/{range-DrzdfBX4.js → range-CiwTbMig.js} +2 -2
  21. package/chunks/{registry-CExpGJ1N.js → registry-CsQQzukD.js} +153 -153
  22. package/chunks/{requirements-DNhuShLS.js → requirements-DYjZCFyf.js} +1 -1
  23. package/chunks/{shared-CKDL4hx9.js → shared-CBvcC5YV.js} +460 -413
  24. package/chunks/{standalone-D5vnf-9y.js → standalone-0M4HlmDW2.js} +823 -822
  25. package/chunks/standalone-0ashe9w1.js +411 -0
  26. package/chunks/{standalone-C85u7U6I.js → standalone-B7jax8wa.js} +93 -94
  27. package/chunks/standalone-BK0VYU-l.js +463 -0
  28. package/chunks/{standalone-BDCwI6Hn.js → standalone-BMIbT1b2.js} +815 -815
  29. package/chunks/standalone-BZV5vOwA.js +6 -0
  30. package/chunks/standalone-BhDrWj4p.js +1980 -0
  31. package/chunks/{standalone-CNyNHKVx.js → standalone-BtSHCp2U2.js} +97 -98
  32. package/chunks/{standalone-CDQnr6qT.js → standalone-BvaKdky9.js} +95 -96
  33. package/chunks/standalone-BwtM31-f.js +2 -0
  34. package/chunks/{standalone-CY57qwZ-.js → standalone-C3gg736V.js} +153 -153
  35. package/chunks/{standalone-DFPva_ku.js → standalone-CC1VUjO32.js} +60 -60
  36. package/chunks/{standalone-CCNtaJ7s.js → standalone-C_rYnZ0N.js} +41 -41
  37. package/chunks/{standalone-CZynjFG7.js → standalone-CoLrAxRV.js} +3701 -3482
  38. package/chunks/{standalone-jiz0L2Dg.js → standalone-DC-aUgXC.js} +104 -104
  39. package/chunks/standalone-DCtRoTWg.js +675 -0
  40. package/chunks/standalone-DUDFTBqL.js +833 -0
  41. package/chunks/standalone-DhZkX9Td.js +2 -0
  42. package/chunks/{standalone-Dx3MLlrO.js → standalone-DtLElfuM.js} +141 -141
  43. package/chunks/{standalone-BmfMt74U.js → standalone-G9Q4Uczu.js} +192 -192
  44. package/chunks/{standalone-BH5NqDwp.js → standalone-JuLF-OoH.js} +390 -391
  45. package/chunks/standalone-_DeX21JJ.js +383 -0
  46. package/chunks/{standalone-lBm9hQ-q.js → standalone-gFhKZh8m.js} +34 -34
  47. package/chunks/standalone-tDNy-SFH.js +281 -0
  48. package/chunks/{standalone-rJ45Zfl1.js → standalone-v1oxfU20.js} +10 -10
  49. package/chunks/{standalone-BYm1UjLr.js → standalone-vzBY6q0I2.js} +18 -18
  50. package/chunks/table.compiler-tb914oj3.js +222 -0
  51. package/chunks/{ui-D1HQNIBy.js → ui-DQWtv2iM.js} +13485 -3973
  52. package/chunks/{useFieldName-oqQ3bvnO.js → useFieldName-BvdcoJRl.js} +1 -1
  53. package/chunks/{utils-Ba9T0TqC.js → utils-Bg7K-t6K.js} +7306 -6024
  54. package/chunks/{src-DvX5LU9T.js → view-Bn83C8d9.js} +2555 -4831
  55. package/definitions.js +3 -3
  56. package/docs/operations/astrato-app-filter-bar.md +17 -17
  57. package/docs/operations/bar.md +989 -1071
  58. package/docs/operations/combo.md +717 -738
  59. package/docs/operations/date-picker.md +25 -25
  60. package/docs/operations/distribution-gauge.md +471 -607
  61. package/docs/operations/dot.md +787 -879
  62. package/docs/operations/filter.md +139 -163
  63. package/docs/operations/gauge.md +491 -627
  64. package/docs/operations/heatMap.md +834 -916
  65. package/docs/operations/histogram.md +166 -180
  66. package/docs/operations/iframe.md +5 -5
  67. package/docs/operations/image.md +16 -16
  68. package/docs/operations/index.md +12 -12
  69. package/docs/operations/line.md +811 -888
  70. package/docs/operations/number.md +470 -536
  71. package/docs/operations/pie.md +825 -958
  72. package/docs/operations/radar.md +599 -679
  73. package/docs/operations/sankey.md +462 -584
  74. package/docs/operations/scatter.md +823 -929
  75. package/docs/operations/shape.md +34 -34
  76. package/docs/operations/simpleTextObject.md +18 -25
  77. package/docs/operations/slider.md +33 -43
  78. package/docs/operations/table.md +1160 -1150
  79. package/docs/operations/tree.md +354 -361
  80. package/docs/operations/treemap.md +545 -637
  81. package/docs/operations/waterfall.md +369 -379
  82. package/docs/operations/word-cloud.md +512 -583
  83. package/getters.js +3 -3
  84. package/index.js +51 -51
  85. package/metadata.js +3 -3
  86. package/operations.js +7 -7
  87. package/package.json +80 -86
  88. package/src/definitions/index.d.ts +2 -2
  89. package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
  90. package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
  91. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  92. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
  93. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  94. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  95. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  96. package/src/definitions/model/definitions/index.d.ts +23 -0
  97. package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
  98. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  99. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  100. package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
  101. package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
  102. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  103. package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +6 -6
  104. package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
  105. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  106. package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
  107. package/chunks/Radio-Ciu-F4CU.js +0 -957
  108. package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
  109. package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
  110. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
  111. package/chunks/bar.compiler-oqaPzIut.js +0 -370
  112. package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
  113. package/chunks/event-bus-KiSiCJrC.js +0 -2683
  114. package/chunks/filter.compiler-CuLtc_02.js +0 -60
  115. package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
  116. package/chunks/interfaces-VUY4_yVO.js +0 -8742
  117. package/chunks/line-settings-DfYTUyPz.js +0 -4
  118. package/chunks/line.compiler-BpA_6Tc7.js +0 -188
  119. package/chunks/number.compiler-DbkWcG4S.js +0 -44
  120. package/chunks/pie-uv42Eqal.js +0 -10
  121. package/chunks/src-Dun_jXtz.js +0 -10295
  122. package/chunks/standalone-87YV_m9n.js +0 -687
  123. package/chunks/standalone-BLVAWLNJ.js +0 -385
  124. package/chunks/standalone-BPomtAVs.js +0 -2
  125. package/chunks/standalone-BXyBcUOQ.js +0 -2
  126. package/chunks/standalone-BllF4rDp.js +0 -383
  127. package/chunks/standalone-BqWyrnZI.js +0 -281
  128. package/chunks/standalone-DQxxNwF8.js +0 -675
  129. package/chunks/standalone-DS9T0FZ-.js +0 -830
  130. package/chunks/standalone-DzixzZAL.js +0 -411
  131. package/chunks/standalone-QJ1kKMnO.js +0 -6
  132. package/chunks/table.compiler-BrXkm4Fz.js +0 -213
  133. package/chunks/toInteger-DVZr-D1j.js +0 -11
  134. package/chunks/treemap-x_zmJoG7.js +0 -23
  135. package/chunks/types-dVVCsDWD.js +0 -4
  136. package/chunks/view-CLqWMV7Z.js +0 -156
  137. package/src/definitions/shared/index.d.ts +0 -5
  138. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
  139. package/src/definitions/shared/lib/registry/index.d.ts +0 -3
  140. package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
  141. package/src/definitions/shared/lib/types/index.d.ts +0 -3
  142. package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
  143. package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
  144. package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
  145. package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
  146. package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
  147. package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
  148. /package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +0 -0
  149. /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
@@ -1,27 +1,25 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Fi as t, Kn as n, Mi as r, Ni as i, Ns as a, Oa as o, Os as s, Ti as c, d as l, ds as u, i as d, pc as f, za as p } from "./interfaces-VUY4_yVO.js";
3
- import { B as m, Ki as h, M as g, N as _, Pr as v, Un as y, Zt as b, a as x, hn as S, s as C, u as ee, wi as w, xn as te } from "./utils-Ba9T0TqC.js";
4
- import { Oi as ne } from "./src-Dun_jXtz.js";
5
- import { C as T, E as re, Gt as ie, Ht as ae, Jt as E, O as oe, T as se, a as ce, d as le, f as ue, g as de, k as D, m as fe, u as pe, v as me, x as he, y as ge } from "./escobar-BGqT1EsE.js";
6
- import { p as _e } from "./ui-D1HQNIBy.js";
7
- import { _t as ve, l as ye } from "./_baseFlatten-DPXPOrea.js";
8
- import { t as be } from "./ToggleButton-BCJc3Jlc.js";
9
- import { c as xe, m as Se } from "./coloring-C16AUZEi.js";
10
- import { f as Ce, r as we, t as Te, u as Ee, y as De } from "./src-D9XogOrc.js";
11
- import { a as Oe, i as ke, r as Ae, t as je } from "./accessors-DemrDevR.js";
12
- import { r as Me, t as Ne } from "./src-BOS6SqkZ.js";
13
- var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s }) => {
14
- let c = e?.fonts?.general.fontFamily ?? "Roboto", l = {
15
- ...r,
2
+ import { Ai as t, Ea as n, Es as r, Hn as i, La as a, Mi as o, Si as s, Ta as c, fc as l, js as u, ki as d, n as f } from "./isEqual-BDxAhUo8.js";
3
+ import { $t as p, B as m, Cn as h, Ei as g, Gn as _, Ir as v, M as y, N as b, Yi as x, Zi as S, _n as C, a as w, s as T, u as ee } from "./utils-Bg7K-t6K.js";
4
+ import { Oi as te } from "./handlers-VTBfIZYZ.js";
5
+ import { Ht as E, On as ne, S as re, mt as ie } from "./ui-DQWtv2iM.js";
6
+ import { C as ae, E as oe, Gt as se, Ht as ce, Jt as D, O as le, T as ue, a as de, d as fe, f as pe, g as me, k as O, m as he, u as ge, v as _e, x as ve, y as ye } from "./escobar-eDjtGpkC.js";
7
+ import { l as be, r as xe } from "./coloring-B1XAfg6b.js";
8
+ import { f as Se, r as Ce, t as we, u as Te, y as Ee } from "./src-D9XogOrc.js";
9
+ import { a as De, i as Oe, r as ke, t as Ae } from "./accessors-DemrDevR.js";
10
+ import { r as je, t as Me } from "./src-BOS6SqkZ.js";
11
+ var k = /* @__PURE__ */ e(x()), Ne = ({ vTheme: e, vSpec: n, id: r, layout: i }) => {
12
+ let a = e?.fonts?.general.fontFamily ?? "Roboto", s = {
13
+ ...d,
16
14
  ...n.treeChartSettings?.nodeLayout?.border
17
15
  };
18
- l.enabled === !1 && (l.borderWidth = 0);
19
- let u = {
20
- ...i,
16
+ s.enabled === !1 && (s.borderWidth = 0);
17
+ let l = {
18
+ ...t,
21
19
  ...n.treeChartSettings?.nodeLayout.hoverStyle
22
- }, d = n.treeChartSettings?.nodeLayout?.backgroundColor ?? t.backgroundColor, f = new ye(d).isLight() ? o.grey1 : o.grey5;
20
+ }, u = n.treeChartSettings?.nodeLayout?.backgroundColor ?? o.backgroundColor, f = new ie(u).isLight() ? c.grey1 : c.grey5;
23
21
  return `
24
- #${a} {
22
+ #${r} {
25
23
  &[data-mode="view"] .tree-toolbar {
26
24
  display: none;
27
25
  }
@@ -29,19 +27,19 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
29
27
  display: flex;
30
28
  }
31
29
 
32
- --link-color: ${o.grey3};
30
+ --link-color: ${c.grey3};
33
31
 
34
- --border-color: ${l.borderColor};
35
- --border-width: ${l.borderWidth}px;
36
- --border-color-edit: ${o.secondaryPurple};
37
- --border-radius: ${l.borderRadius}px;
38
- --border-color-selected: ${o.grey2};
32
+ --border-color: ${s.borderColor};
33
+ --border-width: ${s.borderWidth}px;
34
+ --border-color-edit: ${c.secondaryPurple};
35
+ --border-radius: ${s.borderRadius}px;
36
+ --border-color-selected: ${c.grey2};
39
37
 
40
- --border-hover-width: ${u.borderWidth}px;
41
- --border-hover-color: ${u.borderColor || l.borderColor};
38
+ --border-hover-width: ${l.borderWidth}px;
39
+ --border-hover-color: ${l.borderColor || s.borderColor};
42
40
 
43
- --node-background: ${d};
44
- --node-background-highlight: ${o.grey2};
41
+ --node-background: ${u};
42
+ --node-background-highlight: ${c.grey2};
45
43
  --font-color: ${f};
46
44
 
47
45
  .links-wrapper path {
@@ -68,14 +66,14 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
68
66
 
69
67
  .button-content {
70
68
  border:1px solid var(--border-color);
71
- border-radius: ${Math.ceil(l.borderRadius / 2)}px;
69
+ border-radius: ${Math.ceil(s.borderRadius / 2)}px;
72
70
  padding:1px 3px;
73
71
  font-size:9px;
74
72
  margin:auto auto;
75
73
  background-color: var(--node-background);
76
74
  }
77
75
  &:hover .button-content {
78
- background-color: ${o.grey5};
76
+ background-color: ${c.grey5};
79
77
  }
80
78
  }
81
79
 
@@ -93,7 +91,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
93
91
  .node-content {
94
92
  color: var(--font-color);
95
93
  font-size: 12px;
96
- font-family: ${c}, sans-serif;
94
+ font-family: ${a}, sans-serif;
97
95
  width: 100%;
98
96
  height: 100%;
99
97
  border: var(--border-width) solid var(--border-color);
@@ -131,7 +129,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
131
129
  }
132
130
 
133
131
  .dragging-active .drop-target .node-content::after {
134
- background-color: ${o.feedbackBlue};
132
+ background-color: ${c.feedbackBlue};
135
133
  opacity: 1;
136
134
  }
137
135
 
@@ -150,7 +148,7 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
150
148
  width: 100%;
151
149
  height: 100%;
152
150
  border-radius: var(--border-radius);
153
- background-color: ${o.grey2};
151
+ background-color: ${c.grey2};
154
152
  opacity: 0.2;
155
153
  }
156
154
  .node-excluded .node-foreign-object-div {
@@ -158,27 +156,27 @@ var O = /* @__PURE__ */ e(h()), Pe = ({ vTheme: e, vSpec: n, id: a, layout: s })
158
156
  }
159
157
  }
160
158
 
161
- ${s.getCSS(a, n)}`;
162
- }, Fe = { depth: -1 }, Ie = {}, Le = {};
163
- function Re(e) {
159
+ ${i.getCSS(r, n)}`;
160
+ }, Pe = { depth: -1 }, Fe = {}, Ie = {};
161
+ function Le(e) {
164
162
  return e.id;
165
163
  }
166
- function ze(e) {
164
+ function Re(e) {
167
165
  return e.parentId;
168
166
  }
169
- function Be() {
170
- var e = Re, t = ze, n;
167
+ function ze() {
168
+ var e = Le, t = Re, n;
171
169
  function r(r) {
172
170
  var i = Array.from(r), a = e, o = t, s, c, l, u, d, f, p, m, h = /* @__PURE__ */ new Map();
173
171
  if (n != null) {
174
- let e = i.map((e, t) => Ve(n(e, t, r))), t = e.map(He), s = new Set(e).add("");
175
- for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(He(n)), i.push(Le));
172
+ let e = i.map((e, t) => Be(n(e, t, r))), t = e.map(Ve), s = new Set(e).add("");
173
+ for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(Ve(n)), i.push(Ie));
176
174
  a = (t, n) => e[n], o = (e, n) => t[n];
177
175
  }
178
- for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new Ae(c), (p = a(c, l, r)) != null && (p += "") && (m = f.id = p, h.set(m, h.has(m) ? Ie : f)), (p = o(c, l, r)) != null && (p += "") && (f.parent = p);
176
+ for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new ke(c), (p = a(c, l, r)) != null && (p += "") && (m = f.id = p, h.set(m, h.has(m) ? Fe : f)), (p = o(c, l, r)) != null && (p += "") && (f.parent = p);
179
177
  for (l = 0; l < s; ++l) if (f = i[l], p = f.parent) {
180
178
  if (d = h.get(p), !d) throw Error("missing: " + p);
181
- if (d === Ie) throw Error("ambiguous: " + p);
179
+ if (d === Fe) throw Error("ambiguous: " + p);
182
180
  d.children ? d.children.push(f) : d.children = [f], f.parent = d;
183
181
  } else {
184
182
  if (u) throw Error("multiple roots");
@@ -186,34 +184,34 @@ function Be() {
186
184
  }
187
185
  if (!u) throw Error("no root");
188
186
  if (n != null) {
189
- for (; u.data === Le && u.children.length === 1;) u = u.children[0], --s;
190
- for (let e = i.length - 1; e >= 0 && (f = i[e], f.data === Le); --e) f.data = null;
187
+ for (; u.data === Ie && u.children.length === 1;) u = u.children[0], --s;
188
+ for (let e = i.length - 1; e >= 0 && (f = i[e], f.data === Ie); --e) f.data = null;
191
189
  }
192
- if (u.parent = Fe, u.eachBefore(function(e) {
190
+ if (u.parent = Pe, u.eachBefore(function(e) {
193
191
  e.depth = e.parent.depth + 1, --s;
194
- }).eachBefore(ke), u.parent = null, s > 0) throw Error("cycle");
192
+ }).eachBefore(Oe), u.parent = null, s > 0) throw Error("cycle");
195
193
  return u;
196
194
  }
197
195
  return r.id = function(t) {
198
- return arguments.length ? (e = je(t), r) : e;
196
+ return arguments.length ? (e = Ae(t), r) : e;
199
197
  }, r.parentId = function(e) {
200
- return arguments.length ? (t = je(e), r) : t;
198
+ return arguments.length ? (t = Ae(e), r) : t;
201
199
  }, r.path = function(e) {
202
- return arguments.length ? (n = je(e), r) : n;
200
+ return arguments.length ? (n = Ae(e), r) : n;
203
201
  }, r;
204
202
  }
205
- function Ve(e) {
203
+ function Be(e) {
206
204
  e = `${e}`;
207
205
  let t = e.length;
208
- return Ue(e, t - 1) && !Ue(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
206
+ return He(e, t - 1) && !He(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
209
207
  }
210
- function He(e) {
208
+ function Ve(e) {
211
209
  let t = e.length;
212
210
  if (t < 2) return "";
213
- for (; --t > 1 && !Ue(e, t););
211
+ for (; --t > 1 && !He(e, t););
214
212
  return e.slice(0, t);
215
213
  }
216
- function Ue(e, t) {
214
+ function He(e, t) {
217
215
  if (e[t] === "/") {
218
216
  let n = 0;
219
217
  for (; t > 0 && e[--t] === "\\";) ++n;
@@ -221,39 +219,39 @@ function Ue(e, t) {
221
219
  }
222
220
  return !1;
223
221
  }
224
- function We(e, t) {
222
+ function Ue(e, t) {
225
223
  return e.parent === t.parent ? 1 : 2;
226
224
  }
227
- function Ge(e) {
225
+ function We(e) {
228
226
  var t = e.children;
229
227
  return t ? t[0] : e.t;
230
228
  }
231
- function Ke(e) {
229
+ function Ge(e) {
232
230
  var t = e.children;
233
231
  return t ? t[t.length - 1] : e.t;
234
232
  }
235
- function qe(e, t, n) {
233
+ function Ke(e, t, n) {
236
234
  var r = n / (t.i - e.i);
237
235
  t.c -= r, t.s += n, e.c += r, t.z += n, t.m += n;
238
236
  }
239
- function Je(e) {
237
+ function qe(e) {
240
238
  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
239
  }
242
- function Ye(e, t, n) {
240
+ function Je(e, t, n) {
243
241
  return e.a.parent === t.parent ? e.a : n;
244
242
  }
245
- function Xe(e, t) {
243
+ function Ye(e, t) {
246
244
  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
245
  }
248
- Xe.prototype = Object.create(Ae.prototype);
249
- function Ze(e) {
250
- for (var t = new Xe(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 Xe(a[o], o)), i.parent = n;
251
- return (t.parent = new Xe(null, 0)).children = [t], t;
246
+ Ye.prototype = Object.create(ke.prototype);
247
+ function Xe(e) {
248
+ for (var t = new Ye(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 Ye(a[o], o)), i.parent = n;
249
+ return (t.parent = new Ye(null, 0)).children = [t], t;
252
250
  }
253
- function Qe() {
254
- var e = We, t = 1, n = 1, r = null;
251
+ function Ze() {
252
+ var e = Ue, t = 1, n = 1, r = null;
255
253
  function i(i) {
256
- var s = Ze(i);
254
+ var s = Xe(i);
257
255
  if (s.eachAfter(a), s.parent.m = -s.z, s.eachBefore(o), r) i.eachBefore(c);
258
256
  else {
259
257
  var l = i, u = i, d = i;
@@ -270,7 +268,7 @@ function Qe() {
270
268
  function a(t) {
271
269
  var n = t.children, r = t.parent.children, i = t.i ? r[t.i - 1] : null;
272
270
  if (n) {
273
- Je(t);
271
+ qe(t);
274
272
  var a = (n[0].z + n[n.length - 1].z) / 2;
275
273
  i ? (t.z = i.z + e(t._, i._), t.m = t.z - a) : t.z = a;
276
274
  } else i && (t.z = i.z + e(t._, i._));
@@ -281,8 +279,8 @@ function Qe() {
281
279
  }
282
280
  function s(t, n, r) {
283
281
  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 = Ke(o), i = Ge(i), o && i;) s = Ge(s), a = Ke(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (qe(Ye(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
285
- o && !Ke(a) && (a.t = o, a.m += u - l), i && !Ge(s) && (s.t = i, s.m += c - d, r = t);
282
+ 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 = Ge(o), i = We(i), o && i;) s = We(s), a = Ge(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (Ke(Je(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
283
+ o && !Ge(a) && (a.t = o, a.m += u - l), i && !We(s) && (s.t = i, s.m += c - d, r = t);
286
284
  }
287
285
  return r;
288
286
  }
@@ -297,14 +295,14 @@ function Qe() {
297
295
  return arguments.length ? (r = !0, t = +e[0], n = +e[1], i) : r ? [t, n] : null;
298
296
  }, i;
299
297
  }
300
- var k = "__root__", $e = "__total__", et = (e) => `__dimension__${JSON.stringify(e)}`, tt = (e, t) => {
298
+ var A = "__root__", Qe = "__total__", $e = (e) => `__dimension__${JSON.stringify(e)}`, et = (e, t) => {
301
299
  let n = e[t];
302
300
  return n == null ? ["nil"] : [
303
301
  "value",
304
302
  typeof n,
305
303
  n
306
304
  ];
307
- }, nt = (e, t) => {
305
+ }, tt = (e, t) => {
308
306
  if (t?.indicator !== "custom") return;
309
307
  let n = t?.indicatorThreshold;
310
308
  if (!n || e == null) return {
@@ -330,7 +328,7 @@ var k = "__root__", $e = "__total__", et = (e) => `__dimension__${JSON.stringify
330
328
  color: null,
331
329
  icon: void 0
332
330
  };
333
- }, rt = (e, t, n, r) => {
331
+ }, nt = (e, t, n, r) => {
334
332
  let i = {};
335
333
  return e.slots?.forEach((n) => {
336
334
  if (n.key === "main") return;
@@ -345,51 +343,51 @@ var k = "__root__", $e = "__total__", et = (e) => `__dimension__${JSON.stringify
345
343
  if (n.source === "field") {
346
344
  let o = r?.find((t) => t.parentId === e.dataItem.uniqueSignature && t.role === `tree-${n.key}`);
347
345
  if (o) {
348
- let e = f(o.dataItem);
349
- o.formatter && (i = o.formatter), e && (a.value = t?.[e], a.label = a.value === null ? "-" : S(i?.format, a.value) ?? "-");
346
+ let e = l(o.dataItem);
347
+ o.formatter && (i = o.formatter), e && (a.value = t?.[e], a.label = a.value === null ? "-" : C(i?.format, a.value) ?? "-");
350
348
  }
351
- } else n.source === "variable" && (a.value = n.propertyValue, a.label = a.value === null ? "-" : S(i?.format, a.value) ?? "-");
352
- a.customIndicator = nt(a.value, n);
349
+ } else n.source === "variable" && (a.value = n.propertyValue, a.label = a.value === null ? "-" : C(i?.format, a.value) ?? "-");
350
+ a.customIndicator = tt(a.value, n);
353
351
  }
354
352
  i[n.key] = { ...a };
355
353
  }), i;
356
- }, it = (e, t, n, r = !1) => {
354
+ }, rt = (e, t, n, r = !1) => {
357
355
  if (n === 0 || e.data.id === "__total__") return !0;
358
356
  let i = t ?? 2;
359
357
  return e.depth - +!!r < i;
360
- }, at = (e, t, r) => {
361
- let i = [{
362
- id: k,
358
+ }, it = (e, t, n) => {
359
+ let r = [{
360
+ id: A,
363
361
  parentId: null,
364
362
  disabled: !1
365
363
  }], a = /* @__PURE__ */ new Set();
366
364
  e.measures.forEach((e) => {
367
365
  a.add(e.dataItem.uniqueSignature);
368
366
  });
369
- let o = e.measures.filter((e) => c(e));
367
+ let o = e.measures.filter((e) => s(e));
370
368
  e.measures.forEach((e) => {
371
- let t = e.dataItem.uniqueSignature, n = e.parentId && a.has(e.parentId) ? e.parentId : k;
372
- i.push({
369
+ let t = e.dataItem.uniqueSignature, n = e.parentId && a.has(e.parentId) ? e.parentId : A;
370
+ r.push({
373
371
  id: t,
374
372
  parentId: n,
375
- disabled: !c(e)
373
+ disabled: !s(e)
376
374
  });
377
375
  });
378
- let s = Be().id((e) => e.id).parentId((e) => e.parentId)(i), l = [];
379
- s.descendants().forEach((e) => {
376
+ let c = ze().id((e) => e.id).parentId((e) => e.parentId)(r), u = [];
377
+ c.descendants().forEach((e) => {
380
378
  if (e.data.disabled) return;
381
379
  let t = e.ancestors().slice(1).find((e) => !e.data.disabled);
382
- t ? l.push({
380
+ t ? u.push({
383
381
  id: e.data.id,
384
382
  parentId: t.data.id
385
- }) : l.push({
383
+ }) : u.push({
386
384
  id: e.data.id,
387
385
  parentId: null
388
386
  });
389
387
  });
390
- let u = l.map((r) => {
391
- if (r.id === "__root__") return {
392
- id: r.id,
388
+ let d = u.map((n) => {
389
+ if (n.id === "__root__") return {
390
+ id: n.id,
393
391
  parentId: null,
394
392
  label: "Dummy Root",
395
393
  value: {
@@ -397,125 +395,125 @@ var k = "__root__", $e = "__total__", et = (e) => `__dimension__${JSON.stringify
397
395
  value: null
398
396
  }
399
397
  };
400
- let i = o.find((e) => e.dataItem.uniqueSignature === r.id), a = f(i.dataItem), s = t[0].items?.[0], c = i ? rt(i, s, o, e.supportingMeasures) : {}, l = s?.[a], u = i?.slots?.find((e) => e.key === "main");
398
+ let r = o.find((e) => e.dataItem.uniqueSignature === n.id), a = l(r.dataItem), s = t[0].items?.[0], c = r ? nt(r, s, o, e.supportingMeasures) : {}, u = s?.[a], d = r?.slots?.find((e) => e.key === "main");
401
399
  return {
402
- id: r.id,
403
- parentId: r.parentId,
404
- label: n(i),
400
+ id: n.id,
401
+ parentId: n.parentId,
402
+ label: i(r),
405
403
  value: {
406
- label: S(i.formatter?.format, t[0].items?.[0]?.[a]) ?? "-",
407
- value: l
404
+ label: C(r.formatter?.format, t[0].items?.[0]?.[a]) ?? "-",
405
+ value: u
408
406
  },
409
- indicator: u?.indicator ?? null,
410
- customIndicator: nt(l, u),
407
+ indicator: d?.indicator ?? null,
408
+ customIndicator: tt(u, d),
411
409
  brush: {
412
- key: [ie.sourceKey, ie.field].join("/"),
413
- value: ae(i)
410
+ key: [se.sourceKey, se.field].join("/"),
411
+ value: ce(r)
414
412
  },
415
413
  ...c
416
414
  };
417
- }), d = Be().id((e) => e.id).parentId((e) => e.parentId)(u), p = o.map((e) => e.dataItem.uniqueSignature);
418
- return d.sort((e, t) => p.indexOf(e.data.id) - p.indexOf(t.data.id)), d.descendants().forEach((e) => {
415
+ }), f = ze().id((e) => e.id).parentId((e) => e.parentId)(d), p = o.map((e) => e.dataItem.uniqueSignature);
416
+ return f.sort((e, t) => p.indexOf(e.data.id) - p.indexOf(t.data.id)), f.descendants().forEach((e) => {
419
417
  let t = !1;
420
- t = e.data.id in r ? r[e.data.id] === !1 : e.data.expanded?.enabled ? e.data.expanded.value === !1 : !1, t && (e._children = e.children, e.children = null);
421
- }), d;
422
- }, ot = (e, t, n) => {
418
+ 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 = null);
419
+ }), f;
420
+ }, at = (e, t, n) => {
423
421
  if (t.itemsNotAffectedByFiltering?.pattern?.length && e.staticFilters.ignoreGlobalFilters && e.staticFilters.showGlobalFiltersEffect) {
424
422
  let e = [0, ...t.itemsNotAffectedByFiltering.pattern.map((e) => n[e]).filter((e) => e !== null)].join("-");
425
423
  return !t.itemsNotAffectedByFiltering.itemsMap?.[e];
426
424
  }
427
425
  return !1;
428
- }, st = (e, t, n, r, i, a) => {
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 ? rt(n, r, [n], e.supportingMeasures) : {};
426
+ }, ot = (e, t, n, r, i, a) => {
427
+ 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 ? nt(n, r, [n], e.supportingMeasures) : {};
430
428
  return {
431
429
  id: o,
432
430
  parentId: s,
433
431
  label: String(r[c]),
434
432
  row: +u,
435
433
  value: i ? {
436
- label: S(n.formatter?.format, r[l]) ?? "-",
434
+ label: C(n.formatter?.format, r[l]) ?? "-",
437
435
  value: r[l]
438
436
  } : null,
439
437
  indicator: f?.indicator ?? null,
440
- customIndicator: nt(r[l], f),
438
+ customIndicator: tt(r[l], f),
441
439
  brush: {
442
440
  key: d,
443
441
  value: r[c]
444
442
  },
445
- _excluded: ot(e, t, r),
443
+ _excluded: at(e, t, r),
446
444
  ...p
447
445
  };
448
446
  };
449
- function ct(e, t, n) {
450
- let r = t[0], i = e.dimensions.filter((e) => c(e)), a = {}, o = i.map((t) => [f(t.dataItem), s(e.referencedData, t.dataItem.internalKey)]), l = e.measures.filter((e) => c(e))[0], u = l ? f(l.dataItem) : null, d = e.totals?.enabled ?? !1, p = l?.slots?.find((e) => e.key === "main"), m, h, g = /* @__PURE__ */ new Set(), _ = r.groupings ? Object.keys(r.groupings) : void 0;
447
+ function st(e, t, n) {
448
+ let i = t[0], a = e.dimensions.filter((e) => s(e)), o = {}, c = a.map((t) => [l(t.dataItem), r(e.referencedData, t.dataItem.internalKey)]), u = e.measures.filter((e) => s(e))[0], d = u ? l(u.dataItem) : null, f = e.totals?.enabled ?? !1, p = u?.slots?.find((e) => e.key === "main"), m, h, g = /* @__PURE__ */ new Set(), _ = i.groupings ? Object.keys(i.groupings) : void 0;
451
449
  _ && _.forEach((t) => {
452
- let n = r.groupings[t], i = r.items[+t], s = o.filter(([e]) => n[e] === 0);
453
- if (!s.length) {
454
- m = u ? i[u] : void 0, h = i;
450
+ let n = i.groupings[t], r = i.items[+t], a = c.filter(([e]) => n[e] === 0);
451
+ if (!a.length) {
452
+ m = d ? r[d] : void 0, h = r;
455
453
  return;
456
454
  }
457
- let [c, f] = s.length ? s[s.length - 1] : ["", ""], p = et(s.map((e) => tt(i, e[0]))), _ = s.slice(0, -1), v = _.length ? et(_.map((e) => tt(i, e[0]))) : d ? $e : k;
458
- s.length < o.length && g.add(p), a[p] || (a[p] = st(e, r, l, i, !!l, {
459
- engineKey: f,
455
+ let [s, l] = a.length ? a[a.length - 1] : ["", ""], p = $e(a.map((e) => et(r, e[0]))), _ = a.slice(0, -1), v = _.length ? $e(_.map((e) => et(r, e[0]))) : f ? Qe : A;
456
+ a.length < c.length && g.add(p), o[p] || (o[p] = ot(e, i, u, r, !!u, {
457
+ engineKey: l,
460
458
  id: p,
461
459
  parentId: v,
462
- measureProp: u,
463
- prop: c,
460
+ measureProp: d,
461
+ prop: s,
464
462
  dataItemIdx: +t
465
463
  }));
466
- }), r.items.forEach((t, n) => {
467
- _?.includes(String(n)) || o.forEach(([i, o], s, c) => {
468
- if (t[i] === void 0) {
469
- console.warn(`Dimension property ${i} is missing in data item at index ${n}, skipping this dimension for this item`);
464
+ }), i.items.forEach((t, n) => {
465
+ _?.includes(String(n)) || c.forEach(([r, a], s, c) => {
466
+ if (t[r] === void 0) {
467
+ console.warn(`Dimension property ${r} is missing in data item at index ${n}, skipping this dimension for this item`);
470
468
  return;
471
469
  }
472
- let f = et(c.slice(0, s + 1).map((e) => tt(t, e[0]))), p = s === 0 ? d ? $e : k : et(c.slice(0, s).map((e) => tt(t, e[0])));
473
- a[f] || (a[f] = st(e, r, l, t, s === c.length - 1 && !!l, {
474
- engineKey: o,
470
+ let l = $e(c.slice(0, s + 1).map((e) => et(t, e[0]))), p = s === 0 ? f ? Qe : A : $e(c.slice(0, s).map((e) => et(t, e[0])));
471
+ o[l] || (o[l] = ot(e, i, u, t, s === c.length - 1 && !!u, {
472
+ engineKey: a,
475
473
  dataItemIdx: n,
476
- id: f,
474
+ id: l,
477
475
  parentId: p,
478
- measureProp: u,
479
- prop: i
476
+ measureProp: d,
477
+ prop: r
480
478
  }));
481
479
  });
482
480
  });
483
- let v = m ?? Object.values(a).reduce((e, t) => e + (g.has(t.id) ? 0 : t.value?.value ?? 0), 0), y = h ?? r.totals, b = Object.values(a);
484
- d && b.unshift({
485
- id: $e,
486
- parentId: k,
481
+ let v = m ?? Object.values(o).reduce((e, t) => e + (g.has(t.id) ? 0 : t.value?.value ?? 0), 0), y = h ?? i.totals, b = Object.values(o);
482
+ f && b.unshift({
483
+ id: Qe,
484
+ parentId: A,
487
485
  label: "Total",
488
486
  row: -1,
489
- value: l ? {
490
- label: S(l.formatter?.format, v) ?? "-",
487
+ value: u ? {
488
+ label: C(u.formatter?.format, v) ?? "-",
491
489
  value: v
492
490
  } : null,
493
491
  indicator: p?.indicator ?? null,
494
- customIndicator: nt(v, p),
495
- ...l ? rt(l, y, [l], e.supportingMeasures) : {}
492
+ customIndicator: tt(v, p),
493
+ ...u ? nt(u, y, [u], e.supportingMeasures) : {}
496
494
  }), b.unshift({
497
- id: k,
495
+ id: A,
498
496
  parentId: null,
499
497
  label: "Dummy Root",
500
498
  row: -1,
501
499
  value: null
502
500
  });
503
- let x = Be().id((e) => e.id).parentId((e) => e.parentId)(b);
501
+ let x = ze().id((e) => e.id).parentId((e) => e.parentId)(b);
504
502
  return x.sort((e, t) => e.data.row - t.data.row), x.descendants().forEach((t) => {
505
503
  if (t.data.id === "__total__") return;
506
504
  let r = !1;
507
- r = t.data.id in n ? n[t.data.id] === !1 : !it(t, e.treeChartSettings?.initialExpandedLevels, i.length, d), r && (t._children = t.children, t.children = null);
505
+ r = t.data.id in n ? n[t.data.id] === !1 : !rt(t, e.treeChartSettings?.initialExpandedLevels, a.length, f), r && (t._children = t.children, t.children = null);
508
506
  }), x;
509
507
  }
510
- var lt = ({ vSpec: e, data: t, nodeExpandState: n }) => {
511
- let r = e.dimensions.filter(c).length, [i, a] = (0, O.useState)(null);
512
- return (0, O.useEffect)(() => {
508
+ var ct = ({ vSpec: e, data: t, nodeExpandState: n }) => {
509
+ let r = e.dimensions.filter(s).length, [i, a] = (0, k.useState)(null);
510
+ return (0, k.useEffect)(() => {
513
511
  if (r > 0) {
514
- let r = ct(e, t, n.current);
512
+ let r = st(e, t, n.current);
515
513
  a(r);
516
514
  return;
517
515
  }
518
- let i = at(e, t, n.current);
516
+ let i = it(e, t, n.current);
519
517
  a(i);
520
518
  }, [
521
519
  t,
@@ -525,117 +523,117 @@ var lt = ({ vSpec: e, data: t, nodeExpandState: n }) => {
525
523
  e.treeChartSettings?.nodeExpandState,
526
524
  e.totals?.enabled
527
525
  ]), i;
528
- }, ut = {
526
+ }, lt = {
529
527
  svg: "http://www.w3.org/2000/svg",
530
528
  xhtml: "http://www.w3.org/1999/xhtml",
531
529
  xlink: "http://www.w3.org/1999/xlink",
532
530
  xml: "http://www.w3.org/XML/1998/namespace",
533
531
  xmlns: "http://www.w3.org/2000/xmlns/"
534
532
  };
535
- function dt(e) {
533
+ function ut(e) {
536
534
  var t = e += "", n = t.indexOf(":");
537
- return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), ut.hasOwnProperty(t) ? {
538
- space: ut[t],
535
+ return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), lt.hasOwnProperty(t) ? {
536
+ space: lt[t],
539
537
  local: e
540
538
  } : e;
541
539
  }
542
- function ft(e) {
540
+ function dt(e) {
543
541
  return function() {
544
542
  var t = this.ownerDocument, n = this.namespaceURI;
545
543
  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
544
  };
547
545
  }
548
- function pt(e) {
546
+ function ft(e) {
549
547
  return function() {
550
548
  return this.ownerDocument.createElementNS(e.space, e.local);
551
549
  };
552
550
  }
553
- function mt(e) {
554
- var t = dt(e);
555
- return (t.local ? pt : ft)(t);
551
+ function pt(e) {
552
+ var t = ut(e);
553
+ return (t.local ? ft : dt)(t);
556
554
  }
557
- function ht() {}
558
- function gt(e) {
559
- return e == null ? ht : function() {
555
+ function mt() {}
556
+ function ht(e) {
557
+ return e == null ? mt : function() {
560
558
  return this.querySelector(e);
561
559
  };
562
560
  }
563
- function _t(e) {
564
- typeof e != "function" && (e = gt(e));
561
+ function gt(e) {
562
+ typeof e != "function" && (e = ht(e));
565
563
  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
- return new j(r, this._parents);
564
+ return new M(r, this._parents);
567
565
  }
568
- function vt(e) {
566
+ function _t(e) {
569
567
  return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
570
568
  }
571
- function yt() {
569
+ function vt() {
572
570
  return [];
573
571
  }
574
- function bt(e) {
575
- return e == null ? yt : function() {
572
+ function yt(e) {
573
+ return e == null ? vt : function() {
576
574
  return this.querySelectorAll(e);
577
575
  };
578
576
  }
579
- function xt(e) {
577
+ function bt(e) {
580
578
  return function() {
581
- return vt(e.apply(this, arguments));
579
+ return _t(e.apply(this, arguments));
582
580
  };
583
581
  }
584
- function St(e) {
585
- e = typeof e == "function" ? xt(e) : bt(e);
582
+ function xt(e) {
583
+ e = typeof e == "function" ? bt(e) : yt(e);
586
584
  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
- return new j(r, i);
585
+ return new M(r, i);
588
586
  }
589
- function Ct(e) {
587
+ function St(e) {
590
588
  return function() {
591
589
  return this.matches(e);
592
590
  };
593
591
  }
594
- function wt(e) {
592
+ function Ct(e) {
595
593
  return function(t) {
596
594
  return t.matches(e);
597
595
  };
598
596
  }
599
- var Tt = Array.prototype.find;
600
- function Et(e) {
597
+ var wt = Array.prototype.find;
598
+ function Tt(e) {
601
599
  return function() {
602
- return Tt.call(this.children, e);
600
+ return wt.call(this.children, e);
603
601
  };
604
602
  }
605
- function Dt() {
603
+ function Et() {
606
604
  return this.firstElementChild;
607
605
  }
608
- function Ot(e) {
609
- return this.select(e == null ? Dt : Et(typeof e == "function" ? e : wt(e)));
606
+ function Dt(e) {
607
+ return this.select(e == null ? Et : Tt(typeof e == "function" ? e : Ct(e)));
610
608
  }
611
- var kt = Array.prototype.filter;
612
- function At() {
609
+ var Ot = Array.prototype.filter;
610
+ function kt() {
613
611
  return Array.from(this.children);
614
612
  }
615
- function jt(e) {
613
+ function At(e) {
616
614
  return function() {
617
- return kt.call(this.children, e);
615
+ return Ot.call(this.children, e);
618
616
  };
619
617
  }
620
- function Mt(e) {
621
- return this.selectAll(e == null ? At : jt(typeof e == "function" ? e : wt(e)));
618
+ function jt(e) {
619
+ return this.selectAll(e == null ? kt : At(typeof e == "function" ? e : Ct(e)));
622
620
  }
623
- function Nt(e) {
624
- typeof e != "function" && (e = Ct(e));
621
+ function Mt(e) {
622
+ typeof e != "function" && (e = St(e));
625
623
  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
- return new j(r, this._parents);
624
+ return new M(r, this._parents);
627
625
  }
628
- function Pt(e) {
626
+ function Nt(e) {
629
627
  return Array(e.length);
630
628
  }
631
- function Ft() {
632
- return new j(this._enter || this._groups.map(Pt), this._parents);
629
+ function Pt() {
630
+ return new M(this._enter || this._groups.map(Nt), this._parents);
633
631
  }
634
- function It(e, t) {
632
+ function Ft(e, t) {
635
633
  this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
636
634
  }
637
- It.prototype = {
638
- constructor: It,
635
+ Ft.prototype = {
636
+ constructor: Ft,
639
637
  appendChild: function(e) {
640
638
  return this._parent.insertBefore(e, this._next);
641
639
  },
@@ -649,59 +647,59 @@ It.prototype = {
649
647
  return this._parent.querySelectorAll(e);
650
648
  }
651
649
  };
652
- function Lt(e) {
650
+ function It(e) {
653
651
  return function() {
654
652
  return e;
655
653
  };
656
654
  }
657
- function Rt(e, t, n, r, i, a) {
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 It(e, a[o]);
655
+ function Lt(e, t, n, r, i, a) {
656
+ 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 Ft(e, a[o]);
659
657
  for (; o < c; ++o) (s = t[o]) && (i[o] = s);
660
658
  }
661
- function zt(e, t, n, r, i, a, o) {
659
+ function Rt(e, t, n, r, i, a, o) {
662
660
  var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
663
661
  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 It(e, a[s]);
662
+ 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 Ft(e, a[s]);
665
663
  for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
666
664
  }
667
- function Bt(e) {
665
+ function zt(e) {
668
666
  return e.__data__;
669
667
  }
670
- function Vt(e, t) {
671
- if (!arguments.length) return Array.from(this, Bt);
672
- var n = t ? zt : Rt, r = this._parents, i = this._groups;
673
- typeof e != "function" && (e = Lt(e));
668
+ function Bt(e, t) {
669
+ if (!arguments.length) return Array.from(this, zt);
670
+ var n = t ? Rt : Lt, r = this._parents, i = this._groups;
671
+ typeof e != "function" && (e = It(e));
674
672
  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 = Ht(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
673
+ var u = r[l], d = i[l], f = d.length, p = Vt(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
676
674
  n(u, d, h, g, c[l] = Array(f), p, t);
677
675
  for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
678
676
  for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
679
677
  y._next = b || null;
680
678
  }
681
679
  }
682
- return o = new j(o, r), o._enter = s, o._exit = c, o;
680
+ return o = new M(o, r), o._enter = s, o._exit = c, o;
683
681
  }
684
- function Ht(e) {
682
+ function Vt(e) {
685
683
  return typeof e == "object" && "length" in e ? e : Array.from(e);
686
684
  }
687
- function Ut() {
688
- return new j(this._exit || this._groups.map(Pt), this._parents);
685
+ function Ht() {
686
+ return new M(this._exit || this._groups.map(Nt), this._parents);
689
687
  }
690
- function Wt(e, t, n) {
688
+ function Ut(e, t, n) {
691
689
  var r = this.enter(), i = this, a = this.exit();
692
690
  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
691
  }
694
- function Gt(e) {
692
+ function Wt(e) {
695
693
  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
694
  for (; c < i; ++c) s[c] = n[c];
697
- return new j(s, this._parents);
695
+ return new M(s, this._parents);
698
696
  }
699
- function Kt() {
697
+ function Gt() {
700
698
  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
699
  return this;
702
700
  }
703
- function qt(e) {
704
- e ||= Jt;
701
+ function Kt(e) {
702
+ e ||= qt;
705
703
  function t(t, n) {
706
704
  return t && n ? e(t.__data__, n.__data__) : !t - !n;
707
705
  }
@@ -709,131 +707,131 @@ function qt(e) {
709
707
  for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
710
708
  c.sort(t);
711
709
  }
712
- return new j(i, this._parents).order();
710
+ return new M(i, this._parents).order();
713
711
  }
714
- function Jt(e, t) {
712
+ function qt(e, t) {
715
713
  return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
716
714
  }
717
- function Yt() {
715
+ function Jt() {
718
716
  var e = arguments[0];
719
717
  return arguments[0] = this, e.apply(null, arguments), this;
720
718
  }
721
- function Xt() {
719
+ function Yt() {
722
720
  return Array.from(this);
723
721
  }
724
- function Zt() {
722
+ function Xt() {
725
723
  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
724
  var o = r[i];
727
725
  if (o) return o;
728
726
  }
729
727
  return null;
730
728
  }
731
- function Qt() {
729
+ function Zt() {
732
730
  let e = 0;
733
731
  for (let t of this) ++e;
734
732
  return e;
735
733
  }
736
- function $t() {
734
+ function Qt() {
737
735
  return !this.node();
738
736
  }
739
- function en(e) {
737
+ function $t(e) {
740
738
  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
739
  return this;
742
740
  }
743
- function tn(e) {
741
+ function en(e) {
744
742
  return function() {
745
743
  this.removeAttribute(e);
746
744
  };
747
745
  }
748
- function nn(e) {
746
+ function tn(e) {
749
747
  return function() {
750
748
  this.removeAttributeNS(e.space, e.local);
751
749
  };
752
750
  }
753
- function rn(e, t) {
751
+ function nn(e, t) {
754
752
  return function() {
755
753
  this.setAttribute(e, t);
756
754
  };
757
755
  }
758
- function an(e, t) {
756
+ function rn(e, t) {
759
757
  return function() {
760
758
  this.setAttributeNS(e.space, e.local, t);
761
759
  };
762
760
  }
763
- function on(e, t) {
761
+ function an(e, t) {
764
762
  return function() {
765
763
  var n = t.apply(this, arguments);
766
764
  n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
767
765
  };
768
766
  }
769
- function sn(e, t) {
767
+ function on(e, t) {
770
768
  return function() {
771
769
  var n = t.apply(this, arguments);
772
770
  n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
773
771
  };
774
772
  }
775
- function cn(e, t) {
776
- var n = dt(e);
773
+ function sn(e, t) {
774
+ var n = ut(e);
777
775
  if (arguments.length < 2) {
778
776
  var r = this.node();
779
777
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
780
778
  }
781
- return this.each((t == null ? n.local ? nn : tn : typeof t == "function" ? n.local ? sn : on : n.local ? an : rn)(n, t));
779
+ return this.each((t == null ? n.local ? tn : en : typeof t == "function" ? n.local ? on : an : n.local ? rn : nn)(n, t));
782
780
  }
783
- function ln(e) {
781
+ function cn(e) {
784
782
  return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
785
783
  }
786
- function un(e) {
784
+ function ln(e) {
787
785
  return function() {
788
786
  this.style.removeProperty(e);
789
787
  };
790
788
  }
791
- function dn(e, t, n) {
789
+ function un(e, t, n) {
792
790
  return function() {
793
791
  this.style.setProperty(e, t, n);
794
792
  };
795
793
  }
796
- function fn(e, t, n) {
794
+ function dn(e, t, n) {
797
795
  return function() {
798
796
  var r = t.apply(this, arguments);
799
797
  r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
800
798
  };
801
799
  }
802
- function pn(e, t, n) {
803
- return arguments.length > 1 ? this.each((t == null ? un : typeof t == "function" ? fn : dn)(e, t, n ?? "")) : A(this.node(), e);
800
+ function fn(e, t, n) {
801
+ return arguments.length > 1 ? this.each((t == null ? ln : typeof t == "function" ? dn : un)(e, t, n ?? "")) : j(this.node(), e);
804
802
  }
805
- function A(e, t) {
806
- return e.style.getPropertyValue(t) || ln(e).getComputedStyle(e, null).getPropertyValue(t);
803
+ function j(e, t) {
804
+ return e.style.getPropertyValue(t) || cn(e).getComputedStyle(e, null).getPropertyValue(t);
807
805
  }
808
- function mn(e) {
806
+ function pn(e) {
809
807
  return function() {
810
808
  delete this[e];
811
809
  };
812
810
  }
813
- function hn(e, t) {
811
+ function mn(e, t) {
814
812
  return function() {
815
813
  this[e] = t;
816
814
  };
817
815
  }
818
- function gn(e, t) {
816
+ function hn(e, t) {
819
817
  return function() {
820
818
  var n = t.apply(this, arguments);
821
819
  n == null ? delete this[e] : this[e] = n;
822
820
  };
823
821
  }
824
- function _n(e, t) {
825
- return arguments.length > 1 ? this.each((t == null ? mn : typeof t == "function" ? gn : hn)(e, t)) : this.node()[e];
822
+ function gn(e, t) {
823
+ return arguments.length > 1 ? this.each((t == null ? pn : typeof t == "function" ? hn : mn)(e, t)) : this.node()[e];
826
824
  }
827
- function vn(e) {
825
+ function _n(e) {
828
826
  return e.trim().split(/^|\s+/);
829
827
  }
830
- function yn(e) {
831
- return e.classList || new bn(e);
828
+ function vn(e) {
829
+ return e.classList || new yn(e);
832
830
  }
833
- function bn(e) {
834
- this._node = e, this._names = vn(e.getAttribute("class") || "");
831
+ function yn(e) {
832
+ this._node = e, this._names = _n(e.getAttribute("class") || "");
835
833
  }
836
- bn.prototype = {
834
+ yn.prototype = {
837
835
  add: function(e) {
838
836
  this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
839
837
  },
@@ -845,123 +843,123 @@ bn.prototype = {
845
843
  return this._names.indexOf(e) >= 0;
846
844
  }
847
845
  };
846
+ function bn(e, t) {
847
+ for (var n = vn(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
848
+ }
848
849
  function xn(e, t) {
849
- for (var n = yn(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
850
+ for (var n = vn(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
850
851
  }
851
- function Sn(e, t) {
852
- for (var n = yn(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
852
+ function Sn(e) {
853
+ return function() {
854
+ bn(this, e);
855
+ };
853
856
  }
854
857
  function Cn(e) {
855
858
  return function() {
856
859
  xn(this, e);
857
860
  };
858
861
  }
859
- function wn(e) {
862
+ function wn(e, t) {
860
863
  return function() {
861
- Sn(this, e);
864
+ (t.apply(this, arguments) ? bn : xn)(this, e);
862
865
  };
863
866
  }
864
867
  function Tn(e, t) {
865
- return function() {
866
- (t.apply(this, arguments) ? xn : Sn)(this, e);
867
- };
868
- }
869
- function En(e, t) {
870
- var n = vn(e + "");
868
+ var n = _n(e + "");
871
869
  if (arguments.length < 2) {
872
- for (var r = yn(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
870
+ for (var r = vn(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
873
871
  return !0;
874
872
  }
875
- return this.each((typeof t == "function" ? Tn : t ? Cn : wn)(n, t));
873
+ return this.each((typeof t == "function" ? wn : t ? Sn : Cn)(n, t));
876
874
  }
877
- function Dn() {
875
+ function En() {
878
876
  this.textContent = "";
879
877
  }
880
- function On(e) {
878
+ function Dn(e) {
881
879
  return function() {
882
880
  this.textContent = e;
883
881
  };
884
882
  }
885
- function kn(e) {
883
+ function On(e) {
886
884
  return function() {
887
885
  var t = e.apply(this, arguments);
888
886
  this.textContent = t ?? "";
889
887
  };
890
888
  }
891
- function An(e) {
892
- return arguments.length ? this.each(e == null ? Dn : (typeof e == "function" ? kn : On)(e)) : this.node().textContent;
889
+ function kn(e) {
890
+ return arguments.length ? this.each(e == null ? En : (typeof e == "function" ? On : Dn)(e)) : this.node().textContent;
893
891
  }
894
- function jn() {
892
+ function An() {
895
893
  this.innerHTML = "";
896
894
  }
897
- function Mn(e) {
895
+ function jn(e) {
898
896
  return function() {
899
897
  this.innerHTML = e;
900
898
  };
901
899
  }
902
- function Nn(e) {
900
+ function Mn(e) {
903
901
  return function() {
904
902
  var t = e.apply(this, arguments);
905
903
  this.innerHTML = t ?? "";
906
904
  };
907
905
  }
908
- function Pn(e) {
909
- return arguments.length ? this.each(e == null ? jn : (typeof e == "function" ? Nn : Mn)(e)) : this.node().innerHTML;
906
+ function Nn(e) {
907
+ return arguments.length ? this.each(e == null ? An : (typeof e == "function" ? Mn : jn)(e)) : this.node().innerHTML;
910
908
  }
911
- function Fn() {
909
+ function Pn() {
912
910
  this.nextSibling && this.parentNode.appendChild(this);
913
911
  }
914
- function In() {
915
- return this.each(Fn);
912
+ function Fn() {
913
+ return this.each(Pn);
916
914
  }
917
- function Ln() {
915
+ function In() {
918
916
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
919
917
  }
920
- function Rn() {
921
- return this.each(Ln);
918
+ function Ln() {
919
+ return this.each(In);
922
920
  }
923
- function zn(e) {
924
- var t = typeof e == "function" ? e : mt(e);
921
+ function Rn(e) {
922
+ var t = typeof e == "function" ? e : pt(e);
925
923
  return this.select(function() {
926
924
  return this.appendChild(t.apply(this, arguments));
927
925
  });
928
926
  }
929
- function Bn() {
927
+ function zn() {
930
928
  return null;
931
929
  }
932
- function Vn(e, t) {
933
- var n = typeof e == "function" ? e : mt(e), r = t == null ? Bn : typeof t == "function" ? t : gt(t);
930
+ function Bn(e, t) {
931
+ var n = typeof e == "function" ? e : pt(e), r = t == null ? zn : typeof t == "function" ? t : ht(t);
934
932
  return this.select(function() {
935
933
  return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
936
934
  });
937
935
  }
938
- function Hn() {
936
+ function Vn() {
939
937
  var e = this.parentNode;
940
938
  e && e.removeChild(this);
941
939
  }
942
- function Un() {
943
- return this.each(Hn);
940
+ function Hn() {
941
+ return this.each(Vn);
944
942
  }
945
- function Wn() {
943
+ function Un() {
946
944
  var e = this.cloneNode(!1), t = this.parentNode;
947
945
  return t ? t.insertBefore(e, this.nextSibling) : e;
948
946
  }
949
- function Gn() {
947
+ function Wn() {
950
948
  var e = this.cloneNode(!0), t = this.parentNode;
951
949
  return t ? t.insertBefore(e, this.nextSibling) : e;
952
950
  }
953
- function Kn(e) {
954
- return this.select(e ? Gn : Wn);
951
+ function Gn(e) {
952
+ return this.select(e ? Wn : Un);
955
953
  }
956
- function qn(e) {
954
+ function Kn(e) {
957
955
  return arguments.length ? this.property("__data__", e) : this.node().__data__;
958
956
  }
959
- function Jn(e) {
957
+ function qn(e) {
960
958
  return function(t) {
961
959
  e.call(this, t, this.__data__);
962
960
  };
963
961
  }
964
- function Yn(e) {
962
+ function Jn(e) {
965
963
  return e.trim().split(/^|\s+/).map(function(e) {
966
964
  var t = "", n = e.indexOf(".");
967
965
  return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
@@ -970,7 +968,7 @@ function Yn(e) {
970
968
  };
971
969
  });
972
970
  }
973
- function Xn(e) {
971
+ function Yn(e) {
974
972
  return function() {
975
973
  var t = this.__on;
976
974
  if (t) {
@@ -979,9 +977,9 @@ function Xn(e) {
979
977
  }
980
978
  };
981
979
  }
982
- function Zn(e, t, n) {
980
+ function Xn(e, t, n) {
983
981
  return function() {
984
- var r = this.__on, i, a = Jn(t);
982
+ var r = this.__on, i, a = qn(t);
985
983
  if (r) {
986
984
  for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
987
985
  this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
@@ -997,8 +995,8 @@ function Zn(e, t, n) {
997
995
  }, r ? r.push(i) : this.__on = [i];
998
996
  };
999
997
  }
1000
- function Qn(e, t, n) {
1001
- var r = Yn(e + ""), i, a = r.length, o;
998
+ function Zn(e, t, n) {
999
+ var r = Jn(e + ""), i, a = r.length, o;
1002
1000
  if (arguments.length < 2) {
1003
1001
  var s = this.node().__on;
1004
1002
  if (s) {
@@ -1006,87 +1004,87 @@ function Qn(e, t, n) {
1006
1004
  }
1007
1005
  return;
1008
1006
  }
1009
- for (s = t ? Zn : Xn, i = 0; i < a; ++i) this.each(s(r[i], t, n));
1007
+ for (s = t ? Xn : Yn, i = 0; i < a; ++i) this.each(s(r[i], t, n));
1010
1008
  return this;
1011
1009
  }
1012
- function $n(e, t, n) {
1013
- var r = ln(e), i = r.CustomEvent;
1010
+ function Qn(e, t, n) {
1011
+ var r = cn(e), i = r.CustomEvent;
1014
1012
  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
1013
  }
1016
- function er(e, t) {
1014
+ function $n(e, t) {
1017
1015
  return function() {
1018
- return $n(this, e, t);
1016
+ return Qn(this, e, t);
1019
1017
  };
1020
1018
  }
1021
- function tr(e, t) {
1019
+ function er(e, t) {
1022
1020
  return function() {
1023
- return $n(this, e, t.apply(this, arguments));
1021
+ return Qn(this, e, t.apply(this, arguments));
1024
1022
  };
1025
1023
  }
1026
- function nr(e, t) {
1027
- return this.each((typeof t == "function" ? tr : er)(e, t));
1024
+ function tr(e, t) {
1025
+ return this.each((typeof t == "function" ? er : $n)(e, t));
1028
1026
  }
1029
- function* rr() {
1027
+ function* nr() {
1030
1028
  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
1029
  }
1032
- var ir = [null];
1033
- function j(e, t) {
1030
+ var rr = [null];
1031
+ function M(e, t) {
1034
1032
  this._groups = e, this._parents = t;
1035
1033
  }
1036
- function M() {
1037
- return new j([[document.documentElement]], ir);
1034
+ function N() {
1035
+ return new M([[document.documentElement]], rr);
1038
1036
  }
1039
- function ar() {
1037
+ function ir() {
1040
1038
  return this;
1041
1039
  }
1042
- j.prototype = M.prototype = {
1043
- constructor: j,
1044
- select: _t,
1045
- selectAll: St,
1046
- selectChild: Ot,
1047
- selectChildren: Mt,
1048
- filter: Nt,
1049
- data: Vt,
1050
- enter: Ft,
1051
- exit: Ut,
1052
- join: Wt,
1053
- merge: Gt,
1054
- selection: ar,
1055
- order: Kt,
1056
- sort: qt,
1057
- call: Yt,
1058
- nodes: Xt,
1059
- node: Zt,
1060
- size: Qt,
1061
- empty: $t,
1062
- each: en,
1063
- attr: cn,
1064
- style: pn,
1065
- property: _n,
1066
- classed: En,
1067
- text: An,
1068
- html: Pn,
1069
- raise: In,
1070
- lower: Rn,
1071
- append: zn,
1072
- insert: Vn,
1073
- remove: Un,
1074
- clone: Kn,
1075
- datum: qn,
1076
- on: Qn,
1077
- dispatch: nr,
1078
- [Symbol.iterator]: rr
1040
+ M.prototype = N.prototype = {
1041
+ constructor: M,
1042
+ select: gt,
1043
+ selectAll: xt,
1044
+ selectChild: Dt,
1045
+ selectChildren: jt,
1046
+ filter: Mt,
1047
+ data: Bt,
1048
+ enter: Pt,
1049
+ exit: Ht,
1050
+ join: Ut,
1051
+ merge: Wt,
1052
+ selection: ir,
1053
+ order: Gt,
1054
+ sort: Kt,
1055
+ call: Jt,
1056
+ nodes: Yt,
1057
+ node: Xt,
1058
+ size: Zt,
1059
+ empty: Qt,
1060
+ each: $t,
1061
+ attr: sn,
1062
+ style: fn,
1063
+ property: gn,
1064
+ classed: Tn,
1065
+ text: kn,
1066
+ html: Nn,
1067
+ raise: Fn,
1068
+ lower: Ln,
1069
+ append: Rn,
1070
+ insert: Bn,
1071
+ remove: Hn,
1072
+ clone: Gn,
1073
+ datum: Kn,
1074
+ on: Zn,
1075
+ dispatch: tr,
1076
+ [Symbol.iterator]: nr
1079
1077
  };
1080
- function N(e) {
1081
- return typeof e == "string" ? new j([[document.querySelector(e)]], [document.documentElement]) : new j([[e]], ir);
1078
+ function P(e) {
1079
+ return typeof e == "string" ? new M([[document.querySelector(e)]], [document.documentElement]) : new M([[e]], rr);
1082
1080
  }
1083
- function or(e) {
1081
+ function ar(e) {
1084
1082
  let t;
1085
1083
  for (; t = e.sourceEvent;) e = t;
1086
1084
  return e;
1087
1085
  }
1088
- function P(e, t) {
1089
- if (e = or(e), t === void 0 && (t = e.currentTarget), t) {
1086
+ function F(e, t) {
1087
+ if (e = ar(e), t === void 0 && (t = e.currentTarget), t) {
1090
1088
  var n = t.ownerSVGElement || t;
1091
1089
  if (n.createSVGPoint) {
1092
1090
  var r = n.createSVGPoint();
@@ -1099,47 +1097,47 @@ function P(e, t) {
1099
1097
  }
1100
1098
  return [e.pageX, e.pageY];
1101
1099
  }
1102
- function sr(e) {
1103
- return typeof e == "string" ? new j([document.querySelectorAll(e)], [document.documentElement]) : new j([vt(e)], ir);
1100
+ function or(e) {
1101
+ return typeof e == "string" ? new M([document.querySelectorAll(e)], [document.documentElement]) : new M([_t(e)], rr);
1104
1102
  }
1105
- var cr = /* @__PURE__ */ e(ve()), F = d[p.KPIChange], I = F.slots, lr = "#577f56", ur = "#9e4d53", L = (e) => typeof e == "number" && Number.isFinite(e), dr = (e, t) => {
1106
- let n = new cr.default(e);
1107
- return (new cr.default(t).isLight() ? n.lighten(.5).alpha(.5) : n.darken(.5).alpha(.5)).rgb().string();
1108
- }, fr = (e, t) => {
1103
+ var sr = /* @__PURE__ */ e(ne()), I = n[a.KPIChange], L = I.slots, cr = "#577f56", lr = "#9e4d53", R = (e) => typeof e == "number" && Number.isFinite(e), ur = (e, t) => {
1104
+ let n = new sr.default(e);
1105
+ return (new sr.default(t).isLight() ? n.lighten(.5).alpha(.5) : n.darken(.5).alpha(.5)).rgb().string();
1106
+ }, dr = (e, t) => {
1109
1107
  if (!e.enabled) return "";
1110
- let n = L(e.value) ? e.value : null, r = n === null ? "" : n < 0 ? "negative" : "positive", i = "", a = "";
1108
+ let n = R(e.value) ? e.value : null, r = n === null ? "" : n < 0 ? "negative" : "positive", i = "", a = "";
1111
1109
  if (e.indicator === "inverse") r = r === "negative" ? "positive" : "negative";
1112
1110
  else if (e.indicator === "none") r = "";
1113
1111
  else if (e.indicator === "custom") {
1114
1112
  r = "";
1115
- let n = e.customIndicator?.color ? dr(e.customIndicator.color, t) : "inherit";
1116
- i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${y.sanitize(e.customIndicator.icon)}</span>`);
1113
+ let n = e.customIndicator?.color ? ur(e.customIndicator.color, t) : "inherit";
1114
+ i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${_.sanitize(e.customIndicator.icon)}</span>`);
1117
1115
  }
1118
- return `<div class="footer ${r}" style="${i}"><span class="footer-label">${y.sanitize(e.label)}</span>${a}</div>`;
1119
- }, pr = (e, t) => {
1116
+ return `<div class="footer ${r}" style="${i}"><span class="footer-label">${_.sanitize(e.label)}</span>${a}</div>`;
1117
+ }, fr = (e, t) => {
1120
1118
  if (!e.enabled) return "";
1121
- 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";
1119
+ let n = e.indicator, r = R(e.value) ? e.value : null, i = r === null ? "neutral" : r < 0 ? "negative" : "positive", a = "", o = r === null ? "" : r < 0 ? "arrow_downward" : "arrow_upward";
1122
1120
  if (n === "inverse") i = i === "negative" ? "positive" : "negative";
1123
1121
  else if (n === "none") i = "", o = void 0;
1124
1122
  else if (n === "custom") {
1125
1123
  i = "";
1126
- let n = e.customIndicator?.color ? dr(e.customIndicator.color, t) : "inherit";
1124
+ let n = e.customIndicator?.color ? ur(e.customIndicator.color, t) : "inherit";
1127
1125
  a = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, o = e.customIndicator?.icon;
1128
1126
  }
1129
- let s = o ? `<span class="pill-icon">${y.sanitize(o)}</span>` : "";
1130
- return `<div class="pill ${i}" style="${a}"><span class="pill-label">${y.sanitize(e.label)}</span>${s}</div>`;
1131
- }, mr = (e, t) => {
1127
+ let s = o ? `<span class="pill-icon">${_.sanitize(o)}</span>` : "";
1128
+ return `<div class="pill ${i}" style="${a}"><span class="pill-label">${_.sanitize(e.label)}</span>${s}</div>`;
1129
+ }, pr = (e, t) => {
1132
1130
  let n = e.value ?? {
1133
1131
  label: "-",
1134
1132
  value: null,
1135
1133
  enabled: !1
1136
1134
  }, r = "", i = "";
1137
- return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${y.sanitize(e.customIndicator.icon)}</span>`)), `<div class="value ${t ? "value-space" : ""}" style="${r}"><span class="value-label">${y.sanitize(n.label)}</span>${i}</div>`;
1138
- }, hr = (e, t) => {
1139
- let n = e.data.diff ?? I.diff.defaults, r = e.data.change ?? I.change.defaults, i = t.config.nodeDefaultBackground ?? "#ffffff", a = mr(e.data, !r.enabled), o = fr(n, i), s = pr(r, i), c = [];
1135
+ return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${_.sanitize(e.customIndicator.icon)}</span>`)), `<div class="value ${t ? "value-space" : ""}" style="${r}"><span class="value-label">${_.sanitize(n.label)}</span>${i}</div>`;
1136
+ }, mr = (e, t) => {
1137
+ let n = e.data.diff ?? L.diff.defaults, r = e.data.change ?? L.change.defaults, i = t.config.nodeDefaultBackground ?? "#ffffff", a = pr(e.data, !r.enabled), o = dr(n, i), s = fr(r, i), c = [];
1140
1138
  return e.data._upToTheRootHighlighted && c.push("node-highlight"), `
1141
1139
  <div class="node-content layout-a ${c.join(" ")}">
1142
- <div class="label">${y.sanitize(e.data.label)}</div>
1140
+ <div class="label">${_.sanitize(e.data.label)}</div>
1143
1141
  <div class="flex-row">
1144
1142
  ${a}
1145
1143
  ${s}
@@ -1148,40 +1146,40 @@ var cr = /* @__PURE__ */ e(ve()), F = d[p.KPIChange], I = F.slots, lr = "#577f56
1148
1146
 
1149
1147
  </div>
1150
1148
  `;
1151
- }, gr = ({ node: e, config: t }) => e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
1149
+ }, hr = ({ node: e, config: t }) => e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
1152
1150
  left: (e) => e ? "◀" : "▶",
1153
1151
  bottom: (e) => e ? "▼" : "▲",
1154
1152
  right: (e) => e ? "▶" : "◀",
1155
1153
  top: (e) => e ? "▲" : "▼"
1156
1154
  }[t.layout](e.children)} </div>`;
1157
- function _r(e) {
1155
+ function gr(e) {
1158
1156
  if (e.data._upToTheRootHighlighted) {
1159
- N(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
1157
+ P(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
1160
1158
  return;
1161
1159
  }
1162
1160
  if (!e.data.diff?.enabled) {
1163
- N(this).style("stroke-width", null).style("stroke", null);
1161
+ P(this).style("stroke-width", null).style("stroke", null);
1164
1162
  return;
1165
1163
  }
1166
- let t = (L(e.data.diff?.value) ? e.data.diff.value : null) ?? (L(I.diff.defaults.value) ? I.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, a = t < 0, o = a ? ur : lr, s = e.data.diff?.indicator;
1167
- s === "inverse" ? o = a ? lr : ur : s === "none" ? o = "var(--link-color)" : s === "custom" && (o = e.data.diff?.customIndicator?.color ?? "var(--link-color)");
1164
+ let t = (R(e.data.diff?.value) ? e.data.diff.value : null) ?? (R(L.diff.defaults.value) ? L.diff.defaults.value : 0), n = e.parent?.children?.flatMap((t) => t.id === e.id || !t.data.diff?.enabled || !R(t.data.diff?.value) ? [] : [Math.abs(t.data.diff.value)]) ?? [], r = n.length ? Math.max(...n) : 0, i = Math.abs(t) > r, a = t < 0, o = a ? lr : cr, s = e.data.diff?.indicator;
1165
+ s === "inverse" ? o = a ? cr : lr : s === "none" ? o = "var(--link-color)" : s === "custom" && (o = e.data.diff?.customIndicator?.color ?? "var(--link-color)");
1168
1166
  let c = i ? 2 : 1;
1169
- N(this).style("stroke", o).style("stroke-width", c);
1167
+ P(this).style("stroke", o).style("stroke-width", c);
1170
1168
  }
1171
- var vr = (e, t) => {
1169
+ var _r = (e, t) => {
1172
1170
  let n = {
1173
- ...F.labelStyle,
1171
+ ...I.labelStyle,
1174
1172
  ...t.treeChartSettings.nodeLayout?.labelStyle
1175
1173
  }, r = {
1176
- ...F.valueStyle,
1174
+ ...I.valueStyle,
1177
1175
  ...t.treeChartSettings.nodeLayout?.valueStyle
1178
1176
  }, i = {
1179
- ...I.change.styling,
1180
- ...I.change.styling.fontStyle,
1177
+ ...L.change.styling,
1178
+ ...L.change.styling.fontStyle,
1181
1179
  ...t.treeChartSettings.nodeLayout?.slots?.change
1182
1180
  }, a = {
1183
- ...I.diff.styling,
1184
- ...I.diff.styling.fontStyle,
1181
+ ...L.diff.styling,
1182
+ ...L.diff.styling.fontStyle,
1185
1183
  ...t.treeChartSettings.nodeLayout?.slots?.diff
1186
1184
  };
1187
1185
  return `
@@ -1310,62 +1308,62 @@ var vr = (e, t) => {
1310
1308
  }
1311
1309
 
1312
1310
  .positive {
1313
- color: ${lr};
1311
+ color: ${cr};
1314
1312
  background-color: #e4fae8;
1315
1313
  }
1316
1314
 
1317
1315
  .negative {
1318
- color: ${ur};
1316
+ color: ${lr};
1319
1317
  background-color: #fcecec;
1320
1318
  }
1321
1319
  }
1322
1320
  }`;
1323
- }, yr = {
1321
+ }, vr = {
1324
1322
  name: "KPI Change",
1325
- ...F,
1326
- getNodeContent: hr,
1327
- getButtonContent: gr,
1328
- linkUpdate: _r,
1329
- getCSS: vr,
1323
+ ...I,
1324
+ getNodeContent: mr,
1325
+ getButtonContent: hr,
1326
+ linkUpdate: gr,
1327
+ getCSS: _r,
1330
1328
  width: 180,
1331
1329
  sizes: (e) => {
1332
1330
  let t = {
1333
- ...I.diff.styling,
1334
- ...I.diff.styling.fontStyle,
1331
+ ...L.diff.styling,
1332
+ ...L.diff.styling.fontStyle,
1335
1333
  ...e.treeChartSettings.nodeLayout?.slots?.diff
1336
1334
  }, n = {
1337
- ...F.labelStyle,
1335
+ ...I.labelStyle,
1338
1336
  ...e.treeChartSettings.nodeLayout?.labelStyle
1339
1337
  }, r = {
1340
- ...F.valueStyle,
1338
+ ...I.valueStyle,
1341
1339
  ...e.treeChartSettings.nodeLayout?.valueStyle
1342
1340
  };
1343
1341
  return {
1344
- label: Math.ceil(E(n.fontSize)) + 8,
1345
- value: Math.ceil(E(r.fontSize)) + 8,
1346
- diff: Math.ceil(E(t.fontSize)) + 16
1342
+ label: Math.ceil(D(n.fontSize)) + 8,
1343
+ value: Math.ceil(D(r.fontSize)) + 8,
1344
+ diff: Math.ceil(D(t.fontSize)) + 16
1347
1345
  };
1348
1346
  },
1349
1347
  height: (e, t) => {
1350
1348
  let n = 20;
1351
- return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ?? I.diff.defaults)?.enabled && (n += t?.diff ?? 0), n;
1349
+ return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ?? L.diff.defaults)?.enabled && (n += t?.diff ?? 0), n;
1352
1350
  }
1353
- }, R = d[p.Basic], br = (e) => {
1351
+ }, z = n[a.Basic], yr = (e) => {
1354
1352
  if (e.id === "__root__") return null;
1355
1353
  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">${y.sanitize(e.data.customIndicator.icon)}</span>`));
1357
- let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${y.sanitize(e.data.value.label)}</span>${n}</div>` : "", i = [];
1354
+ e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${_.sanitize(e.data.customIndicator.icon)}</span>`));
1355
+ let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${_.sanitize(e.data.value.label)}</span>${n}</div>` : "", i = [];
1358
1356
  return e.data._upToTheRootHighlighted && i.push("node-highlight"), `
1359
1357
  <div class="node-content layout-b ${i.join(" ")}">
1360
- <div class="label">${y.sanitize(e.data.label)}</div>
1358
+ <div class="label">${_.sanitize(e.data.label)}</div>
1361
1359
  ${r}
1362
1360
  </div>`;
1363
- }, xr = (e, t) => {
1361
+ }, br = (e, t) => {
1364
1362
  let n = {
1365
- ...R.labelStyle,
1363
+ ...z.labelStyle,
1366
1364
  ...t.treeChartSettings.nodeLayout?.labelStyle
1367
1365
  }, r = {
1368
- ...R.valueStyle,
1366
+ ...z.valueStyle,
1369
1367
  ...t.treeChartSettings.nodeLayout?.valueStyle
1370
1368
  };
1371
1369
  return `
@@ -1410,54 +1408,54 @@ var vr = (e, t) => {
1410
1408
  }
1411
1409
  }
1412
1410
  }`;
1413
- }, Sr = {
1411
+ }, xr = {
1414
1412
  name: "Basic",
1415
- ...R,
1416
- getNodeContent: br,
1417
- getCSS: xr,
1413
+ ...z,
1414
+ getNodeContent: yr,
1415
+ getCSS: br,
1418
1416
  width: 140,
1419
1417
  sizes: (e) => {
1420
1418
  let t = {
1421
- ...R.labelStyle,
1419
+ ...z.labelStyle,
1422
1420
  ...e.treeChartSettings.nodeLayout?.labelStyle
1423
1421
  }, n = {
1424
- ...R.valueStyle,
1422
+ ...z.valueStyle,
1425
1423
  ...e.treeChartSettings.nodeLayout?.valueStyle
1426
1424
  };
1427
1425
  return {
1428
- label: E(t.fontSize) + 8,
1429
- value: E(n.fontSize) + 8
1426
+ label: D(t.fontSize) + 8,
1427
+ value: D(n.fontSize) + 8
1430
1428
  };
1431
1429
  },
1432
1430
  height: (e, t) => {
1433
1431
  let n = 8 + t.label;
1434
1432
  return e.data.value && (n += 8 + t.value), n;
1435
1433
  }
1436
- }, Cr = {
1437
- [p.KPIChange]: yr,
1438
- [p.Basic]: Sr
1439
- }, wr = { passive: !1 }, z = {
1434
+ }, Sr = {
1435
+ [a.KPIChange]: vr,
1436
+ [a.Basic]: xr
1437
+ }, Cr = { passive: !1 }, B = {
1440
1438
  capture: !0,
1441
1439
  passive: !1
1442
1440
  };
1443
- function Tr(e) {
1441
+ function wr(e) {
1444
1442
  e.stopImmediatePropagation();
1445
1443
  }
1446
- function B(e) {
1444
+ function V(e) {
1447
1445
  e.preventDefault(), e.stopImmediatePropagation();
1448
1446
  }
1449
- function Er(e) {
1450
- var t = e.document.documentElement, n = N(e).on("dragstart.drag", B, z);
1451
- "onselectstart" in t ? n.on("selectstart.drag", B, z) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1447
+ function Tr(e) {
1448
+ var t = e.document.documentElement, n = P(e).on("dragstart.drag", V, B);
1449
+ "onselectstart" in t ? n.on("selectstart.drag", V, B) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1452
1450
  }
1453
- function Dr(e, t) {
1454
- var n = e.document.documentElement, r = N(e).on("dragstart.drag", null);
1455
- t && (r.on("click.drag", B, z), setTimeout(function() {
1451
+ function Er(e, t) {
1452
+ var n = e.document.documentElement, r = P(e).on("dragstart.drag", null);
1453
+ t && (r.on("click.drag", V, B), setTimeout(function() {
1456
1454
  r.on("click.drag", null);
1457
1455
  }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
1458
1456
  }
1459
- var Or = (e) => () => e;
1460
- function kr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
1457
+ var Dr = (e) => () => e;
1458
+ function Or(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
1461
1459
  Object.defineProperties(this, {
1462
1460
  type: {
1463
1461
  value: e,
@@ -1512,65 +1510,65 @@ function kr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a
1512
1510
  _: { value: u }
1513
1511
  });
1514
1512
  }
1515
- kr.prototype.on = function() {
1513
+ Or.prototype.on = function() {
1516
1514
  var e = this._.on.apply(this._, arguments);
1517
1515
  return e === this._ ? this : e;
1518
- }, Ne();
1519
- function Ar(e) {
1516
+ }, Me();
1517
+ function kr(e) {
1520
1518
  return !e.ctrlKey && !e.button;
1521
1519
  }
1522
- function jr() {
1520
+ function Ar() {
1523
1521
  return this.parentNode;
1524
1522
  }
1525
- function Mr(e, t) {
1523
+ function jr(e, t) {
1526
1524
  return t ?? {
1527
1525
  x: e.x,
1528
1526
  y: e.y
1529
1527
  };
1530
1528
  }
1531
- function Nr() {
1529
+ function Mr() {
1532
1530
  return navigator.maxTouchPoints || "ontouchstart" in this;
1533
1531
  }
1534
- function Pr() {
1535
- var e = Ar, t = jr, n = Mr, r = Nr, i = {}, a = Me("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
1532
+ function Nr() {
1533
+ var e = kr, t = Ar, n = jr, r = Mr, i = {}, a = je("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
1536
1534
  function f(e) {
1537
- e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, wr).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
1535
+ e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, Cr).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
1538
1536
  }
1539
1537
  function p(n, r) {
1540
1538
  if (!(u || !e.call(this, n, r))) {
1541
1539
  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), Er(n.view), Tr(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
1540
+ i && (P(n.view).on("mousemove.drag", m, B).on("mouseup.drag", h, B), Tr(n.view), wr(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
1543
1541
  }
1544
1542
  }
1545
1543
  function m(e) {
1546
- if (B(e), !l) {
1544
+ if (V(e), !l) {
1547
1545
  var t = e.clientX - s, n = e.clientY - c;
1548
1546
  l = t * t + n * n > d;
1549
1547
  }
1550
1548
  i.mouse("drag", e);
1551
1549
  }
1552
1550
  function h(e) {
1553
- N(e.view).on("mousemove.drag mouseup.drag", null), Dr(e.view, l), B(e), i.mouse("end", e);
1551
+ P(e.view).on("mousemove.drag mouseup.drag", null), Er(e.view, l), V(e), i.mouse("end", e);
1554
1552
  }
1555
1553
  function g(n, r) {
1556
1554
  if (e.call(this, n, r)) {
1557
1555
  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])) && (Tr(n), c("start", n, i[s]));
1556
+ for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (wr(n), c("start", n, i[s]));
1559
1557
  }
1560
1558
  }
1561
1559
  function _(e) {
1562
1560
  var t = e.changedTouches, n = t.length, r, a;
1563
- for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (B(e), a("drag", e, t[r]));
1561
+ for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (V(e), a("drag", e, t[r]));
1564
1562
  }
1565
1563
  function v(e) {
1566
1564
  var t = e.changedTouches, n = t.length, r, a;
1567
1565
  for (u && clearTimeout(u), u = setTimeout(function() {
1568
1566
  u = null;
1569
- }, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (Tr(e), a("end", e, t[r]));
1567
+ }, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (wr(e), a("end", e, t[r]));
1570
1568
  }
1571
1569
  function y(e, t, r, s, c, l) {
1572
- var u = a.copy(), d = P(l || r, t), p, m, h;
1573
- if ((h = n.call(e, new kr("beforestart", {
1570
+ var u = a.copy(), d = F(l || r, t), p, m, h;
1571
+ if ((h = n.call(e, new Or("beforestart", {
1574
1572
  sourceEvent: r,
1575
1573
  target: f,
1576
1574
  identifier: c,
@@ -1588,10 +1586,10 @@ function Pr() {
1588
1586
  break;
1589
1587
  case "end": delete i[c], --o;
1590
1588
  case "drag":
1591
- d = P(l || a, t), _ = o;
1589
+ d = F(l || a, t), _ = o;
1592
1590
  break;
1593
1591
  }
1594
- u.call(r, e, new kr(r, {
1592
+ u.call(r, e, new Or(r, {
1595
1593
  sourceEvent: a,
1596
1594
  subject: h,
1597
1595
  target: f,
@@ -1606,13 +1604,13 @@ function Pr() {
1606
1604
  };
1607
1605
  }
1608
1606
  return f.filter = function(t) {
1609
- return arguments.length ? (e = typeof t == "function" ? t : Or(!!t), f) : e;
1607
+ return arguments.length ? (e = typeof t == "function" ? t : Dr(!!t), f) : e;
1610
1608
  }, f.container = function(e) {
1611
- return arguments.length ? (t = typeof e == "function" ? e : Or(e), f) : t;
1609
+ return arguments.length ? (t = typeof e == "function" ? e : Dr(e), f) : t;
1612
1610
  }, f.subject = function(e) {
1613
- return arguments.length ? (n = typeof e == "function" ? e : Or(e), f) : n;
1611
+ return arguments.length ? (n = typeof e == "function" ? e : Dr(e), f) : n;
1614
1612
  }, f.touchable = function(e) {
1615
- return arguments.length ? (r = typeof e == "function" ? e : Or(!!e), f) : r;
1613
+ return arguments.length ? (r = typeof e == "function" ? e : Dr(!!e), f) : r;
1616
1614
  }, f.on = function() {
1617
1615
  var e = a.on.apply(a, arguments);
1618
1616
  return e === a ? f : e;
@@ -1620,74 +1618,74 @@ function Pr() {
1620
1618
  return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
1621
1619
  }, f;
1622
1620
  }
1623
- var V = 0, Fr = 0, Ir = 0, Lr = 1e3, Rr, H, zr = 0, U = 0, Br = 0, W = typeof performance == "object" && performance.now ? performance : Date, Vr = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1621
+ var H = 0, Pr = 0, Fr = 0, Ir = 1e3, Lr, U, Rr = 0, W = 0, zr = 0, G = typeof performance == "object" && performance.now ? performance : Date, Br = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1624
1622
  setTimeout(e, 17);
1625
1623
  };
1624
+ function Vr() {
1625
+ return W ||= (Br(Hr), G.now() + zr);
1626
+ }
1626
1627
  function Hr() {
1627
- return U ||= (Vr(Ur), W.now() + Br);
1628
+ W = 0;
1628
1629
  }
1629
1630
  function Ur() {
1630
- U = 0;
1631
- }
1632
- function Wr() {
1633
1631
  this._call = this._time = this._next = null;
1634
1632
  }
1635
- Wr.prototype = Gr.prototype = {
1636
- constructor: Wr,
1633
+ Ur.prototype = Wr.prototype = {
1634
+ constructor: Ur,
1637
1635
  restart: function(e, t, n) {
1638
1636
  if (typeof e != "function") throw TypeError("callback is not a function");
1639
- n = (n == null ? Hr() : +n) + (t == null ? 0 : +t), !this._next && H !== this && (H ? H._next = this : Rr = this, H = this), this._call = e, this._time = n, Xr();
1637
+ n = (n == null ? Vr() : +n) + (t == null ? 0 : +t), !this._next && U !== this && (U ? U._next = this : Lr = this, U = this), this._call = e, this._time = n, Yr();
1640
1638
  },
1641
1639
  stop: function() {
1642
- this._call && (this._call = null, this._time = Infinity, Xr());
1640
+ this._call && (this._call = null, this._time = Infinity, Yr());
1643
1641
  }
1644
1642
  };
1645
- function Gr(e, t, n) {
1646
- var r = new Wr();
1643
+ function Wr(e, t, n) {
1644
+ var r = new Ur();
1647
1645
  return r.restart(e, t, n), r;
1648
1646
  }
1649
- function Kr() {
1650
- Hr(), ++V;
1651
- for (var e = Rr, t; e;) (t = U - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
1652
- --V;
1647
+ function Gr() {
1648
+ Vr(), ++H;
1649
+ for (var e = Lr, t; e;) (t = W - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
1650
+ --H;
1653
1651
  }
1654
- function qr() {
1655
- U = (zr = W.now()) + Br, V = Fr = 0;
1652
+ function Kr() {
1653
+ W = (Rr = G.now()) + zr, H = Pr = 0;
1656
1654
  try {
1657
- Kr();
1655
+ Gr();
1658
1656
  } finally {
1659
- V = 0, Yr(), U = 0;
1657
+ H = 0, Jr(), W = 0;
1660
1658
  }
1661
1659
  }
1662
- function Jr() {
1663
- var e = W.now(), t = e - zr;
1664
- t > Lr && (Br -= t, zr = e);
1660
+ function qr() {
1661
+ var e = G.now(), t = e - Rr;
1662
+ t > Ir && (zr -= t, Rr = e);
1665
1663
  }
1666
- function Yr() {
1667
- for (var e, t = Rr, 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 : Rr = n);
1668
- H = e, Xr(r);
1664
+ function Jr() {
1665
+ for (var e, t = Lr, 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 : Lr = n);
1666
+ U = e, Yr(r);
1669
1667
  }
1670
- function Xr(e) {
1671
- V || (Fr &&= clearTimeout(Fr), e - U > 24 ? (e < Infinity && (Fr = setTimeout(qr, e - W.now() - Br)), Ir &&= clearInterval(Ir)) : (Ir ||= (zr = W.now(), setInterval(Jr, Lr)), V = 1, Vr(qr)));
1668
+ function Yr(e) {
1669
+ H || (Pr &&= clearTimeout(Pr), e - W > 24 ? (e < Infinity && (Pr = setTimeout(Kr, e - G.now() - zr)), Fr &&= clearInterval(Fr)) : (Fr ||= (Rr = G.now(), setInterval(qr, Ir)), H = 1, Br(Kr)));
1672
1670
  }
1673
- function Zr(e, t, n) {
1674
- var r = new Wr();
1671
+ function Xr(e, t, n) {
1672
+ var r = new Ur();
1675
1673
  return t = t == null ? 0 : +t, r.restart((n) => {
1676
1674
  r.stop(), e(n + t);
1677
1675
  }, t, n), r;
1678
1676
  }
1679
- xe(), fe(), Ne();
1680
- var Qr = Me("start", "end", "cancel", "interrupt"), $r = [];
1681
- function ei(e, t, n, r, i, a) {
1677
+ xe(), he(), Me();
1678
+ var Zr = je("start", "end", "cancel", "interrupt"), Qr = [];
1679
+ function $r(e, t, n, r, i, a) {
1682
1680
  var o = e.__transition;
1683
1681
  if (!o) e.__transition = {};
1684
1682
  else if (n in o) return;
1685
- ni(e, n, {
1683
+ ti(e, n, {
1686
1684
  name: t,
1687
1685
  index: r,
1688
1686
  group: i,
1689
- on: Qr,
1690
- tween: $r,
1687
+ on: Zr,
1688
+ tween: Qr,
1691
1689
  time: a.time,
1692
1690
  delay: a.delay,
1693
1691
  duration: a.duration,
@@ -1696,24 +1694,24 @@ function ei(e, t, n, r, i, a) {
1696
1694
  state: 0
1697
1695
  });
1698
1696
  }
1699
- function ti(e, t) {
1700
- var n = K(e, t);
1697
+ function ei(e, t) {
1698
+ var n = q(e, t);
1701
1699
  if (n.state > 0) throw Error("too late; already scheduled");
1702
1700
  return n;
1703
1701
  }
1704
- function G(e, t) {
1705
- var n = K(e, t);
1702
+ function K(e, t) {
1703
+ var n = q(e, t);
1706
1704
  if (n.state > 3) throw Error("too late; already running");
1707
1705
  return n;
1708
1706
  }
1709
- function K(e, t) {
1707
+ function q(e, t) {
1710
1708
  var n = e.__transition;
1711
1709
  if (!n || !(n = n[t])) throw Error("transition not found");
1712
1710
  return n;
1713
1711
  }
1714
- function ni(e, t, n) {
1712
+ function ti(e, t, n) {
1715
1713
  var r = e.__transition, i;
1716
- r[t] = n, n.timer = Gr(a, 0, n.time);
1714
+ r[t] = n, n.timer = Wr(a, 0, n.time);
1717
1715
  function a(e) {
1718
1716
  n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
1719
1717
  }
@@ -1721,10 +1719,10 @@ function ni(e, t, n) {
1721
1719
  var l, u, d, f;
1722
1720
  if (n.state !== 1) return c();
1723
1721
  for (l in r) if (f = r[l], f.name === n.name) {
1724
- if (f.state === 3) return Zr(o);
1722
+ if (f.state === 3) return Xr(o);
1725
1723
  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
1724
  }
1727
- if (Zr(function() {
1725
+ if (Xr(function() {
1728
1726
  n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
1729
1727
  }), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
1730
1728
  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 +1738,7 @@ function ni(e, t, n) {
1740
1738
  delete e.__transition;
1741
1739
  }
1742
1740
  }
1743
- function ri(e, t) {
1741
+ function ni(e, t) {
1744
1742
  var n = e.__transition, r, i, a = !0, o;
1745
1743
  if (n) {
1746
1744
  for (o in t = t == null ? null : t + "", n) {
@@ -1753,15 +1751,15 @@ function ri(e, t) {
1753
1751
  a && delete e.__transition;
1754
1752
  }
1755
1753
  }
1756
- function ii(e) {
1754
+ function ri(e) {
1757
1755
  return this.each(function() {
1758
- ri(this, e);
1756
+ ni(this, e);
1759
1757
  });
1760
1758
  }
1761
- function ai(e, t) {
1759
+ function ii(e, t) {
1762
1760
  var n, r;
1763
1761
  return function() {
1764
- var i = G(this, e), a = i.tween;
1762
+ var i = K(this, e), a = i.tween;
1765
1763
  if (a !== n) {
1766
1764
  r = n = a;
1767
1765
  for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
@@ -1772,11 +1770,11 @@ function ai(e, t) {
1772
1770
  i.tween = r;
1773
1771
  };
1774
1772
  }
1775
- function oi(e, t, n) {
1773
+ function ai(e, t, n) {
1776
1774
  var r, i;
1777
1775
  if (typeof n != "function") throw Error();
1778
1776
  return function() {
1779
- var a = G(this, e), o = a.tween;
1777
+ var a = K(this, e), o = a.tween;
1780
1778
  if (o !== r) {
1781
1779
  i = (r = o).slice();
1782
1780
  for (var s = {
@@ -1791,388 +1789,388 @@ function oi(e, t, n) {
1791
1789
  a.tween = i;
1792
1790
  };
1793
1791
  }
1794
- function si(e, t) {
1792
+ function oi(e, t) {
1795
1793
  var n = this._id;
1796
1794
  if (e += "", arguments.length < 2) {
1797
- for (var r = K(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
1795
+ 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
1796
  return null;
1799
1797
  }
1800
- return this.each((t == null ? ai : oi)(n, e, t));
1798
+ return this.each((t == null ? ii : ai)(n, e, t));
1801
1799
  }
1802
- function ci(e, t, n) {
1800
+ function si(e, t, n) {
1803
1801
  var r = e._id;
1804
1802
  return e.each(function() {
1805
- var e = G(this, r);
1803
+ var e = K(this, r);
1806
1804
  (e.value ||= {})[t] = n.apply(this, arguments);
1807
1805
  }), function(e) {
1808
- return K(e, r).value[t];
1806
+ return q(e, r).value[t];
1809
1807
  };
1810
1808
  }
1811
- function li(e, t) {
1809
+ function ci(e, t) {
1812
1810
  var n;
1813
- return (typeof t == "number" ? T : t instanceof Se ? se : (n = Se(t)) ? (t = n, se) : he)(e, t);
1811
+ return (typeof t == "number" ? ae : t instanceof be ? ue : (n = be(t)) ? (t = n, ue) : ve)(e, t);
1814
1812
  }
1815
- fe();
1816
- function ui(e) {
1813
+ he();
1814
+ function li(e) {
1817
1815
  return function() {
1818
1816
  this.removeAttribute(e);
1819
1817
  };
1820
1818
  }
1821
- function di(e) {
1819
+ function ui(e) {
1822
1820
  return function() {
1823
1821
  this.removeAttributeNS(e.space, e.local);
1824
1822
  };
1825
1823
  }
1826
- function fi(e, t, n) {
1824
+ function di(e, t, n) {
1827
1825
  var r, i = n + "", a;
1828
1826
  return function() {
1829
1827
  var o = this.getAttribute(e);
1830
1828
  return o === i ? null : o === r ? a : a = t(r = o, n);
1831
1829
  };
1832
1830
  }
1833
- function pi(e, t, n) {
1831
+ function fi(e, t, n) {
1834
1832
  var r, i = n + "", a;
1835
1833
  return function() {
1836
1834
  var o = this.getAttributeNS(e.space, e.local);
1837
1835
  return o === i ? null : o === r ? a : a = t(r = o, n);
1838
1836
  };
1839
1837
  }
1840
- function mi(e, t, n) {
1838
+ function pi(e, t, n) {
1841
1839
  var r, i, a;
1842
1840
  return function() {
1843
1841
  var o, s = n(this), c;
1844
1842
  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
1843
  };
1846
1844
  }
1847
- function hi(e, t, n) {
1845
+ function mi(e, t, n) {
1848
1846
  var r, i, a;
1849
1847
  return function() {
1850
1848
  var o, s = n(this), c;
1851
1849
  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
1850
  };
1853
1851
  }
1854
- function gi(e, t) {
1855
- var n = dt(e), r = n === "transform" ? ge : li;
1856
- return this.attrTween(e, typeof t == "function" ? (n.local ? hi : mi)(n, r, ci(this, "attr." + e, t)) : t == null ? (n.local ? di : ui)(n) : (n.local ? pi : fi)(n, r, t));
1852
+ function hi(e, t) {
1853
+ var n = ut(e), r = n === "transform" ? ye : ci;
1854
+ return this.attrTween(e, typeof t == "function" ? (n.local ? mi : pi)(n, r, si(this, "attr." + e, t)) : t == null ? (n.local ? ui : li)(n) : (n.local ? fi : di)(n, r, t));
1857
1855
  }
1858
- function _i(e, t) {
1856
+ function gi(e, t) {
1859
1857
  return function(n) {
1860
1858
  this.setAttribute(e, t.call(this, n));
1861
1859
  };
1862
1860
  }
1863
- function vi(e, t) {
1861
+ function _i(e, t) {
1864
1862
  return function(n) {
1865
1863
  this.setAttributeNS(e.space, e.local, t.call(this, n));
1866
1864
  };
1867
1865
  }
1868
- function yi(e, t) {
1866
+ function vi(e, t) {
1869
1867
  var n, r;
1870
1868
  function i() {
1871
1869
  var i = t.apply(this, arguments);
1872
- return i !== r && (n = (r = i) && vi(e, i)), n;
1870
+ return i !== r && (n = (r = i) && _i(e, i)), n;
1873
1871
  }
1874
1872
  return i._value = t, i;
1875
1873
  }
1876
- function bi(e, t) {
1874
+ function yi(e, t) {
1877
1875
  var n, r;
1878
1876
  function i() {
1879
1877
  var i = t.apply(this, arguments);
1880
- return i !== r && (n = (r = i) && _i(e, i)), n;
1878
+ return i !== r && (n = (r = i) && gi(e, i)), n;
1881
1879
  }
1882
1880
  return i._value = t, i;
1883
1881
  }
1884
- function xi(e, t) {
1882
+ function bi(e, t) {
1885
1883
  var n = "attr." + e;
1886
1884
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
1887
1885
  if (t == null) return this.tween(n, null);
1888
1886
  if (typeof t != "function") throw Error();
1889
- var r = dt(e);
1890
- return this.tween(n, (r.local ? yi : bi)(r, t));
1887
+ var r = ut(e);
1888
+ return this.tween(n, (r.local ? vi : yi)(r, t));
1891
1889
  }
1892
- function Si(e, t) {
1890
+ function xi(e, t) {
1893
1891
  return function() {
1894
- ti(this, e).delay = +t.apply(this, arguments);
1892
+ ei(this, e).delay = +t.apply(this, arguments);
1895
1893
  };
1896
1894
  }
1897
- function Ci(e, t) {
1895
+ function Si(e, t) {
1898
1896
  return t = +t, function() {
1899
- ti(this, e).delay = t;
1897
+ ei(this, e).delay = t;
1900
1898
  };
1901
1899
  }
1902
- function wi(e) {
1900
+ function Ci(e) {
1903
1901
  var t = this._id;
1904
- return arguments.length ? this.each((typeof e == "function" ? Si : Ci)(t, e)) : K(this.node(), t).delay;
1902
+ return arguments.length ? this.each((typeof e == "function" ? xi : Si)(t, e)) : q(this.node(), t).delay;
1905
1903
  }
1906
- function Ti(e, t) {
1904
+ function wi(e, t) {
1907
1905
  return function() {
1908
- G(this, e).duration = +t.apply(this, arguments);
1906
+ K(this, e).duration = +t.apply(this, arguments);
1909
1907
  };
1910
1908
  }
1911
- function Ei(e, t) {
1909
+ function Ti(e, t) {
1912
1910
  return t = +t, function() {
1913
- G(this, e).duration = t;
1911
+ K(this, e).duration = t;
1914
1912
  };
1915
1913
  }
1916
- function Di(e) {
1914
+ function Ei(e) {
1917
1915
  var t = this._id;
1918
- return arguments.length ? this.each((typeof e == "function" ? Ti : Ei)(t, e)) : K(this.node(), t).duration;
1916
+ return arguments.length ? this.each((typeof e == "function" ? wi : Ti)(t, e)) : q(this.node(), t).duration;
1919
1917
  }
1920
- function Oi(e, t) {
1918
+ function Di(e, t) {
1921
1919
  if (typeof t != "function") throw Error();
1922
1920
  return function() {
1923
- G(this, e).ease = t;
1921
+ K(this, e).ease = t;
1924
1922
  };
1925
1923
  }
1926
- function ki(e) {
1924
+ function Oi(e) {
1927
1925
  var t = this._id;
1928
- return arguments.length ? this.each(Oi(t, e)) : K(this.node(), t).ease;
1926
+ return arguments.length ? this.each(Di(t, e)) : q(this.node(), t).ease;
1929
1927
  }
1930
- function Ai(e, t) {
1928
+ function ki(e, t) {
1931
1929
  return function() {
1932
1930
  var n = t.apply(this, arguments);
1933
1931
  if (typeof n != "function") throw Error();
1934
- G(this, e).ease = n;
1932
+ K(this, e).ease = n;
1935
1933
  };
1936
1934
  }
1937
- function ji(e) {
1935
+ function Ai(e) {
1938
1936
  if (typeof e != "function") throw Error();
1939
- return this.each(Ai(this._id, e));
1937
+ return this.each(ki(this._id, e));
1940
1938
  }
1941
- function Mi(e) {
1942
- typeof e != "function" && (e = Ct(e));
1939
+ function ji(e) {
1940
+ typeof e != "function" && (e = St(e));
1943
1941
  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 q(r, this._parents, this._name, this._id);
1942
+ return new J(r, this._parents, this._name, this._id);
1945
1943
  }
1946
- function Ni(e) {
1944
+ function Mi(e) {
1947
1945
  if (e._id !== this._id) throw Error();
1948
1946
  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
1947
  for (; s < r; ++s) o[s] = t[s];
1950
- return new q(o, this._parents, this._name, this._id);
1948
+ return new J(o, this._parents, this._name, this._id);
1951
1949
  }
1952
- function Pi(e) {
1950
+ function Ni(e) {
1953
1951
  return (e + "").trim().split(/^|\s+/).every(function(e) {
1954
1952
  var t = e.indexOf(".");
1955
1953
  return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
1956
1954
  });
1957
1955
  }
1958
- function Fi(e, t, n) {
1959
- var r, i, a = Pi(t) ? ti : G;
1956
+ function Pi(e, t, n) {
1957
+ var r, i, a = Ni(t) ? ei : K;
1960
1958
  return function() {
1961
1959
  var o = a(this, e), s = o.on;
1962
1960
  s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
1963
1961
  };
1964
1962
  }
1965
- function Ii(e, t) {
1963
+ function Fi(e, t) {
1966
1964
  var n = this._id;
1967
- return arguments.length < 2 ? K(this.node(), n).on.on(e) : this.each(Fi(n, e, t));
1965
+ return arguments.length < 2 ? q(this.node(), n).on.on(e) : this.each(Pi(n, e, t));
1968
1966
  }
1969
- function Li(e) {
1967
+ function Ii(e) {
1970
1968
  return function() {
1971
1969
  var t = this.parentNode;
1972
1970
  for (var n in this.__transition) if (+n !== e) return;
1973
1971
  t && t.removeChild(this);
1974
1972
  };
1975
1973
  }
1976
- function Ri() {
1977
- return this.on("end.remove", Li(this._id));
1974
+ function Li() {
1975
+ return this.on("end.remove", Ii(this._id));
1978
1976
  }
1979
- function zi(e) {
1977
+ function Ri(e) {
1980
1978
  var t = this._name, n = this._id;
1981
- typeof e != "function" && (e = gt(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, ei(l[f], t, n, f, l, K(u, n)));
1983
- return new q(a, this._parents, t, n);
1979
+ typeof e != "function" && (e = ht(e));
1980
+ 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, $r(l[f], t, n, f, l, q(u, n)));
1981
+ return new J(a, this._parents, t, n);
1984
1982
  }
1985
- function Bi(e) {
1983
+ function zi(e) {
1986
1984
  var t = this._name, n = this._id;
1987
- typeof e != "function" && (e = bt(e));
1985
+ typeof e != "function" && (e = yt(e));
1988
1986
  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 = K(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && ei(p, t, n, h, f, m);
1987
+ 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]) && $r(p, t, n, h, f, m);
1990
1988
  a.push(f), o.push(u);
1991
1989
  }
1992
- return new q(a, o, t, n);
1990
+ return new J(a, o, t, n);
1993
1991
  }
1994
- var Vi = M.prototype.constructor;
1995
- function Hi() {
1996
- return new Vi(this._groups, this._parents);
1992
+ var Bi = N.prototype.constructor;
1993
+ function Vi() {
1994
+ return new Bi(this._groups, this._parents);
1997
1995
  }
1998
- fe();
1999
- function Ui(e, t) {
1996
+ he();
1997
+ function Hi(e, t) {
2000
1998
  var n, r, i;
2001
1999
  return function() {
2002
- var a = A(this, e), o = (this.style.removeProperty(e), A(this, e));
2000
+ var a = j(this, e), o = (this.style.removeProperty(e), j(this, e));
2003
2001
  return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
2004
2002
  };
2005
2003
  }
2006
- function Wi(e) {
2004
+ function Ui(e) {
2007
2005
  return function() {
2008
2006
  this.style.removeProperty(e);
2009
2007
  };
2010
2008
  }
2011
- function Gi(e, t, n) {
2009
+ function Wi(e, t, n) {
2012
2010
  var r, i = n + "", a;
2013
2011
  return function() {
2014
- var o = A(this, e);
2012
+ var o = j(this, e);
2015
2013
  return o === i ? null : o === r ? a : a = t(r = o, n);
2016
2014
  };
2017
2015
  }
2018
- function Ki(e, t, n) {
2016
+ function Gi(e, t, n) {
2019
2017
  var r, i, a;
2020
2018
  return function() {
2021
- var o = A(this, e), s = n(this), c = s + "";
2022
- 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));
2019
+ var o = j(this, e), s = n(this), c = s + "";
2020
+ return s ?? (c = s = (this.style.removeProperty(e), j(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
2023
2021
  };
2024
2022
  }
2025
- function qi(e, t) {
2023
+ function Ki(e, t) {
2026
2024
  var n, r, i, a = "style." + t, o = "end." + a, s;
2027
2025
  return function() {
2028
- var c = G(this, e), l = c.on, u = c.value[a] == null ? s ||= Wi(t) : void 0;
2026
+ var c = K(this, e), l = c.on, u = c.value[a] == null ? s ||= Ui(t) : void 0;
2029
2027
  (l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
2030
2028
  };
2031
2029
  }
2032
- function Ji(e, t, n) {
2033
- var r = (e += "") == "transform" ? me : li;
2034
- return t == null ? this.styleTween(e, Ui(e, r)).on("end.style." + e, Wi(e)) : typeof t == "function" ? this.styleTween(e, Ki(e, r, ci(this, "style." + e, t))).each(qi(this._id, e)) : this.styleTween(e, Gi(e, r, t), n).on("end.style." + e, null);
2030
+ function qi(e, t, n) {
2031
+ var r = (e += "") == "transform" ? _e : ci;
2032
+ return t == null ? this.styleTween(e, Hi(e, r)).on("end.style." + e, Ui(e)) : typeof t == "function" ? this.styleTween(e, Gi(e, r, si(this, "style." + e, t))).each(Ki(this._id, e)) : this.styleTween(e, Wi(e, r, t), n).on("end.style." + e, null);
2035
2033
  }
2036
- function Yi(e, t, n) {
2034
+ function Ji(e, t, n) {
2037
2035
  return function(r) {
2038
2036
  this.style.setProperty(e, t.call(this, r), n);
2039
2037
  };
2040
2038
  }
2041
- function Xi(e, t, n) {
2039
+ function Yi(e, t, n) {
2042
2040
  var r, i;
2043
2041
  function a() {
2044
2042
  var a = t.apply(this, arguments);
2045
- return a !== i && (r = (i = a) && Yi(e, a, n)), r;
2043
+ return a !== i && (r = (i = a) && Ji(e, a, n)), r;
2046
2044
  }
2047
2045
  return a._value = t, a;
2048
2046
  }
2049
- function Zi(e, t, n) {
2047
+ function Xi(e, t, n) {
2050
2048
  var r = "style." + (e += "");
2051
2049
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
2052
2050
  if (t == null) return this.tween(r, null);
2053
2051
  if (typeof t != "function") throw Error();
2054
- return this.tween(r, Xi(e, t, n ?? ""));
2052
+ return this.tween(r, Yi(e, t, n ?? ""));
2055
2053
  }
2056
- function Qi(e) {
2054
+ function Zi(e) {
2057
2055
  return function() {
2058
2056
  this.textContent = e;
2059
2057
  };
2060
2058
  }
2061
- function $i(e) {
2059
+ function Qi(e) {
2062
2060
  return function() {
2063
2061
  var t = e(this);
2064
2062
  this.textContent = t ?? "";
2065
2063
  };
2066
2064
  }
2067
- function ea(e) {
2068
- return this.tween("text", typeof e == "function" ? $i(ci(this, "text", e)) : Qi(e == null ? "" : e + ""));
2065
+ function $i(e) {
2066
+ return this.tween("text", typeof e == "function" ? Qi(si(this, "text", e)) : Zi(e == null ? "" : e + ""));
2069
2067
  }
2070
- function ta(e) {
2068
+ function ea(e) {
2071
2069
  return function(t) {
2072
2070
  this.textContent = e.call(this, t);
2073
2071
  };
2074
2072
  }
2075
- function na(e) {
2073
+ function ta(e) {
2076
2074
  var t, n;
2077
2075
  function r() {
2078
2076
  var r = e.apply(this, arguments);
2079
- return r !== n && (t = (n = r) && ta(r)), t;
2077
+ return r !== n && (t = (n = r) && ea(r)), t;
2080
2078
  }
2081
2079
  return r._value = e, r;
2082
2080
  }
2083
- function ra(e) {
2081
+ function na(e) {
2084
2082
  var t = "text";
2085
2083
  if (arguments.length < 1) return (t = this.tween(t)) && t._value;
2086
2084
  if (e == null) return this.tween(t, null);
2087
2085
  if (typeof e != "function") throw Error();
2088
- return this.tween(t, na(e));
2086
+ return this.tween(t, ta(e));
2089
2087
  }
2090
- function ia() {
2091
- for (var e = this._name, t = this._id, n = ca(), 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]) {
2092
- var u = K(c, t);
2093
- ei(c, e, n, l, o, {
2088
+ function ra() {
2089
+ for (var e = this._name, t = this._id, n = sa(), 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]) {
2090
+ var u = q(c, t);
2091
+ $r(c, e, n, l, o, {
2094
2092
  time: u.time + u.delay + u.duration,
2095
2093
  delay: 0,
2096
2094
  duration: u.duration,
2097
2095
  ease: u.ease
2098
2096
  });
2099
2097
  }
2100
- return new q(r, this._parents, e, n);
2098
+ return new J(r, this._parents, e, n);
2101
2099
  }
2102
- function aa() {
2100
+ function ia() {
2103
2101
  var e, t, n = this, r = n._id, i = n.size();
2104
2102
  return new Promise(function(a, o) {
2105
2103
  var s = { value: o }, c = { value: function() {
2106
2104
  --i === 0 && a();
2107
2105
  } };
2108
2106
  n.each(function() {
2109
- var n = G(this, r), i = n.on;
2107
+ var n = K(this, r), i = n.on;
2110
2108
  i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
2111
2109
  }), i === 0 && a();
2112
2110
  });
2113
2111
  }
2114
- var oa = 0;
2115
- function q(e, t, n, r) {
2112
+ var aa = 0;
2113
+ function J(e, t, n, r) {
2116
2114
  this._groups = e, this._parents = t, this._name = n, this._id = r;
2117
2115
  }
2118
- function sa(e) {
2119
- return M().transition(e);
2120
- }
2121
- function ca() {
2122
- return ++oa;
2123
- }
2124
- var J = M.prototype;
2125
- q.prototype = sa.prototype = {
2126
- constructor: q,
2127
- select: zi,
2128
- selectAll: Bi,
2129
- selectChild: J.selectChild,
2130
- selectChildren: J.selectChildren,
2131
- filter: Mi,
2132
- merge: Ni,
2133
- selection: Hi,
2134
- transition: ia,
2135
- call: J.call,
2136
- nodes: J.nodes,
2137
- node: J.node,
2138
- size: J.size,
2139
- empty: J.empty,
2140
- each: J.each,
2141
- on: Ii,
2142
- attr: gi,
2143
- attrTween: xi,
2144
- style: Ji,
2145
- styleTween: Zi,
2146
- text: ea,
2147
- textTween: ra,
2148
- remove: Ri,
2149
- tween: si,
2150
- delay: wi,
2151
- duration: Di,
2152
- ease: ki,
2153
- easeVarying: ji,
2154
- end: aa,
2155
- [Symbol.iterator]: J[Symbol.iterator]
2156
- }, le();
2157
- var la = {
2116
+ function oa(e) {
2117
+ return N().transition(e);
2118
+ }
2119
+ function sa() {
2120
+ return ++aa;
2121
+ }
2122
+ var Y = N.prototype;
2123
+ J.prototype = oa.prototype = {
2124
+ constructor: J,
2125
+ select: Ri,
2126
+ selectAll: zi,
2127
+ selectChild: Y.selectChild,
2128
+ selectChildren: Y.selectChildren,
2129
+ filter: ji,
2130
+ merge: Mi,
2131
+ selection: Vi,
2132
+ transition: ra,
2133
+ call: Y.call,
2134
+ nodes: Y.nodes,
2135
+ node: Y.node,
2136
+ size: Y.size,
2137
+ empty: Y.empty,
2138
+ each: Y.each,
2139
+ on: Fi,
2140
+ attr: hi,
2141
+ attrTween: bi,
2142
+ style: qi,
2143
+ styleTween: Xi,
2144
+ text: $i,
2145
+ textTween: na,
2146
+ remove: Li,
2147
+ tween: oi,
2148
+ delay: Ci,
2149
+ duration: Ei,
2150
+ ease: Oi,
2151
+ easeVarying: Ai,
2152
+ end: ia,
2153
+ [Symbol.iterator]: Y[Symbol.iterator]
2154
+ }, fe();
2155
+ var ca = {
2158
2156
  time: null,
2159
2157
  delay: 0,
2160
2158
  duration: 250,
2161
- ease: ue
2159
+ ease: pe
2162
2160
  };
2163
- function ua(e, t) {
2161
+ function la(e, t) {
2164
2162
  for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
2165
2163
  return n;
2166
2164
  }
2167
- function da(e) {
2165
+ function ua(e) {
2168
2166
  var t, n;
2169
- e instanceof q ? (t = e._id, e = e._name) : (t = ca(), (n = la).time = Hr(), e = e == null ? null : e + "");
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]) && ei(c, e, t, l, o, n || ua(c, t));
2171
- return new q(r, this._parents, e, t);
2167
+ e instanceof J ? (t = e._id, e = e._name) : (t = sa(), (n = ca).time = Vr(), e = e == null ? null : e + "");
2168
+ 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]) && $r(c, e, t, l, o, n || la(c, t));
2169
+ return new J(r, this._parents, e, t);
2172
2170
  }
2173
- M.prototype.interrupt = ii, M.prototype.transition = da;
2174
- var fa = (e) => () => e;
2175
- function pa(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
2171
+ N.prototype.interrupt = ri, N.prototype.transition = ua;
2172
+ var da = (e) => () => e;
2173
+ function fa(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
2176
2174
  Object.defineProperties(this, {
2177
2175
  type: {
2178
2176
  value: e,
@@ -2197,16 +2195,16 @@ function pa(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
2197
2195
  _: { value: i }
2198
2196
  });
2199
2197
  }
2200
- function Y(e, t, n) {
2198
+ function X(e, t, n) {
2201
2199
  this.k = e, this.x = t, this.y = n;
2202
2200
  }
2203
- Y.prototype = {
2204
- constructor: Y,
2201
+ X.prototype = {
2202
+ constructor: X,
2205
2203
  scale: function(e) {
2206
- return e === 1 ? this : new Y(this.k * e, this.x, this.y);
2204
+ return e === 1 ? this : new X(this.k * e, this.x, this.y);
2207
2205
  },
2208
2206
  translate: function(e, t) {
2209
- return e === 0 & t === 0 ? this : new Y(this.k, this.x + this.k * e, this.y + this.k * t);
2207
+ return e === 0 & t === 0 ? this : new X(this.k, this.x + this.k * e, this.y + this.k * t);
2210
2208
  },
2211
2209
  apply: function(e) {
2212
2210
  return [e[0] * this.k + this.x, e[1] * this.k + this.y];
@@ -2236,19 +2234,19 @@ Y.prototype = {
2236
2234
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
2237
2235
  }
2238
2236
  };
2239
- var ma = new Y(1, 0, 0);
2240
- ha.prototype = Y.prototype;
2241
- function ha(e) {
2242
- for (; !e.__zoom;) if (!(e = e.parentNode)) return ma;
2237
+ var pa = new X(1, 0, 0);
2238
+ ma.prototype = X.prototype;
2239
+ function ma(e) {
2240
+ for (; !e.__zoom;) if (!(e = e.parentNode)) return pa;
2243
2241
  return e.__zoom;
2244
2242
  }
2245
- function ga(e) {
2243
+ function ha(e) {
2246
2244
  e.stopImmediatePropagation();
2247
2245
  }
2248
- function X(e) {
2246
+ function ga(e) {
2249
2247
  e.preventDefault(), e.stopImmediatePropagation();
2250
2248
  }
2251
- Ne(), fe();
2249
+ Me(), he();
2252
2250
  function _a(e) {
2253
2251
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
2254
2252
  }
@@ -2257,7 +2255,7 @@ function va() {
2257
2255
  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
2256
  }
2259
2257
  function ya() {
2260
- return this.__zoom || ma;
2258
+ return this.__zoom || pa;
2261
2259
  }
2262
2260
  function ba(e) {
2263
2261
  return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
@@ -2270,9 +2268,9 @@ function Sa(e, t, n) {
2270
2268
  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
2269
  }
2272
2270
  function Ca() {
2273
- var e = _a, t = va, n = Sa, r = ba, i = xa, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = de, l = Me("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
2271
+ var e = _a, t = va, n = Sa, r = ba, i = xa, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = me, l = je("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
2274
2272
  function _(e) {
2275
- e.property("__zoom", ya).on("wheel.zoom", ee, { passive: !1 }).on("mousedown.zoom", w).on("dblclick.zoom", te).filter(i).on("touchstart.zoom", ne).on("touchmove.zoom", T).on("touchend.zoom touchcancel.zoom", re).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2273
+ e.property("__zoom", ya).on("wheel.zoom", w, { passive: !1 }).on("mousedown.zoom", T).on("dblclick.zoom", ee).filter(i).on("touchstart.zoom", te).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", ne).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2276
2274
  }
2277
2275
  _.transform = function(e, t, n, r) {
2278
2276
  var i = e.selection ? e.selection() : e;
@@ -2295,15 +2293,15 @@ function Ca() {
2295
2293
  }, _.translateTo = function(e, r, i, a, s) {
2296
2294
  _.transform(e, function() {
2297
2295
  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(ma.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);
2296
+ return n(pa.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
2297
  }, a, s);
2300
2298
  };
2301
2299
  function v(e, t) {
2302
- return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new Y(t, e.x, e.y);
2300
+ return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new X(t, e.x, e.y);
2303
2301
  }
2304
2302
  function y(e, t, n) {
2305
2303
  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 Y(e.k, r, i);
2304
+ return r === e.x && i === e.y ? e : new X(e.k, r, i);
2307
2305
  }
2308
2306
  function b(e) {
2309
2307
  return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
@@ -2319,7 +2317,7 @@ function Ca() {
2319
2317
  if (e === 1) e = f;
2320
2318
  else {
2321
2319
  var t = p(e), n = u / t[2];
2322
- e = new Y(n, l[0] - t[0] * n, l[1] - t[1] * n);
2320
+ e = new X(n, l[0] - t[0] * n, l[1] - t[1] * n);
2323
2321
  }
2324
2322
  o.zoom(null, e);
2325
2323
  };
@@ -2345,8 +2343,8 @@ function Ca() {
2345
2343
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
2346
2344
  },
2347
2345
  emit: function(e) {
2348
- var t = N(this.that).datum();
2349
- l.call(e, this.that, new pa(e, {
2346
+ var t = P(this.that).datum();
2347
+ l.call(e, this.that, new fa(e, {
2350
2348
  sourceEvent: this.sourceEvent,
2351
2349
  target: _,
2352
2350
  type: e,
@@ -2355,55 +2353,55 @@ function Ca() {
2355
2353
  }), t);
2356
2354
  }
2357
2355
  };
2358
- function ee(t, ...i) {
2356
+ function w(t, ...i) {
2359
2357
  if (!e.apply(this, arguments)) return;
2360
- 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);
2358
+ var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u = F(t);
2361
2359
  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
2360
  else if (c.k === l) return;
2363
- else s.mouse = [u, c.invert(u)], ri(this), s.start();
2364
- X(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
2361
+ else s.mouse = [u, c.invert(u)], ni(this), s.start();
2362
+ ga(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
2365
2363
  function d() {
2366
2364
  s.wheel = null, s.end();
2367
2365
  }
2368
2366
  }
2369
- function w(t, ...r) {
2367
+ function T(t, ...r) {
2370
2368
  if (f || !e.apply(this, arguments)) return;
2371
- 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
- Er(t.view), ga(t), a.mouse = [c, this.__zoom.invert(c)], ri(this), a.start();
2369
+ var i = t.currentTarget, a = S(this, r, !0).event(t), s = P(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", p, !0), c = F(t, i), l = t.clientX, u = t.clientY;
2370
+ Tr(t.view), ha(t), a.mouse = [c, this.__zoom.invert(c)], ni(this), a.start();
2373
2371
  function d(e) {
2374
- if (X(e), !a.moved) {
2372
+ if (ga(e), !a.moved) {
2375
2373
  var t = e.clientX - l, r = e.clientY - u;
2376
2374
  a.moved = t * t + r * r > h;
2377
2375
  }
2378
- a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = P(e, i), a.mouse[1]), a.extent, o));
2376
+ a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = F(e, i), a.mouse[1]), a.extent, o));
2379
2377
  }
2380
2378
  function p(e) {
2381
- s.on("mousemove.zoom mouseup.zoom", null), Dr(e.view, a.moved), X(e), a.event(e).end();
2379
+ s.on("mousemove.zoom mouseup.zoom", null), Er(e.view, a.moved), ga(e), a.event(e).end();
2382
2380
  }
2383
2381
  }
2384
- function te(r, ...i) {
2382
+ function ee(r, ...i) {
2385
2383
  if (e.apply(this, arguments)) {
2386
- 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
- X(r), s > 0 ? N(this).transition().duration(s).call(x, d, c, r) : N(this).call(_.transform, d, c, r);
2384
+ var a = this.__zoom, c = F(r.changedTouches ? r.changedTouches[0] : r, this), l = a.invert(c), u = a.k * (r.shiftKey ? .5 : 2), d = n(y(v(a, u), c, l), t.apply(this, i), o);
2385
+ ga(r), s > 0 ? P(this).transition().duration(s).call(x, d, c, r) : P(this).call(_.transform, d, c, r);
2388
2386
  }
2389
2387
  }
2390
- function ne(t, ...n) {
2388
+ function te(t, ...n) {
2391
2389
  if (e.apply(this, arguments)) {
2392
2390
  var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
2393
- for (ga(t), s = 0; s < i; ++s) c = r[s], l = P(c, this), l = [
2391
+ for (ha(t), s = 0; s < i; ++s) c = r[s], l = F(c, this), l = [
2394
2392
  l,
2395
2393
  this.__zoom.invert(l),
2396
2394
  c.identifier
2397
2395
  ], 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
2396
  u &&= clearTimeout(u), o && (a.taps < 2 && (d = l[0], u = setTimeout(function() {
2399
2397
  u = null;
2400
- }, p)), ri(this), a.start());
2398
+ }, p)), ni(this), a.start());
2401
2399
  }
2402
2400
  }
2403
- function T(e, ...t) {
2401
+ function E(e, ...t) {
2404
2402
  if (this.__zooming) {
2405
2403
  var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
2406
- for (X(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);
2404
+ for (ga(e), s = 0; s < a; ++s) c = i[s], l = F(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
2407
2405
  if (c = r.that.__zoom, r.touch1) {
2408
2406
  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
2407
  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,27 +2410,27 @@ function Ca() {
2412
2410
  r.zoom("touch", n(y(c, l, u), r.extent, o));
2413
2411
  }
2414
2412
  }
2415
- function re(e, ...t) {
2413
+ function ne(e, ...t) {
2416
2414
  if (this.__zooming) {
2417
2415
  var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
2418
- for (ga(e), f && clearTimeout(f), f = setTimeout(function() {
2416
+ for (ha(e), f && clearTimeout(f), f = setTimeout(function() {
2419
2417
  f = null;
2420
2418
  }, 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
2419
  if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
2422
- else if (n.end(), n.taps === 2 && (o = P(o, this), Math.hypot(d[0] - o[0], d[1] - o[1]) < g)) {
2423
- var s = N(this).on("dblclick.zoom");
2420
+ else if (n.end(), n.taps === 2 && (o = F(o, this), Math.hypot(d[0] - o[0], d[1] - o[1]) < g)) {
2421
+ var s = P(this).on("dblclick.zoom");
2424
2422
  s && s.apply(this, arguments);
2425
2423
  }
2426
2424
  }
2427
2425
  }
2428
2426
  return _.wheelDelta = function(e) {
2429
- return arguments.length ? (r = typeof e == "function" ? e : fa(+e), _) : r;
2427
+ return arguments.length ? (r = typeof e == "function" ? e : da(+e), _) : r;
2430
2428
  }, _.filter = function(t) {
2431
- return arguments.length ? (e = typeof t == "function" ? t : fa(!!t), _) : e;
2429
+ return arguments.length ? (e = typeof t == "function" ? t : da(!!t), _) : e;
2432
2430
  }, _.touchable = function(e) {
2433
- return arguments.length ? (i = typeof e == "function" ? e : fa(!!e), _) : i;
2431
+ return arguments.length ? (i = typeof e == "function" ? e : da(!!e), _) : i;
2434
2432
  }, _.extent = function(e) {
2435
- return arguments.length ? (t = typeof e == "function" ? e : fa([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
2433
+ return arguments.length ? (t = typeof e == "function" ? e : da([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
2436
2434
  }, _.scaleExtent = function(e) {
2437
2435
  return arguments.length ? (a[0] = +e[0], a[1] = +e[1], _) : [a[0], a[1]];
2438
2436
  }, _.translateExtent = function(e) {
@@ -2452,7 +2450,7 @@ function Ca() {
2452
2450
  return arguments.length ? (g = +e, _) : g;
2453
2451
  }, _;
2454
2452
  }
2455
- re();
2453
+ oe();
2456
2454
  var wa = (e) => ({
2457
2455
  left: {
2458
2456
  nodeLeftX: () => 0,
@@ -2718,60 +2716,60 @@ var ka = () => {
2718
2716
  buttonContent: Da,
2719
2717
  pagingButton: Oa,
2720
2718
  nodeUpdate: function() {
2721
- N(this).select(".node-rect").attr("stroke", void 0).attr("stroke-width", void 0);
2719
+ P(this).select(".node-rect").attr("stroke", void 0).attr("stroke-width", void 0);
2722
2720
  },
2723
2721
  nodeEnter: (e) => e,
2724
2722
  nodeExit: (e) => e,
2725
2723
  linkUpdate: function(e) {
2726
2724
  if (e.data._upToTheRootHighlighted) {
2727
- N(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
2725
+ P(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
2728
2726
  return;
2729
2727
  }
2730
- N(this).style("stroke", void 0).style("stroke-width", void 0), e.data._upToTheRootHighlighted && N(this).raise();
2728
+ P(this).style("stroke", void 0).style("stroke-width", void 0), e.data._upToTheRootHighlighted && P(this).raise();
2731
2729
  },
2732
2730
  hdiagonal: Ta,
2733
2731
  diagonal: Ea,
2734
- linkGroupArc: oe().x((e) => e.x).y((e) => e.y)
2732
+ linkGroupArc: le().x((e) => e.x).y((e) => e.y)
2735
2733
  };
2736
2734
  return e.layoutBindings = wa(e), e;
2737
- }, Aa = (e, n, a) => {
2738
- let o = (0, O.useRef)(e.treeChartSettings?.transform), s = (0, O.useRef)(null);
2739
- return s.current = (n) => {
2740
- let o = ka(), s = n.treeOptions, c = {
2741
- linkUpdate: o.linkUpdate,
2742
- getButtonContent: o.buttonContent,
2743
- ...Cr[s.layoutPreset]
2744
- }, l = c.sizes ? c.sizes(e) : {}, u = {
2745
- ...r,
2735
+ }, Aa = (e, n, r) => {
2736
+ let i = (0, k.useRef)(e.treeChartSettings?.transform), a = (0, k.useRef)(null);
2737
+ return a.current = (n) => {
2738
+ let i = ka(), a = n.treeOptions, s = {
2739
+ linkUpdate: i.linkUpdate,
2740
+ getButtonContent: i.buttonContent,
2741
+ ...Sr[a.layoutPreset]
2742
+ }, c = s.sizes ? s.sizes(e) : {}, l = {
2743
+ ...d,
2746
2744
  ...e.treeChartSettings?.nodeLayout?.border
2747
2745
  };
2748
- u.enabled === !1 && (u.borderWidth = 0);
2749
- let d = {
2750
- ...i,
2746
+ l.enabled === !1 && (l.borderWidth = 0);
2747
+ let u = {
2748
+ ...t,
2751
2749
  ...e.treeChartSettings?.nodeLayout.hoverStyle
2752
- }, f = d.enabled ? d.borderWidth : 0;
2753
- a.nodeWidth((e) => (s.nodeWidth ? s.nodeWidth : typeof c.width == "function" ? c.width(e) : c.width) + (u.borderWidth ?? 0) * 2).nodeHeight((e) => (e.id === "__root__" ? 0 : typeof c.height == "function" ? c.height(e, l) : c.height) + (u.borderWidth ?? 0) * 2).nodeDefaultBackground(e.treeChartSettings?.nodeLayout?.backgroundColor ?? t.backgroundColor).compact(s.compact).layout(s.directionOrigin).padding({
2750
+ }, f = u.enabled ? u.borderWidth : 0;
2751
+ r.nodeWidth((e) => (a.nodeWidth ? a.nodeWidth : typeof s.width == "function" ? s.width(e) : s.width) + (l.borderWidth ?? 0) * 2).nodeHeight((e) => (e.id === "__root__" ? 0 : typeof s.height == "function" ? s.height(e, c) : s.height) + (l.borderWidth ?? 0) * 2).nodeDefaultBackground(e.treeChartSettings?.nodeLayout?.backgroundColor ?? o.backgroundColor).compact(a.compact).layout(a.directionOrigin).padding({
2754
2752
  top: f,
2755
2753
  right: f,
2756
2754
  bottom: f,
2757
2755
  left: f
2758
- }).gridEnabled(s.gridLayoutEnabled).gridRows(s.gridLayoutRows).forceAutoFit(s.forceAutoFit).setActiveNodeCentered(!s.forceAutoFit).duration(s.animate === !1 ? 0 : 400).root(n.root).linkUpdate(c.linkUpdate).buttonContent(c.getButtonContent).container(n.container).nodeContent((e) => c.getNodeContent(e, { config: a.getConfig() })).render({
2756
+ }).gridEnabled(a.gridLayoutEnabled).gridRows(a.gridLayoutRows).forceAutoFit(a.forceAutoFit).setActiveNodeCentered(!a.forceAutoFit).duration(a.animate === !1 ? 0 : 400).root(n.root).linkUpdate(s.linkUpdate).buttonContent(s.getButtonContent).container(n.container).nodeContent((e) => s.getNodeContent(e, { config: r.getConfig() })).render({
2759
2757
  zoomToFit: n.zoomToFit ?? !1,
2760
2758
  transform: n.transform
2761
2759
  });
2762
- }, (0, O.useCallback)((e, t) => {
2763
- s.current({
2760
+ }, (0, k.useCallback)((e, t) => {
2761
+ a.current({
2764
2762
  root: e,
2765
2763
  container: n.current,
2766
2764
  treeOptions: t,
2767
2765
  zoomToFit: !0,
2768
- transform: o.current ?? void 0
2766
+ transform: i.current ?? void 0
2769
2767
  });
2770
2768
  }, []);
2771
2769
  }, ja = {
2772
2770
  directionOrigin: "top",
2773
2771
  compact: !1,
2774
- layoutPreset: p.Basic,
2772
+ layoutPreset: a.Basic,
2775
2773
  forceAutoFit: !1,
2776
2774
  animate: !0,
2777
2775
  interactive: !0,
@@ -2791,7 +2789,7 @@ var ka = () => {
2791
2789
  };
2792
2790
  return {
2793
2791
  treeSettings: n,
2794
- layout: Cr[n.layoutPreset || p.Basic]
2792
+ layout: Sr[n.layoutPreset || a.Basic]
2795
2793
  };
2796
2794
  };
2797
2795
  function Na(e) {
@@ -2904,8 +2902,8 @@ Za.prototype = Ka.prototype = {
2904
2902
  links: Ga,
2905
2903
  copy: qa
2906
2904
  };
2907
- var Qa = u();
2908
- Te();
2905
+ var Qa = S();
2906
+ we();
2909
2907
  var { version: $a } = {
2910
2908
  name: "d3-flextree",
2911
2909
  version: "2.1.2",
@@ -3205,19 +3203,19 @@ var no = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
3205
3203
  next: n
3206
3204
  };
3207
3205
  };
3208
- re();
3206
+ oe();
3209
3207
  var Z = {
3210
- selection: M,
3211
- select: N,
3212
- max: Ce,
3213
- min: Ee,
3214
- sum: we,
3215
- cumsum: De,
3216
- tree: Qe,
3217
- stratify: Be,
3208
+ selection: N,
3209
+ select: P,
3210
+ max: Se,
3211
+ min: Te,
3212
+ sum: Ce,
3213
+ cumsum: Ee,
3214
+ tree: Ze,
3215
+ stratify: ze,
3218
3216
  zoom: Ca,
3219
- zoomIdentity: ma,
3220
- linkHorizontal: oe,
3217
+ zoomIdentity: pa,
3218
+ linkHorizontal: le,
3221
3219
  flextree: to
3222
3220
  }, ho = class {
3223
3221
  stateInternal = {
@@ -3300,7 +3298,7 @@ var Z = {
3300
3298
  };
3301
3299
  }
3302
3300
  extendHierarchyNodePrototype() {
3303
- Oe.prototype.allDescendants || (Oe.prototype.allDescendants = function() {
3301
+ De.prototype.allDescendants || (De.prototype.allDescendants = function() {
3304
3302
  let e = [];
3305
3303
  this.each((t) => {
3306
3304
  e.push(t);
@@ -3463,7 +3461,7 @@ var Z = {
3463
3461
  if (t.brush) return t.brush.key;
3464
3462
  }).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
3463
  [...e.srcElement.classList].includes("node-button-foreign-object") || i.onNodeClick(t);
3466
- }).call(Pr().filter(function(e, t) {
3464
+ }).call(Nr().filter(function(e, t) {
3467
3465
  return r.dragEnabled && t.depth > 0;
3468
3466
  }).on("start", function(e, t) {
3469
3467
  d.onDragStart(this, e, t);
@@ -3611,12 +3609,12 @@ var Z = {
3611
3609
  let r = this.getChartState();
3612
3610
  r.dragNode = n;
3613
3611
  let i = t.subject.width / 2;
3614
- r.dragStartX = t.x - i, r.dragStartY = parseFloat(t.y), r.isDragStarting = !0, N(e).classed("dragging", !0);
3612
+ r.dragStartX = t.x - i, r.dragStartY = parseFloat(t.y), r.isDragStarting = !0, P(e).classed("dragging", !0);
3615
3613
  }
3616
3614
  onDrag(e, t) {
3617
3615
  let n = this.getChartState(), r = this.getConfig();
3618
3616
  if (!n.dragNode) return;
3619
- let i = N(e);
3617
+ let i = P(e);
3620
3618
  if (n.isDragStarting) {
3621
3619
  n.isDragStarting = !1, r.container.classList.add("dragging-active"), i.raise();
3622
3620
  let e = t.subject.descendants(), a = [...e || [], t.subject], o = e.filter((e) => e.data.id !== t.subject.id);
@@ -3632,7 +3630,7 @@ var Z = {
3632
3630
  bottom: t.y + t.subject.height,
3633
3631
  midX: t.x + t.subject.width / 2,
3634
3632
  midY: t.y + t.subject.height / 2
3635
- }, o = sr("g.node:not(.dragging)");
3633
+ }, o = or("g.node:not(.dragging)");
3636
3634
  o.classed("drop-target", !1), o.filter(function(e) {
3637
3635
  let t = {
3638
3636
  left: e.x,
@@ -3648,7 +3646,7 @@ var Z = {
3648
3646
  this.getConfig().container.classList.remove("dragging-active");
3649
3647
  let n = this.getChartState();
3650
3648
  if (n.dragNode) {
3651
- if (N(e).classed("dragging", !1), !n.dropNode) {
3649
+ if (P(e).classed("dragging", !1), !n.dropNode) {
3652
3650
  this.render();
3653
3651
  return;
3654
3652
  }
@@ -3656,7 +3654,7 @@ var Z = {
3656
3654
  this.render();
3657
3655
  return;
3658
3656
  }
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) || null), this.getConfig().onNodeParentChange?.(n.dragNode), n.dropNode = null, n.dragNode = null, this.render();
3657
+ P(e).remove(), n.dragNode.parent = n.dropNode, n.dragNode.parent && (n.dragNode.parent.children = n.dragNode.parent.children?.filter((e) => e.id !== n.dragNode?.id) || null), this.getConfig().onNodeParentChange?.(n.dragNode), n.dropNode = null, n.dragNode = null, this.render();
3660
3658
  }
3661
3659
  }
3662
3660
  zoomed(e) {
@@ -3709,9 +3707,12 @@ var Z = {
3709
3707
  let e = this.getChartState();
3710
3708
  e.svg && (e.svg.selectAll("*").remove(), e.svg = null, e.chart = null);
3711
3709
  }
3712
- }, Q = pe(), go = (e, t, n) => {
3713
- let r = te(), i = (0, O.useCallback)((t) => {
3714
- t.data.brush && r.daedalus.emitEvent(D.Brush, {
3710
+ }, Q = ge(), go = (e, t, n) => {
3711
+ let r = String(n);
3712
+ return Array.from(e.querySelectorAll(".node[data-brush][data-value]")).find((e) => e.getAttribute("data-brush") === t && e.getAttribute("data-value") === r);
3713
+ }, _o = (e, t, n) => {
3714
+ let r = h(), i = (0, k.useCallback)((t) => {
3715
+ t.data.brush && r.daedalus.emitEvent(O.Brush, {
3715
3716
  data: {
3716
3717
  action: Q.BrushEventAction.Hover,
3717
3718
  data: [{
@@ -3721,8 +3722,8 @@ var Z = {
3721
3722
  },
3722
3723
  emitter: e
3723
3724
  });
3724
- }, [r, e]), a = (0, O.useCallback)((t) => {
3725
- t.data.brush && r.daedalus.emitEvent(D.Brush, {
3725
+ }, [r, e]), a = (0, k.useCallback)((t) => {
3726
+ t.data.brush && r.daedalus.emitEvent(O.Brush, {
3726
3727
  data: {
3727
3728
  action: Q.BrushEventAction.Blur,
3728
3729
  data: [{
@@ -3732,20 +3733,20 @@ var Z = {
3732
3733
  },
3733
3734
  emitter: e
3734
3735
  });
3735
- }, [r, e]), o = (0, O.useRef)({});
3736
- return o.current[D.Brush] = (r) => {
3736
+ }, [r, e]), o = (0, k.useRef)({});
3737
+ return o.current[O.Brush] = (r) => {
3737
3738
  if (r.emitter !== e && !(!t || !n.interactive)) switch (r.data.action) {
3738
3739
  case Q.BrushEventAction.Hover:
3739
3740
  r.data.data.forEach(({ id: e, values: n }) => {
3740
3741
  n.forEach((n) => {
3741
- t.querySelector(`.node[data-brush="${e}"][data-value="${n}"]`)?.classList.add("hovered");
3742
+ go(t, e, n)?.classList.add("hovered");
3742
3743
  });
3743
3744
  });
3744
3745
  break;
3745
3746
  case Q.BrushEventAction.Blur:
3746
3747
  r.data.data.forEach(({ id: e, values: n }) => {
3747
3748
  n.forEach((n) => {
3748
- t.querySelector(`.node[data-brush="${e}"][data-value="${n}"]`)?.classList.remove("hovered");
3749
+ go(t, e, n)?.classList.remove("hovered");
3749
3750
  });
3750
3751
  });
3751
3752
  break;
@@ -3753,20 +3754,20 @@ var Z = {
3753
3754
  t.querySelectorAll(".node.hovered").forEach((e) => e.classList.remove("hovered"));
3754
3755
  break;
3755
3756
  }
3756
- }, g({
3757
- action: D.Brush,
3758
- handler: ({ payload: e }) => e && o.current[D.Brush](e)
3757
+ }, y({
3758
+ action: O.Brush,
3759
+ handler: ({ payload: e }) => e && o.current[O.Brush](e)
3759
3760
  }, []), {
3760
3761
  onTreeNodeHover: i,
3761
3762
  onTreeNodeLeave: a
3762
3763
  };
3763
- }, _o = (e) => {
3764
- let { variables: t, variablesFetched: n, updateVariable: r } = x();
3764
+ }, vo = (e) => {
3765
+ let { variables: t, variablesFetched: n, updateVariable: r } = w();
3765
3766
  return {
3766
- variables: (0, O.useMemo)(() => {
3767
+ variables: (0, k.useMemo)(() => {
3767
3768
  let n = {};
3768
3769
  return e.measures?.forEach((e) => {
3769
- !e.slots || !c(e) || Object.values(e.slots).filter((e) => e.enabled && e.source === "variable" && e.propertyValue?.type === "variable").forEach((r) => {
3770
+ !e.slots || !s(e) || Object.values(e.slots).filter((e) => e.enabled && e.source === "variable" && e.propertyValue?.type === "variable").forEach((r) => {
3770
3771
  let i = r.propertyValue.variableName;
3771
3772
  if (!i) return;
3772
3773
  let a = t.find((e) => e.name === i);
@@ -3774,7 +3775,7 @@ var Z = {
3774
3775
  id: a?.id ?? null,
3775
3776
  measureId: []
3776
3777
  });
3777
- let o = f(e.dataItem);
3778
+ let o = l(e.dataItem);
3778
3779
  n[i].measureId.includes(o) || n[i].measureId.push(o);
3779
3780
  });
3780
3781
  }), n;
@@ -3786,61 +3787,61 @@ var Z = {
3786
3787
  updateVariable: r,
3787
3788
  variablesFetched: n
3788
3789
  };
3789
- }, vo = (e, t) => {
3790
- let n = e.dimensions.filter(c), r = n.map((e) => f(e.dataItem)), i = n.length, a = (0, O.useMemo)(() => C(n.map((e) => ({
3790
+ }, yo = (e, t) => {
3791
+ let n = e.dimensions.filter(s), r = n.map((e) => l(e.dataItem)), i = n.length, a = (0, k.useMemo)(() => T(n.map((e) => ({
3791
3792
  dataItem: e.dataItem,
3792
3793
  dateLevel: void 0,
3793
3794
  datePart: void 0,
3794
3795
  operator: Qa.FilterOperator.InList
3795
- })), { ignoreApplied: !0 }), [r]), o = (0, O.useCallback)((e) => {
3796
+ })), { ignoreApplied: !0 }), [r]), o = (0, k.useCallback)((e) => {
3796
3797
  if (!i || !a?.length || !e.data.brush) return;
3797
- let { key: t, value: n } = e.data.brush, r = a.find((e) => e.fieldKey === t && ce(e.operators));
3798
+ let { key: t, value: n } = e.data.brush, r = a.find((e) => e.fieldKey === t && de(e.operators));
3798
3799
  if (!r) return;
3799
3800
  let o = (r.operators.pending ?? r.operators.applied ?? r.operators.initial) === Qa.FilterOperator.NotInList ? "off" : "on";
3800
3801
  r.state.pending && r.state.pending.includes(n) && (o = o === "off" ? "on" : "off"), r.onClick(n, { [o]: !0 });
3801
3802
  }, [a, r]);
3802
- return (0, O.useEffect)(() => {
3803
+ return (0, k.useEffect)(() => {
3803
3804
  t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")), a.forEach(({ fieldKey: e, state: n }) => {
3804
3805
  n.pending !== null && n.pending.forEach((n) => {
3805
- t.querySelector(`.node[data-brush="${e}"][data-value="${n}"]`)?.classList.add("selected");
3806
+ go(t, e, n)?.classList.add("selected");
3806
3807
  });
3807
3808
  }));
3808
3809
  }, [t, JSON.stringify(a)]), { onTreeNodeClick: o };
3809
- }, yo = (e, t) => {
3810
+ }, bo = (e, t) => {
3810
3811
  e.next({
3811
- action: l.SaveLocalVSpec,
3812
+ action: f.SaveLocalVSpec,
3812
3813
  payload: { vSpecChange: { treeChartSettings: { ...t } } },
3813
3814
  mergeWith(e, t, n) {
3814
3815
  if (n === "nodeExpandState") return t;
3815
3816
  }
3816
3817
  });
3817
- }, bo = 80, xo = (e, t, n, r) => {
3818
- let i = (0, O.useRef)(e.treeChartSettings?.nodeExpandState ?? {}), a = r.forceAutoFit, o = ee(), s = _o(o), l = _(), u = m(), d = e.dimensions.filter(c), p = d.length, [h] = (0, O.useState)(e.treeChartSettings?.transform ?? null), [g, v] = (0, O.useState)(h ?? {
3818
+ }, xo = 80, So = (e, t, n, r) => {
3819
+ let i = (0, k.useRef)(e.treeChartSettings?.nodeExpandState ?? {}), a = r.forceAutoFit, o = ee(), c = vo(o), u = b(), d = m(), f = e.dimensions.filter(s), p = f.length, [h] = (0, k.useState)(e.treeChartSettings?.transform ?? null), [g, _] = (0, k.useState)(h ?? {
3819
3820
  k: 1,
3820
3821
  x: 0,
3821
3822
  y: 0
3822
- }), y = (0, O.useRef)(e.treeChartSettings?.transform), { onTreeNodeHover: b, onTreeNodeLeave: x } = go(n, t.current, r), { onTreeNodeClick: S } = vo(e, t.current), C = (0, O.useRef)(new ho()), w = (0, O.useRef)(null), te = !e.treeChartSettings.gridLayout?.enabled && e.treeChartSettings?.nodeLayout?.hoverStyle?.enabled, T = (0, O.useCallback)(() => {
3823
+ }), v = (0, k.useRef)(e.treeChartSettings?.transform), { onTreeNodeHover: y, onTreeNodeLeave: x } = _o(n, t.current, r), { onTreeNodeClick: S } = yo(e, t.current), C = (0, k.useRef)(new ho()), w = (0, k.useRef)(null), T = !e.treeChartSettings.gridLayout?.enabled && e.treeChartSettings?.nodeLayout?.hoverStyle?.enabled, E = (0, k.useCallback)(() => {
3823
3824
  w.current &&= (clearTimeout(w.current), null);
3824
3825
  }, []);
3825
3826
  return C.current.onNodeHover((e) => {
3826
- r.interactive && b(e), te && (T(), C.current.highlight(e));
3827
+ r.interactive && y(e), T && (E(), C.current.highlight(e));
3827
3828
  }).onNodeLeave((e) => {
3828
- r.interactive && x(e), te && (T(), w.current = setTimeout(() => {
3829
+ r.interactive && x(e), T && (E(), w.current = setTimeout(() => {
3829
3830
  C.current.highlight(null), w.current = null;
3830
- }, bo));
3831
+ }, xo));
3831
3832
  }).onNodeClick((e) => {
3832
3833
  r.interactive && S(e);
3833
3834
  }).onNodeParentChange((t) => {
3834
3835
  if (p > 0) return;
3835
3836
  let n = e.measures.find((e) => e.dataItem.uniqueSignature === t.data.id);
3836
- n && ne(u, e.measures, f(n.dataItem), !t.parent || t.parent.data.id === "__root__" ? null : t.parent.data.id);
3837
+ n && te(d, e.measures, l(n.dataItem), !t.parent || t.parent.data.id === "__root__" ? null : t.parent.data.id);
3837
3838
  }).onExpandOrCollapse((t) => {
3838
- let n = it(t, e.treeChartSettings?.initialExpandedLevels, d.length, e.totals?.enabled ?? !1), r = !(t._children?.length > 0 && !t.children?.length);
3839
- r === n ? delete i.current[t.data.id] : i.current[t.data.id] = r, yo(l, { nodeExpandState: i.current }), !(p > 0) && Object.values(s.variables).filter((e) => e.measureId.includes(t.data.id)).forEach((e) => {
3840
- s.updateVariable(e.id, r, Qa.VariableType.boolean);
3839
+ let n = rt(t, e.treeChartSettings?.initialExpandedLevels, f.length, e.totals?.enabled ?? !1), r = !(t._children?.length > 0 && !t.children?.length);
3840
+ r === n ? delete i.current[t.data.id] : i.current[t.data.id] = r, bo(u, { nodeExpandState: i.current }), !(p > 0) && Object.values(c.variables).filter((e) => e.measureId.includes(t.data.id)).forEach((e) => {
3841
+ c.updateVariable(e.id, r, Qa.VariableType.boolean);
3841
3842
  });
3842
3843
  }).onUserZoom(() => {
3843
- y.current = null;
3844
+ v.current = null;
3844
3845
  }).onZoomEnd((e) => {
3845
3846
  if (a) return;
3846
3847
  let t = {
@@ -3848,46 +3849,46 @@ var Z = {
3848
3849
  x: e.transform.x,
3849
3850
  y: e.transform.y
3850
3851
  };
3851
- t.k === g.k && t.x === g.x && t.y === g.y || (v(t), yo(l, {
3852
+ t.k === g.k && t.x === g.x && t.y === g.y || (_(t), bo(u, {
3852
3853
  nodeExpandState: i.current,
3853
3854
  transform: t
3854
3855
  }));
3855
- }), (0, O.useEffect)(() => () => T(), [T]), (0, O.useEffect)(() => {
3856
+ }), (0, k.useEffect)(() => () => E(), [E]), (0, k.useEffect)(() => {
3856
3857
  e.treeChartSettings?.nodeExpandState && (i.current = e.treeChartSettings.nodeExpandState ?? {});
3857
- }, [e.treeChartSettings?.nodeExpandState]), (0, O.useEffect)(() => {
3858
+ }, [e.treeChartSettings?.nodeExpandState]), (0, k.useEffect)(() => {
3858
3859
  o.treeChartSettings?.nodeExpandState || (i.current = {});
3859
- }, [o.treeChartSettings?.initialExpandedLevels]), (0, O.useEffect)(() => {
3860
- y.current = e.treeChartSettings?.transform, C.current && C.current.unsetUserTransform(), !(!e.treeChartSettings?.transform || !C.current) && C.current.applyTransform(e.treeChartSettings.transform);
3860
+ }, [o.treeChartSettings?.initialExpandedLevels]), (0, k.useEffect)(() => {
3861
+ v.current = e.treeChartSettings?.transform, C.current && C.current.unsetUserTransform(), !(!e.treeChartSettings?.transform || !C.current) && C.current.applyTransform(e.treeChartSettings.transform);
3861
3862
  }, [e.treeChartSettings?.transform]), {
3862
3863
  chart: C.current,
3863
3864
  expandedState: i
3864
3865
  };
3865
- }, $ = w(), So = ({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
3866
- let o = i?.isEditMode ?? !1, s = i?.isPrintMode ?? !1, l = e?.treeChartSettings?.gridLayout?.enabled, u = e.dimensions.filter(c).length, d = e.measures.filter(c), f = (0, O.useRef)("tree-" + a(10)), p = (0, O.useRef)(null), m = e.treeChartSettings?.forceAutoFit === !0, { layout: h, treeSettings: g } = Ma(e, i), { chart: _, expandedState: y } = xo(e, p, f.current, g), b = Aa(e, p, _), x = lt({
3866
+ }, $ = g(), Co = ({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
3867
+ let a = i?.isEditMode ?? !1, o = i?.isPrintMode ?? !1, c = e?.treeChartSettings?.gridLayout?.enabled, l = e.dimensions.filter(s).length, d = e.measures.filter(s), f = (0, k.useRef)("tree-" + u(10)), p = (0, k.useRef)(null), m = e.treeChartSettings?.forceAutoFit === !0, { layout: h, treeSettings: g } = Ma(e, i), { chart: _, expandedState: y } = So(e, p, f.current, g), b = Aa(e, p, _), x = ct({
3867
3868
  vSpec: e,
3868
3869
  data: n,
3869
3870
  nodeExpandState: y
3870
- }), [S, C] = (0, O.useState)(!1);
3871
- (0, O.useLayoutEffect)(() => (_ && _.init(), () => {
3871
+ }), [S, C] = (0, k.useState)(!1);
3872
+ (0, k.useLayoutEffect)(() => (_ && _.init(), () => {
3872
3873
  _?.destroy();
3873
- }), [p.current]), (0, O.useEffect)(() => {
3874
+ }), [p.current]), (0, k.useEffect)(() => {
3874
3875
  S ? _.enableDrag() : _.disableDrag();
3875
- }, [S]), (0, O.useEffect)(() => {
3876
+ }, [S]), (0, k.useEffect)(() => {
3876
3877
  !p.current || !_ || !r.width || !r.height || b(x, g);
3877
3878
  }, [
3878
3879
  r.width,
3879
3880
  r.height,
3880
3881
  b
3881
3882
  ]);
3882
- let ee = o && u === 0 && !l;
3883
- (0, O.useEffect)(() => {
3883
+ let w = a && l === 0 && !c;
3884
+ (0, k.useEffect)(() => {
3884
3885
  p.current && b(x, g);
3885
3886
  }, [
3886
3887
  x,
3887
3888
  JSON.stringify(g),
3888
3889
  b
3889
3890
  ]);
3890
- let w = Pe({
3891
+ let T = Ne({
3891
3892
  vTheme: t,
3892
3893
  vSpec: e,
3893
3894
  id: f.current,
@@ -3899,9 +3900,9 @@ var Z = {
3899
3900
  height: "100%"
3900
3901
  },
3901
3902
  id: f.current,
3902
- "data-mode": o ? "edit" : "view",
3903
+ "data-mode": a ? "edit" : "view",
3903
3904
  children: [
3904
- !s && /* @__PURE__ */ (0, $.jsxs)("div", {
3905
+ !o && /* @__PURE__ */ (0, $.jsxs)("div", {
3905
3906
  className: "tree-toolbar",
3906
3907
  style: {
3907
3908
  position: "absolute",
@@ -3911,21 +3912,21 @@ var Z = {
3911
3912
  top: 0,
3912
3913
  gap: 10
3913
3914
  },
3914
- children: [ee && /* @__PURE__ */ (0, $.jsx)(be, {
3915
+ children: [w && /* @__PURE__ */ (0, $.jsx)(E, {
3915
3916
  size: "small",
3916
3917
  value: "organize",
3917
3918
  selected: S,
3918
3919
  onChange: () => C(!S),
3919
3920
  disabled: d.length < 2,
3920
- children: /* @__PURE__ */ (0, $.jsx)(_e, {})
3921
- }), !m && /* @__PURE__ */ (0, $.jsx)(be, {
3921
+ children: /* @__PURE__ */ (0, $.jsx)(re, {})
3922
+ }), !m && /* @__PURE__ */ (0, $.jsx)(E, {
3922
3923
  value: "",
3923
3924
  size: "small",
3924
3925
  onClick: () => _?.fit(),
3925
3926
  children: /* @__PURE__ */ (0, $.jsx)(v, {})
3926
3927
  })]
3927
3928
  }),
3928
- /* @__PURE__ */ (0, $.jsx)("style", { children: w }),
3929
+ /* @__PURE__ */ (0, $.jsx)("style", { children: T }),
3929
3930
  /* @__PURE__ */ (0, $.jsx)("div", {
3930
3931
  style: {
3931
3932
  width: "100%",
@@ -3935,9 +3936,9 @@ var Z = {
3935
3936
  })
3936
3937
  ]
3937
3938
  });
3938
- }, Co = b(class extends O.Component {
3939
+ }, wo = p(class extends k.Component {
3939
3940
  render() {
3940
- return /* @__PURE__ */ (0, $.jsx)(So, { ...this.props });
3941
+ return /* @__PURE__ */ (0, $.jsx)(Co, { ...this.props });
3941
3942
  }
3942
3943
  });
3943
- export { Co as Tree };
3944
+ export { wo as Tree };