@astrato-io/visualizations 0.7.0 → 0.8.0

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