@blueprint-chart/lib 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import Va from "dayjs";
6
6
  import * as b from "d3";
7
7
  import "d3-transition";
8
8
  import { D3Blueprint as Ca } from "d3-blueprint";
9
- import { computePosition as Rn, offset as Yn, flip as Bn, shift as _n } from "@floating-ui/dom";
9
+ import { computePosition as Rn, offset as Bn, flip as Yn, shift as _n } from "@floating-ui/dom";
10
10
  var mt = /* @__PURE__ */ ((t) => (t.BarVertical = "bar-vertical", t.BarHorizontal = "bar-horizontal", t.BarMulti = "bar-multi", t.ColumnStacked = "column-stacked", t.BarStacked = "bar-stacked", t.BarSplit = "bar-split", t.BarGrouped = "bar-grouped", t.Line = "line", t.LineMulti = "line-multi", t.Area = "area", t.AreaStacked = "area-stacked", t.Donut = "donut", t.Pie = "pie", t.VerticalBar = "vertical-bar", t.HorizontalBar = "horizontal-bar", t))(mt || {}), Nt = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t))(Nt || {}), Wa = /* @__PURE__ */ ((t) => (t.Linear = "linear", t.Log = "log", t))(Wa || {}), rt = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dashed = "dashed", t.Dotted = "dotted", t.None = "none", t))(rt || {}), We = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Inside = "inside", t.Outside = "outside", t.Off = "off", t))(We || {}), nr = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Horizontal = "horizontal", t.Vertical = "vertical", t))(nr || {}), Vi = /* @__PURE__ */ ((t) => (t.Above = "above", t.Below = "below", t))(Vi || {}), Wi = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Standard = "standard", t.AspectRatio = "aspect-ratio", t))(Wi || {}), at = /* @__PURE__ */ ((t) => (t.NW = "NW", t.N = "N", t.NE = "NE", t.E = "E", t.SE = "SE", t.S = "S", t.SW = "SW", t.W = "W", t.Center = "center", t))(at || {}), gt = /* @__PURE__ */ ((t) => (t.Direct = "direct", t.CurveLeft = "curve-left", t.CurveRight = "curve-right", t.Elbow = "elbow", t))(gt || {}), Tr = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dotted = "dotted", t.Dashed = "dashed", t))(Tr || {}), ht = /* @__PURE__ */ ((t) => (t.Point = "point", t.Range = "range", t.Free = "free", t))(ht || {});
11
11
  const pd = {
12
12
  point: "annotation",
@@ -390,7 +390,7 @@ function Rt(t, a) {
390
390
  n.classList.remove("bc-frame"), n.classList.add("bc-frame--fade-snapshot");
391
391
  }), r;
392
392
  }
393
- function Yt(t, a, e) {
393
+ function Bt(t, a, e) {
394
394
  const r = Oa(e ?? qa);
395
395
  if (getComputedStyle(t).position === "static" && (t.style.position = "relative"), t.appendChild(a), r > 0 && typeof a.animate == "function") {
396
396
  const l = a.animate(
@@ -601,11 +601,11 @@ function fo() {
601
601
  Se.call(H, q), ee = ee.replace(q, "");
602
602
  }
603
603
  }
604
- return (function(B) {
605
- var Q = B.afternoon;
604
+ return (function(Y) {
605
+ var Q = Y.afternoon;
606
606
  if (Q !== void 0) {
607
- var oe = B.hours;
608
- Q ? oe < 12 && (B.hours += 12) : oe === 12 && (B.hours = 0), delete B.afternoon;
607
+ var oe = Y.hours;
608
+ Q ? oe < 12 && (Y.hours += 12) : oe === 12 && (Y.hours = 0), delete Y.afternoon;
609
609
  }
610
610
  })(H), H;
611
611
  };
@@ -619,13 +619,13 @@ function fo() {
619
619
  var re = V[1];
620
620
  if (typeof re == "string") {
621
621
  var ee = V[2] === !0, H = V[3] === !0, Z = ee || H, ae = V[2];
622
- H && (ae = V[2]), c = this.$locale(), !ee && ae && (c = C.Ls[ae]), this.$d = (function(ie, q, B, Q) {
622
+ H && (ae = V[2]), c = this.$locale(), !ee && ae && (c = C.Ls[ae]), this.$d = (function(ie, q, Y, Q) {
623
623
  try {
624
624
  if (["x", "X"].indexOf(q) > -1) return new Date((q === "X" ? 1e3 : 1) * ie);
625
625
  var oe = m(q)(ie), le = oe.year, he = oe.month, ke = oe.day, ze = oe.hours, ve = oe.minutes, xe = oe.seconds, Me = oe.milliseconds, Le = oe.zone, pe = oe.week, _ = /* @__PURE__ */ new Date(), K = ke || (le || he ? 1 : _.getDate()), ye = le || _.getFullYear(), Oe = 0;
626
626
  le && !he || (Oe = he > 0 ? he - 1 : _.getMonth());
627
627
  var we, Ee = ze || 0, _e = ve || 0, Re = xe || 0, Fe = Me || 0;
628
- return Le ? new Date(Date.UTC(ye, Oe, K, Ee, _e, Re, Fe + 60 * Le.offset * 1e3)) : B ? new Date(Date.UTC(ye, Oe, K, Ee, _e, Re, Fe)) : (we = new Date(ye, Oe, K, Ee, _e, Re, Fe), pe && (we = Q(we).week(pe).toDate()), we);
628
+ return Le ? new Date(Date.UTC(ye, Oe, K, Ee, _e, Re, Fe + 60 * Le.offset * 1e3)) : Y ? new Date(Date.UTC(ye, Oe, K, Ee, _e, Re, Fe)) : (we = new Date(ye, Oe, K, Ee, _e, Re, Fe), pe && (we = Q(we).week(pe).toDate()), we);
629
629
  } catch {
630
630
  return /* @__PURE__ */ new Date("");
631
631
  }
@@ -1092,6 +1092,7 @@ function va(t, a, e = tl, r = -10, n = "top", l = "start", f = 0, o = 0, c = 0,
1092
1092
  }
1093
1093
  const al = [
1094
1094
  { name: "Blueprint", label: "Blueprint", colors: ["#2563A0", "#D4A63A", "#C94044", "#2D8659", "#4B90CF", "#163A65"] },
1095
+ { name: "BlueprintBold", label: "Blueprint Bold", colors: ["#2563A0", "#DDF247", "#C94044", "#2D8659", "#D4A63A", "#163A65"] },
1095
1096
  { name: "JosefAlbers", label: "Albers", colors: ["#c00559", "#de1f6c", "#f3a20d", "#f07a13", "#de6716"] },
1096
1097
  { name: "Durorthod", label: "Amber", colors: ["#2c0c00", "#803c15", "#c6782c", "#ffa91d", "#fff3ad"] },
1097
1098
  { name: "X41", label: "Berry", colors: ["#411f6b", "#623976", "#be3979", "#db928a", "#e2c6a6"] },
@@ -1192,7 +1193,7 @@ function No(t) {
1192
1193
  return typeof t.step == "function";
1193
1194
  }
1194
1195
  const wr = /* @__PURE__ */ new WeakMap();
1195
- class Bt {
1196
+ class Yt {
1196
1197
  constructor(a) {
1197
1198
  Jt(this, "vGroup", null);
1198
1199
  Jt(this, "hGroup", null);
@@ -1204,7 +1205,7 @@ class Bt {
1204
1205
  }
1205
1206
  static for(a) {
1206
1207
  let e = wr.get(a);
1207
- return e || (e = new Bt(a), wr.set(a, e)), e;
1208
+ return e || (e = new Yt(a), wr.set(a, e)), e;
1208
1209
  }
1209
1210
  static clear(a) {
1210
1211
  wr.delete(a);
@@ -1373,7 +1374,7 @@ function xa(t) {
1373
1374
  const h = b.select(o).datum();
1374
1375
  e.textContent = a(h), e.style.display = "block", Rn(o, e, {
1375
1376
  placement: "top",
1376
- middleware: [Yn(8), Bn(), _n()]
1377
+ middleware: [Bn(8), Yn(), _n()]
1377
1378
  }).then(({ x: v, y: g }) => {
1378
1379
  e && (e.style.left = `${v}px`, e.style.top = `${g}px`);
1379
1380
  });
@@ -1484,7 +1485,7 @@ const ya = {
1484
1485
  center: { nx: 0, ny: 0 }
1485
1486
  };
1486
1487
  at.N + "", at.W, at.NE + "", at.NW, at.E + "", at.N, at.SE + "", at.NE, at.S + "", at.E, at.SW + "", at.SE, at.W + "", at.S, at.NW + "", at.SW, at.Center + "", at.Center;
1487
- function Yo(t, a) {
1488
+ function Bo(t, a) {
1488
1489
  const e = ya[t] ?? ya.NW;
1489
1490
  return { dx: e.dx * a, dy: e.dy * a };
1490
1491
  }
@@ -1511,7 +1512,7 @@ function cn(t, a) {
1511
1512
  y: r + n.ny * (a.bottom - a.top) / 2
1512
1513
  };
1513
1514
  }
1514
- function Bo(t, a, e, r, n) {
1515
+ function Yo(t, a, e, r, n) {
1515
1516
  if ("bandwidth" in a) {
1516
1517
  const u = a, h = u(t.label) ?? 0, v = u.bandwidth(), g = e(t.value), p = e(0);
1517
1518
  return n === "horizontal" ? cn(r, { left: p, right: g, top: h, bottom: h + v }) : cn(r, { left: h, right: h + v, top: g, bottom: p });
@@ -1668,14 +1669,14 @@ function ll(t, a, e, r) {
1668
1669
  return;
1669
1670
  const f = t.append("g").attr("data-annotation-index", String(r)), o = a.key;
1670
1671
  o && f.attr("data-annotation-id", o);
1671
- const c = a, u = c.anchorDirection ?? at.N, h = Bo(l, e.scaleX, e.scaleY, u, e.orientation);
1672
+ const c = a, u = c.anchorDirection ?? at.N, h = Yo(l, e.scaleX, e.scaleY, u, e.orientation);
1672
1673
  let v, g;
1673
1674
  const p = a;
1674
1675
  if (p.dx != null || p.dy != null) {
1675
1676
  const { x: D, y: R } = un(l, e.scaleX, e.scaleY);
1676
1677
  v = D + (Number(p.dx) || 40), g = R + (Number(p.dy) || -40);
1677
1678
  } else if (p.direction != null && p.textOffsetX == null) {
1678
- const { x: D, y: R } = un(l, e.scaleX, e.scaleY), j = p.direction, te = p.anchorDistance ?? 60, V = Yo(j, te);
1679
+ const { x: D, y: R } = un(l, e.scaleX, e.scaleY), j = p.direction, te = p.anchorDistance ?? 60, V = Bo(j, te);
1679
1680
  v = D + V.dx, g = R + V.dy;
1680
1681
  } else
1681
1682
  v = h.x + (c.textOffsetX ?? -42), g = h.y + (c.textOffsetY ?? -42);
@@ -1917,7 +1918,7 @@ function fl(t) {
1917
1918
  const n = 8, l = r.x, f = r.y, o = r.x + r.width, c = r.y + r.height, u = l < 0 ? l - n : 0, h = f < 0 ? f - n : 0, v = o > a ? o + n : a, g = c > e ? c + n : e;
1918
1919
  (u < 0 || h < 0 || v > a || g > e) && b.select(t).attr("viewBox", `${u} ${h} ${v - u} ${g - h}`).attr("preserveAspectRatio", "xMidYMid meet");
1919
1920
  }
1920
- function Yr(t, a, e) {
1921
+ function Br(t, a, e) {
1921
1922
  const r = t.ownerSVGElement ?? t;
1922
1923
  b.select(r).style("overflow", "visible"), ws(r);
1923
1924
  const n = b.select(t);
@@ -2320,18 +2321,18 @@ function Da(t) {
2320
2321
  const a = vc(t.text);
2321
2322
  return t.placement === "inside" ? t.orientation === "horizontal" ? a <= t.barWidth - bc && mn <= t.barHeight : mn <= t.barHeight - mc && a <= t.barWidth : (t.orientation === "vertical" ? t.barWidth : t.barHeight) >= yc;
2322
2323
  }
2323
- const Ya = ["#4e79a7"], yn = 13;
2324
+ const Ba = ["#4e79a7"], yn = 13;
2324
2325
  function pl(t, a, e = {}, r = !1) {
2325
- var _, K, ye, Oe, we, Ee, _e, Re, Fe, He, Ye, se, be, T;
2326
+ var _, K, ye, Oe, we, Ee, _e, Re, Fe, He, Be, se, be, T;
2326
2327
  qt(r);
2327
2328
  let n = null, l, f, o, c = [];
2328
- const u = Bt.for(t);
2329
+ const u = Yt.for(t);
2329
2330
  if (r) {
2330
2331
  const A = Xt(t);
2331
2332
  f = A == null ? void 0 : A.margin, o = A == null ? void 0 : A.plotRect, u.detach(), (A == null ? void 0 : A.chartType) === "bar-vertical" ? c = Array.from(t.querySelectorAll(".bc-frame .bc-bar")) : A && (n = Rt(t)), l = /* @__PURE__ */ new Map();
2332
2333
  for (const L of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
2333
- for (const [w, Y] of Tt(L))
2334
- l.set(w, Y);
2334
+ for (const [w, B] of Tt(L))
2335
+ l.set(w, B);
2335
2336
  t.replaceChildren();
2336
2337
  }
2337
2338
  const { body: h } = Vt(t, e.frame), v = Ot(h).width, g = e.categoryLabelLine === !0, p = $a(a.values, (_ = e.verticalAxis) == null ? void 0 : _.range, (K = e.verticalAxis) == null ? void 0 : K.numberFormat, (ye = e.verticalAxis) == null ? void 0 : ye.scaleType), k = g ? We.Off : (Oe = e.horizontalAxis) == null ? void 0 : Oe.labelPosition, m = ra(v, (we = e.verticalAxis) == null ? void 0 : we.labelPosition, k, (Ee = e.verticalAxis) == null ? void 0 : Ee.direction, p);
@@ -2353,11 +2354,11 @@ function pl(t, a, e = {}, r = !1) {
2353
2354
  }
2354
2355
  const ae = H ? Z.map((A) => A.label) : V, W = b.scaleBand().domain(ae).range([0, O]).padding(Ta(e.barGap)), J = ((_e = e.verticalAxis) == null ? void 0 : _e.scaleType) === "log", Se = H ? Z.flatMap((A) => [A.y0, A.y1]) : re.map((A) => A.value);
2355
2356
  let [ie, q] = Xa(Se, (Re = e.verticalAxis) == null ? void 0 : Re.range, (Fe = e.verticalAxis) == null ? void 0 : Fe.scaleType);
2356
- if (e.valueLabels && ie < 0 && ((Ye = (He = e.verticalAxis) == null ? void 0 : He.range) == null ? void 0 : Ye.min) == null) {
2357
+ if (e.valueLabels && ie < 0 && ((Be = (He = e.verticalAxis) == null ? void 0 : He.range) == null ? void 0 : Be.min) == null) {
2357
2358
  const A = q - ie;
2358
2359
  ie -= A * 0.1;
2359
2360
  }
2360
- const B = J ? b.scaleSymlog().domain([ie, q]).nice().range([R, 0]) : b.scaleLinear().domain([ie, q]).nice().range([R, 0]);
2361
+ const Y = J ? b.scaleSymlog().domain([ie, q]).nice().range([R, 0]) : b.scaleLinear().domain([ie, q]).nice().range([R, 0]);
2361
2362
  u.attach(x, j);
2362
2363
  const Q = ee && e.valueLabels && !H ? (() => {
2363
2364
  const A = new Map(re.map((L) => [L.label, L.value]));
@@ -2368,12 +2369,12 @@ function pl(t, a, e = {}, r = !1) {
2368
2369
  };
2369
2370
  })() : { ...e.horizontalAxis, width: O }, oe = g ? { ...Q, labelPosition: We.Off } : Q;
2370
2371
  u.update({
2371
- vertical: { scale: B, height: C, options: { ...e.verticalAxis, gridWidth: O, topPadding: M.top } },
2372
+ vertical: { scale: Y, height: C, options: { ...e.verticalAxis, gridWidth: O, topPadding: M.top } },
2372
2373
  horizontal: { scale: W, height: C, options: oe }
2373
- }), !J && ie < 0 && q > 0 && b.select(x).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", O).attr("y1", B(0)).attr("y2", B(0)).attr("stroke", "#666").attr("stroke-width", 1);
2374
+ }), !J && ie < 0 && q > 0 && b.select(x).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", O).attr("y1", Y(0)).attr("y2", Y(0)).attr("stroke", "#666").attr("stroke-width", 1);
2374
2375
  const le = la(e.colorizes), he = new Set((e.highlights ?? []).map((A) => A.target)), ke = x.ownerSVGElement, ze = sa(ke, t, "bars", { x: 0, y: 0, width: O, height: R }), ve = b.select(ke).select("defs"), xe = ze.replace(/^bc-clip-/, ""), Me = b.select(x).append("g").attr("clip-path", `url(#${ze})`);
2375
2376
  if (e.barBackground) {
2376
- const A = (e.colors ?? Ya)[0], L = H ? ae : re.map((w) => w.label);
2377
+ const A = (e.colors ?? Ba)[0], L = H ? ae : re.map((w) => w.label);
2377
2378
  Me.selectAll(".bc-bar-bg").data(L, (w) => w).enter().append("rect").attr("class", "bc-bar-bg").attr("x", (w) => W(w) ?? 0).attr("y", 0).attr("width", W.bandwidth()).attr("height", R).attr("fill", A).attr("opacity", 0.18);
2378
2379
  }
2379
2380
  const Le = H ? ae : re.map((A) => A.label);
@@ -2385,12 +2386,12 @@ function pl(t, a, e = {}, r = !1) {
2385
2386
  }
2386
2387
  }
2387
2388
  if (!H && e.connectedColumns && re.length > 1) {
2388
- const A = e.colors ?? Ya, L = e.connectionsOpacity ?? 0.15;
2389
+ const A = e.colors ?? Ba, L = e.connectionsOpacity ?? 0.15;
2389
2390
  for (let w = 0; w < re.length - 1; w++) {
2390
- const Y = re[w], ce = re[w + 1];
2391
- if (Y.value == null || ce.value == null || Number.isNaN(Y.value) || Number.isNaN(ce.value) || Y.value === 0 || ce.value === 0)
2391
+ const B = re[w], ce = re[w + 1];
2392
+ if (B.value == null || ce.value == null || Number.isNaN(B.value) || Number.isNaN(ce.value) || B.value === 0 || ce.value === 0)
2392
2393
  continue;
2393
- const Ae = (W(Y.label) ?? 0) + W.bandwidth(), G = W(ce.label) ?? 0, $e = Math.min(B(0), B(Y.value)), Ce = Math.min(B(0), B(ce.value)), N = B(0), de = le.get(Y.label) ?? A[0], Te = le.get(ce.label) ?? A[0];
2394
+ const Ae = (W(B.label) ?? 0) + W.bandwidth(), G = W(ce.label) ?? 0, $e = Math.min(Y(0), Y(B.value)), Ce = Math.min(Y(0), Y(ce.value)), N = Y(0), de = le.get(B.label) ?? A[0], Te = le.get(ce.label) ?? A[0];
2394
2395
  let Pe;
2395
2396
  if (de === Te)
2396
2397
  Pe = de;
@@ -2403,14 +2404,14 @@ function pl(t, a, e = {}, r = !1) {
2403
2404
  }
2404
2405
  const pe = b.select(x).append("g");
2405
2406
  if (H) {
2406
- const A = e.colors ?? Ya, L = "#333";
2407
+ const A = e.colors ?? Ba, L = "#333";
2407
2408
  if (e.connectedColumns && Z.length > 1) {
2408
- const w = e.colors ?? Ya, Y = e.connectionsOpacity ?? 0.15;
2409
+ const w = e.colors ?? Ba, B = e.connectionsOpacity ?? 0.15;
2409
2410
  for (let ce = 0; ce < Z.length - 1; ce++) {
2410
2411
  const Ae = Z[ce], G = Z[ce + 1];
2411
2412
  if (G.isTotal || Ae.value == null || G.value == null || Number.isNaN(Ae.value) || Number.isNaN(G.value) || Ae.value === 0 || G.value === 0)
2412
2413
  continue;
2413
- const $e = (W(Ae.label) ?? 0) + W.bandwidth(), Ce = W(G.label) ?? 0, N = B(Ae.y1), de = B(G.y1), Te = B(Ae.y0), Pe = B(G.y0), Ge = le.get(Ae.label) ?? w[0], Ke = le.get(G.label) ?? w[0];
2414
+ const $e = (W(Ae.label) ?? 0) + W.bandwidth(), Ce = W(G.label) ?? 0, N = Y(Ae.y1), de = Y(G.y1), Te = Y(Ae.y0), Pe = Y(G.y0), Ge = le.get(Ae.label) ?? w[0], Ke = le.get(G.label) ?? w[0];
2414
2415
  let ot;
2415
2416
  if (Ge === Ke)
2416
2417
  ot = Ge;
@@ -2418,19 +2419,19 @@ function pl(t, a, e = {}, r = !1) {
2418
2419
  const kt = `bc-conn-grad-${xe}-${ce}`, ct = ve.append("linearGradient").attr("id", kt).attr("x1", "0%").attr("x2", "100%").attr("y1", "0%").attr("y2", "0%");
2419
2420
  ct.append("stop").attr("offset", "0%").attr("stop-color", Ge), ct.append("stop").attr("offset", "100%").attr("stop-color", Ke), ot = `url(#${kt})`;
2420
2421
  }
2421
- Me.append("polygon").attr("class", "bc-bar-connection").attr("points", `${$e},${N} ${Ce},${de} ${Ce},${Pe} ${$e},${Te}`).attr("fill", ot).attr("opacity", Y).attr("pointer-events", "none");
2422
+ Me.append("polygon").attr("class", "bc-bar-connection").attr("points", `${$e},${N} ${Ce},${de} ${Ce},${Pe} ${$e},${Te}`).attr("fill", ot).attr("opacity", B).attr("pointer-events", "none");
2422
2423
  }
2423
2424
  }
2424
2425
  for (let w = 0; w < Z.length - 1; w++) {
2425
- const Y = Z[w], ce = Z[w + 1];
2426
+ const B = Z[w], ce = Z[w + 1];
2426
2427
  if (ce.isTotal)
2427
2428
  break;
2428
- Me.append("line").attr("class", "bc-waterfall-connector").attr("x1", (W(Y.label) ?? 0) + W.bandwidth()).attr("x2", W(ce.label) ?? 0).attr("y1", B(Y.y1)).attr("y2", B(Y.y1)).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
2429
+ Me.append("line").attr("class", "bc-waterfall-connector").attr("x1", (W(B.label) ?? 0) + W.bandwidth()).attr("x2", W(ce.label) ?? 0).attr("y1", Y(B.y1)).attr("y2", Y(B.y1)).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
2429
2430
  }
2430
- if (Me.selectAll(".bc-bar").data(Z, (w) => w.label).enter().append("rect").attr("class", "bc-bar").attr("x", (w) => W(w.label) ?? 0).attr("y", (w) => Math.min(B(w.y0), B(w.y1))).attr("width", W.bandwidth()).attr("height", (w) => Math.abs(B(w.y0) - B(w.y1))).attr("fill", (w) => w.isTotal ? L : le.get(w.label) ?? A[0]).attr("opacity", (w) => he.size > 0 ? Pt(he, w.label) : null), e.valueLabels) {
2431
- const w = e.valueLabelPosition ?? Ie.Auto, Y = ma(((se = e.verticalAxis) == null ? void 0 : se.numberFormat) ?? ""), ce = (Ae) => Y ? Y(Ae) : String(Ae);
2431
+ if (Me.selectAll(".bc-bar").data(Z, (w) => w.label).enter().append("rect").attr("class", "bc-bar").attr("x", (w) => W(w.label) ?? 0).attr("y", (w) => Math.min(Y(w.y0), Y(w.y1))).attr("width", W.bandwidth()).attr("height", (w) => Math.abs(Y(w.y0) - Y(w.y1))).attr("fill", (w) => w.isTotal ? L : le.get(w.label) ?? A[0]).attr("opacity", (w) => he.size > 0 ? Pt(he, w.label) : null), e.valueLabels) {
2432
+ const w = e.valueLabelPosition ?? Ie.Auto, B = ma(((se = e.verticalAxis) == null ? void 0 : se.numberFormat) ?? ""), ce = (Ae) => B ? B(Ae) : String(Ae);
2432
2433
  pe.selectAll(".bc-value-label").data(Z, (Ae) => Ae.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("x", (Ae) => (W(Ae.label) ?? 0) + W.bandwidth() / 2).attr("y", (Ae) => {
2433
- const G = Math.min(B(Ae.y0), B(Ae.y1)), $e = Math.abs(B(Ae.y0) - B(Ae.y1));
2434
+ const G = Math.min(Y(Ae.y0), Y(Ae.y1)), $e = Math.abs(Y(Ae.y0) - Y(Ae.y1));
2434
2435
  return w === Ie.Inside ? G + $e / 2 : G - 4;
2435
2436
  }).attr("text-anchor", "middle").attr("dominant-baseline", w === Ie.Inside ? "central" : "auto").attr("fill", (Ae) => w === Ie.Inside ? Gt(Ae.isTotal ? L : le.get(Ae.label) ?? A[0]) : "currentColor").text((Ae) => ee ? Ae.label : ce(Ae.isTotal ? Ae.y1 : Ae.value));
2436
2437
  }
@@ -2448,10 +2449,10 @@ function pl(t, a, e = {}, r = !1) {
2448
2449
  insert: (ce) => ce.append("rect").attr("class", "bc-bar"),
2449
2450
  attrs: (ce) => ({
2450
2451
  x: W(ce.label) ?? 0,
2451
- y: Math.min(B(0), B(ce.value)),
2452
+ y: Math.min(Y(0), Y(ce.value)),
2452
2453
  width: W.bandwidth(),
2453
- height: Math.abs(B(ce.value) - B(0)),
2454
- fill: le.get(ce.label) ?? (e.colors ?? Ya)[0],
2454
+ height: Math.abs(Y(ce.value) - Y(0)),
2455
+ fill: le.get(ce.label) ?? (e.colors ?? Ba)[0],
2455
2456
  opacity: Pt(he, ce.label)
2456
2457
  })
2457
2458
  }), na(A, {
@@ -2471,7 +2472,7 @@ function pl(t, a, e = {}, r = !1) {
2471
2472
  color: e.crosshairColor
2472
2473
  })), (T = e.annotations) != null && T.length && w.use(Ua(e.annotations, {
2473
2474
  scaleX: W,
2474
- scaleY: B,
2475
+ scaleY: Y,
2475
2476
  data: re,
2476
2477
  width: O,
2477
2478
  height: R,
@@ -2479,11 +2480,11 @@ function pl(t, a, e = {}, r = !1) {
2479
2480
  transition: r,
2480
2481
  priorAnnotations: l
2481
2482
  }));
2482
- const Y = () => w.draw(re);
2483
- A.state === "committing" ? A.register(Y) : Y(), e.valueLabels && Ac(pe, re, W, B, {
2483
+ const B = () => w.draw(re);
2484
+ A.state === "committing" ? A.register(B) : B(), e.valueLabels && Ac(pe, re, W, Y, {
2484
2485
  position: e.valueLabelPosition,
2485
2486
  colorOverrides: le,
2486
- colors: e.colors ?? Ya,
2487
+ colors: e.colors ?? Ba,
2487
2488
  swapLabelValue: ee,
2488
2489
  percent: e.valueLabels === "percent",
2489
2490
  total: b.sum(re, (ce) => ce.value)
@@ -2494,7 +2495,7 @@ function pl(t, a, e = {}, r = !1) {
2494
2495
  for (const L of ae)
2495
2496
  A.append("text").attr("class", "bc-category-label").attr("x", (W(L) ?? 0) + W.bandwidth() / 2).attr("y", R + yn / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(L);
2496
2497
  }
2497
- Ut(t, { chartType: "bar-vertical", margin: M, plotRect: te }), n && (It(Me.node()), Yt(t, n));
2498
+ Ut(t, { chartType: "bar-vertical", margin: M, plotRect: te }), n && (It(Me.node()), Bt(t, n));
2498
2499
  }
2499
2500
  function xc(t, a, e, r) {
2500
2501
  const n = Math.abs(e(t.value) - e(0)), l = r === Ie.Inside, f = (a(t.label) ?? 0) + a.bandwidth() / 2, o = "middle";
@@ -2537,7 +2538,7 @@ function wc(t, a) {
2537
2538
  const e = t.labels.map((r, n) => ({ label: r, value: t.values[n] }));
2538
2539
  return a.sort === lt.Ascending ? e.sort((r, n) => r.value - n.value) : a.sort === lt.Descending && e.sort((r, n) => n.value - r.value), e.map((r) => r.label);
2539
2540
  }
2540
- const Ba = ["#4e79a7"], vn = 13, Sc = "11px sans-serif", os = 4;
2541
+ const Ya = ["#4e79a7"], vn = 13, Sc = "11px sans-serif", os = 4;
2541
2542
  function cs(t) {
2542
2543
  try {
2543
2544
  const e = document.createElement("canvas").getContext("2d");
@@ -2548,10 +2549,10 @@ function cs(t) {
2548
2549
  return t.length * 6.5;
2549
2550
  }
2550
2551
  function bl(t, a, e = {}, r = !1) {
2551
- var _, K, ye, Oe, we, Ee, _e, Re, Fe, He, Ye;
2552
+ var _, K, ye, Oe, we, Ee, _e, Re, Fe, He, Be;
2552
2553
  qt(r);
2553
2554
  let n = null, l, f, o = [], c;
2554
- const u = Bt.for(t);
2555
+ const u = Yt.for(t);
2555
2556
  if (r) {
2556
2557
  const se = Xt(t);
2557
2558
  f = se == null ? void 0 : se.margin, c = se == null ? void 0 : se.plotRect, u.detach(), (se == null ? void 0 : se.chartType) === "bar-horizontal" ? o = Array.from(t.querySelectorAll(".bc-frame .bc-bar")) : se && (n = Rt(t)), l = /* @__PURE__ */ new Map();
@@ -2581,7 +2582,7 @@ function bl(t, a, e = {}, r = !1) {
2581
2582
  }
2582
2583
  e.waterfallTotal && ae.push({ label: "Total", value: se, x0: 0, x1: se, isTotal: !0 });
2583
2584
  }
2584
- const W = ((Ee = e.horizontalAxis) == null ? void 0 : Ee.scaleType) === "log", J = Z ? ae.flatMap((se) => [se.x0, se.x1]) : H.map((se) => se.value), [Se, ie] = Xa(J, (_e = e.horizontalAxis) == null ? void 0 : _e.range, (Re = e.horizontalAxis) == null ? void 0 : Re.scaleType), q = W ? b.scaleSymlog().domain([Se, ie]).nice().range([0, D]) : b.scaleLinear().domain([Se, ie]).nice().range([0, D]), B = Z ? ae.map((se) => se.label) : ee, Q = b.scaleBand().domain(B).range([0, R]).padding(Ta(e.barGap)), oe = C && e.valueLabels && !Z ? (() => {
2585
+ const W = ((Ee = e.horizontalAxis) == null ? void 0 : Ee.scaleType) === "log", J = Z ? ae.flatMap((se) => [se.x0, se.x1]) : H.map((se) => se.value), [Se, ie] = Xa(J, (_e = e.horizontalAxis) == null ? void 0 : _e.range, (Re = e.horizontalAxis) == null ? void 0 : Re.scaleType), q = W ? b.scaleSymlog().domain([Se, ie]).nice().range([0, D]) : b.scaleLinear().domain([Se, ie]).nice().range([0, D]), Y = Z ? ae.map((se) => se.label) : ee, Q = b.scaleBand().domain(Y).range([0, R]).padding(Ta(e.barGap)), oe = C && e.valueLabels && !Z ? (() => {
2585
2586
  const se = new Map(H.map((be) => [be.label, be.value]));
2586
2587
  return {
2587
2588
  ...e.verticalAxis,
@@ -2596,10 +2597,10 @@ function bl(t, a, e = {}, r = !1) {
2596
2597
  }), !W && Se < 0 && ie > 0 && b.select(M).append("line").attr("class", "bc-zero-baseline").attr("x1", q(0)).attr("x2", q(0)).attr("y1", 0).attr("y2", R).attr("stroke", "#666").attr("stroke-width", 1);
2597
2598
  const he = la(e.colorizes), ke = new Set((e.highlights ?? []).map((se) => se.target)), ze = M.ownerSVGElement, ve = sa(ze, t, "bars", { x: 0, y: 0, width: D, height: R }), xe = b.select(ze).select("defs"), Me = ve.replace(/^bc-clip-/, ""), Le = b.select(M).append("g").attr("clip-path", `url(#${ve})`);
2598
2599
  if (e.barBackground) {
2599
- const se = (e.colors ?? Ba)[0], be = Z ? B : H.map((T) => T.label);
2600
+ const se = (e.colors ?? Ya)[0], be = Z ? Y : H.map((T) => T.label);
2600
2601
  Le.selectAll(".bc-bar-bg").data(be, (T) => T).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (T) => (Q(T) ?? 0) + V).attr("width", D).attr("height", Q.bandwidth() - V).attr("fill", se).attr("opacity", 0.18);
2601
2602
  }
2602
- const pe = Z ? B : H.map((se) => se.label);
2603
+ const pe = Z ? Y : H.map((se) => se.label);
2603
2604
  if (e.barSeparators && pe.length > 1) {
2604
2605
  const se = Q.step();
2605
2606
  for (let be = 1; be < pe.length; be++) {
@@ -2608,12 +2609,12 @@ function bl(t, a, e = {}, r = !1) {
2608
2609
  }
2609
2610
  }
2610
2611
  if (!Z && e.connectedColumns && H.length > 1) {
2611
- const se = e.colors ?? Ba, be = e.connectionsOpacity ?? 0.15;
2612
+ const se = e.colors ?? Ya, be = e.connectionsOpacity ?? 0.15;
2612
2613
  for (let T = 0; T < H.length - 1; T++) {
2613
2614
  const A = H[T], L = H[T + 1];
2614
2615
  if (A.value == null || L.value == null || Number.isNaN(A.value) || Number.isNaN(L.value) || A.value === 0 || L.value === 0)
2615
2616
  continue;
2616
- const w = (Q(A.label) ?? 0) + Q.bandwidth(), Y = (Q(L.label) ?? 0) + V, ce = Math.max(q(0), q(A.value)), Ae = Math.max(q(0), q(L.value)), G = q(0), $e = he.get(A.label) ?? se[0], Ce = he.get(L.label) ?? se[0];
2617
+ const w = (Q(A.label) ?? 0) + Q.bandwidth(), B = (Q(L.label) ?? 0) + V, ce = Math.max(q(0), q(A.value)), Ae = Math.max(q(0), q(L.value)), G = q(0), $e = he.get(A.label) ?? se[0], Ce = he.get(L.label) ?? se[0];
2617
2618
  let N;
2618
2619
  if ($e === Ce)
2619
2620
  N = $e;
@@ -2621,18 +2622,18 @@ function bl(t, a, e = {}, r = !1) {
2621
2622
  const de = `bc-conn-grad-${Me}-${T}`, Te = xe.append("linearGradient").attr("id", de).attr("x1", "0%").attr("x2", "0%").attr("y1", "0%").attr("y2", "100%");
2622
2623
  Te.append("stop").attr("offset", "0%").attr("stop-color", $e), Te.append("stop").attr("offset", "100%").attr("stop-color", Ce), N = `url(#${de})`;
2623
2624
  }
2624
- Le.append("polygon").attr("class", "bc-bar-connection").attr("points", `${ce},${w} ${Ae},${Y} ${G},${Y} ${G},${w}`).attr("fill", N).attr("opacity", be).attr("pointer-events", "none");
2625
+ Le.append("polygon").attr("class", "bc-bar-connection").attr("points", `${ce},${w} ${Ae},${B} ${G},${B} ${G},${w}`).attr("fill", N).attr("opacity", be).attr("pointer-events", "none");
2625
2626
  }
2626
2627
  }
2627
2628
  if (Z) {
2628
- const se = e.colors ?? Ba, be = "#333";
2629
+ const se = e.colors ?? Ya, be = "#333";
2629
2630
  if (e.connectedColumns && ae.length > 1) {
2630
- const T = e.colors ?? Ba, A = e.connectionsOpacity ?? 0.15;
2631
+ const T = e.colors ?? Ya, A = e.connectionsOpacity ?? 0.15;
2631
2632
  for (let L = 0; L < ae.length - 1; L++) {
2632
- const w = ae[L], Y = ae[L + 1];
2633
- if (Y.isTotal || w.value == null || Y.value == null || Number.isNaN(w.value) || Number.isNaN(Y.value) || w.value === 0 || Y.value === 0)
2633
+ const w = ae[L], B = ae[L + 1];
2634
+ if (B.isTotal || w.value == null || B.value == null || Number.isNaN(w.value) || Number.isNaN(B.value) || w.value === 0 || B.value === 0)
2634
2635
  continue;
2635
- const ce = (Q(w.label) ?? 0) + Q.bandwidth(), Ae = (Q(Y.label) ?? 0) + V, G = q(w.x1), $e = q(Y.x1), Ce = q(w.x0), N = q(Y.x0), de = he.get(w.label) ?? T[0], Te = he.get(Y.label) ?? T[0];
2636
+ const ce = (Q(w.label) ?? 0) + Q.bandwidth(), Ae = (Q(B.label) ?? 0) + V, G = q(w.x1), $e = q(B.x1), Ce = q(w.x0), N = q(B.x0), de = he.get(w.label) ?? T[0], Te = he.get(B.label) ?? T[0];
2636
2637
  let Pe;
2637
2638
  if (de === Te)
2638
2639
  Pe = de;
@@ -2650,11 +2651,11 @@ function bl(t, a, e = {}, r = !1) {
2650
2651
  Le.append("line").attr("class", "bc-waterfall-connector").attr("x1", q(A.x1)).attr("x2", q(A.x1)).attr("y1", (Q(A.label) ?? 0) + Q.bandwidth()).attr("y2", (Q(L.label) ?? 0) + V).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
2651
2652
  }
2652
2653
  if (Le.selectAll(".bc-bar").data(ae, (T) => T.label).enter().append("rect").attr("class", "bc-bar").attr("x", (T) => Math.min(q(T.x0), q(T.x1))).attr("y", (T) => (Q(T.label) ?? 0) + V).attr("width", (T) => Math.abs(q(T.x1) - q(T.x0))).attr("height", Q.bandwidth() - V).attr("fill", (T) => T.isTotal ? be : he.get(T.label) ?? se[0]).attr("opacity", (T) => ke.size > 0 ? Pt(ke, T.label) : null), e.valueLabels) {
2653
- const T = O, A = ma(((Fe = e.horizontalAxis) == null ? void 0 : Fe.numberFormat) ?? ""), L = (Y) => A ? A(Y) : String(Y);
2654
- b.select(M).append("g").selectAll(".bc-value-label").data(ae, (Y) => Y.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("dominant-baseline", "central").attr("y", (Y) => (Q(Y.label) ?? 0) + V + (Q.bandwidth() - V) / 2).attr("x", (Y) => {
2655
- const ce = Math.max(q(Y.x0), q(Y.x1));
2654
+ const T = O, A = ma(((Fe = e.horizontalAxis) == null ? void 0 : Fe.numberFormat) ?? ""), L = (B) => A ? A(B) : String(B);
2655
+ b.select(M).append("g").selectAll(".bc-value-label").data(ae, (B) => B.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("dominant-baseline", "central").attr("y", (B) => (Q(B.label) ?? 0) + V + (Q.bandwidth() - V) / 2).attr("x", (B) => {
2656
+ const ce = Math.max(q(B.x0), q(B.x1));
2656
2657
  return T === Ie.Inside ? ce - 4 : ce + 4;
2657
- }).attr("text-anchor", T === Ie.Inside ? "end" : "start").attr("fill", (Y) => T === Ie.Inside ? Gt(Y.isTotal ? be : he.get(Y.label) ?? se[0]) : "currentColor").text((Y) => C ? Y.label : L(Y.isTotal ? Y.x1 : Y.value));
2658
+ }).attr("text-anchor", T === Ie.Inside ? "end" : "start").attr("fill", (B) => T === Ie.Inside ? Gt(B.isTotal ? be : he.get(B.label) ?? se[0]) : "currentColor").text((B) => C ? B.label : L(B.isTotal ? B.x1 : B.value));
2658
2659
  }
2659
2660
  } else {
2660
2661
  const se = it(t), be = Le.append("g").node();
@@ -2673,7 +2674,7 @@ function bl(t, a, e = {}, r = !1) {
2673
2674
  y: (Q(L.label) ?? 0) + V,
2674
2675
  width: Math.abs(q(L.value) - q(0)),
2675
2676
  height: Q.bandwidth() - V,
2676
- fill: he.get(L.label) ?? (e.colors ?? Ba)[0],
2677
+ fill: he.get(L.label) ?? (e.colors ?? Ya)[0],
2677
2678
  opacity: Pt(ke, L.label)
2678
2679
  })
2679
2680
  }), na(se, {
@@ -2692,7 +2693,7 @@ function bl(t, a, e = {}, r = !1) {
2692
2693
  style: e.crosshairStyle,
2693
2694
  color: e.crosshairColor,
2694
2695
  orientation: Ct.Horizontal
2695
- })), (Ye = e.annotations) != null && Ye.length && T.use(Ua(e.annotations, {
2696
+ })), (Be = e.annotations) != null && Be.length && T.use(Ua(e.annotations, {
2696
2697
  scaleX: Q,
2697
2698
  scaleY: q,
2698
2699
  data: H,
@@ -2709,7 +2710,7 @@ function bl(t, a, e = {}, r = !1) {
2709
2710
  kc(L, H, q, Q, {
2710
2711
  position: O,
2711
2712
  colorOverrides: he,
2712
- colors: e.colors ?? Ba,
2713
+ colors: e.colors ?? Ya,
2713
2714
  swapLabelValue: C,
2714
2715
  categoryLabelOffset: V,
2715
2716
  percent: e.valueLabels === "percent",
@@ -2719,12 +2720,12 @@ function bl(t, a, e = {}, r = !1) {
2719
2720
  }
2720
2721
  if (p) {
2721
2722
  const se = b.select(M).append("g").attr("class", "bc-category-labels");
2722
- for (const be of B) {
2723
+ for (const be of Y) {
2723
2724
  const T = Q(be) ?? 0;
2724
2725
  se.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", T + vn / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(be);
2725
2726
  }
2726
2727
  }
2727
- Ut(t, { chartType: "bar-horizontal", margin: j, plotRect: te }), n && (It(Le.node()), Yt(t, n));
2728
+ Ut(t, { chartType: "bar-horizontal", margin: j, plotRect: te }), n && (It(Le.node()), Bt(t, n));
2728
2729
  }
2729
2730
  function Lc(t, a, e, r, n = 0) {
2730
2731
  const l = r === Ie.Inside, f = (e(t.label) ?? 0) + n + (e.bandwidth() - n) / 2;
@@ -2853,7 +2854,7 @@ function Pc(t, a, e = {}, r = !1) {
2853
2854
  var N, de, Te, Pe, Ge, Ke, ot, kt, ct, _t, et, Je, zt;
2854
2855
  qt(r);
2855
2856
  let n = null, l, f, o = [], c;
2856
- const u = Bt.for(t);
2857
+ const u = Yt.for(t);
2857
2858
  if (r) {
2858
2859
  const U = Xt(t);
2859
2860
  f = U == null ? void 0 : U.margin, c = U == null ? void 0 : U.plotRect, u.detach(), (U == null ? void 0 : U.chartType) === "bar-multi" ? o = Array.from(t.querySelectorAll(".bc-frame .bc-bar-multi")) : U && (n = Rt(t)), l = /* @__PURE__ */ new Map();
@@ -2870,7 +2871,7 @@ function Pc(t, a, e = {}, r = !1) {
2870
2871
  ie.top = Se + U;
2871
2872
  }
2872
2873
  C && j === "bottom" && (ie.bottom = (ie.bottom ?? 24) + Se), C && j === "left" && (ie.left = (ie.left ?? 50) + J.width + 10), C && j === "right" && (ie.right = (ie.right ?? 20) + J.width + 10);
2873
- const { chartArea: q, width: B, height: Q, margin: oe } = Wt(h, ie), le = aa(f, oe);
2874
+ const { chartArea: q, width: Y, height: Q, margin: oe } = Wt(h, ie), le = aa(f, oe);
2874
2875
  let [he, ke] = Xa(V, (ot = e.verticalAxis) == null ? void 0 : ot.range, (kt = e.verticalAxis) == null ? void 0 : kt.scaleType);
2875
2876
  if (e.valueLabels && he < 0 && ((_t = (ct = e.verticalAxis) == null ? void 0 : ct.range) == null ? void 0 : _t.min) == null) {
2876
2877
  const U = ke - he;
@@ -2885,11 +2886,11 @@ function Pc(t, a, e = {}, r = !1) {
2885
2886
  }));
2886
2887
  U.sort((F, ne) => ne.total - F.total), ze = U.map((F) => F.label);
2887
2888
  }
2888
- const ve = b.scaleBand().domain(ze).range([0, B]).padding(Ta(e.barGap)), xe = b.scaleBand().domain(p).range([0, ve.bandwidth()]).padding(0.05), Me = ((et = e.verticalAxis) == null ? void 0 : et.scaleType) === "log", Le = Me ? b.scaleSymlog().domain([he, ke]).nice().range([Q, 0]) : b.scaleLinear().domain([he, ke]).nice().range([Q, 0]);
2889
+ const ve = b.scaleBand().domain(ze).range([0, Y]).padding(Ta(e.barGap)), xe = b.scaleBand().domain(p).range([0, ve.bandwidth()]).padding(0.05), Me = ((et = e.verticalAxis) == null ? void 0 : et.scaleType) === "log", Le = Me ? b.scaleSymlog().domain([he, ke]).nice().range([Q, 0]) : b.scaleLinear().domain([he, ke]).nice().range([Q, 0]);
2889
2890
  u.attach(q, le), u.update({
2890
- vertical: { scale: Le, height: Q, options: { ...e.verticalAxis, gridWidth: B, topPadding: oe.top } },
2891
- horizontal: { scale: ve, height: Q, options: { ...e.horizontalAxis, width: B } }
2892
- }), !Me && he < 0 && ke > 0 && b.select(q).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", B).attr("y1", Le(0)).attr("y2", Le(0)).attr("stroke", "#666").attr("stroke-width", 1);
2891
+ vertical: { scale: Le, height: Q, options: { ...e.verticalAxis, gridWidth: Y, topPadding: oe.top } },
2892
+ horizontal: { scale: ve, height: Q, options: { ...e.horizontalAxis, width: Y } }
2893
+ }), !Me && he < 0 && ke > 0 && b.select(q).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", Y).attr("y1", Le(0)).attr("y2", Le(0)).attr("stroke", "#666").attr("stroke-width", 1);
2893
2894
  const pe = /* @__PURE__ */ new Map();
2894
2895
  e.sortMode === "within-groups" && a.labels.forEach((U, F) => {
2895
2896
  const ne = g.map((me) => ({ name: me.name, value: me.values[F] }));
@@ -2904,7 +2905,7 @@ function Pc(t, a, e = {}, r = !1) {
2904
2905
  _.push({ label: U, series: fe, seriesName: ne.name, value: ne.values[F], seriesIndex: me });
2905
2906
  });
2906
2907
  });
2907
- const K = e.valueLabels ?? !1, ye = q.ownerSVGElement, Oe = sa(ye, t, "bars", { x: 0, y: 0, width: B, height: Q }), we = b.select(q).append("g").attr("clip-path", `url(#${Oe})`), Ee = it(t), _e = ja(e.highlights), Re = la(e.colorizes), Fe = we.append("g").node();
2908
+ const K = e.valueLabels ?? !1, ye = q.ownerSVGElement, Oe = sa(ye, t, "bars", { x: 0, y: 0, width: Y, height: Q }), we = b.select(q).append("g").attr("clip-path", `url(#${Oe})`), Ee = it(t), _e = ja(e.highlights), Re = la(e.colorizes), Fe = we.append("g").node();
2908
2909
  if (r)
2909
2910
  for (const U of o)
2910
2911
  U.removeAttribute("opacity"), U.removeAttribute("fill-opacity"), Fe.appendChild(U);
@@ -2927,7 +2928,7 @@ function Pc(t, a, e = {}, r = !1) {
2927
2928
  return ne < 1 && (me["fill-opacity"] = ne), _e.size > 0 ? { ...me, opacity: Pt(_e, U.seriesName) } : me;
2928
2929
  }
2929
2930
  });
2930
- const He = { left: oe.left, top: oe.top, width: B, height: Q };
2931
+ const He = { left: oe.left, top: oe.top, width: Y, height: Q };
2931
2932
  na(Ee, {
2932
2933
  svg: ye,
2933
2934
  clipId: Oe,
@@ -2936,9 +2937,9 @@ function Pc(t, a, e = {}, r = !1) {
2936
2937
  to: He,
2937
2938
  active: r && o.length > 0
2938
2939
  });
2939
- const Ye = za(we);
2940
- if (e.tooltips && Ye.use(xa({ numberFormat: (Je = e.verticalAxis) == null ? void 0 : Je.numberFormat })), e.crosshair && Ye.use(Pa({
2941
- width: B,
2940
+ const Be = za(we);
2941
+ if (e.tooltips && Be.use(xa({ numberFormat: (Je = e.verticalAxis) == null ? void 0 : Je.numberFormat })), e.crosshair && Be.use(Pa({
2942
+ width: Y,
2942
2943
  height: Q,
2943
2944
  direction: e.crosshairDirection,
2944
2945
  style: e.crosshairStyle,
@@ -2948,17 +2949,17 @@ function Pc(t, a, e = {}, r = !1) {
2948
2949
  label: F,
2949
2950
  value: Math.max(...g.map((me) => me.values[ne] ?? 0))
2950
2951
  }));
2951
- Ye.use(Ua(e.annotations, { scaleX: ve, scaleY: Le, data: U, width: B, height: Q, backgroundColor: $t(t), transition: r, priorAnnotations: l }));
2952
+ Be.use(Ua(e.annotations, { scaleX: ve, scaleY: Le, data: U, width: Y, height: Q, backgroundColor: $t(t), transition: r, priorAnnotations: l }));
2952
2953
  }
2953
- const se = () => Ye.draw(_);
2954
- Ee.state === "committing" ? Ee.register(se) : se(), Ut(t, { chartType: "bar-multi", margin: oe, plotRect: He }), n && (It(we.node()), Yt(t, n));
2954
+ const se = () => Be.draw(_);
2955
+ Ee.state === "committing" ? Ee.register(se) : se(), Ut(t, { chartType: "bar-multi", margin: oe, plotRect: He }), n && (It(we.node()), Bt(t, n));
2955
2956
  const be = /* @__PURE__ */ new Set();
2956
2957
  g.forEach((U) => {
2957
2958
  ba(U.name, O, m) === "direct" && be.add(U.name);
2958
2959
  });
2959
- const T = be.size > 0, A = $t(t), L = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? bt.Auto : bt.Off, w = e.directLabelAnchor ?? "middle", Y = e.valueLabelPosition ?? Ie.Auto;
2960
+ const T = be.size > 0, A = $t(t), L = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? bt.Auto : bt.Off, w = e.directLabelAnchor ?? "middle", B = e.valueLabelPosition ?? Ie.Auto;
2960
2961
  function ce() {
2961
- return Y === Ie.Inside ? Ie.Inside : (Y === Ie.Outside, Ie.Outside);
2962
+ return B === Ie.Inside ? Ie.Inside : (B === Ie.Outside, Ie.Outside);
2962
2963
  }
2963
2964
  function Ae(U) {
2964
2965
  return L === bt.Inside ? Ie.Inside : L === bt.Outside ? Ie.Outside : K ? ce() : Ie.Outside;
@@ -3005,8 +3006,8 @@ function Pc(t, a, e = {}, r = !1) {
3005
3006
  if (j === "top") {
3006
3007
  const me = ae ? 15 : 0;
3007
3008
  ne = -(J.height + 10 + me);
3008
- } else j === "bottom" ? ne = Q + 25 : j === "left" ? F = -(J.width + 10) : j === "right" && (F = B + 10);
3009
- va(q, Ce, U, ne, j, te, B, Q, F, [], { left: oe.left, right: oe.right });
3009
+ } else j === "bottom" ? ne = Q + 25 : j === "left" ? F = -(J.width + 10) : j === "right" && (F = Y + 10);
3010
+ va(q, Ce, U, ne, j, te, Y, Q, F, [], { left: oe.left, right: oe.right });
3010
3011
  }
3011
3012
  }
3012
3013
  const zc = {
@@ -3023,7 +3024,7 @@ function Ma(t) {
3023
3024
  return t && zc[t] || b.curveLinear;
3024
3025
  }
3025
3026
  const vl = "bc-tooltip", Ga = /* @__PURE__ */ new WeakMap();
3026
- function Br(t) {
3027
+ function Yr(t) {
3027
3028
  const a = Ga.get(t);
3028
3029
  a && (Ga.delete(t), a());
3029
3030
  }
@@ -3082,20 +3083,20 @@ function _r(t, a) {
3082
3083
  const Se = b.bisectCenter(p, W), ie = p[Se], q = n.filter((oe) => oe.cx === ie);
3083
3084
  if (q.length === 0)
3084
3085
  return null;
3085
- let B = q[0], Q = Math.abs(q[0].cy - J);
3086
+ let Y = q[0], Q = Math.abs(q[0].cy - J);
3086
3087
  for (let oe = 1; oe < q.length; oe++) {
3087
3088
  const le = Math.abs(q[oe].cy - J);
3088
- le < Q && (B = q[oe], Q = le);
3089
+ le < Q && (Y = q[oe], Q = le);
3089
3090
  }
3090
- return B;
3091
+ return Y;
3091
3092
  }
3092
3093
  const ee = (W) => {
3093
3094
  const [J, Se] = b.pointer(W, t), ie = re(J, Se);
3094
3095
  ie && (te.attr("cx", ie.cx).attr("cy", ie.cy).attr("stroke", ie.color).style("display", null), m && (m.textContent = h(ie), m.style.display = "block", Rn(te.node(), m, {
3095
3096
  placement: "top",
3096
- middleware: [Yn(8), Bn(), _n()]
3097
- }).then(({ x: q, y: B }) => {
3098
- m && (m.style.left = `${q}px`, m.style.top = `${B}px`);
3097
+ middleware: [Bn(8), Yn(), _n()]
3098
+ }).then(({ x: q, y: Y }) => {
3099
+ m && (m.style.left = `${q}px`, m.style.top = `${Y}px`);
3099
3100
  })), R && R.attr("x1", ie.cx).attr("x2", ie.cx).style("display", null), j && j.attr("y1", ie.cy).attr("y2", ie.cy).style("display", null));
3100
3101
  }, H = () => {
3101
3102
  te.style("display", "none"), m && (m.style.display = "none"), R && R.style("display", "none"), j && j.style("display", "none");
@@ -3150,28 +3151,28 @@ function ks(t, a, e, r, n = !1) {
3150
3151
  }
3151
3152
  }
3152
3153
  const Rc = "#4e79a7";
3153
- function Yc(t, a, e = {}, r = !1) {
3154
- var Oe, we, Ee, _e, Re, Fe, He, Ye, se, be, T, A, L;
3155
- qt(r), Br(t);
3154
+ function Bc(t, a, e = {}, r = !1) {
3155
+ var Oe, we, Ee, _e, Re, Fe, He, Be, se, be, T, A, L;
3156
+ qt(r), Yr(t);
3156
3157
  let n = [], l = [], f = null, o = null, c, u, h;
3157
- const v = Bt.for(t);
3158
+ const v = Yt.for(t);
3158
3159
  if (r) {
3159
3160
  const w = Xt(t);
3160
3161
  u = w == null ? void 0 : w.margin, h = w == null ? void 0 : w.plotRect, v.detach(), (w == null ? void 0 : w.chartType) === "line" ? (n = Array.from(t.querySelectorAll(".bc-frame .bc-area")), l = Array.from(t.querySelectorAll(".bc-frame .bc-line")), f = t.querySelector(".bc-frame .bc-symbols")) : w && (o = Rt(t)), c = /* @__PURE__ */ new Map();
3161
- for (const Y of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
3162
- for (const [ce, Ae] of Tt(Y))
3162
+ for (const B of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
3163
+ for (const [ce, Ae] of Tt(B))
3163
3164
  c.set(ce, Ae);
3164
3165
  t.replaceChildren();
3165
3166
  }
3166
- const { body: g } = Vt(t, e.frame), p = Ot(g).width, k = $a(a.values, (Oe = e.verticalAxis) == null ? void 0 : Oe.range, (we = e.verticalAxis) == null ? void 0 : we.numberFormat, (Ee = e.verticalAxis) == null ? void 0 : Ee.scaleType), m = ra(p, (_e = e.verticalAxis) == null ? void 0 : _e.labelPosition, (Re = e.horizontalAxis) == null ? void 0 : Re.labelPosition, (Fe = e.verticalAxis) == null ? void 0 : Fe.direction, k), { chartArea: x, width: O, height: C, margin: M } = Wt(g, m), D = aa(u, M), R = Rr(a.labels, (He = e.horizontalAxis) == null ? void 0 : He.range), j = R.map((w) => a.labels[w]), te = R.map((w) => a.values[w]), V = j.map((w, Y) => ({
3167
+ const { body: g } = Vt(t, e.frame), p = Ot(g).width, k = $a(a.values, (Oe = e.verticalAxis) == null ? void 0 : Oe.range, (we = e.verticalAxis) == null ? void 0 : we.numberFormat, (Ee = e.verticalAxis) == null ? void 0 : Ee.scaleType), m = ra(p, (_e = e.verticalAxis) == null ? void 0 : _e.labelPosition, (Re = e.horizontalAxis) == null ? void 0 : Re.labelPosition, (Fe = e.verticalAxis) == null ? void 0 : Fe.direction, k), { chartArea: x, width: O, height: C, margin: M } = Wt(g, m), D = aa(u, M), R = Rr(a.labels, (He = e.horizontalAxis) == null ? void 0 : He.range), j = R.map((w) => a.labels[w]), te = R.map((w) => a.values[w]), V = j.map((w, B) => ({
3167
3168
  label: w,
3168
- value: te[Y]
3169
- })), re = b.scalePoint().domain(j).range([0, O]).padding(e.edgePadding ? 0.6 : 0), ee = re, H = (w) => re(w.label) ?? 0, Z = ((Ye = e.verticalAxis) == null ? void 0 : Ye.scaleType) === "log", [ae, W] = Xa(te, (se = e.verticalAxis) == null ? void 0 : se.range, (be = e.verticalAxis) == null ? void 0 : be.scaleType), J = Z ? b.scaleSymlog().domain([ae, W]).nice().range([C, 0]) : b.scaleLinear().domain([ae, W]).nice().range([C, 0]), Se = J.domain(), ie = Se[0] < 0 && Se[1] > 0 ? J(0) : void 0;
3169
+ value: te[B]
3170
+ })), re = b.scalePoint().domain(j).range([0, O]).padding(e.edgePadding ? 0.6 : 0), ee = re, H = (w) => re(w.label) ?? 0, Z = ((Be = e.verticalAxis) == null ? void 0 : Be.scaleType) === "log", [ae, W] = Xa(te, (se = e.verticalAxis) == null ? void 0 : se.range, (be = e.verticalAxis) == null ? void 0 : be.scaleType), J = Z ? b.scaleSymlog().domain([ae, W]).nice().range([C, 0]) : b.scaleLinear().domain([ae, W]).nice().range([C, 0]), Se = J.domain(), ie = Se[0] < 0 && Se[1] > 0 ? J(0) : void 0;
3170
3171
  v.attach(x, D), v.update({
3171
3172
  vertical: { scale: J, height: C, options: { ...e.verticalAxis, gridWidth: O, topPadding: M.top } },
3172
3173
  horizontal: { scale: ee, height: C, options: { ...e.horizontalAxis, width: O, zeroY: ie } }
3173
3174
  });
3174
- const q = x.ownerSVGElement, B = sa(q, t, "plot", { x: -1, y: -1, width: O + 2, height: C + 2 }), Q = b.select(x).append("g").attr("clip-path", `url(#${B})`), oe = Q.node(), le = ((T = e.colors) == null ? void 0 : T[0]) ?? Rc, he = Ma(e.interpolation), ke = e.areaFill ?? !1, ze = e.areaFillOpacity ?? 0.2, ve = b.area().curve(he).x((w) => H(w)).y0(C).y1((w) => J(w.value)), xe = b.line().curve(he).x((w) => H(w)).y((w) => J(w.value)), Me = b.select(oe).append("g").node(), Le = b.select(oe).append("g").node();
3175
+ const q = x.ownerSVGElement, Y = sa(q, t, "plot", { x: -1, y: -1, width: O + 2, height: C + 2 }), Q = b.select(x).append("g").attr("clip-path", `url(#${Y})`), oe = Q.node(), le = ((T = e.colors) == null ? void 0 : T[0]) ?? Rc, he = Ma(e.interpolation), ke = e.areaFill ?? !1, ze = e.areaFillOpacity ?? 0.2, ve = b.area().curve(he).x((w) => H(w)).y0(C).y1((w) => J(w.value)), xe = b.line().curve(he).x((w) => H(w)).y((w) => J(w.value)), Me = b.select(oe).append("g").node(), Le = b.select(oe).append("g").node();
3175
3176
  if (r) {
3176
3177
  for (const w of n)
3177
3178
  Me.appendChild(w);
@@ -3207,17 +3208,17 @@ function Yc(t, a, e = {}, r = !1) {
3207
3208
  const ye = { left: M.left, top: M.top, width: O + 2, height: C + 2 };
3208
3209
  if (na(pe, {
3209
3210
  svg: q,
3210
- clipId: B,
3211
+ clipId: Y,
3211
3212
  group: x,
3212
3213
  from: h,
3213
3214
  to: ye,
3214
3215
  active: r && (n.length > 0 || l.length > 0)
3215
- }), (A = e.annotations) != null && A.length && Yr(x, e.annotations, { scaleX: ee, scaleY: J, data: V, width: O, height: C, backgroundColor: $t(t), transition: r, priorAnnotations: c }), e.tooltips || e.crosshair) {
3216
- const w = V.map((Y) => ({
3217
- cx: H(Y),
3218
- cy: J(Y.value),
3219
- label: Y.label,
3220
- value: Y.value,
3216
+ }), (A = e.annotations) != null && A.length && Br(x, e.annotations, { scaleX: ee, scaleY: J, data: V, width: O, height: C, backgroundColor: $t(t), transition: r, priorAnnotations: c }), e.tooltips || e.crosshair) {
3217
+ const w = V.map((B) => ({
3218
+ cx: H(B),
3219
+ cy: J(B.value),
3220
+ label: B.label,
3221
+ value: B.value,
3221
3222
  color: le
3222
3223
  }));
3223
3224
  _r(x, {
@@ -3233,17 +3234,17 @@ function Yc(t, a, e = {}, r = !1) {
3233
3234
  container: t
3234
3235
  });
3235
3236
  }
3236
- if (e.valueLabels && b.select(oe).append("g").selectAll(".bc-value-label").data(V, (Y) => Y.label).enter().append("text").attr("class", "bc-value-label").attr("x", (Y) => H(Y)).attr("y", (Y) => J(Y.value) - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text((Y) => String(Y.value)), e.lineSymbols) {
3237
+ if (e.valueLabels && b.select(oe).append("g").selectAll(".bc-value-label").data(V, (B) => B.label).enter().append("text").attr("class", "bc-value-label").attr("x", (B) => H(B)).attr("y", (B) => J(B.value) - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text((B) => String(B.value)), e.lineSymbols) {
3237
3238
  const w = V.map((ce, Ae) => ({
3238
3239
  cx: H(ce),
3239
3240
  cy: J(ce.value),
3240
3241
  color: le,
3241
3242
  index: Ae
3242
3243
  }));
3243
- let Y;
3244
- f ? (x.appendChild(f), Y = b.select(f)) : Y = b.select(x).append("g").attr("class", "bc-symbols"), ks(Y, w, V.length, e.lineSymbols, r);
3244
+ let B;
3245
+ f ? (x.appendChild(f), B = b.select(f)) : B = b.select(x).append("g").attr("class", "bc-symbols"), ks(B, w, V.length, e.lineSymbols, r);
3245
3246
  }
3246
- Ut(t, { chartType: "line", margin: M, plotRect: ye }), o && (It(Q.node()), Yt(t, o));
3247
+ Ut(t, { chartType: "line", margin: M, plotRect: ye }), o && (It(Q.node()), Bt(t, o));
3247
3248
  }
3248
3249
  const Ms = 28, xl = 18, Al = 20;
3249
3250
  function Cs(t, a, e, r = Ms) {
@@ -3304,7 +3305,7 @@ function Ll(t, a, e) {
3304
3305
  }
3305
3306
  }
3306
3307
  }
3307
- function Bc(t, a, e) {
3308
+ function Yc(t, a, e) {
3308
3309
  const { outerRadius: r, innerRadius: n = 0, fontSize: l = 12, bgColor: f } = e, o = (n + r) / 2, c = [], u = [];
3309
3310
  for (const h of a) {
3310
3311
  const v = h.endAngle - h.startAngle, g = v * o, p = h.label.length * 7;
@@ -3330,28 +3331,28 @@ const Hc = [
3330
3331
  ];
3331
3332
  function Gc(t, a, e = {}, r = !1) {
3332
3333
  var zt, U, F, ne, me, fe, Ve, yt, Dt, ft, dt, ia, oa, Ja, Qa;
3333
- qt(r), Br(t);
3334
+ qt(r), Yr(t);
3334
3335
  let n = a, l = [], f = [], o = [], c = null, u, h, v;
3335
- const g = Bt.for(t);
3336
+ const g = Yt.for(t);
3336
3337
  if (r) {
3337
3338
  const I = Xt(t);
3338
3339
  h = I == null ? void 0 : I.margin, v = I == null ? void 0 : I.plotRect, g.detach(), (I == null ? void 0 : I.chartType) === "line-multi" ? (l = Array.from(t.querySelectorAll(".bc-frame .bc-area")), f = Array.from(t.querySelectorAll(".bc-frame .bc-line")), o = Array.from(t.querySelectorAll(".bc-frame .bc-symbols"))) : I && (c = Rt(t)), u = /* @__PURE__ */ new Map();
3339
- for (const Be of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
3340
- for (const [je, qe] of Tt(Be))
3340
+ for (const Ye of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
3341
+ for (const [je, qe] of Tt(Ye))
3341
3342
  u.set(je, qe);
3342
3343
  t.replaceChildren();
3343
3344
  }
3344
3345
  const { body: p } = Vt(t, e.frame), k = n.series ?? [];
3345
3346
  let m = k.filter((I) => !Ea(I.name, e.seriesOverrides));
3346
- (e.sortMode === "total" || e.sortMode === "within-groups") && (m = [...m].sort((I, Be) => {
3347
+ (e.sortMode === "total" || e.sortMode === "within-groups") && (m = [...m].sort((I, Ye) => {
3347
3348
  const je = I.values.reduce((nt, Mt) => nt + Mt, 0);
3348
- return Be.values.reduce((nt, Mt) => nt + Mt, 0) - je;
3349
+ return Ye.values.reduce((nt, Mt) => nt + Mt, 0) - je;
3349
3350
  }));
3350
3351
  const x = e.colors ?? Hc, O = m.map((I) => I.name), C = la(e.colorizes), M = e.seriesOverrides, D = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", R = D ? "direct" : e.legend !== !1 ? "legend" : "none", j = O.filter((I) => ba(I, R, M) === "direct"), te = e.legend !== !1 && !D, V = Ot(p).width, re = 350, ee = e.legendPosition ?? "top", H = V > 0 && V < re && (ee === "left" || ee === "right") ? "top" : ee, Z = e.legendAnchor ?? "start", ae = Rr(n.labels, (zt = e.horizontalAxis) == null ? void 0 : zt.range), W = ae.map((I) => n.labels[I]);
3351
- m = m.map((I) => ({ ...I, values: ae.map((Be) => I.values[Be]) })), n = { ...n, labels: W, series: m };
3352
- const J = m.flatMap((I) => I.values), Se = $a(J, (U = e.verticalAxis) == null ? void 0 : U.range, (F = e.verticalAxis) == null ? void 0 : F.numberFormat, (ne = e.verticalAxis) == null ? void 0 : ne.scaleType), ie = ra(V, (me = e.verticalAxis) == null ? void 0 : me.labelPosition, (fe = e.horizontalAxis) == null ? void 0 : fe.labelPosition, (Ve = e.verticalAxis) == null ? void 0 : Ve.direction, Se), q = j.length > 0 ? ml(j) : 0, B = ie.top != null, Q = Math.max(0, V - (ie.left ?? 50) - (ie.right ?? 20) - q), oe = te ? Aa(O, H, Q) : { width: 0, height: 0 }, le = te ? oe.height + 15 : 0, he = { ...ie };
3352
+ m = m.map((I) => ({ ...I, values: ae.map((Ye) => I.values[Ye]) })), n = { ...n, labels: W, series: m };
3353
+ const J = m.flatMap((I) => I.values), Se = $a(J, (U = e.verticalAxis) == null ? void 0 : U.range, (F = e.verticalAxis) == null ? void 0 : F.numberFormat, (ne = e.verticalAxis) == null ? void 0 : ne.scaleType), ie = ra(V, (me = e.verticalAxis) == null ? void 0 : me.labelPosition, (fe = e.horizontalAxis) == null ? void 0 : fe.labelPosition, (Ve = e.verticalAxis) == null ? void 0 : Ve.direction, Se), q = j.length > 0 ? ml(j) : 0, Y = ie.top != null, Q = Math.max(0, V - (ie.left ?? 50) - (ie.right ?? 20) - q), oe = te ? Aa(O, H, Q) : { width: 0, height: 0 }, le = te ? oe.height + 15 : 0, he = { ...ie };
3353
3354
  if (te && H === "top") {
3354
- const I = B ? 15 : 0;
3355
+ const I = Y ? 15 : 0;
3355
3356
  he.top = le + I;
3356
3357
  }
3357
3358
  te && H === "bottom" && (he.bottom = (he.bottom ?? 24) + le), te && H === "left" && (he.left = (he.left ?? 50) + oe.width + 10), te && H === "right" && (he.right = (he.right ?? 20) + oe.width + 10), q > 0 && (he.right = (he.right ?? 20) + q);
@@ -3360,16 +3361,16 @@ function Gc(t, a, e = {}, r = !1) {
3360
3361
  vertical: { scale: we, height: ve, options: { ...e.verticalAxis, gridWidth: ze, topPadding: xe.top } },
3361
3362
  horizontal: { scale: K, height: ve, options: { ...e.horizontalAxis, width: ze, zeroY: _e } }
3362
3363
  });
3363
- const Re = ke.ownerSVGElement, Fe = sa(Re, t, "plot", { x: 0, y: 0, width: ze, height: ve }), He = b.select(ke).append("g").attr("clip-path", `url(#${Fe})`), Ye = He.node(), se = m.map((I) => ({
3364
+ const Re = ke.ownerSVGElement, Fe = sa(Re, t, "plot", { x: 0, y: 0, width: ze, height: ve }), He = b.select(ke).append("g").attr("clip-path", `url(#${Fe})`), Be = He.node(), se = m.map((I) => ({
3364
3365
  name: I.name,
3365
3366
  values: I.values,
3366
- colorIndex: k.findIndex((Be) => Be.name === I.name)
3367
+ colorIndex: k.findIndex((Ye) => Ye.name === I.name)
3367
3368
  })), be = Ma(e.interpolation);
3368
- (dt = e.areaFills) != null && dt.length && Vc(Ye, e.areaFills, m, ye, n.labels.length, we, be);
3369
+ (dt = e.areaFills) != null && dt.length && Vc(Be, e.areaFills, m, ye, n.labels.length, we, be);
3369
3370
  const T = [];
3370
- m.forEach((I, Be) => {
3371
+ m.forEach((I, Ye) => {
3371
3372
  n.labels.forEach((je, qe) => {
3372
- T.push({ label: je, value: I.values[qe], series: I.name, colorIndex: Be });
3373
+ T.push({ label: je, value: I.values[qe], series: I.name, colorIndex: Ye });
3373
3374
  });
3374
3375
  });
3375
3376
  const A = e.lineSymbols, L = {
@@ -3377,7 +3378,7 @@ function Gc(t, a, e = {}, r = !1) {
3377
3378
  dotted: "2,4",
3378
3379
  dashed: "8,4",
3379
3380
  "dash-dot": "8,4,2,4"
3380
- }, w = e.valueLabels ?? !1, Y = new Set((e.highlights ?? []).map((I) => I.target)), ce = e.areaFill ?? !1, Ae = e.areaFillOpacity ?? 0.2, G = (I) => C.get(I.name) ?? Qe(I.name, I.colorIndex, x, M), $e = b.area().curve(be).x((I, Be) => ye(Be)).y0(ve).y1((I) => we(I)), Ce = it(t), N = b.select(Ye).append("g").node(), de = b.select(Ye).append("g").node(), Te = new Set(se.map((I) => I.name));
3381
+ }, w = e.valueLabels ?? !1, B = new Set((e.highlights ?? []).map((I) => I.target)), ce = e.areaFill ?? !1, Ae = e.areaFillOpacity ?? 0.2, G = (I) => C.get(I.name) ?? Qe(I.name, I.colorIndex, x, M), $e = b.area().curve(be).x((I, Ye) => ye(Ye)).y0(ve).y1((I) => we(I)), Ce = it(t), N = b.select(Be).append("g").node(), de = b.select(Be).append("g").node(), Te = new Set(se.map((I) => I.name));
3381
3382
  if (r) {
3382
3383
  for (const I of l)
3383
3384
  Te.has(((ia = I.__data__) == null ? void 0 : ia.name) ?? "") && N.appendChild(I);
@@ -3395,7 +3396,7 @@ function Gc(t, a, e = {}, r = !1) {
3395
3396
  "data-series": I.colorIndex,
3396
3397
  d: $e(I.values) ?? "",
3397
3398
  fill: G(I),
3398
- opacity: Pt(Y, I.name, Ae)
3399
+ opacity: Pt(B, I.name, Ae)
3399
3400
  })
3400
3401
  }), st(Ce, {
3401
3402
  role: "series-line",
@@ -3405,7 +3406,7 @@ function Gc(t, a, e = {}, r = !1) {
3405
3406
  key: (I) => I.name,
3406
3407
  insert: (I) => I.append("path").attr("class", "bc-line"),
3407
3408
  attrs: (I) => {
3408
- const Be = yl(I.name, e.interpolation ?? "linear", M), je = b.line().curve(Ma(Be)).x((qe, nt) => ye(nt)).y((qe) => we(qe));
3409
+ const Ye = yl(I.name, e.interpolation ?? "linear", M), je = b.line().curve(Ma(Ye)).x((qe, nt) => ye(nt)).y((qe) => we(qe));
3409
3410
  return {
3410
3411
  "data-series": I.colorIndex,
3411
3412
  d: je(I.values) ?? "",
@@ -3413,10 +3414,10 @@ function Gc(t, a, e = {}, r = !1) {
3413
3414
  stroke: G(I),
3414
3415
  "stroke-width": $c(I.name, M),
3415
3416
  "stroke-dasharray": L[Cc(I.name, M)] ?? "",
3416
- opacity: Pt(Y, I.name, 1)
3417
+ opacity: Pt(B, I.name, 1)
3417
3418
  };
3418
3419
  }
3419
- }), b.select(Ye).append("g").selectAll(".bc-dot").data(T, (I) => I.label + "\0" + I.series).enter().append("circle").attr("class", "bc-dot").attr("data-series", (I) => I.colorIndex).attr("cx", (I) => ye(n.labels.indexOf(I.label))).attr("cy", (I) => we(I.value)).attr("r", 3).attr("fill", (I) => G({ name: I.series, colorIndex: I.colorIndex })).attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none");
3420
+ }), b.select(Be).append("g").selectAll(".bc-dot").data(T, (I) => I.label + "\0" + I.series).enter().append("circle").attr("class", "bc-dot").attr("data-series", (I) => I.colorIndex).attr("cx", (I) => ye(n.labels.indexOf(I.label))).attr("cy", (I) => we(I.value)).attr("r", 3).attr("fill", (I) => G({ name: I.series, colorIndex: I.colorIndex })).attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none");
3420
3421
  const Ge = { left: xe.left, top: xe.top, width: ze, height: ve };
3421
3422
  if (na(Ce, {
3422
3423
  svg: Re,
@@ -3426,29 +3427,29 @@ function Gc(t, a, e = {}, r = !1) {
3426
3427
  to: Ge,
3427
3428
  active: r && (f.length > 0 || l.length > 0)
3428
3429
  }), (Ja = e.annotations) != null && Ja.length) {
3429
- const I = n.labels.map((Be, je) => {
3430
+ const I = n.labels.map((Ye, je) => {
3430
3431
  var qe;
3431
3432
  return {
3432
- label: Be,
3433
+ label: Ye,
3433
3434
  value: ((qe = m[0]) == null ? void 0 : qe.values[je]) ?? 0
3434
3435
  };
3435
3436
  });
3436
- Yr(ke, e.annotations, { scaleX: K, scaleY: we, data: I, width: ze, height: ve, backgroundColor: $t(t), transition: r, priorAnnotations: u });
3437
+ Br(ke, e.annotations, { scaleX: K, scaleY: we, data: I, width: ze, height: ve, backgroundColor: $t(t), transition: r, priorAnnotations: u });
3437
3438
  }
3438
- const Ke = b.select(Ye).append("g").attr("class", "bc-value-labels");
3439
+ const Ke = b.select(Be).append("g").attr("class", "bc-value-labels");
3439
3440
  if (T.forEach((I) => {
3440
3441
  if (!Za(I.series, w, M))
3441
3442
  return;
3442
- const Be = ye(n.labels.indexOf(I.label)), je = we(I.value);
3443
- Ke.append("text").attr("class", "bc-value-label").attr("data-series", I.colorIndex).attr("x", Be).attr("y", je - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text(String(I.value));
3443
+ const Ye = ye(n.labels.indexOf(I.label)), je = we(I.value);
3444
+ Ke.append("text").attr("class", "bc-value-label").attr("data-series", I.colorIndex).attr("x", Ye).attr("y", je - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text(String(I.value));
3444
3445
  }), e.tooltips || e.crosshair) {
3445
- const I = T.map((Be) => ({
3446
- cx: ye(n.labels.indexOf(Be.label)),
3447
- cy: we(Be.value),
3448
- label: Be.label,
3449
- value: Be.value,
3450
- series: Be.series,
3451
- color: Qe(Be.series, Be.colorIndex, x, M)
3446
+ const I = T.map((Ye) => ({
3447
+ cx: ye(n.labels.indexOf(Ye.label)),
3448
+ cy: we(Ye.value),
3449
+ label: Ye.label,
3450
+ value: Ye.value,
3451
+ series: Ye.series,
3452
+ color: Qe(Ye.series, Ye.colorIndex, x, M)
3452
3453
  }));
3453
3454
  _r(ke, {
3454
3455
  width: ze,
@@ -3470,7 +3471,7 @@ function Gc(t, a, e = {}, r = !1) {
3470
3471
  symbolSize: A.size,
3471
3472
  symbolOpacity: A.opacity
3472
3473
  } : void 0, kt = n.labels.length;
3473
- m.forEach((I, Be) => {
3474
+ m.forEach((I, Ye) => {
3474
3475
  const je = Oc(I.name, ot, M);
3475
3476
  if (!je)
3476
3477
  return;
@@ -3483,19 +3484,19 @@ function Gc(t, a, e = {}, r = !1) {
3483
3484
  }, nt = n.labels.map((yr, er) => ({
3484
3485
  cx: ye(er),
3485
3486
  cy: we(I.values[er]),
3486
- color: Qe(I.name, Be, x, M),
3487
+ color: Qe(I.name, Ye, x, M),
3487
3488
  index: er
3488
3489
  })), Mt = o.find((yr) => yr.getAttribute("data-series-name") === I.name);
3489
3490
  let Sa, mr = !1;
3490
- Mt ? (ke.appendChild(Mt), Sa = b.select(Mt), mr = !0) : Sa = b.select(ke).append("g").attr("class", "bc-symbols").attr("data-series", Be).attr("data-series-name", I.name), ks(Sa, nt, kt, qe, r && mr);
3491
+ Mt ? (ke.appendChild(Mt), Sa = b.select(Mt), mr = !0) : Sa = b.select(ke).append("g").attr("class", "bc-symbols").attr("data-series", Ye).attr("data-series-name", I.name), ks(Sa, nt, kt, qe, r && mr);
3491
3492
  });
3492
3493
  const ct = n.labels.length - 1, _t = ye(ct) + 6, et = [];
3493
- if (m.forEach((I, Be) => {
3494
+ if (m.forEach((I, Ye) => {
3494
3495
  var Mt;
3495
3496
  if (ba(I.name, R, M) !== "direct")
3496
3497
  return;
3497
3498
  const qe = I.values[ct], nt = ((Mt = M == null ? void 0 : M.find((Sa) => Sa.name === I.name)) == null ? void 0 : Mt.labelText) || I.name;
3498
- et.push({ name: I.name, index: Be, naturalY: we(qe), text: nt });
3499
+ et.push({ name: I.name, index: Ye, naturalY: we(qe), text: nt });
3499
3500
  }), et.length > 0) {
3500
3501
  et.sort((qe, nt) => qe.naturalY - nt.naturalY);
3501
3502
  const I = et.map((qe) => qe.naturalY), je = Cs(I, 0, ve, 14);
@@ -3509,14 +3510,14 @@ function Gc(t, a, e = {}, r = !1) {
3509
3510
  const nt = k.findIndex((Mt) => Mt.name === qe);
3510
3511
  return Qe(qe, nt, x, M);
3511
3512
  });
3512
- let Be = 0, je = 0;
3513
+ let Ye = 0, je = 0;
3513
3514
  if (H === "top") {
3514
- const qe = B ? 15 : 0;
3515
+ const qe = Y ? 15 : 0;
3515
3516
  je = -(oe.height + 10 + qe);
3516
- } else H === "bottom" ? je = ve + 25 : H === "left" ? Be = -(oe.width + 10) : H === "right" && (Be = ze + 10);
3517
- va(ke, Je, I, je, H, Z, ze, ve, Be, [], { left: xe.left, right: xe.right });
3517
+ } else H === "bottom" ? je = ve + 25 : H === "left" ? Ye = -(oe.width + 10) : H === "right" && (Ye = ze + 10);
3518
+ va(ke, Je, I, je, H, Z, ze, ve, Ye, [], { left: xe.left, right: xe.right });
3518
3519
  }
3519
- Ut(t, { chartType: "line-multi", margin: xe, plotRect: Ge }), c && (It(He.node()), Yt(t, c));
3520
+ Ut(t, { chartType: "line-multi", margin: xe, plotRect: Ge }), c && (It(He.node()), Bt(t, c));
3520
3521
  }
3521
3522
  function Vc(t, a, e, r, n, l, f) {
3522
3523
  const o = b.select(t).append("g").attr("class", "bc-area-fills");
@@ -3619,10 +3620,10 @@ function kl(t, a, e, r, n = !1) {
3619
3620
  const _ = Ot(o), K = 20, ye = _.width - 2 * K, Oe = (_.height > 0 ? _.height : 400) - 2 * K, we = Math.min(ye, Oe) / 2, Ee = _c(c, we);
3620
3621
  Z.left = (Z.left ?? K) + Ee.left, Z.right = (Z.right ?? K) + Ee.right, Z.top = (Z.top ?? K) + Ee.top, Z.bottom = (Z.bottom ?? K) + Ee.bottom;
3621
3622
  }
3622
- const { chartArea: ae, width: W, height: J, margin: Se } = Wt(o, Z), ie = Math.min(W, J) / 2, q = ie * r, B = b.scaleOrdinal().domain(c).range(p), Q = b.pie().sort(null), oe = b.arc().innerRadius(q).outerRadius(ie), le = b.select(ae).append("g").attr("transform", `translate(${W / 2},${J / 2})`), he = la(e.colorizes), ke = Q(u), ze = ke.map((_, K) => ({
3623
+ const { chartArea: ae, width: W, height: J, margin: Se } = Wt(o, Z), ie = Math.min(W, J) / 2, q = ie * r, Y = b.scaleOrdinal().domain(c).range(p), Q = b.pie().sort(null), oe = b.arc().innerRadius(q).outerRadius(ie), le = b.select(ae).append("g").attr("transform", `translate(${W / 2},${J / 2})`), he = la(e.colorizes), ke = Q(u), ze = ke.map((_, K) => ({
3623
3624
  label: c[K],
3624
3625
  arc: _,
3625
- color: he.get(c[K]) ?? B(c[K])
3626
+ color: he.get(c[K]) ?? Y(c[K])
3626
3627
  })), ve = it(t), xe = ja(e.highlights), Me = le.append("g").node();
3627
3628
  st(ve, {
3628
3629
  role: "mark-per-category",
@@ -3656,13 +3657,13 @@ function kl(t, a, e, r, n = !1) {
3656
3657
  value: we.data,
3657
3658
  startAngle: we.startAngle,
3658
3659
  endAngle: we.endAngle,
3659
- color: B(c[Ee]),
3660
+ color: Y(c[Ee]),
3660
3661
  percentage: v[Ee],
3661
3662
  displayAsPercentage: e.displayAsPercentage,
3662
3663
  showLabel: e.showLabels ?? !0,
3663
3664
  showValue: e.showValues ?? !0
3664
3665
  })), K = le, ye = $t(t), Oe = { outerRadius: ie, innerRadius: q, bgColor: ye };
3665
- k === bt.Inside ? Ll(K, _, Oe) : k === bt.Auto ? Bc(K, _, Oe) : wl(K, _, Oe);
3666
+ k === bt.Inside ? Ll(K, _, Oe) : k === bt.Auto ? Yc(K, _, Oe) : wl(K, _, Oe);
3666
3667
  }
3667
3668
  if (e.showTotal && r > 0 && !e.displayAsPercentage) {
3668
3669
  const _ = String(h);
@@ -3672,34 +3673,34 @@ function kl(t, a, e, r, n = !1) {
3672
3673
  let _ = 0, K = 0;
3673
3674
  j === "top" ? K = -(ee.height + 10) : j === "bottom" ? K = J + 25 : j === "left" ? _ = -(ee.width + 10) : j === "right" && (_ = W + 10), va(ae, c, p, K, j, te, W, J, _, O, { left: Se.left, right: Se.right });
3674
3675
  }
3675
- Ut(t, { chartType: r > 0 ? "donut" : "pie" }), l && (It(le.node()), Yt(t, l));
3676
+ Ut(t, { chartType: r > 0 ? "donut" : "pie" }), l && (It(le.node()), Bt(t, l));
3676
3677
  }
3677
3678
  function Zc(t, a, e = {}, r = !1) {
3678
3679
  kl(t, a, e, 0, r);
3679
3680
  }
3680
3681
  const Kc = "#4e79a7";
3681
3682
  function Jc(t, a, e = {}, r = !1) {
3682
- var ye, Oe, we, Ee, _e, Re, Fe, He, Ye, se, be, T, A;
3683
- qt(r), Br(t);
3683
+ var ye, Oe, we, Ee, _e, Re, Fe, He, Be, se, be, T, A;
3684
+ qt(r), Yr(t);
3684
3685
  let n = [], l = [], f = null, o = null, c, u, h;
3685
- const v = Bt.for(t);
3686
+ const v = Yt.for(t);
3686
3687
  if (r) {
3687
3688
  const L = Xt(t);
3688
3689
  u = L == null ? void 0 : L.margin, h = L == null ? void 0 : L.plotRect, v.detach(), (L == null ? void 0 : L.chartType) === "area" ? (n = Array.from(t.querySelectorAll(".bc-frame .bc-area")), l = Array.from(t.querySelectorAll(".bc-frame .bc-line")), f = t.querySelector(".bc-frame .bc-symbols")) : L && (o = Rt(t)), c = /* @__PURE__ */ new Map();
3689
3690
  for (const w of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
3690
- for (const [Y, ce] of Tt(w))
3691
- c.set(Y, ce);
3691
+ for (const [B, ce] of Tt(w))
3692
+ c.set(B, ce);
3692
3693
  t.replaceChildren();
3693
3694
  }
3694
3695
  const { body: g } = Vt(t, e.frame), p = Ot(g).width, k = $a(a.values, (ye = e.verticalAxis) == null ? void 0 : ye.range, (Oe = e.verticalAxis) == null ? void 0 : Oe.numberFormat, (we = e.verticalAxis) == null ? void 0 : we.scaleType), m = ra(p, (Ee = e.verticalAxis) == null ? void 0 : Ee.labelPosition, (_e = e.horizontalAxis) == null ? void 0 : _e.labelPosition, (Re = e.verticalAxis) == null ? void 0 : Re.direction, k), { chartArea: x, width: O, height: C, margin: M } = Wt(g, m), D = aa(u, M), R = Rr(a.labels, (Fe = e.horizontalAxis) == null ? void 0 : Fe.range), j = R.map((L) => a.labels[L]), te = R.map((L) => a.values[L]), V = j.map((L, w) => ({
3695
3696
  label: L,
3696
3697
  value: te[w]
3697
- })), re = b.scalePoint().domain(j).range([0, O]).padding(e.edgePadding ? 0.6 : 0), ee = re, H = (L) => re(L.label) ?? 0, Z = ((He = e.verticalAxis) == null ? void 0 : He.scaleType) === "log", [ae, W] = Xa(te, (Ye = e.verticalAxis) == null ? void 0 : Ye.range, (se = e.verticalAxis) == null ? void 0 : se.scaleType), J = Z ? b.scaleSymlog().domain([ae, W]).nice().range([C, 0]) : b.scaleLinear().domain([ae, W]).nice().range([C, 0]), Se = J.domain(), ie = Se[0] < 0 && Se[1] > 0 ? J(0) : void 0;
3698
+ })), re = b.scalePoint().domain(j).range([0, O]).padding(e.edgePadding ? 0.6 : 0), ee = re, H = (L) => re(L.label) ?? 0, Z = ((He = e.verticalAxis) == null ? void 0 : He.scaleType) === "log", [ae, W] = Xa(te, (Be = e.verticalAxis) == null ? void 0 : Be.range, (se = e.verticalAxis) == null ? void 0 : se.scaleType), J = Z ? b.scaleSymlog().domain([ae, W]).nice().range([C, 0]) : b.scaleLinear().domain([ae, W]).nice().range([C, 0]), Se = J.domain(), ie = Se[0] < 0 && Se[1] > 0 ? J(0) : void 0;
3698
3699
  v.attach(x, D), v.update({
3699
3700
  vertical: { scale: J, height: C, options: { ...e.verticalAxis, gridWidth: O, topPadding: M.top } },
3700
3701
  horizontal: { scale: ee, height: C, options: { ...e.horizontalAxis, width: O, zeroY: ie } }
3701
3702
  });
3702
- const q = x.ownerSVGElement, B = sa(q, t, "plot", { x: 0, y: 0, width: O, height: C }), Q = b.select(x).append("g").attr("clip-path", `url(#${B})`), oe = Q.node(), le = ((be = e.colors) == null ? void 0 : be[0]) ?? Kc, he = Ma(e.interpolation ?? "monotoneX"), ke = e.areaFillOpacity ?? 0.25, ze = b.area().curve(he).x((L) => H(L)).y0(C).y1((L) => J(L.value)), ve = b.line().curve(he).x((L) => H(L)).y((L) => J(L.value)), xe = b.select(oe).append("g").node(), Me = b.select(oe).append("g").node();
3703
+ const q = x.ownerSVGElement, Y = sa(q, t, "plot", { x: 0, y: 0, width: O, height: C }), Q = b.select(x).append("g").attr("clip-path", `url(#${Y})`), oe = Q.node(), le = ((be = e.colors) == null ? void 0 : be[0]) ?? Kc, he = Ma(e.interpolation ?? "monotoneX"), ke = e.areaFillOpacity ?? 0.25, ze = b.area().curve(he).x((L) => H(L)).y0(C).y1((L) => J(L.value)), ve = b.line().curve(he).x((L) => H(L)).y((L) => J(L.value)), xe = b.select(oe).append("g").node(), Me = b.select(oe).append("g").node();
3703
3704
  if (r) {
3704
3705
  for (const L of n)
3705
3706
  xe.appendChild(L);
@@ -3736,12 +3737,12 @@ function Jc(t, a, e = {}, r = !1) {
3736
3737
  const K = { left: M.left, top: M.top, width: O, height: C };
3737
3738
  if (na(Le, {
3738
3739
  svg: q,
3739
- clipId: B,
3740
+ clipId: Y,
3740
3741
  group: x,
3741
3742
  from: h,
3742
3743
  to: K,
3743
3744
  active: r && (n.length > 0 || l.length > 0)
3744
- }), (T = e.annotations) != null && T.length && Yr(x, e.annotations, { scaleX: ee, scaleY: J, data: V, width: O, height: C, backgroundColor: $t(t), transition: r, priorAnnotations: c }), e.tooltips || e.crosshair) {
3745
+ }), (T = e.annotations) != null && T.length && Br(x, e.annotations, { scaleX: ee, scaleY: J, data: V, width: O, height: C, backgroundColor: $t(t), transition: r, priorAnnotations: c }), e.tooltips || e.crosshair) {
3745
3746
  const L = V.map((w) => ({
3746
3747
  cx: H(w),
3747
3748
  cy: J(w.value),
@@ -3763,16 +3764,16 @@ function Jc(t, a, e = {}, r = !1) {
3763
3764
  });
3764
3765
  }
3765
3766
  if (e.valueLabels && b.select(oe).append("g").selectAll(".bc-value-label").data(V, (w) => w.label).enter().append("text").attr("class", "bc-value-label").attr("x", (w) => H(w)).attr("y", (w) => J(w.value) - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text((w) => String(w.value)), e.lineSymbols) {
3766
- const L = V.map((Y, ce) => ({
3767
- cx: H(Y),
3768
- cy: J(Y.value),
3767
+ const L = V.map((B, ce) => ({
3768
+ cx: H(B),
3769
+ cy: J(B.value),
3769
3770
  color: le,
3770
3771
  index: ce
3771
3772
  }));
3772
3773
  let w;
3773
3774
  f ? (x.appendChild(f), w = b.select(f)) : w = b.select(x).append("g").attr("class", "bc-symbols"), ks(w, L, V.length, e.lineSymbols, r);
3774
3775
  }
3775
- Ut(t, { chartType: "area", margin: M, plotRect: K }), o && (It(Q.node()), Yt(t, o));
3776
+ Ut(t, { chartType: "area", margin: M, plotRect: K }), o && (It(Q.node()), Bt(t, o));
3776
3777
  }
3777
3778
  function $s(t) {
3778
3779
  const a = t.series ?? [];
@@ -3816,9 +3817,9 @@ const Qc = [
3816
3817
  ];
3817
3818
  function ef(t, a, e = {}, r = !1) {
3818
3819
  var Ke, ot, kt, ct, _t, et, Je, zt, U;
3819
- qt(r), Br(t);
3820
+ qt(r), Yr(t);
3820
3821
  let n = a, l = [], f = [], o = null, c, u, h;
3821
- const v = Bt.for(t);
3822
+ const v = Yt.for(t);
3822
3823
  if (r) {
3823
3824
  const F = Xt(t);
3824
3825
  u = F == null ? void 0 : F.margin, h = F == null ? void 0 : F.plotRect, v.detach(), (F == null ? void 0 : F.chartType) === "area-stacked" ? (l = Array.from(t.querySelectorAll(".bc-frame .bc-area")), f = Array.from(t.querySelectorAll(".bc-frame .bc-line"))) : F && (o = Rt(t)), c = /* @__PURE__ */ new Map();
@@ -3840,10 +3841,10 @@ function ef(t, a, e = {}, r = !1) {
3840
3841
  return J === lt.Ascending ? fe : -fe;
3841
3842
  });
3842
3843
  }
3843
- const q = { labels: n.labels, values: n.values, series: ie }, B = W ? Os(q) : $s(q);
3844
+ const q = { labels: n.labels, values: n.values, series: ie }, Y = W ? Os(q) : $s(q);
3844
3845
  let Q = 0;
3845
3846
  if (ae)
3846
- for (const F of B)
3847
+ for (const F of Y)
3847
3848
  for (const ne of F)
3848
3849
  ne[1] > Q && (Q = ne[1]);
3849
3850
  else
@@ -3866,7 +3867,7 @@ function ef(t, a, e = {}, r = !1) {
3866
3867
  },
3867
3868
  horizontal: { scale: _e, height: ye, options: { ...e.horizontalAxis, width: K } }
3868
3869
  });
3869
- const He = _.ownerSVGElement, Ye = sa(He, t, "plot", { x: 0, y: 0, width: K, height: ye }), se = b.select(_).append("g").attr("clip-path", `url(#${Ye})`), be = se.node(), T = Ma(e.interpolation ?? "monotoneX"), A = B.map((F) => {
3870
+ const He = _.ownerSVGElement, Be = sa(He, t, "plot", { x: 0, y: 0, width: K, height: ye }), se = b.select(_).append("g").attr("clip-path", `url(#${Be})`), be = se.node(), T = Ma(e.interpolation ?? "monotoneX"), A = Y.map((F) => {
3870
3871
  const ne = k.findIndex((fe) => fe.name === F.key);
3871
3872
  let me;
3872
3873
  if (ae)
@@ -3880,7 +3881,7 @@ function ef(t, a, e = {}, r = !1) {
3880
3881
  points: me,
3881
3882
  colorIndex: ne >= 0 ? ne : 0
3882
3883
  };
3883
- }), L = new Set((e.highlights ?? []).map((F) => F.target)), w = L.size > 0, Y = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, ce = (F) => M.get(F.name) ?? Qe(F.name, F.colorIndex, x, C), Ae = b.area().curve(T).x((F, ne) => Re(ne)).y0((F) => F[0]).y1((F) => F[1]), G = b.select(be).append("g").node(), $e = b.select(be).append("g").node();
3884
+ }), L = new Set((e.highlights ?? []).map((F) => F.target)), w = L.size > 0, B = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, ce = (F) => M.get(F.name) ?? Qe(F.name, F.colorIndex, x, C), Ae = b.area().curve(T).x((F, ne) => Re(ne)).y0((F) => F[0]).y1((F) => F[1]), G = b.select(be).append("g").node(), $e = b.select(be).append("g").node();
3884
3885
  if (r) {
3885
3886
  for (const F of l)
3886
3887
  G.appendChild(F);
@@ -3899,7 +3900,7 @@ function ef(t, a, e = {}, r = !1) {
3899
3900
  "data-series": F.colorIndex,
3900
3901
  d: Ae(F.points) ?? "",
3901
3902
  fill: ce(F),
3902
- opacity: w ? Pt(L, F.name, Y) : Y
3903
+ opacity: w ? Pt(L, F.name, B) : B
3903
3904
  })
3904
3905
  }), st(Ce, {
3905
3906
  role: "series-line",
@@ -3923,7 +3924,7 @@ function ef(t, a, e = {}, r = !1) {
3923
3924
  const N = { left: Oe.left, top: Oe.top, width: K, height: ye };
3924
3925
  if (na(Ce, {
3925
3926
  svg: He,
3926
- clipId: Ye,
3927
+ clipId: Be,
3927
3928
  group: _,
3928
3929
  from: h,
3929
3930
  to: N,
@@ -3936,11 +3937,11 @@ function ef(t, a, e = {}, r = !1) {
3936
3937
  value: ((fe = m[0]) == null ? void 0 : fe.values[me]) ?? 0
3937
3938
  };
3938
3939
  });
3939
- Yr(_, e.annotations, { scaleX: _e, scaleY: Fe, data: F, width: K, height: ye, backgroundColor: $t(t), transition: r, priorAnnotations: c });
3940
+ Br(_, e.annotations, { scaleX: _e, scaleY: Fe, data: F, width: K, height: ye, backgroundColor: $t(t), transition: r, priorAnnotations: c });
3940
3941
  }
3941
3942
  if (e.tooltips || e.crosshair) {
3942
3943
  const F = [];
3943
- B.forEach((ne) => {
3944
+ Y.forEach((ne) => {
3944
3945
  const me = k.findIndex((fe) => fe.name === ne.key);
3945
3946
  Array.from(ne).forEach((fe, Ve) => {
3946
3947
  const yt = fe[1] - fe[0];
@@ -3971,7 +3972,7 @@ function ef(t, a, e = {}, r = !1) {
3971
3972
  var ft;
3972
3973
  if (ba(F.name, R, C) !== "direct")
3973
3974
  return;
3974
- const fe = B.find((dt) => dt.key === F.name);
3975
+ const fe = Y.find((dt) => dt.key === F.name);
3975
3976
  if (!fe)
3976
3977
  return;
3977
3978
  const Ve = fe[de], yt = Fe((Ve[0] + Ve[1]) / 2), Dt = ((ft = C == null ? void 0 : C.find((dt) => dt.name === F.name)) == null ? void 0 : ft.labelText) || F.name;
@@ -3996,7 +3997,7 @@ function ef(t, a, e = {}, r = !1) {
3996
3997
  } else H === "bottom" ? me = ye + 25 : H === "left" ? ne = -(Me.width + 10) : H === "right" && (ne = K + 10);
3997
3998
  va(_, Ge, F, me, H, Z, K, ye, ne, [], { left: Oe.left, right: Oe.right });
3998
3999
  }
3999
- Ut(t, { chartType: "area-stacked", margin: Oe, plotRect: N }), o && (It(se.node()), Yt(t, o));
4000
+ Ut(t, { chartType: "area-stacked", margin: Oe, plotRect: N }), o && (It(se.node()), Bt(t, o));
4000
4001
  }
4001
4002
  const tf = [
4002
4003
  "#4e79a7",
@@ -4027,10 +4028,10 @@ function af(t, a, e) {
4027
4028
  return r;
4028
4029
  }
4029
4030
  function rf(t, a, e = {}, r = !1) {
4030
- var be, T, A, L, w, Y, ce, Ae;
4031
+ var be, T, A, L, w, B, ce, Ae;
4031
4032
  qt(r);
4032
4033
  let n = [], l = null, f, o, c;
4033
- const u = Bt.for(t);
4034
+ const u = Yt.for(t);
4034
4035
  if (r) {
4035
4036
  const G = Xt(t);
4036
4037
  o = G == null ? void 0 : G.margin, c = G == null ? void 0 : G.plotRect, u.detach(), (G == null ? void 0 : G.chartType) === "column-stacked" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-stacked")) : G && (l = Rt(t)), f = /* @__PURE__ */ new Map();
@@ -4039,14 +4040,14 @@ function rf(t, a, e = {}, r = !1) {
4039
4040
  f.set(Ce, N);
4040
4041
  t.replaceChildren();
4041
4042
  }
4042
- const { body: h } = Vt(t, e.frame), v = a.series ?? [], g = v.filter((G) => !Ea(G.name, e.seriesOverrides)), p = g.map((G) => G.name), k = e.colors ?? tf, m = e.seriesOverrides, x = e.legend !== !1, O = Ot(h).width, C = 350, M = e.legendPosition ?? "top", D = O > 0 && O < C && (M === "left" || M === "right") ? "top" : M, R = e.legendAnchor ?? "start", j = { labels: a.labels, values: a.values, series: g }, te = e.stackMode === La.Percent, V = te ? Os(j) : $s(j), re = af(V, a.labels, v), ee = te ? 100 : b.max(re, (G) => G.y1) ?? 0, Z = $a([0, ee], (be = e.verticalAxis) == null ? void 0 : be.range, (T = e.verticalAxis) == null ? void 0 : T.numberFormat, (A = e.verticalAxis) == null ? void 0 : A.scaleType), ae = ra(O, (L = e.verticalAxis) == null ? void 0 : L.labelPosition, (w = e.horizontalAxis) == null ? void 0 : w.labelPosition, (Y = e.verticalAxis) == null ? void 0 : Y.direction, Z), W = Math.max(0, O - (ae.left ?? 50) - (ae.right ?? 20)), J = vs(a.labels, W, e.horizontalAxis);
4043
+ const { body: h } = Vt(t, e.frame), v = a.series ?? [], g = v.filter((G) => !Ea(G.name, e.seriesOverrides)), p = g.map((G) => G.name), k = e.colors ?? tf, m = e.seriesOverrides, x = e.legend !== !1, O = Ot(h).width, C = 350, M = e.legendPosition ?? "top", D = O > 0 && O < C && (M === "left" || M === "right") ? "top" : M, R = e.legendAnchor ?? "start", j = { labels: a.labels, values: a.values, series: g }, te = e.stackMode === La.Percent, V = te ? Os(j) : $s(j), re = af(V, a.labels, v), ee = te ? 100 : b.max(re, (G) => G.y1) ?? 0, Z = $a([0, ee], (be = e.verticalAxis) == null ? void 0 : be.range, (T = e.verticalAxis) == null ? void 0 : T.numberFormat, (A = e.verticalAxis) == null ? void 0 : A.scaleType), ae = ra(O, (L = e.verticalAxis) == null ? void 0 : L.labelPosition, (w = e.horizontalAxis) == null ? void 0 : w.labelPosition, (B = e.verticalAxis) == null ? void 0 : B.direction, Z), W = Math.max(0, O - (ae.left ?? 50) - (ae.right ?? 20)), J = vs(a.labels, W, e.horizontalAxis);
4043
4044
  J !== void 0 && (ae.bottom = J);
4044
- const Se = ae.top != null, ie = Math.max(0, O - (ae.left ?? 50) - (ae.right ?? 20)), q = x ? Aa(p, D, ie) : { width: 0, height: 0 }, B = x ? q.height + 15 : 0, Q = { ...ae };
4045
+ const Se = ae.top != null, ie = Math.max(0, O - (ae.left ?? 50) - (ae.right ?? 20)), q = x ? Aa(p, D, ie) : { width: 0, height: 0 }, Y = x ? q.height + 15 : 0, Q = { ...ae };
4045
4046
  if (x && D === "top") {
4046
4047
  const G = Se ? 15 : 0;
4047
- Q.top = B + G;
4048
+ Q.top = Y + G;
4048
4049
  }
4049
- x && D === "bottom" && (Q.bottom = (Q.bottom ?? 24) + B), x && D === "left" && (Q.left = (Q.left ?? 50) + q.width + 10), x && D === "right" && (Q.right = (Q.right ?? 20) + q.width + 10);
4050
+ x && D === "bottom" && (Q.bottom = (Q.bottom ?? 24) + Y), x && D === "left" && (Q.left = (Q.left ?? 50) + q.width + 10), x && D === "right" && (Q.right = (Q.right ?? 20) + q.width + 10);
4050
4051
  const { chartArea: oe, width: le, height: he, margin: ke } = Wt(h, Q), ze = aa(o, ke);
4051
4052
  let ve = a.labels;
4052
4053
  if (e.sortMode === "total") {
@@ -4109,12 +4110,12 @@ function rf(t, a, e = {}, r = !1) {
4109
4110
  Re.use(Ua(e.annotations, { scaleX: xe, scaleY: Me, data: G, width: le, height: he, backgroundColor: $t(t), transition: r, priorAnnotations: f }));
4110
4111
  }
4111
4112
  const Fe = () => Re.draw(K);
4112
- we.state === "committing" ? we.register(Fe) : Fe(), Ut(t, { chartType: "column-stacked", margin: ke, plotRect: _e }), l && (It(_.node()), Yt(t, l));
4113
- const He = e.valueLabels ?? !1, Ye = b.rollup(K, (G) => b.max(G, ($e) => $e.y1) ?? 0, (G) => G.label), se = b.select(oe).append("g").attr("class", "bc-value-labels");
4113
+ we.state === "committing" ? we.register(Fe) : Fe(), Ut(t, { chartType: "column-stacked", margin: ke, plotRect: _e }), l && (It(_.node()), Bt(t, l));
4114
+ const He = e.valueLabels ?? !1, Be = b.rollup(K, (G) => b.max(G, ($e) => $e.y1) ?? 0, (G) => G.label), se = b.select(oe).append("g").attr("class", "bc-value-labels");
4114
4115
  if (K.forEach((G) => {
4115
4116
  if (!Za(G.seriesName, He, m))
4116
4117
  return;
4117
- const $e = (xe(G.label) ?? 0) + xe.bandwidth() / 2, Ce = Math.abs(Me(G.y0) - Me(G.y1)), N = Me(G.y0) - Ce / 2, de = te ? `${Math.round(G.value)}%` : e.valueLabels === "percent" ? Nr(G.value, Ye.get(G.label) ?? 0) : String(Math.round(G.value * 100) / 100);
4118
+ const $e = (xe(G.label) ?? 0) + xe.bandwidth() / 2, Ce = Math.abs(Me(G.y0) - Me(G.y1)), N = Me(G.y0) - Ce / 2, de = te ? `${Math.round(G.value)}%` : e.valueLabels === "percent" ? Nr(G.value, Be.get(G.label) ?? 0) : String(Math.round(G.value * 100) / 100);
4118
4119
  Da({
4119
4120
  text: de,
4120
4121
  placement: "inside",
@@ -4164,10 +4165,10 @@ function nf(t, a, e) {
4164
4165
  return r;
4165
4166
  }
4166
4167
  function lf(t, a, e = {}, r = !1) {
4167
- var w, Y, ce, Ae, G, $e, Ce;
4168
+ var w, B, ce, Ae, G, $e, Ce;
4168
4169
  qt(r);
4169
4170
  let n = [], l = null, f, o, c;
4170
- const u = Bt.for(t);
4171
+ const u = Yt.for(t);
4171
4172
  if (r) {
4172
4173
  const N = Xt(t);
4173
4174
  o = N == null ? void 0 : N.margin, c = N == null ? void 0 : N.plotRect, u.detach(), (N == null ? void 0 : N.chartType) === "bar-stacked" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-stacked")) : N && (l = Rt(t)), f = /* @__PURE__ */ new Map();
@@ -4176,13 +4177,13 @@ function lf(t, a, e = {}, r = !1) {
4176
4177
  f.set(Te, Pe);
4177
4178
  t.replaceChildren();
4178
4179
  }
4179
- const { body: h } = Vt(t, e.frame), v = a.series ?? [], g = v.filter((N) => !Ea(N.name, e.seriesOverrides)), p = g.map((N) => N.name), k = e.colors ?? sf, m = e.seriesOverrides, x = e.legend !== !1, O = Ot(h).width, C = 350, M = e.legendPosition ?? "top", D = O > 0 && O < C && (M === "left" || M === "right") ? "top" : M, R = e.legendAnchor ?? "start", j = { labels: a.labels, values: a.values, series: g }, te = e.stackMode === La.Percent, V = te ? Os(j) : $s(j), re = nf(V, a.labels, v), ee = te ? 100 : b.max(re, (N) => N.y1) ?? 0, H = e.categoryLabelLine === !0, Z = Fr(a.labels), ae = H ? We.Off : (w = e.verticalAxis) == null ? void 0 : w.labelPosition, W = ra(O, ae, (Y = e.horizontalAxis) == null ? void 0 : Y.labelPosition, (ce = e.verticalAxis) == null ? void 0 : ce.direction, Z, (Ae = e.horizontalAxis) == null ? void 0 : Ae.showAxis), J = W.top != null, Se = Math.max(0, O - (W.left ?? 50) - (W.right ?? 20)), ie = x ? Aa(p, D, Se) : { width: 0, height: 0 }, q = x ? ie.height + 15 : 0, B = { ...W };
4180
+ const { body: h } = Vt(t, e.frame), v = a.series ?? [], g = v.filter((N) => !Ea(N.name, e.seriesOverrides)), p = g.map((N) => N.name), k = e.colors ?? sf, m = e.seriesOverrides, x = e.legend !== !1, O = Ot(h).width, C = 350, M = e.legendPosition ?? "top", D = O > 0 && O < C && (M === "left" || M === "right") ? "top" : M, R = e.legendAnchor ?? "start", j = { labels: a.labels, values: a.values, series: g }, te = e.stackMode === La.Percent, V = te ? Os(j) : $s(j), re = nf(V, a.labels, v), ee = te ? 100 : b.max(re, (N) => N.y1) ?? 0, H = e.categoryLabelLine === !0, Z = Fr(a.labels), ae = H ? We.Off : (w = e.verticalAxis) == null ? void 0 : w.labelPosition, W = ra(O, ae, (B = e.horizontalAxis) == null ? void 0 : B.labelPosition, (ce = e.verticalAxis) == null ? void 0 : ce.direction, Z, (Ae = e.horizontalAxis) == null ? void 0 : Ae.showAxis), J = W.top != null, Se = Math.max(0, O - (W.left ?? 50) - (W.right ?? 20)), ie = x ? Aa(p, D, Se) : { width: 0, height: 0 }, q = x ? ie.height + 15 : 0, Y = { ...W };
4180
4181
  if (x && D === "top") {
4181
4182
  const N = J ? 15 : 0;
4182
- B.top = q + N;
4183
+ Y.top = q + N;
4183
4184
  }
4184
- x && D === "bottom" && (B.bottom = (B.bottom ?? 24) + q), x && D === "left" && (B.left = (B.left ?? 50) + ie.width + 10), x && D === "right" && (B.right = (B.right ?? 20) + ie.width + 10);
4185
- const { chartArea: Q, width: oe, height: le, margin: he } = Wt(h, B), ke = aa(o, he);
4185
+ x && D === "bottom" && (Y.bottom = (Y.bottom ?? 24) + q), x && D === "left" && (Y.left = (Y.left ?? 50) + ie.width + 10), x && D === "right" && (Y.right = (Y.right ?? 20) + ie.width + 10);
4186
+ const { chartArea: Q, width: oe, height: le, margin: he } = Wt(h, Y), ke = aa(o, he);
4186
4187
  let ze = a.labels;
4187
4188
  if (e.sortMode === "total") {
4188
4189
  const N = a.labels.map((de, Te) => ({
@@ -4254,14 +4255,14 @@ function lf(t, a, e = {}, r = !1) {
4254
4255
  Re.use(Ua(e.annotations, { scaleX: xe, scaleY: ve, data: N, width: oe, height: le, backgroundColor: $t(t), orientation: Ct.Horizontal, transition: r, priorAnnotations: f }));
4255
4256
  }
4256
4257
  const Fe = () => Re.draw(_);
4257
- if (we.state === "committing" ? we.register(Fe) : Fe(), Ut(t, { chartType: "bar-stacked", margin: he, plotRect: _e }), l && (It(pe.node()), Yt(t, l)), H) {
4258
+ if (we.state === "committing" ? we.register(Fe) : Fe(), Ut(t, { chartType: "bar-stacked", margin: he, plotRect: _e }), l && (It(pe.node()), Bt(t, l)), H) {
4258
4259
  const N = b.select(Q).append("g").attr("class", "bc-category-labels");
4259
4260
  for (const de of ze) {
4260
4261
  const Te = xe(de) ?? 0;
4261
4262
  N.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", Te + xn / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(de);
4262
4263
  }
4263
4264
  }
4264
- const He = e.valueLabels ?? !1, Ye = e.valueLabelPosition ?? Ie.Auto, se = /* @__PURE__ */ new Set(), be = /* @__PURE__ */ new Map();
4265
+ const He = e.valueLabels ?? !1, Be = e.valueLabelPosition ?? Ie.Auto, se = /* @__PURE__ */ new Set(), be = /* @__PURE__ */ new Map();
4265
4266
  for (const N of ze) {
4266
4267
  const de = _.filter((Te) => Te.label === N).sort((Te, Pe) => Te.y1 - Pe.y1);
4267
4268
  if (de.length > 0) {
@@ -4277,7 +4278,7 @@ function lf(t, a, e = {}, r = !1) {
4277
4278
  if (_.forEach((N) => {
4278
4279
  if (!Za(N.seriesName, He, m))
4279
4280
  return;
4280
- const de = te ? `${Math.round(N.value)}%` : e.valueLabels === "percent" ? Nr(N.value, A.get(N.label) ?? 0) : String(Math.round(N.value * 100) / 100), Te = ve(N.y1) - ve(N.y0), Pe = de.length * 6.5 + 8, Ge = Te >= Pe, Ke = (xe(N.label) ?? 0) + K + (xe.bandwidth() - K) / 2, ot = Qe(N.seriesName, N.seriesIndex, k, m), kt = se.has(N.label + "\0" + N.seriesName), ct = Ye === Ie.Outside || Ye === Ie.Auto && !Ge && kt, _t = Da({
4281
+ const de = te ? `${Math.round(N.value)}%` : e.valueLabels === "percent" ? Nr(N.value, A.get(N.label) ?? 0) : String(Math.round(N.value * 100) / 100), Te = ve(N.y1) - ve(N.y0), Pe = de.length * 6.5 + 8, Ge = Te >= Pe, Ke = (xe(N.label) ?? 0) + K + (xe.bandwidth() - K) / 2, ot = Qe(N.seriesName, N.seriesIndex, k, m), kt = se.has(N.label + "\0" + N.seriesName), ct = Be === Ie.Outside || Be === Ie.Auto && !Ge && kt, _t = Da({
4281
4282
  text: de,
4282
4283
  placement: ct ? "outside" : "inside",
4283
4284
  orientation: "horizontal",
@@ -4288,7 +4289,7 @@ function lf(t, a, e = {}, r = !1) {
4288
4289
  L.append("text").attr("class", "bc-value-label").attr("data-series", N.seriesName).attr("opacity", 0).attr("x", Je).attr("y", Ke).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", Gt(ot)).text(de);
4289
4290
  };
4290
4291
  if (ct)
4291
- if (Ye === Ie.Inside)
4292
+ if (Be === Ie.Inside)
4292
4293
  et();
4293
4294
  else {
4294
4295
  const Je = ve(N.y1) + 4, zt = T.get(N.label) ?? 0, U = be.get(N.label + "\0" + N.seriesName), F = Je < zt, ne = U !== void 0 && Pe + 4 > U, me = oe + he.right - 2, fe = Je + Pe > me;
@@ -4359,10 +4360,10 @@ function ff(t, a, e, r) {
4359
4360
  return n;
4360
4361
  }
4361
4362
  function df(t, a, e = {}, r = !1) {
4362
- var Re, Fe, He, Ye, se, be;
4363
+ var Re, Fe, He, Be, se, be;
4363
4364
  qt(r);
4364
4365
  let n = [], l = null, f, o;
4365
- const c = Bt.for(t);
4366
+ const c = Yt.for(t);
4366
4367
  if (r) {
4367
4368
  const T = Xt(t);
4368
4369
  f = T == null ? void 0 : T.margin, o = T == null ? void 0 : T.plotRect, c.detach(), (T == null ? void 0 : T.chartType) === "bar-split" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-split")) : T && (l = Rt(t)), t.replaceChildren();
@@ -4373,7 +4374,7 @@ function df(t, a, e = {}, r = !1) {
4373
4374
  (Fe = e.horizontalAxis) == null ? void 0 : Fe.labelPosition,
4374
4375
  (He = e.verticalAxis) == null ? void 0 : He.direction,
4375
4376
  j,
4376
- (Ye = e.horizontalAxis) == null ? void 0 : Ye.showAxis
4377
+ (Be = e.horizontalAxis) == null ? void 0 : Be.showAxis
4377
4378
  );
4378
4379
  V.top = (V.top ?? 12) + Cr;
4379
4380
  const re = Math.max(0, x - (V.left ?? 50) - (V.right ?? 20)), ee = m ? Aa(g, M, re) : { width: 0, height: 0 }, H = m ? ee.height + 15 : 0, Z = { ...V };
@@ -4383,14 +4384,14 @@ function df(t, a, e = {}, r = !1) {
4383
4384
  if (e.sortMode === "total") {
4384
4385
  const T = a.labels.map((A, L) => ({
4385
4386
  label: A,
4386
- total: v.reduce((w, Y) => w + (Y.values[L] ?? 0), 0)
4387
+ total: v.reduce((w, B) => w + (B.values[L] ?? 0), 0)
4387
4388
  }));
4388
4389
  T.sort((A, L) => L.total - A.total), q = T.map((A) => A.label);
4389
4390
  }
4390
- const B = b.scaleBand().domain(q).range([0, J]).padding(Ta(e.barGap)), Q = R ? wn : 0;
4391
+ const Y = b.scaleBand().domain(q).range([0, J]).padding(Ta(e.barGap)), Q = R ? wn : 0;
4391
4392
  c.attach(ae, ie), c.update({
4392
4393
  vertical: {
4393
- scale: B,
4394
+ scale: Y,
4394
4395
  height: J,
4395
4396
  options: {
4396
4397
  ...e.verticalAxis,
@@ -4418,9 +4419,9 @@ function df(t, a, e = {}, r = !1) {
4418
4419
  const A = Le.get(T.seriesName) ?? Qe(T.seriesName, T.seriesIndex, p, k), L = dr(T.seriesName, k), w = {
4419
4420
  "data-series": T.seriesName,
4420
4421
  x: T.xPos,
4421
- y: (B(T.label) ?? 0) + Q,
4422
+ y: (Y(T.label) ?? 0) + Q,
4422
4423
  width: T.barWidth,
4423
- height: Math.max(0, B.bandwidth() - Q),
4424
+ height: Math.max(0, Y.bandwidth() - Q),
4424
4425
  fill: A
4425
4426
  };
4426
4427
  return L < 1 && (w["fill-opacity"] = L), Me.size > 0 && (w.opacity = Pt(Me, T.seriesName)), w;
@@ -4445,10 +4446,10 @@ function df(t, a, e = {}, r = !1) {
4445
4446
  orientation: Ct.Horizontal
4446
4447
  }));
4447
4448
  const Oe = () => ye.draw(xe);
4448
- if (pe.state === "committing" ? pe.register(Oe) : Oe(), Ut(t, { chartType: "bar-split", margin: Se, plotRect: K }), l && (It(ze.node()), Yt(t, l)), R) {
4449
+ if (pe.state === "committing" ? pe.register(Oe) : Oe(), Ut(t, { chartType: "bar-split", margin: Se, plotRect: K }), l && (It(ze.node()), Bt(t, l)), R) {
4449
4450
  const T = b.select(ae).append("g").attr("class", "bc-category-labels");
4450
4451
  for (const A of q) {
4451
- const L = B(A) ?? 0;
4452
+ const L = Y(A) ?? 0;
4452
4453
  T.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", L + wn / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(A);
4453
4454
  }
4454
4455
  }
@@ -4459,13 +4460,13 @@ function df(t, a, e = {}, r = !1) {
4459
4460
  const A = le.find((N) => N.seriesName === T.seriesName);
4460
4461
  if (!A)
4461
4462
  return;
4462
- const L = Qe(T.seriesName, T.seriesIndex, p, k), w = T.xPos + T.barWidth, Y = Math.max(0, B.bandwidth() - Q), ce = (B(T.label) ?? 0) + Q + Y / 2, Ae = Ee === Ie.Inside || Ee === Ie.Auto && T.barWidth > 30;
4463
+ const L = Qe(T.seriesName, T.seriesIndex, p, k), w = T.xPos + T.barWidth, B = Math.max(0, Y.bandwidth() - Q), ce = (Y(T.label) ?? 0) + Q + B / 2, Ae = Ee === Ie.Inside || Ee === Ie.Auto && T.barWidth > 30;
4463
4464
  if (!Da({
4464
4465
  text: String(T.value),
4465
4466
  placement: Ae ? "inside" : "outside",
4466
4467
  orientation: "horizontal",
4467
4468
  barWidth: T.barWidth,
4468
- barHeight: Y
4469
+ barHeight: B
4469
4470
  }))
4470
4471
  return;
4471
4472
  let G, $e, Ce;
@@ -4478,8 +4479,8 @@ function df(t, a, e = {}, r = !1) {
4478
4479
  _e.append("text").attr("class", "bc-value-label").attr("data-series", T.seriesName).attr("x", G).attr("y", ce).attr("text-anchor", $e).attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", Ce).text(String(T.value));
4479
4480
  }), m && g.length > 0) {
4480
4481
  const T = g.map((w) => {
4481
- const Y = h.findIndex((ce) => ce.name === w);
4482
- return Qe(w, Y, p, k);
4482
+ const B = h.findIndex((ce) => ce.name === w);
4483
+ return Qe(w, B, p, k);
4483
4484
  });
4484
4485
  let A = 0, L = 0;
4485
4486
  M === "top" ? L = -(ee.height + 10 + Cr) : M === "bottom" ? L = J + 25 : M === "left" ? A = -(ee.width + 10) : M === "right" && (A = W + 10), va(ae, g, T, L, M, D, W, J, A, [], { left: Se.left, right: Se.right });
@@ -4496,10 +4497,10 @@ const Sn = [
4496
4497
  "#ff9da7"
4497
4498
  ], Ln = 13;
4498
4499
  function uf(t, a, e = {}, r = !1) {
4499
- var Fe, He, Ye, se, be, T;
4500
+ var Fe, He, Be, se, be, T;
4500
4501
  qt(r);
4501
4502
  let n = [], l = null, f, o;
4502
- const c = Bt.for(t);
4503
+ const c = Yt.for(t);
4503
4504
  if (r) {
4504
4505
  const A = Xt(t);
4505
4506
  f = A == null ? void 0 : A.margin, o = A == null ? void 0 : A.plotRect, c.detach(), (A == null ? void 0 : A.chartType) === "bar-grouped" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-grouped")) : A && (l = Rt(t)), t.replaceChildren();
@@ -4508,7 +4509,7 @@ function uf(t, a, e = {}, r = !1) {
4508
4509
  x,
4509
4510
  te,
4510
4511
  (He = e.horizontalAxis) == null ? void 0 : He.labelPosition,
4511
- (Ye = e.verticalAxis) == null ? void 0 : Ye.direction,
4512
+ (Be = e.verticalAxis) == null ? void 0 : Be.direction,
4512
4513
  j,
4513
4514
  (se = e.horizontalAxis) == null ? void 0 : se.showAxis
4514
4515
  ), re = Math.max(0, x - (V.left ?? 50) - (V.right ?? 20)), ee = m ? Aa(g, M, re) : { width: 0, height: 0 }, H = m ? ee.height + 15 : 0, Z = { ...V };
@@ -4518,14 +4519,14 @@ function uf(t, a, e = {}, r = !1) {
4518
4519
  if (e.sortMode === "total") {
4519
4520
  const A = a.labels.map((L, w) => ({
4520
4521
  label: L,
4521
- total: v.reduce((Y, ce) => Y + (ce.values[w] ?? 0), 0)
4522
+ total: v.reduce((B, ce) => B + (ce.values[w] ?? 0), 0)
4522
4523
  }));
4523
4524
  A.sort((L, w) => w.total - L.total), q = A.map((L) => L.label);
4524
4525
  }
4525
- const B = b.scaleBand().domain(q).range([0, J]).paddingInner(Ta(e.barGap)).paddingOuter(0.05), Q = R ? Ln : 0, oe = Math.max(0, B.bandwidth() - Q), le = b.scaleBand().domain(g).range([0, oe]).padding(0.05), he = b.max(v.flatMap((A) => A.values)) ?? 0, ke = b.scaleLinear().domain([0, he]).nice().range([0, W]);
4526
+ const Y = b.scaleBand().domain(q).range([0, J]).paddingInner(Ta(e.barGap)).paddingOuter(0.05), Q = R ? Ln : 0, oe = Math.max(0, Y.bandwidth() - Q), le = b.scaleBand().domain(g).range([0, oe]).padding(0.05), he = b.max(v.flatMap((A) => A.values)) ?? 0, ke = b.scaleLinear().domain([0, he]).nice().range([0, W]);
4526
4527
  c.attach(ae, ie), c.update({
4527
4528
  vertical: {
4528
- scale: B,
4529
+ scale: Y,
4529
4530
  height: J,
4530
4531
  options: {
4531
4532
  ...e.verticalAxis,
@@ -4539,12 +4540,12 @@ function uf(t, a, e = {}, r = !1) {
4539
4540
  const ze = ae.ownerSVGElement, ve = sa(ze, t, "bars", { x: 0, y: 0, width: W, height: J }), xe = b.select(ae).append("g").attr("clip-path", `url(#${ve})`);
4540
4541
  if (e.barBackground) {
4541
4542
  const A = (e.colors ?? Sn)[0];
4542
- xe.selectAll(".bc-bar-bg").data(q, (L) => L).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (L) => (B(L) ?? 0) + Q).attr("width", W).attr("height", B.bandwidth() - Q).attr("fill", A).attr("opacity", 0.18);
4543
+ xe.selectAll(".bc-bar-bg").data(q, (L) => L).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (L) => (Y(L) ?? 0) + Q).attr("width", W).attr("height", Y.bandwidth() - Q).attr("fill", A).attr("opacity", 0.18);
4543
4544
  }
4544
4545
  if (e.barSeparators && q.length > 1) {
4545
- const A = B.step();
4546
+ const A = Y.step();
4546
4547
  for (let L = 1; L < q.length; L++) {
4547
- const w = (B(q[L - 1]) ?? 0) + B.bandwidth() + (A - B.bandwidth()) / 2;
4548
+ const w = (Y(q[L - 1]) ?? 0) + Y.bandwidth() + (A - Y.bandwidth()) / 2;
4548
4549
  xe.append("line").attr("class", "bc-bar-separator").attr("x1", 0).attr("x2", W).attr("y1", w).attr("y2", w).attr("stroke", "currentColor").attr("opacity", 0.15);
4549
4550
  }
4550
4551
  }
@@ -4552,11 +4553,11 @@ function uf(t, a, e = {}, r = !1) {
4552
4553
  for (const A of q) {
4553
4554
  const L = a.labels.indexOf(A);
4554
4555
  for (const w of v) {
4555
- const Y = h.findIndex((ce) => ce.name === w.name);
4556
+ const B = h.findIndex((ce) => ce.name === w.name);
4556
4557
  Me.push({
4557
4558
  label: A,
4558
4559
  seriesName: w.name,
4559
- seriesIndex: Y,
4560
+ seriesIndex: B,
4560
4561
  value: L >= 0 ? w.values[L] ?? 0 : 0
4561
4562
  });
4562
4563
  }
@@ -4573,15 +4574,15 @@ function uf(t, a, e = {}, r = !1) {
4573
4574
  key: (A) => A.label + "\0" + A.seriesName,
4574
4575
  insert: (A) => A.append("rect").attr("class", "bc-bar bc-bar-grouped"),
4575
4576
  attrs: (A) => {
4576
- const L = pe.get(A.seriesName) ?? Qe(A.seriesName, A.seriesIndex, p, k), w = dr(A.seriesName, k), Y = {
4577
+ const L = pe.get(A.seriesName) ?? Qe(A.seriesName, A.seriesIndex, p, k), w = dr(A.seriesName, k), B = {
4577
4578
  "data-series": A.seriesName,
4578
4579
  x: ke(0),
4579
- y: (B(A.label) ?? 0) + Q + (le(A.seriesName) ?? 0),
4580
+ y: (Y(A.label) ?? 0) + Q + (le(A.seriesName) ?? 0),
4580
4581
  width: Math.max(0, ke(A.value) - ke(0)),
4581
4582
  height: le.bandwidth(),
4582
4583
  fill: L
4583
4584
  };
4584
- return w < 1 && (Y["fill-opacity"] = w), Le.size > 0 && (Y.opacity = Pt(Le, A.seriesName)), Y;
4585
+ return w < 1 && (B["fill-opacity"] = w), Le.size > 0 && (B.opacity = Pt(Le, A.seriesName)), B;
4585
4586
  }
4586
4587
  });
4587
4588
  const ye = { left: Se.left, top: Se.top, width: W, height: J };
@@ -4603,10 +4604,10 @@ function uf(t, a, e = {}, r = !1) {
4603
4604
  orientation: Ct.Horizontal
4604
4605
  }));
4605
4606
  const we = () => Oe.draw(Me);
4606
- if (_.state === "committing" ? _.register(we) : we(), Ut(t, { chartType: "bar-grouped", margin: Se, plotRect: ye }), l && (It(xe.node()), Yt(t, l)), R) {
4607
+ if (_.state === "committing" ? _.register(we) : we(), Ut(t, { chartType: "bar-grouped", margin: Se, plotRect: ye }), l && (It(xe.node()), Bt(t, l)), R) {
4607
4608
  const A = b.select(ae).append("g").attr("class", "bc-category-labels");
4608
4609
  for (const L of q) {
4609
- const w = B(L) ?? 0;
4610
+ const w = Y(L) ?? 0;
4610
4611
  A.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", w + Ln / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(L);
4611
4612
  }
4612
4613
  }
@@ -4614,7 +4615,7 @@ function uf(t, a, e = {}, r = !1) {
4614
4615
  if (Me.forEach((A) => {
4615
4616
  if (!Za(A.seriesName, Ee, k))
4616
4617
  return;
4617
- const L = Qe(A.seriesName, A.seriesIndex, p, k), w = Math.max(0, ke(A.value) - ke(0)), Y = ke(0) + w, ce = (B(A.label) ?? 0) + Q + (le(A.seriesName) ?? 0) + le.bandwidth() / 2, Ae = _e === Ie.Inside || _e === Ie.Auto && w > 30;
4618
+ const L = Qe(A.seriesName, A.seriesIndex, p, k), w = Math.max(0, ke(A.value) - ke(0)), B = ke(0) + w, ce = (Y(A.label) ?? 0) + Q + (le(A.seriesName) ?? 0) + le.bandwidth() / 2, Ae = _e === Ie.Inside || _e === Ie.Auto && w > 30;
4618
4619
  if (!Da({
4619
4620
  text: String(A.value),
4620
4621
  placement: Ae ? "inside" : "outside",
@@ -4624,11 +4625,11 @@ function uf(t, a, e = {}, r = !1) {
4624
4625
  }))
4625
4626
  return;
4626
4627
  let G, $e, Ce;
4627
- Ae ? (G = Y - 4, $e = "end", Ce = Gt(L)) : (G = Y + 4, $e = "start", Ce = "currentColor"), Re.append("text").attr("class", "bc-value-label").attr("data-series", A.seriesName).attr("x", G).attr("y", ce).attr("text-anchor", $e).attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", Ce).text(String(A.value));
4628
+ Ae ? (G = B - 4, $e = "end", Ce = Gt(L)) : (G = B + 4, $e = "start", Ce = "currentColor"), Re.append("text").attr("class", "bc-value-label").attr("data-series", A.seriesName).attr("x", G).attr("y", ce).attr("text-anchor", $e).attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", Ce).text(String(A.value));
4628
4629
  }), m && g.length > 0) {
4629
- const A = g.map((Y) => {
4630
- const ce = h.findIndex((Ae) => Ae.name === Y);
4631
- return Qe(Y, ce, p, k);
4630
+ const A = g.map((B) => {
4631
+ const ce = h.findIndex((Ae) => Ae.name === B);
4632
+ return Qe(B, ce, p, k);
4632
4633
  });
4633
4634
  let L = 0, w = 0;
4634
4635
  M === "top" ? w = -(ee.height + 10) : M === "bottom" ? w = J + 25 : M === "left" ? L = -(ee.width + 10) : M === "right" && (L = W + 10), va(ae, g, A, w, M, D, W, J, L, [], { left: Se.left, right: Se.right });
@@ -4788,7 +4789,7 @@ const kn = [
4788
4789
  { value: La.Normal, text: "Normal" },
4789
4790
  { value: La.Percent, text: "Percentage (100%)" }
4790
4791
  ]
4791
- }, gf = { key: "sharedScale", type: ue.Boolean, label: "Shared scale", default: !1 }, Na = { key: "categoryLabelLine", type: ue.Boolean, label: "Labels on separate line", default: !1 }, Rl = { key: "displayAsPercentage", type: ue.Boolean, label: "Display as percentage", default: !1 }, Yl = { key: "showTotal", type: ue.Boolean, label: "Show total", default: !1 }, Bl = { key: "showLabels", type: ue.Boolean, label: "Show labels", default: !0 }, _l = { key: "showValues", type: ue.Boolean, label: "Show values", default: !0 }, Hl = { key: "sliceMax", type: ue.Text, label: "Max slices", default: "6" }, Gl = { key: "sliceGroupLabel", type: ue.Text, label: "Group label", default: "Others", placeholder: "Others" }, pf = { key: "areaFillOpacity", type: ue.Text, label: "Opacity", default: "0.85", placeholder: "0.85" }, bf = { key: "stacked", type: ue.Boolean, label: "Stack areas", default: !0 }, mf = { key: "stackPercent", type: ue.Boolean, label: "Stack to 100%", default: !1 }, yf = { key: "areaLines", type: ue.Boolean, label: "Separate areas with lines", default: !0 }, vf = {
4792
+ }, gf = { key: "sharedScale", type: ue.Boolean, label: "Shared scale", default: !1 }, Na = { key: "categoryLabelLine", type: ue.Boolean, label: "Labels on separate line", default: !1 }, Rl = { key: "displayAsPercentage", type: ue.Boolean, label: "Display as percentage", default: !1 }, Bl = { key: "showTotal", type: ue.Boolean, label: "Show total", default: !1 }, Yl = { key: "showLabels", type: ue.Boolean, label: "Show labels", default: !0 }, _l = { key: "showValues", type: ue.Boolean, label: "Show values", default: !0 }, Hl = { key: "sliceMax", type: ue.Text, label: "Max slices", default: "6" }, Gl = { key: "sliceGroupLabel", type: ue.Text, label: "Group label", default: "Others", placeholder: "Others" }, pf = { key: "areaFillOpacity", type: ue.Text, label: "Opacity", default: "0.85", placeholder: "0.85" }, bf = { key: "stacked", type: ue.Boolean, label: "Stack areas", default: !0 }, mf = { key: "stackPercent", type: ue.Boolean, label: "Stack to 100%", default: !1 }, yf = { key: "areaLines", type: ue.Boolean, label: "Separate areas with lines", default: !0 }, vf = {
4792
4793
  key: "areaSortMode",
4793
4794
  type: ue.Select,
4794
4795
  label: "Sort areas",
@@ -4856,11 +4857,11 @@ function pr(t) {
4856
4857
  ] : []
4857
4858
  ];
4858
4859
  }
4859
- const Qr = pr({ verticalGrid: rt.None, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", valueAxisZeroBaseline: !0, valueAxisLabelsOff: !0 }), br = pr({ verticalGrid: rt.None, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showHorizontalAxis: !1, valueAxis: "horizontal", valueAxisZeroBaseline: !0, valueAxisLabelsOff: !0 }), Vl = pr({ verticalGrid: rt.Dashed, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0 }), wf = pr({ verticalGrid: rt.Dashed, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0, valueAxisZeroBaseline: !0 }), es = { ...xf, default: Qt.MonotoneX }, Sf = { ...$l, default: pt.Vertical }, Lf = { ...Cl, default: !0 }, kf = { ...Pl, default: !0 }, Wl = { ...ur, default: ea.Total }, Ps = { ...Vr, default: !0 }, Mf = { ...Vr, default: !0 }, Cf = { ...Rl, default: !0 }, $f = { ...Hl, default: "5" }, Of = { ...Yl, default: !0 }, ts = { ...Gr, default: bt.Auto }, as = { ...Ka, default: !1 }, rs = [Cl, $l, Ol, Tl], zs = [Lf, Sf, Ol, Tl], ss = [Mf, Wr, ga, ...rs], Ds = [Ps, Wr, ga, ...rs], Tf = [Pl, zl, Dl, El, Nl, Fl], Pf = [kf, zl, Dl, El, Nl, Fl], ql = [Vr, ga, ...zs, ...Tf], zf = [Vr, ga, ...zs, ...Pf], Df = [Cf, Yl, Bl, _l, $f, Gl], Ef = [Rl, Of, Bl, _l, Hl, Gl];
4860
+ const Qr = pr({ verticalGrid: rt.None, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", valueAxisZeroBaseline: !0, valueAxisLabelsOff: !0 }), br = pr({ verticalGrid: rt.None, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showHorizontalAxis: !1, valueAxis: "horizontal", valueAxisZeroBaseline: !0, valueAxisLabelsOff: !0 }), Vl = pr({ verticalGrid: rt.Dashed, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0 }), wf = pr({ verticalGrid: rt.Dashed, horizontalGrid: rt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0, valueAxisZeroBaseline: !0 }), es = { ...xf, default: Qt.MonotoneX }, Sf = { ...$l, default: pt.Vertical }, Lf = { ...Cl, default: !0 }, kf = { ...Pl, default: !0 }, Wl = { ...ur, default: ea.Total }, Ps = { ...Vr, default: !0 }, Mf = { ...Vr, default: !0 }, Cf = { ...Rl, default: !0 }, $f = { ...Hl, default: "5" }, Of = { ...Bl, default: !0 }, ts = { ...Gr, default: bt.Auto }, as = { ...Ka, default: !1 }, rs = [Cl, $l, Ol, Tl], zs = [Lf, Sf, Ol, Tl], ss = [Mf, Wr, ga, ...rs], Ds = [Ps, Wr, ga, ...rs], Tf = [Pl, zl, Dl, El, Nl, Fl], Pf = [kf, zl, Dl, El, Nl, Fl], ql = [Vr, ga, ...zs, ...Tf], zf = [Vr, ga, ...zs, ...Pf], Df = [Cf, Bl, Yl, _l, $f, Gl], Ef = [Rl, Of, Yl, _l, Hl, Gl];
4860
4861
  xt(mt.BarVertical, pl, [At, wt, St, Lt, Jr, hr, gr, jr, Zr, Kr, Xr, Ur, Na, ...Qr, ...ss]);
4861
4862
  xt(mt.BarHorizontal, bl, [At, wt, St, Lt, Jr, hr, gr, jr, Zr, Kr, Xr, Ur, Na, ...br, ...Ds]);
4862
4863
  xt(mt.BarMulti, Pc, [At, wt, St, Lt, Wl, as, ha, ua, ts, Ts, ...Qr, ...ss]);
4863
- xt(mt.Line, Yc, [At, wt, St, Lt, es, qr, ...Vl, ...ql]);
4864
+ xt(mt.Line, Bc, [At, wt, St, Lt, es, qr, ...Vl, ...ql]);
4864
4865
  xt(mt.LineMulti, Gc, [At, wt, St, Lt, es, qr, ur, as, ha, ua, ts, ...Vl, ...zf]);
4865
4866
  xt(mt.Donut, jc, [At, wt, St, Lt, as, ha, ua, ts, ga, ...Ef]);
4866
4867
  xt(mt.Pie, Zc, [At, wt, St, Lt, as, ha, ua, ts, ga, ...Df]);
@@ -4925,7 +4926,7 @@ function Rf(t) {
4925
4926
  const r = or(t.verticalRangeMin ?? ""), n = or(t.verticalRangeMax ?? "");
4926
4927
  return (r !== void 0 || n !== void 0) && (e.range = {}, r !== void 0 && (e.range.min = r), n !== void 0 && (e.range.max = n)), { verticalAxis: e };
4927
4928
  }
4928
- function Yf(t) {
4929
+ function Bf(t) {
4929
4930
  if (!(t.showHorizontalTicks !== void 0 || t.horizontalGridStyle !== void 0 || t.horizontalNumberFormat !== void 0 || t.showHorizontalAxis !== void 0 || t.horizontalScaleType !== void 0 || t.horizontalLabelPosition !== void 0 || t.horizontalLabelRotation !== void 0 || t.horizontalRangeMin || t.horizontalRangeMax))
4930
4931
  return {};
4931
4932
  const e = {};
@@ -4933,7 +4934,7 @@ function Yf(t) {
4933
4934
  const r = or(t.horizontalRangeMin ?? ""), n = or(t.horizontalRangeMax ?? "");
4934
4935
  return (r !== void 0 || n !== void 0) && (e.range = {}, r !== void 0 && (e.range.min = r), n !== void 0 && (e.range.max = n)), { horizontalAxis: e };
4935
4936
  }
4936
- function Bf(t) {
4937
+ function Yf(t) {
4937
4938
  return t.lineSymbols ? {
4938
4939
  lineSymbols: {
4939
4940
  symbol: t.lineSymbolShape ?? Et.Circle,
@@ -4949,8 +4950,8 @@ function _f(t, a) {
4949
4950
  ...Ff(t, a),
4950
4951
  ...If(t),
4951
4952
  ...Rf(t),
4952
- ...Yf(t),
4953
- ...Bf(t)
4953
+ ...Bf(t),
4954
+ ...Yf(t)
4954
4955
  };
4955
4956
  t.interpolation !== void 0 && (e.interpolation = t.interpolation), t.valueLabels !== void 0 && (e.valueLabels = t.valueLabels), t.valueLabelPosition !== void 0 && (e.valueLabelPosition = t.valueLabelPosition), t.tooltips !== void 0 && (e.tooltips = t.tooltips), t.crosshair !== void 0 && (e.crosshair = t.crosshair), t.crosshairDirection && (e.crosshairDirection = t.crosshairDirection), t.crosshairStyle && (e.crosshairStyle = t.crosshairStyle), t.crosshairColor && (e.crosshairColor = t.crosshairColor), t.displayAsPercentage !== void 0 && (e.displayAsPercentage = t.displayAsPercentage), t.showTotal !== void 0 && (e.showTotal = t.showTotal), t.showLabels !== void 0 && (e.showLabels = t.showLabels), t.showValues !== void 0 && (e.showValues = t.showValues), t.swapLabelValue !== void 0 && (e.swapLabelValue = t.swapLabelValue);
4956
4957
  const r = parseInt(t.sliceMax ?? "", 10);
@@ -5168,8 +5169,8 @@ ka.buildMessage = function(t, a) {
5168
5169
  };
5169
5170
  function qf(t, a) {
5170
5171
  a = a !== void 0 ? a : {};
5171
- var e = {}, r = a.grammarSource, n = { Chart: Rs }, l = Rs, f = "chart", o = "{", c = "}", u = "data", h = "=", v = ",", g = " ", p = "colorize", k = "highlight", m = "area-fill", x = "annotation", O = "range", C = "note", M = "series", D = "scene", R = "transform", j = "%", te = "-", V = ".", re = '"', ee = "\\", H = "n", Z = "r", ae = "t", W = "u", J = "//", Se = "/*", ie = "*/", q = /^[ \t]/, B = /^[^\t\n\r{}=]/, Q = /^[a-zA-Z_#]/, oe = /^[a-zA-Z0-9_#\-]/, le = /^[0-9]/, he = /^[eE]/, ke = /^[+\-]/, ze = /^[^"\\]/, ve = /^[0-9a-fA-F]/, xe = /^[^\n]/, Me = /^[ \t\n\r]/, Le = Ue("chart", !1), pe = Ue("{", !1), _ = Ue("}", !1), K = Zt([" ", " "], !1, !1), ye = Ue("data", !1), Oe = Ue("=", !1), we = Ue(",", !1), Ee = Ue(" ", !1), _e = Zt([" ", `
5172
- `, "\r", "{", "}", "="], !0, !1), Re = Ue("colorize", !1), Fe = Ue("highlight", !1), He = Ue("area-fill", !1), Ye = Ue("annotation", !1), se = Ue("range", !1), be = Ue("note", !1), T = Ue("series", !1), A = Ue("scene", !1), L = Ue("transform", !1), w = Ue("%", !1), Y = ar("identifier"), ce = Zt([["a", "z"], ["A", "Z"], "_", "#"], !1, !1), Ae = Zt([["a", "z"], ["A", "Z"], ["0", "9"], "_", "#", "-"], !1, !1), G = Ue("-", !1), $e = Ue(".", !1), Ce = Zt([["0", "9"]], !1, !1), N = Zt(["e", "E"], !1, !1), de = Zt(["+", "-"], !1, !1), Te = ar("string"), Pe = Ue('"', !1), Ge = Ue("\\", !1), Ke = Zt(['"', "\\"], !0, !1), ot = Ue("n", !1), kt = Ue("r", !1), ct = Ue("t", !1), _t = Ue("u", !1), et = Zt([["0", "9"], ["a", "f"], ["A", "F"]], !1, !1), Je = Pi(), zt = Ue("//", !1), U = Zt([`
5172
+ var e = {}, r = a.grammarSource, n = { Chart: Rs }, l = Rs, f = "chart", o = "{", c = "}", u = "data", h = "=", v = ",", g = " ", p = "colorize", k = "highlight", m = "area-fill", x = "annotation", O = "range", C = "note", M = "series", D = "scene", R = "transform", j = "%", te = "-", V = ".", re = '"', ee = "\\", H = "n", Z = "r", ae = "t", W = "u", J = "//", Se = "/*", ie = "*/", q = /^[ \t]/, Y = /^[^\t\n\r{}=]/, Q = /^[a-zA-Z_#]/, oe = /^[a-zA-Z0-9_#\-]/, le = /^[0-9]/, he = /^[eE]/, ke = /^[+\-]/, ze = /^[^"\\]/, ve = /^[0-9a-fA-F]/, xe = /^[^\n]/, Me = /^[ \t\n\r]/, Le = Ue("chart", !1), pe = Ue("{", !1), _ = Ue("}", !1), K = Zt([" ", " "], !1, !1), ye = Ue("data", !1), Oe = Ue("=", !1), we = Ue(",", !1), Ee = Ue(" ", !1), _e = Zt([" ", `
5173
+ `, "\r", "{", "}", "="], !0, !1), Re = Ue("colorize", !1), Fe = Ue("highlight", !1), He = Ue("area-fill", !1), Be = Ue("annotation", !1), se = Ue("range", !1), be = Ue("note", !1), T = Ue("series", !1), A = Ue("scene", !1), L = Ue("transform", !1), w = Ue("%", !1), B = ar("identifier"), ce = Zt([["a", "z"], ["A", "Z"], "_", "#"], !1, !1), Ae = Zt([["a", "z"], ["A", "Z"], ["0", "9"], "_", "#", "-"], !1, !1), G = Ue("-", !1), $e = Ue(".", !1), Ce = Zt([["0", "9"]], !1, !1), N = Zt(["e", "E"], !1, !1), de = Zt(["+", "-"], !1, !1), Te = ar("string"), Pe = Ue('"', !1), Ge = Ue("\\", !1), Ke = Zt(['"', "\\"], !0, !1), ot = Ue("n", !1), kt = Ue("r", !1), ct = Ue("t", !1), _t = Ue("u", !1), et = Zt([["0", "9"], ["a", "f"], ["A", "F"]], !1, !1), Je = Pi(), zt = Ue("//", !1), U = Zt([`
5173
5174
  `], !0, !1), F = Ue("/*", !1), ne = Ue("*/", !1), me = ar("blank space"), fe = Zt([" ", " ", `
5174
5175
  `, "\r"], !1, !1), Ve = ar("whitespace"), yt = ar("optional whitespace"), Dt = function(s, d) {
5175
5176
  Tn(d) > 1 && ca("duplicate data block — a chart or scene may define at most one data { } block");
@@ -5202,7 +5203,7 @@ function qf(t, a) {
5202
5203
  return { type: "property", key: s.name, ...s.quoted && s.name === "series" ? { quotedKey: !0 } : {}, value: d.value, isPercentage: d.isPercentage };
5203
5204
  }, I = function(s) {
5204
5205
  return { name: s, quoted: !0 };
5205
- }, Be = function(s) {
5206
+ }, Ye = function(s) {
5206
5207
  return { name: s, quoted: !1 };
5207
5208
  }, je = function(s, d) {
5208
5209
  return { type: "property", key: s, ...s === "series" ? { quotedKey: !0 } : {}, value: d.value, isPercentage: d.isPercentage };
@@ -5372,8 +5373,8 @@ function qf(t, a) {
5372
5373
  if (y = Kt(), y !== e)
5373
5374
  if (S = rr(), S !== e)
5374
5375
  if (Ne(), t.charCodeAt(i) === 123 ? ($ = o, i++) : ($ = e, P === 0 && E(pe)), $ !== e) {
5375
- for (z = [], X = Ys(); X !== e; )
5376
- z.push(X), X = Ys();
5376
+ for (z = [], X = Bs(); X !== e; )
5377
+ z.push(X), X = Bs();
5377
5378
  X = Ne(), t.charCodeAt(i) === 125 ? (ge = c, i++) : (ge = e, P === 0 && E(_)), ge !== e ? (Ne(), De = s, s = Dt(S, z)) : (i = s, s = e);
5378
5379
  } else
5379
5380
  i = s, s = e;
@@ -5385,9 +5386,9 @@ function qf(t, a) {
5385
5386
  i = s, s = e;
5386
5387
  return s;
5387
5388
  }
5388
- function Ys() {
5389
+ function Bs() {
5389
5390
  var s, d, y, S, $;
5390
- if (s = i, d = is(), y = Bs(), y === e && (y = Gs(), y === e && (y = Vs(), y === e && (y = Ws(), y === e && (y = Xs(), y === e && (y = Us(), y === e && (y = qs(), y === e && (y = js(), y === e && (y = Ri(), y === e && (y = Zs(), y === e && (y = ls())))))))))), y !== e) {
5391
+ if (s = i, d = is(), y = Ys(), y === e && (y = Gs(), y === e && (y = Vs(), y === e && (y = Ws(), y === e && (y = Xs(), y === e && (y = Us(), y === e && (y = qs(), y === e && (y = js(), y === e && (y = Ri(), y === e && (y = Zs(), y === e && (y = ls())))))))))), y !== e) {
5391
5392
  for (S = [], $ = t.charAt(i), q.test($) ? i++ : ($ = e, P === 0 && E(K)); $ !== e; )
5392
5393
  S.push($), $ = t.charAt(i), q.test($) ? i++ : ($ = e, P === 0 && E(K));
5393
5394
  $ = Ar(), $ === e && ($ = null), Ra(), De = s, s = ft(d, y);
@@ -5395,7 +5396,7 @@ function qf(t, a) {
5395
5396
  i = s, s = e;
5396
5397
  return s;
5397
5398
  }
5398
- function Bs() {
5399
+ function Ys() {
5399
5400
  var s, d, y, S, $, z;
5400
5401
  if (s = i, t.substr(i, 4) === u ? (d = u, i += 4) : (d = e, P === 0 && E(ye)), d !== e)
5401
5402
  if (Ne(), t.charCodeAt(i) === 123 ? (y = o, i++) : (y = e, P === 0 && E(pe)), y !== e) {
@@ -5439,7 +5440,7 @@ function qf(t, a) {
5439
5440
  }
5440
5441
  function Hs() {
5441
5442
  var s, d;
5442
- return s = i, d = Ht(), d !== e && (De = s, d = I(d)), s = d, s === e && (s = i, d = rr(), d !== e && (De = s, d = Be(d)), s = d), s;
5443
+ return s = i, d = Ht(), d !== e && (De = s, d = I(d)), s = d, s === e && (s = i, d = rr(), d !== e && (De = s, d = Ye(d)), s = d), s;
5443
5444
  }
5444
5445
  function Fi() {
5445
5446
  var s, d, y, S;
@@ -5447,9 +5448,9 @@ function qf(t, a) {
5447
5448
  }
5448
5449
  function Ii() {
5449
5450
  var s, d, y, S;
5450
- if (s = i, d = i, y = [], S = t.charAt(i), B.test(S) ? i++ : (S = e, P === 0 && E(_e)), S !== e)
5451
+ if (s = i, d = i, y = [], S = t.charAt(i), Y.test(S) ? i++ : (S = e, P === 0 && E(_e)), S !== e)
5451
5452
  for (; S !== e; )
5452
- y.push(S), S = t.charAt(i), B.test(S) ? i++ : (S = e, P === 0 && E(_e));
5453
+ y.push(S), S = t.charAt(i), Y.test(S) ? i++ : (S = e, P === 0 && E(_e));
5453
5454
  else
5454
5455
  y = e;
5455
5456
  return y !== e ? d = t.substring(d, i) : d = y, d !== e && (De = s, d = qe(d)), s = d, s;
@@ -5519,7 +5520,7 @@ function qf(t, a) {
5519
5520
  }
5520
5521
  function qs() {
5521
5522
  var s, d, y, S, $, z, X, ge;
5522
- if (s = i, t.substr(i, 10) === x ? (d = x, i += 10) : (d = e, P === 0 && E(Ye)), d !== e)
5523
+ if (s = i, t.substr(i, 10) === x ? (d = x, i += 10) : (d = e, P === 0 && E(Be)), d !== e)
5523
5524
  if (y = Kt(), y !== e)
5524
5525
  if (S = Ht(), S !== e)
5525
5526
  if (Ne(), t.charCodeAt(i) === 123 ? ($ = o, i++) : ($ = e, P === 0 && E(pe)), $ !== e) {
@@ -5534,7 +5535,7 @@ function qf(t, a) {
5534
5535
  i = s, s = e;
5535
5536
  else
5536
5537
  i = s, s = e;
5537
- return s === e && (s = i, t.substr(i, 10) === x ? (d = x, i += 10) : (d = e, P === 0 && E(Ye)), d !== e ? (y = Ne(), t.charCodeAt(i) === 123 ? (S = o, i++) : (S = e, P === 0 && E(pe)), S !== e ? (De = s, s = si()) : (i = s, s = e)) : (i = s, s = e)), s;
5538
+ return s === e && (s = i, t.substr(i, 10) === x ? (d = x, i += 10) : (d = e, P === 0 && E(Be)), d !== e ? (y = Ne(), t.charCodeAt(i) === 123 ? (S = o, i++) : (S = e, P === 0 && E(pe)), S !== e ? (De = s, s = si()) : (i = s, s = e)) : (i = s, s = e)), s;
5538
5539
  }
5539
5540
  function Xs() {
5540
5541
  var s, d, y, S, $, z;
@@ -5618,7 +5619,7 @@ function qf(t, a) {
5618
5619
  }
5619
5620
  function Ks() {
5620
5621
  var s, d, y, S, $;
5621
- if (s = i, d = is(), y = Bs(), y === e && (y = Gs(), y === e && (y = Vs(), y === e && (y = Ws(), y === e && (y = Xs(), y === e && (y = Us(), y === e && (y = qs(), y === e && (y = js(), y === e && (y = Zs(), y === e && (y = ls()))))))))), y !== e) {
5622
+ if (s = i, d = is(), y = Ys(), y === e && (y = Gs(), y === e && (y = Vs(), y === e && (y = Ws(), y === e && (y = Xs(), y === e && (y = Us(), y === e && (y = qs(), y === e && (y = js(), y === e && (y = Zs(), y === e && (y = ls()))))))))), y !== e) {
5622
5623
  for (S = [], $ = t.charAt(i), q.test($) ? i++ : ($ = e, P === 0 && E(K)); $ !== e; )
5623
5624
  S.push($), $ = t.charAt(i), q.test($) ? i++ : ($ = e, P === 0 && E(K));
5624
5625
  $ = Ar(), $ === e && ($ = null), Ra(), De = s, s = di(d, y);
@@ -5632,9 +5633,9 @@ function qf(t, a) {
5632
5633
  }
5633
5634
  function ls() {
5634
5635
  var s, d, y, S;
5635
- return s = i, d = Yi(), d !== e ? (Ne(), t.charCodeAt(i) === 61 ? (y = h, i++) : (y = e, P === 0 && E(Oe)), y !== e ? (Ne(), S = Ia(), S !== e ? (De = s, s = hi(d, S)) : (i = s, s = e)) : (i = s, s = e)) : (i = s, s = e), s;
5636
+ return s = i, d = Bi(), d !== e ? (Ne(), t.charCodeAt(i) === 61 ? (y = h, i++) : (y = e, P === 0 && E(Oe)), y !== e ? (Ne(), S = Ia(), S !== e ? (De = s, s = hi(d, S)) : (i = s, s = e)) : (i = s, s = e)) : (i = s, s = e), s;
5636
5637
  }
5637
- function Yi() {
5638
+ function Bi() {
5638
5639
  var s;
5639
5640
  return s = Ht(), s === e && (s = rr()), s;
5640
5641
  }
@@ -5650,7 +5651,7 @@ function qf(t, a) {
5650
5651
  y = [y, S], d = y;
5651
5652
  } else
5652
5653
  i = d, d = e;
5653
- return d !== e ? s = t.substring(s, i) : s = d, P--, s === e && (d = e, P === 0 && E(Y)), s;
5654
+ return d !== e ? s = t.substring(s, i) : s = d, P--, s === e && (d = e, P === 0 && E(B)), s;
5654
5655
  }
5655
5656
  function Js() {
5656
5657
  var s, d, y, S, $, z, X, ge, tt, Ze;
@@ -5707,9 +5708,9 @@ function qf(t, a) {
5707
5708
  }
5708
5709
  function Qs() {
5709
5710
  var s, d, y;
5710
- return s = i, t.charCodeAt(i) === 92 ? (d = ee, i++) : (d = e, P === 0 && E(Ge)), d !== e ? (y = Bi(), y !== e ? (De = s, s = xi(y)) : (i = s, s = e)) : (i = s, s = e), s === e && (s = t.charAt(i), ze.test(s) ? i++ : (s = e, P === 0 && E(Ke))), s;
5711
+ return s = i, t.charCodeAt(i) === 92 ? (d = ee, i++) : (d = e, P === 0 && E(Ge)), d !== e ? (y = Yi(), y !== e ? (De = s, s = xi(y)) : (i = s, s = e)) : (i = s, s = e), s === e && (s = t.charAt(i), ze.test(s) ? i++ : (s = e, P === 0 && E(Ke))), s;
5711
5712
  }
5712
- function Bi() {
5713
+ function Yi() {
5713
5714
  var s, d, y, S, $, z, X, ge;
5714
5715
  return s = i, t.charCodeAt(i) === 34 ? (d = re, i++) : (d = e, P === 0 && E(Pe)), d !== e && (De = s, d = Ai()), s = d, s === e && (s = i, t.charCodeAt(i) === 92 ? (d = ee, i++) : (d = e, P === 0 && E(Ge)), d !== e && (De = s, d = wi()), s = d, s === e && (s = i, t.charCodeAt(i) === 110 ? (d = H, i++) : (d = e, P === 0 && E(ot)), d !== e && (De = s, d = Si()), s = d, s === e && (s = i, t.charCodeAt(i) === 114 ? (d = Z, i++) : (d = e, P === 0 && E(kt)), d !== e && (De = s, d = Li()), s = d, s === e && (s = i, t.charCodeAt(i) === 116 ? (d = ae, i++) : (d = e, P === 0 && E(ct)), d !== e && (De = s, d = ki()), s = d, s === e && (s = i, t.charCodeAt(i) === 117 ? (d = W, i++) : (d = e, P === 0 && E(_t)), d !== e ? (y = i, S = i, $ = t.charAt(i), ve.test($) ? i++ : ($ = e, P === 0 && E(et)), $ !== e ? (z = t.charAt(i), ve.test(z) ? i++ : (z = e, P === 0 && E(et)), z !== e ? (X = t.charAt(i), ve.test(X) ? i++ : (X = e, P === 0 && E(et)), X !== e ? (ge = t.charAt(i), ve.test(ge) ? i++ : (ge = e, P === 0 && E(et)), ge !== e ? ($ = [$, z, X, ge], S = $) : (i = S, S = e)) : (i = S, S = e)) : (i = S, S = e)) : (i = S, S = e), S !== e ? y = t.substring(y, i) : y = S, y !== e ? (De = s, s = Mi(y)) : (i = s, s = e)) : (i = s, s = e), s === e && (s = i, t.length > i ? (d = t.charAt(i), i++) : (d = e, P === 0 && E(Je)), d !== e && (De = s, d = Ci(d)), s = d)))))), s;
5715
5716
  }
@@ -6108,7 +6109,7 @@ function nd(t, a, e) {
6108
6109
  function ld(t, a, e) {
6109
6110
  if (Ns.set(t, a), e) {
6110
6111
  const r = t.querySelector(".bc-frame .bc-frame-body");
6111
- r && It(r), Yt(t, e);
6112
+ r && It(r), Bt(t, e);
6112
6113
  }
6113
6114
  }
6114
6115
  function Fn(t) {
@@ -6209,7 +6210,7 @@ export {
6209
6210
  eo as J,
6210
6211
  _f as K,
6211
6212
  We as L,
6212
- Yt as M,
6213
+ Bt as M,
6213
6214
  Jl as N,
6214
6215
  Ct as O,
6215
6216
  Kl as P,