chartformers 1.0.45 → 1.0.46

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.
@@ -1,4 +1,4 @@
1
- import aa, { useRef as Pt, useEffect as vt, useState as ct } from "react";
1
+ import aa, { useRef as Pt, useEffect as vt, useState as ft } from "react";
2
2
  import { createPortal as kn } from "react-dom";
3
3
  var Xe = { exports: {} }, Se = {};
4
4
  /**
@@ -57,7 +57,7 @@ function oa() {
57
57
  return "Profiler";
58
58
  case T:
59
59
  return "StrictMode";
60
- case V:
60
+ case F:
61
61
  return "Suspense";
62
62
  case J:
63
63
  return "SuspenseList";
@@ -100,11 +100,11 @@ function oa() {
100
100
  }
101
101
  if (D) {
102
102
  D = console;
103
- var P = D.error, F = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
103
+ var P = D.error, V = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
104
104
  return P.call(
105
105
  D,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- F
107
+ V
108
108
  ), e(m);
109
109
  }
110
110
  }
@@ -151,14 +151,14 @@ function oa() {
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), m = this.props.ref, m !== void 0 ? m : null;
153
153
  }
154
- function l(m, D, P, F, Q, tt) {
154
+ function l(m, D, P, V, Q, tt) {
155
155
  var z = P.ref;
156
156
  return m = {
157
- $$typeof: _,
157
+ $$typeof: v,
158
158
  type: m,
159
159
  key: D,
160
160
  props: P,
161
- _owner: F
161
+ _owner: V
162
162
  }, (z !== void 0 ? z : null) !== null ? Object.defineProperty(m, "ref", {
163
163
  enumerable: !1,
164
164
  get: c
@@ -184,13 +184,13 @@ function oa() {
184
184
  value: tt
185
185
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
186
186
  }
187
- function u(m, D, P, F, Q, tt) {
187
+ function u(m, D, P, V, Q, tt) {
188
188
  var z = D.children;
189
189
  if (z !== void 0)
190
- if (F)
190
+ if (V)
191
191
  if (E(z)) {
192
- for (F = 0; F < z.length; F++)
193
- h(z[F]);
192
+ for (V = 0; V < z.length; V++)
193
+ h(z[V]);
194
194
  Object.freeze && Object.freeze(z);
195
195
  } else
196
196
  console.error(
@@ -199,26 +199,26 @@ function oa() {
199
199
  else h(z);
200
200
  if (w.call(D, "key")) {
201
201
  z = t(m);
202
- var g = Object.keys(D).filter(function(b) {
203
- return b !== "key";
202
+ var y = Object.keys(D).filter(function(_) {
203
+ return _ !== "key";
204
204
  });
205
- F = 0 < g.length ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}", S[z + F] || (g = 0 < g.length ? "{" + g.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ V = 0 < y.length ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}", S[z + V] || (y = 0 < y.length ? "{" + y.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
209
209
  React keys must be passed directly to JSX without using spread:
210
210
  let props = %s;
211
211
  <%s key={someKey} {...props} />`,
212
- F,
212
+ V,
213
213
  z,
214
- g,
214
+ y,
215
215
  z
216
- ), S[z + F] = !0);
216
+ ), S[z + V] = !0);
217
217
  }
218
218
  if (z = null, P !== void 0 && (n(P), z = "" + P), s(D) && (n(D.key), z = "" + D.key), "key" in D) {
219
219
  P = {};
220
- for (var y in D)
221
- y !== "key" && (P[y] = D[y]);
220
+ for (var g in D)
221
+ g !== "key" && (P[g] = D[g]);
222
222
  } else P = D;
223
223
  return z && o(
224
224
  P,
@@ -236,9 +236,9 @@ React keys must be passed directly to JSX without using spread:
236
236
  f(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === W && (m._payload.status === "fulfilled" ? f(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
237
237
  }
238
238
  function f(m) {
239
- return typeof m == "object" && m !== null && m.$$typeof === _;
239
+ return typeof m == "object" && m !== null && m.$$typeof === v;
240
240
  }
241
- var p = aa, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), K = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), A = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, E = Array.isArray, d = console.createTask ? console.createTask : function() {
241
+ var p = aa, v = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), K = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), A = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, E = Array.isArray, d = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  p = {
@@ -251,24 +251,24 @@ React keys must be passed directly to JSX without using spread:
251
251
  a
252
252
  )(), x = d(r(a)), S = {};
253
253
  Me.Fragment = K, Me.jsx = function(m, D, P) {
254
- var F = 1e4 > L.recentlyCreatedOwnerStacks++;
254
+ var V = 1e4 > L.recentlyCreatedOwnerStacks++;
255
255
  return u(
256
256
  m,
257
257
  D,
258
258
  P,
259
259
  !1,
260
- F ? Error("react-stack-top-frame") : N,
261
- F ? d(r(m)) : x
260
+ V ? Error("react-stack-top-frame") : N,
261
+ V ? d(r(m)) : x
262
262
  );
263
263
  }, Me.jsxs = function(m, D, P) {
264
- var F = 1e4 > L.recentlyCreatedOwnerStacks++;
264
+ var V = 1e4 > L.recentlyCreatedOwnerStacks++;
265
265
  return u(
266
266
  m,
267
267
  D,
268
268
  P,
269
269
  !0,
270
- F ? Error("react-stack-top-frame") : N,
271
- F ? d(r(m)) : x
270
+ V ? Error("react-stack-top-frame") : N,
271
+ V ? d(r(m)) : x
272
272
  );
273
273
  };
274
274
  })()), Me;
@@ -431,13 +431,13 @@ function Ra() {
431
431
  function fi(t, e) {
432
432
  var n = [], r = null, i = null, a = 6, s = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, l = t === En || t === Re ? -1 : 1, u = t === Re || t === Cn ? "x" : "y", h = t === En || t === Yn ? Na : Sa;
433
433
  function f(p) {
434
- var _ = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), j = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Aa), K = Math.max(a, 0) + o, T = e.range(), q = +T[0] + c, k = +T[T.length - 1] + c, A = (e.bandwidth ? Ta : Ma)(e.copy(), c), O = p.selection ? p.selection() : p, V = O.selectAll(".domain").data([null]), J = O.selectAll(".tick").data(_, e).order(), Z = J.exit(), W = J.enter().append("g").attr("class", "tick"), B = J.select("line"), C = J.select("text");
435
- V = V.merge(V.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), J = J.merge(W), B = B.merge(W.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), C = C.merge(W.append("text").attr("fill", "currentColor").attr(u, l * K).attr("dy", t === En ? "0em" : t === Yn ? "0.71em" : "0.32em")), p !== O && (V = V.transition(p), J = J.transition(p), B = B.transition(p), C = C.transition(p), Z = Z.transition(p).attr("opacity", br).attr("transform", function(L) {
434
+ var v = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), j = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Aa), K = Math.max(a, 0) + o, T = e.range(), q = +T[0] + c, k = +T[T.length - 1] + c, A = (e.bandwidth ? Ta : Ma)(e.copy(), c), O = p.selection ? p.selection() : p, F = O.selectAll(".domain").data([null]), J = O.selectAll(".tick").data(v, e).order(), Z = J.exit(), W = J.enter().append("g").attr("class", "tick"), B = J.select("line"), C = J.select("text");
435
+ F = F.merge(F.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), J = J.merge(W), B = B.merge(W.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), C = C.merge(W.append("text").attr("fill", "currentColor").attr(u, l * K).attr("dy", t === En ? "0em" : t === Yn ? "0.71em" : "0.32em")), p !== O && (F = F.transition(p), J = J.transition(p), B = B.transition(p), C = C.transition(p), Z = Z.transition(p).attr("opacity", br).attr("transform", function(L) {
436
436
  return isFinite(L = A(L)) ? h(L + c) : this.getAttribute("transform");
437
437
  }), W.attr("opacity", br).attr("transform", function(L) {
438
438
  var w = this.parentNode.__axis;
439
439
  return h((w && isFinite(w = w(L)) ? w : A(L)) + c);
440
- })), Z.remove(), V.attr("d", t === Re || t === Cn ? s ? "M" + l * s + "," + q + "H" + c + "V" + k + "H" + l * s : "M" + c + "," + q + "V" + k : s ? "M" + q + "," + l * s + "V" + c + "H" + k + "V" + l * s : "M" + q + "," + c + "H" + k), J.attr("opacity", 1).attr("transform", function(L) {
440
+ })), Z.remove(), F.attr("d", t === Re || t === Cn ? s ? "M" + l * s + "," + q + "H" + c + "V" + k + "H" + l * s : "M" + c + "," + q + "V" + k : s ? "M" + q + "," + l * s + "V" + c + "H" + k + "V" + l * s : "M" + q + "," + c + "H" + k), J.attr("opacity", 1).attr("transform", function(L) {
441
441
  return h(A(L) + c);
442
442
  }), B.attr(u + "2", l * a), C.attr(u, l * K).text(j), O.filter(Ra).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Cn ? "start" : t === Re ? "end" : "middle"), O.each(function() {
443
443
  this.__axis = A;
@@ -606,17 +606,17 @@ function yi(t) {
606
606
  return e.matches(t);
607
607
  };
608
608
  }
609
- var Va = Array.prototype.find;
610
- function Fa(t) {
609
+ var Fa = Array.prototype.find;
610
+ function Va(t) {
611
611
  return function() {
612
- return Va.call(this.children, t);
612
+ return Fa.call(this.children, t);
613
613
  };
614
614
  }
615
615
  function Wa() {
616
616
  return this.firstElementChild;
617
617
  }
618
618
  function Ya(t) {
619
- return this.select(t == null ? Wa : Fa(typeof t == "function" ? t : yi(t)));
619
+ return this.select(t == null ? Wa : Va(typeof t == "function" ? t : yi(t)));
620
620
  }
621
621
  var Ba = Array.prototype.filter;
622
622
  function Xa() {
@@ -689,11 +689,11 @@ function ns(t, e) {
689
689
  var n = e ? ts : Qa, r = this._parents, i = this._groups;
690
690
  typeof t != "function" && (t = Za(t));
691
691
  for (var a = i.length, s = new Array(a), o = new Array(a), c = new Array(a), l = 0; l < a; ++l) {
692
- var u = r[l], h = i[l], f = h.length, p = rs(t.call(u, u && u.__data__, l, r)), _ = p.length, j = o[l] = new Array(_), K = s[l] = new Array(_), T = c[l] = new Array(f);
692
+ var u = r[l], h = i[l], f = h.length, p = rs(t.call(u, u && u.__data__, l, r)), v = p.length, j = o[l] = new Array(v), K = s[l] = new Array(v), T = c[l] = new Array(f);
693
693
  n(u, h, j, K, T, p, e);
694
- for (var q = 0, k = 0, A, O; q < _; ++q)
694
+ for (var q = 0, k = 0, A, O; q < v; ++q)
695
695
  if (A = j[q]) {
696
- for (q >= k && (k = q + 1); !(O = K[k]) && ++k < _; ) ;
696
+ for (q >= k && (k = q + 1); !(O = K[k]) && ++k < v; ) ;
697
697
  A._next = O || null;
698
698
  }
699
699
  }
@@ -711,8 +711,8 @@ function as(t, e, n) {
711
711
  }
712
712
  function ss(t) {
713
713
  for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, s = Math.min(i, a), o = new Array(i), c = 0; c < s; ++c)
714
- for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), p, _ = 0; _ < h; ++_)
715
- (p = l[_] || u[_]) && (f[_] = p);
714
+ for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), p, v = 0; v < h; ++v)
715
+ (p = l[v] || u[v]) && (f[v] = p);
716
716
  for (; c < i; ++c)
717
717
  o[c] = n[c];
718
718
  return new At(o, this._parents);
@@ -933,14 +933,14 @@ function qs(t) {
933
933
  this.innerHTML = e ?? "";
934
934
  };
935
935
  }
936
- function Vs(t) {
936
+ function Fs(t) {
937
937
  return arguments.length ? this.each(t == null ? Hs : (typeof t == "function" ? qs : Os)(t)) : this.node().innerHTML;
938
938
  }
939
- function Fs() {
939
+ function Vs() {
940
940
  this.nextSibling && this.parentNode.appendChild(this);
941
941
  }
942
942
  function Ws() {
943
- return this.each(Fs);
943
+ return this.each(Vs);
944
944
  }
945
945
  function Ys() {
946
946
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
@@ -1091,7 +1091,7 @@ At.prototype = qe.prototype = {
1091
1091
  property: Rs,
1092
1092
  classed: Ds,
1093
1093
  text: zs,
1094
- html: Vs,
1094
+ html: Fs,
1095
1095
  raise: Ws,
1096
1096
  lower: Bs,
1097
1097
  append: Xs,
@@ -1103,10 +1103,10 @@ At.prototype = qe.prototype = {
1103
1103
  dispatch: co,
1104
1104
  [Symbol.iterator]: uo
1105
1105
  };
1106
- function ht(t) {
1106
+ function dt(t) {
1107
1107
  return typeof t == "string" ? new At([[document.querySelector(t)]], [document.documentElement]) : new At([[t]], $i);
1108
1108
  }
1109
- function Ve(t, e, n) {
1109
+ function Fe(t, e, n) {
1110
1110
  t.prototype = e.prototype = n, n.constructor = t;
1111
1111
  }
1112
1112
  function An(t, e) {
@@ -1266,7 +1266,7 @@ var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\
1266
1266
  yellow: 16776960,
1267
1267
  yellowgreen: 10145074
1268
1268
  };
1269
- Ve(ue, se, {
1269
+ Fe(ue, se, {
1270
1270
  copy(t) {
1271
1271
  return Object.assign(new this.constructor(), this, t);
1272
1272
  },
@@ -1312,7 +1312,7 @@ function Xn(t, e, n, r) {
1312
1312
  function mt(t, e, n, r) {
1313
1313
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1314
1314
  }
1315
- Ve(mt, Xn, An(ue, {
1315
+ Fe(mt, Xn, An(ue, {
1316
1316
  brighter(t) {
1317
1317
  return t = t == null ? un : Math.pow(un, t), new mt(this.r * t, this.g * t, this.b * t, this.opacity);
1318
1318
  },
@@ -1371,7 +1371,7 @@ function ko(t, e, n, r) {
1371
1371
  function Rt(t, e, n, r) {
1372
1372
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1373
1373
  }
1374
- Ve(Rt, ko, An(ue, {
1374
+ Fe(Rt, ko, An(ue, {
1375
1375
  brighter(t) {
1376
1376
  return t = t == null ? un : Math.pow(un, t), new Rt(this.h, this.s, this.l * t, this.opacity);
1377
1377
  },
@@ -1421,7 +1421,7 @@ function So(t, e, n, r) {
1421
1421
  function zt(t, e, n, r) {
1422
1422
  this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
1423
1423
  }
1424
- Ve(zt, So, An(ue, {
1424
+ Fe(zt, So, An(ue, {
1425
1425
  brighter(t) {
1426
1426
  return new zt(this.l + hn * (t ?? 1), this.a, this.b, this.opacity);
1427
1427
  },
@@ -1467,7 +1467,7 @@ function Li(t) {
1467
1467
  var e = t.h * $o;
1468
1468
  return new zt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
1469
1469
  }
1470
- Ve(Wt, Kn, An(ue, {
1470
+ Fe(Wt, Kn, An(ue, {
1471
1471
  brighter(t) {
1472
1472
  return new Wt(this.h, this.c, this.l + hn * (t ?? 1), this.opacity);
1473
1473
  },
@@ -1613,10 +1613,10 @@ function Ii(t, e, n, r) {
1613
1613
  function i(l) {
1614
1614
  return l.length ? l.pop() + " " : "";
1615
1615
  }
1616
- function a(l, u, h, f, p, _) {
1616
+ function a(l, u, h, f, p, v) {
1617
1617
  if (l !== h || u !== f) {
1618
1618
  var j = p.push("translate(", null, e, null, n);
1619
- _.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1619
+ v.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1620
1620
  } else (h || f) && p.push("translate(" + h + e + f + n);
1621
1621
  }
1622
1622
  function s(l, u, h, f) {
@@ -1625,21 +1625,21 @@ function Ii(t, e, n, r) {
1625
1625
  function o(l, u, h, f) {
1626
1626
  l !== u ? f.push({ i: h.push(i(h) + "skewX(", null, r) - 2, x: Nt(l, u) }) : u && h.push(i(h) + "skewX(" + u + r);
1627
1627
  }
1628
- function c(l, u, h, f, p, _) {
1628
+ function c(l, u, h, f, p, v) {
1629
1629
  if (l !== h || u !== f) {
1630
1630
  var j = p.push(i(p) + "scale(", null, ",", null, ")");
1631
- _.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1631
+ v.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
1632
1632
  } else (h !== 1 || f !== 1) && p.push(i(p) + "scale(" + h + "," + f + ")");
1633
1633
  }
1634
1634
  return function(l, u) {
1635
1635
  var h = [], f = [];
1636
1636
  return l = t(l), u = t(u), a(l.translateX, l.translateY, u.translateX, u.translateY, h, f), s(l.rotate, u.rotate, h, f), o(l.skewX, u.skewX, h, f), c(l.scaleX, l.scaleY, u.scaleX, u.scaleY, h, f), l = u = null, function(p) {
1637
- for (var _ = -1, j = f.length, K; ++_ < j; ) h[(K = f[_]).i] = K.x(p);
1637
+ for (var v = -1, j = f.length, K; ++v < j; ) h[(K = f[v]).i] = K.x(p);
1638
1638
  return h.join("");
1639
1639
  };
1640
1640
  };
1641
1641
  }
1642
- var Vo = Ii(Oo, "px, ", "px)", "deg)"), Fo = Ii(qo, ", ", ")", ")");
1642
+ var Fo = Ii(Oo, "px, ", "px)", "deg)"), Vo = Ii(qo, ", ", ")", ")");
1643
1643
  function Wo(t) {
1644
1644
  return function(e, n) {
1645
1645
  var r = t((e = Kn(e)).h, (n = Kn(n)).h), i = Pe(e.c, n.c), a = Pe(e.l, n.l), s = Pe(e.opacity, n.opacity);
@@ -1850,7 +1850,7 @@ function hr(t, e, n) {
1850
1850
  return Ct(i, r).value[e];
1851
1851
  };
1852
1852
  }
1853
- function Vi(t, e) {
1853
+ function Fi(t, e) {
1854
1854
  var n;
1855
1855
  return (typeof e == "number" ? Nt : e instanceof se ? dn : (n = se(e)) ? (e = n, dn) : ji)(t, e);
1856
1856
  }
@@ -1893,7 +1893,7 @@ function cl(t, e, n) {
1893
1893
  };
1894
1894
  }
1895
1895
  function ul(t, e) {
1896
- var n = $n(t), r = n === "transform" ? Fo : Vi;
1896
+ var n = $n(t), r = n === "transform" ? Vo : Fi;
1897
1897
  return this.attrTween(t, typeof e == "function" ? (n.local ? cl : ll)(n, r, hr(this, "attr." + t, e)) : e == null ? (n.local ? al : il)(n) : (n.local ? ol : sl)(n, r, e));
1898
1898
  }
1899
1899
  function fl(t, e) {
@@ -2036,8 +2036,8 @@ function Dl(t) {
2036
2036
  for (var r = this._groups, i = r.length, a = [], s = [], o = 0; o < i; ++o)
2037
2037
  for (var c = r[o], l = c.length, u, h = 0; h < l; ++h)
2038
2038
  if (u = c[h]) {
2039
- for (var f = t.call(u, u.__data__, h, c), p, _ = Ct(u, n), j = 0, K = f.length; j < K; ++j)
2040
- (p = f[j]) && Mn(p, e, n, j, f, _);
2039
+ for (var f = t.call(u, u.__data__, h, c), p, v = Ct(u, n), j = 0, K = f.length; j < K; ++j)
2040
+ (p = f[j]) && Mn(p, e, n, j, f, v);
2041
2041
  a.push(f), s.push(u);
2042
2042
  }
2043
2043
  return new Bt(a, s, e, n);
@@ -2053,7 +2053,7 @@ function Il(t, e) {
2053
2053
  return a === s ? null : a === n && s === r ? i : i = e(n = a, r = s);
2054
2054
  };
2055
2055
  }
2056
- function Fi(t) {
2056
+ function Vi(t) {
2057
2057
  return function() {
2058
2058
  this.style.removeProperty(t);
2059
2059
  };
@@ -2075,24 +2075,24 @@ function Hl(t, e, n) {
2075
2075
  function Ol(t, e) {
2076
2076
  var n, r, i, a = "style." + e, s = "end." + a, o;
2077
2077
  return function() {
2078
- var c = Ht(this, t), l = c.on, u = c.value[a] == null ? o || (o = Fi(e)) : void 0;
2078
+ var c = Ht(this, t), l = c.on, u = c.value[a] == null ? o || (o = Vi(e)) : void 0;
2079
2079
  (l !== n || i !== u) && (r = (n = l).copy()).on(s, i = u), c.on = r;
2080
2080
  };
2081
2081
  }
2082
2082
  function ql(t, e, n) {
2083
- var r = (t += "") == "transform" ? Vo : Vi;
2084
- return e == null ? this.styleTween(t, Il(t, r)).on("end.style." + t, Fi(t)) : typeof e == "function" ? this.styleTween(t, Hl(t, r, hr(this, "style." + t, e))).each(Ol(this._id, t)) : this.styleTween(t, zl(t, r, e), n).on("end.style." + t, null);
2083
+ var r = (t += "") == "transform" ? Fo : Fi;
2084
+ return e == null ? this.styleTween(t, Il(t, r)).on("end.style." + t, Vi(t)) : typeof e == "function" ? this.styleTween(t, Hl(t, r, hr(this, "style." + t, e))).each(Ol(this._id, t)) : this.styleTween(t, zl(t, r, e), n).on("end.style." + t, null);
2085
2085
  }
2086
- function Vl(t, e, n) {
2086
+ function Fl(t, e, n) {
2087
2087
  return function(r) {
2088
2088
  this.style.setProperty(t, e.call(this, r), n);
2089
2089
  };
2090
2090
  }
2091
- function Fl(t, e, n) {
2091
+ function Vl(t, e, n) {
2092
2092
  var r, i;
2093
2093
  function a() {
2094
2094
  var s = e.apply(this, arguments);
2095
- return s !== i && (r = (i = s) && Vl(t, s, n)), r;
2095
+ return s !== i && (r = (i = s) && Fl(t, s, n)), r;
2096
2096
  }
2097
2097
  return a._value = e, a;
2098
2098
  }
@@ -2101,7 +2101,7 @@ function Wl(t, e, n) {
2101
2101
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
2102
2102
  if (e == null) return this.tween(r, null);
2103
2103
  if (typeof e != "function") throw new Error();
2104
- return this.tween(r, Fl(t, e, n ?? ""));
2104
+ return this.tween(r, Vl(t, e, n ?? ""));
2105
2105
  }
2106
2106
  function Yl(t) {
2107
2107
  return function() {
@@ -2170,23 +2170,23 @@ function Bt(t, e, n, r) {
2170
2170
  function Wi() {
2171
2171
  return ++Ql;
2172
2172
  }
2173
- var Vt = qe.prototype;
2173
+ var Ft = qe.prototype;
2174
2174
  Bt.prototype = {
2175
2175
  constructor: Bt,
2176
2176
  select: Ll,
2177
2177
  selectAll: Dl,
2178
- selectChild: Vt.selectChild,
2179
- selectChildren: Vt.selectChildren,
2178
+ selectChild: Ft.selectChild,
2179
+ selectChildren: Ft.selectChildren,
2180
2180
  filter: Nl,
2181
2181
  merge: Sl,
2182
2182
  selection: Pl,
2183
2183
  transition: Gl,
2184
- call: Vt.call,
2185
- nodes: Vt.nodes,
2186
- node: Vt.node,
2187
- size: Vt.size,
2188
- empty: Vt.empty,
2189
- each: Vt.each,
2184
+ call: Ft.call,
2185
+ nodes: Ft.nodes,
2186
+ node: Ft.node,
2187
+ size: Ft.size,
2188
+ empty: Ft.empty,
2189
+ each: Ft.each,
2190
2190
  on: Rl,
2191
2191
  attr: ul,
2192
2192
  attrTween: gl,
@@ -2201,7 +2201,7 @@ Bt.prototype = {
2201
2201
  ease: kl,
2202
2202
  easeVarying: Al,
2203
2203
  end: Zl,
2204
- [Symbol.iterator]: Vt[Symbol.iterator]
2204
+ [Symbol.iterator]: Ft[Symbol.iterator]
2205
2205
  };
2206
2206
  function tc(t) {
2207
2207
  return --t * t * t + 1;
@@ -2277,8 +2277,8 @@ let oc = class {
2277
2277
  else if (f > ne) if (!(Math.abs(h * c - l * u) > ne) || !a)
2278
2278
  this._append`L${this._x1 = e},${this._y1 = n}`;
2279
2279
  else {
2280
- let p = r - s, _ = i - o, j = c * c + l * l, K = p * p + _ * _, T = Math.sqrt(j), q = Math.sqrt(f), k = a * Math.tan((tr - Math.acos((j + f - K) / (2 * T * q))) / 2), A = k / q, O = k / T;
2281
- Math.abs(A - 1) > ne && this._append`L${e + A * u},${n + A * h}`, this._append`A${a},${a},0,0,${+(h * p > u * _)},${this._x1 = e + O * c},${this._y1 = n + O * l}`;
2280
+ let p = r - s, v = i - o, j = c * c + l * l, K = p * p + v * v, T = Math.sqrt(j), q = Math.sqrt(f), k = a * Math.tan((tr - Math.acos((j + f - K) / (2 * T * q))) / 2), A = k / q, O = k / T;
2281
+ Math.abs(A - 1) > ne && this._append`L${e + A * u},${n + A * h}`, this._append`A${a},${a},0,0,${+(h * p > u * v)},${this._x1 = e + O * c},${this._y1 = n + O * l}`;
2282
2282
  }
2283
2283
  }
2284
2284
  arc(e, n, r, i, a, s) {
@@ -2397,18 +2397,18 @@ function pc(t) {
2397
2397
  var e = t.grouping === void 0 || t.thousands === void 0 ? Hr : cc(Or.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Hr : uc(Or.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
2398
2398
  function l(h) {
2399
2399
  h = xn(h);
2400
- var f = h.fill, p = h.align, _ = h.sign, j = h.symbol, K = h.zero, T = h.width, q = h.comma, k = h.precision, A = h.trim, O = h.type;
2400
+ var f = h.fill, p = h.align, v = h.sign, j = h.symbol, K = h.zero, T = h.width, q = h.comma, k = h.precision, A = h.trim, O = h.type;
2401
2401
  O === "n" ? (q = !0, O = "g") : zr[O] || (k === void 0 && (k = 12), A = !0, O = "g"), (K || f === "0" && p === "=") && (K = !0, f = "0", p = "=");
2402
- var V = j === "$" ? n : j === "#" && /[boxX]/.test(O) ? "0" + O.toLowerCase() : "", J = j === "$" ? r : /[%p]/.test(O) ? s : "", Z = zr[O], W = /[defgprs%]/.test(O);
2402
+ var F = j === "$" ? n : j === "#" && /[boxX]/.test(O) ? "0" + O.toLowerCase() : "", J = j === "$" ? r : /[%p]/.test(O) ? s : "", Z = zr[O], W = /[defgprs%]/.test(O);
2403
2403
  k = k === void 0 ? 6 : /[gprs]/.test(O) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
2404
2404
  function B(C) {
2405
- var L = V, w = J, E, d, R;
2405
+ var L = F, w = J, E, d, R;
2406
2406
  if (O === "c")
2407
2407
  w = Z(C) + w, C = "";
2408
2408
  else {
2409
2409
  C = +C;
2410
2410
  var M = C < 0 || 1 / C < 0;
2411
- if (C = isNaN(C) ? c : Z(Math.abs(C), k), A && (C = hc(C)), M && +C == 0 && _ !== "+" && (M = !1), L = (M ? _ === "(" ? _ : o : _ === "-" || _ === "(" ? "" : _) + L, w = (O === "s" ? qr[8 + Bi / 3] : "") + w + (M && _ === "(" ? ")" : ""), W) {
2411
+ if (C = isNaN(C) ? c : Z(Math.abs(C), k), A && (C = hc(C)), M && +C == 0 && v !== "+" && (M = !1), L = (M ? v === "(" ? v : o : v === "-" || v === "(" ? "" : v) + L, w = (O === "s" ? qr[8 + Bi / 3] : "") + w + (M && v === "(" ? ")" : ""), W) {
2412
2412
  for (E = -1, d = C.length; ++E < d; )
2413
2413
  if (R = C.charCodeAt(E), 48 > R || R > 57) {
2414
2414
  w = (R === 46 ? i + C.slice(E + 1) : C.slice(E)) + w, C = C.slice(0, E);
@@ -2439,7 +2439,7 @@ function pc(t) {
2439
2439
  }, B;
2440
2440
  }
2441
2441
  function u(h, f) {
2442
- var p = l((h = xn(h), h.type = "f", h)), _ = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, j = Math.pow(10, -_), K = qr[8 + _ / 3];
2442
+ var p = l((h = xn(h), h.type = "f", h)), v = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, j = Math.pow(10, -v), K = qr[8 + v / 3];
2443
2443
  return function(T) {
2444
2444
  return p(j * T) + K;
2445
2445
  };
@@ -2611,7 +2611,7 @@ function Oc(t) {
2611
2611
  if (typeof t != "function") throw new Error();
2612
2612
  return t;
2613
2613
  }
2614
- function Vr() {
2614
+ function Fr() {
2615
2615
  return 0;
2616
2616
  }
2617
2617
  function qc(t) {
@@ -2619,10 +2619,10 @@ function qc(t) {
2619
2619
  return t;
2620
2620
  };
2621
2621
  }
2622
- const Vc = 1664525, Fc = 1013904223, Fr = 4294967296;
2622
+ const Fc = 1664525, Vc = 1013904223, Vr = 4294967296;
2623
2623
  function Wc() {
2624
2624
  let t = 1;
2625
- return () => (t = (Vc * t + Fc) % Fr) / Fr;
2625
+ return () => (t = (Fc * t + Vc) % Vr) / Vr;
2626
2626
  }
2627
2627
  function Yc(t) {
2628
2628
  return typeof t == "object" && "length" in t ? t : Array.from(t);
@@ -2690,9 +2690,9 @@ function Le(t, e) {
2690
2690
  };
2691
2691
  }
2692
2692
  function Ui(t, e, n) {
2693
- var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s, p = r - l, _ = i - o, j = i - u, K = c - a, T = h - a, q = r * r + i * i - a * a, k = q - s * s - o * o + c * c, A = q - l * l - u * u + h * h, O = p * _ - f * j, V = (_ * A - j * k) / (O * 2) - r, J = (j * K - _ * T) / O, Z = (p * k - f * A) / (O * 2) - i, W = (f * T - p * K) / O, B = J * J + W * W - 1, C = 2 * (a + V * J + Z * W), L = V * V + Z * Z - a * a, w = -(Math.abs(B) > 1e-6 ? (C + Math.sqrt(C * C - 4 * B * L)) / (2 * B) : L / C);
2693
+ var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s, p = r - l, v = i - o, j = i - u, K = c - a, T = h - a, q = r * r + i * i - a * a, k = q - s * s - o * o + c * c, A = q - l * l - u * u + h * h, O = p * v - f * j, F = (v * A - j * k) / (O * 2) - r, J = (j * K - v * T) / O, Z = (p * k - f * A) / (O * 2) - i, W = (f * T - p * K) / O, B = J * J + W * W - 1, C = 2 * (a + F * J + Z * W), L = F * F + Z * Z - a * a, w = -(Math.abs(B) > 1e-6 ? (C + Math.sqrt(C * C - 4 * B * L)) / (2 * B) : L / C);
2694
2694
  return {
2695
- x: r + V + J * w,
2695
+ x: r + F + J * w,
2696
2696
  y: i + Z + W * w,
2697
2697
  r: w
2698
2698
  };
@@ -2747,10 +2747,10 @@ function Zc(t) {
2747
2747
  return Math.sqrt(t.value);
2748
2748
  }
2749
2749
  function Qc() {
2750
- var t = null, e = 1, n = 1, r = Vr;
2750
+ var t = null, e = 1, n = 1, r = Fr;
2751
2751
  function i(a) {
2752
2752
  const s = Wc();
2753
- return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(Xr(t)).eachAfter(On(r, 0.5, s)).eachBefore(Kr(1)) : a.eachBefore(Xr(Zc)).eachAfter(On(Vr, 1, s)).eachAfter(On(r, a.r / Math.min(e, n), s)).eachBefore(Kr(Math.min(e, n) / (2 * a.r))), a;
2753
+ return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(Xr(t)).eachAfter(On(r, 0.5, s)).eachBefore(Kr(1)) : a.eachBefore(Xr(Zc)).eachAfter(On(Fr, 1, s)).eachAfter(On(r, a.r / Math.min(e, n), s)).eachBefore(Kr(Math.min(e, n) / (2 * a.r))), a;
2754
2754
  }
2755
2755
  return i.radius = function(a) {
2756
2756
  return arguments.length ? (t = Hc(a), i) : t;
@@ -2823,10 +2823,10 @@ function $e() {
2823
2823
  var t = Ji().unknown(void 0), e = t.domain, n = t.range, r = 0, i = 1, a, s, o = !1, c = 0, l = 0, u = 0.5;
2824
2824
  delete t.unknown;
2825
2825
  function h() {
2826
- var f = e().length, p = i < r, _ = p ? i : r, j = p ? r : i;
2827
- a = (j - _) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), _ += (j - _ - a * (f - c)) * u, s = a * (1 - c), o && (_ = Math.round(_), s = Math.round(s));
2826
+ var f = e().length, p = i < r, v = p ? i : r, j = p ? r : i;
2827
+ a = (j - v) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), v += (j - v - a * (f - c)) * u, s = a * (1 - c), o && (v = Math.round(v), s = Math.round(s));
2828
2828
  var K = wa(f).map(function(T) {
2829
- return _ + a * T;
2829
+ return v + a * T;
2830
2830
  });
2831
2831
  return n(p ? K.reverse() : K);
2832
2832
  }
@@ -2979,12 +2979,12 @@ function le() {
2979
2979
  return au(t, le());
2980
2980
  }, gr.apply(t, arguments), cu(t);
2981
2981
  }
2982
- function Fe(t) {
2982
+ function Ve(t) {
2983
2983
  for (var e = t.length / 6 | 0, n = new Array(e), r = 0; r < e; ) n[r] = "#" + t.slice(r * 6, ++r * 6);
2984
2984
  return n;
2985
2985
  }
2986
- const Gi = Fe("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), Zi = Fe("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), Qi = Fe("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), ta = Fe("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"), ea = Fe("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
2987
- function dt(t) {
2986
+ const Gi = Ve("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), Zi = Ve("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), Qi = Ve("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), ta = Ve("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"), ea = Ve("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
2987
+ function pt(t) {
2988
2988
  return function() {
2989
2989
  return t;
2990
2990
  };
@@ -3031,7 +3031,7 @@ function xu(t, e, n, r, i, a, s, o) {
3031
3031
  return f = (u * (e - a) - h * (t - i)) / f, [t + f * c, e + f * l];
3032
3032
  }
3033
3033
  function tn(t, e, n, r, i, a, s) {
3034
- var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u, p = e + h, _ = n + u, j = r + h, K = (f + _) / 2, T = (p + j) / 2, q = _ - f, k = j - p, A = q * q + k * k, O = i - a, V = f * j - _ * p, J = (k < 0 ? -1 : 1) * ye(uu(0, O * O * A - V * V)), Z = (V * k - q * J) / A, W = (-V * q - k * J) / A, B = (V * k + q * J) / A, C = (-V * q + k * J) / A, L = Z - K, w = W - T, E = B - K, d = C - T;
3034
+ var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u, p = e + h, v = n + u, j = r + h, K = (f + v) / 2, T = (p + j) / 2, q = v - f, k = j - p, A = q * q + k * k, O = i - a, F = f * j - v * p, J = (k < 0 ? -1 : 1) * ye(uu(0, O * O * A - F * F)), Z = (F * k - q * J) / A, W = (-F * q - k * J) / A, B = (F * k + q * J) / A, C = (-F * q + k * J) / A, L = Z - K, w = W - T, E = B - K, d = C - T;
3035
3035
  return L * L + w * w > E * E + d * d && (Z = B, W = C), {
3036
3036
  cx: Z,
3037
3037
  cy: W,
@@ -3042,29 +3042,29 @@ function tn(t, e, n, r, i, a, s) {
3042
3042
  };
3043
3043
  }
3044
3044
  function Qr() {
3045
- var t = du, e = pu, n = dt(0), r = null, i = gu, a = yu, s = mu, o = null, c = hu(l);
3045
+ var t = du, e = pu, n = pt(0), r = null, i = gu, a = yu, s = mu, o = null, c = hu(l);
3046
3046
  function l() {
3047
- var u, h, f = +t.apply(this, arguments), p = +e.apply(this, arguments), _ = i.apply(this, arguments) - _n, j = a.apply(this, arguments) - _n, K = Gr(j - _), T = j > _;
3047
+ var u, h, f = +t.apply(this, arguments), p = +e.apply(this, arguments), v = i.apply(this, arguments) - _n, j = a.apply(this, arguments) - _n, K = Gr(j - v), T = j > v;
3048
3048
  if (o || (o = u = c()), p < f && (h = p, p = f, f = h), !(p > wt)) o.moveTo(0, 0);
3049
3049
  else if (K > on - wt)
3050
- o.moveTo(p * te(_), p * Dt(_)), o.arc(0, 0, p, _, j, !T), f > wt && (o.moveTo(f * te(j), f * Dt(j)), o.arc(0, 0, f, j, _, T));
3050
+ o.moveTo(p * te(v), p * Dt(v)), o.arc(0, 0, p, v, j, !T), f > wt && (o.moveTo(f * te(j), f * Dt(j)), o.arc(0, 0, f, j, v, T));
3051
3051
  else {
3052
- var q = _, k = j, A = _, O = j, V = K, J = K, Z = s.apply(this, arguments) / 2, W = Z > wt && (r ? +r.apply(this, arguments) : ye(f * f + p * p)), B = qn(Gr(p - f) / 2, +n.apply(this, arguments)), C = B, L = B, w, E;
3052
+ var q = v, k = j, A = v, O = j, F = K, J = K, Z = s.apply(this, arguments) / 2, W = Z > wt && (r ? +r.apply(this, arguments) : ye(f * f + p * p)), B = qn(Gr(p - f) / 2, +n.apply(this, arguments)), C = B, L = B, w, E;
3053
3053
  if (W > wt) {
3054
3054
  var d = Zr(W / f * Dt(Z)), R = Zr(W / p * Dt(Z));
3055
- (V -= d * 2) > wt ? (d *= T ? 1 : -1, A += d, O -= d) : (V = 0, A = O = (_ + j) / 2), (J -= R * 2) > wt ? (R *= T ? 1 : -1, q += R, k -= R) : (J = 0, q = k = (_ + j) / 2);
3055
+ (F -= d * 2) > wt ? (d *= T ? 1 : -1, A += d, O -= d) : (F = 0, A = O = (v + j) / 2), (J -= R * 2) > wt ? (R *= T ? 1 : -1, q += R, k -= R) : (J = 0, q = k = (v + j) / 2);
3056
3056
  }
3057
3057
  var M = p * te(q), N = p * Dt(q), x = f * te(O), S = f * Dt(O);
3058
3058
  if (B > wt) {
3059
- var m = p * te(k), D = p * Dt(k), P = f * te(A), F = f * Dt(A), Q;
3059
+ var m = p * te(k), D = p * Dt(k), P = f * te(A), V = f * Dt(A), Q;
3060
3060
  if (K < Oe)
3061
- if (Q = xu(M, N, P, F, m, D, x, S)) {
3062
- var tt = M - Q[0], z = N - Q[1], g = m - Q[0], y = D - Q[1], b = 1 / Dt(fu((tt * g + z * y) / (ye(tt * tt + z * z) * ye(g * g + y * y))) / 2), v = ye(Q[0] * Q[0] + Q[1] * Q[1]);
3063
- C = qn(B, (f - v) / (b - 1)), L = qn(B, (p - v) / (b + 1));
3061
+ if (Q = xu(M, N, P, V, m, D, x, S)) {
3062
+ var tt = M - Q[0], z = N - Q[1], y = m - Q[0], g = D - Q[1], _ = 1 / Dt(fu((tt * y + z * g) / (ye(tt * tt + z * z) * ye(y * y + g * g))) / 2), b = ye(Q[0] * Q[0] + Q[1] * Q[1]);
3063
+ C = qn(B, (f - b) / (_ - 1)), L = qn(B, (p - b) / (_ + 1));
3064
3064
  } else
3065
3065
  C = L = 0;
3066
3066
  }
3067
- J > wt ? L > wt ? (w = tn(P, F, M, N, p, L, T), E = tn(m, D, x, S, p, L, T), o.moveTo(w.cx + w.x01, w.cy + w.y01), L < B ? o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, p, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), !T), o.arc(E.cx, E.cy, L, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : (o.moveTo(M, N), o.arc(0, 0, p, q, k, !T)) : o.moveTo(M, N), !(f > wt) || !(V > wt) ? o.lineTo(x, S) : C > wt ? (w = tn(x, S, m, D, f, -C, T), E = tn(M, N, P, F, f, -C, T), o.lineTo(w.cx + w.x01, w.cy + w.y01), C < B ? o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, f, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), T), o.arc(E.cx, E.cy, C, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : o.arc(0, 0, f, O, A, T);
3067
+ J > wt ? L > wt ? (w = tn(P, V, M, N, p, L, T), E = tn(m, D, x, S, p, L, T), o.moveTo(w.cx + w.x01, w.cy + w.y01), L < B ? o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, p, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), !T), o.arc(E.cx, E.cy, L, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : (o.moveTo(M, N), o.arc(0, 0, p, q, k, !T)) : o.moveTo(M, N), !(f > wt) || !(F > wt) ? o.lineTo(x, S) : C > wt ? (w = tn(x, S, m, D, f, -C, T), E = tn(M, N, P, V, f, -C, T), o.lineTo(w.cx + w.x01, w.cy + w.y01), C < B ? o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, f, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), T), o.arc(E.cx, E.cy, C, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : o.arc(0, 0, f, O, A, T);
3068
3068
  }
3069
3069
  if (o.closePath(), u) return o = null, u + "" || null;
3070
3070
  }
@@ -3072,19 +3072,19 @@ function Qr() {
3072
3072
  var u = (+t.apply(this, arguments) + +e.apply(this, arguments)) / 2, h = (+i.apply(this, arguments) + +a.apply(this, arguments)) / 2 - Oe / 2;
3073
3073
  return [te(h) * u, Dt(h) * u];
3074
3074
  }, l.innerRadius = function(u) {
3075
- return arguments.length ? (t = typeof u == "function" ? u : dt(+u), l) : t;
3075
+ return arguments.length ? (t = typeof u == "function" ? u : pt(+u), l) : t;
3076
3076
  }, l.outerRadius = function(u) {
3077
- return arguments.length ? (e = typeof u == "function" ? u : dt(+u), l) : e;
3077
+ return arguments.length ? (e = typeof u == "function" ? u : pt(+u), l) : e;
3078
3078
  }, l.cornerRadius = function(u) {
3079
- return arguments.length ? (n = typeof u == "function" ? u : dt(+u), l) : n;
3079
+ return arguments.length ? (n = typeof u == "function" ? u : pt(+u), l) : n;
3080
3080
  }, l.padRadius = function(u) {
3081
- return arguments.length ? (r = u == null ? null : typeof u == "function" ? u : dt(+u), l) : r;
3081
+ return arguments.length ? (r = u == null ? null : typeof u == "function" ? u : pt(+u), l) : r;
3082
3082
  }, l.startAngle = function(u) {
3083
- return arguments.length ? (i = typeof u == "function" ? u : dt(+u), l) : i;
3083
+ return arguments.length ? (i = typeof u == "function" ? u : pt(+u), l) : i;
3084
3084
  }, l.endAngle = function(u) {
3085
- return arguments.length ? (a = typeof u == "function" ? u : dt(+u), l) : a;
3085
+ return arguments.length ? (a = typeof u == "function" ? u : pt(+u), l) : a;
3086
3086
  }, l.padAngle = function(u) {
3087
- return arguments.length ? (s = typeof u == "function" ? u : dt(+u), l) : s;
3087
+ return arguments.length ? (s = typeof u == "function" ? u : pt(+u), l) : s;
3088
3088
  }, l.context = function(u) {
3089
3089
  return arguments.length ? (o = u ?? null, l) : o;
3090
3090
  }, l;
@@ -3099,17 +3099,17 @@ function _u(t) {
3099
3099
  return t;
3100
3100
  }
3101
3101
  function bu() {
3102
- var t = _u, e = vu, n = null, r = dt(0), i = dt(on), a = dt(0);
3102
+ var t = _u, e = vu, n = null, r = pt(0), i = pt(on), a = pt(0);
3103
3103
  function s(o) {
3104
- var c, l = (o = na(o)).length, u, h, f = 0, p = new Array(l), _ = new Array(l), j = +r.apply(this, arguments), K = Math.min(on, Math.max(-on, i.apply(this, arguments) - j)), T, q = Math.min(Math.abs(K) / l, a.apply(this, arguments)), k = q * (K < 0 ? -1 : 1), A;
3104
+ var c, l = (o = na(o)).length, u, h, f = 0, p = new Array(l), v = new Array(l), j = +r.apply(this, arguments), K = Math.min(on, Math.max(-on, i.apply(this, arguments) - j)), T, q = Math.min(Math.abs(K) / l, a.apply(this, arguments)), k = q * (K < 0 ? -1 : 1), A;
3105
3105
  for (c = 0; c < l; ++c)
3106
- (A = _[p[c] = c] = +t(o[c], c, o)) > 0 && (f += A);
3107
- for (e != null ? p.sort(function(O, V) {
3108
- return e(_[O], _[V]);
3109
- }) : n != null && p.sort(function(O, V) {
3110
- return n(o[O], o[V]);
3106
+ (A = v[p[c] = c] = +t(o[c], c, o)) > 0 && (f += A);
3107
+ for (e != null ? p.sort(function(O, F) {
3108
+ return e(v[O], v[F]);
3109
+ }) : n != null && p.sort(function(O, F) {
3110
+ return n(o[O], o[F]);
3111
3111
  }), c = 0, h = f ? (K - l * k) / f : 0; c < l; ++c, j = T)
3112
- u = p[c], A = _[u], T = j + (A > 0 ? A * h : 0) + k, _[u] = {
3112
+ u = p[c], A = v[u], T = j + (A > 0 ? A * h : 0) + k, v[u] = {
3113
3113
  data: o[u],
3114
3114
  index: c,
3115
3115
  value: A,
@@ -3117,20 +3117,20 @@ function bu() {
3117
3117
  endAngle: T,
3118
3118
  padAngle: q
3119
3119
  };
3120
- return _;
3120
+ return v;
3121
3121
  }
3122
3122
  return s.value = function(o) {
3123
- return arguments.length ? (t = typeof o == "function" ? o : dt(+o), s) : t;
3123
+ return arguments.length ? (t = typeof o == "function" ? o : pt(+o), s) : t;
3124
3124
  }, s.sortValues = function(o) {
3125
3125
  return arguments.length ? (e = o, n = null, s) : e;
3126
3126
  }, s.sort = function(o) {
3127
3127
  return arguments.length ? (n = o, e = null, s) : n;
3128
3128
  }, s.startAngle = function(o) {
3129
- return arguments.length ? (r = typeof o == "function" ? o : dt(+o), s) : r;
3129
+ return arguments.length ? (r = typeof o == "function" ? o : pt(+o), s) : r;
3130
3130
  }, s.endAngle = function(o) {
3131
- return arguments.length ? (i = typeof o == "function" ? o : dt(+o), s) : i;
3131
+ return arguments.length ? (i = typeof o == "function" ? o : pt(+o), s) : i;
3132
3132
  }, s.padAngle = function(o) {
3133
- return arguments.length ? (a = typeof o == "function" ? o : dt(+o), s) : a;
3133
+ return arguments.length ? (a = typeof o == "function" ? o : pt(+o), s) : a;
3134
3134
  }, s;
3135
3135
  }
3136
3136
  function rr(t, e) {
@@ -3151,7 +3151,7 @@ function ku(t) {
3151
3151
  return e.key = t, e;
3152
3152
  }
3153
3153
  function bn() {
3154
- var t = dt([]), e = ir, n = rr, r = wu;
3154
+ var t = pt([]), e = ir, n = rr, r = wu;
3155
3155
  function i(a) {
3156
3156
  var s = Array.from(t.apply(this, arguments), ku), o, c = s.length, l = -1, u;
3157
3157
  for (const h of a)
@@ -3162,11 +3162,11 @@ function bn() {
3162
3162
  return n(s, u), s;
3163
3163
  }
3164
3164
  return i.keys = function(a) {
3165
- return arguments.length ? (t = typeof a == "function" ? a : dt(Array.from(a)), i) : t;
3165
+ return arguments.length ? (t = typeof a == "function" ? a : pt(Array.from(a)), i) : t;
3166
3166
  }, i.value = function(a) {
3167
- return arguments.length ? (r = typeof a == "function" ? a : dt(+a), i) : r;
3167
+ return arguments.length ? (r = typeof a == "function" ? a : pt(+a), i) : r;
3168
3168
  }, i.order = function(a) {
3169
- return arguments.length ? (e = a == null ? ir : typeof a == "function" ? a : dt(Array.from(a)), i) : e;
3169
+ return arguments.length ? (e = a == null ? ir : typeof a == "function" ? a : pt(Array.from(a)), i) : e;
3170
3170
  }, i.offset = function(a) {
3171
3171
  return arguments.length ? (n = a ?? rr, i) : n;
3172
3172
  }, i;
@@ -3223,11 +3223,11 @@ De.prototype;
3223
3223
  const Et = (t, e) => {
3224
3224
  const n = Pt(null);
3225
3225
  return vt(() => {
3226
- e !== void 0 && n.current && t(ht(n.current));
3226
+ e !== void 0 && n.current && t(dt(n.current));
3227
3227
  }, e === null ? void 0 : e), n;
3228
3228
  };
3229
3229
  function he() {
3230
- const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
3230
+ const t = Pt(null), [e, n] = ft({ width: 0, height: 0 });
3231
3231
  return vt(() => {
3232
3232
  const r = t.current;
3233
3233
  if (!r || !r.parentElement) return;
@@ -3241,7 +3241,7 @@ function he() {
3241
3241
  }, []), [t, e];
3242
3242
  }
3243
3243
  function Tn() {
3244
- const [t, e] = ct(null);
3244
+ const [t, e] = ft(null);
3245
3245
  return vt(() => {
3246
3246
  const n = typeof document < "u" ? document.getElementById("UI-controls") : null;
3247
3247
  e(n);
@@ -3381,7 +3381,7 @@ function ei(t, e) {
3381
3381
  s = a;
3382
3382
  e.style("left", s + "px").attr("class", `${kt.tooltip} ${kt["tooltip--arrow-down"]}`).style("top", t.y - (r + 10) + "px");
3383
3383
  }
3384
- const Ft = "#d1d5db", Mu = "_disabled_6kkmf_99", et = {
3384
+ const Vt = "#d1d5db", Mu = "_disabled_6kkmf_99", nt = {
3385
3385
  "controls-container": "_controls-container_6kkmf_1",
3386
3386
  "controls-container-sm": "_controls-container-sm_6kkmf_1",
3387
3387
  "fill-container": "_fill-container_6kkmf_39",
@@ -3427,17 +3427,17 @@ function wf({
3427
3427
  formatType: s = "long"
3428
3428
  } = { prefix: "", suffix: "", formatType: "long" }
3429
3429
  }) {
3430
- const [o, c] = he(), { width: l, height: u } = c, [h, f] = ct(!1), p = Ae(t.map((A) => A.label)), _ = Tn(), j = l > 576, K = /* @__PURE__ */ H.jsx(
3430
+ const [o, c] = he(), { width: l, height: u } = c, [h, f] = ft(!1), p = Ae(t.map((A) => A.label)), v = Tn(), j = l > 576, K = /* @__PURE__ */ H.jsx(
3431
3431
  "div",
3432
3432
  {
3433
3433
  id: "controls",
3434
- className: `${et[j ? "controls-container" : "controls-container-sm"]} ${_ ? et["fill-container"] : ""}`,
3435
- children: /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], children: [
3434
+ className: `${nt[j ? "controls-container" : "controls-container-sm"]} ${v ? nt["fill-container"] : ""}`,
3435
+ children: /* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], children: [
3436
3436
  /* @__PURE__ */ H.jsx(
3437
3437
  "input",
3438
3438
  {
3439
3439
  type: "checkbox",
3440
- className: et["controls-checkbox"],
3440
+ className: nt["controls-checkbox"],
3441
3441
  checked: h,
3442
3442
  onChange: (A) => f(A.target.checked)
3443
3443
  }
@@ -3452,7 +3452,7 @@ function wf({
3452
3452
  right: 30,
3453
3453
  bottom: r === "vertical" ? 50 : 30,
3454
3454
  left: r === "vertical" ? 25 : 50
3455
- }, V = h ? Mt(t).sort((x, S) => S.value - x.value) : Mt(t), J = A.select("svg"), Z = J.node(), W = J.select(".plot-area").attr("transform", "translate(" + O.left + "," + O.top + ")"), B = Ye(A).style("opacity", 0), C = j ? en.axisText : en.rotatedAxisText, L = l - O.left - O.right, w = u - O.top - O.bottom, E = $e().domain(V.map((x) => x.label)).rangeRound(r === "vertical" ? [0, L] : [w, 0]).paddingInner(j ? 0.4 : 0.25).paddingOuter(0.1), d = le().domain([0, Yt(V, (x) => x.value) ?? 0]).rangeRound(r === "vertical" ? [w, 0] : [0, L]), R = r === "vertical" ? Gt(E).tickValues(E.domain()).scale(E).tickSizeOuter(0) : Gt(d).ticks(5, "s").tickSizeOuter(0).tickSize(-w);
3455
+ }, F = h ? Mt(t).sort((x, S) => S.value - x.value) : Mt(t), J = A.select("svg"), Z = J.node(), W = J.select(".plot-area").attr("transform", "translate(" + O.left + "," + O.top + ")"), B = Ye(A).style("opacity", 0), C = j ? en.axisText : en.rotatedAxisText, L = l - O.left - O.right, w = u - O.top - O.bottom, E = $e().domain(F.map((x) => x.label)).rangeRound(r === "vertical" ? [0, L] : [w, 0]).paddingInner(j ? 0.4 : 0.25).paddingOuter(0.1), d = le().domain([0, Yt(F, (x) => x.value) ?? 0]).rangeRound(r === "vertical" ? [w, 0] : [0, L]), R = r === "vertical" ? Gt(E).tickValues(E.domain()).scale(E).tickSizeOuter(0) : Gt(d).ticks(5, "s").tickSizeOuter(0).tickSize(-w);
3456
3456
  W.select(".x-axis").attr("transform", `translate(0, ${w})`).transition().duration(q).call(R).selectAll("text").attr("class", C);
3457
3457
  const M = r === "vertical" ? Zt(d).ticks(5, "s").tickSize(-L) : Zt(E).tickSizeOuter(0);
3458
3458
  W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(q).call(M);
@@ -3460,7 +3460,7 @@ function wf({
3460
3460
  const { idx: S, type: m } = T, D = p.current.findIndex((P) => P === x.label);
3461
3461
  return xe(m === "fixed" ? S : S + D);
3462
3462
  };
3463
- W.selectAll(".bar").data(V, (x) => x.label).join(
3463
+ W.selectAll(".bar").data(F, (x) => x.label).join(
3464
3464
  (x) => x.append("rect").attr("class", "bar").attr("x", function(S) {
3465
3465
  return r === "vertical" ? E(S.label) ?? 0 : d(0);
3466
3466
  }).attr("width", function(S) {
@@ -3477,21 +3477,21 @@ function wf({
3477
3477
  return r === "vertical" ? d(0) - d(S.value) : E.bandwidth();
3478
3478
  }),
3479
3479
  void 0,
3480
- (x) => x.transition().duration(q).attr("fill", Ft).attr("height", 0).attr("y", u).style("opacity", 0).remove()
3480
+ (x) => x.transition().duration(q).attr("fill", Vt).attr("height", 0).attr("y", u).style("opacity", 0).remove()
3481
3481
  ).on(
3482
3482
  "mouseover",
3483
3483
  (x, S) => {
3484
3484
  W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "#71717a").style("stroke-width", 1), B.style("opacity", 1).select("p").text(S.label + ` :
3485
3485
  ${i}
3486
3486
  ${fe(s === "long" ? "," : "~s")(S.value)}
3487
- ${a}`), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "bold");
3487
+ ${a}`), dt(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "bold");
3488
3488
  }
3489
3489
  ).on("mousemove", (x, S) => {
3490
3490
  Rn(B, { e: x, svg: Z, yScale: d });
3491
3491
  }).on(
3492
3492
  "mouseout",
3493
3493
  (x, S) => {
3494
- W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "none").style("stroke-width", 0), B.style("opacity", 0), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "normal");
3494
+ W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "none").style("stroke-width", 0), B.style("opacity", 0), dt(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "normal");
3495
3495
  }
3496
3496
  ).transition().duration(q).attr("fill", N).attr("x", function(x) {
3497
3497
  return r === "vertical" ? E(x.label) ?? 0 : d(0);
@@ -3509,18 +3509,18 @@ function wf({
3509
3509
  ref: o,
3510
3510
  style: { width: l, height: u, display: "flex", flexDirection: "column" },
3511
3511
  children: [
3512
- _ && kn(K, _),
3512
+ v && kn(K, v),
3513
3513
  /* @__PURE__ */ H.jsxs(
3514
3514
  "div",
3515
3515
  {
3516
3516
  ref: k,
3517
- className: `${et["fill-container"]}`,
3517
+ className: `${nt["fill-container"]}`,
3518
3518
  style: { display: "flex", flexDirection: "column", position: "relative" },
3519
3519
  children: [
3520
3520
  /* @__PURE__ */ H.jsx(
3521
3521
  "svg",
3522
3522
  {
3523
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
3523
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
3524
3524
  style: {},
3525
3525
  viewBox: `0 0 ${l} ${u}`,
3526
3526
  children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
@@ -3529,17 +3529,17 @@ function wf({
3529
3529
  ] })
3530
3530
  }
3531
3531
  ),
3532
- !_ && /* @__PURE__ */ H.jsxs(
3532
+ !v && /* @__PURE__ */ H.jsxs(
3533
3533
  "label",
3534
3534
  {
3535
- className: et["controls-label"],
3535
+ className: nt["controls-label"],
3536
3536
  style: { position: "absolute", right: "12px", top: "6px" },
3537
3537
  children: [
3538
3538
  /* @__PURE__ */ H.jsx(
3539
3539
  "input",
3540
3540
  {
3541
3541
  type: "checkbox",
3542
- className: et["controls-checkbox"],
3542
+ className: nt["controls-checkbox"],
3543
3543
  checked: h,
3544
3544
  onChange: (A) => f(A.target.checked)
3545
3545
  }
@@ -3557,7 +3557,7 @@ function wf({
3557
3557
  );
3558
3558
  }
3559
3559
  function ce() {
3560
- const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
3560
+ const t = Pt(null), [e, n] = ft({ width: 0, height: 0 });
3561
3561
  return vt(() => {
3562
3562
  const r = t.current;
3563
3563
  if (!r) return;
@@ -3592,7 +3592,7 @@ const Eu = "_legend_7ftsg_1", Cu = "_pieSlice_7ftsg_77", Lu = "_pieSliceNotHover
3592
3592
  pieLabelExit: qu
3593
3593
  };
3594
3594
  function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r = 0 }) {
3595
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [p, _] = ct([]), [j, K] = ct(!1), [T, q] = ct(""), k = 750, A = Et((J) => {
3595
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [p, v] = ft([]), [j, K] = ft(!1), [T, q] = ft(""), k = 750, A = Et((J) => {
3596
3596
  const W = (n && j ? Mt(t).sort((C, L) => C.value - L.value) : t).map((C) => C.label);
3597
3597
  J.selectAll(".legend-item").data([...W], (C) => C).join(
3598
3598
  (C) => {
@@ -3615,85 +3615,85 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3615
3615
  });
3616
3616
  }, [t, r, u, h, T, j, n]), O = Et((J) => {
3617
3617
  if (u === 0 || h === 0) return;
3618
- const Z = { x: u / 2, y: h / 2 }, W = { top: 10, right: 20, bottom: 10, left: 20 }, B = t, C = u - (W.left + W.right), L = h - (W.top + W.bottom), w = Math.min(C, L) / 2, E = B.reduce((v, U) => v + U.value, 0), d = J.select(".plot-area").attr("transform", "translate(" + Z.x + "," + Z.y + ")"), R = bu().value(function(v) {
3619
- return v.value;
3620
- }).sort(function(v, U) {
3621
- return j ? je(v.value, U.value) : 0;
3618
+ const Z = { x: u / 2, y: h / 2 }, W = { top: 10, right: 20, bottom: 10, left: 20 }, B = t, C = u - (W.left + W.right), L = h - (W.top + W.bottom), w = Math.min(C, L) / 2, E = B.reduce((b, U) => b + U.value, 0), d = J.select(".plot-area").attr("transform", "translate(" + Z.x + "," + Z.y + ")"), R = bu().value(function(b) {
3619
+ return b.value;
3620
+ }).sort(function(b, U) {
3621
+ return j ? je(b.value, U.value) : 0;
3622
3622
  }), M = Mt(B), N = R(M), x = Mt(M);
3623
- _(R(x));
3623
+ v(R(x));
3624
3624
  let S = x.length > M.length;
3625
- const m = p.map((v) => v.data.label), D = N.map((v) => v.data.label);
3626
- m.every((v) => S ? !1 : D.includes(v) ? !0 : (S = !0, !1));
3627
- const P = p.length === 0, Q = Qr().innerRadius(e * w).outerRadius(w - 12), tt = Qr().innerRadius(e * w).outerRadius(w), z = (v, U) => {
3628
- const nt = Jt(
3629
- U === "exit" ? v.endAngle : v.startAngle,
3630
- U === "exit" ? v.startAngle : v.endAngle
3631
- ), ot = v.data.label === T;
3632
- return function(lt) {
3633
- return v.endAngle = nt(lt), ot ? tt(v) || "" : Q(v) || "";
3625
+ const m = p.map((b) => b.data.label), D = N.map((b) => b.data.label);
3626
+ m.every((b) => S ? !1 : D.includes(b) ? !0 : (S = !0, !1));
3627
+ const P = p.length === 0, Q = Qr().innerRadius(e * w).outerRadius(w - 12), tt = Qr().innerRadius(e * w).outerRadius(w), z = (b, U) => {
3628
+ const et = Jt(
3629
+ U === "exit" ? b.endAngle : b.startAngle,
3630
+ U === "exit" ? b.startAngle : b.endAngle
3631
+ ), ot = b.data.label === T;
3632
+ return function(ct) {
3633
+ return b.endAngle = et(ct), ot ? tt(b) || "" : Q(b) || "";
3634
3634
  };
3635
3635
  };
3636
- d.selectAll("path").data(N, function(v) {
3637
- return v.data.label;
3636
+ d.selectAll("path").data(N, function(b) {
3637
+ return b.data.label;
3638
3638
  }).join(
3639
- (v) => {
3640
- const U = v.append("path").attr("class", jt.pieSlice).attr("fill", function(nt) {
3641
- const ot = f.current.findIndex((lt) => lt === nt.data.label) + r;
3639
+ (b) => {
3640
+ const U = b.append("path").attr("class", jt.pieSlice).attr("fill", function(et) {
3641
+ const ot = f.current.findIndex((ct) => ct === et.data.label) + r;
3642
3642
  return xe(ot);
3643
3643
  });
3644
- return U.transition().duration(k).delay(P ? 0 : k).attr("d", Q).attrTween("d", function(nt) {
3644
+ return U.transition().duration(k).delay(P ? 0 : k).attr("d", Q).attrTween("d", function(et) {
3645
3645
  if (!P)
3646
- return z(nt, "not exit");
3647
- const ot = Jt(0, nt.startAngle), lt = Jt(0, nt.endAngle), pt = nt.data.label === T;
3648
- return function(ft) {
3649
- return nt.startAngle = ot(ft), nt.endAngle = lt(ft), pt ? tt(nt) : Q(nt);
3646
+ return z(et, "not exit");
3647
+ const ot = Jt(0, et.startAngle), ct = Jt(0, et.endAngle), ht = et.data.label === T;
3648
+ return function(lt) {
3649
+ return et.startAngle = ot(lt), et.endAngle = ct(lt), ht ? tt(et) : Q(et);
3650
3650
  };
3651
3651
  }), U;
3652
3652
  },
3653
- (v) => {
3654
- const U = v;
3655
- return v.transition().duration(k).attr("fill", function(nt, ot) {
3656
- const lt = f.current.findIndex((pt) => pt === nt.data.label) + r;
3657
- return xe(lt);
3658
- }).attrTween("d", function(nt) {
3659
- const ot = p.find((Ot) => Ot.data.label === nt.data.label), lt = ot && ot.startAngle ? ot.startAngle : 0, pt = Jt(lt, nt.startAngle), ft = ot && ot.endAngle ? ot.endAngle : 0, ut = Jt(ft, nt.endAngle), _t = nt.data.label === T;
3653
+ (b) => {
3654
+ const U = b;
3655
+ return b.transition().duration(k).attr("fill", function(et, ot) {
3656
+ const ct = f.current.findIndex((ht) => ht === et.data.label) + r;
3657
+ return xe(ct);
3658
+ }).attrTween("d", function(et) {
3659
+ const ot = p.find((Ot) => Ot.data.label === et.data.label), ct = ot && ot.startAngle ? ot.startAngle : 0, ht = Jt(ct, et.startAngle), lt = ot && ot.endAngle ? ot.endAngle : 0, ut = Jt(lt, et.endAngle), _t = et.data.label === T;
3660
3660
  return function(Ot) {
3661
- return nt.startAngle = pt(Ot), nt.endAngle = ut(Ot), _t ? tt(nt) || "" : Q(nt) || "";
3661
+ return et.startAngle = ht(Ot), et.endAngle = ut(Ot), _t ? tt(et) || "" : Q(et) || "";
3662
3662
  };
3663
3663
  }), U;
3664
3664
  },
3665
- (v) => v.attr("class", jt.pieSliceExit).transition().duration(k).attr("fill", Ft).attrTween("d", function(U) {
3665
+ (b) => b.attr("class", jt.pieSliceExit).transition().duration(k).attr("fill", Vt).attrTween("d", function(U) {
3666
3666
  return z(U, "exit");
3667
3667
  }).remove()
3668
- ).on("mouseover", function(v, U) {
3668
+ ).on("mouseover", function(b, U) {
3669
3669
  q(U.data.label);
3670
3670
  }).on("mouseout", () => {
3671
3671
  q("");
3672
3672
  });
3673
- const y = (v) => B.length === 1 ? "translate(0, 0)" : `translate(${Q.centroid(v)})`, b = (v) => {
3674
- const U = v.value / E;
3673
+ const g = (b) => B.length === 1 ? "translate(0, 0)" : `translate(${Q.centroid(b)})`, _ = (b) => {
3674
+ const U = b.value / E;
3675
3675
  return fe(".1%")(U);
3676
3676
  };
3677
- d.selectAll("text").data(N, function(v) {
3678
- return v.data.label;
3677
+ d.selectAll("text").data(N, function(b) {
3678
+ return b.data.label;
3679
3679
  }).join(
3680
- (v) => {
3681
- const U = v.append("text").text(b).attr("class", jt.pieLabelEnter);
3680
+ (b) => {
3681
+ const U = b.append("text").text(_).attr("class", jt.pieLabelEnter);
3682
3682
  return U.merge(U).transition().duration(k).delay(
3683
3683
  k
3684
3684
  /* + exitDelay*/
3685
- ).attr("transform", y), U;
3685
+ ).attr("transform", g), U;
3686
3686
  },
3687
- (v) => {
3688
- const U = v.text(b);
3689
- return v.merge(U).attr("class", jt.pieLabelUpdate).transition().duration(T !== "" ? 250 : k).style("opacity", function(nt) {
3690
- const ot = T === nt.data.label;
3687
+ (b) => {
3688
+ const U = b.text(_);
3689
+ return b.merge(U).attr("class", jt.pieLabelUpdate).transition().duration(T !== "" ? 250 : k).style("opacity", function(et) {
3690
+ const ot = T === et.data.label;
3691
3691
  return T === "" || ot ? 1 : 0;
3692
- }).attr("transform", y), U;
3692
+ }).attr("transform", g), U;
3693
3693
  },
3694
- (v) => v.transition().duration(k / 2).attr("class", jt.pieLabelExit).remove()
3694
+ (b) => b.transition().duration(k / 2).attr("class", jt.pieLabelExit).remove()
3695
3695
  );
3696
- }, [t, r, e, u, h, j, T]), V = s > o;
3696
+ }, [t, r, e, u, h, j, T]), F = s > o;
3697
3697
  return /* @__PURE__ */ H.jsxs(
3698
3698
  "div",
3699
3699
  {
@@ -3703,7 +3703,7 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3703
3703
  height: o,
3704
3704
  position: "relative",
3705
3705
  display: "flex",
3706
- flexDirection: V ? "row" : "column",
3706
+ flexDirection: F ? "row" : "column",
3707
3707
  overflow: "hidden"
3708
3708
  },
3709
3709
  children: [
@@ -3720,7 +3720,7 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3720
3720
  "svg",
3721
3721
  {
3722
3722
  ref: O,
3723
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
3723
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
3724
3724
  viewBox: `0 0 ${u} ${h}`,
3725
3725
  children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
3726
3726
  }
@@ -3731,13 +3731,13 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3731
3731
  "div",
3732
3732
  {
3733
3733
  style: {
3734
- width: V ? s > 480 ? "180px" : "100px" : "100%",
3735
- height: V ? "100%" : o > 400 ? "180px" : "100px",
3734
+ width: F ? s > 480 ? "180px" : "100px" : "100%",
3735
+ height: F ? "100%" : o > 400 ? "180px" : "100px",
3736
3736
  flexShrink: 0,
3737
3737
  overflowY: "auto",
3738
3738
  background: "rgba(255, 255, 255)",
3739
- borderLeft: V ? "1px solid #ddd" : "none",
3740
- borderTop: V ? "none" : "1px solid #ddd",
3739
+ borderLeft: F ? "1px solid #ddd" : "none",
3740
+ borderTop: F ? "none" : "1px solid #ddd",
3741
3741
  padding: "0px"
3742
3742
  },
3743
3743
  children: /* @__PURE__ */ H.jsx(
@@ -3760,14 +3760,14 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3760
3760
  /* @__PURE__ */ H.jsxs(
3761
3761
  "label",
3762
3762
  {
3763
- className: et["controls-label"],
3763
+ className: nt["controls-label"],
3764
3764
  style: { position: "absolute", left: "12px", top: "6px" },
3765
3765
  children: [
3766
3766
  /* @__PURE__ */ H.jsx(
3767
3767
  "input",
3768
3768
  {
3769
3769
  type: "checkbox",
3770
- className: et["controls-checkbox"],
3770
+ className: nt["controls-checkbox"],
3771
3771
  checked: j,
3772
3772
  onChange: (J) => K(J.target.checked)
3773
3773
  }
@@ -3780,7 +3780,7 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
3780
3780
  }
3781
3781
  );
3782
3782
  }
3783
- const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1", Bu = "_rectHoveredLegend_aemvq_333", Xu = "_rectCardLegendHovered_aemvq_343", Ku = "_rectLegendHovered_aemvq_355", Uu = "_rotatedAxisText_aemvq_377", Ju = "_axisText_aemvq_387", Gu = "_hoveredAxisText_aemvq_397", Zu = "_yAxisLabel_aemvq_411", rt = {
3783
+ const Fu = "_rect_aemvq_277", Vu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1", Bu = "_rectHoveredLegend_aemvq_333", Xu = "_rectCardLegendHovered_aemvq_343", Ku = "_rectLegendHovered_aemvq_355", Uu = "_rotatedAxisText_aemvq_377", Ju = "_axisText_aemvq_387", Gu = "_hoveredAxisText_aemvq_397", Zu = "_yAxisLabel_aemvq_411", rt = {
3784
3784
  "legends-container": "_legends-container_aemvq_1",
3785
3785
  "legend-container": "_legend-container_aemvq_61",
3786
3786
  "legend-container-active": "_legend-container-active_aemvq_61",
@@ -3790,8 +3790,8 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
3790
3790
  "legend-container-inactive-sm": "_legend-container-inactive-sm_aemvq_63",
3791
3791
  "legend-rect": "_legend-rect_aemvq_125",
3792
3792
  "legend-label": "_legend-label_aemvq_159",
3793
- rect: Vu,
3794
- rectCard: Fu,
3793
+ rect: Fu,
3794
+ rectCard: Vu,
3795
3795
  rectLegendNotHovered: Wu,
3796
3796
  legend: Yu,
3797
3797
  rectHoveredLegend: Bu,
@@ -3804,7 +3804,7 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
3804
3804
  "value-axis": "_value-axis_aemvq_421"
3805
3805
  };
3806
3806
  function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "vertical", tooltipFormat: i }) {
3807
- const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, p] = ce(), { width: _, height: j } = p, [K, T] = ct(null), [q, k] = ct(!1), [A, O] = ct(["all"]), [V, J] = ct(!1), [Z, W] = ct(""), [B, C] = ct(!1), L = Tn(), w = t;
3807
+ const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, p] = ce(), { width: v, height: j } = p, [K, T] = ft(null), [q, k] = ft(!1), [A, O] = ft(["all"]), [F, J] = ft(!1), [Z, W] = ft(""), [B, C] = ft(!1), L = Tn(), w = t;
3808
3808
  vt(() => {
3809
3809
  O(["all"]), k(!0);
3810
3810
  }, [w]), vt(() => {
@@ -3819,55 +3819,55 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3819
3819
  clearTimeout(P);
3820
3820
  };
3821
3821
  }, [q]);
3822
- const d = [_, j, A, n, e], R = Mt(w), M = R.length === 0 ? [] : Object.keys(R[0]).filter((P) => P !== "label" && P !== "total"), N = Ae(M), x = _ > 576, S = Et((P) => {
3822
+ const d = [v, j, A, n, e], R = Mt(w), M = R.length === 0 ? [] : Object.keys(R[0]).filter((P) => P !== "label" && P !== "total"), N = Ae(M), x = v > 576, S = Et((P) => {
3823
3823
  if (q)
3824
3824
  return;
3825
- const F = x ? 80 : 50, Q = function(z) {
3826
- const g = rt[x ? "legend-container" : "legend-container-sm"], y = rt[x ? "legend-container-active" : "legend-container-active-sm"], b = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
3825
+ const V = x ? 80 : 50, Q = function(z) {
3826
+ const y = rt[x ? "legend-container" : "legend-container-sm"], g = rt[x ? "legend-container-active" : "legend-container-active-sm"], _ = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
3827
3827
  return `
3828
- ${A.includes(z) ? e ? y : b : g}
3828
+ ${A.includes(z) ? e ? g : _ : y}
3829
3829
  legend-item
3830
3830
  `;
3831
3831
  };
3832
3832
  P.selectAll(".legend-item").data([...M], (z) => z).join(
3833
3833
  (z) => {
3834
- const g = z.append("div").attr("class", Q).style("left", (y, b) => `${b * F}px`).style("top", "-53px").style("opacity", 0);
3835
- return g.append("div").attr("class", rt["legend-rect"]).style("background", (y) => {
3836
- if (!e && A.includes(y))
3837
- return Ft;
3838
- const b = N.current.findIndex((v) => v === y) + n;
3839
- return xt(b);
3840
- }), g.append("span").attr("class", rt["legend-label"]).style("color", (y) => !e && A.includes(y) ? "#d1d5db" : "#333").text((y) => y), g.transition().duration(E).style("top", "0px").style("opacity", 1), g;
3834
+ const y = z.append("div").attr("class", Q).style("left", (g, _) => `${_ * V}px`).style("top", "-53px").style("opacity", 0);
3835
+ return y.append("div").attr("class", rt["legend-rect"]).style("background", (g) => {
3836
+ if (!e && A.includes(g))
3837
+ return Vt;
3838
+ const _ = N.current.findIndex((b) => b === g) + n;
3839
+ return xt(_);
3840
+ }), y.append("span").attr("class", rt["legend-label"]).style("color", (g) => !e && A.includes(g) ? "#d1d5db" : "#333").text((g) => g), y.transition().duration(E).style("top", "0px").style("opacity", 1), y;
3841
3841
  },
3842
- (z) => (z.attr("class", Q).transition().duration(E).style("top", "0px").style("left", (g, y) => `${y * F}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (g) => {
3843
- if (!e && A.includes(g))
3844
- return Ft;
3845
- const y = N.current.findIndex((b) => b === g) + n;
3846
- return xt(y);
3847
- }), z.select(`.${rt["legend-label"]}`).style("color", (g) => !e && A.includes(g) ? Ft : "#333").text((g) => g), z),
3848
- (z) => z.style("color", Ft).transition().duration(E).style("opacity", 0).style("top", "53px").remove()
3849
- ).on("mouseover", function(z, g) {
3850
- q || W(g);
3851
- }).on("mouseout", function(z, g) {
3852
- q || (W(""), V && J(!1));
3853
- }).on("click", (z, g) => {
3854
- O((y) => {
3855
- let b = [];
3856
- return e ? y[0] === g ? b = ["all"] : b = [g] : y.includes(g) ? b = y.filter((v) => v !== g) : b = [...y, g], b;
3842
+ (z) => (z.attr("class", Q).transition().duration(E).style("top", "0px").style("left", (y, g) => `${g * V}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (y) => {
3843
+ if (!e && A.includes(y))
3844
+ return Vt;
3845
+ const g = N.current.findIndex((_) => _ === y) + n;
3846
+ return xt(g);
3847
+ }), z.select(`.${rt["legend-label"]}`).style("color", (y) => !e && A.includes(y) ? Vt : "#333").text((y) => y), z),
3848
+ (z) => z.style("color", Vt).transition().duration(E).style("opacity", 0).style("top", "53px").remove()
3849
+ ).on("mouseover", function(z, y) {
3850
+ q || W(y);
3851
+ }).on("mouseout", function(z, y) {
3852
+ q || (W(""), F && J(!1));
3853
+ }).on("click", (z, y) => {
3854
+ O((g) => {
3855
+ let _ = [];
3856
+ return e ? g[0] === y ? _ = ["all"] : _ = [y] : g.includes(y) ? _ = g.filter((b) => b !== y) : _ = [...g, y], _;
3857
3857
  }), J(!0);
3858
3858
  });
3859
3859
  }, [...d, M, q]), m = /* @__PURE__ */ H.jsxs(
3860
3860
  "div",
3861
3861
  {
3862
3862
  ref: l,
3863
- className: `${et[x ? "controls-container" : "controls-container-sm"]} ${L ? et["fill-container"] : ""}`,
3863
+ className: `${nt[x ? "controls-container" : "controls-container-sm"]} ${L ? nt["fill-container"] : ""}`,
3864
3864
  children: [
3865
- /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
3865
+ /* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], style: { paddingRight: "12px" }, children: [
3866
3866
  /* @__PURE__ */ H.jsx(
3867
3867
  "input",
3868
3868
  {
3869
3869
  type: "checkbox",
3870
- className: et["controls-checkbox"],
3870
+ className: nt["controls-checkbox"],
3871
3871
  checked: B,
3872
3872
  onChange: (P) => C(P.target.checked)
3873
3873
  }
@@ -3885,8 +3885,8 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3885
3885
  ]
3886
3886
  }
3887
3887
  ), D = Et((P) => {
3888
- if (_ === 0 || j === 0 || Z !== "" && q) return;
3889
- const F = { top: 20, right: 20, bottom: 30, left: 40 }, Q = e ? M : M.filter(($) => !A.includes($));
3888
+ if (v === 0 || j === 0 || Z !== "" && q) return;
3889
+ const V = { top: 20, right: 20, bottom: 30, left: 40 }, Q = e ? M : M.filter(($) => !A.includes($));
3890
3890
  R.forEach(($) => {
3891
3891
  const G = Q.reduce((X, gt) => {
3892
3892
  const bt = $[gt];
@@ -3896,14 +3896,14 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3896
3896
  });
3897
3897
  const tt = R, z = B ? Mt(tt).sort(function($, G) {
3898
3898
  return e ? A[0] === "all" ? $.total - G.total : Number($[A[0]]) - Number(G[A[0]]) : $.total - G.total;
3899
- }) : tt, g = _ - F.left - F.right, y = j - F.top - F.bottom, b = P.select("svg"), v = b.node(), U = b.select(".plot-area").attr("transform", "translate(" + F.left + "," + F.top + ")"), nt = Ye(P).style("opacity", 0);
3899
+ }) : tt, y = v - V.left - V.right, g = j - V.top - V.bottom, _ = P.select("svg"), b = _.node(), U = _.select(".plot-area").attr("transform", "translate(" + V.left + "," + V.top + ")"), et = Ye(P).style("opacity", 0);
3900
3900
  let ot = !1;
3901
3901
  K === null && (ot = !0, T(Mt(R)));
3902
- const lt = z.map(function($) {
3902
+ const ct = z.map(function($) {
3903
3903
  return $.label;
3904
- }), pt = $e().domain(lt).rangeRound(r === "vertical" ? [0, g] : [y, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), ft = e ? A[0] === "all" ? Yt(R, ($) => $.total) : Yt(R, ($) => $[A[0]]) : Yt(R, ($) => $.total), ut = le().domain([0, ft ?? 0]).range(r === "vertical" ? [y, 0] : [0, g]), _t = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ot = [], Be = r === "vertical" ? Gt(pt).tickValues(pt.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-y);
3905
- U.select(".x-axis").attr("transform", `translate(0,${y})`).transition().duration(E).call(Be).selectAll("text").style("cursor", "pointer").attr("dy", x ? "1em" : ".20em").attr("dx", x ? "0em" : "-.8em").attr("class", _t).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
3906
- const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-g) : Zt(pt).tickSizeOuter(0);
3904
+ }), ht = $e().domain(ct).rangeRound(r === "vertical" ? [0, y] : [g, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), lt = e ? A[0] === "all" ? Yt(R, ($) => $.total) : Yt(R, ($) => $[A[0]]) : Yt(R, ($) => $.total), ut = le().domain([0, lt ?? 0]).range(r === "vertical" ? [g, 0] : [0, y]), _t = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ot = [], Be = r === "vertical" ? Gt(ht).tickValues(ht.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-g);
3905
+ U.select(".x-axis").attr("transform", `translate(0,${g})`).transition().duration(E).call(Be).selectAll("text").style("cursor", "pointer").attr("dy", x ? "1em" : ".20em").attr("dx", x ? "0em" : "-.8em").attr("class", _t).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
3906
+ const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-y) : Zt(ht).tickSizeOuter(0);
3907
3907
  U.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(ot ? 0 : E).call(de).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
3908
3908
  const Qt = bn().keys(Q)(z).map(($) => {
3909
3909
  const G = $.key, X = $.map((gt) => {
@@ -3923,9 +3923,9 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3923
3923
  if (Z !== "")
3924
3924
  if (e) {
3925
3925
  if (A[0] === "all")
3926
- return X.key === Z || V ? 1 : 0.25;
3926
+ return X.key === Z || F ? 1 : 0.25;
3927
3927
  } else
3928
- return V ? 1 : X.key === Z ? 0.25 : 1;
3928
+ return F ? 1 : X.key === Z ? 0.25 : 1;
3929
3929
  return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
3930
3930
  }).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
3931
3931
  ($) => $.transition().duration(E).attr("fill", (X) => {
@@ -3935,14 +3935,14 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3935
3935
  if (Z !== "")
3936
3936
  if (e) {
3937
3937
  if (A[0] === "all")
3938
- return X.key === Z || V ? 1 : 0.25;
3938
+ return X.key === Z || F ? 1 : 0.25;
3939
3939
  } else
3940
- return V ? 1 : X.key === Z ? 0.25 : 1;
3940
+ return F ? 1 : X.key === Z ? 0.25 : 1;
3941
3941
  return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
3942
3942
  }).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
3943
- ($) => $.transition().duration(E).attr("fill", Ft).style("opacity", 0).selectAll("rect").attr("y", y).attr("height", 0).remove()
3944
- ), Kt = ($) => pt($.data.label + "") ?? 0, Ut = pt.bandwidth(), qt = ($) => {
3945
- const G = r === "vertical" ? y : g;
3943
+ ($) => $.transition().duration(E).attr("fill", Vt).style("opacity", 0).selectAll("rect").attr("y", g).attr("height", 0).remove()
3944
+ ), Kt = ($) => ht($.data.label + "") ?? 0, Ut = ht.bandwidth(), qt = ($) => {
3945
+ const G = r === "vertical" ? g : y;
3946
3946
  return ot ? 0 : A[0] === "all" ? ut(r === "vertical" ? $[1] : $[0]) : (
3947
3947
  /*d.key.startsWith(plotted)
3948
3948
  ?*/
@@ -3966,15 +3966,15 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3966
3966
  ($) => $.data.label
3967
3967
  // unique key per bar
3968
3968
  ).join(
3969
- ($) => $.append("rect").attr("class", `rect ${et.rect}`).attr("x", function(X) {
3969
+ ($) => $.append("rect").attr("class", `rect ${nt.rect}`).attr("x", function(X) {
3970
3970
  return r === "vertical" ? Tt(X) : ut(0);
3971
3971
  }).attr("width", function(X) {
3972
3972
  return r === "vertical" ? $t(X) : 0;
3973
3973
  }).attr("y", (X) => {
3974
3974
  if (r === "vertical") {
3975
- if (!Ot.includes(X.data.label)) return y;
3976
- const gt = A[0] === "all" ? ut(X[1]) : X.key.startsWith(A[0]) ? y - (ut(X[0]) - ut(X[1])) : ut(X[1]), bt = ut(X[0]) - ut(X[1]), Ne = isNaN(bt) || bt < 0 ? 0 : bt, ia = gt + Ne;
3977
- return ot ? y - (F.bottom + F.top) : ia;
3975
+ if (!Ot.includes(X.data.label)) return g;
3976
+ const gt = A[0] === "all" ? ut(X[1]) : X.key.startsWith(A[0]) ? g - (ut(X[0]) - ut(X[1])) : ut(X[1]), bt = ut(X[0]) - ut(X[1]), Ne = isNaN(bt) || bt < 0 ? 0 : bt, ia = gt + Ne;
3977
+ return ot ? g - (V.bottom + V.top) : ia;
3978
3978
  } else
3979
3979
  return Y(X);
3980
3980
  }).attr("height", function(X) {
@@ -3982,21 +3982,21 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
3982
3982
  }).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y),
3983
3983
  void 0,
3984
3984
  // no custom update handler
3985
- ($) => $.transition().duration(E).attr("opacity", 0).attr("y", y).attr("height", 0).remove()
3985
+ ($) => $.transition().duration(E).attr("opacity", 0).attr("y", g).attr("height", 0).remove()
3986
3986
  ).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y).on("start", function() {
3987
3987
  }).on("end", function() {
3988
3988
  }), Xt.selectAll("rect").on("mouseover", function($, G) {
3989
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? _t : "") + " " + rt.hoveredAxisText), nt.style("opacity", 1).select("p.title").text(G.data.label);
3989
+ dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? _t : "") + " " + rt.hoveredAxisText), et.style("opacity", 1).select("p.title").text(G.data.label);
3990
3990
  const X = G.data[G.barKey], { total: gt } = G.data;
3991
- nt.select("p.top-label").text(G.barKey + " : " + St(X, i)), nt.select("p.bottom-label").text(A[0] === "all" ? `Total : ${St(gt, i)}` : "~");
3991
+ et.select("p.top-label").text(G.barKey + " : " + St(X, i)), et.select("p.bottom-label").text(A[0] === "all" ? `Total : ${St(gt, i)}` : "~");
3992
3992
  }).on("touch", function($, G) {
3993
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label);
3993
+ dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label);
3994
3994
  }).on("mousemove", ($, G) => {
3995
- Rn(nt, { e: $, svg: v, yScale: ut });
3995
+ Rn(et, { e: $, svg: b, yScale: ut });
3996
3996
  }).on("mouseout", function($, G) {
3997
- ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label).attr("class", r === "vertical" ? _t : ""), nt.style("opacity", 0);
3997
+ dt(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label).attr("class", r === "vertical" ? _t : ""), et.style("opacity", 0);
3998
3998
  });
3999
- }, [...d, B, R, M, Z, V, q, r, i]);
3999
+ }, [...d, B, R, M, Z, F, q, r, i]);
4000
4000
  return /* @__PURE__ */ H.jsxs(
4001
4001
  "div",
4002
4002
  {
@@ -4008,21 +4008,21 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
4008
4008
  "div",
4009
4009
  {
4010
4010
  ref: f,
4011
- className: `${et["fill-container"]}`,
4011
+ className: `${nt["fill-container"]}`,
4012
4012
  style: { display: "flex", flexDirection: "column" },
4013
4013
  children: /* @__PURE__ */ H.jsxs(
4014
4014
  "div",
4015
4015
  {
4016
4016
  ref: D,
4017
- className: `${et["fill-container"]}`,
4017
+ className: `${nt["fill-container"]}`,
4018
4018
  style: { display: "flex", flexDirection: "column" },
4019
4019
  children: [
4020
4020
  /* @__PURE__ */ H.jsx(
4021
4021
  "svg",
4022
4022
  {
4023
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
4024
- viewBox: `0 0 ${_} ${j}`,
4025
- children: _ > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4023
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
4024
+ viewBox: `0 0 ${v} ${j}`,
4025
+ children: v > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4026
4026
  /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4027
4027
  /* @__PURE__ */ H.jsx("g", { className: `${r === "vertical" ? rt["value-axis"] : ""} y-axis` }),
4028
4028
  /* @__PURE__ */ H.jsx("g", { className: `${r === "horizontal" ? rt["value-axis"] : ""} x-axis` })
@@ -4040,7 +4040,7 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
4040
4040
  );
4041
4041
  }
4042
4042
  function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
4043
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(null), [T, q] = ct(!1), [k, A] = ct("all"), [O, V] = ct(!1), [J, Z] = ct(""), [W, B] = ct(!1), C = Tn(), L = t;
4043
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: v } = f, [j, K] = ft(null), [T, q] = ft(!1), [k, A] = ft("all"), [O, F] = ft(!1), [J, Z] = ft(""), [W, B] = ft(!1), C = Tn(), L = t;
4044
4044
  vt(() => {
4045
4045
  A("all"), q(!0), B(!1);
4046
4046
  }, [L]);
@@ -4053,30 +4053,30 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4053
4053
  clearTimeout(D);
4054
4054
  };
4055
4055
  }, [T]);
4056
- const E = [p, _, k, e], d = Mt(L), R = d.length === 0 ? [] : Object.keys(d[0]).filter((D) => D !== "label" && D !== "total"), M = Ae(R), N = p > 576, x = Et((D) => {
4056
+ const E = [p, v, k, e], d = Mt(L), R = d.length === 0 ? [] : Object.keys(d[0]).filter((D) => D !== "label" && D !== "total"), M = Ae(R), N = p > 576, x = Et((D) => {
4057
4057
  if (T) return;
4058
- const P = N ? 80 : 50, F = function(tt) {
4059
- const z = rt[N ? "legend-container" : "legend-container-sm"], g = rt[N ? "legend-container-active" : "legend-container-active-sm"], y = rt[N ? "legend-container-inactive" : "legend-container-inactive-sm"];
4058
+ const P = N ? 80 : 50, V = function(tt) {
4059
+ const z = rt[N ? "legend-container" : "legend-container-sm"], y = rt[N ? "legend-container-active" : "legend-container-active-sm"], g = rt[N ? "legend-container-inactive" : "legend-container-inactive-sm"];
4060
4060
  return `
4061
- ${k.includes(tt) ? k === tt ? g : y : z}
4061
+ ${k.includes(tt) ? k === tt ? y : g : z}
4062
4062
  legend-item
4063
4063
  `;
4064
4064
  };
4065
4065
  D.selectAll(".legend-item").data([...R], (tt) => tt).join(
4066
4066
  (tt) => {
4067
- const z = tt.append("div").attr("class", F).style("left", (g, y) => `${y * P}px`).style("top", "-53px").style("opacity", 0);
4068
- return z.append("div").attr("class", rt["legend-rect"]).style("background", (g) => {
4069
- const y = M.current.findIndex((b) => b === g) + e;
4070
- return xt(y);
4071
- }), z.append("span").attr("class", rt["legend-label"]).text((g) => g), z.transition().duration(w).style("top", "0px").style("opacity", 1), z;
4067
+ const z = tt.append("div").attr("class", V).style("left", (y, g) => `${g * P}px`).style("top", "-53px").style("opacity", 0);
4068
+ return z.append("div").attr("class", rt["legend-rect"]).style("background", (y) => {
4069
+ const g = M.current.findIndex((_) => _ === y) + e;
4070
+ return xt(g);
4071
+ }), z.append("span").attr("class", rt["legend-label"]).text((y) => y), z.transition().duration(w).style("top", "0px").style("opacity", 1), z;
4072
4072
  },
4073
- (tt) => (tt.attr("class", F).transition().duration(w).style("top", "0px").style("left", (z, g) => `${g * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (z) => {
4074
- const g = M.current.findIndex((y) => y === z) + e;
4075
- return xt(g);
4073
+ (tt) => (tt.attr("class", V).transition().duration(w).style("top", "0px").style("left", (z, y) => `${y * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (z) => {
4074
+ const y = M.current.findIndex((g) => g === z) + e;
4075
+ return xt(y);
4076
4076
  }), tt.select(`.${rt["legend-label"]}`).text((z) => z), tt),
4077
4077
  (tt) => tt.transition().duration(w).style("opacity", 0).style("top", "53px").remove().remove()
4078
4078
  ).on("click", (tt, z) => {
4079
- A((g) => g === z ? (B(!1), "all") : z);
4079
+ A((y) => y === z ? (B(!1), "all") : z);
4080
4080
  }).on("mouseover", (tt, z) => {
4081
4081
  Z(z);
4082
4082
  }).on("mouseout", (tt, z) => {
@@ -4086,14 +4086,14 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4086
4086
  "div",
4087
4087
  {
4088
4088
  ref: c,
4089
- className: `${et[N ? "controls-container" : "controls-container-sm"]} ${C ? et["fill-container"] : ""}`,
4089
+ className: `${nt[N ? "controls-container" : "controls-container-sm"]} ${C ? nt["fill-container"] : ""}`,
4090
4090
  children: [
4091
- /* @__PURE__ */ H.jsxs("label", { className: `${et["controls-label"]} ${k === "all" ? et.disabled : ""}`, style: { paddingRight: "12px" }, children: [
4091
+ /* @__PURE__ */ H.jsxs("label", { className: `${nt["controls-label"]} ${k === "all" ? nt.disabled : ""}`, style: { paddingRight: "12px" }, children: [
4092
4092
  /* @__PURE__ */ H.jsx(
4093
4093
  "input",
4094
4094
  {
4095
4095
  type: "checkbox",
4096
- className: `${et["controls-checkbox"]}`,
4096
+ className: `${nt["controls-checkbox"]}`,
4097
4097
  checked: W,
4098
4098
  onChange: (D) => B(D.target.checked),
4099
4099
  disabled: k === "all"
@@ -4112,7 +4112,7 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4112
4112
  ]
4113
4113
  }
4114
4114
  ), m = Et((D) => {
4115
- if (p === 0 || _ === 0 || J !== "" && T) return;
4115
+ if (p === 0 || v === 0 || J !== "" && T) return;
4116
4116
  const P = { top: 20, right: 30, bottom: 30, left: 40 };
4117
4117
  d.forEach(function(Y) {
4118
4118
  Y.total = R.reduce((it, st) => {
@@ -4120,22 +4120,22 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4120
4120
  return it + (typeof I == "number" ? I : Number(I));
4121
4121
  }, 0);
4122
4122
  });
4123
- const F = d, Q = W ? Mt(F).sort(function(Y, it) {
4123
+ const V = d, Q = W ? Mt(V).sort(function(Y, it) {
4124
4124
  return Number(Y[k]) - Number(it[k]);
4125
- }) : F, tt = p - P.left - P.right, z = _ - P.top - P.bottom, g = D.select("svg"), y = g.node(), b = g.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), v = Ye(D).style("opacity", 0);
4125
+ }) : V, tt = p - P.left - P.right, z = v - P.top - P.bottom, y = D.select("svg"), g = y.node(), _ = y.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), b = Ye(D).style("opacity", 0);
4126
4126
  j === null && K(Mt(d));
4127
- const U = k === "all", nt = !N && n === "vertical" ? rt.rotatedAxisText : rt.axisText, ot = Q.map(function(Y) {
4127
+ const U = k === "all", et = !N && n === "vertical" ? rt.rotatedAxisText : rt.axisText, ot = Q.map(function(Y) {
4128
4128
  return Y.label;
4129
- }), lt = $e().domain(ot).rangeRound(n === "vertical" ? [0, tt] : [z, 0]).paddingInner(U ? 0.15 : N ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), pt = k === "all" ? Yt(
4129
+ }), ct = $e().domain(ot).rangeRound(n === "vertical" ? [0, tt] : [z, 0]).paddingInner(U ? 0.15 : N ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), ht = k === "all" ? Yt(
4130
4130
  d,
4131
4131
  (Y) => Yt(
4132
4132
  Object.entries(Y).filter(([it]) => it !== "total" && it !== "label").map(([, it]) => it)
4133
4133
  // value is number | string | undefined
4134
4134
  )
4135
- ) : Yt(d, (Y) => Y[k]), ft = le().domain([0, pt ?? 0]).range(n === "vertical" ? [z, 0] : [0, tt]), ut = n === "vertical" ? Gt(lt).tickValues(lt.domain()).tickSizeOuter(0) : Gt(ft).ticks(4, "s").tickSizeOuter(0).tickSize(-z);
4136
- b.select(".x-axis").attr("transform", `translate(0,${z})`).transition().duration(w).call(ut).selectAll("text").style("cursor", "pointer").attr("dy", N ? "1em" : ".20em").attr("dx", N ? "0em" : "-.8em").attr("class", nt).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4137
- const _t = n === "vertical" ? Zt(ft).ticks(4, "s").tickSize(-tt) : Zt(lt).tickSizeOuter(0);
4138
- b.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(w).call(_t).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4135
+ ) : Yt(d, (Y) => Y[k]), lt = le().domain([0, ht ?? 0]).range(n === "vertical" ? [z, 0] : [0, tt]), ut = n === "vertical" ? Gt(ct).tickValues(ct.domain()).tickSizeOuter(0) : Gt(lt).ticks(4, "s").tickSizeOuter(0).tickSize(-z);
4136
+ _.select(".x-axis").attr("transform", `translate(0,${z})`).transition().duration(w).call(ut).selectAll("text").style("cursor", "pointer").attr("dy", N ? "1em" : ".20em").attr("dx", N ? "0em" : "-.8em").attr("class", et).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4137
+ const _t = n === "vertical" ? Zt(lt).ticks(4, "s").tickSize(-tt) : Zt(ct).tickSizeOuter(0);
4138
+ _.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(w).call(_t).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
4139
4139
  const Be = bn().keys(R)(Q).map(
4140
4140
  (Y) => {
4141
4141
  const it = Y.key, st = Y.map((I) => ({
@@ -4147,7 +4147,7 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4147
4147
  }
4148
4148
  ), de = (Y) => J !== "" ? `rect
4149
4149
  ${J === Y.barKey ? rt.rectLegendHovered : rt.rectLegendNotHovered}` : `rect ${rt.rect}`;
4150
- let pe = b.selectAll(".serie").data(Be, function(Y) {
4150
+ let pe = _.selectAll(".serie").data(Be, function(Y) {
4151
4151
  return Y.key;
4152
4152
  }).join(
4153
4153
  (Y) => Y.append("g").attr("class", "serie").attr("fill", function(st) {
@@ -4161,14 +4161,14 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4161
4161
  (Y) => Y.transition().duration(w).style("opacity", 0).attr("fill", "grey").selectAll("rect").attr("y", z).attr("height", 0).remove()
4162
4162
  );
4163
4163
  const Qt = (Y) => {
4164
- const it = lt(Y.data.label + "") ?? 0;
4164
+ const it = ct(Y.data.label + "") ?? 0;
4165
4165
  if (k === "all") {
4166
4166
  const st = R.indexOf(Y.barKey) || 0;
4167
- return it + st * (lt.bandwidth() / R.length);
4167
+ return it + st * (ct.bandwidth() / R.length);
4168
4168
  }
4169
4169
  return it;
4170
- }, Xt = () => k === "all" ? lt.bandwidth() / R.length : lt.bandwidth(), Kt = (Y) => n === "vertical" ? z - (ft(Y[0]) - ft(Y[1])) : ft(0), Ut = (Y) => {
4171
- const it = n === "vertical" ? ft(Y[0]) - ft(Y[1]) : ft(Y[1]) - ft(Y[0]);
4170
+ }, Xt = () => k === "all" ? ct.bandwidth() / R.length : ct.bandwidth(), Kt = (Y) => n === "vertical" ? z - (lt(Y[0]) - lt(Y[1])) : lt(0), Ut = (Y) => {
4171
+ const it = n === "vertical" ? lt(Y[0]) - lt(Y[1]) : lt(Y[1]) - lt(Y[0]);
4172
4172
  return isNaN(it) || it < 0 ? 0 : it;
4173
4173
  }, qt = (Y) => n === "vertical" ? Qt(Y) : Kt(Y), Lt = (Y) => n === "vertical" ? Xt() : Ut(Y), Tt = (Y) => n === "vertical" ? Kt(Y) : Qt(Y), $t = (Y) => n === "vertical" ? Ut(Y) : Xt();
4174
4174
  pe.selectAll("rect").data(
@@ -4180,27 +4180,27 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4180
4180
  return it = Y.append("rect").attr("class", de).attr("x", function(st) {
4181
4181
  return n === "vertical" ? qt(st) : 0;
4182
4182
  }).attr("width", function(st) {
4183
- return n === "vertical" ? k === "all" ? lt.bandwidth() / R.length : lt.bandwidth() : 0;
4183
+ return n === "vertical" ? k === "all" ? ct.bandwidth() / R.length : ct.bandwidth() : 0;
4184
4184
  }).attr("y", function(st) {
4185
4185
  return n === "vertical" ? z : Tt(st);
4186
4186
  }).attr("height", function(st) {
4187
- return n === "vertical" ? 0 : k === "all" ? lt.bandwidth() / R.length : lt.bandwidth();
4187
+ return n === "vertical" ? 0 : k === "all" ? ct.bandwidth() / R.length : ct.bandwidth();
4188
4188
  }).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), it;
4189
4189
  },
4190
4190
  void 0,
4191
- (Y) => Y.attr("fill", Ft).transition().duration(w).attr("opacity", 0).attr("height", 0).attr("y", z + P.bottom).remove()
4191
+ (Y) => Y.attr("fill", Vt).transition().duration(w).attr("opacity", 0).attr("height", 0).attr("y", z + P.bottom).remove()
4192
4192
  ).attr("class", de).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(Y, it) {
4193
- ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter(($) => $ === it.data.label).attr("class", (n === "vertical" ? nt : "") + " " + rt.hoveredAxisText), v.style("opacity", 1).select("p.title").text(it.data.label);
4193
+ dt(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter(($) => $ === it.data.label).attr("class", (n === "vertical" ? et : "") + " " + rt.hoveredAxisText), b.style("opacity", 1).select("p.title").text(it.data.label);
4194
4194
  const st = it.data[it.barKey], { total: I } = it.data, at = st / I * 100;
4195
- fe(".1f")(at) + "", v.select("p.top-label").text(it.barKey + " : " + St(st, r)), v.select("p.bottom-label").text(
4195
+ fe(".1f")(at) + "", b.select("p.top-label").text(it.barKey + " : " + St(st, r)), b.select("p.bottom-label").text(
4196
4196
  k === "all" ? `Total : ${St(I, r)}` : "~"
4197
4197
  );
4198
4198
  }).on("touch", function(Y, it) {
4199
- ht(".x-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", nt);
4199
+ dt(".x-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", et);
4200
4200
  }).on("mousemove", (Y, it) => {
4201
- Rn(v, { e: Y, svg: y, yScale: ft });
4201
+ Rn(b, { e: Y, svg: g, yScale: lt });
4202
4202
  }).on("mouseout", function(Y, it) {
4203
- ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? nt : ""), v.style("opacity", 0);
4203
+ dt(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? et : ""), b.style("opacity", 0);
4204
4204
  });
4205
4205
  }, [...E, W, d, R, J, O, n, T, r]);
4206
4206
  return /* @__PURE__ */ H.jsxs(
@@ -4214,20 +4214,20 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4214
4214
  "div",
4215
4215
  {
4216
4216
  ref: h,
4217
- className: `${et["fill-container"]}`,
4217
+ className: `${nt["fill-container"]}`,
4218
4218
  style: { display: "flex", flexDirection: "column" },
4219
4219
  children: /* @__PURE__ */ H.jsxs(
4220
4220
  "div",
4221
4221
  {
4222
4222
  ref: m,
4223
- className: `${et["fill-container"]}`,
4223
+ className: `${nt["fill-container"]}`,
4224
4224
  style: { display: "flex", flexDirection: "column" },
4225
4225
  children: [
4226
4226
  /* @__PURE__ */ H.jsx(
4227
4227
  "svg",
4228
4228
  {
4229
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
4230
- viewBox: `0 0 ${p} ${_}`,
4229
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
4230
+ viewBox: `0 0 ${p} ${v}`,
4231
4231
  children: p > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4232
4232
  /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4233
4233
  /* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
@@ -4246,9 +4246,9 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4246
4246
  );
4247
4247
  }
4248
4248
  function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
4249
- const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(""), [T, q] = ct(!0), [k, A] = ct(!1), [O, V] = ct("all"), J = Tn(), Z = t;
4249
+ const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: v } = f, [j, K] = ft(""), [T, q] = ft(!0), [k, A] = ft(!1), [O, F] = ft("all"), J = Tn(), Z = t;
4250
4250
  vt(() => {
4251
- V("all"), q(!0), A(!0);
4251
+ F("all"), q(!0), A(!0);
4252
4252
  }, [Z]);
4253
4253
  const W = 750;
4254
4254
  vt(() => {
@@ -4259,26 +4259,26 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4259
4259
  clearTimeout(N);
4260
4260
  };
4261
4261
  }, [k]);
4262
- const B = [p, _, O, e], C = Mt(Z), L = C.length === 0 ? [] : Object.keys(C[0]).filter((N) => N !== "label" && N !== "total"), w = Ae(L), E = p > 576, d = Et((N) => {
4262
+ const B = [p, v, O, e], C = Mt(Z), L = C.length === 0 ? [] : Object.keys(C[0]).filter((N) => N !== "label" && N !== "total"), w = Ae(L), E = p > 576, d = Et((N) => {
4263
4263
  if (k) return;
4264
4264
  const x = E ? 80 : 50, S = function(D) {
4265
- const P = rt[E ? "legend-container" : "legend-container-sm"], F = rt[E ? "legend-container-active" : "legend-container-active-sm"], Q = rt[E ? "legend-container-inactive" : "legend-container-inactive-sm"];
4265
+ const P = rt[E ? "legend-container" : "legend-container-sm"], V = rt[E ? "legend-container-active" : "legend-container-active-sm"], Q = rt[E ? "legend-container-inactive" : "legend-container-inactive-sm"];
4266
4266
  return `
4267
- ${O.includes(D) ? O === D ? F : Q : P}
4267
+ ${O.includes(D) ? O === D ? V : Q : P}
4268
4268
  legend-item
4269
4269
  `;
4270
4270
  };
4271
4271
  N.selectAll(".legend-item").data([...L], (D) => D).join(
4272
4272
  (D) => {
4273
- const P = D.append("div").attr("class", S).style("left", (F, Q) => `${Q * x}px`).style("top", "-53px").style("opacity", 0);
4274
- return P.append("div").attr("class", rt["legend-rect"]).style("background", (F) => {
4275
- const Q = w.current.findIndex((tt) => tt === F) + e;
4273
+ const P = D.append("div").attr("class", S).style("left", (V, Q) => `${Q * x}px`).style("top", "-53px").style("opacity", 0);
4274
+ return P.append("div").attr("class", rt["legend-rect"]).style("background", (V) => {
4275
+ const Q = w.current.findIndex((tt) => tt === V) + e;
4276
4276
  return xt(Q);
4277
- }), P.append("span").attr("class", rt["legend-label"]).text((F) => F), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
4277
+ }), P.append("span").attr("class", rt["legend-label"]).text((V) => V), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
4278
4278
  },
4279
- (D) => (D.attr("class", S).transition().duration(W).style("top", "0px").style("left", (P, F) => `${F * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
4280
- const F = w.current.findIndex((Q) => Q === P) + e;
4281
- return xt(F);
4279
+ (D) => (D.attr("class", S).transition().duration(W).style("top", "0px").style("left", (P, V) => `${V * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
4280
+ const V = w.current.findIndex((Q) => Q === P) + e;
4281
+ return xt(V);
4282
4282
  }), D.select(`.${rt["legend-label"]}`).text((P) => P), D),
4283
4283
  (D) => D.transition().duration(W).style("opacity", 0).style("top", "53px").remove().remove().remove()
4284
4284
  ).on("mouseover", (D, P) => {
@@ -4290,14 +4290,14 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4290
4290
  "div",
4291
4291
  {
4292
4292
  ref: c,
4293
- className: `${et["controls-container"]} ${J ? et["fill-container"] : ""}`,
4293
+ className: `${nt["controls-container"]} ${J ? nt["fill-container"] : ""}`,
4294
4294
  children: [
4295
- /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
4295
+ /* @__PURE__ */ H.jsxs("label", { className: nt["controls-label"], style: { paddingRight: "12px" }, children: [
4296
4296
  /* @__PURE__ */ H.jsx(
4297
4297
  "input",
4298
4298
  {
4299
4299
  type: "checkbox",
4300
- className: et["controls-checkbox"],
4300
+ className: nt["controls-checkbox"],
4301
4301
  checked: T,
4302
4302
  onChange: (N) => q(N.target.checked)
4303
4303
  }
@@ -4315,7 +4315,7 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4315
4315
  ]
4316
4316
  }
4317
4317
  ), M = Et((N) => {
4318
- if (p === 0 || _ === 0 || j !== "" && k) return;
4318
+ if (p === 0 || v === 0 || j !== "" && k) return;
4319
4319
  const x = { top: 20, right: 30, bottom: 30, left: 40 };
4320
4320
  C.forEach(function(I) {
4321
4321
  I.total = L.reduce((at, $) => {
@@ -4323,15 +4323,15 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4323
4323
  return at + (typeof G == "number" ? G : Number(G));
4324
4324
  }, 0);
4325
4325
  });
4326
- const m = C.filter((I) => I?.total && I.total > 0), D = p - x.left - x.right, P = _ - x.top - x.bottom, F = N.select("svg"), Q = F.node(), tt = F.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), z = Ye(N).style("opacity", 0), g = !E && n === "vertical" ? rt.rotatedAxisText : rt.axisText, y = m.map(function(I) {
4326
+ const m = C.filter((I) => I?.total && I.total > 0), D = p - x.left - x.right, P = v - x.top - x.bottom, V = N.select("svg"), Q = V.node(), tt = V.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), z = Ye(N).style("opacity", 0), y = !E && n === "vertical" ? rt.rotatedAxisText : rt.axisText, g = m.map(function(I) {
4327
4327
  return I.label;
4328
- }), b = $e().domain(y).rangeRound(n === "vertical" ? [0, D] : [P, 0]).paddingInner(E ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), v = Yt(C, (I) => I.total), U = le().domain([0, T ? 1 : v || 0]).nice().range(n === "vertical" ? [P, 0] : [0, D]), nt = $e().rangeRound([0, D]).paddingInner(0.1).align(0.2), ot = m.map(function(I) {
4328
+ }), _ = $e().domain(g).rangeRound(n === "vertical" ? [0, D] : [P, 0]).paddingInner(E ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), b = Yt(C, (I) => I.total), U = le().domain([0, T ? 1 : b || 0]).nice().range(n === "vertical" ? [P, 0] : [0, D]), et = $e().rangeRound([0, D]).paddingInner(0.1).align(0.2), ot = m.map(function(I) {
4329
4329
  return I.label;
4330
4330
  });
4331
- nt.domain(ot);
4332
- const lt = [], pt = n === "vertical" ? Gt(b).tickValues(b.domain()).tickSizeOuter(0) : Gt(U).ticks(4, T ? ".0%" : "s").tickSizeOuter(0).tickSize(-P);
4333
- tt.select(".x-axis").attr("transform", `translate(0,${P})`).transition().duration(W).call(pt).selectAll("text").style("cursor", "pointer").attr("dy", E ? "1em" : ".20em").attr("dx", E ? "0em" : "-.8em").attr("class", g).selectAll(".tick").filter((I) => I === 0).select("line").remove();
4334
- const ft = Yt(C, (I) => I.total), ut = le().domain([0, T ? 1 : ft || 0]).nice().range([P, 0]), _t = n === "vertical" ? Zt(U).ticks(4, T ? ".0%" : "s").tickSize(-D) : Zt(b).tickSizeOuter(0);
4331
+ et.domain(ot);
4332
+ const ct = [], ht = n === "vertical" ? Gt(_).tickValues(_.domain()).tickSizeOuter(0) : Gt(U).ticks(4, T ? ".0%" : "s").tickSizeOuter(0).tickSize(-P);
4333
+ tt.select(".x-axis").attr("transform", `translate(0,${P})`).transition().duration(W).call(ht).selectAll("text").style("cursor", "pointer").attr("dy", E ? "1em" : ".20em").attr("dx", E ? "0em" : "-.8em").attr("class", y).selectAll(".tick").filter((I) => I === 0).select("line").remove();
4334
+ const lt = Yt(C, (I) => I.total), ut = le().domain([0, T ? 1 : lt || 0]).nice().range([P, 0]), _t = n === "vertical" ? Zt(U).ticks(4, T ? ".0%" : "s").tickSize(-D) : Zt(_).tickSizeOuter(0);
4335
4335
  tt.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(W).call(_t).selectAll(".tick").filter((I) => I === 0).select("line").remove();
4336
4336
  const Ot = bn().order(ir).offset($u), de = (T ? Ot.keys(L)(m) : bn().keys(L)(m)).map((I) => {
4337
4337
  const at = I.key, $ = I.map((G) => {
@@ -4355,9 +4355,9 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4355
4355
  const G = w.current.findIndex((X) => X === $.key) + e;
4356
4356
  return xt(G);
4357
4357
  }).style("opacity", 1).style("pointer-events", "auto"),
4358
- (I) => I.transition().duration(W).style("opacity", 0).attr("fill", Ft).selectAll("rect").attr("y", P).attr("height", 0).remove()
4358
+ (I) => I.transition().duration(W).style("opacity", 0).attr("fill", Vt).selectAll("rect").attr("y", P).attr("height", 0).remove()
4359
4359
  );
4360
- const Qt = (I) => b(I.data.label + "") ?? 0, Xt = b.bandwidth(), Kt = (I) => U(n === "vertical" ? I[1] : I[0]), Ut = (I) => {
4360
+ const Qt = (I) => _(I.data.label + "") ?? 0, Xt = _.bandwidth(), Kt = (I) => U(n === "vertical" ? I[1] : I[0]), Ut = (I) => {
4361
4361
  const at = n === "vertical" ? U(I[0]) - U(I[1]) : U(I[1]) - U(I[0]);
4362
4362
  return isNaN(at) || at < 0 ? 0 : at;
4363
4363
  }, qt = (I) => n === "vertical" ? Qt(I) : Kt(I), Lt = (I) => n === "vertical" ? Xt : Ut(I), Tt = (I) => n === "vertical" ? Kt(I) : Qt(I), $t = (I) => n === "vertical" ? Ut(I) : Xt;
@@ -4379,12 +4379,12 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4379
4379
  (I) => {
4380
4380
  let at;
4381
4381
  return at = I.append("rect").attr("class", st).attr("x", function($) {
4382
- return n === "vertical" ? nt($.data.label + "") ?? 0 : U(0);
4382
+ return n === "vertical" ? et($.data.label + "") ?? 0 : U(0);
4383
4383
  }).attr("width", function($) {
4384
- return n === "vertical" ? b.bandwidth() : 0;
4384
+ return n === "vertical" ? _.bandwidth() : 0;
4385
4385
  }).attr("y", function($) {
4386
4386
  if (n === "vertical") {
4387
- if (!lt.includes($.data.label + ""))
4387
+ if (!ct.includes($.data.label + ""))
4388
4388
  return P;
4389
4389
  const G = U($[1]), X = U($[0]) - U($[1]), gt = isNaN(X) || X < 0 ? 0 : X;
4390
4390
  return G + gt;
@@ -4397,17 +4397,17 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4397
4397
  void 0,
4398
4398
  (I) => I.transition().duration(W).attr("opacity", 0).attr("height", 0).attr("y", P).remove()
4399
4399
  ).attr("class", st).attr("stroke-dasharray", Y).attr("stroke-dashoffset", it).transition().duration(W).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(I, at) {
4400
- ht(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", g + " " + et.hoveredAxisText), z.style("opacity", 1).select("p.title").text(at.data.label);
4400
+ dt(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", y + " " + nt.hoveredAxisText), z.style("opacity", 1).select("p.title").text(at.data.label);
4401
4401
  const $ = at.data[at.barKey] || 0, G = at.data.total || 0, X = $ / G * 100, gt = fe(".1f")(X) + "%";
4402
4402
  z.select("p.top-label").text(at.barKey + " : " + (T ? gt : St($, r))), z.select("p.bottom-label").text(
4403
4403
  T ? `(${St($, r)} of ${St(G, r)})` : `Total : ${St(G, r)}`
4404
4404
  );
4405
4405
  }).on("touch", function(I, at) {
4406
- ht(".x-axis").selectAll("text").filter(($) => $ === at.data.label).attr("class", g);
4406
+ dt(".x-axis").selectAll("text").filter(($) => $ === at.data.label).attr("class", y);
4407
4407
  }).on("mousemove", (I, at) => {
4408
4408
  Rn(z, { e: I, svg: Q, yScale: ut });
4409
4409
  }).on("mouseout", function(I, at) {
4410
- ht(".x-axis").selectAll("text").filter(($) => $ === at.data.name).attr("class", g), z.style("opacity", 0);
4410
+ dt(".x-axis").selectAll("text").filter(($) => $ === at.data.name).attr("class", y), z.style("opacity", 0);
4411
4411
  });
4412
4412
  }, [...B, C, L, T, j, n, k, r]);
4413
4413
  return /* @__PURE__ */ H.jsxs(
@@ -4421,20 +4421,20 @@ function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
4421
4421
  "div",
4422
4422
  {
4423
4423
  ref: h,
4424
- className: `${et["fill-container"]}`,
4424
+ className: `${nt["fill-container"]}`,
4425
4425
  style: { display: "flex", flexDirection: "column" },
4426
4426
  children: /* @__PURE__ */ H.jsxs(
4427
4427
  "div",
4428
4428
  {
4429
4429
  ref: M,
4430
- className: `${et["fill-container"]}`,
4430
+ className: `${nt["fill-container"]}`,
4431
4431
  style: { display: "flex", flexDirection: "column" },
4432
4432
  children: [
4433
4433
  /* @__PURE__ */ H.jsx(
4434
4434
  "svg",
4435
4435
  {
4436
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
4437
- viewBox: `0 0 ${p} ${_}`,
4436
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
4437
+ viewBox: `0 0 ${p} ${v}`,
4438
4438
  children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
4439
4439
  /* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
4440
4440
  /* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
@@ -4476,7 +4476,7 @@ function Qu(t, e) {
4476
4476
  }
4477
4477
  return n;
4478
4478
  }
4479
- function Vn(t, e) {
4479
+ function Fn(t, e) {
4480
4480
  let n = 0;
4481
4481
  if (e === void 0)
4482
4482
  for (let r of t)
@@ -4505,7 +4505,7 @@ function ii(t, e) {
4505
4505
  function wn(t, e) {
4506
4506
  return t.y0 - e.y0;
4507
4507
  }
4508
- function Fn(t) {
4508
+ function Vn(t) {
4509
4509
  return t.value;
4510
4510
  }
4511
4511
  function ef(t) {
@@ -4533,34 +4533,34 @@ function si({ nodes: t }) {
4533
4533
  }
4534
4534
  function af() {
4535
4535
  let t = 0, e = 0, n = 1, r = 1, i = 24, a = 8, s, o = ef, c = tf, l, u, h = nf, f = rf, p = 6;
4536
- function _() {
4536
+ function v() {
4537
4537
  const d = { nodes: h.apply(null, arguments), links: f.apply(null, arguments) };
4538
4538
  return j(d), K(d), T(d), q(d), O(d), si(d), d;
4539
4539
  }
4540
- _.update = function(d) {
4540
+ v.update = function(d) {
4541
4541
  return si(d), d;
4542
- }, _.nodeId = function(d) {
4543
- return arguments.length ? (o = typeof d == "function" ? d : nn(d), _) : o;
4544
- }, _.nodeAlign = function(d) {
4545
- return arguments.length ? (c = typeof d == "function" ? d : nn(d), _) : c;
4546
- }, _.nodeSort = function(d) {
4547
- return arguments.length ? (l = d, _) : l;
4548
- }, _.nodeWidth = function(d) {
4549
- return arguments.length ? (i = +d, _) : i;
4550
- }, _.nodePadding = function(d) {
4551
- return arguments.length ? (a = s = +d, _) : a;
4552
- }, _.nodes = function(d) {
4553
- return arguments.length ? (h = typeof d == "function" ? d : nn(d), _) : h;
4554
- }, _.links = function(d) {
4555
- return arguments.length ? (f = typeof d == "function" ? d : nn(d), _) : f;
4556
- }, _.linkSort = function(d) {
4557
- return arguments.length ? (u = d, _) : u;
4558
- }, _.size = function(d) {
4559
- return arguments.length ? (t = e = 0, n = +d[0], r = +d[1], _) : [n - t, r - e];
4560
- }, _.extent = function(d) {
4561
- return arguments.length ? (t = +d[0][0], n = +d[1][0], e = +d[0][1], r = +d[1][1], _) : [[t, e], [n, r]];
4562
- }, _.iterations = function(d) {
4563
- return arguments.length ? (p = +d, _) : p;
4542
+ }, v.nodeId = function(d) {
4543
+ return arguments.length ? (o = typeof d == "function" ? d : nn(d), v) : o;
4544
+ }, v.nodeAlign = function(d) {
4545
+ return arguments.length ? (c = typeof d == "function" ? d : nn(d), v) : c;
4546
+ }, v.nodeSort = function(d) {
4547
+ return arguments.length ? (l = d, v) : l;
4548
+ }, v.nodeWidth = function(d) {
4549
+ return arguments.length ? (i = +d, v) : i;
4550
+ }, v.nodePadding = function(d) {
4551
+ return arguments.length ? (a = s = +d, v) : a;
4552
+ }, v.nodes = function(d) {
4553
+ return arguments.length ? (h = typeof d == "function" ? d : nn(d), v) : h;
4554
+ }, v.links = function(d) {
4555
+ return arguments.length ? (f = typeof d == "function" ? d : nn(d), v) : f;
4556
+ }, v.linkSort = function(d) {
4557
+ return arguments.length ? (u = d, v) : u;
4558
+ }, v.size = function(d) {
4559
+ return arguments.length ? (t = e = 0, n = +d[0], r = +d[1], v) : [n - t, r - e];
4560
+ }, v.extent = function(d) {
4561
+ return arguments.length ? (t = +d[0][0], n = +d[1][0], e = +d[0][1], r = +d[1][1], v) : [[t, e], [n, r]];
4562
+ }, v.iterations = function(d) {
4563
+ return arguments.length ? (p = +d, v) : p;
4564
4564
  };
4565
4565
  function j({ nodes: d, links: R }) {
4566
4566
  for (const [N, x] of d.entries())
@@ -4577,7 +4577,7 @@ function af() {
4577
4577
  }
4578
4578
  function K({ nodes: d }) {
4579
4579
  for (const R of d)
4580
- R.value = R.fixedValue === void 0 ? Math.max(Vn(R.sourceLinks, Fn), Vn(R.targetLinks, Fn)) : R.fixedValue;
4580
+ R.value = R.fixedValue === void 0 ? Math.max(Fn(R.sourceLinks, Vn), Fn(R.targetLinks, Vn)) : R.fixedValue;
4581
4581
  }
4582
4582
  function T({ nodes: d }) {
4583
4583
  const R = d.length;
@@ -4616,7 +4616,7 @@ function af() {
4616
4616
  return N;
4617
4617
  }
4618
4618
  function A(d) {
4619
- const R = Qu(d, (M) => (r - e - (M.length - 1) * s) / Vn(M, Fn));
4619
+ const R = Qu(d, (M) => (r - e - (M.length - 1) * s) / Fn(M, Vn));
4620
4620
  for (const M of d) {
4621
4621
  let N = e;
4622
4622
  for (const x of M) {
@@ -4637,10 +4637,10 @@ function af() {
4637
4637
  s = Math.min(a, (r - e) / (ni(R, (M) => M.length) - 1)), A(R);
4638
4638
  for (let M = 0; M < p; ++M) {
4639
4639
  const N = Math.pow(0.99, M), x = Math.max(1 - N, (M + 1) / p);
4640
- J(R, N, x), V(R, N, x);
4640
+ J(R, N, x), F(R, N, x);
4641
4641
  }
4642
4642
  }
4643
- function V(d, R, M) {
4643
+ function F(d, R, M) {
4644
4644
  for (let N = 1, x = d.length; N < x; ++N) {
4645
4645
  const S = d[N];
4646
4646
  for (const m of S) {
@@ -4650,8 +4650,8 @@ function af() {
4650
4650
  D += w(Q, m) * z, P += z;
4651
4651
  }
4652
4652
  if (!(P > 0)) continue;
4653
- let F = (D / P - m.y0) * R;
4654
- m.y0 += F, m.y1 += F, C(m);
4653
+ let V = (D / P - m.y0) * R;
4654
+ m.y0 += V, m.y1 += V, C(m);
4655
4655
  }
4656
4656
  l === void 0 && S.sort(wn), Z(S, M);
4657
4657
  }
@@ -4666,8 +4666,8 @@ function af() {
4666
4666
  D += E(m, Q) * z, P += z;
4667
4667
  }
4668
4668
  if (!(P > 0)) continue;
4669
- let F = (D / P - m.y0) * R;
4670
- m.y0 += F, m.y1 += F, C(m);
4669
+ let V = (D / P - m.y0) * R;
4670
+ m.y0 += V, m.y1 += V, C(m);
4671
4671
  }
4672
4672
  l === void 0 && S.sort(wn), Z(S, M);
4673
4673
  }
@@ -4725,7 +4725,7 @@ function af() {
4725
4725
  }
4726
4726
  return M;
4727
4727
  }
4728
- return _;
4728
+ return v;
4729
4729
  }
4730
4730
  var ar = Math.PI, sr = 2 * ar, re = 1e-6, sf = sr - re;
4731
4731
  function or() {
@@ -4761,7 +4761,7 @@ or.prototype = ra.prototype = {
4761
4761
  else if (h > re) if (!(Math.abs(u * o - c * l) > re) || !i)
4762
4762
  this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
4763
4763
  else {
4764
- var f = n - a, p = r - s, _ = o * o + c * c, j = f * f + p * p, K = Math.sqrt(_), T = Math.sqrt(h), q = i * Math.tan((ar - Math.acos((_ + h - j) / (2 * K * T))) / 2), k = q / T, A = q / K;
4764
+ var f = n - a, p = r - s, v = o * o + c * c, j = f * f + p * p, K = Math.sqrt(v), T = Math.sqrt(h), q = i * Math.tan((ar - Math.acos((v + h - j) / (2 * K * T))) / 2), k = q / T, A = q / K;
4765
4765
  Math.abs(k - 1) > re && (this._ += "L" + (t + k * l) + "," + (e + k * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = t + A * o) + "," + (this._y1 = e + A * c);
4766
4766
  }
4767
4767
  },
@@ -4834,142 +4834,146 @@ const mf = "_sankeyEnergyLink_10fud_285", xf = "_sankeyLabel_10fud_323", ci = {
4834
4834
  sankeyLabel: xf
4835
4835
  };
4836
4836
  function Sf({ data: t, tooltipFormat: e }) {
4837
- const [n, r] = ct(null), [i, a] = ct(!1), [s, o] = ct(!1), c = Pt(!0), l = Pt(!0), u = Pt("data"), [h, f] = he(), { width: p, height: _ } = f, j = Ae(n ? n.nodes.map((k) => k.name) : []);
4837
+ const [n, r] = ft(null), [i, a] = ft(!1), [s, o] = ft(!1), c = Pt(!0), l = Pt(!0), u = Pt("data"), [h, f] = he(), { width: p, height: v } = f, j = Ae(n ? n.nodes.map((k) => k.name) : []);
4838
4838
  vt(() => {
4839
4839
  r((k) => {
4840
- const A = k === null ? [] : k.nodes.map((V) => V.name), O = t.nodes.map((V) => V.name);
4841
- return c.current = O.every((V) => !A.includes(V)), k !== null && (l.current = !1), u.current = "data", t;
4840
+ const A = k === null ? [] : k.nodes.map((F) => F.name), O = t.nodes.map((F) => F.name);
4841
+ return c.current = O.every((F) => !A.includes(F)), k !== null && (l.current = !1), u.current = "data", t;
4842
4842
  }), s && o(!1), i && a(!1);
4843
4843
  }, [t]), vt(() => {
4844
- p !== 0 && _ !== 0 && (u.current = "dimension");
4845
- }, [p, _]);
4844
+ p !== 0 && v !== 0 && (u.current = "dimension");
4845
+ }, [p, v]);
4846
4846
  const K = p <= 768, T = 1e3, q = Et(
4847
4847
  (k) => {
4848
4848
  if (!n)
4849
4849
  return;
4850
- const A = p, O = _;
4850
+ const A = p, O = v;
4851
4851
  if (A === 0 || O === 0)
4852
4852
  return;
4853
- const V = { top: 30, right: 20, bottom: 20, left: 20 }, J = O - (V.top + V.bottom), Z = A - (V.left + V.right), W = J, B = Z, C = n.links.map((g) => ({ ...g })), L = n.nodes.map((g) => ({ ...g }));
4854
- C.forEach(function(g) {
4855
- const y = n.nodes[g.source].name, b = n.nodes[g.target].name, v = y + " → " + b;
4856
- g.sourceName = y, g.targetName = b, g.id = v;
4853
+ const F = { top: 30, right: 20, bottom: 20, left: 20 }, J = O - (F.top + F.bottom), Z = A - (F.left + F.right), W = J, B = Z, C = n.links.map((y) => ({ ...y })), L = n.nodes.map((y) => ({ ...y }));
4854
+ C.forEach(function(y) {
4855
+ const g = n.nodes[y.source].name, _ = n.nodes[y.target].name, b = g + " → " + _;
4856
+ y.sourceName = g, y.targetName = _, y.id = b;
4857
4857
  });
4858
4858
  const w = k.select("svg");
4859
4859
  w.node();
4860
- const E = w.select(".plot-area").attr("transform", "translate(" + V.left + "," + V.top + ")"), d = Ye(k).style("opacity", 0), R = (g) => {
4861
- const y = g.targetLinks?.reduce((v, U) => v + U.value, 0) ?? 0, b = g.sourceLinks?.reduce((v, U) => v + U.value, 0) ?? 0;
4862
- return { enteringValue: y, exitingValue: b };
4860
+ const E = w.select(".plot-area").attr("transform", "translate(" + F.left + "," + F.top + ")"), d = Ye(k).style("opacity", 0), R = (y) => {
4861
+ const g = y.targetLinks?.reduce((b, U) => b + U.value, 0) ?? 0, _ = y.sourceLinks?.reduce((b, U) => b + U.value, 0) ?? 0;
4862
+ return { enteringValue: g, exitingValue: _ };
4863
4863
  }, N = af().nodeSort(
4864
- s ? (g, y) => {
4865
- const { enteringValue: b, exitingValue: v } = R(g), { enteringValue: U, exitingValue: nt } = R(y);
4866
- return Math.max(b, v) - Math.max(U, nt);
4864
+ s ? (y, g) => {
4865
+ const { enteringValue: _, exitingValue: b } = R(y), { enteringValue: U, exitingValue: et } = R(g);
4866
+ return Math.max(_, b) - Math.max(U, et);
4867
4867
  } : null
4868
4868
  ).linkSort(
4869
- i ? (g, y) => g.value - y.value : null
4869
+ i ? (y, g) => y.value - g.value : null
4870
4870
  ).nodeWidth(B <= 540 ? 8 : B > 540 && B <= 768 ? 12 : 15).nodePadding(B <= 540 ? 5 : 8).extent([[0, 0], [B, W]])({
4871
- nodes: L.map((g) => Object.assign({}, g)),
4872
- links: C.map((g) => Object.assign({}, g))
4871
+ nodes: L.map((y) => Object.assign({}, y)),
4872
+ links: C.map((y) => Object.assign({}, y))
4873
4873
  }), { nodes: x, links: S } = N;
4874
4874
  E.selectAll("linearGradient").remove();
4875
- const m = E.selectAll("linearGradient").data(S).join("linearGradient").attr("id", (g, y) => y.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (g) => g.source.x0).attr("x2", (g) => g.target.x0);
4876
- m.append("stop").attr("offset", "0%").attr("stop-color", (g) => {
4877
- const y = j.current.findIndex((b) => b === g.sourceName);
4878
- return xt(y, !1);
4879
- }), m.append("stop").attr("offset", "100%").attr("stop-color", (g) => {
4880
- const y = j.current.findIndex((b) => b === g.targetName);
4881
- return xt(y, !1);
4875
+ const m = E.selectAll("linearGradient").data(S).join("linearGradient").attr("id", (y, g) => g.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (y) => y.source.x0).attr("x2", (y) => y.target.x0);
4876
+ m.append("stop").attr("offset", "0%").attr("stop-color", (y) => {
4877
+ const g = j.current.findIndex((_) => _ === y.sourceName);
4878
+ return xt(g, !1);
4879
+ }), m.append("stop").attr("offset", "100%").attr("stop-color", (y) => {
4880
+ const g = j.current.findIndex((_) => _ === y.targetName);
4881
+ return xt(g, !1);
4882
4882
  });
4883
- const D = (g) => {
4884
- const y = g.source, b = g.target, v = Math.abs(b.depth - y.depth);
4885
- return B * 1.5 * v;
4886
- }, P = (g) => D(g) + " " + D(g), F = (g) => !c.current || u.current !== "data" ? 0 : g.target.depth * T;
4887
- E.selectAll(".link").data(S, (g) => g.id).join(
4888
- (g) => g.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(y) {
4889
- return `url(#${m.filter((U) => U.sourceName === y.sourceName && U.targetName === y.targetName).node()?.id})`;
4890
- }).attr("stroke-dasharray", P).attr("stroke-dashoffset", D).attr("stroke-width", (y) => Math.max(1, y.width)).transition().duration(T).delay(function(y) {
4891
- return c.current ? F(y) : T;
4883
+ const D = (y) => {
4884
+ const g = y.source, _ = y.target, b = Math.abs(_.depth - g.depth);
4885
+ return B * 1.5 * b;
4886
+ }, P = (y) => D(y) + " " + D(y), V = (y) => !c.current || u.current !== "data" ? 0 : y.target.depth * T;
4887
+ E.selectAll(".link").data(S, (y) => y.id).join(
4888
+ (y) => y.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(g) {
4889
+ return `url(#${m.filter((U) => U.sourceName === g.sourceName && U.targetName === g.targetName).node()?.id})`;
4890
+ }).attr("stroke-dasharray", P).attr("stroke-dashoffset", D).attr("stroke-width", (g) => Math.max(1, g.width)).transition().duration(T).delay(function(g) {
4891
+ return c.current ? V(g) : T;
4892
4892
  }).attr("stroke-dashoffset", 0).on("end", function() {
4893
- ht(this).attr("stroke-dasharray", "none");
4893
+ dt(this).attr("stroke-dasharray", "none");
4894
4894
  }),
4895
- (g) => (g.attr("stroke-width", (y) => Math.max(1, y.width || 0)).transition().duration(T).delay(F).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
4896
- ht(this).attr("stroke-dasharray", "none");
4897
- }), g),
4898
- (g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
4899
- ).on("mouseover", (g, y) => {
4900
- E.selectAll("path.link").filter((b) => b.id !== y.id).style("stroke", "#1f2937").style("stroke-opacity", 0.15), E.selectAll("text.label").filter((b) => {
4901
- const v = b;
4902
- return v.name !== y.sourceName && v.name !== y.targetName;
4903
- }).style("opacity", 0), d.style("opacity", 1), d.select("p.title").text(y.id + St(y.value, e)), d.select("p.top-label").style("display", "none"), d.select("p.bottom-label").style("display", "none");
4904
- }).on("mousemove", (g, y) => {
4905
- ei(g, d);
4906
- }).on("mouseout", (g, y) => {
4907
- d.style("opacity", 0), E.selectAll("path.link").style("stroke", function(b) {
4908
- const v = b;
4909
- return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
4910
- }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
4895
+ (y) => (y.attr("stroke-width", (g) => Math.max(1, g.width || 0)).transition().duration(T).delay(V).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
4896
+ dt(this).attr("stroke-dasharray", "none");
4897
+ }), y),
4898
+ (y) => c.current ? y.remove() : y.transition().duration(T / 4).style("opacity", 0).remove()
4899
+ ).on("mouseover", (y, g) => {
4900
+ E.selectAll("path.link").filter((_) => _.id !== g.id).style("stroke", "#1f2937").style("stroke-opacity", 0.05), E.selectAll("text.label").filter((_) => {
4901
+ const b = _;
4902
+ return b.name !== g.sourceName && b.name !== g.targetName;
4903
+ }).style("opacity", 0), d.style("opacity", 1), d.select("p.title").text(g.id + St(g.value, e)), d.select("p.top-label").style("display", "none"), d.select("p.bottom-label").style("display", "none");
4904
+ }).on("mousemove", (y, g) => {
4905
+ ei(y, d);
4906
+ }).on("mouseout", (y, g) => {
4907
+ d.style("opacity", 0), E.selectAll("path.link").style("stroke", function(_) {
4908
+ const b = _;
4909
+ return `url(#${m.filter((ot) => ot.sourceName === b.sourceName && ot.targetName === b.targetName).node()?.id})`;
4910
+ }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${nt.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
4911
4911
  });
4912
- const Q = (g) => !c.current || g.depth === 0 || u.current !== "data" ? 0 : g.depth * T + T / 4, tt = (g) => {
4913
- const { enteringValue: y, exitingValue: b } = R(g);
4914
- return { nodeState: g.sourceLinks?.length === 0 && g.targetLinks?.length === 0 ? "stray node" : g.sourceLinks?.length === 0 ? "leaf node" : g.targetLinks?.length === 0 ? "source node" : y > b ? "surplus" : y < b ? "minus" : "balanced", enteringValue: y, exitingValue: b };
4915
- }, z = (g) => {
4916
- const { nodeState: y, enteringValue: b, exitingValue: v } = tt(g);
4917
- return { enteringValue: b, exitingValue: v, nodeState: y, stateColor: y === "surplus" ? "#4ade80" : y === "minus" ? "#f87171" : "#e7e7e7" };
4912
+ const Q = (y) => !c.current || y.depth === 0 || u.current !== "data" ? 0 : y.depth * T + T / 4, tt = (y) => {
4913
+ const { enteringValue: g, exitingValue: _ } = R(y);
4914
+ return { nodeState: y.sourceLinks?.length === 0 && y.targetLinks?.length === 0 ? "stray node" : y.sourceLinks?.length === 0 ? "leaf node" : y.targetLinks?.length === 0 ? "source node" : g > _ ? "surplus" : g < _ ? "minus" : "balanced", enteringValue: g, exitingValue: _ };
4915
+ }, z = (y) => {
4916
+ const { nodeState: g, enteringValue: _, exitingValue: b } = tt(y);
4917
+ return { enteringValue: _, exitingValue: b, nodeState: g, stateColor: g === "surplus" ? "#4ade80" : g === "minus" ? "#f87171" : "#e7e7e7" };
4918
4918
  };
4919
- E.selectAll("rect.node").data(x, ((g) => g.name)).join(
4920
- (g) => g.append("rect").attr("class", `node ${et.baseNode}`).attr("x", (y) => y.x0).attr("y", (y) => y.y0).attr("height", (y) => c.current ? Math.abs(y.y1 - y.y0) : 0).attr("width", (y) => c.current ? 0 : y.x1 - y.x0).attr("opacity", 0).attr("stroke-width", 2.5).transition().duration(T).delay(Q).attr("fill", (y) => {
4921
- const b = j.current.findIndex((v) => v === y.name);
4922
- return xt(b, !1);
4923
- }).attr("opacity", 1).attr("width", function(y) {
4924
- return y.x1 - y.x0;
4919
+ E.selectAll("rect.node").data(x, ((y) => y.name)).join(
4920
+ (y) => y.append("rect").attr("class", `node ${nt.baseNode}`).attr("x", (g) => g.x0).attr("y", (g) => g.y0).attr("height", (g) => c.current ? Math.abs(g.y1 - g.y0) : 0).attr("width", (g) => c.current ? 0 : g.x1 - g.x0).attr("opacity", 0).attr("stroke-width", 2.5).transition().duration(T).delay(Q).attr("fill", (g) => {
4921
+ const _ = j.current.findIndex((b) => b === g.name);
4922
+ return xt(_, !1);
4923
+ }).attr("opacity", 1).attr("width", function(g) {
4924
+ return g.x1 - g.x0;
4925
4925
  }),
4926
4926
  void 0,
4927
- (g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
4928
- ).on("mouseover", (g, y) => {
4929
- E.selectAll("path.link").filter((ot) => {
4930
- const lt = ot;
4931
- return !(lt.sourceName === y.name || lt.targetName === y.name);
4932
- }).style("stroke", "#1f2937").style("stroke-opacity", 0.1);
4933
- const { enteringValue: b, exitingValue: v, nodeState: U, stateColor: nt } = z(y);
4934
- d.style("opacity", 1), d.select("p.title").text(y.name + " :"), d.select("p.top-label").style("display", "block").text("in " + St(b, e)), d.select("p.bottom-label").style("display", "block").text("out " + St(v, e)), d.select("p.small-text").style("display", "block").text(`${U}`).style("color", `${nt}`);
4935
- }).on("mousemove", (g, y) => {
4936
- ei(g, d);
4937
- }).on("mouseout", (g, y) => {
4938
- d.style("opacity", 0), d.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(b) {
4939
- const v = b;
4940
- return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
4941
- }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`);
4942
- }).transition().duration(T).delay(Q).attr("stroke-width", K ? 2 : 2.5).style("stroke", function(g) {
4943
- const { stateColor: y, nodeState: b } = z(g);
4944
- return b === "surplus" || b === "minus" ? y : "#52525b";
4945
- }).attr("opacity", 1).attr("x", (g) => g.x0).attr("y", (g) => g.y0).attr("height", (g) => Math.abs(g.y1 - g.y0)).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => {
4946
- const y = j.current.findIndex((b) => b === g.name);
4947
- return xt(y, !1);
4948
- }), E.selectAll("text.label").data(x, (g) => g.name).join(
4949
- (g) => g.append("text").attr("class", `label ${ci.sankeyLabel}`).attr("x", (y) => y.x0 < B / 2 ? y.x1 + 6 : y.x0 - 6).attr("y", (y) => (y.y1 + y.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (y) => y.x0 < B / 2 ? "start" : "end").style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").style("stroke", "#eff1f4").text((y) => y.name).attr("opacity", 0),
4927
+ (y) => c.current ? y.remove() : y.transition().duration(T / 4).style("opacity", 0).remove()
4928
+ ).on("mouseover", (y, g) => {
4929
+ E.selectAll("path.link").filter((lt) => {
4930
+ const ut = lt;
4931
+ return !(ut.sourceName === g.name || ut.targetName === g.name);
4932
+ }).style("stroke", "#1f2937").style("stroke-opacity", 0.05);
4933
+ const _ = g.sourceLinks?.map((lt) => lt.targetName) ?? [], U = [...g.targetLinks?.map((lt) => lt.sourceName) ?? [], ..._, g.name];
4934
+ E.selectAll("text.label").filter((lt) => !U.includes(lt.name)).style("opacity", 0.0625);
4935
+ const { enteringValue: et, exitingValue: ot, nodeState: ct, stateColor: ht } = z(g);
4936
+ d.style("opacity", 1), d.select("p.title").text(g.name + " :"), d.select("p.top-label").style("display", "block").text("in " + St(et, e)), d.select("p.bottom-label").style("display", "block").text("out " + St(ot, e)), d.select("p.small-text").style("display", "block").text(`${ct}`).style("color", `${ht}`);
4937
+ }).on("mousemove", (y, g) => {
4938
+ ei(y, d);
4939
+ }).on("mouseout", (y, g) => {
4940
+ d.style("opacity", 0), d.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(et) {
4941
+ const ot = et;
4942
+ return `url(#${m.filter((lt) => lt.sourceName === ot.sourceName && lt.targetName === ot.targetName).node()?.id})`;
4943
+ }).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${nt.sankeyEnergyLink}`);
4944
+ const _ = g.sourceLinks?.map((et) => et.targetName) ?? [], U = [...g.targetLinks?.map((et) => et.sourceName) ?? [], ..._, g.name];
4945
+ E.selectAll("text.label").filter((et) => !U.includes(et.name)).style("opacity", 1);
4946
+ }).transition().duration(T).delay(Q).attr("stroke-width", K ? 2 : 2.5).style("stroke", function(y) {
4947
+ const { stateColor: g, nodeState: _ } = z(y);
4948
+ return _ === "surplus" || _ === "minus" ? g : "#52525b";
4949
+ }).attr("opacity", 1).attr("x", (y) => y.x0).attr("y", (y) => y.y0).attr("height", (y) => Math.abs(y.y1 - y.y0)).attr("width", (y) => y.x1 - y.x0).attr("fill", (y) => {
4950
+ const g = j.current.findIndex((_) => _ === y.name);
4951
+ return xt(g, !1);
4952
+ }), E.selectAll("text.label").data(x, (y) => y.name).join(
4953
+ (y) => y.append("text").attr("class", `label ${ci.sankeyLabel}`).attr("x", (g) => g.x0 < B / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (g) => g.x0 < B / 2 ? "start" : "end").style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").style("stroke", "#eff1f4").text((g) => g.name).attr("opacity", 0),
4950
4954
  void 0,
4951
- (g) => g.remove()
4952
- ).style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").transition().duration(T).delay(Q).attr("x", (g) => g.x0 < B / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (g) => g.x0 < B / 2 ? "start" : "end").attr("opacity", 1);
4955
+ (y) => y.remove()
4956
+ ).style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").transition().duration(T).delay(Q).attr("x", (y) => y.x0 < B / 2 ? y.x1 + 6 : y.x0 - 6).attr("y", (y) => (y.y1 + y.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (y) => y.x0 < B / 2 ? "start" : "end").attr("opacity", 1);
4953
4957
  },
4954
- [n, i, s, p, _, e]
4958
+ [n, i, s, p, v, e]
4955
4959
  );
4956
4960
  return /* @__PURE__ */ H.jsx(
4957
4961
  "div",
4958
4962
  {
4959
4963
  ref: h,
4960
- style: { width: p, height: _, display: "flex", flexDirection: "column" },
4964
+ style: { width: p, height: v, display: "flex", flexDirection: "column" },
4961
4965
  children: /* @__PURE__ */ H.jsxs(
4962
4966
  "div",
4963
4967
  {
4964
4968
  ref: q,
4965
- className: `${et["fill-container"]}`,
4969
+ className: `${nt["fill-container"]}`,
4966
4970
  style: { display: "flex", flexDirection: "column", position: "relative" },
4967
4971
  children: [
4968
4972
  /* @__PURE__ */ H.jsx(
4969
4973
  "svg",
4970
4974
  {
4971
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
4972
- viewBox: `0 0 ${p} ${_}`,
4975
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
4976
+ viewBox: `0 0 ${p} ${v}`,
4973
4977
  children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
4974
4978
  }
4975
4979
  ),
@@ -4987,13 +4991,13 @@ function Sf({ data: t, tooltipFormat: e }) {
4987
4991
  /* @__PURE__ */ H.jsxs(
4988
4992
  "label",
4989
4993
  {
4990
- className: et["controls-label"],
4994
+ className: nt["controls-label"],
4991
4995
  children: [
4992
4996
  /* @__PURE__ */ H.jsx(
4993
4997
  "input",
4994
4998
  {
4995
4999
  type: "checkbox",
4996
- className: et["controls-checkbox"],
5000
+ className: nt["controls-checkbox"],
4997
5001
  checked: i,
4998
5002
  onChange: (k) => {
4999
5003
  const A = k.target.checked;
@@ -5008,13 +5012,13 @@ function Sf({ data: t, tooltipFormat: e }) {
5008
5012
  /* @__PURE__ */ H.jsxs(
5009
5013
  "label",
5010
5014
  {
5011
- className: et["controls-label"],
5015
+ className: nt["controls-label"],
5012
5016
  children: [
5013
5017
  /* @__PURE__ */ H.jsx(
5014
5018
  "input",
5015
5019
  {
5016
5020
  type: "checkbox",
5017
- className: et["controls-checkbox"],
5021
+ className: nt["controls-checkbox"],
5018
5022
  checked: s,
5019
5023
  onChange: (k) => {
5020
5024
  const A = k.target.checked;
@@ -5038,27 +5042,27 @@ function Sf({ data: t, tooltipFormat: e }) {
5038
5042
  }
5039
5043
  const ee = {};
5040
5044
  function Mf({ data: t, tooltipFormat: e }) {
5041
- const [n, r] = ct(null), [i, a] = ct({ name: "", value: 0 }), [s, o] = ct({ name: "", value: 0 }), c = Pt(!0), [l, u] = he(), { width: h, height: f } = u, p = Pt(null), _ = Pt(null);
5045
+ const [n, r] = ft(null), [i, a] = ft({ name: "", value: 0 }), [s, o] = ft({ name: "", value: 0 }), c = Pt(!0), [l, u] = he(), { width: h, height: f } = u, p = Pt(null), v = Pt(null);
5042
5046
  vt(() => {
5043
- if (!_.current || !p.current) return;
5047
+ if (!v.current || !p.current) return;
5044
5048
  const T = p.current;
5045
5049
  function q(A, O) {
5046
- const V = Math.max(A.length, O.length);
5050
+ const F = Math.max(A.length, O.length);
5047
5051
  return function(J) {
5048
5052
  let Z = "";
5049
- for (let W = 0; W < V; W++)
5053
+ for (let W = 0; W < F; W++)
5050
5054
  Z += J < 0.5 ? A[W] ?? "" : O[W] ?? "";
5051
5055
  return Z;
5052
5056
  };
5053
5057
  }
5054
- ht(T).transition().duration(250).tween("text", function() {
5058
+ dt(T).transition().duration(250).tween("text", function() {
5055
5059
  const A = q(s.name, i.name);
5056
5060
  return function(O) {
5057
5061
  T.textContent = A(O);
5058
5062
  };
5059
5063
  });
5060
- const k = _.current;
5061
- ht(k).transition().duration(250).ease(tc).tween("text", function() {
5064
+ const k = v.current;
5065
+ dt(k).transition().duration(250).ease(tc).tween("text", function() {
5062
5066
  const A = Nt(s.value, i.value);
5063
5067
  return function(O) {
5064
5068
  k.textContent = St(Math.round(A(O)), e).toLocaleString();
@@ -5074,113 +5078,113 @@ function Mf({ data: t, tooltipFormat: e }) {
5074
5078
  const q = h, k = f, A = 12, O = 1.5;
5075
5079
  if (q === 0 || k === 0)
5076
5080
  return;
5077
- const V = 25, J = k - V * 2, Z = q - V * 2, W = J, B = Z, C = { name: "branches", children: n }, L = Math.min(B, W), w = pr(C).sum(function(y) {
5078
- return y.value;
5079
- }).sort(function(y, b) {
5080
- return y.value - b.value;
5081
+ const F = 25, J = k - F * 2, Z = q - F * 2, W = J, B = Z, C = { name: "branches", children: n }, L = Math.min(B, W), w = pr(C).sum(function(g) {
5082
+ return g.value;
5083
+ }).sort(function(g, _) {
5084
+ return g.value - _.value;
5081
5085
  }), E = Qc().size([L - 20, L - 20]).padding(2);
5082
5086
  let d = w, R = 1, M = 1;
5083
- const N = E(w), x = N.descendants(), S = [N.x, N.y, N.r * 2 + V], m = ht("#tooltip").style("opacity", 0), D = T.select("svg");
5087
+ const N = E(w), x = N.descendants(), S = [N.x, N.y, N.r * 2 + F], m = dt("#tooltip").style("opacity", 0), D = T.select("svg");
5084
5088
  D.node();
5085
- const P = D.select(".plot-area").attr("transform", "translate(" + q / 2 + "," + k / 2 + ")"), F = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Q = P.selectAll("circle").data(x, (y) => y.data.name).join(
5086
- (y) => y.append("circle").attr("class", function(b) {
5087
- return b.parent ? b.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
5088
- }).style("fill", function(b) {
5089
- return b.children ? F(b.depth) : "#f0fdfa";
5090
- }).style("cursor", "pointer").transition().duration(j).attr("r", function(b) {
5091
- const v = L / S[2];
5092
- return b.r * v;
5093
- }).attr("cx", function(b) {
5094
- const v = L / S[2];
5095
- return (b.x - S[0]) * v;
5096
- }).attr("cy", function(b) {
5097
- const v = L / S[2];
5098
- return (b.y - S[1]) * v;
5099
- }).style("stroke", "#737373").style("stroke-width", O * M).style("fill", function(b) {
5100
- return b.children ? F(b.depth) : "#f0fdfa";
5089
+ const P = D.select(".plot-area").attr("transform", "translate(" + q / 2 + "," + k / 2 + ")"), V = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Q = P.selectAll("circle").data(x, (g) => g.data.name).join(
5090
+ (g) => g.append("circle").attr("class", function(_) {
5091
+ return _.parent ? _.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
5092
+ }).style("fill", function(_) {
5093
+ return _.children ? V(_.depth) : "#f0fdfa";
5094
+ }).style("cursor", "pointer").transition().duration(j).attr("r", function(_) {
5095
+ const b = L / S[2];
5096
+ return _.r * b;
5097
+ }).attr("cx", function(_) {
5098
+ const b = L / S[2];
5099
+ return (_.x - S[0]) * b;
5100
+ }).attr("cy", function(_) {
5101
+ const b = L / S[2];
5102
+ return (_.y - S[1]) * b;
5103
+ }).style("stroke", "#737373").style("stroke-width", O * M).style("fill", function(_) {
5104
+ return _.children ? V(_.depth) : "#f0fdfa";
5101
5105
  }),
5102
- (y) => y.transition().duration(j).attr("cx", function(b) {
5103
- const v = L / S[2];
5104
- return (b.x - S[0]) * v;
5105
- }).attr("cy", function(b) {
5106
- const v = L / S[2];
5107
- return (b.y - S[1]) * v;
5108
- }).attr("r", function(b) {
5109
- const v = L / S[2];
5110
- return b.r * v;
5111
- }).style("stroke", function(b) {
5106
+ (g) => g.transition().duration(j).attr("cx", function(_) {
5107
+ const b = L / S[2];
5108
+ return (_.x - S[0]) * b;
5109
+ }).attr("cy", function(_) {
5110
+ const b = L / S[2];
5111
+ return (_.y - S[1]) * b;
5112
+ }).attr("r", function(_) {
5113
+ const b = L / S[2];
5114
+ return _.r * b;
5115
+ }).style("stroke", function(_) {
5112
5116
  return "#737373";
5113
- }).style("stroke-width", O * M).style("fill", function(b) {
5114
- return b.children ? F(b.depth) : "#f0fdfa";
5117
+ }).style("stroke-width", O * M).style("fill", function(_) {
5118
+ return _.children ? V(_.depth) : "#f0fdfa";
5115
5119
  }),
5116
- (y) => y.transition().duration(j).style("opacity", 0).remove()
5117
- ).on("mouseover", function(y, b) {
5118
- d.parent === b ? tt.filter(function(v) {
5119
- return v.parent === d || this.style.display === "inline";
5120
- }).style("font-size", A * M).style("fill-opacity", function(v) {
5121
- return v.parent === d ? 1 : 0;
5122
- }).style("display", function(v) {
5123
- return v.parent === d ? "inline" : "none";
5124
- }) : b === d ? tt.filter(function(v) {
5125
- return v.parent === d || this.style.display === "inline";
5126
- }).style("font-size", A * M).style("fill-opacity", function(v) {
5127
- return v.parent === d ? 1 : 0;
5128
- }).style("display", function(v) {
5129
- return v.parent === d ? "inline" : "none";
5130
- }) : (tt.filter(function(v) {
5131
- return v.data.name != b.data.name;
5132
- }).style("fill-opacity", 0).style("display", "none"), tt.filter(function(v) {
5133
- return v.data.name === b.data.name;
5134
- }).style("fill-opacity", 1).style("display", "inline")), ht(this).style("stroke"), b != w && ht(this).style("stroke-width", O * M * 2.5).style("stroke", "#e4e4e7"), m.transition().duration(250).style("opacity", 1), a((v) => (o(v), { name: b.data.name === "branches" ? "Total" : b.data.name, value: b.value ? b.value : 0 }));
5135
- }).on("mouseout", function(y, b) {
5136
- tt.filter(function(v) {
5137
- return v.parent === d || this.style.display === "inline";
5138
- }).style("fill-opacity", function(v) {
5139
- return v.parent === d ? 1 : 0;
5140
- }).style("display", function(v) {
5141
- return v.parent === d ? "inline" : "none";
5142
- }), ht(this).style("stroke-width", O * M).style("stroke", function(v) {
5120
+ (g) => g.transition().duration(j).style("opacity", 0).remove()
5121
+ ).on("mouseover", function(g, _) {
5122
+ d.parent === _ ? tt.filter(function(b) {
5123
+ return b.parent === d || this.style.display === "inline";
5124
+ }).style("font-size", A * M).style("fill-opacity", function(b) {
5125
+ return b.parent === d ? 1 : 0;
5126
+ }).style("display", function(b) {
5127
+ return b.parent === d ? "inline" : "none";
5128
+ }) : _ === d ? tt.filter(function(b) {
5129
+ return b.parent === d || this.style.display === "inline";
5130
+ }).style("font-size", A * M).style("fill-opacity", function(b) {
5131
+ return b.parent === d ? 1 : 0;
5132
+ }).style("display", function(b) {
5133
+ return b.parent === d ? "inline" : "none";
5134
+ }) : (tt.filter(function(b) {
5135
+ return b.data.name != _.data.name;
5136
+ }).style("fill-opacity", 0).style("display", "none"), tt.filter(function(b) {
5137
+ return b.data.name === _.data.name;
5138
+ }).style("fill-opacity", 1).style("display", "inline")), dt(this).style("stroke"), _ != w && dt(this).style("stroke-width", O * M * 2.5).style("stroke", "#e4e4e7"), m.transition().duration(250).style("opacity", 1), a((b) => (o(b), { name: _.data.name === "branches" ? "Total" : _.data.name, value: _.value ? _.value : 0 }));
5139
+ }).on("mouseout", function(g, _) {
5140
+ tt.filter(function(b) {
5141
+ return b.parent === d || this.style.display === "inline";
5142
+ }).style("fill-opacity", function(b) {
5143
+ return b.parent === d ? 1 : 0;
5144
+ }).style("display", function(b) {
5145
+ return b.parent === d ? "inline" : "none";
5146
+ }), dt(this).style("stroke-width", O * M).style("stroke", function(b) {
5143
5147
  return "#737373";
5144
5148
  }), m.transition().duration(250).style("opacity", 0);
5145
- }).on("click", function(y, b) {
5146
- if (b === w) {
5147
- g();
5149
+ }).on("click", function(g, _) {
5150
+ if (_ === w) {
5151
+ y();
5148
5152
  return;
5149
5153
  }
5150
- d != b ? z(b) : g(), Q.style("stroke-width", O * M), y.stopPropagation();
5151
- }), tt = P.selectAll("text").data(x, function(y) {
5152
- return y.data.name;
5154
+ d != _ ? z(_) : y(), Q.style("stroke-width", O * M), g.stopPropagation();
5155
+ }), tt = P.selectAll("text").data(x, function(g) {
5156
+ return g.data.name;
5153
5157
  }).join(
5154
- (y) => y.append("text").attr("class", ee.circle_pack_label).text(function(b) {
5155
- return b.data.name;
5156
- }).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(j).attr("transform", function(b) {
5157
- const v = L / S[2];
5158
- return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
5159
- }).style("fill-opacity", function(b) {
5160
- return b.parent === w ? 1 : 0;
5161
- }).style("display", function(b) {
5162
- return b.parent === w ? "inline" : "none";
5158
+ (g) => g.append("text").attr("class", ee.circle_pack_label).text(function(_) {
5159
+ return _.data.name;
5160
+ }).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(j).attr("transform", function(_) {
5161
+ const b = L / S[2];
5162
+ return "translate(" + (_.x - S[0]) * b + "," + (_.y - S[1]) * b + ")";
5163
+ }).style("fill-opacity", function(_) {
5164
+ return _.parent === w ? 1 : 0;
5165
+ }).style("display", function(_) {
5166
+ return _.parent === w ? "inline" : "none";
5163
5167
  }),
5164
- (y) => y.attr("class", ee.circle_pack_label).transition().duration(j).attr("transform", function(b) {
5165
- const v = L / S[2];
5166
- return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
5167
- }).style("fill-opacity", function(b) {
5168
- return b.parent === w ? 1 : 0;
5169
- }).style("display", function(b) {
5170
- return b.parent === w ? "inline" : "none";
5168
+ (g) => g.attr("class", ee.circle_pack_label).transition().duration(j).attr("transform", function(_) {
5169
+ const b = L / S[2];
5170
+ return "translate(" + (_.x - S[0]) * b + "," + (_.y - S[1]) * b + ")";
5171
+ }).style("fill-opacity", function(_) {
5172
+ return _.parent === w ? 1 : 0;
5173
+ }).style("display", function(_) {
5174
+ return _.parent === w ? "inline" : "none";
5171
5175
  }),
5172
- (y) => y.transition().duration(j).style("opacity", 0).remove()
5176
+ (g) => g.transition().duration(j).style("opacity", 0).remove()
5173
5177
  );
5174
5178
  tt.raise();
5175
- function z(y) {
5176
- d = y;
5177
- const b = L / 2 - V, v = q / 2, U = k / 2, nt = L / S[2], ot = (
5179
+ function z(g) {
5180
+ d = g;
5181
+ const _ = L / 2 - F, b = q / 2, U = k / 2, et = L / S[2], ot = (
5178
5182
  /*currentData==="---"?Math.max((d.r * k),0.25):*/
5179
- y.r * nt
5183
+ g.r * et
5180
5184
  );
5181
- M = ot / b, R = b / ot;
5182
- const lt = (y.x - S[0]) * nt, pt = v - lt * R, ft = (y.y - S[0]) * nt, ut = U - ft * R;
5183
- P.transition().duration(1e3).attr("transform", "translate(" + pt + "," + ut + ")scale(" + R + ")"), tt.style("font-size", A * M + "px").filter(function(_t) {
5185
+ M = ot / _, R = _ / ot;
5186
+ const ct = (g.x - S[0]) * et, ht = b - ct * R, lt = (g.y - S[0]) * et, ut = U - lt * R;
5187
+ P.transition().duration(1e3).attr("transform", "translate(" + ht + "," + ut + ")scale(" + R + ")"), tt.style("font-size", A * M + "px").filter(function(_t) {
5184
5188
  return _t.parent === d || this.style.display === "inline";
5185
5189
  }).style("fill-opacity", function(_t) {
5186
5190
  return _t.parent === d ? 1 : 0;
@@ -5188,13 +5192,13 @@ function Mf({ data: t, tooltipFormat: e }) {
5188
5192
  return _t.parent === d ? "inline" : "none";
5189
5193
  });
5190
5194
  }
5191
- function g() {
5192
- P.transition().duration(1e3).attr("transform", "translate(" + q / 2 + ", " + k / 2 + ")scale(1)"), d = w, R = 1, M = 1, tt.style("font-size", A * M + "px").filter(function(y) {
5193
- return y.parent === d || this.style.display === "inline";
5194
- }).style("fill-opacity", function(y) {
5195
- return y.parent === d ? 1 : 0;
5196
- }).style("display", function(y) {
5197
- return y.parent === d ? "inline" : "none";
5195
+ function y() {
5196
+ P.transition().duration(1e3).attr("transform", "translate(" + q / 2 + ", " + k / 2 + ")scale(1)"), d = w, R = 1, M = 1, tt.style("font-size", A * M + "px").filter(function(g) {
5197
+ return g.parent === d || this.style.display === "inline";
5198
+ }).style("fill-opacity", function(g) {
5199
+ return g.parent === d ? 1 : 0;
5200
+ }).style("display", function(g) {
5201
+ return g.parent === d ? "inline" : "none";
5198
5202
  });
5199
5203
  }
5200
5204
  },
@@ -5209,13 +5213,13 @@ function Mf({ data: t, tooltipFormat: e }) {
5209
5213
  "div",
5210
5214
  {
5211
5215
  ref: K,
5212
- className: `${et["fill-container"]}`,
5216
+ className: `${nt["fill-container"]}`,
5213
5217
  style: { display: "flex", flexDirection: "column", position: "relative" },
5214
5218
  children: [
5215
5219
  /* @__PURE__ */ H.jsx(
5216
5220
  "svg",
5217
5221
  {
5218
- className: `${et["chart-svg"]} ${et["fill-container"]}`,
5222
+ className: `${nt["chart-svg"]} ${nt["fill-container"]}`,
5219
5223
  viewBox: `0 0 ${h} ${f}`,
5220
5224
  children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
5221
5225
  }
@@ -5236,7 +5240,7 @@ function Mf({ data: t, tooltipFormat: e }) {
5236
5240
  },
5237
5241
  children: [
5238
5242
  /* @__PURE__ */ H.jsx("p", { ref: p, id: "name", children: "Test tooltip" }),
5239
- /* @__PURE__ */ H.jsx("p", { ref: _, id: "value", children: "Test tooltip" })
5243
+ /* @__PURE__ */ H.jsx("p", { ref: v, id: "value", children: "Test tooltip" })
5240
5244
  ]
5241
5245
  }
5242
5246
  )