katucharts.js 0.2.11 → 0.2.12

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.
@@ -1264,7 +1264,7 @@ const Sg = /* @__PURE__ */ lg(
1264
1264
  /* @__PURE__ */ ug(3)
1265
1265
  );
1266
1266
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1267
- const Le = (n, t, e) => wi(n, t, e), gf = vc, mf = wc, Wl = (...n) => cg(...n), _g = (n) => kc(n), Cg = ff, Pg = (n) => hg(n), zo = /* @__PURE__ */ BigInt(0), Ma = /* @__PURE__ */ BigInt(1);
1267
+ const Ie = (n, t, e) => wi(n, t, e), gf = vc, mf = wc, Wl = (...n) => cg(...n), _g = (n) => kc(n), Cg = ff, Pg = (n) => hg(n), zo = /* @__PURE__ */ BigInt(0), Ma = /* @__PURE__ */ BigInt(1);
1268
1268
  function Bo(n, t = "") {
1269
1269
  if (typeof n != "boolean") {
1270
1270
  const e = t && `"${t}" `;
@@ -1314,7 +1314,7 @@ function $g(n, t) {
1314
1314
  return xf(n, t).reverse();
1315
1315
  }
1316
1316
  function Lg(n, t) {
1317
- if (n = Le(n), t = Le(t), n.length !== t.length)
1317
+ if (n = Ie(n), t = Ie(t), n.length !== t.length)
1318
1318
  return !1;
1319
1319
  let e = 0;
1320
1320
  for (let i = 0; i < n.length; i++)
@@ -1322,7 +1322,7 @@ function Lg(n, t) {
1322
1322
  return e === 0;
1323
1323
  }
1324
1324
  function Sa(n) {
1325
- return Uint8Array.from(Le(n));
1325
+ return Uint8Array.from(Ie(n));
1326
1326
  }
1327
1327
  const vo = (n) => typeof n == "bigint" && zo <= n;
1328
1328
  function Ig(n, t, e) {
@@ -1603,7 +1603,7 @@ class Cf {
1603
1603
  return this.isLE ? $g(t, this.BYTES) : xf(t, this.BYTES);
1604
1604
  }
1605
1605
  fromBytes(t, e = !1) {
1606
- Le(t);
1606
+ Ie(t);
1607
1607
  const { _lengths: i, BYTES: r, isLE: o, ORDER: s, _mod: a } = this;
1608
1608
  if (i) {
1609
1609
  if (t.length < 1 || !i.includes(t.length) || t.length > r)
@@ -1842,7 +1842,7 @@ function Zg(n, t = {}) {
1842
1842
  // Uses algo from RFC8032 5.1.3.
1843
1843
  static fromBytes(m, x = !1) {
1844
1844
  const v = r.BYTES, { a: b, d: k } = s;
1845
- m = Sa(Le(m, v, "point")), Bo(x, "zip215");
1845
+ m = Sa(Ie(m, v, "point")), Bo(x, "zip215");
1846
1846
  const M = Sa(m), C = m[v - 1];
1847
1847
  M[v - 1] = C & -129;
1848
1848
  const L = Or(M), _ = x ? l : r.ORDER;
@@ -2076,8 +2076,8 @@ function Kg(n, t, e = {}) {
2076
2076
  }
2077
2077
  function y(E) {
2078
2078
  const P = C.secretKey;
2079
- Le(E, C.secretKey, "secretKey");
2080
- const S = Le(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), $ = p(w);
2079
+ Ie(E, C.secretKey, "secretKey");
2080
+ const S = Ie(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), $ = p(w);
2081
2081
  return { head: w, prefix: A, scalar: $ };
2082
2082
  }
2083
2083
  function g(E) {
@@ -2089,22 +2089,22 @@ function Kg(n, t, e = {}) {
2089
2089
  }
2090
2090
  function x(E = Uint8Array.of(), ...P) {
2091
2091
  const S = Wl(...P);
2092
- return p(i(d(S, Le(E, void 0, "context"), !!o)));
2092
+ return p(i(d(S, Ie(E, void 0, "context"), !!o)));
2093
2093
  }
2094
2094
  function v(E, P, S = {}) {
2095
- E = Le(E, void 0, "message"), o && (E = o(E));
2095
+ E = Ie(E, void 0, "message"), o && (E = o(E));
2096
2096
  const { prefix: w, scalar: A, pointBytes: $ } = g(P), R = x(S.context, w, E), F = s.multiply(R).toBytes(), D = x(S.context, F, $, E), z = l.create(R + D * A);
2097
2097
  if (!l.isValid(z))
2098
2098
  throw new Error("sign failed: invalid s");
2099
2099
  const B = Wl(F, l.toBytes(z));
2100
- return Le(B, C.signature, "result");
2100
+ return Ie(B, C.signature, "result");
2101
2101
  }
2102
2102
  const b = {
2103
2103
  zip215: r.zip215
2104
2104
  };
2105
2105
  function k(E, P, S, w = b) {
2106
2106
  const { context: A } = w, $ = w.zip215 === void 0 ? !!b.zip215 : w.zip215, R = C.signature;
2107
- E = Le(E, R, "signature"), P = Le(P, void 0, "message"), S = Le(S, C.publicKey, "publicKey"), $ !== void 0 && Bo($, "zip215"), o && (P = o(P));
2107
+ E = Ie(E, R, "signature"), P = Ie(P, void 0, "message"), S = Ie(S, C.publicKey, "publicKey"), $ !== void 0 && Bo($, "zip215"), o && (P = o(P));
2108
2108
  const F = R / 2, D = E.subarray(0, F), z = Or(E.subarray(F, R));
2109
2109
  let B, H, J;
2110
2110
  try {
@@ -2124,7 +2124,7 @@ function Kg(n, t, e = {}) {
2124
2124
  seed: M
2125
2125
  };
2126
2126
  function L(E) {
2127
- return E = E === void 0 ? f(C.seed) : E, Le(E, C.seed, "seed");
2127
+ return E = E === void 0 ? f(C.seed) : E, Ie(E, C.seed, "seed");
2128
2128
  }
2129
2129
  function _(E) {
2130
2130
  return Cg(E) && E.length === C.secretKey;
@@ -2159,7 +2159,7 @@ function Kg(n, t, e = {}) {
2159
2159
  },
2160
2160
  toMontgomerySecret(E) {
2161
2161
  const P = C.secretKey;
2162
- Le(E, P);
2162
+ Ie(E, P);
2163
2163
  const S = i(E.subarray(0, P));
2164
2164
  return u(S).subarray(0, P);
2165
2165
  }
@@ -7423,43 +7423,43 @@ class Uc {
7423
7423
  const F = [];
7424
7424
  T.forEach((ot, q) => {
7425
7425
  var ne;
7426
- const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
7426
+ const st = ot.series, wt = ot.color, Pt = ot.isLine, kt = ot.label;
7427
7427
  let _t, Vt;
7428
7428
  if (P) {
7429
- const $t = q % S, Kt = Math.floor(q / S), le = S * w, Ve = Math.max(0, (L - le) / 2);
7430
- _t = o + Ve + $t * w, Vt = C + Kt * _ + d;
7429
+ const Tt = q % S, Kt = Math.floor(q / S), le = S * w, Ve = Math.max(0, (L - le) / 2);
7430
+ _t = o + Ve + Tt * w, Vt = C + Kt * _ + d;
7431
7431
  } else if (r === "horizontal") {
7432
- const $t = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + $t;
7432
+ const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
7433
7433
  q > 0 && b + Kt > L && (b = o, k += _), _t = b, Vt = k + d, M = Math.max(M, b + Kt), b += Kt + f;
7434
7434
  } else {
7435
- const $t = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + $t;
7435
+ const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
7436
7436
  _t = b, Vt = k + d, M = Math.max(M, b + Kt), b = o, k += _;
7437
7437
  }
7438
7438
  const Nt = this.group.append("g").attr("class", "katucharts-legend-item").attr("transform", `translate(${_t},${Vt})`).style("cursor", "pointer"), Ot = st.getLegendSymbolShape();
7439
- if (Ct)
7439
+ if (Pt)
7440
7440
  Nt.append("line").attr("x1", 0).attr("x2", s).attr("y1", 6).attr("y2", 6).attr("stroke", wt).attr("stroke-width", 2), Nt.append("circle").attr("cx", s / 2).attr("cy", 6).attr("r", 3).attr("fill", wt);
7441
7441
  else if (Ot) {
7442
- const $t = s / 2, Kt = a / 2, le = Math.min(s, a) / 2;
7443
- Ot === "circle" ? Nt.append("circle").attr("cx", $t).attr("cy", Kt).attr("r", le).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${$t} 0 L ${s} ${Kt} L ${$t} ${a} L 0 ${Kt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${$t} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${$t} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Kt} L ${s} ${Kt} M ${$t} 0 L ${$t} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", $t).attr("cy", Kt).attr("r", le).attr("fill", wt);
7442
+ const Tt = s / 2, Kt = a / 2, le = Math.min(s, a) / 2;
7443
+ Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Kt} L ${Tt} ${a} L 0 ${Kt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Kt} L ${s} ${Kt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt);
7444
7444
  } else h ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("rx", c).attr("fill", wt) : Nt.append("circle").attr("cx", s / 2).attr("cy", a / 2).attr("r", Math.min(s, a) / 2).attr("fill", wt);
7445
7445
  const Zt = Nt.append("text").attr("x", s + l).attr("y", 10).attr("fill", st.visible ? u.color || this.autoText() : ((ne = this.config.itemHiddenStyle) == null ? void 0 : ne.color) || "#cccccc").attr("font-size", v).attr("font-weight", u.fontWeight || "normal").text(kt);
7446
7446
  this.config.rtl && (Zt.attr("text-anchor", "end").attr("x", -l), Nt.select("rect, circle, line").attr("transform", `translate(${-(s + l)}, 0)`)), Nt.on("click", () => {
7447
7447
  var le, Ve, he;
7448
- const $t = this.config.events;
7449
- if ($t != null && $t.itemClick && $t.itemClick.call(st, new Event("legendItemClick")) === !1)
7448
+ const Tt = this.config.events;
7449
+ if (Tt != null && Tt.itemClick && Tt.itemClick.call(st, new Event("legendItemClick")) === !1)
7450
7450
  return;
7451
7451
  st.toggleVisible(), Zt.attr(
7452
7452
  "fill",
7453
7453
  st.visible ? u.color || this.autoText() : ((le = this.config.itemHiddenStyle) == null ? void 0 : le.color) || "#cccccc"
7454
7454
  ), ((he = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : he.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
7455
7455
  }), Nt.on("mouseover", () => {
7456
- var $t;
7457
- Zt.attr("fill", (($t = this.config.itemHoverStyle) == null ? void 0 : $t.color) || this.autoText()), this.events.emit("legend:itemHover", st);
7456
+ var Tt;
7457
+ Zt.attr("fill", ((Tt = this.config.itemHoverStyle) == null ? void 0 : Tt.color) || this.autoText()), this.events.emit("legend:itemHover", st);
7458
7458
  }), Nt.on("mouseout", () => {
7459
- var $t;
7459
+ var Tt;
7460
7460
  Zt.attr(
7461
7461
  "fill",
7462
- st.visible ? u.color || this.autoText() : (($t = this.config.itemHiddenStyle) == null ? void 0 : $t.color) || "#cccccc"
7462
+ st.visible ? u.color || this.autoText() : ((Tt = this.config.itemHiddenStyle) == null ? void 0 : Tt.color) || "#cccccc"
7463
7463
  ), this.events.emit("legend:itemLeave");
7464
7464
  }), F.push(Nt);
7465
7465
  });
@@ -7472,11 +7472,11 @@ class Uc {
7472
7472
  D = q.width, z = q.height;
7473
7473
  const st = T.length ? Math.max(0, M - o) : 0, wt = Math.max(st, D);
7474
7474
  B = o + Math.max(0, (wt - D) / 2), this.group.select(".katucharts-bubble-legend").attr("transform", `translate(${B},0)`);
7475
- const Ct = Math.max(0, (wt - st) / 2);
7476
- if (Ct > 0)
7475
+ const Pt = Math.max(0, (wt - st) / 2);
7476
+ if (Pt > 0)
7477
7477
  for (const kt of F) {
7478
7478
  const _t = /translate\(\s*([-\d.]+)\s*,\s*([-\d.]+)\s*\)/.exec(kt.attr("transform") || "");
7479
- _t && kt.attr("transform", `translate(${parseFloat(_t[1]) + Ct},${_t[2]})`);
7479
+ _t && kt.attr("transform", `translate(${parseFloat(_t[1]) + Pt},${_t[2]})`);
7480
7480
  }
7481
7481
  } else {
7482
7482
  r === "horizontal" ? (B = T.length ? M + f : o, H = C) : (B = o, H = T.length ? k + 6 : C);
@@ -7485,15 +7485,15 @@ class Uc {
7485
7485
  }
7486
7486
  const X = (ot, q = !1) => {
7487
7487
  const st = ot * A, wt = st + A;
7488
- F.forEach((Ct, kt) => {
7488
+ F.forEach((Pt, kt) => {
7489
7489
  const _t = Math.floor(kt / S);
7490
7490
  if (_t >= st && _t < wt) {
7491
- const Nt = kt % S, Ot = S * w, Zt = Math.max(0, (L - Ot) / 2), ne = o + Zt + Nt * w, $t = C + (_t - st) * _ + (this.config.itemMarginTop ?? 0);
7492
- Ct.style("display", "block"), q ? Ct.style("opacity", "0").attr("transform", `translate(${ne},${$t})`).transition().duration(250).style("opacity", "1") : Ct.attr("transform", `translate(${ne},${$t})`).style("opacity", "1");
7491
+ const Nt = kt % S, Ot = S * w, Zt = Math.max(0, (L - Ot) / 2), ne = o + Zt + Nt * w, Tt = C + (_t - st) * _ + (this.config.itemMarginTop ?? 0);
7492
+ Pt.style("display", "block"), q ? Pt.style("opacity", "0").attr("transform", `translate(${ne},${Tt})`).transition().duration(250).style("opacity", "1") : Pt.attr("transform", `translate(${ne},${Tt})`).style("opacity", "1");
7493
7493
  } else
7494
- q ? Ct.transition().duration(150).style("opacity", "0").on("end", function() {
7495
- Ct.style("display", "none");
7496
- }) : Ct.style("display", "none");
7494
+ q ? Pt.transition().duration(150).style("opacity", "0").on("end", function() {
7495
+ Pt.style("display", "none");
7496
+ }) : Pt.style("display", "none");
7497
7497
  });
7498
7498
  };
7499
7499
  let j, W;
@@ -7501,13 +7501,13 @@ class Uc {
7501
7501
  const ot = Math.min(R, A);
7502
7502
  if (j = L + o * 2, W = C + ot * _ + o, R > A) {
7503
7503
  X(0);
7504
- const q = Math.ceil(R / A), st = L - 20, wt = C + Math.min(R, A) * _ / 2, Ct = this.group.append("g").attr("class", "katucharts-legend-nav"), kt = 22, _t = Ct.append("g").attr("transform", `translate(${st},${wt - kt - 2})`).style("cursor", "pointer").style("opacity", "0.3");
7504
+ const q = Math.ceil(R / A), st = L - 20, wt = C + Math.min(R, A) * _ / 2, Pt = this.group.append("g").attr("class", "katucharts-legend-nav"), kt = 22, _t = Pt.append("g").attr("transform", `translate(${st},${wt - kt - 2})`).style("cursor", "pointer").style("opacity", "0.3");
7505
7505
  _t.append("rect").attr("x", 0).attr("y", 0).attr("width", kt).attr("height", kt).attr("rx", 4).attr("fill", "#f0f0f0").attr("stroke", "#ccc").attr("stroke-width", 1), _t.append("path").attr("d", `M${kt / 2 - 5},${kt / 2 + 2} L${kt / 2},${kt / 2 - 4} L${kt / 2 + 5},${kt / 2 + 2}`).attr("fill", "none").attr("stroke", "#555").attr("stroke-width", 2).attr("stroke-linecap", "round"), _t.on("mouseover", function() {
7506
7506
  _t.select("rect").attr("fill", "#e0e0e0");
7507
7507
  }), _t.on("mouseout", function() {
7508
7508
  _t.select("rect").attr("fill", "#f0f0f0");
7509
7509
  });
7510
- const Vt = Ct.append("g").attr("transform", `translate(${st},${wt + 2})`).style("cursor", "pointer");
7510
+ const Vt = Pt.append("g").attr("transform", `translate(${st},${wt + 2})`).style("cursor", "pointer");
7511
7511
  Vt.append("rect").attr("x", 0).attr("y", 0).attr("width", kt).attr("height", kt).attr("rx", 4).attr("fill", "#f0f0f0").attr("stroke", "#ccc").attr("stroke-width", 1), Vt.append("path").attr("d", `M${kt / 2 - 5},${kt / 2 - 2} L${kt / 2},${kt / 2 + 4} L${kt / 2 + 5},${kt / 2 - 2}`).attr("fill", "none").attr("stroke", "#555").attr("stroke-width", 2).attr("stroke-linecap", "round"), Vt.on("mouseover", function() {
7512
7512
  Vt.select("rect").attr("fill", "#e0e0e0");
7513
7513
  }), Vt.on("mouseout", function() {
@@ -10268,12 +10268,12 @@ function o2(n) {
10268
10268
  return g === o ? l : g;
10269
10269
  }, l;
10270
10270
  }
10271
- function Ft(n) {
10271
+ function Rt(n) {
10272
10272
  return function() {
10273
10273
  return n;
10274
10274
  };
10275
10275
  }
10276
- const nu = Math.abs, ke = Math.atan2, ni = Math.cos, s2 = Math.max, sa = Math.min, vn = Math.sin, Re = Math.sqrt, Me = 1e-12, Ui = Math.PI, Ko = Ui / 2, Tr = 2 * Ui;
10276
+ const nu = Math.abs, ke = Math.atan2, ni = Math.cos, s2 = Math.max, sa = Math.min, vn = Math.sin, De = Math.sqrt, Me = 1e-12, Ui = Math.PI, Ko = Ui / 2, Tr = 2 * Ui;
10277
10277
  function a2(n) {
10278
10278
  return n > 1 ? 0 : n < -1 ? Ui : Math.acos(n);
10279
10279
  }
@@ -10376,7 +10376,7 @@ function m2(n, t, e, i, r, o, s, a) {
10376
10376
  return u = (h * (t - o) - f * (n - r)) / u, [n + u * l, t + u * c];
10377
10377
  }
10378
10378
  function uo(n, t, e, i, r, o, s) {
10379
- var a = n - e, l = t - i, c = (s ? o : -o) / Re(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Re(s2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, T = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = T - g, w = I - m;
10379
+ var a = n - e, l = t - i, c = (s ? o : -o) / De(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * De(s2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, T = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = T - g, w = I - m;
10380
10380
  return E * E + P * P > S * S + w * w && (L = T, _ = I), {
10381
10381
  cx: L,
10382
10382
  cy: _,
@@ -10387,14 +10387,14 @@ function uo(n, t, e, i, r, o, s) {
10387
10387
  };
10388
10388
  }
10389
10389
  function Se() {
10390
- var n = u2, t = f2, e = Ft(0), i = null, r = d2, o = p2, s = g2, a = null, l = Zr(c);
10390
+ var n = u2, t = f2, e = Rt(0), i = null, r = d2, o = p2, s = g2, a = null, l = Zr(c);
10391
10391
  function c() {
10392
10392
  var h, f, u = +n.apply(this, arguments), d = +t.apply(this, arguments), p = r.apply(this, arguments) - Ko, y = o.apply(this, arguments) - Ko, g = nu(y - p), m = y > p;
10393
10393
  if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d > Me)) a.moveTo(0, 0);
10394
10394
  else if (g > Tr - Me)
10395
10395
  a.moveTo(d * ni(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u > Me && (a.moveTo(u * ni(y), u * vn(y)), a.arc(0, 0, u, y, p, m));
10396
10396
  else {
10397
- var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > Me && (i ? +i.apply(this, arguments) : Re(u * u + d * d)), T = sa(nu(d - u) / 2, +e.apply(this, arguments)), I = T, E = T, P, S;
10397
+ var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > Me && (i ? +i.apply(this, arguments) : De(u * u + d * d)), T = sa(nu(d - u) / 2, +e.apply(this, arguments)), I = T, E = T, P, S;
10398
10398
  if (_ > Me) {
10399
10399
  var w = iu(_ / u * vn(L)), A = iu(_ / d * vn(L));
10400
10400
  (M -= w * 2) > Me ? (w *= m ? 1 : -1, b += w, k -= w) : (M = 0, b = k = (p + y) / 2), (C -= A * 2) > Me ? (A *= m ? 1 : -1, x += A, v -= A) : (C = 0, x = v = (p + y) / 2);
@@ -10404,7 +10404,7 @@ function Se() {
10404
10404
  var z = d * ni(v), B = d * vn(v), H = u * ni(b), J = u * vn(b), X;
10405
10405
  if (g < Ui)
10406
10406
  if (X = m2($, R, H, J, z, B, F, D)) {
10407
- var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(a2((j * U + W * G) / (Re(j * j + W * W) * Re(U * U + G * G))) / 2), Y = Re(X[0] * X[0] + X[1] * X[1]);
10407
+ var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(a2((j * U + W * G) / (De(j * j + W * W) * De(U * U + G * G))) / 2), Y = De(X[0] * X[0] + X[1] * X[1]);
10408
10408
  I = sa(T, (u - Y) / (N - 1)), E = sa(T, (d - Y) / (N + 1));
10409
10409
  } else
10410
10410
  I = E = 0;
@@ -10417,19 +10417,19 @@ function Se() {
10417
10417
  var h = (+n.apply(this, arguments) + +t.apply(this, arguments)) / 2, f = (+r.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Ui / 2;
10418
10418
  return [ni(f) * h, vn(f) * h];
10419
10419
  }, c.innerRadius = function(h) {
10420
- return arguments.length ? (n = typeof h == "function" ? h : Ft(+h), c) : n;
10420
+ return arguments.length ? (n = typeof h == "function" ? h : Rt(+h), c) : n;
10421
10421
  }, c.outerRadius = function(h) {
10422
- return arguments.length ? (t = typeof h == "function" ? h : Ft(+h), c) : t;
10422
+ return arguments.length ? (t = typeof h == "function" ? h : Rt(+h), c) : t;
10423
10423
  }, c.cornerRadius = function(h) {
10424
- return arguments.length ? (e = typeof h == "function" ? h : Ft(+h), c) : e;
10424
+ return arguments.length ? (e = typeof h == "function" ? h : Rt(+h), c) : e;
10425
10425
  }, c.padRadius = function(h) {
10426
- return arguments.length ? (i = h == null ? null : typeof h == "function" ? h : Ft(+h), c) : i;
10426
+ return arguments.length ? (i = h == null ? null : typeof h == "function" ? h : Rt(+h), c) : i;
10427
10427
  }, c.startAngle = function(h) {
10428
- return arguments.length ? (r = typeof h == "function" ? h : Ft(+h), c) : r;
10428
+ return arguments.length ? (r = typeof h == "function" ? h : Rt(+h), c) : r;
10429
10429
  }, c.endAngle = function(h) {
10430
- return arguments.length ? (o = typeof h == "function" ? h : Ft(+h), c) : o;
10430
+ return arguments.length ? (o = typeof h == "function" ? h : Rt(+h), c) : o;
10431
10431
  }, c.padAngle = function(h) {
10432
- return arguments.length ? (s = typeof h == "function" ? h : Ft(+h), c) : s;
10432
+ return arguments.length ? (s = typeof h == "function" ? h : Rt(+h), c) : s;
10433
10433
  }, c.context = function(h) {
10434
10434
  return arguments.length ? (a = h ?? null, c) : a;
10435
10435
  }, c;
@@ -10477,8 +10477,8 @@ function Jc(n) {
10477
10477
  return n[1];
10478
10478
  }
10479
10479
  function gi(n, t) {
10480
- var e = Ft(!0), i = null, r = Qi, o = null, s = Zr(a);
10481
- n = typeof n == "function" ? n : n === void 0 ? Kc : Ft(n), t = typeof t == "function" ? t : t === void 0 ? Jc : Ft(t);
10480
+ var e = Rt(!0), i = null, r = Qi, o = null, s = Zr(a);
10481
+ n = typeof n == "function" ? n : n === void 0 ? Kc : Rt(n), t = typeof t == "function" ? t : t === void 0 ? Jc : Rt(t);
10482
10482
  function a(l) {
10483
10483
  var c, h = (l = Zc(l)).length, f, u = !1, d;
10484
10484
  for (i == null && (o = r(d = s())), c = 0; c <= h; ++c)
@@ -10486,11 +10486,11 @@ function gi(n, t) {
10486
10486
  if (d) return o = null, d + "" || null;
10487
10487
  }
10488
10488
  return a.x = function(l) {
10489
- return arguments.length ? (n = typeof l == "function" ? l : Ft(+l), a) : n;
10489
+ return arguments.length ? (n = typeof l == "function" ? l : Rt(+l), a) : n;
10490
10490
  }, a.y = function(l) {
10491
- return arguments.length ? (t = typeof l == "function" ? l : Ft(+l), a) : t;
10491
+ return arguments.length ? (t = typeof l == "function" ? l : Rt(+l), a) : t;
10492
10492
  }, a.defined = function(l) {
10493
- return arguments.length ? (e = typeof l == "function" ? l : Ft(!!l), a) : e;
10493
+ return arguments.length ? (e = typeof l == "function" ? l : Rt(!!l), a) : e;
10494
10494
  }, a.curve = function(l) {
10495
10495
  return arguments.length ? (r = l, i != null && (o = r(i)), a) : r;
10496
10496
  }, a.context = function(l) {
@@ -10498,8 +10498,8 @@ function gi(n, t) {
10498
10498
  }, a;
10499
10499
  }
10500
10500
  function Ii(n, t, e) {
10501
- var i = null, r = Ft(!0), o = null, s = Qi, a = null, l = Zr(c);
10502
- n = typeof n == "function" ? n : n === void 0 ? Kc : Ft(+n), t = typeof t == "function" ? t : Ft(t === void 0 ? 0 : +t), e = typeof e == "function" ? e : e === void 0 ? Jc : Ft(+e);
10501
+ var i = null, r = Rt(!0), o = null, s = Qi, a = null, l = Zr(c);
10502
+ n = typeof n == "function" ? n : n === void 0 ? Kc : Rt(+n), t = typeof t == "function" ? t : Rt(t === void 0 ? 0 : +t), e = typeof e == "function" ? e : e === void 0 ? Jc : Rt(+e);
10503
10503
  function c(f) {
10504
10504
  var u, d, p, y = (f = Zc(f)).length, g, m = !1, x, v = new Array(y), b = new Array(y);
10505
10505
  for (o == null && (a = s(x = l())), u = 0; u <= y; ++u) {
@@ -10519,17 +10519,17 @@ function Ii(n, t, e) {
10519
10519
  return gi().defined(r).curve(s).context(o);
10520
10520
  }
10521
10521
  return c.x = function(f) {
10522
- return arguments.length ? (n = typeof f == "function" ? f : Ft(+f), i = null, c) : n;
10522
+ return arguments.length ? (n = typeof f == "function" ? f : Rt(+f), i = null, c) : n;
10523
10523
  }, c.x0 = function(f) {
10524
- return arguments.length ? (n = typeof f == "function" ? f : Ft(+f), c) : n;
10524
+ return arguments.length ? (n = typeof f == "function" ? f : Rt(+f), c) : n;
10525
10525
  }, c.x1 = function(f) {
10526
- return arguments.length ? (i = f == null ? null : typeof f == "function" ? f : Ft(+f), c) : i;
10526
+ return arguments.length ? (i = f == null ? null : typeof f == "function" ? f : Rt(+f), c) : i;
10527
10527
  }, c.y = function(f) {
10528
- return arguments.length ? (t = typeof f == "function" ? f : Ft(+f), e = null, c) : t;
10528
+ return arguments.length ? (t = typeof f == "function" ? f : Rt(+f), e = null, c) : t;
10529
10529
  }, c.y0 = function(f) {
10530
- return arguments.length ? (t = typeof f == "function" ? f : Ft(+f), c) : t;
10530
+ return arguments.length ? (t = typeof f == "function" ? f : Rt(+f), c) : t;
10531
10531
  }, c.y1 = function(f) {
10532
- return arguments.length ? (e = f == null ? null : typeof f == "function" ? f : Ft(+f), c) : e;
10532
+ return arguments.length ? (e = f == null ? null : typeof f == "function" ? f : Rt(+f), c) : e;
10533
10533
  }, c.lineX0 = c.lineY0 = function() {
10534
10534
  return h().x(n).y(t);
10535
10535
  }, c.lineY1 = function() {
@@ -10537,7 +10537,7 @@ function Ii(n, t, e) {
10537
10537
  }, c.lineX1 = function() {
10538
10538
  return h().x(i).y(t);
10539
10539
  }, c.defined = function(f) {
10540
- return arguments.length ? (r = typeof f == "function" ? f : Ft(!!f), c) : r;
10540
+ return arguments.length ? (r = typeof f == "function" ? f : Rt(!!f), c) : r;
10541
10541
  }, c.curve = function(f) {
10542
10542
  return arguments.length ? (s = f, o != null && (a = s(o)), c) : s;
10543
10543
  }, c.context = function(f) {
@@ -10551,7 +10551,7 @@ function b2(n) {
10551
10551
  return n;
10552
10552
  }
10553
10553
  function v2() {
10554
- var n = b2, t = x2, e = null, i = Ft(0), r = Ft(Tr), o = Ft(0);
10554
+ var n = b2, t = x2, e = null, i = Rt(0), r = Rt(Tr), o = Rt(0);
10555
10555
  function s(a) {
10556
10556
  var l, c = (a = Zc(a)).length, h, f, u = 0, d = new Array(c), p = new Array(c), y = +i.apply(this, arguments), g = Math.min(Tr, Math.max(-Tr, r.apply(this, arguments) - y)), m, x = Math.min(Math.abs(g) / c, o.apply(this, arguments)), v = x * (g < 0 ? -1 : 1), b;
10557
10557
  for (l = 0; l < c; ++l)
@@ -10572,17 +10572,17 @@ function v2() {
10572
10572
  return p;
10573
10573
  }
10574
10574
  return s.value = function(a) {
10575
- return arguments.length ? (n = typeof a == "function" ? a : Ft(+a), s) : n;
10575
+ return arguments.length ? (n = typeof a == "function" ? a : Rt(+a), s) : n;
10576
10576
  }, s.sortValues = function(a) {
10577
10577
  return arguments.length ? (t = a, e = null, s) : t;
10578
10578
  }, s.sort = function(a) {
10579
10579
  return arguments.length ? (e = a, t = null, s) : e;
10580
10580
  }, s.startAngle = function(a) {
10581
- return arguments.length ? (i = typeof a == "function" ? a : Ft(+a), s) : i;
10581
+ return arguments.length ? (i = typeof a == "function" ? a : Rt(+a), s) : i;
10582
10582
  }, s.endAngle = function(a) {
10583
- return arguments.length ? (r = typeof a == "function" ? a : Ft(+a), s) : r;
10583
+ return arguments.length ? (r = typeof a == "function" ? a : Rt(+a), s) : r;
10584
10584
  }, s.padAngle = function(a) {
10585
- return arguments.length ? (o = typeof a == "function" ? a : Ft(+a), s) : o;
10585
+ return arguments.length ? (o = typeof a == "function" ? a : Rt(+a), s) : o;
10586
10586
  }, s;
10587
10587
  }
10588
10588
  var Md = Qc(Qi);
@@ -10691,9 +10691,9 @@ function _d(n) {
10691
10691
  }, l.target = function(c) {
10692
10692
  return arguments.length ? (e = c, l) : e;
10693
10693
  }, l.x = function(c) {
10694
- return arguments.length ? (i = typeof c == "function" ? c : Ft(+c), l) : i;
10694
+ return arguments.length ? (i = typeof c == "function" ? c : Rt(+c), l) : i;
10695
10695
  }, l.y = function(c) {
10696
- return arguments.length ? (r = typeof c == "function" ? c : Ft(+c), l) : r;
10696
+ return arguments.length ? (r = typeof c == "function" ? c : Rt(+c), l) : r;
10697
10697
  }, l.context = function(c) {
10698
10698
  return arguments.length ? (c == null ? o = s = null : s = n(o = c), l) : o;
10699
10699
  }, l;
@@ -10706,46 +10706,46 @@ function P2() {
10706
10706
  }
10707
10707
  const ti = {
10708
10708
  draw(n, t) {
10709
- const e = Re(t / Ui);
10709
+ const e = De(t / Ui);
10710
10710
  n.moveTo(e, 0), n.arc(0, 0, e, 0, Tr);
10711
10711
  }
10712
10712
  }, tl = {
10713
10713
  draw(n, t) {
10714
- const e = Re(t / 5) / 2;
10714
+ const e = De(t / 5) / 2;
10715
10715
  n.moveTo(-3 * e, -e), n.lineTo(-e, -e), n.lineTo(-e, -3 * e), n.lineTo(e, -3 * e), n.lineTo(e, -e), n.lineTo(3 * e, -e), n.lineTo(3 * e, e), n.lineTo(e, e), n.lineTo(e, 3 * e), n.lineTo(-e, 3 * e), n.lineTo(-e, e), n.lineTo(-3 * e, e), n.closePath();
10716
10716
  }
10717
- }, Cd = Re(1 / 3), E2 = Cd * 2, el = {
10717
+ }, Cd = De(1 / 3), E2 = Cd * 2, el = {
10718
10718
  draw(n, t) {
10719
- const e = Re(t / E2), i = e * Cd;
10719
+ const e = De(t / E2), i = e * Cd;
10720
10720
  n.moveTo(0, -e), n.lineTo(i, 0), n.lineTo(0, e), n.lineTo(-i, 0), n.closePath();
10721
10721
  }
10722
10722
  }, nl = {
10723
10723
  draw(n, t) {
10724
- const e = Re(t), i = -e / 2;
10724
+ const e = De(t), i = -e / 2;
10725
10725
  n.rect(i, i, e, e);
10726
10726
  }
10727
- }, aa = Re(3), il = {
10727
+ }, aa = De(3), il = {
10728
10728
  draw(n, t) {
10729
- const e = -Re(t / (aa * 3));
10729
+ const e = -De(t / (aa * 3));
10730
10730
  n.moveTo(0, e * 2), n.lineTo(-aa * e, -e), n.lineTo(aa * e, -e), n.closePath();
10731
10731
  }
10732
- }, T2 = Re(3), rl = {
10732
+ }, T2 = De(3), rl = {
10733
10733
  draw(n, t) {
10734
- const e = Re(t) * 0.6824, i = e / 2, r = e * T2 / 2;
10734
+ const e = De(t) * 0.6824, i = e / 2, r = e * T2 / 2;
10735
10735
  n.moveTo(0, -e), n.lineTo(r, i), n.lineTo(-r, i), n.closePath();
10736
10736
  }
10737
10737
  };
10738
10738
  function en(n, t) {
10739
10739
  let e = null, i = Zr(r);
10740
- n = typeof n == "function" ? n : Ft(n || ti), t = typeof t == "function" ? t : Ft(t === void 0 ? 64 : +t);
10740
+ n = typeof n == "function" ? n : Rt(n || ti), t = typeof t == "function" ? t : Rt(t === void 0 ? 64 : +t);
10741
10741
  function r() {
10742
10742
  let o;
10743
10743
  if (e || (e = o = i()), n.apply(this, arguments).draw(e, +t.apply(this, arguments)), o) return e = null, o + "" || null;
10744
10744
  }
10745
10745
  return r.type = function(o) {
10746
- return arguments.length ? (n = typeof o == "function" ? o : Ft(o), r) : n;
10746
+ return arguments.length ? (n = typeof o == "function" ? o : Rt(o), r) : n;
10747
10747
  }, r.size = function(o) {
10748
- return arguments.length ? (t = typeof o == "function" ? o : Ft(+o), r) : t;
10748
+ return arguments.length ? (t = typeof o == "function" ? o : Rt(+o), r) : t;
10749
10749
  }, r.context = function(o) {
10750
10750
  return arguments.length ? (e = o ?? null, r) : e;
10751
10751
  }, r;
@@ -11866,7 +11866,7 @@ const Zn = class Zn {
11866
11866
  };
11867
11867
  Zn.MIN_AUTO_PLOT_HEIGHT = 160, Zn.MAX_AUTO_HEIGHT = 900, Zn.MIN_CATEGORY_ROW_HEIGHT = 22;
11868
11868
  let Za = Zn;
11869
- const bt = 600, Wt = 8, Fd = 0, Qn = bt + 100, K = 300, Jo = 250, pt = gd, Z = gd, B2 = 500;
11869
+ const bt = 600, Wt = 8, Fd = 0, Qn = bt + 100, K = 300, Jo = 250, gt = gd, Z = gd, B2 = 500;
11870
11870
  function Pe(n, t, e, i) {
11871
11871
  return i > B2 ? t : t + n * e;
11872
11872
  }
@@ -12181,7 +12181,7 @@ class Xt {
12181
12181
  o.insert("rect", ":last-child").attr("x", m.x - x).attr("y", m.y - x).attr("width", m.width + x * 2).attr("height", m.height + x * 2).attr("rx", v).attr("fill", c.backgroundColor || "none").attr("stroke", c.borderColor || "none").attr("stroke-width", c.borderWidth ?? 0);
12182
12182
  }
12183
12183
  }
12184
- this.context.animate && c.defer !== !1 && d.attr("opacity", 0).transition().delay(Qn + a * Wt).duration(400).ease(pt).attr("opacity", 1);
12184
+ this.context.animate && c.defer !== !1 && d.attr("opacity", 0).transition().delay(Qn + a * Wt).duration(400).ease(gt).attr("opacity", 1);
12185
12185
  });
12186
12186
  }
12187
12187
  /**
@@ -12493,7 +12493,7 @@ class zd extends Xt {
12493
12493
  const e = ((r = (i = t.node()) == null ? void 0 : i.getTotalLength) == null ? void 0 : r.call(i)) || 0;
12494
12494
  if (e > 0) {
12495
12495
  const o = typeof this.config.animation == "object" ? this.config.animation : {}, s = o.duration ?? bt, a = o.defer ?? 0, l = t.attr("stroke-dasharray");
12496
- t.attr("stroke-dasharray", `${e} ${e}`).attr("stroke-dashoffset", e).transition().delay(a).duration(s).ease(pt).attr("stroke-dashoffset", 0).on("end", () => {
12496
+ t.attr("stroke-dasharray", `${e} ${e}`).attr("stroke-dashoffset", e).transition().delay(a).duration(s).ease(gt).attr("stroke-dashoffset", 0).on("end", () => {
12497
12497
  t.attr("stroke-dasharray", l === "none" ? null : l);
12498
12498
  });
12499
12499
  }
@@ -12504,7 +12504,7 @@ class zd extends Xt {
12504
12504
  const { xAxis: a, yAxis: l } = this.context, c = (r == null ? void 0 : r.radius) ?? 4, h = (r == null ? void 0 : r.symbol) || "circle", f = this.group.append("g").attr("class", "katucharts-markers"), u = t.filter((d) => d.y !== null && d.y !== void 0);
12505
12505
  if (h === "circle") {
12506
12506
  const d = f.selectAll("circle").data(u).join("circle").attr("cx", (p) => a.getPixelForValue(p.x ?? 0)).attr("cy", (p) => l.getPixelForValue(p.y ?? 0)).attr("fill", (p, y) => this.getMarkerFill(p, y, r, e)).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
12507
- i ? d.attr("r", 0).transition().delay((p, y) => Pe(y, Qn, Wt, u.length)).duration(bt).ease(pt).attr("r", (p) => {
12507
+ i ? d.attr("r", 0).transition().delay((p, y) => Pe(y, Qn, Wt, u.length)).duration(bt).ease(gt).attr("r", (p) => {
12508
12508
  var y;
12509
12509
  return ((y = p.marker) == null ? void 0 : y.radius) ?? c;
12510
12510
  }) : d.attr("r", (p) => {
@@ -12520,7 +12520,7 @@ class zd extends Xt {
12520
12520
  ).attr("fill", (g, m) => this.getMarkerFill(g, m, r, e)).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
12521
12521
  if (i) {
12522
12522
  const g = en().type(d).size(0);
12523
- y.attr("d", g).transition().delay((m, x) => Pe(x, Qn, Wt, u.length)).duration(bt).ease(pt).attr("d", (m) => {
12523
+ y.attr("d", g).transition().delay((m, x) => Pe(x, Qn, Wt, u.length)).duration(bt).ease(gt).attr("d", (m) => {
12524
12524
  var v;
12525
12525
  const x = ((v = m.marker) == null ? void 0 : v.radius) ?? c;
12526
12526
  return en().type(d).size(Math.PI * x * x)();
@@ -12595,7 +12595,7 @@ class Bd extends Xt {
12595
12595
  const { areaGen: r, lineGen: o } = this.buildGenerators(), s = this.config.lineColor || e;
12596
12596
  if (this.areaPath = this.group.append("path").datum(t).attr("d", r).attr("fill", this.config.fillColor || e).attr("class", "katucharts-area"), this.linePath = this.group.append("path").datum(t).attr("d", o).attr("fill", "none").attr("stroke", s).attr("stroke-width", this.config.lineWidth ?? 2).attr("stroke-linecap", this.config.linecap || "round").attr("stroke-dasharray", sn(this.config.dashStyle)).attr("class", "katucharts-area-line"), i) {
12597
12597
  const l = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
12598
- this.areaPath.attr("fill-opacity", 0).transition().duration(l).ease(pt).attr("fill-opacity", this.config.fillOpacity ?? 0.75), this.animateLineEntry(this.linePath);
12598
+ this.areaPath.attr("fill-opacity", 0).transition().duration(l).ease(gt).attr("fill-opacity", this.config.fillOpacity ?? 0.75), this.animateLineEntry(this.linePath);
12599
12599
  } else
12600
12600
  this.areaPath.attr("fill-opacity", this.config.fillOpacity ?? 0.75);
12601
12601
  }
@@ -12612,7 +12612,7 @@ class Bd extends Xt {
12612
12612
  const y = gi().defined((g) => g.y !== null && g.y !== void 0).x((g) => r.getPixelForValue(g.x ?? 0)).y((g) => o.getPixelForValue(g.y ?? 0)).curve(l);
12613
12613
  if (this.linePath = this.group.append("path").datum(t).attr("d", y).attr("fill", "none").attr("stroke", u).attr("stroke-width", this.config.lineWidth ?? 2).attr("stroke-linecap", this.config.linecap || "round").attr("stroke-dasharray", sn(this.config.dashStyle)).attr("class", "katucharts-area-line"), i) {
12614
12614
  const m = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
12615
- this.areaPath && this.areaPath.attr("fill-opacity", 0).transition().duration(m).ease(pt).attr("fill-opacity", c), this.negAreaPath && this.negAreaPath.attr("fill-opacity", 0).transition().duration(m).ease(pt).attr("fill-opacity", c), this.animateLineEntry(this.linePath);
12615
+ this.areaPath && this.areaPath.attr("fill-opacity", 0).transition().duration(m).ease(gt).attr("fill-opacity", c), this.negAreaPath && this.negAreaPath.attr("fill-opacity", 0).transition().duration(m).ease(gt).attr("fill-opacity", c), this.animateLineEntry(this.linePath);
12616
12616
  }
12617
12617
  }
12618
12618
  renderZones(t, e) {
@@ -12676,7 +12676,7 @@ class Bd extends Xt {
12676
12676
  const e = ((r = (i = t.node()) == null ? void 0 : i.getTotalLength) == null ? void 0 : r.call(i)) || 0;
12677
12677
  if (e > 0) {
12678
12678
  const o = typeof this.config.animation == "object" ? this.config.animation : {}, s = o.duration ?? bt, a = o.defer ?? 0, l = t.attr("stroke-dasharray");
12679
- t.attr("stroke-dasharray", `${e} ${e}`).attr("stroke-dashoffset", e).transition().delay(a).duration(s).ease(pt).attr("stroke-dashoffset", 0).on("end", () => t.attr("stroke-dasharray", l === "none" ? null : l));
12679
+ t.attr("stroke-dasharray", `${e} ${e}`).attr("stroke-dashoffset", e).transition().delay(a).duration(s).ease(gt).attr("stroke-dashoffset", 0).on("end", () => t.attr("stroke-dasharray", l === "none" ? null : l));
12680
12680
  }
12681
12681
  }
12682
12682
  renderMarkers(t, e, i) {
@@ -12685,7 +12685,7 @@ class Bd extends Xt {
12685
12685
  const { xAxis: o, yAxis: s } = this.context, a = (r == null ? void 0 : r.radius) ?? 4, l = (r == null ? void 0 : r.symbol) || "circle", c = this.group.append("g").attr("class", "katucharts-markers"), h = t.filter((f) => f.y !== null && f.y !== void 0);
12686
12686
  if (l === "circle") {
12687
12687
  const f = c.selectAll("circle").data(h).join("circle").attr("cx", (u) => o.getPixelForValue(u.x ?? 0)).attr("cy", (u) => s.getPixelForValue(u.y ?? 0)).attr("fill", (u) => u.color || (r == null ? void 0 : r.fillColor) || e).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
12688
- i ? f.attr("r", 0).transition().delay((u, d) => Pe(d, Qn, Wt, h.length)).duration(bt).ease(pt).attr("r", (u) => {
12688
+ i ? f.attr("r", 0).transition().delay((u, d) => Pe(d, Qn, Wt, h.length)).duration(bt).ease(gt).attr("r", (u) => {
12689
12689
  var d;
12690
12690
  return ((d = u.marker) == null ? void 0 : d.radius) ?? a;
12691
12691
  }) : f.attr("r", (u) => {
@@ -12699,7 +12699,7 @@ class Bd extends Xt {
12699
12699
  ).attr("fill", (d) => d.color || (r == null ? void 0 : r.fillColor) || e).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
12700
12700
  if (i) {
12701
12701
  const d = en().type(f).size(0);
12702
- u.attr("d", d).transition().delay((p, y) => Pe(y, Qn, Wt, h.length)).duration(bt).ease(pt).attr("d", (p) => {
12702
+ u.attr("d", d).transition().delay((p, y) => Pe(y, Qn, Wt, h.length)).duration(bt).ease(gt).attr("d", (p) => {
12703
12703
  var g;
12704
12704
  const y = ((g = p.marker) == null ? void 0 : g.radius) ?? a;
12705
12705
  return en().type(f).size(Math.PI * y * y)();
@@ -12839,7 +12839,7 @@ class Od extends Xt {
12839
12839
  const { xAxis: h, yAxis: f } = this.context, u = this.config.threshold ?? 0, d = this.config.negativeColor;
12840
12840
  if (t.attr("x", (p) => this.crispCoord(h.getPixelForValue(p.x ?? 0) + r, l)).attr("width", l ? Math.round(i) : i).attr("fill", (p, y) => this.getPointColor(p, y, s, d, u)).attr("display", (p) => p.y == null ? "none" : null), c) {
12841
12841
  const p = this.getEntryDuration();
12842
- t.attr("y", o).attr("height", 0).transition().duration(p).ease(pt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("y", (y) => this.getBarY(y, f, o, a)).attr("height", (y) => this.getBarHeight(y, f, o, a));
12842
+ t.attr("y", o).attr("height", 0).transition().duration(p).ease(gt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("y", (y) => this.getBarY(y, f, o, a)).attr("height", (y) => this.getBarHeight(y, f, o, a));
12843
12843
  } else
12844
12844
  t.attr("y", (p) => this.getBarY(p, f, o, a)).attr("height", (p) => this.getBarHeight(p, f, o, a));
12845
12845
  }
@@ -12847,7 +12847,7 @@ class Od extends Xt {
12847
12847
  const { xAxis: h, yAxis: f } = this.context, u = this.config.threshold ?? 0, d = this.config.negativeColor;
12848
12848
  if (t.attr("y", (p) => this.crispCoord(h.getPixelForValue(p.x ?? 0) + r, l)).attr("height", l ? Math.round(i) : i).attr("fill", (p, y) => this.getPointColor(p, y, s, d, u)).attr("display", (p) => p.y == null ? "none" : null), c) {
12849
12849
  const p = this.getEntryDuration();
12850
- t.attr("x", o).attr("width", 0).transition().duration(p).ease(pt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("x", (y) => {
12850
+ t.attr("x", o).attr("width", 0).transition().duration(p).ease(gt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("x", (y) => {
12851
12851
  const g = f.getPixelForValue(y.y ?? 0);
12852
12852
  return Math.min(o, g);
12853
12853
  }).attr("width", (y) => {
@@ -12863,7 +12863,7 @@ class Od extends Xt {
12863
12863
  const m = this.getEntryDuration();
12864
12864
  t.each((x, v, b) => {
12865
12865
  const k = rt(b[v]), M = this.computeStackedStartParams(x, e, i, r, s, c), C = this.computeStackedRectParams(x, e, i, r, o, s, c, l);
12866
- x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(pt).delay(Pe(v, 0, Wt, e.length)).attrTween("d", () => {
12866
+ x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(gt).delay(Pe(v, 0, Wt, e.length)).attrTween("d", () => {
12867
12867
  const L = se(M.x, C.x), _ = se(M.y, C.y), T = se(M.w, C.w), I = se(M.h, C.h);
12868
12868
  return (E) => this.rectParamsToPath(
12869
12869
  { x: L(E), y: _(E), w: T(E), h: I(E) },
@@ -13182,7 +13182,7 @@ class j2 extends Xt {
13182
13182
  var l, c;
13183
13183
  return ((l = a.marker) == null ? void 0 : l.lineWidth) ?? ((c = this.config.marker) == null ? void 0 : c.lineWidth) ?? 1;
13184
13184
  }).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
13185
- o ? s.attr("r", 0).transition().duration(this.getEntryDuration()).ease(pt).delay((a, l) => Pe(l, 0, Wt, t.length)).attr("r", (a) => {
13185
+ o ? s.attr("r", 0).transition().duration(this.getEntryDuration()).ease(gt).delay((a, l) => Pe(l, 0, Wt, t.length)).attr("r", (a) => {
13186
13186
  var l;
13187
13187
  return ((l = a.marker) == null ? void 0 : l.radius) ?? i;
13188
13188
  }) : s.attr("r", (a) => {
@@ -13207,7 +13207,7 @@ class j2 extends Xt {
13207
13207
  };
13208
13208
  if (s) {
13209
13209
  const h = en().type(a).size(0);
13210
- l.attr("d", h).transition().duration(this.getEntryDuration()).ease(pt).delay((f, u) => Pe(u, 0, Wt, t.length)).attr("d", c);
13210
+ l.attr("d", h).transition().duration(this.getEntryDuration()).ease(gt).delay((f, u) => Pe(u, 0, Wt, t.length)).attr("d", c);
13211
13211
  } else
13212
13212
  l.attr("d", c);
13213
13213
  this.attachScatterEvents(l, t, i, r, e, "symbol", a);
@@ -13270,7 +13270,7 @@ class Z2 extends Xt {
13270
13270
  })), h = this.group.selectAll(".katucharts-bubble").data(l).join("circle").attr("class", "katucharts-bubble").attr("cx", (f, u) => c[u].cx).attr("cy", (f, u) => c[u].cy).attr("fill", (f, u) => this.getBubbleFill(f, u, r)).attr("fill-opacity", this.config.fillOpacity ?? 0.5).attr("stroke", (f, u) => this.config.lineColor || this.getBubbleFill(f, u, r)).attr("stroke-width", this.config.lineWidth ?? 1).style("cursor", this.config.cursor || "pointer");
13271
13271
  if (s) {
13272
13272
  const u = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
13273
- h.attr("r", 0).transition().duration(u).ease(pt).delay((d, p) => Pe(p, 0, Wt, l.length)).attr("r", (d) => this.sizeScale(this.getZValue(d)));
13273
+ h.attr("r", 0).transition().duration(u).ease(gt).delay((d, p) => Pe(p, 0, Wt, l.length)).attr("r", (d) => this.sizeScale(this.getZValue(d)));
13274
13274
  } else
13275
13275
  h.attr("r", (f) => this.sizeScale(this.getZValue(f)));
13276
13276
  this.attachBubbleEvents(h, l, c, r), this.renderDataLabels(
@@ -13428,23 +13428,23 @@ class lu extends Xt {
13428
13428
  const D = this.config.allowPointSelect === !0;
13429
13429
  (N = (G = this.config.states) == null ? void 0 : G.hover) == null || N.brightness;
13430
13430
  const z = (O = (Y = this.config.states) == null ? void 0 : Y.select) == null ? void 0 : O.color, B = (it = (ct = this.config.states) == null ? void 0 : ct.select) == null ? void 0 : it.borderColor, H = (dt = (ft = this.config.states) == null ? void 0 : ft.select) == null ? void 0 : dt.borderWidth, J = ((ot = (at = this.config.states) == null ? void 0 : at.inactive) == null ? void 0 : ot.opacity) ?? 0.4, X = (q, st) => q.data.color ? q.data.color : this.config.colors ? this.config.colors[st % this.config.colors.length] : e[st % e.length], j = (q) => {
13431
- const st = (q.startAngle + q.endAngle) / 2, wt = w * Math.sin(st), Ct = -w * Math.cos(st);
13432
- return `translate(${wt},${Ct})`;
13431
+ const st = (q.startAngle + q.endAngle) / 2, wt = w * Math.sin(st), Pt = -w * Math.cos(st);
13432
+ return `translate(${wt},${Pt})`;
13433
13433
  }, W = this, U = F.selectAll(".katucharts-pie-slice").data($).join("path").attr("class", "katucharts-pie-slice").attr("fill", (q, st) => X(q, st)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
13434
13434
  U.each(function(q, st) {
13435
13435
  const wt = rt(this);
13436
13436
  (q.data.sliced || W.selectedIndices.has(st)) && wt.attr("transform", j(q));
13437
13437
  }), s ? U.each(function(q, st) {
13438
- const wt = rt(this), Ct = { startAngle: q.startAngle, endAngle: q.startAngle }, kt = se(Ct, q);
13439
- wt.transition().duration(bt).ease(pt).delay(Fd + st * Wt).attrTween("d", () => (_t) => S(kt(_t)));
13438
+ const wt = rt(this), Pt = { startAngle: q.startAngle, endAngle: q.startAngle }, kt = se(Pt, q);
13439
+ wt.transition().duration(bt).ease(gt).delay(Fd + st * Wt).attrTween("d", () => (_t) => S(kt(_t)));
13440
13440
  }) : U.attr("d", S), this.config.enableMouseTracking !== !1 && U.on("mouseover", function(q, st) {
13441
13441
  var Vt, Nt, Ot, Zt, ne;
13442
- const wt = rt(this), Ct = $.indexOf(st);
13443
- W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", A(st)), wt.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), U.interrupt("highlight"), U.attr("opacity", W.config.opacity ?? 1), U.filter(($t) => $t !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
13442
+ const wt = rt(this), Pt = $.indexOf(st);
13443
+ W.selectedIndices.has(Pt) || wt.transition("arc").duration(K).ease(Z).attr("d", A(st)), wt.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), U.interrupt("highlight"), U.attr("opacity", W.config.opacity ?? 1), U.filter((Tt) => Tt !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
13444
13444
  const _t = S.centroid(st);
13445
13445
  W.context.events.emit("point:mouseover", {
13446
13446
  point: st.data,
13447
- index: Ct,
13447
+ index: Pt,
13448
13448
  series: W,
13449
13449
  event: q,
13450
13450
  plotX: f + _t[0],
@@ -13452,14 +13452,14 @@ class lu extends Xt {
13452
13452
  }), (Nt = (Vt = st.data.events) == null ? void 0 : Vt.mouseOver) == null || Nt.call(st.data, q), (ne = (Zt = (Ot = W.config.point) == null ? void 0 : Ot.events) == null ? void 0 : Zt.mouseOver) == null || ne.call(st.data, q);
13453
13453
  }).on("mouseout", function(q, st) {
13454
13454
  var _t, Vt, Nt, Ot, Zt;
13455
- const wt = rt(this), Ct = $.indexOf(st);
13456
- W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (Zt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || Zt.call(st.data, q);
13455
+ const wt = rt(this), Pt = $.indexOf(st);
13456
+ W.selectedIndices.has(Pt) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Pt, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (Zt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || Zt.call(st.data, q);
13457
13457
  }).on("click", function(q, st) {
13458
- var Ct, kt, _t, Vt, Nt, Ot, Zt, ne, $t, Kt, le, Ve, he, mn;
13458
+ var Pt, kt, _t, Vt, Nt, Ot, Zt, ne, Tt, Kt, le, Ve, he, mn;
13459
13459
  const wt = $.indexOf(st);
13460
- D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (Zt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || Zt.call(st.data, q), (Kt = ($t = (ne = W.config.point) == null ? void 0 : ne.events) == null ? void 0 : $t.select) == null || Kt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(ze, Be) {
13460
+ D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Pt = st.data.events) == null ? void 0 : Pt.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (Zt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || Zt.call(st.data, q), (Kt = (Tt = (ne = W.config.point) == null ? void 0 : ne.events) == null ? void 0 : Tt.select) == null || Kt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(Be, Te) {
13461
13461
  const Ze = rt(this);
13462
- W.selectedIndices.has(Be) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(ze, Be)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
13462
+ W.selectedIndices.has(Te) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(Be, Te)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
13463
13463
  })), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (le = st.data.events) == null ? void 0 : le.click) == null || Ve.call(st.data, q), (mn = (he = W.config.events) == null ? void 0 : he.click) == null || mn.call(W, q);
13464
13464
  });
13465
13465
  for (const q of this.dataLabelConfigs())
@@ -13633,7 +13633,7 @@ class Nd extends Xt {
13633
13633
  `L ${l - k / 2} ${M + s}`,
13634
13634
  "Z"
13635
13635
  ].join(" "), L = g.color || e[m % e.length], _ = this.group.append("path").attr("d", C).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("class", "katucharts-funnel-segment").style("cursor", this.config.cursor || "pointer");
13636
- if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Pe(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (T = this.config.dataLabels) != null && T.enabled) {
13636
+ if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(gt).delay(Pe(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (T = this.config.dataLabels) != null && T.enabled) {
13637
13637
  const P = this.config.dataLabels, S = ((I = P.style) == null ? void 0 : I.fontSize) || Mt, w = P.color || ((E = P.style) == null ? void 0 : E.color) || Ee;
13638
13638
  let A;
13639
13639
  P.formatter ? A = P.formatter.call({
@@ -13980,7 +13980,7 @@ class vw extends Xt {
13980
13980
  const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0, T = M.median ?? M.y ?? 0, I = M.q3 ?? M.high ?? 0, E = M.high ?? 0, P = e.getPixelForValue((L + E) / 2), S = M.color || this.getPointColor(k, r), w = this.config.fillColor ?? "transparent", A = this.config.stemColor || S, $ = this.config.whiskerColor || S, R = this.group.append("g").attr("class", "katucharts-boxplot-point").style("cursor", this.config.cursor || "pointer"), F = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), D = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), z = R.append("rect").attr("x", C - a / 2).attr("width", a).attr("fill", w).attr("stroke", S).attr("stroke-width", x).attr("stroke-dasharray", m).attr("rx", bw(this.config.borderRadius)), B = R.append("line").attr("x1", C - a / 2).attr("x2", C + a / 2).attr("stroke", c || this.config.lineColor || S).attr("stroke-width", h).attr("stroke-dasharray", f), H = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y), J = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y);
13981
13981
  if (s) {
13982
13982
  const X = Pe(k, 0, Wt, o.length), j = b;
13983
- F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13983
+ F.attr("y1", P).attr("y2", P).transition().duration(j).ease(gt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(gt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(gt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(gt).delay(X).attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(gt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(gt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13984
13984
  } else
13985
13985
  F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13986
13986
  this.attachBoxPointEvents(R, M, k, C, e.getPixelForValue(T), x);
@@ -14079,7 +14079,7 @@ class kw extends Xt {
14079
14079
  const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.getColor(), o = this.data, s = this.context.animate, { barWidth: a, barOffset: l } = this.computeBarGeometry();
14080
14080
  this.processed = this.processWaterfallData(o);
14081
14081
  const c = this.group.selectAll(".katucharts-waterfall-bar").data(this.processed).join("rect").attr("class", "katucharts-waterfall-bar").attr("x", (d) => t.getPixelForValue(d.x ?? 0) + l).attr("width", a).attr("rx", hu(this.config.borderRadius)).attr("fill", (d, p) => this.getBarColor(d, p, r)).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), h = e.getPixelForValue(0), u = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
14082
- s ? c.attr("y", h).attr("height", 0).transition().duration(u).ease(pt).delay((d, p) => Pe(p, 0, Wt, this.processed.length)).attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)) : c.attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)), this.attachBarEvents(c), this.renderConnectors(a, l, !!s), this.renderDataLabels(
14082
+ s ? c.attr("y", h).attr("height", 0).transition().duration(u).ease(gt).delay((d, p) => Pe(p, 0, Wt, this.processed.length)).attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)) : c.attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)), this.attachBarEvents(c), this.renderConnectors(a, l, !!s), this.renderDataLabels(
14083
14083
  this.processed,
14084
14084
  (d) => t.getPixelForValue(d.x ?? 0) + l + a / 2,
14085
14085
  (d) => e.getPixelForValue(d._end)
@@ -14122,7 +14122,7 @@ class kw extends Xt {
14122
14122
  }
14123
14123
  renderConnectors(t, e, i) {
14124
14124
  const { xAxis: r, yAxis: o } = this.context, s = this.config.lineColor || "#999", a = this.config.lineWidth ?? 1, l = sn(this.config.dashStyle || "Dot"), c = this.group.selectAll(".katucharts-waterfall-connector").data(this.processed.slice(0, -1)).join("line").attr("class", "katucharts-waterfall-connector").attr("x1", (h) => r.getPixelForValue(h.x ?? 0) + e + t).attr("x2", (h, f) => r.getPixelForValue(this.processed[f + 1].x ?? 0) + e).attr("y1", (h) => o.getPixelForValue(h._end)).attr("y2", (h) => o.getPixelForValue(h._end)).attr("stroke", s).attr("stroke-width", a).attr("stroke-dasharray", l);
14125
- i && c.attr("opacity", 0).transition().duration(bt).ease(pt).delay((h, f) => bt + f * Wt).attr("opacity", 1);
14125
+ i && c.attr("opacity", 0).transition().duration(bt).ease(gt).delay((h, f) => bt + f * Wt).attr("opacity", 1);
14126
14126
  }
14127
14127
  attachBarEvents(t) {
14128
14128
  if (this.config.enableMouseTracking === !1) return;
@@ -14708,7 +14708,7 @@ class fk extends Xt {
14708
14708
  const S = k(P.depth);
14709
14709
  return (S == null ? void 0 : S.borderWidth) ?? this.config.borderWidth ?? 1;
14710
14710
  }).attr("rx", uk(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
14711
- i ? _.attr("opacity", 0).transition().duration(bt).ease(pt).delay((P, S) => Pe(S, 0, Wt, b.length)).attr("opacity", m) : m !== 1 && _.attr("opacity", m), this.config.enableMouseTracking !== !1 && _.on("mouseover", (P, S) => {
14711
+ i ? _.attr("opacity", 0).transition().duration(bt).ease(gt).delay((P, S) => Pe(S, 0, Wt, b.length)).attr("opacity", m) : m !== 1 && _.attr("opacity", m), this.config.enableMouseTracking !== !1 && _.on("mouseover", (P, S) => {
14712
14712
  var D, z, B, H, J, X;
14713
14713
  const w = rt(P.currentTarget), A = w.attr("fill"), $ = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B = ae(A)) == null ? void 0 : B.brighter($)) == null ? void 0 : H.toString()) || A;
14714
14714
  w.transition("fill").duration(K).ease(Z).attr("fill", R), w.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), _.interrupt("highlight"), _.attr("opacity", 1), _.filter((j) => j !== S).transition("highlight").duration(K).ease(Z).attr("opacity", h);
@@ -14807,7 +14807,7 @@ class fk extends Xt {
14807
14807
  const F = T.append("tspan").attr("font-size", $.fontSize).attr("font-weight", $.fontWeight).text($.text);
14808
14808
  R === 0 && F.attr("x", C).attr("y", I);
14809
14809
  });
14810
- }), this.context.animate && T.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Qn + g * Wt).attr("opacity", 1);
14810
+ }), this.context.animate && T.attr("opacity", 0).transition().duration(bt).ease(gt).delay(Qn + g * Wt).attr("opacity", 1);
14811
14811
  const E = T.node();
14812
14812
  if (E)
14813
14813
  try {
@@ -14880,7 +14880,7 @@ class dk extends Xt {
14880
14880
  }
14881
14881
  }), i ? z.each(function(U, G) {
14882
14882
  const N = rt(this), Y = { x0: U.x0, x1: U.x0, _y0: U._y0, _y1: U._y1 }, O = { x0: U.x0, x1: U.x1, _y0: U._y0, _y1: U._y1 }, ct = se(Y, O);
14883
- N.transition().duration(bt).ease(pt).delay(Fd + G * Wt).attrTween("d", () => (it) => I(ct(it)));
14883
+ N.transition().duration(bt).ease(gt).delay(Fd + G * Wt).attrTween("d", () => (it) => I(ct(it)));
14884
14884
  }) : z.attr("d", I);
14885
14885
  const B = /* @__PURE__ */ new Set();
14886
14886
  for (const U of w)
@@ -15167,7 +15167,7 @@ class pk extends Xt {
15167
15167
  ].join(" "), j = k.append("path").attr("fill", T).attr("stroke", I).attr("stroke-width", E).style("filter", "drop-shadow(0 1px 2px rgba(0,0,0,0.3))").style("cursor", "pointer");
15168
15168
  if (e) {
15169
15169
  const O = this.buildNeedlePath(a, w, A, P, S);
15170
- j.attr("d", O).transition().duration(bt).ease(pt).attrTween("d", () => {
15170
+ j.attr("d", O).transition().duration(bt).ease(gt).attrTween("d", () => {
15171
15171
  const ct = se(a, b);
15172
15172
  return (it) => this.buildNeedlePath(ct(it), w, A, P, S);
15173
15173
  });
@@ -15342,7 +15342,7 @@ class gk extends Xt {
15342
15342
  const L = M ? (o - r) / 2 : d, _ = Se().innerRadius(r).outerRadius(o).cornerRadius(L), T = Se().innerRadius(r).outerRadius(o + 5).cornerRadius(L), I = this.resolveArcColor(b, y, e), E = t.append("path").attr("fill", I).style("cursor", "pointer");
15343
15343
  if (x) {
15344
15344
  const P = se(a, k), S = this;
15345
- E.transition().duration(bt).ease(pt).attrTween("d", () => (w) => {
15345
+ E.transition().duration(bt).ease(gt).attrTween("d", () => (w) => {
15346
15346
  const A = P(w), $ = _.startAngle(a).endAngle(A)({});
15347
15347
  if (y.length > 0) {
15348
15348
  const R = (A - a) / (l - a);
@@ -15495,11 +15495,11 @@ class mu extends Xt {
15495
15495
  const L = v ? L2 : Qi, _ = w2().angle((B, H) => H * x + m).radius((B) => d(B.y ?? 0)).defined((B) => B.y !== null && B.y !== void 0).curve(L), T = r.map((B) => ({ ...B, y: 0 })), I = b.append("path").datum(r).attr("fill", "none").attr("stroke", o).attr("stroke-width", this.config.lineWidth ?? 2);
15496
15496
  if (t === "area") {
15497
15497
  const B = k2().angle((J, X) => X * x + m).innerRadius(0).outerRadius((J) => d(J.y ?? 0)).defined((J) => J.y !== null && J.y !== void 0).curve(L), H = b.append("path").datum(r).attr("fill", this.config.fillColor || o).attr("fill-opacity", this.config.fillOpacity ?? 0.3);
15498
- i ? H.attr("d", B(T) || "").transition().duration(bt).ease(pt).attr("d", B(r) || "") : H.attr("d", B);
15498
+ i ? H.attr("d", B(T) || "").transition().duration(bt).ease(gt).attr("d", B(r) || "") : H.attr("d", B);
15499
15499
  }
15500
- if (i ? I.attr("d", _(T) || "").transition().duration(bt).ease(pt).attr("d", _(r) || "") : I.attr("d", _), y) {
15500
+ if (i ? I.attr("d", _(T) || "").transition().duration(bt).ease(gt).attr("d", _(r) || "") : I.attr("d", _), y) {
15501
15501
  const H = Math.max(...r.map((X) => X.y ?? 0), 1) * 0.02, J = b.selectAll(".katucharts-polar-point").data(r).join("circle").attr("class", "katucharts-polar-point").attr("cx", (X, j) => d(X.y ?? 0) * Math.cos(j * x - Math.PI / 2 + m)).attr("cy", (X, j) => d(X.y ?? 0) * Math.sin(j * x - Math.PI / 2 + m)).attr("fill", ((A = this.config.marker) == null ? void 0 : A.fillColor) || o).attr("stroke", (($ = this.config.marker) == null ? void 0 : $.lineColor) || this.autoBorderColor()).attr("stroke-width", ((R = this.config.marker) == null ? void 0 : R.lineWidth) ?? 1).style("display", (X) => (X.y ?? 0) < H ? "none" : null).style("cursor", this.config.cursor || "pointer");
15502
- if (i ? J.attr("r", 0).attr("opacity", 0).transition().duration(bt).ease(pt).delay((X, j) => j * Wt).attr("r", p).attr("opacity", 1) : J.attr("r", p), this.renderPolarDataLabels(b, r, d, x, m), this.config.enableMouseTracking !== !1) {
15502
+ if (i ? J.attr("r", 0).attr("opacity", 0).transition().duration(bt).ease(gt).delay((X, j) => j * Wt).attr("r", p).attr("opacity", 1) : J.attr("r", p), this.renderPolarDataLabels(b, r, d, x, m), this.config.enableMouseTracking !== !1) {
15503
15503
  const X = ((z = (D = (F = this.config.marker) == null ? void 0 : F.states) == null ? void 0 : D.hover) == null ? void 0 : z.radius) ?? p + 3;
15504
15504
  J.on("mouseover", (j, W) => {
15505
15505
  var O, ct;
@@ -15544,7 +15544,7 @@ class mu extends Xt {
15544
15544
  ).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), I = this.context.stackOffsets;
15545
15545
  i ? T.each(function(S, w) {
15546
15546
  const A = rt(this), $ = w * p - Math.PI / 2 + g + m, R = (w + 1) * p - Math.PI / 2 + g - m, F = b && I ? d(I.get(w) ?? 0) : 0, D = F + d(S.y ?? 0);
15547
- A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle: $ + Math.PI / 2, endAngle: R + Math.PI / 2 }) || "").transition().duration(bt).ease(pt).delay(w * Wt).attrTween("d", () => (z) => _({
15547
+ A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle: $ + Math.PI / 2, endAngle: R + Math.PI / 2 }) || "").transition().duration(bt).ease(gt).delay(w * Wt).attrTween("d", () => (z) => _({
15548
15548
  innerRadius: F,
15549
15549
  outerRadius: F + (D - F) * z,
15550
15550
  startAngle: $ + Math.PI / 2,
@@ -15651,15 +15651,15 @@ class bk extends Xt {
15651
15651
  const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.config, o = this.data, s = Math.min(40, t.height / Math.max(o.length, 1)), a = (t.height - o.length * s) / 2, l = ((m = this.config.marker) == null ? void 0 : m.radius) ?? 6, c = (x = this.config.marker) == null ? void 0 : x.lineColor, h = r.colorByPoint !== !1, f = r.connectorColor ?? "#ccc", u = r.connectorWidth ?? r.lineWidth ?? 4, d = this.config.dataLabels || {}, p = ((v = d.style) == null ? void 0 : v.fontSize) || Mt, y = d.color || ((b = d.style) == null ? void 0 : b.color) || Ee, g = [];
15652
15652
  o.forEach((k, M) => {
15653
15653
  const C = a + M * s, L = k.color || (h ? e[M % e.length] : r.color || e[0]), _ = this.group.append("circle").attr("cx", 20).attr("cy", C + s / 2).attr("fill", L).style("cursor", "pointer");
15654
- if (c && _.attr("stroke", c), i ? _.attr("r", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("r", l) : _.attr("r", l), M < o.length - 1) {
15654
+ if (c && _.attr("stroke", c), i ? _.attr("r", 0).transition().duration(bt).ease(gt).delay(M * Wt).attr("r", l) : _.attr("r", l), M < o.length - 1) {
15655
15655
  const $ = this.group.append("line").attr("x1", 20).attr("x2", 20).attr("y1", C + s / 2 + l).attr("y2", C + s + s / 2 - l).attr("stroke", f).attr("stroke-width", u);
15656
- i && $.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
15656
+ i && $.attr("opacity", 0).transition().duration(bt).ease(gt).delay(M * Wt).attr("opacity", 1);
15657
15657
  }
15658
15658
  const T = k.label || k.name || `Event ${M + 1}`, I = this.group.append("text").attr("x", 36).attr("y", C + s / 2).attr("dy", "0.35em").attr("font-size", p).attr("fill", y).style("cursor", "pointer").text(T);
15659
- i && I.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
15659
+ i && I.attr("opacity", 0).transition().duration(bt).ease(gt).delay(M * Wt).attr("opacity", 1);
15660
15660
  let E = null;
15661
15661
  const P = k.description;
15662
- P && (E = this.group.append("text").attr("x", 36).attr("y", C + s / 2 + 14).attr("dy", "0.35em").attr("font-size", "10px").attr("fill", "#777").style("pointer-events", "none").text(P), i && E.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1)), g.push({ circle: _, text: I, desc: E });
15662
+ P && (E = this.group.append("text").attr("x", 36).attr("y", C + s / 2 + 14).attr("dy", "0.35em").attr("font-size", "10px").attr("fill", "#777").style("pointer-events", "none").text(P), i && E.attr("opacity", 0).transition().duration(bt).ease(gt).delay(M * Wt).attr("opacity", 1)), g.push({ circle: _, text: I, desc: E });
15663
15663
  const S = ($) => {
15664
15664
  _.transition("size").duration(K).ease(Z).attr("r", l + 3), _.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), I.attr("font-weight", "bold"), g.forEach((R) => {
15665
15665
  R.circle.interrupt("highlight"), R.text.interrupt("highlight"), R.circle.attr("opacity", 1), R.text.attr("opacity", 1), R.desc && (R.desc.interrupt("highlight"), R.desc.attr("opacity", 1));
@@ -15720,7 +15720,7 @@ class vk extends Xt {
15720
15720
  return { xMin: t, xMax: e, yMin: 0, yMax: 0 };
15721
15721
  }
15722
15722
  }
15723
- var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, qe = zt * 2, Ie = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Rt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Pt = Math.sin, an = Math.sign || function(n) {
15723
+ var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, qe = zt * 2, Fe = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Dt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Et = Math.sin, an = Math.sign || function(n) {
15724
15724
  return n > 0 ? 1 : n < 0 ? -1 : 0;
15725
15725
  }, He = Math.sqrt, sl = Math.tan;
15726
15726
  function qd(n) {
@@ -15784,8 +15784,8 @@ function tc(n) {
15784
15784
  return [Wn(n[1], n[0]), ln(n[2])];
15785
15785
  }
15786
15786
  function Zi(n) {
15787
- var t = n[0], e = n[1], i = Rt(e);
15788
- return [i * Rt(t), i * Pt(t), Pt(e)];
15787
+ var t = n[0], e = n[1], i = Dt(e);
15788
+ return [i * Dt(t), i * Et(t), Et(e)];
15789
15789
  }
15790
15790
  function po(n, t) {
15791
15791
  return n[0] * t[0] + n[1] * t[1] + n[2] * t[2];
@@ -15828,16 +15828,16 @@ function ku(n) {
15828
15828
  return t.invert = wu(-n), t;
15829
15829
  }
15830
15830
  function Mu(n, t) {
15831
- var e = Rt(n), i = Pt(n), r = Rt(t), o = Pt(t);
15831
+ var e = Dt(n), i = Et(n), r = Dt(t), o = Et(t);
15832
15832
  function s(a, l) {
15833
- var c = Rt(l), h = Rt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * e + h * i;
15833
+ var c = Dt(l), h = Dt(a) * c, f = Et(a) * c, u = Et(l), d = u * e + h * i;
15834
15834
  return [
15835
15835
  Wn(f * r - d * o, h * e - u * i),
15836
15836
  ln(d * r + f * o)
15837
15837
  ];
15838
15838
  }
15839
15839
  return s.invert = function(a, l) {
15840
- var c = Rt(l), h = Rt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * r - f * o;
15840
+ var c = Dt(l), h = Dt(a) * c, f = Et(a) * c, u = Et(l), d = u * r - f * o;
15841
15841
  return [
15842
15842
  Wn(f * r + u * o, h * e + d * i),
15843
15843
  ln(d * e - h * i)
@@ -15847,18 +15847,18 @@ function Mu(n, t) {
15847
15847
  function wk(n) {
15848
15848
  n = jd(n[0] * te, n[1] * te, n.length > 2 ? n[2] * te : 0);
15849
15849
  function t(e) {
15850
- return e = n(e[0] * te, e[1] * te), e[0] *= Ie, e[1] *= Ie, e;
15850
+ return e = n(e[0] * te, e[1] * te), e[0] *= Fe, e[1] *= Fe, e;
15851
15851
  }
15852
15852
  return t.invert = function(e) {
15853
- return e = n.invert(e[0] * te, e[1] * te), e[0] *= Ie, e[1] *= Ie, e;
15853
+ return e = n.invert(e[0] * te, e[1] * te), e[0] *= Fe, e[1] *= Fe, e;
15854
15854
  }, t;
15855
15855
  }
15856
15856
  function kk(n, t, e, i, r, o) {
15857
15857
  if (e) {
15858
- var s = Rt(t), a = Pt(t), l = i * e;
15858
+ var s = Dt(t), a = Et(t), l = i * e;
15859
15859
  r == null ? (r = t + i * qe, o = t - l / 2) : (r = Au(s, r), o = Au(s, o), (i > 0 ? r < o : r > o) && (r += i * qe));
15860
15860
  for (var c, h = r; i > 0 ? h > o : h < o; h -= l)
15861
- c = tc([s, -a * Rt(h), -a * Pt(h)]), n.point(c[0], c[1]);
15861
+ c = tc([s, -a * Dt(h), -a * Et(h)]), n.point(c[0], c[1]);
15862
15862
  }
15863
15863
  }
15864
15864
  function Au(n, t) {
@@ -15943,13 +15943,13 @@ function ga(n) {
15943
15943
  return Gt(n[0]) <= zt ? n[0] : an(n[0]) * ((Gt(n[0]) + zt) % qe - zt);
15944
15944
  }
15945
15945
  function Mk(n, t) {
15946
- var e = ga(t), i = t[1], r = Pt(i), o = [Pt(e), -Rt(e), 0], s = 0, a = 0, l = new yi();
15946
+ var e = ga(t), i = t[1], r = Et(i), o = [Et(e), -Dt(e), 0], s = 0, a = 0, l = new yi();
15947
15947
  r === 1 ? i = ee + At : r === -1 && (i = -ee - At);
15948
15948
  for (var c = 0, h = n.length; c < h; ++c)
15949
15949
  if (u = (f = n[c]).length)
15950
- for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Pt(y), m = Rt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
15951
- var v = f[x], b = ga(v), k = v[1] / 2 + yu, M = Pt(k), C = Rt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
15952
- if (l.add(Wn(E * _ * Pt(T), m * C + E * Rt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15950
+ for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Et(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
15951
+ var v = f[x], b = ga(v), k = v[1] / 2 + yu, M = Et(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
15952
+ if (l.add(Wn(E * _ * Et(T), m * C + E * Dt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15953
15953
  var P = es(Zi(d), Zi(v));
15954
15954
  ec(P);
15955
15955
  var S = es(o, P);
@@ -16046,8 +16046,8 @@ function _k(n) {
16046
16046
  };
16047
16047
  }
16048
16048
  function Ck(n, t, e, i) {
16049
- var r, o, s = Pt(n - e);
16050
- return Gt(s) > At ? tr((Pt(t) * (o = Rt(i)) * Pt(e) - Pt(i) * (r = Rt(t)) * Pt(n)) / (r * o * s)) : (t + i) / 2;
16049
+ var r, o, s = Et(n - e);
16050
+ return Gt(s) > At ? tr((Et(t) * (o = Dt(i)) * Et(e) - Et(i) * (r = Dt(t)) * Et(n)) / (r * o * s)) : (t + i) / 2;
16051
16051
  }
16052
16052
  function Pk(n, t, e, i) {
16053
16053
  var r;
@@ -16060,12 +16060,12 @@ function Pk(n, t, e, i) {
16060
16060
  i.point(t[0], t[1]);
16061
16061
  }
16062
16062
  function Ek(n) {
16063
- var t = Rt(n), e = 2 * te, i = t > 0, r = Gt(t) > At;
16063
+ var t = Dt(n), e = 2 * te, i = t > 0, r = Gt(t) > At;
16064
16064
  function o(h, f, u, d) {
16065
16065
  kk(d, n, e, u, h, f);
16066
16066
  }
16067
16067
  function s(h, f) {
16068
- return Rt(h) * Rt(f) > t;
16068
+ return Dt(h) * Dt(f) > t;
16069
16069
  }
16070
16070
  function a(h) {
16071
16071
  var f, u, d, p, y;
@@ -16584,7 +16584,7 @@ function fp(n, t, e) {
16584
16584
  n.scale(150 * o).translate([s, a]);
16585
16585
  }, e);
16586
16586
  }
16587
- var Ru = 16, Yk = Rt(30 * te);
16587
+ var Ru = 16, Yk = Dt(30 * te);
16588
16588
  function Du(n, t) {
16589
16589
  return +t ? Uk(n, t) : Xk(n);
16590
16590
  }
@@ -16663,7 +16663,7 @@ function Zk(n, t, e, i, r) {
16663
16663
  }
16664
16664
  function zu(n, t, e, i, r, o) {
16665
16665
  if (!o) return Zk(n, t, e, i, r);
16666
- var s = Rt(o), a = Pt(o), l = s * n, c = a * n, h = s / n, f = a / n, u = (a * e - s * t) / n, d = (a * t + s * e) / n;
16666
+ var s = Dt(o), a = Et(o), l = s * n, c = a * n, h = s / n, f = a / n, u = (a * e - s * t) / n, d = (a * t + s * e) / n;
16667
16667
  function p(y, g) {
16668
16668
  return y *= i, g *= r, [l * y - c * g + t, e - c * y - l * g];
16669
16669
  }
@@ -16682,7 +16682,7 @@ function dp(n) {
16682
16682
  return L(w[0] * te, w[1] * te);
16683
16683
  }
16684
16684
  function E(w) {
16685
- return w = L.invert(w[0], w[1]), w && [w[0] * Ie, w[1] * Ie];
16685
+ return w = L.invert(w[0], w[1]), w && [w[0] * Fe, w[1] * Fe];
16686
16686
  }
16687
16687
  I.stream = function(w) {
16688
16688
  return _ && T === w ? _ : _ = qk(jk(h)(y(M(b(T = w)))));
@@ -16691,7 +16691,7 @@ function dp(n) {
16691
16691
  }, I.postclip = function(w) {
16692
16692
  return arguments.length ? (b = w, g = m = x = v = null, S()) : b;
16693
16693
  }, I.clipAngle = function(w) {
16694
- return arguments.length ? (y = +w ? Ek(p = w * te) : (p = null, _u), S()) : p * Ie;
16694
+ return arguments.length ? (y = +w ? Ek(p = w * te) : (p = null, _u), S()) : p * Fe;
16695
16695
  }, I.clipExtent = function(w) {
16696
16696
  return arguments.length ? (b = w == null ? (g = m = x = v = null, rc) : $k(g = +w[0][0], m = +w[0][1], x = +w[1][0], v = +w[1][1]), S()) : g == null ? null : [[g, m], [x, v]];
16697
16697
  }, I.scale = function(w) {
@@ -16699,11 +16699,11 @@ function dp(n) {
16699
16699
  }, I.translate = function(w) {
16700
16700
  return arguments.length ? (i = +w[0], r = +w[1], P()) : [i, r];
16701
16701
  }, I.center = function(w) {
16702
- return arguments.length ? (o = w[0] % 360 * te, s = w[1] % 360 * te, P()) : [o * Ie, s * Ie];
16702
+ return arguments.length ? (o = w[0] % 360 * te, s = w[1] % 360 * te, P()) : [o * Fe, s * Fe];
16703
16703
  }, I.rotate = function(w) {
16704
- return arguments.length ? (a = w[0] % 360 * te, l = w[1] % 360 * te, c = w.length > 2 ? w[2] % 360 * te : 0, P()) : [a * Ie, l * Ie, c * Ie];
16704
+ return arguments.length ? (a = w[0] % 360 * te, l = w[1] % 360 * te, c = w.length > 2 ? w[2] % 360 * te : 0, P()) : [a * Fe, l * Fe, c * Fe];
16705
16705
  }, I.angle = function(w) {
16706
- return arguments.length ? (f = w % 360 * te, P()) : f * Ie;
16706
+ return arguments.length ? (f = w % 360 * te, P()) : f * Fe;
16707
16707
  }, I.reflectX = function(w) {
16708
16708
  return arguments.length ? (u = w ? -1 : 1, P()) : u < 0;
16709
16709
  }, I.reflectY = function(w) {
@@ -16733,25 +16733,25 @@ function dp(n) {
16733
16733
  function hl(n) {
16734
16734
  var t = 0, e = zt / 3, i = dp(n), r = i(t, e);
16735
16735
  return r.parallels = function(o) {
16736
- return arguments.length ? i(t = o[0] * te, e = o[1] * te) : [t * Ie, e * Ie];
16736
+ return arguments.length ? i(t = o[0] * te, e = o[1] * te) : [t * Fe, e * Fe];
16737
16737
  }, r;
16738
16738
  }
16739
16739
  function Kk(n) {
16740
- var t = Rt(n);
16740
+ var t = Dt(n);
16741
16741
  function e(i, r) {
16742
- return [i * t, Pt(r) / t];
16742
+ return [i * t, Et(r) / t];
16743
16743
  }
16744
16744
  return e.invert = function(i, r) {
16745
16745
  return [i / t, ln(r * t)];
16746
16746
  }, e;
16747
16747
  }
16748
16748
  function Jk(n, t) {
16749
- var e = Pt(n), i = (e + Pt(t)) / 2;
16749
+ var e = Et(n), i = (e + Et(t)) / 2;
16750
16750
  if (Gt(i) < At) return Kk(n);
16751
16751
  var r = 1 + e * (2 * i - e), o = He(r) / i;
16752
16752
  function s(a, l) {
16753
- var c = He(r - 2 * i * Pt(l)) / i;
16754
- return [c * Pt(a *= i), o - c * Rt(a)];
16753
+ var c = He(r - 2 * i * Et(l)) / i;
16754
+ return [c * Et(a *= i), o - c * Dt(a)];
16755
16755
  }
16756
16756
  return s.invert = function(a, l) {
16757
16757
  var c = o - l, h = Wn(a, Gt(c)) * an(c);
@@ -16824,16 +16824,16 @@ function tM() {
16824
16824
  }
16825
16825
  function gp(n) {
16826
16826
  return function(t, e) {
16827
- var i = Rt(t), r = Rt(e), o = n(i * r);
16827
+ var i = Dt(t), r = Dt(e), o = n(i * r);
16828
16828
  return o === 1 / 0 ? [2, 0] : [
16829
- o * r * Pt(t),
16830
- o * Pt(e)
16829
+ o * r * Et(t),
16830
+ o * Et(e)
16831
16831
  ];
16832
16832
  };
16833
16833
  }
16834
16834
  function Kr(n) {
16835
16835
  return function(t, e) {
16836
- var i = He(t * t + e * e), r = n(i), o = Pt(r), s = Rt(r);
16836
+ var i = He(t * t + e * e), r = n(i), o = Et(r), s = Dt(r);
16837
16837
  return [
16838
16838
  Wn(t * o, i * s),
16839
16839
  ln(i && e * o / i)
@@ -16850,7 +16850,7 @@ function eM() {
16850
16850
  return Sn(mp).scale(124.75).clipAngle(180 - 1e-3);
16851
16851
  }
16852
16852
  var yp = gp(function(n) {
16853
- return (n = qd(n)) && n / Pt(n);
16853
+ return (n = qd(n)) && n / Et(n);
16854
16854
  });
16855
16855
  yp.invert = Kr(function(n) {
16856
16856
  return n;
@@ -16888,12 +16888,12 @@ function xo(n) {
16888
16888
  return sl((ee + n) / 2);
16889
16889
  }
16890
16890
  function iM(n, t) {
16891
- var e = Rt(n), i = n === t ? Pt(n) : Qo(e / Rt(t)) / Qo(xo(t) / xo(n)), r = e * da(xo(n), i) / i;
16891
+ var e = Dt(n), i = n === t ? Et(n) : Qo(e / Dt(t)) / Qo(xo(t) / xo(n)), r = e * da(xo(n), i) / i;
16892
16892
  if (!i) return Es;
16893
16893
  function o(s, a) {
16894
16894
  r > 0 ? a < -ee + At && (a = -ee + At) : a > ee - At && (a = ee - At);
16895
16895
  var l = r / da(xo(a), i);
16896
- return [l * Pt(i * s), r - l * Rt(i * s)];
16896
+ return [l * Et(i * s), r - l * Dt(i * s)];
16897
16897
  }
16898
16898
  return o.invert = function(s, a) {
16899
16899
  var l = r - a, c = an(i) * He(s * s + l * l), h = Wn(s, Gt(l)) * an(l);
@@ -16911,11 +16911,11 @@ function oM() {
16911
16911
  return Sn(ls).scale(152.63);
16912
16912
  }
16913
16913
  function sM(n, t) {
16914
- var e = Rt(n), i = n === t ? Pt(n) : (e - Rt(t)) / (t - n), r = e / i + n;
16914
+ var e = Dt(n), i = n === t ? Et(n) : (e - Dt(t)) / (t - n), r = e / i + n;
16915
16915
  if (Gt(i) < At) return ls;
16916
16916
  function o(s, a) {
16917
16917
  var l = r - a, c = i * s;
16918
- return [l * Pt(c), r - l * Rt(c)];
16918
+ return [l * Et(c), r - l * Dt(c)];
16919
16919
  }
16920
16920
  return o.invert = function(s, a) {
16921
16921
  var l = r - a, c = Wn(s, Gt(l)) * an(l);
@@ -16927,9 +16927,9 @@ function aM() {
16927
16927
  }
16928
16928
  var Lr = 1.340264, Ir = -0.081106, Fr = 893e-6, Rr = 3796e-6, hs = He(3) / 2, cM = 12;
16929
16929
  function bp(n, t) {
16930
- var e = ln(hs * Pt(t)), i = e * e, r = i * i * i;
16930
+ var e = ln(hs * Et(t)), i = e * e, r = i * i * i;
16931
16931
  return [
16932
- n * Rt(e) / (hs * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i))),
16932
+ n * Dt(e) / (hs * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i))),
16933
16933
  e * (Lr + Ir * i + r * (Fr + Rr * i))
16934
16934
  ];
16935
16935
  }
@@ -16937,16 +16937,16 @@ bp.invert = function(n, t) {
16937
16937
  for (var e = t, i = e * e, r = i * i * i, o = 0, s, a, l; o < cM && (a = e * (Lr + Ir * i + r * (Fr + Rr * i)) - t, l = Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i), e -= s = a / l, i = e * e, r = i * i * i, !(Gt(s) < Xd)); ++o)
16938
16938
  ;
16939
16939
  return [
16940
- hs * n * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i)) / Rt(e),
16941
- ln(Pt(e) / hs)
16940
+ hs * n * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i)) / Dt(e),
16941
+ ln(Et(e) / hs)
16942
16942
  ];
16943
16943
  };
16944
16944
  function Ou() {
16945
16945
  return Sn(bp).scale(177.158);
16946
16946
  }
16947
16947
  function vp(n, t) {
16948
- var e = Rt(t), i = Rt(n) * e;
16949
- return [e * Pt(n) / i, Pt(t) / i];
16948
+ var e = Dt(t), i = Dt(n) * e;
16949
+ return [e * Et(n) / i, Et(t) / i];
16950
16950
  }
16951
16951
  vp.invert = Kr(tr);
16952
16952
  function lM() {
@@ -16974,15 +16974,15 @@ function pc() {
16974
16974
  return Sn(wp).scale(175.295);
16975
16975
  }
16976
16976
  function kp(n, t) {
16977
- return [Rt(t) * Pt(n), Pt(t)];
16977
+ return [Dt(t) * Et(n), Et(t)];
16978
16978
  }
16979
16979
  kp.invert = Kr(ln);
16980
16980
  function Nu() {
16981
16981
  return Sn(kp).scale(249.5).clipAngle(90 + At);
16982
16982
  }
16983
16983
  function Mp(n, t) {
16984
- var e = Rt(t), i = 1 + Rt(n) * e;
16985
- return [e * Pt(n) / i, Pt(t) / i];
16984
+ var e = Dt(t), i = 1 + Dt(n) * e;
16985
+ return [e * Et(n) / i, Et(t) / i];
16986
16986
  }
16987
16987
  Mp.invert = Kr(function(n) {
16988
16988
  return 2 * tr(n);
@@ -17185,7 +17185,7 @@ class wM extends Xt {
17185
17185
  const E = this.getFeatureKey(I, h);
17186
17186
  return this.dataMap.has(E);
17187
17187
  }), L = this.context.animate;
17188
- this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(pt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ul(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : ((T = e.mapNavigation) == null ? void 0 : T.enabled) !== !1 && this.setupMapNavigation(r, o);
17188
+ this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(gt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ul(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : ((T = e.mapNavigation) == null ? void 0 : T.enabled) !== !1 && this.setupMapNavigation(r, o);
17189
17189
  }
17190
17190
  /**
17191
17191
  * Builds a 0‒1 value normalizer honoring `colorAxis.type`. A `'logarithmic'`
@@ -17428,7 +17428,7 @@ class kM extends Xt {
17428
17428
  const [T, I] = _, E = M.color || u, P = ((w = M.marker) == null ? void 0 : w.radius) ?? c, S = s.append("g").attr("class", "katucharts-mappoint");
17429
17429
  if (l) {
17430
17430
  const A = S.append("circle").attr("class", "katucharts-mappoint-marker").attr("cx", T).attr("cy", I).attr("fill", E).attr("stroke", h).attr("stroke-width", f).style("cursor", t.cursor || "pointer").attr("r", d ? 0 : P);
17431
- d && A.transition().duration(bt).delay(C * 12).ease(pt).attr("r", P), A.on("mouseover", ($) => {
17431
+ d && A.transition().duration(bt).delay(C * 12).ease(gt).attr("r", P), A.on("mouseover", ($) => {
17432
17432
  var R, F;
17433
17433
  rt($.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P * 1.4), this.context.events.emit("point:mouseover", {
17434
17434
  point: M,
@@ -17506,9 +17506,9 @@ class MM extends Xt {
17506
17506
  const M = r(b), C = r(k);
17507
17507
  if (!M || !C || !isFinite(M[0]) || !isFinite(C[0])) return;
17508
17508
  const L = v.weight ?? v.y ?? v.value ?? 1, _ = Math.max(2, y * (L / p)), T = v.color || l, { d: I, mid: E, tip: P, tipAngle: S } = this.buildFlowPath(M, C, _, h), w = a.append("path").attr("class", "katucharts-flowmap-link").attr("d", I).attr("fill", T).attr("fill-opacity", u ? 0 : c).attr("stroke", "none").style("cursor", t.cursor || "pointer");
17509
- if (u && w.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c), f) {
17509
+ if (u && w.transition().duration(bt).delay(x * 30).ease(gt).attr("fill-opacity", c), f) {
17510
17510
  const A = _ * 1.1 + 3, $ = a.append("path").attr("class", "katucharts-flowmap-arrow").attr("d", this.arrowHead(P, S, A)).attr("fill", T).attr("fill-opacity", u ? 0 : c).style("pointer-events", "none");
17511
- u && $.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c);
17511
+ u && $.transition().duration(bt).delay(x * 30).ease(gt).attr("fill-opacity", c);
17512
17512
  }
17513
17513
  w.on("mouseover", (A) => {
17514
17514
  var $, R;
@@ -17695,7 +17695,7 @@ class _M extends Xt {
17695
17695
  } catch {
17696
17696
  }
17697
17697
  }
17698
- }), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(pt).delay((_, T) => T * Wt).attr("opacity", 1), this.config.enableMouseTracking !== !1 && this.attachEvents(C, b, f, u, d, m), this.renderLabels(b, i ?? !1);
17698
+ }), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(gt).delay((_, T) => T * Wt).attr("opacity", 1), this.config.enableMouseTracking !== !1 && this.attachEvents(C, b, f, u, d, m), this.renderLabels(b, i ?? !1);
17699
17699
  }
17700
17700
  resolveDashStyle(t) {
17701
17701
  return t && SM[t] || "none";
@@ -17757,7 +17757,7 @@ class _M extends Xt {
17757
17757
  y: m.value
17758
17758
  }) : m.name;
17759
17759
  Gu(v[x], String(b ?? ""), m.labelX);
17760
- }), e && g.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
17760
+ }), e && g.attr("opacity", 0).transition().duration(bt).ease(gt).attr("opacity", 1);
17761
17761
  }
17762
17762
  const f = this.group.selectAll(".katucharts-venn-inter-label").data(h, (g) => g.key).join("text").attr("class", "katucharts-venn-inter-label").attr("x", (g) => g.labelX).attr("y", (g) => g.labelY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", Mt).attr("fill", Ee).style("pointer-events", "none").style("text-shadow", "0 0 3px #fff, 0 0 3px #fff").attr("opacity", o ? 1 : 0);
17763
17763
  if (f.each((g, m, x) => {
@@ -18169,7 +18169,7 @@ class TM extends Xt {
18169
18169
  }).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1), f.enabled !== !1 && L.append("text").attr("dy", r === "horizontal" ? "0.32em" : s + 12).attr("x", r === "horizontal" ? (E) => E.children ? -(s + 4) : s + 4 : 0).attr("text-anchor", r === "horizontal" ? (E) => E.children ? "end" : "start" : "middle").attr("font-size", u).attr("fill", d).style("pointer-events", "none").text((E) => {
18170
18170
  var P, S;
18171
18171
  return ((P = E.data) == null ? void 0 : P.name) ?? ((S = E.data) == null ? void 0 : S.id) ?? "";
18172
- }), this.context.animate && b.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
18172
+ }), this.context.animate && b.attr("opacity", 0).transition().duration(bt).ease(gt).attr("opacity", 1);
18173
18173
  }
18174
18174
  buildRoot(t) {
18175
18175
  if (t.some((o) => o.children && o.children.length > 0))
@@ -18218,7 +18218,7 @@ class $M extends Xt {
18218
18218
  g.forEach((_, T) => {
18219
18219
  const I = _.word.color || e[T % Math.max(1, e.length)] || c;
18220
18220
  m.append("text").attr("x", _.x).attr("y", _.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("transform", _.rotation ? `rotate(${_.rotation},${_.x},${_.y})` : null).attr("font-size", _.fontSize).attr("font-family", l).attr("fill", I).style("pointer-events", "none").text(_.word.name);
18221
- }), this.context.animate && m.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
18221
+ }), this.context.animate && m.attr("opacity", 0).transition().duration(bt).ease(gt).attr("opacity", 1);
18222
18222
  }
18223
18223
  createMeasurer(t, e) {
18224
18224
  const i = t.ownerSVGElement || t, o = document.createElementNS("http://www.w3.org/2000/svg", "text");
@@ -18291,7 +18291,7 @@ class IM extends Xt {
18291
18291
  const U = W.append("line").attr("x1", B).attr("x2", B).attr("stroke", J.wick).attr("stroke-width", x), G = H ? z : R, N = H ? R : z, Y = e.getPixelForValue(G), O = Math.max(1, Math.abs(e.getPixelForValue(N) - e.getPixelForValue(G))), ct = W.append("rect").attr("x", B - d / 2).attr("width", d).attr("stroke", j).attr("stroke-width", x).attr("rx", 2);
18292
18292
  if (r) {
18293
18293
  const it = e.getPixelForValue((F + D) / 2), ft = Pe(A, 0, Wt, s.length);
18294
- U.attr("y1", it).attr("y2", it).transition().duration(bt).ease(pt).delay(ft).attr("y1", e.getPixelForValue(F)).attr("y2", e.getPixelForValue(D)), ct.attr("y", it).attr("height", 0).attr("fill", X).transition().duration(bt).ease(pt).delay(ft).attr("y", Y).attr("height", O);
18294
+ U.attr("y1", it).attr("y2", it).transition().duration(bt).ease(gt).delay(ft).attr("y1", e.getPixelForValue(F)).attr("y2", e.getPixelForValue(D)), ct.attr("y", it).attr("height", 0).attr("fill", X).transition().duration(bt).ease(gt).delay(ft).attr("y", Y).attr("height", O);
18295
18295
  } else
18296
18296
  U.attr("y1", e.getPixelForValue(F)).attr("y2", e.getPixelForValue(D)), ct.attr("y", Y).attr("height", O).attr("fill", X);
18297
18297
  this.config.enableMouseTracking !== !1 && W.on("mouseover", (it) => {
@@ -18316,8 +18316,8 @@ class IM extends Xt {
18316
18316
  event: it
18317
18317
  }), (dt = (ft = $.events) == null ? void 0 : ft.mouseOut) == null || dt.call($, it);
18318
18318
  }).on("click", (it) => {
18319
- var ft, dt, at, ot, q, st, wt, Ct;
18320
- b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft = $.events) == null ? void 0 : ft.unselect) == null || dt.call($, it)) : (this.selectedIndices.add(A), W.select("rect").attr("stroke", M || "#000").attr("stroke-width", k ? 2 : x + 1), k && W.select("rect").attr("fill", k), (ot = (at = $.events) == null ? void 0 : at.select) == null || ot.call($, it))), this.context.events.emit("point:click", { point: $, index: A, series: this, event: it }), (st = (q = $.events) == null ? void 0 : q.click) == null || st.call($, it), (Ct = (wt = this.config.events) == null ? void 0 : wt.click) == null || Ct.call(this, it);
18319
+ var ft, dt, at, ot, q, st, wt, Pt;
18320
+ b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft = $.events) == null ? void 0 : ft.unselect) == null || dt.call($, it)) : (this.selectedIndices.add(A), W.select("rect").attr("stroke", M || "#000").attr("stroke-width", k ? 2 : x + 1), k && W.select("rect").attr("fill", k), (ot = (at = $.events) == null ? void 0 : at.select) == null || ot.call($, it))), this.context.events.emit("point:click", { point: $, index: A, series: this, event: it }), (st = (q = $.events) == null ? void 0 : q.click) == null || st.call($, it), (Pt = (wt = this.config.events) == null ? void 0 : wt.click) == null || Pt.call(this, it);
18321
18321
  });
18322
18322
  }
18323
18323
  this.renderCandlestickLabels(s, t, e);
@@ -18395,7 +18395,7 @@ class FM extends Xt {
18395
18395
  const p = o[d];
18396
18396
  if (p.y === null && p.open === void 0) continue;
18397
18397
  const y = p.open ?? p.y ?? 0, g = p.high ?? y, m = p.low ?? y, x = p.close ?? y, v = t.getPixelForValue(p.x ?? d), b = x >= y ? l : a, k = this.group.append("g").attr("class", "katucharts-ohlc").style("cursor", this.config.cursor || "pointer");
18398
- h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Pe(d, 0, Wt, o.length)).attr("opacity", 1), k.append("line").attr("x1", v).attr("x2", v).attr("y1", e.getPixelForValue(g)).attr("y2", e.getPixelForValue(m)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v - s).attr("x2", v).attr("y1", e.getPixelForValue(y)).attr("y2", e.getPixelForValue(y)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v).attr("x2", v + s).attr("y1", e.getPixelForValue(x)).attr("y2", e.getPixelForValue(x)).attr("stroke", b).attr("stroke-width", 1.5), this.config.enableMouseTracking !== !1 && k.on("mouseover", (M) => {
18398
+ h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(gt).delay(Pe(d, 0, Wt, o.length)).attr("opacity", 1), k.append("line").attr("x1", v).attr("x2", v).attr("y1", e.getPixelForValue(g)).attr("y2", e.getPixelForValue(m)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v - s).attr("x2", v).attr("y1", e.getPixelForValue(y)).attr("y2", e.getPixelForValue(y)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v).attr("x2", v + s).attr("y1", e.getPixelForValue(x)).attr("y2", e.getPixelForValue(x)).attr("stroke", b).attr("stroke-width", 1.5), this.config.enableMouseTracking !== !1 && k.on("mouseover", (M) => {
18399
18399
  var C, L;
18400
18400
  k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_, T) => {
18401
18401
  T !== d && _.transition("highlight").duration(K).ease(Z).attr("opacity", c);
@@ -18844,13 +18844,13 @@ class rA extends Xt {
18844
18844
  const Lt = Math.floor(tt / S) - 1;
18845
18845
  return Lt < lt ? "" : Lt >= V.length ? V : V.slice(0, Lt) + "…";
18846
18846
  }, R = r.nodeAlignment === "left" ? zM : _p, D = h ? 5 : c ? 8 : l ? 10 : 14, z = typeof f == "number" ? f : 20, B = (V, tt, lt, St) => {
18847
- const Lt = Math.max(tt + St + 20, t.width - lt), $e = WM().nodeId((ge) => ge.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), xe = $e({ nodes: [...s], links: [...a] });
18847
+ const Lt = Math.max(tt + St + 20, t.width - lt), Le = WM().nodeId((ge) => ge.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), xe = Le({ nodes: [...s], links: [...a] });
18848
18848
  for (const ge of xe.nodes)
18849
18849
  if (ge.x0 < tt) {
18850
18850
  const yn = ge.x1 - ge.x0;
18851
18851
  ge.x0 = tt, ge.x1 = tt + yn;
18852
18852
  }
18853
- return { gen: $e, graph: xe };
18853
+ return { gen: Le, graph: xe };
18854
18854
  };
18855
18855
  let H = z;
18856
18856
  const J = B(g, 0, 0, H), X = (V) => p && typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : V.layer ?? V.depth ?? 0, j = p ? y : J.graph.nodes.reduce((V, tt) => Math.max(V, tt.depth ?? 0), 0), W = J.graph.nodes.reduce((V, tt) => Math.min(V, tt.x0 ?? 1 / 0), 1 / 0), U = p ? J.graph.nodes.filter((V) => X(V) === 0) : J.graph.nodes.filter((V) => (V.x0 ?? 1 / 0) <= W + 0.5), G = L ? Math.max(0, ...U.map((V) => A(w(V)))) : 0, N = L && l ? Math.min(Math.floor(t.width * 0.08), Math.max(0, G * 0.18)) : 0, Y = L && !h, O = 0, ct = Math.max(1, t.width - N - O), it = Math.max(j, 0);
@@ -18866,19 +18866,19 @@ class rA extends Xt {
18866
18866
  st.set(tt, (st.get(tt) ?? 0) + 1);
18867
18867
  }
18868
18868
  const wt = Math.max(1, ...st.values());
18869
- let Ct = g;
18869
+ let Pt = g;
18870
18870
  const kt = typeof r.nodePadding != "number";
18871
18871
  if (L && kt && wt > 1) {
18872
18872
  const V = I * 1.3;
18873
- t.height * 0.82 / (wt - 1) >= V && (Ct = Math.max(g, V));
18873
+ t.height * 0.82 / (wt - 1) >= V && (Pt = Math.max(g, V));
18874
18874
  }
18875
- if (wt * Ct > t.height && (Ct = Math.max(1, t.height / wt)), Ct !== g && ({ gen: ot, graph: q } = B(Ct, dt, at, H)), u) {
18875
+ if (wt * Pt > t.height && (Pt = Math.max(1, t.height / wt)), Pt !== g && ({ gen: ot, graph: q } = B(Pt, dt, at, H)), u) {
18876
18876
  const V = q.nodes.reduce((lt, St) => Math.max(lt, X(St)), 0), tt = Math.max(D, Math.min(20, ct / ((V + 1) * 3)));
18877
18877
  ot.nodeWidth(tt), q = ot({ nodes: [...s], links: [...a] });
18878
18878
  }
18879
18879
  if (p) {
18880
18880
  const V = Math.max(1, q.nodes[0] ? q.nodes[0].x1 - q.nodes[0].x0 : H);
18881
- Ct = this.applyExplicitColumnLayout(
18881
+ Pt = this.applyExplicitColumnLayout(
18882
18882
  q,
18883
18883
  ot,
18884
18884
  X,
@@ -18886,11 +18886,11 @@ class rA extends Xt {
18886
18886
  dt,
18887
18887
  Math.max(dt + V, t.width - at),
18888
18888
  t.height,
18889
- Ct,
18889
+ Pt,
18890
18890
  V
18891
18891
  );
18892
18892
  } else
18893
- this.reorderNodesByValueDesc(q, ot, X, t.height, Ct);
18893
+ this.reorderNodesByValueDesc(q, ot, X, t.height, Pt);
18894
18894
  const _t = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map();
18895
18895
  for (const V of q.nodes) {
18896
18896
  const tt = X(V);
@@ -18900,8 +18900,8 @@ class rA extends Xt {
18900
18900
  const tt = X(V.source);
18901
18901
  Vt.has(tt) || Vt.set(tt, []), Vt.get(tt).push(V);
18902
18902
  }
18903
- const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), Zt = Ot, ne = Zt, $t = Nt * ne + Ot + Zt, Kt = r.centerNodes === !0, le = r.spreadFactor ?? 1;
18904
- (Kt || le !== 1) && this.centerAndSpreadNodes(q, ot, t.height, le, Ct);
18903
+ const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), Zt = Ot, ne = Zt, Tt = Nt * ne + Ot + Zt, Kt = r.centerNodes === !0, le = r.spreadFactor ?? 1;
18904
+ (Kt || le !== 1) && this.centerAndSpreadNodes(q, ot, t.height, le, Pt);
18905
18905
  const Ve = /* @__PURE__ */ new Map();
18906
18906
  for (const V of M)
18907
18907
  V.level !== void 0 && Ve.set(V.level, V);
@@ -18910,22 +18910,22 @@ class rA extends Xt {
18910
18910
  return (lt == null ? void 0 : lt.linkOpacity) ?? m;
18911
18911
  }, mn = QM(), Vn = (V) => {
18912
18912
  if (!c) return mn(V);
18913
- const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, $e = lt - tt;
18914
- if (!Number.isFinite($e) || !Number.isFinite(St) || !Number.isFinite(Lt))
18913
+ const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Le = lt - tt;
18914
+ if (!Number.isFinite(Le) || !Number.isFinite(St) || !Number.isFinite(Lt))
18915
18915
  return mn(V);
18916
- if ($e <= 14)
18916
+ if (Le <= 14)
18917
18917
  return `M${tt},${St}L${lt},${Lt}`;
18918
- if ($e < 28) {
18919
- const xe = Math.max(2, $e * 0.35);
18918
+ if (Le < 28) {
18919
+ const xe = Math.max(2, Le * 0.35);
18920
18920
  return `M${tt},${St}C${tt + xe},${St} ${lt - xe},${Lt} ${lt},${Lt}`;
18921
18921
  }
18922
18922
  return mn(V);
18923
- }, ze = c, Ze = ze ? (V) => {
18924
- const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, $e = lt - tt, xe = Math.max(v, V.width) / 2;
18925
- if (!Number.isFinite($e) || !Number.isFinite(St) || !Number.isFinite(Lt))
18923
+ }, Be = c, Ze = Be ? (V) => {
18924
+ const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Le = lt - tt, xe = Math.max(v, V.width) / 2;
18925
+ if (!Number.isFinite(Le) || !Number.isFinite(St) || !Number.isFinite(Lt))
18926
18926
  return Vn(V);
18927
- const ge = St - xe, yn = St + xe, or = Lt - xe, Gn = Lt + xe, Cn = Math.max(1, $e * 0.42);
18928
- return $e <= 2 ? [
18927
+ const ge = St - xe, yn = St + xe, or = Lt - xe, Gn = Lt + xe, Cn = Math.max(1, Le * 0.42);
18928
+ return Le <= 2 ? [
18929
18929
  `M${tt},${ge}`,
18930
18930
  `L${lt},${or}`,
18931
18931
  `L${lt},${Gn}`,
@@ -18938,32 +18938,32 @@ class rA extends Xt {
18938
18938
  `C${lt - Cn},${Gn} ${tt + Cn},${yn} ${tt},${yn}`,
18939
18939
  "Z"
18940
18940
  ].join("");
18941
- } : Vn, Ge = ze ? "fill-opacity" : "stroke-opacity", Ye = r.linkColorMode ?? "from", er = (V) => V.source.color || e[q.nodes.indexOf(V.source) % e.length] || "#aaa", nr = (V) => V.target.color || e[q.nodes.indexOf(V.target) % e.length] || "#aaa", ir = this.group.append("defs"), et = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
18941
+ } : Vn, Ge = Be ? "fill-opacity" : "stroke-opacity", Ye = r.linkColorMode ?? "from", er = (V) => V.source.color || e[q.nodes.indexOf(V.source) % e.length] || "#aaa", nr = (V) => V.target.color || e[q.nodes.indexOf(V.target) % e.length] || "#aaa", ir = this.group.append("defs"), et = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
18942
18942
  ir.append("clipPath").attr("id", et).append("rect").attr("x", 0).attr("y", 0).attr("width", t.width).attr("height", t.height);
18943
- const nt = this.group.append("g").attr("class", "katucharts-sankey-clipped-layer").attr("clip-path", `url(#${et})`), ht = nt.append("g").attr("class", "katucharts-sankey-links"), vt = nt.append("g").attr("class", "katucharts-sankey-nodes"), mt = nt.append("g").attr("class", "katucharts-sankey-link-hitareas");
18944
- let gt = null;
18945
- Ye === "gradient" && (gt = ir);
18943
+ const nt = this.group.append("g").attr("class", "katucharts-sankey-clipped-layer").attr("clip-path", `url(#${et})`), ht = nt.append("g").attr("class", "katucharts-sankey-links"), vt = nt.append("g").attr("class", "katucharts-sankey-nodes"), yt = nt.append("g").attr("class", "katucharts-sankey-link-hitareas");
18944
+ let mt = null;
18945
+ Ye === "gradient" && (mt = ir);
18946
18946
  let Q = null;
18947
- const Et = 0.55, Dt = 0.25, yt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill", ze ? "#aaa" : "none").attr("stroke", ze ? "none" : "#aaa").attr("stroke-width", (V) => ze ? null : Math.max(v, V.width)).attr("stroke-linecap", "butt").style("cursor", "pointer");
18948
- Ye === "gradient" && gt ? yt.each(function(V, tt) {
18947
+ const Ct = 0.55, Ft = 0.25, pt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill", Be ? "#aaa" : "none").attr("stroke", Be ? "none" : "#aaa").attr("stroke-width", (V) => Be ? null : Math.max(v, V.width)).attr("stroke-linecap", "butt").style("cursor", "pointer");
18948
+ Ye === "gradient" && mt ? pt.each(function(V, tt) {
18949
18949
  const lt = `katucharts-sankey-grad-${tt}-${Math.random().toString(36).slice(2, 6)}`;
18950
- gt.append("linearGradient").attr("id", lt).attr("gradientUnits", "userSpaceOnUse").attr("x1", V.source.x1).attr("x2", V.target.x0).selectAll("stop").data([
18950
+ mt.append("linearGradient").attr("id", lt).attr("gradientUnits", "userSpaceOnUse").attr("x1", V.source.x1).attr("x2", V.target.x0).selectAll("stop").data([
18951
18951
  { offset: "0%", color: er(V) },
18952
18952
  { offset: "100%", color: nr(V) }
18953
- ]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(ze ? "fill" : "stroke", `url(#${lt})`);
18954
- }) : Ye === "to" ? yt.attr(ze ? "fill" : "stroke", (V) => nr(V)) : yt.attr(ze ? "fill" : "stroke", (V) => er(V)), i && !h ? l ? yt.attr(Ge, 0).each(function(V) {
18953
+ ]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(Be ? "fill" : "stroke", `url(#${lt})`);
18954
+ }) : Ye === "to" ? pt.attr(Be ? "fill" : "stroke", (V) => nr(V)) : pt.attr(Be ? "fill" : "stroke", (V) => er(V)), i && !h ? l ? pt.attr(Ge, 0).each(function(V) {
18955
18955
  const tt = X(V.source), St = (Vt.get(tt) || []).indexOf(V), Lt = tt * ne + Ot - 60 + Math.min(St * 12, 60);
18956
- rt(this).transition("enter").duration(Zt).delay(Lt).ease(pt).attr(Ge, he(V));
18957
- }) : yt.attr(Ge, (V) => he(V)).each(function(V) {
18956
+ rt(this).transition("enter").duration(Zt).delay(Lt).ease(gt).attr(Ge, he(V));
18957
+ }) : pt.attr(Ge, (V) => he(V)).each(function(V) {
18958
18958
  var yn;
18959
18959
  const tt = this, lt = ((yn = tt.getTotalLength) == null ? void 0 : yn.call(tt)) || 0;
18960
18960
  if (lt === 0) return;
18961
- const St = X(V.source), $e = (Vt.get(St) || []).indexOf(V), ge = St * ne + Ot - 60 + Math.min($e * 12, 60);
18962
- rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(Zt).delay(ge).ease(pt).attr("stroke-dashoffset", 0).on("end", function() {
18961
+ const St = X(V.source), Le = (Vt.get(St) || []).indexOf(V), ge = St * ne + Ot - 60 + Math.min(Le * 12, 60);
18962
+ rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(Zt).delay(ge).ease(gt).attr("stroke-dashoffset", 0).on("end", function() {
18963
18963
  rt(this).attr("stroke-dasharray", null).attr("stroke-dashoffset", null);
18964
18964
  });
18965
- }) : yt.attr(Ge, (V) => he(V));
18966
- const qt = (V, tt, lt) => {
18965
+ }) : pt.attr(Ge, (V) => he(V));
18966
+ const Ut = (V, tt, lt) => {
18967
18967
  const St = {
18968
18968
  name: `${lt.source.name} → ${lt.target.name}`,
18969
18969
  from: lt.source.name,
@@ -19001,13 +19001,13 @@ class rA extends Xt {
19001
19001
  });
19002
19002
  }, Bt = (V, tt) => {
19003
19003
  const lt = he(tt);
19004
- yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : he(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Et), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Dt), qt("mouseover", V, tt);
19005
- }, Ut = (V, tt) => {
19006
- yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), qt("mouseout", V, tt);
19004
+ pt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), pt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : he(St)), pt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ct), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), Ut("mouseover", V, tt);
19005
+ }, qt = (V, tt) => {
19006
+ pt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), pt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Ut("mouseout", V, tt);
19007
19007
  }, Qt = (V, tt) => {
19008
- qt("click", V, tt);
19008
+ Ut("click", V, tt);
19009
19009
  };
19010
- yt.on("mouseover", Bt).on("mouseout", Ut).on("click", Qt);
19010
+ pt.on("mouseover", Bt).on("mouseout", qt).on("click", Qt);
19011
19011
  const Ht = vt.selectAll(".katucharts-sankey-node").data(q.nodes).join("rect").attr("class", "katucharts-sankey-node").attr("x", (V) => V.x0).attr("y", (V) => V.y0).attr("width", (V) => V.x1 - V.x0).attr("height", (V) => Math.max(1, V.y1 - V.y0)).attr("fill", (V, tt) => {
19012
19012
  if (V.color) return V.color;
19013
19013
  const lt = Ve.get(X(V));
@@ -19015,14 +19015,14 @@ class rA extends Xt {
19015
19015
  }).attr("stroke", k).attr("stroke-width", b).attr("rx", 4).style("cursor", "pointer");
19016
19016
  i && !h && Ht.attr("opacity", 0).attr("x", (V) => V.x0 - (c ? 4 : 10)).each(function(V) {
19017
19017
  const tt = X(V), St = (_t.get(tt) || []).indexOf(V), Lt = tt * ne + Math.min(St * 20, 80);
19018
- rt(this).transition("enter").duration(Ot).delay(Lt).ease(pt).attr("opacity", 1).attr("x", V.x0);
19018
+ rt(this).transition("enter").duration(Ot).delay(Lt).ease(gt).attr("opacity", 1).attr("x", V.x0);
19019
19019
  });
19020
19020
  const Ke = (V, tt) => {
19021
- Ht.filter((Lt) => Lt === tt).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight");
19021
+ Ht.filter((Lt) => Lt === tt).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), Ht.interrupt("highlight"), pt.interrupt("highlight"), Q == null || Q.interrupt("highlight");
19022
19022
  const lt = /* @__PURE__ */ new Set([tt]);
19023
19023
  for (const Lt of q.links)
19024
19024
  Lt.source === tt ? lt.add(Lt.target) : Lt.target === tt && lt.add(Lt.source);
19025
- Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", Et), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Dt), yt.transition("highlight").duration(K).ease(Z).attr(
19025
+ Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", Ct), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Ft), pt.transition("highlight").duration(K).ease(Z).attr(
19026
19026
  Ge,
19027
19027
  (Lt) => Lt.source === tt || Lt.target === tt ? Math.min(he(Lt) + 0.3, 1) : he(Lt) * 0.375
19028
19028
  );
@@ -19035,8 +19035,8 @@ class rA extends Xt {
19035
19035
  plotX: (tt.x0 + tt.x1) / 2,
19036
19036
  plotY: (tt.y0 + tt.y1) / 2
19037
19037
  });
19038
- }, Te = (V, tt) => {
19039
- Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), this.context.events.emit("point:mouseout", {
19038
+ }, $e = (V, tt) => {
19039
+ Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), pt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), pt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), this.context.events.emit("point:mouseout", {
19040
19040
  point: { name: tt.name || tt.id, y: tt.value, sum: tt.value },
19041
19041
  index: q.nodes.indexOf(tt),
19042
19042
  series: this,
@@ -19050,26 +19050,26 @@ class rA extends Xt {
19050
19050
  event: V
19051
19051
  });
19052
19052
  };
19053
- if (Ht.on("mouseover", Ke).on("mouseout", Te).on("click", Oe), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", Ut).on("click", Qt), L) {
19054
- const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Tt) => Math.max(ut, Tt.x0 ?? 0), 0), St = q.nodes.reduce((ut, Tt) => Math.min(ut, Tt.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, $e = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, xe = (ut) => Y && Lt(ut) || $e(ut), ge = /* @__PURE__ */ new Map();
19053
+ if (Ht.on("mouseover", Ke).on("mouseout", $e).on("click", Oe), yt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", qt).on("click", Qt), L) {
19054
+ const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, $t) => Math.max(ut, $t.x0 ?? 0), 0), St = q.nodes.reduce((ut, $t) => Math.min(ut, $t.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, Le = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, xe = (ut) => Y && Lt(ut) || Le(ut), ge = /* @__PURE__ */ new Map();
19055
19055
  for (const ut of q.nodes) {
19056
- const Tt = ut.y1 - ut.y0;
19057
- if (!xe(ut) && Tt < tt) {
19056
+ const $t = ut.y1 - ut.y0;
19057
+ if (!xe(ut) && $t < tt) {
19058
19058
  ge.set(ut, "");
19059
19059
  continue;
19060
19060
  }
19061
19061
  ge.set(ut, w(ut));
19062
19062
  }
19063
19063
  const yn = (ut) => xe(ut) ? Lt(ut) ? "end" : "start" : "middle", or = (ut) => xe(ut) ? Lt(ut) ? ut.x0 - 4 + (C.x ?? 0) : ut.x1 + 4 + (C.x ?? 0) : (ut.x0 + ut.x1) / 2 + (C.x ?? 0);
19064
- Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = C.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Te).on("click", Oe).text((ut) => ge.get(ut) ?? "");
19064
+ Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = C.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", $e).on("click", Oe).text((ut) => ge.get(ut) ?? "");
19065
19065
  const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
19066
19066
  for (const ut of q.nodes) {
19067
- const Tt = X(ut);
19068
- Gn.set(Tt, Math.min(Gn.get(Tt) ?? 1 / 0, ut.x0)), Cn.set(Tt, Math.max(Cn.get(Tt) ?? -1 / 0, ut.x1));
19067
+ const $t = X(ut);
19068
+ Gn.set($t, Math.min(Gn.get($t) ?? 1 / 0, ut.x0)), Cn.set($t, Math.max(Cn.get($t) ?? -1 / 0, ut.x1));
19069
19069
  }
19070
19070
  Q.each(function(ut) {
19071
- const Tt = this;
19072
- let ie = Tt.textContent;
19071
+ const $t = this;
19072
+ let ie = $t.textContent;
19073
19073
  if (!ie) return;
19074
19074
  const xn = A(ie);
19075
19075
  if (xe(ut)) {
@@ -19083,47 +19083,47 @@ class rA extends Xt {
19083
19083
  ar = (cr !== void 0 ? (ut.x1 + cr) / 2 : t.width - 2) - vl / 2 - (ut.x1 + 4);
19084
19084
  }
19085
19085
  if (ar <= S) {
19086
- Tt.textContent = "";
19086
+ $t.textContent = "";
19087
19087
  return;
19088
19088
  }
19089
- xn > ar && (ie = $(ie, ar, 1), Tt.textContent = ie);
19089
+ xn > ar && (ie = $(ie, ar, 1), $t.textContent = ie);
19090
19090
  return;
19091
19091
  }
19092
19092
  const ei = (ut.x0 + ut.x1) / 2, Yn = ei - xn / 2, Si = ei + xn / 2;
19093
19093
  if (Si <= t.width && Yn >= 0) return;
19094
19094
  const sr = X(ut), $p = Gn.get(sr + 1) ?? t.width, Lp = Cn.get(sr - 1) ?? 0, Ts = $p - ut.x1 - 4, $s = ut.x0 - Lp - 4;
19095
19095
  if (Yn < 0 && Ts > I * 1.5) {
19096
- Tt.setAttribute("text-anchor", "start"), Tt.setAttribute("x", String(ut.x1 + 2)), xn > Ts && (Tt.textContent = $(ie, Ts));
19096
+ $t.setAttribute("text-anchor", "start"), $t.setAttribute("x", String(ut.x1 + 2)), xn > Ts && ($t.textContent = $(ie, Ts));
19097
19097
  return;
19098
19098
  }
19099
19099
  if (Si > t.width && $s > I * 1.5) {
19100
- Tt.setAttribute("text-anchor", "end"), Tt.setAttribute("x", String(ut.x0 - 2)), xn > $s && (Tt.textContent = $(ie, $s));
19100
+ $t.setAttribute("text-anchor", "end"), $t.setAttribute("x", String(ut.x0 - 2)), xn > $s && ($t.textContent = $(ie, $s));
19101
19101
  return;
19102
19102
  }
19103
19103
  const xl = 2 * Math.min(ei, t.width - ei) - 4;
19104
19104
  if (xl < I * 2) {
19105
- Tt.textContent = "";
19105
+ $t.textContent = "";
19106
19106
  return;
19107
19107
  }
19108
- Tt.textContent = $(ie, xl);
19108
+ $t.textContent = $(ie, xl);
19109
19109
  });
19110
- const ml = [], Ep = [...q.nodes].sort((ut, Tt) => (Tt.value ?? 0) - (ut.value ?? 0)), yl = /* @__PURE__ */ new Map();
19110
+ const ml = [], Ep = [...q.nodes].sort((ut, $t) => ($t.value ?? 0) - (ut.value ?? 0)), yl = /* @__PURE__ */ new Map();
19111
19111
  Q.each(function(ut) {
19112
19112
  yl.set(ut, this);
19113
19113
  });
19114
- const Tp = (ut, Tt) => ut.left < Tt.right && ut.right > Tt.left && ut.top < Tt.bottom && ut.bottom > Tt.top;
19114
+ const Tp = (ut, $t) => ut.left < $t.right && ut.right > $t.left && ut.top < $t.bottom && ut.bottom > $t.top;
19115
19115
  for (const ut of Ep) {
19116
19116
  if (C.allowOverlap === !0) break;
19117
- const Tt = yl.get(ut);
19118
- if (!Tt || !Tt.textContent) continue;
19117
+ const $t = yl.get(ut);
19118
+ if (!$t || !$t.textContent) continue;
19119
19119
  let ie;
19120
19120
  try {
19121
- ie = Tt.getBBox();
19121
+ ie = $t.getBBox();
19122
19122
  } catch {
19123
- const Yn = A(Tt.textContent || ""), Si = Number(Tt.getAttribute("x") || 0), sr = Tt.getAttribute("text-anchor");
19123
+ const Yn = A($t.textContent || ""), Si = Number($t.getAttribute("x") || 0), sr = $t.getAttribute("text-anchor");
19124
19124
  ie = {
19125
19125
  x: sr === "end" ? Si - Yn : sr === "middle" ? Si - Yn / 2 : Si,
19126
- y: Number(Tt.getAttribute("y") || 0) - I / 2,
19126
+ y: Number($t.getAttribute("y") || 0) - I / 2,
19127
19127
  width: Yn,
19128
19128
  height: I
19129
19129
  };
@@ -19136,17 +19136,17 @@ class rA extends Xt {
19136
19136
  bottom: ie.y + ie.height
19137
19137
  };
19138
19138
  if (ml.some((Yn) => Tp(Yn, xn)) && C.overflow !== "allow") {
19139
- Tt.textContent = "";
19139
+ $t.textContent = "";
19140
19140
  continue;
19141
19141
  }
19142
19142
  ml.push(xn);
19143
19143
  }
19144
19144
  i && !h && Q.attr("opacity", 0).each(function(ut) {
19145
- const Tt = X(ut), xn = (_t.get(Tt) || []).indexOf(ut), ei = Tt * ne + Ot - 80 + Math.min(xn * 20, 80);
19146
- rt(this).transition("enter").duration(Ot).delay(ei).ease(pt).attr("opacity", 1);
19145
+ const $t = X(ut), xn = (_t.get($t) || []).indexOf(ut), ei = $t * ne + Ot - 80 + Math.min(xn * 20, 80);
19146
+ rt(this).transition("enter").duration(Ot).delay(ei).ease(gt).attr("opacity", 1);
19147
19147
  });
19148
19148
  }
19149
- i && this.emitAfterAnimate(h ? 0 : $t + 100);
19149
+ i && this.emitAfterAnimate(h ? 0 : Tt + 100);
19150
19150
  }
19151
19151
  applyExplicitColumnLayout(t, e, i, r, o, s, a, l, c) {
19152
19152
  var m, x;
@@ -19326,20 +19326,20 @@ function lA() {
19326
19326
  function hA(n) {
19327
19327
  return arguments.length ? this.cover(+n[0][0], +n[0][1]).cover(+n[1][0], +n[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
19328
19328
  }
19329
- function Fe(n, t, e, i, r) {
19329
+ function Re(n, t, e, i, r) {
19330
19330
  this.node = n, this.x0 = t, this.y0 = e, this.x1 = i, this.y1 = r;
19331
19331
  }
19332
19332
  function uA(n, t, e) {
19333
19333
  var i, r = this._x0, o = this._y0, s, a, l, c, h = this._x1, f = this._y1, u = [], d = this._root, p, y;
19334
- for (d && u.push(new Fe(d, r, o, h, f)), e == null ? e = 1 / 0 : (r = n - e, o = t - e, h = n + e, f = t + e, e *= e); p = u.pop(); )
19334
+ for (d && u.push(new Re(d, r, o, h, f)), e == null ? e = 1 / 0 : (r = n - e, o = t - e, h = n + e, f = t + e, e *= e); p = u.pop(); )
19335
19335
  if (!(!(d = p.node) || (s = p.x0) > h || (a = p.y0) > f || (l = p.x1) < r || (c = p.y1) < o))
19336
19336
  if (d.length) {
19337
19337
  var g = (s + l) / 2, m = (a + c) / 2;
19338
19338
  u.push(
19339
- new Fe(d[3], g, m, l, c),
19340
- new Fe(d[2], s, m, g, c),
19341
- new Fe(d[1], g, a, l, m),
19342
- new Fe(d[0], s, a, g, m)
19339
+ new Re(d[3], g, m, l, c),
19340
+ new Re(d[2], s, m, g, c),
19341
+ new Re(d[1], g, a, l, m),
19342
+ new Re(d[0], s, a, g, m)
19343
19343
  ), (y = (t >= m) << 1 | n >= g) && (p = u[u.length - 1], u[u.length - 1] = u[u.length - 1 - y], u[u.length - 1 - y] = p);
19344
19344
  } else {
19345
19345
  var x = n - +this._x.call(null, d.data), v = t - +this._y.call(null, d.data), b = x * x + v * v;
@@ -19379,20 +19379,20 @@ function gA() {
19379
19379
  }
19380
19380
  function mA(n) {
19381
19381
  var t = [], e, i = this._root, r, o, s, a, l;
19382
- for (i && t.push(new Fe(i, this._x0, this._y0, this._x1, this._y1)); e = t.pop(); )
19382
+ for (i && t.push(new Re(i, this._x0, this._y0, this._x1, this._y1)); e = t.pop(); )
19383
19383
  if (!n(i = e.node, o = e.x0, s = e.y0, a = e.x1, l = e.y1) && i.length) {
19384
19384
  var c = (o + a) / 2, h = (s + l) / 2;
19385
- (r = i[3]) && t.push(new Fe(r, c, h, a, l)), (r = i[2]) && t.push(new Fe(r, o, h, c, l)), (r = i[1]) && t.push(new Fe(r, c, s, a, h)), (r = i[0]) && t.push(new Fe(r, o, s, c, h));
19385
+ (r = i[3]) && t.push(new Re(r, c, h, a, l)), (r = i[2]) && t.push(new Re(r, o, h, c, l)), (r = i[1]) && t.push(new Re(r, c, s, a, h)), (r = i[0]) && t.push(new Re(r, o, s, c, h));
19386
19386
  }
19387
19387
  return this;
19388
19388
  }
19389
19389
  function yA(n) {
19390
19390
  var t = [], e = [], i;
19391
- for (this._root && t.push(new Fe(this._root, this._x0, this._y0, this._x1, this._y1)); i = t.pop(); ) {
19391
+ for (this._root && t.push(new Re(this._root, this._x0, this._y0, this._x1, this._y1)); i = t.pop(); ) {
19392
19392
  var r = i.node;
19393
19393
  if (r.length) {
19394
19394
  var o, s = i.x0, a = i.y0, l = i.x1, c = i.y1, h = (s + l) / 2, f = (a + c) / 2;
19395
- (o = r[0]) && t.push(new Fe(o, s, a, h, f)), (o = r[1]) && t.push(new Fe(o, h, a, l, f)), (o = r[2]) && t.push(new Fe(o, s, f, h, c)), (o = r[3]) && t.push(new Fe(o, h, f, l, c));
19395
+ (o = r[0]) && t.push(new Re(o, s, a, h, f)), (o = r[1]) && t.push(new Re(o, h, a, l, f)), (o = r[2]) && t.push(new Re(o, s, f, h, c)), (o = r[3]) && t.push(new Re(o, h, f, l, c));
19396
19396
  }
19397
19397
  e.push(i);
19398
19398
  }
@@ -19423,8 +19423,8 @@ function Ku(n) {
19423
19423
  for (var t = { data: n.data }, e = t; n = n.next; ) e = e.next = { data: n.data };
19424
19424
  return t;
19425
19425
  }
19426
- var De = pl.prototype = gl.prototype;
19427
- De.copy = function() {
19426
+ var ze = pl.prototype = gl.prototype;
19427
+ ze.copy = function() {
19428
19428
  var n = new gl(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, e, i;
19429
19429
  if (!t) return n;
19430
19430
  if (!t.length) return n._root = Ku(t), n;
@@ -19433,20 +19433,20 @@ De.copy = function() {
19433
19433
  (i = t.source[r]) && (i.length ? e.push({ source: i, target: t.target[r] = new Array(4) }) : t.target[r] = Ku(i));
19434
19434
  return n;
19435
19435
  };
19436
- De.add = sA;
19437
- De.addAll = aA;
19438
- De.cover = cA;
19439
- De.data = lA;
19440
- De.extent = hA;
19441
- De.find = uA;
19442
- De.remove = fA;
19443
- De.removeAll = dA;
19444
- De.root = pA;
19445
- De.size = gA;
19446
- De.visit = mA;
19447
- De.visitAfter = yA;
19448
- De.x = bA;
19449
- De.y = wA;
19436
+ ze.add = sA;
19437
+ ze.addAll = aA;
19438
+ ze.cover = cA;
19439
+ ze.data = lA;
19440
+ ze.extent = hA;
19441
+ ze.find = uA;
19442
+ ze.remove = fA;
19443
+ ze.removeAll = dA;
19444
+ ze.root = pA;
19445
+ ze.size = gA;
19446
+ ze.visit = mA;
19447
+ ze.visitAfter = yA;
19448
+ ze.x = bA;
19449
+ ze.y = wA;
19450
19450
  function mi(n) {
19451
19451
  return function() {
19452
19452
  return n;
@@ -19724,9 +19724,9 @@ class DA extends Xt {
19724
19724
  w.x = Math.max(A + 30, Math.min(t.width - A - 30, w.x ?? 0)), w.y = Math.max(A + 18, Math.min(t.height - A - 6, w.y ?? 0));
19725
19725
  });
19726
19726
  const L = this.getDashArray(d), _ = this.group.selectAll(".katucharts-network-link").data(s).join("line").attr("class", "katucharts-network-link").attr("x1", (w) => w.source.x).attr("y1", (w) => w.source.y).attr("x2", (w) => w.target.x).attr("y2", (w) => w.target.y).attr("stroke", f).attr("stroke-width", (w) => u ?? Math.sqrt(w.value || 1)).attr("stroke-dasharray", L);
19727
- i ? _.attr("stroke-opacity", 0).transition().duration(bt).ease(pt).attr("stroke-opacity", 0.6) : _.attr("stroke-opacity", 0.6);
19727
+ i ? _.attr("stroke-opacity", 0).transition().duration(bt).ease(gt).attr("stroke-opacity", 0.6) : _.attr("stroke-opacity", 0.6);
19728
19728
  const T = this.group.selectAll(".katucharts-network-node").data(o).join("circle").attr("class", "katucharts-network-node").attr("cx", (w) => w.x).attr("cy", (w) => w.y).attr("fill", (w, A) => w.color || e[A % e.length]).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1.5).style("cursor", c ? "grab" : "pointer");
19729
- if (i ? T.attr("r", 0).transition().duration(bt).ease(pt).attr("r", (w) => {
19729
+ if (i ? T.attr("r", 0).transition().duration(bt).ease(gt).attr("r", (w) => {
19730
19730
  var A;
19731
19731
  return ((A = w.marker) == null ? void 0 : A.radius) || 10;
19732
19732
  }) : T.attr("r", (w) => {
@@ -19784,7 +19784,7 @@ class DA extends Xt {
19784
19784
  });
19785
19785
  });
19786
19786
  const I = this.group.selectAll(".katucharts-network-label").data(o).join("text").attr("class", "katucharts-network-label").attr("x", (w) => w.x).attr("y", (w) => w.y - 14).attr("text-anchor", "middle").attr("font-size", Mt).attr("fill", this.autoLabelColor(((E = this.config.dataLabels) == null ? void 0 : E.color) || ((S = (P = this.config.dataLabels) == null ? void 0 : P.style) == null ? void 0 : S.color))).style("pointer-events", "none").text((w) => w.name || w.id);
19787
- i && I.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
19787
+ i && I.attr("opacity", 0).transition().duration(bt).ease(gt).attr("opacity", 1);
19788
19788
  }
19789
19789
  updatePositions(t, e, i) {
19790
19790
  t.attr("cx", (r) => r.x).attr("cy", (r) => r.y), e.attr("x1", (r) => r.source.x).attr("y1", (r) => r.source.y).attr("x2", (r) => r.target.x).attr("y2", (r) => r.target.y), i.attr("x", (r) => r.x).attr("y", (r) => r.y - 14);
@@ -19900,87 +19900,87 @@ class WA extends Xt {
19900
19900
  const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), $ = OA().padAngle(w).sortSubgroups(null)(I);
19901
19901
  this.normalizeChordWidths($), this.sortChordEndpoints($);
19902
19902
  const R = Se().innerRadius(T).outerRadius(_).cornerRadius(3), F = Se().innerRadius(T).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
19903
- const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), Et = nt * Math.sin(ht), Dt = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Qt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19904
- let Te = Math.abs(mt - vt);
19905
- Te > Math.PI && (Te = 2 * Math.PI - Te);
19906
- const Oe = Te / Math.PI, ye = nt * Math.max(D, (1 - Oe) * (1 - Oe) * (1 - Oe));
19907
- let Je = Math.abs(ht - gt);
19903
+ const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, yt = et.target.startAngle + p - Math.PI / 2, mt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), Ct = nt * Math.sin(ht), Ft = nt * Math.cos(vt), pt = nt * Math.sin(vt), Ut = nt * Math.cos(yt), Bt = nt * Math.sin(yt), qt = nt * Math.cos(mt), Qt = nt * Math.sin(mt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(mt - yt) > Math.PI ? 1 : 0;
19904
+ let $e = Math.abs(yt - vt);
19905
+ $e > Math.PI && ($e = 2 * Math.PI - $e);
19906
+ const Oe = $e / Math.PI, ye = nt * Math.max(D, (1 - Oe) * (1 - Oe) * (1 - Oe));
19907
+ let Je = Math.abs(ht - mt);
19908
19908
  Je > Math.PI && (Je = 2 * Math.PI - Je);
19909
19909
  const hn = Je / Math.PI, _n = nt * Math.max(D, (1 - hn) * (1 - hn) * (1 - hn));
19910
- return `M${Q},${Et}A${nt},${nt},0,${Ht},1,${Dt},${yt}C${ye * Math.cos(vt)},${ye * Math.sin(vt)},${ye * Math.cos(mt)},${ye * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Qt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${Et}Z`;
19910
+ return `M${Q},${Ct}A${nt},${nt},0,${Ht},1,${Ft},${pt}C${ye * Math.cos(vt)},${ye * Math.sin(vt)},${ye * Math.cos(yt)},${ye * Math.sin(yt)},${Ut},${Bt}A${nt},${nt},0,${Ke},1,${qt},${Qt}C${_n * Math.cos(mt)},${_n * Math.sin(mt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${Ct}Z`;
19911
19911
  }, B = this.group.append("g").attr("transform", `translate(${x},${v})`), H = (et) => P[et] || e[et % e.length], J = r.linkColorMode ?? "from", X = B.append("defs");
19912
19912
  let j = null;
19913
19913
  J === "gradient" && (j = X);
19914
19914
  const W = (et) => H(J === "to" ? et.target.index : et.source.index), U = u * 2, G = (et, nt, ht, vt) => {
19915
- const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt = T * Math.cos(et), Q = T * Math.sin(et), Et = (T - U) * Math.cos(et), Dt = (T - U) * Math.sin(et);
19916
- return X.append("linearGradient").attr("id", mt).attr("gradientUnits", "userSpaceOnUse").attr("x1", gt).attr("y1", Q).attr("x2", Et).attr("y2", Dt).selectAll("stop").data([
19915
+ const yt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, mt = T * Math.cos(et), Q = T * Math.sin(et), Ct = (T - U) * Math.cos(et), Ft = (T - U) * Math.sin(et);
19916
+ return X.append("linearGradient").attr("id", yt).attr("gradientUnits", "userSpaceOnUse").attr("x1", mt).attr("y1", Q).attr("x2", Ct).attr("y2", Ft).selectAll("stop").data([
19917
19917
  { offset: "0%", opacity: 0.7 },
19918
19918
  { offset: "25%", opacity: 0.2 },
19919
19919
  { offset: "50%", opacity: 0.05 },
19920
19920
  { offset: "100%", opacity: 0 }
19921
- ]).join("stop").attr("offset", (yt) => yt.offset).attr("stop-color", nt).attr("stop-opacity", (yt) => yt.opacity), mt;
19921
+ ]).join("stop").attr("offset", (pt) => pt.offset).attr("stop-color", nt).attr("stop-opacity", (pt) => pt.opacity), yt;
19922
19922
  }, N = J !== "gradient";
19923
19923
  let Y, O;
19924
19924
  if (N) {
19925
19925
  const et = /* @__PURE__ */ new Map();
19926
19926
  for (const vt of $) {
19927
- const mt = W(vt);
19928
- et.has(mt) || et.set(mt, []), et.get(mt).push(vt);
19927
+ const yt = W(vt);
19928
+ et.has(yt) || et.set(yt, []), et.get(yt).push(vt);
19929
19929
  }
19930
19930
  const nt = B.append("g").attr("class", "katucharts-chord-container");
19931
- for (const [vt, mt] of et)
19932
- nt.append("g").attr("class", "katucharts-chord-group").attr("opacity", d).selectAll(".katucharts-chord").data(mt).join("path").attr("class", "katucharts-chord").attr("d", (Q) => z(Q)).attr("fill", vt).attr("fill-opacity", 1).attr("stroke", "none").style("cursor", "pointer");
19931
+ for (const [vt, yt] of et)
19932
+ nt.append("g").attr("class", "katucharts-chord-group").attr("opacity", d).selectAll(".katucharts-chord").data(yt).join("path").attr("class", "katucharts-chord").attr("d", (Q) => z(Q)).attr("fill", vt).attr("fill-opacity", 1).attr("stroke", "none").style("cursor", "pointer");
19933
19933
  Y = nt.selectAll(".katucharts-chord"), O = nt.selectAll(".katucharts-chord-group");
19934
19934
  const ht = B.append("g").attr("class", "katucharts-chord-edges").attr("opacity", d);
19935
- if ($.forEach((vt, mt) => {
19936
- const gt = H(vt.source.index), Q = H(vt.target.index);
19937
- if (gt === Q) return;
19938
- const Et = z(vt), Dt = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Dt, Q, mt, "tgt");
19939
- ht.append("path").attr("d", Et).attr("fill", `url(#${yt})`).attr("stroke", "none").style("pointer-events", "none");
19940
- const qt = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(qt, gt, mt, "src");
19941
- ht.append("path").attr("d", Et).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
19935
+ if ($.forEach((vt, yt) => {
19936
+ const mt = H(vt.source.index), Q = H(vt.target.index);
19937
+ if (mt === Q) return;
19938
+ const Ct = z(vt), Ft = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, pt = G(Ft, Q, yt, "tgt");
19939
+ ht.append("path").attr("d", Ct).attr("fill", `url(#${pt})`).attr("stroke", "none").style("pointer-events", "none");
19940
+ const Ut = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(Ut, mt, yt, "src");
19941
+ ht.append("path").attr("d", Ct).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
19942
19942
  }), i) {
19943
19943
  ht.attr("opacity", 0);
19944
- const vt = B.append("defs"), mt = Math.round(s * 0.62);
19945
- Y.each(function(Q, Et) {
19946
- const Dt = f + Et * a, yt = `dw-clip-${Et}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Qt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Qt) / 2, Te = T * Math.cos(Ht), Oe = T * Math.sin(Ht), ye = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Oe, ye - Te) * 180 / Math.PI, _n = Math.sqrt((ye - Te) ** 2 + (Je - Oe) ** 2) + _ * 2, rr = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = rr.append("rect").attr("transform", `translate(${Te},${Oe}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19947
- tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Dt).ease(pt).attr("width", _n).on("end", function() {
19944
+ const vt = B.append("defs"), yt = Math.round(s * 0.62);
19945
+ Y.each(function(Q, Ct) {
19946
+ const Ft = f + Ct * a, pt = `dw-clip-${Ct}-${Math.random().toString(36).slice(2, 6)}`, Ut = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, qt = Q.target.startAngle + p - Math.PI / 2, Qt = Q.target.endAngle + p - Math.PI / 2, Ht = (Ut + Bt) / 2, Ke = (qt + Qt) / 2, $e = T * Math.cos(Ht), Oe = T * Math.sin(Ht), ye = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Oe, ye - $e) * 180 / Math.PI, _n = Math.sqrt((ye - $e) ** 2 + (Je - Oe) ** 2) + _ * 2, rr = vt.append("clipPath").attr("id", pt).attr("clipPathUnits", "userSpaceOnUse"), V = rr.append("rect").attr("transform", `translate(${$e},${Oe}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19947
+ tt.attr("clip-path", `url(#${pt})`), V.transition("enter").duration(yt).delay(Ft).ease(gt).attr("width", _n).on("end", function() {
19948
19948
  tt.attr("clip-path", null), rr.remove();
19949
19949
  });
19950
19950
  });
19951
- const gt = f + ($.length - 1) * a + mt;
19952
- ht.transition("enter").duration(300).delay(gt).ease(pt).attr("opacity", d);
19951
+ const mt = f + ($.length - 1) * a + yt;
19952
+ ht.transition("enter").duration(300).delay(mt).ease(gt).attr("opacity", d);
19953
19953
  }
19954
19954
  } else if (Y = B.selectAll(".katucharts-chord").data($).join("path").attr("class", "katucharts-chord").attr("d", (et) => z(et)).attr("stroke", "none").style("cursor", "pointer"), Y.each(function(et, nt) {
19955
- const ht = `katucharts-dw-grad-${nt}-${Math.random().toString(36).slice(2, 6)}`, vt = (et.source.startAngle + et.source.endAngle) / 2 + p - Math.PI / 2, mt = (et.target.startAngle + et.target.endAngle) / 2 + p - Math.PI / 2;
19956
- j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1", T * Math.cos(vt)).attr("y1", T * Math.sin(vt)).attr("x2", T * Math.cos(mt)).attr("y2", T * Math.sin(mt)).selectAll("stop").data([
19955
+ const ht = `katucharts-dw-grad-${nt}-${Math.random().toString(36).slice(2, 6)}`, vt = (et.source.startAngle + et.source.endAngle) / 2 + p - Math.PI / 2, yt = (et.target.startAngle + et.target.endAngle) / 2 + p - Math.PI / 2;
19956
+ j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1", T * Math.cos(vt)).attr("y1", T * Math.sin(vt)).attr("x2", T * Math.cos(yt)).attr("y2", T * Math.sin(yt)).selectAll("stop").data([
19957
19957
  { offset: "0%", color: H(et.source.index) },
19958
19958
  { offset: "100%", color: H(et.target.index) }
19959
- ]).join("stop").attr("offset", (gt) => gt.offset).attr("stop-color", (gt) => gt.color), rt(this).attr("fill", `url(#${ht})`);
19959
+ ]).join("stop").attr("offset", (mt) => mt.offset).attr("stop-color", (mt) => mt.color), rt(this).attr("fill", `url(#${ht})`);
19960
19960
  }), i) {
19961
19961
  Y.attr("fill-opacity", d);
19962
19962
  const et = B.append("defs"), nt = Math.round(s * 0.62);
19963
19963
  Y.each(function(ht, vt) {
19964
- const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, Et = ht.source.endAngle + p - Math.PI / 2, Dt = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + Et) / 2, Bt = (Dt + yt) / 2, Ut = T * Math.cos(qt), Qt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Te = Math.atan2(Ke - Qt, Ht - Ut) * 180 / Math.PI, Oe = Math.sqrt((Ht - Ut) ** 2 + (Ke - Qt) ** 2) + _ * 2, ye = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = ye.append("rect").attr("transform", `translate(${Ut},${Qt}) rotate(${Te})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19965
- hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Oe).on("end", function() {
19964
+ const yt = f + vt * a, mt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, Ct = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, pt = ht.target.endAngle + p - Math.PI / 2, Ut = (Q + Ct) / 2, Bt = (Ft + pt) / 2, qt = T * Math.cos(Ut), Qt = T * Math.sin(Ut), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), $e = Math.atan2(Ke - Qt, Ht - qt) * 180 / Math.PI, Oe = Math.sqrt((Ht - qt) ** 2 + (Ke - Qt) ** 2) + _ * 2, ye = et.append("clipPath").attr("id", mt).attr("clipPathUnits", "userSpaceOnUse"), Je = ye.append("rect").attr("transform", `translate(${qt},${Qt}) rotate(${$e})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19965
+ hn.attr("clip-path", `url(#${mt})`), Je.transition("enter").duration(nt).delay(yt).ease(gt).attr("width", Oe).on("end", function() {
19966
19966
  hn.attr("clip-path", null), ye.remove();
19967
19967
  });
19968
19968
  });
19969
19969
  } else
19970
19970
  Y.attr("fill-opacity", d);
19971
19971
  const ct = (et, nt, ht) => {
19972
- const vt = E[ht.source.index], mt = E[ht.target.index], gt = {
19973
- name: `${vt} → ${mt}`,
19972
+ const vt = E[ht.source.index], yt = E[ht.target.index], mt = {
19973
+ name: `${vt} → ${yt}`,
19974
19974
  from: vt,
19975
- to: mt,
19975
+ to: yt,
19976
19976
  y: ht.source.value,
19977
19977
  weight: ht.source.value,
19978
19978
  fromNode: { name: vt },
19979
- toNode: { name: mt }
19979
+ toNode: { name: yt }
19980
19980
  };
19981
19981
  if (et === "mouseover") {
19982
19982
  this.context.events.emit("point:mouseover", {
19983
- point: gt,
19983
+ point: mt,
19984
19984
  index: $.indexOf(ht),
19985
19985
  series: this,
19986
19986
  event: nt,
@@ -19991,7 +19991,7 @@ class WA extends Xt {
19991
19991
  }
19992
19992
  if (et === "mouseout") {
19993
19993
  this.context.events.emit("point:mouseout", {
19994
- point: gt,
19994
+ point: mt,
19995
19995
  index: $.indexOf(ht),
19996
19996
  series: this,
19997
19997
  event: nt
@@ -19999,7 +19999,7 @@ class WA extends Xt {
19999
19999
  return;
20000
20000
  }
20001
20001
  this.context.events.emit("point:click", {
20002
- point: gt,
20002
+ point: mt,
20003
20003
  index: $.indexOf(ht),
20004
20004
  series: this,
20005
20005
  event: nt
@@ -20024,22 +20024,22 @@ class WA extends Xt {
20024
20024
  let ht = et % nt;
20025
20025
  return ht < 0 && (ht += nt), ht;
20026
20026
  }, q = (et, nt) => {
20027
- const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, mt = ot(Math.atan2(vt, ht) + Math.PI / 2), gt = $.filter(
20027
+ const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, yt = ot(Math.atan2(vt, ht) + Math.PI / 2), mt = $.filter(
20028
20028
  (Bt) => Bt.source.index === nt.index || Bt.target.index === nt.index
20029
20029
  );
20030
- if (gt.length === 0) return null;
20031
- const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, Et = (Bt) => {
20032
- const Ut = Q(Bt), Qt = ot(Ut.startAngle + p), Ht = ot(Ut.endAngle + p);
20033
- return Qt <= Ht ? mt >= Qt && mt <= Ht : mt >= Qt || mt <= Ht;
20034
- }, Dt = gt.find(Et);
20035
- if (Dt) return Dt;
20036
- let yt = gt[0], qt = 1 / 0;
20037
- for (const Bt of gt) {
20038
- const Ut = Q(Bt), Qt = ot((Ut.startAngle + Ut.endAngle) / 2 + p);
20039
- let Ht = Math.abs(mt - Qt);
20040
- Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < qt && (qt = Ht, yt = Bt);
20030
+ if (mt.length === 0) return null;
20031
+ const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, Ct = (Bt) => {
20032
+ const qt = Q(Bt), Qt = ot(qt.startAngle + p), Ht = ot(qt.endAngle + p);
20033
+ return Qt <= Ht ? yt >= Qt && yt <= Ht : yt >= Qt || yt <= Ht;
20034
+ }, Ft = mt.find(Ct);
20035
+ if (Ft) return Ft;
20036
+ let pt = mt[0], Ut = 1 / 0;
20037
+ for (const Bt of mt) {
20038
+ const qt = Q(Bt), Qt = ot((qt.startAngle + qt.endAngle) / 2 + p);
20039
+ let Ht = Math.abs(yt - Qt);
20040
+ Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < Ut && (Ut = Ht, pt = Bt);
20041
20041
  }
20042
- return yt;
20042
+ return pt;
20043
20043
  }, st = (et) => {
20044
20044
  const nt = E[et.source.index], ht = E[et.target.index];
20045
20045
  return {
@@ -20051,17 +20051,17 @@ class WA extends Xt {
20051
20051
  fromNode: { name: nt },
20052
20052
  toNode: { name: ht }
20053
20053
  };
20054
- }, wt = r.borderColor ?? this.autoBorderColor(), Ct = r.borderWidth ?? 1, kt = B.selectAll(".katucharts-chord-arc").data(at).join("path").attr("class", "katucharts-chord-arc").attr("fill", (et) => H(et.index)).attr("stroke", wt).attr("stroke-width", Ct).style("cursor", "pointer");
20054
+ }, wt = r.borderColor ?? this.autoBorderColor(), Pt = r.borderWidth ?? 1, kt = B.selectAll(".katucharts-chord-arc").data(at).join("path").attr("class", "katucharts-chord-arc").attr("fill", (et) => H(et.index)).attr("stroke", wt).attr("stroke-width", Pt).style("cursor", "pointer");
20055
20055
  i ? kt.each(function(et, nt) {
20056
- const ht = rt(this), vt = { startAngle: et.startAngle, endAngle: et.startAngle }, mt = se(vt, et);
20057
- ht.transition("enter").duration(l).delay(nt * c).ease(pt).attrTween("d", () => (gt) => R(mt(gt)));
20056
+ const ht = rt(this), vt = { startAngle: et.startAngle, endAngle: et.startAngle }, yt = se(vt, et);
20057
+ ht.transition("enter").duration(l).delay(nt * c).ease(gt).attrTween("d", () => (mt) => R(yt(mt)));
20058
20058
  }) : kt.attr("d", R), kt.on("mouseover", (et, nt) => {
20059
20059
  rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", F(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O && O.interrupt("highlight").attr("opacity", 1), Y.transition("highlight").duration(K).ease(Z).attr(
20060
20060
  "fill-opacity",
20061
- (mt) => mt.source.index === nt.index || mt.target.index === nt.index ? Math.min(d + 0.35, 1) : 0.05
20062
- ), kt.attr("opacity", 1), kt.filter((mt) => mt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (mt) => $.some(
20063
- (Q) => Q.source.index === nt.index && Q.target.index === mt.index || Q.target.index === nt.index && Q.source.index === mt.index
20064
- ) ? 1 : 0.3), Ye.filter((mt) => mt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", 1);
20061
+ (yt) => yt.source.index === nt.index || yt.target.index === nt.index ? Math.min(d + 0.35, 1) : 0.05
20062
+ ), kt.attr("opacity", 1), kt.filter((yt) => yt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (yt) => $.some(
20063
+ (Q) => Q.source.index === nt.index && Q.target.index === yt.index || Q.target.index === nt.index && Q.source.index === yt.index
20064
+ ) ? 1 : 0.3), Ye.filter((yt) => yt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", 1);
20065
20065
  const vt = q(et, nt);
20066
20066
  this.context.events.emit("point:mouseover", {
20067
20067
  point: vt ? st(vt) : { name: E[nt.index], y: nt.value, sum: nt.value },
@@ -20072,7 +20072,7 @@ class WA extends Xt {
20072
20072
  plotY: et.offsetY - this.context.plotArea.y
20073
20073
  });
20074
20074
  }).on("mouseout", (et, nt) => {
20075
- rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", R(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O ? (O.interrupt("highlight"), O.transition("highlight").duration(K).ease(Z).attr("opacity", d), Y.transition("highlight").duration(K).ease(Z).attr("fill-opacity", 1)) : Y.transition("highlight").duration(K).ease(Z).attr("fill-opacity", d), kt.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Ye.filter((mt) => mt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", (mt) => Ze(mt) ? 1 : 0);
20075
+ rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", R(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O ? (O.interrupt("highlight"), O.transition("highlight").duration(K).ease(Z).attr("opacity", d), Y.transition("highlight").duration(K).ease(Z).attr("fill-opacity", 1)) : Y.transition("highlight").duration(K).ease(Z).attr("fill-opacity", d), kt.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Ye.filter((yt) => yt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
20076
20076
  const vt = q(et, nt);
20077
20077
  this.context.events.emit("point:mouseout", {
20078
20078
  point: vt ? st(vt) : { name: E[nt.index], y: nt.value, sum: nt.value },
@@ -20089,7 +20089,7 @@ class WA extends Xt {
20089
20089
  event: et
20090
20090
  });
20091
20091
  }), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data($).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
20092
- const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) || Ee, Nt = ((ir = _t.style) == null ? void 0 : ir.fontSize) || Mt, Ot = Ae(Nt), Zt = 22, ne = _ + Zt, $t = Math.max(Ot * 1.6, 17), Kt = "…", le = tn(Kt, Ot, "bold"), Ve = (et, nt) => {
20092
+ const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) || Ee, Nt = ((ir = _t.style) == null ? void 0 : ir.fontSize) || Mt, Ot = Ae(Nt), Zt = 22, ne = _ + Zt, Tt = Math.max(Ot * 1.6, 17), Kt = "…", le = tn(Kt, Ot, "bold"), Ve = (et, nt) => {
20093
20093
  if (!et || nt <= le) return "";
20094
20094
  if (tn(et, Ot, "bold") <= nt) return et;
20095
20095
  let ht = "";
@@ -20098,7 +20098,7 @@ class WA extends Xt {
20098
20098
  ht += vt;
20099
20099
  }
20100
20100
  return ht = ht.trimEnd(), (ht || et[0]) + Kt;
20101
- }, he = t.width - x, mn = x, Vn = v, ze = t.height - v, Be = at.map((et) => {
20101
+ }, he = t.width - x, mn = x, Vn = v, Be = t.height - v, Te = at.map((et) => {
20102
20102
  const nt = (et.startAngle + et.endAngle) / 2, ht = Math.sin(nt) >= 0;
20103
20103
  return {
20104
20104
  index: et.index,
@@ -20116,75 +20116,81 @@ class WA extends Xt {
20116
20116
  }), Ze = (et) => !!et.visible, Ge = B.append("g").attr("class", "katucharts-chord-labels");
20117
20117
  let Ye;
20118
20118
  if (o === "small") {
20119
- const et = Math.PI * 2, nt = _ + 6 + Ot * 0.5, ht = (gt) => [nt * Math.sin(gt), -nt * Math.cos(gt)], vt = (gt, Q) => {
20120
- if (!gt) return "";
20121
- const Et = Q * nt - 2;
20122
- if (Et < tn(gt[0], Ot, "bold")) return "";
20123
- if (tn(gt, Ot, "bold") <= Et) return gt;
20124
- let Dt = "";
20125
- for (const yt of gt) {
20126
- if (Dt && tn(Dt + yt, Ot, "bold") > Et) break;
20127
- Dt += yt;
20119
+ const et = Math.PI * 2, nt = _ + 6 + Ot * 0.5, ht = (mt) => [nt * Math.sin(mt), -nt * Math.cos(mt)], vt = (mt, Q) => {
20120
+ if (!mt) return "";
20121
+ const Ct = Q * nt - 2;
20122
+ if (Ct < tn(mt[0], Ot, "bold")) return "";
20123
+ if (tn(mt, Ot, "bold") <= Ct) return mt;
20124
+ let Ft = "";
20125
+ for (const pt of mt) {
20126
+ if (Ft && tn(Ft + pt, Ot, "bold") > Ct) break;
20127
+ Ft += pt;
20128
20128
  }
20129
- return Dt;
20130
- }, mt = B.append("defs");
20131
- if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be.filter((gt) => gt.visible)).join("text").attr("class", "katucharts-chord-label").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0), Ye.each((gt, Q, Et) => {
20132
- const Dt = rt(Et[Q]);
20133
- Dt.text(null);
20134
- const yt = vt(E[gt.index] || "", gt.span);
20135
- if (!yt) return;
20136
- const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [Qt, Ht] = ht(Bt ? gt.mid + Ut : gt.mid - Ut), [Ke, Te] = ht(Bt ? gt.mid - Ut : gt.mid + Ut), Oe = Bt ? 0 : 1, ye = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
20137
- mt.append("path").attr("id", ye).attr("fill", "none").attr("d", `M${Qt},${Ht}A${nt},${nt},0,0,${Oe},${Ke},${Te}`), Dt.append("textPath").attr("href", `#${ye}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
20129
+ return Ft;
20130
+ }, yt = B.append("defs");
20131
+ if (Ye = Ge.selectAll(".katucharts-chord-label").data(Te.filter((mt) => mt.visible)).join("text").attr("class", "katucharts-chord-label").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0), Ye.each((mt, Q, Ct) => {
20132
+ const Ft = rt(Ct[Q]);
20133
+ Ft.text(null);
20134
+ const pt = vt(E[mt.index] || "", mt.span);
20135
+ if (!pt) return;
20136
+ const Ut = (mt.mid % et + et) % et, Bt = Ut > Math.PI / 2 && Ut < Math.PI * 3 / 2, qt = mt.span / 2, [Qt, Ht] = ht(Bt ? mt.mid + qt : mt.mid - qt), [Ke, $e] = ht(Bt ? mt.mid - qt : mt.mid + qt), Oe = Bt ? 0 : 1, ye = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
20137
+ yt.append("path").attr("id", ye).attr("fill", "none").attr("d", `M${Qt},${Ht}A${nt},${nt},0,0,${Oe},${Ke},${$e}`), Ft.append("textPath").attr("href", `#${ye}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(pt);
20138
20138
  }), i) {
20139
- Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
20140
- const gt = Math.round(s * 0.62), Q = $.length, Et = f + Q * a + gt;
20141
- this.emitAfterAnimate(Et + 100);
20139
+ Ye.transition("enter").duration(300).delay(h).ease(gt).attr("opacity", 1);
20140
+ const mt = Math.round(s * 0.62), Q = $.length, Ct = f + Q * a + mt;
20141
+ this.emitAfterAnimate(Ct + 100);
20142
20142
  } else
20143
20143
  Ye.attr("opacity", 1);
20144
20144
  } else {
20145
- const et = Math.max(1, Vn - 5 + (ze - 5));
20145
+ const et = Math.max(1, Vn - 5 + (Be - 5));
20146
20146
  if (o === "medium") {
20147
- const Et = Math.max(1, Math.min(10, Math.floor(et / ($t * 1.2)))) * 2, Dt = Be.filter((yt) => yt.visible).sort((yt, qt) => qt.rank - yt.rank);
20148
- Dt.length > Et && Dt.slice(Et).forEach((yt) => {
20149
- yt.visible = !1;
20147
+ const Ct = Math.max(1, Math.min(10, Math.floor(et / (Tt * 1.2)))) * 2, Ft = Te.filter((pt) => pt.visible).sort((pt, Ut) => Ut.rank - pt.rank);
20148
+ Ft.length > Ct && Ft.slice(Ct).forEach((pt) => {
20149
+ pt.visible = !1;
20150
20150
  });
20151
+ } else {
20152
+ const Q = Math.max(3, Math.floor(et / (Tt * 2)));
20153
+ for (const Ct of [!0, !1])
20154
+ Te.filter((pt) => pt.visible && pt.isRight === Ct).sort((pt, Ut) => Ut.rank - pt.rank).slice(Q).forEach((pt) => {
20155
+ pt.visible = !1;
20156
+ });
20151
20157
  }
20152
- this.distributeChordLabels(Be.filter((Q) => Q.visible && Q.isRight), $t, Vn, ze), this.distributeChordLabels(Be.filter((Q) => Q.visible && !Q.isRight), $t, Vn, ze);
20158
+ this.distributeChordLabels(Te.filter((Q) => Q.visible && Q.isRight), Tt, Vn, Be), this.distributeChordLabels(Te.filter((Q) => Q.visible && !Q.isRight), Tt, Vn, Be);
20153
20159
  const nt = Math.max(Ot * 1.4, 16), ht = (Q) => {
20154
- const Et = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Dt = Et.length * $t / et;
20155
- let yt = 1;
20156
- Et.length >= 8 && Dt > 0.5 && (yt = 2), Et.length >= 14 && Dt > 0.75 && (yt = 3);
20157
- const qt = Math.max(1, yt * 2 - 2);
20158
- Et.forEach((Bt, Ut) => {
20159
- if (yt <= 1) {
20160
+ const Ct = Q.filter((Bt) => Bt.visible).sort((Bt, qt) => Bt.ly - qt.ly), Ft = Ct.length * Tt / et;
20161
+ let pt = 1;
20162
+ Ct.length >= 8 && Ft > 0.5 && (pt = 2), Ct.length >= 14 && Ft > 0.75 && (pt = 3);
20163
+ const Ut = Math.max(1, pt * 2 - 2);
20164
+ Ct.forEach((Bt, qt) => {
20165
+ if (pt <= 1) {
20160
20166
  Bt.col = 0;
20161
20167
  return;
20162
20168
  }
20163
- const Qt = Ut % qt;
20164
- Bt.col = Qt < yt ? Qt : qt - Qt;
20169
+ const Qt = qt % Ut;
20170
+ Bt.col = Qt < pt ? Qt : Ut - Qt;
20165
20171
  });
20166
20172
  };
20167
20173
  if (o === "medium")
20168
- for (const Q of Be) Q.col = 0;
20174
+ for (const Q of Te) Q.col = 0;
20169
20175
  else
20170
- ht(Be.filter((Q) => Q.isRight)), ht(Be.filter((Q) => !Q.isRight));
20171
- for (const Q of Be) {
20176
+ ht(Te.filter((Q) => Q.isRight)), ht(Te.filter((Q) => !Q.isRight));
20177
+ for (const Q of Te) {
20172
20178
  if (!Q.visible) continue;
20173
- const Et = (Q.col || 0) * nt, Dt = ne + Et, yt = Math.max(-Dt, Math.min(Dt, Q.ly)), qt = Math.sqrt(Math.max(0, Dt * Dt - yt * yt)), Bt = _ * 0.4 + Et;
20174
- Q.lx = Q.isRight ? Math.max(qt, Bt) : -Math.max(qt, Bt);
20175
- const Ut = (Q.isRight ? he : mn) - le - 4;
20176
- Q.lx = Q.isRight ? Math.min(Q.lx, Ut) : Math.max(Q.lx, -Ut);
20179
+ const Ct = (Q.col || 0) * nt, Ft = ne + Ct, pt = Math.max(-Ft, Math.min(Ft, Q.ly)), Ut = Math.sqrt(Math.max(0, Ft * Ft - pt * pt)), Bt = _ * 0.4 + Ct;
20180
+ Q.lx = Q.isRight ? Math.max(Ut, Bt) : -Math.max(Ut, Bt);
20181
+ const qt = (Q.isRight ? he : mn) - le - 4;
20182
+ Q.lx = Q.isRight ? Math.min(Q.lx, qt) : Math.max(Q.lx, -qt);
20177
20183
  }
20178
- const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ? he - vt(Q) : vt(Q) + mn) - 6), gt = Ge.selectAll(".katucharts-chord-connector").data(Be.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
20179
- const Et = _ + Zt * 0.55, Dt = Et * Math.sin(Q.mid), yt = -Et * Math.cos(Q.mid);
20180
- return `M${Q.ax},${Q.ay}L${Dt},${yt}L${Q.lx},${Q.ly}`;
20184
+ const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), yt = (Q) => Math.max(0, (Q.isRight ? he - vt(Q) : vt(Q) + mn) - 6), mt = Ge.selectAll(".katucharts-chord-connector").data(Te.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
20185
+ const Ct = _ + Zt * 0.55, Ft = Ct * Math.sin(Q.mid), pt = -Ct * Math.cos(Q.mid);
20186
+ return `M${Q.ax},${Q.ay}L${Ft},${pt}L${Q.lx},${Q.ly}`;
20181
20187
  });
20182
- if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && mt(Q) >= le ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
20183
- gt.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
20184
- const Q = Math.round(s * 0.62), Et = $.length, Dt = f + Et * a + Q;
20185
- this.emitAfterAnimate(Dt + 100);
20188
+ if (Ye = Ge.selectAll(".katucharts-chord-label").data(Te).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && yt(Q) >= le ? Ve(E[Q.index] || "", yt(Q)) : ""), i) {
20189
+ mt.transition("enter").duration(300).delay(h).ease(gt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(gt).attr("opacity", (pt) => Ze(pt) ? 1 : 0);
20190
+ const Q = Math.round(s * 0.62), Ct = $.length, Ft = f + Ct * a + Q;
20191
+ this.emitAfterAnimate(Ft + 100);
20186
20192
  } else
20187
- gt.attr("opacity", 0.8), Ye.attr("opacity", (Q) => Ze(Q) ? 1 : 0);
20193
+ mt.attr("opacity", 0.8), Ye.attr("opacity", (Q) => Ze(Q) ? 1 : 0);
20188
20194
  }
20189
20195
  }
20190
20196
  /**