@silurus/ooxml 0.89.7 → 0.89.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +9 -3
  2. package/dist/assets/render-worker-CSJJ7vFD.js +15 -0
  3. package/dist/assets/render-worker-Ck21oePL.js +16 -0
  4. package/dist/assets/render-worker-jGsxSIGb.js +35 -0
  5. package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
  6. package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
  7. package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
  8. package/dist/chart-ex.mjs +367 -367
  9. package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-b3tKmzMa.js} +29 -25
  10. package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-BlgDzQx_.js} +3 -3
  11. package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-Bp37ytDC.js} +3 -3
  12. package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-BlMfm6po.js} +37 -37
  13. package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-_G-DIh2T.js} +17071 -13819
  14. package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
  15. package/dist/{docx-BWyACb-n.js → docx-DE-Di6SH.js} +33 -33
  16. package/dist/{docx-BgCQiuuN.js → docx-Do90Z4L7.js} +593 -593
  17. package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-zYIufUjR.js} +6 -6
  18. package/dist/docx.mjs +4 -4
  19. package/dist/docx_parser_bg.wasm +0 -0
  20. package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
  21. package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
  22. package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
  23. package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
  24. package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
  25. package/dist/{host-layout-measure-CXKOWA5J.js → host-layout-measure-IFLllYwV.js} +1 -1
  26. package/dist/index.mjs +3 -3
  27. package/dist/internal-companion.mjs +2 -2
  28. package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
  29. package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
  30. package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
  31. package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
  32. package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
  33. package/dist/node.mjs +5 -5
  34. package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
  35. package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
  36. package/dist/{pptx-CfCiVlNB.js → pptx-DbjWegUB.js} +283 -266
  37. package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
  38. package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
  39. package/dist/pptx.mjs +5 -5
  40. package/dist/pptx_parser_bg.wasm +0 -0
  41. package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-DLNioq7T.js} +6 -6
  42. package/dist/region-map.mjs +39 -39
  43. package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
  44. package/dist/{render-worker-host-CZHIKTtZ.js → render-worker-host-CVr53kg0.js} +1 -1
  45. package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-EgUrirnQ.js} +1 -1
  46. package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-pKls3F_t.js} +1 -1
  47. package/dist/renderer-DpTePxGq.js +5887 -0
  48. package/dist/{renderer-B4KIpz-2.js → renderer-DuYC3xXi.js} +1336 -1224
  49. package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
  50. package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
  51. package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
  52. package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
  53. package/dist/three-d.mjs +678 -678
  54. package/dist/types/chart-ex.d.ts +5 -2
  55. package/dist/types/docx.d.ts +30 -8
  56. package/dist/types/index.d.ts +37 -12
  57. package/dist/types/node.d.ts +28 -6
  58. package/dist/types/pptx.d.ts +13 -7
  59. package/dist/types/region-map.d.ts +5 -2
  60. package/dist/types/three-d.d.ts +5 -2
  61. package/dist/types/xlsx.d.ts +10 -7
  62. package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
  63. package/dist/{workbook-model-source-J9ir5Kov.js → workbook-model-source-D1dmkDMP.js} +6 -6
  64. package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
  65. package/dist/{xlsx-BbQ7RcNc.js → xlsx-DA0uR1B1.js} +44 -44
  66. package/dist/{xlsx-ClQiNSrr.js → xlsx-DBhYlJKp.js} +728 -716
  67. package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-zemVDAfl.js} +36 -36
  68. package/dist/xlsx.mjs +5 -5
  69. package/dist/xlsx_parser_bg.wasm +0 -0
  70. package/package.json +1 -1
  71. package/dist/assets/render-worker-B3hF7Akg.js +0 -35
  72. package/dist/assets/render-worker-B5HWxkbU.js +0 -16
  73. package/dist/assets/render-worker-DNGf06QT.js +0 -15
  74. package/dist/renderer-xdugdcMd.js +0 -5769
package/dist/three-d.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  // optional-renderer: packages/core/src/chart/three-d-renderer.ts
2
- import { $a as e, Ba as t, Bi as n, Ca as r, Cn as i, Fi as a, Ga as o, Ha as s, Ii as c, Ja as l, Ji as u, Ka as d, Ki as f, Li as p, Ln as m, Nt as h, Ot as g, Pi as _, Ra as v, Ri as y, Rn as b, Rr as x, Sa as S, Si as C, Ui as w, Va as T, Vi as E, Wa as D, Wi as O, Xi as k, Yi as A, Zi as j, _a as M, bn as N, ca as P, da as F, ea as I, eo as L, fa as R, gi as z, ha as B, hi as V, ia as H, ja as U, ka as W, l as ee, la as G, ma as K, mi as te, n as q, na as ne, no as J, oa as Y, on as X, pa as re, qi as Z, qt as ie, sa as ae, sn as oe, sr as se, t as ce, ta as le, v as ue, va as de, vi as fe, vn as pe, xa as me, xn as he, xt as ge, ya as _e, yn as ve, za as ye, zi as be, zn as xe, zr as Se } from "./plot-area-frame-D3JtHvov.js";
3
- import { a as Ce, c as we, i as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, y as Fe } from "./three-d-ByHGsYrX.js";
2
+ import { $a as e, $i as t, Bi as n, Ca as r, Ci as i, Cn as a, Da as o, Di as s, Ea as c, Ga as l, Gi as u, Hi as d, Ia as f, Ji as p, Ka as m, Ki as h, Ln as g, Nt as _, Oa as v, Ot as y, Pa as b, Qi as x, Rn as S, Rr as C, Sa as w, Ua as T, Ui as E, Vi as D, Wa as O, Wi as k, Xa as A, Ya as j, Yi as M, Za as N, Zi as P, _a as F, aa as I, ao as L, ba as R, bi as z, bn as B, da as V, ea as H, fa as U, ga as ee, io as te, l as W, la as G, ma as K, n as q, na as J, oa as Y, on as ne, pa as X, qa as Z, qt as re, sa as ie, sn as ae, so as oe, sr as se, t as ce, ta as le, v as ue, va as de, vn as fe, wa as pe, xi as me, xn as he, xt as ge, ya as _e, yi as ve, yn as ye, zi as be, zn as xe, zr as Se } from "./plot-area-frame-DNYMd9Pf.js";
3
+ import { a as Ce, c as we, i as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, y as Fe } from "./three-d-BfMZVR0w.js";
4
4
  import { t as Ie } from "./renderer-module-contract-BuTx2FWJ.js";
5
- function Le(t, n, r, i) {
6
- return e(t, i) ? r : n.chartexFormatIdx ?? i;
5
+ function Le(e, t, n, r) {
6
+ return te(e, r) ? n : t.chartexFormatIdx ?? r;
7
7
  }
8
- function Re(e, n, r, i, a) {
9
- let o = Le(e, n, i, a), c = l(e, "dataPoint3D", a), u = J(e, "dataPoint3D"), d = v(r?.chartexStyle, u, i);
10
- if (d !== void 0) return d;
8
+ function Re(t, n, r, i, a) {
9
+ let o = Le(t, n, i, a), s = e(t, "dataPoint3D", a), c = oe(t, "dataPoint3D"), u = T(r?.chartexStyle, c, i);
10
+ if (u !== void 0) return u;
11
11
  if (r?.fillHidden === !0) {
12
- let e = t(u);
12
+ let e = l(c);
13
13
  if (e !== void 0) return e;
14
14
  }
15
15
  if (r?.color === "00000000") return null;
@@ -17,8 +17,8 @@ function Re(e, n, r, i, a) {
17
17
  fillType: "solid",
18
18
  color: r.color
19
19
  };
20
- let f = v(n.chartexStyle, u, o);
21
- return f === void 0 ? s(c, u, o, r?.chartexStyle, n.chartexStyle) : f;
20
+ let d = T(n.chartexStyle, c, o);
21
+ return d === void 0 ? Z(s, c, o, r?.chartexStyle, n.chartexStyle) : d;
22
22
  }
23
23
  var ze = 32;
24
24
  function Be(e) {
@@ -877,7 +877,7 @@ function yt(e) {
877
877
  return t;
878
878
  }
879
879
  function bt(e, t, n) {
880
- let r = H(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
880
+ let r = G(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
881
881
  return {
882
882
  fontPx: r,
883
883
  font: `${t?.fontItalic ?? e.legendFontItalic ?? !1 ? "italic " : ""}${a ? "bold " : ""}${r}px ${Lt(e, i)}`,
@@ -891,7 +891,7 @@ var xt = [
891
891
  "A5A5A5",
892
892
  "FFC000",
893
893
  "5B9BD5"
894
- ], St = oe, Ct = X, wt = new Set([
894
+ ], St = ae, Ct = ne, wt = new Set([
895
895
  "line",
896
896
  "stackedLine",
897
897
  "stackedLinePct",
@@ -906,7 +906,7 @@ var xt = [
906
906
  "stackedBarHPct"
907
907
  ]);
908
908
  function Tt(e, t) {
909
- let n = Number.isFinite(t) && t > 0 ? t / U : 1, r = Number.isFinite(e) && e >= 0 ? e / W : 0;
909
+ let n = Number.isFinite(t) && t > 0 ? t / f : 1, r = Number.isFinite(e) && e >= 0 ? e / b : 0;
910
910
  return Math.max(.25, r) * n;
911
911
  }
912
912
  function Et(e, t) {
@@ -920,9 +920,9 @@ function Et(e, t) {
920
920
  var Dt = (e, t) => `#${t?.color ?? xt[e % xt.length]}`;
921
921
  function Ot(e, t, n) {
922
922
  let r = 0;
923
- for (let i of e) for (let e of [t(i), n(i)]) {
923
+ for (let a of e) for (let e of [t(a), n(a)]) {
924
924
  if (e == null) continue;
925
- let t = fe(e);
925
+ let t = i(e);
926
926
  if (e.fillType === "gradient" && t > St || t > Ct - r) return !1;
927
927
  r += t;
928
928
  }
@@ -964,7 +964,7 @@ function Mt(e) {
964
964
  [e.threeD?.sideWall, "wall"],
965
965
  [e.threeD?.backWall, "wall"]
966
966
  ]) {
967
- let i = d(e, n, r);
967
+ let i = N(e, n, r);
968
968
  t.push({
969
969
  fill: i.fill,
970
970
  line: i.line
@@ -1057,28 +1057,28 @@ function Nt(e, t) {
1057
1057
  };
1058
1058
  }
1059
1059
  function $(t, n, r, i, a, o = !0) {
1060
- let s = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : Dt(a, n), c = e(t, a) ? i : n.chartexFormatIdx ?? a, u = n.seriesType ?? t.chartType, d = u === "line" || u === "stackedLine" || u === "stackedLinePct", f = l(t, "dataPoint3D", a), p = J(t, "dataPoint3D"), m, h = s, g = Re(t, n, r, i, a);
1061
- g !== void 0 && ({color: h, fill: m} = Nt(g, h));
1062
- let _, v = null, y = ye(r?.chartexStyle, p, i);
1063
- if (y === void 0 && r?.lineHidden === !0 && (y = T(p)), y !== void 0) y?.fillType === "solid" ? v = `#${y.color}` : _ = y;
1060
+ let s = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : Dt(a, n), c = te(t, a) ? i : n.chartexFormatIdx ?? a, l = n.seriesType ?? t.chartType, u = l === "line" || l === "stackedLine" || l === "stackedLinePct", d = e(t, "dataPoint3D", a), f = oe(t, "dataPoint3D"), p, h = s, g = Re(t, n, r, i, a);
1061
+ g !== void 0 && ({color: h, fill: p} = Nt(g, h));
1062
+ let _, v = null, y = O(r?.chartexStyle, f, i);
1063
+ if (y === void 0 && r?.lineHidden === !0 && (y = m(f)), y !== void 0) y?.fillType === "solid" ? v = `#${y.color}` : _ = y;
1064
1064
  else if (r?.lineColor) v = `#${r.lineColor}`;
1065
1065
  else {
1066
- let e = ye(n.chartexStyle, p, c);
1067
- if (e === void 0 && n.lineHidden === !0 && (e = T(p)), e !== void 0) e?.fillType === "solid" ? v = `#${e.color}` : _ = e;
1066
+ let e = O(n.chartexStyle, f, c);
1067
+ if (e === void 0 && n.lineHidden === !0 && (e = m(f)), e !== void 0) e?.fillType === "solid" ? v = `#${e.color}` : _ = e;
1068
1068
  else if (n.lineColor) v = `#${n.lineColor}`;
1069
- else if (d) _ = m === null ? null : m;
1069
+ else if (u) _ = p === null ? null : p;
1070
1070
  else {
1071
- let e = D(f, p, c, r?.chartexStyle, n.chartexStyle);
1071
+ let e = j(d, f, c, r?.chartexStyle, n.chartexStyle);
1072
1072
  e !== void 0 && (e?.fillType === "solid" ? v = `#${e.color}` : _ = e);
1073
1073
  }
1074
1074
  }
1075
- let b = d ? void 0 : f, x = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? b?.lineCap, S = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? b?.lineJoin, C = L(r?.lineDash == null ? r?.chartexStyle : {
1075
+ let b = u ? void 0 : d, x = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? b?.lineCap, S = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? b?.lineJoin, C = L(r?.lineDash == null ? r?.chartexStyle : {
1076
1076
  lineDash: r.lineDash,
1077
1077
  lineDashAuthored: !0
1078
1078
  }, n.chartexStyle, b);
1079
1079
  return {
1080
1080
  color: h,
1081
- fill: m,
1081
+ fill: p,
1082
1082
  lineColor: v,
1083
1083
  lineFill: _,
1084
1084
  lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? b?.lineWidthEmu,
@@ -1411,52 +1411,52 @@ function Zt(e) {
1411
1411
  return Math.max(e * 1.2, 10);
1412
1412
  }
1413
1413
  function Qt(e, t) {
1414
- let n = Math.max(1, ...e.map(R));
1414
+ let n = Math.max(1, ...e.map(F));
1415
1415
  return n > 1 ? (n - 1) * Zt(t) : 0;
1416
1416
  }
1417
1417
  function $t(e, t, n, r, i, a = 1, o = 6, s = 0) {
1418
1418
  if (i || r === 0) {
1419
- e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", B(e, t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o), s);
1419
+ e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", R(e, t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o), s);
1420
1420
  return;
1421
1421
  }
1422
- e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", B(e, t, 0, 0, s), e.restore();
1422
+ e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", R(e, t, 0, 0, s), e.restore();
1423
1423
  }
1424
- function en(e, t, n, r, i, a, o, s = void 0, c = 0, l = U, u = void 0, d = void 0, f = 0, p = f, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0) {
1424
+ function en(e, t, n, r, i, a, o, s = void 0, c = 0, l = f, u = void 0, d = void 0, p = 0, m = p, h = void 0, g = void 0, _ = void 0, v = void 0, y = void 0) {
1425
1425
  if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
1426
- let y = r / 2;
1426
+ let b = r / 2;
1427
1427
  if (u !== void 0 || d !== void 0) {
1428
- b(e, u, d, f, {
1429
- x: t.x - y,
1430
- y: t.y - y,
1428
+ S(e, u, d, p, {
1429
+ x: t.x - b,
1430
+ y: t.y - b,
1431
1431
  w: r,
1432
1432
  h: r
1433
- }, l, (e) => en(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, m, h, g, _, v), p);
1433
+ }, l, (e) => en(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, h, g, _, v, y), m);
1434
1434
  return;
1435
1435
  }
1436
1436
  e.beginPath();
1437
- let S = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : se(m, e, t.x - y, t.y - y, r, r, c);
1438
- switch (S && (e.strokeStyle = S, e.lineWidth = o, e.setLineDash(x(g, h, o)), e.lineCap = _ === "rnd" ? "round" : _ === "sq" ? "square" : "butt", e.lineJoin = v === "round" || v === "bevel" ? v : "miter"), n) {
1437
+ let x = h === void 0 ? a : h == null ? null : h.fillType === "solid" ? `#${h.color}` : se(h, e, t.x - b, t.y - b, r, r, c);
1438
+ switch (x && (e.strokeStyle = x, e.lineWidth = o, e.setLineDash(C(_, g, o)), e.lineCap = v === "rnd" ? "round" : v === "sq" ? "square" : "butt", e.lineJoin = y === "round" || y === "bevel" ? y : "miter"), n) {
1439
1439
  case "square":
1440
- e.rect(t.x - y, t.y - y, r, r);
1440
+ e.rect(t.x - b, t.y - b, r, r);
1441
1441
  break;
1442
1442
  case "diamond":
1443
- e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y), e.lineTo(t.x, t.y + y), e.lineTo(t.x - y, t.y), e.closePath();
1443
+ e.moveTo(t.x, t.y - b), e.lineTo(t.x + b, t.y), e.lineTo(t.x, t.y + b), e.lineTo(t.x - b, t.y), e.closePath();
1444
1444
  break;
1445
1445
  case "triangle":
1446
- e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y + y), e.lineTo(t.x - y, t.y + y), e.closePath();
1446
+ e.moveTo(t.x, t.y - b), e.lineTo(t.x + b, t.y + b), e.lineTo(t.x - b, t.y + b), e.closePath();
1447
1447
  break;
1448
1448
  case "x":
1449
1449
  case "plus": {
1450
1450
  let r = n === "x";
1451
- e.moveTo(t.x - y, t.y + (r ? -y : 0)), e.lineTo(t.x + y, t.y + (r ? y : 0)), e.moveTo(t.x + (r ? -y : 0), t.y + y), e.lineTo(t.x + (r ? y : 0), t.y - y), S && e.stroke();
1451
+ e.moveTo(t.x - b, t.y + (r ? -b : 0)), e.lineTo(t.x + b, t.y + (r ? b : 0)), e.moveTo(t.x + (r ? -b : 0), t.y + b), e.lineTo(t.x + (r ? b : 0), t.y - b), x && e.stroke();
1452
1452
  return;
1453
1453
  }
1454
1454
  case "dash":
1455
- e.rect(t.x - y, t.y - r * .1, r, r * .2);
1455
+ e.rect(t.x - b, t.y - r * .1, r, r * .2);
1456
1456
  break;
1457
1457
  case "star":
1458
1458
  for (let n = 0; n < 10; n++) {
1459
- let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? y : y * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1459
+ let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? b : b * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
1460
1460
  n ? e.lineTo(a, o) : e.moveTo(a, o);
1461
1461
  }
1462
1462
  e.closePath();
@@ -1465,68 +1465,68 @@ function en(e, t, n, r, i, a, o, s = void 0, c = 0, l = U, u = void 0, d = void
1465
1465
  e.ellipse(t.x, t.y, r * .25, r * .1, 0, 0, Math.PI * 2);
1466
1466
  break;
1467
1467
  case "picture":
1468
- s?.fillType === "image" && ue(e, s, t.x - y, t.y - y, r, r, l, c), S && e.strokeRect(t.x - y, t.y - y, r, r);
1468
+ s?.fillType === "image" && ue(e, s, t.x - b, t.y - b, r, r, l, c), x && e.strokeRect(t.x - b, t.y - b, r, r);
1469
1469
  return;
1470
1470
  default:
1471
- e.arc(t.x, t.y, y, 0, Math.PI * 2);
1471
+ e.arc(t.x, t.y, b, 0, Math.PI * 2);
1472
1472
  break;
1473
1473
  }
1474
- let C = s?.fillType === "image" ? s : void 0, w = C ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : se(s, e, t.x - y, t.y - y, r, r, c);
1475
- w == null ? C && (e.save(), e.clip(), ue(e, C, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = w, e.fill()), S && e.stroke();
1474
+ let w = s?.fillType === "image" ? s : void 0, T = w ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : se(s, e, t.x - b, t.y - b, r, r, c);
1475
+ T == null ? w && (e.save(), e.clip(), ue(e, w, t.x - b, t.y - b, r, r, l, c), e.restore()) : (e.fillStyle = T, e.fill()), x && e.stroke();
1476
1476
  }
1477
- function tn(e, t, r, i, o, s, l, u, d, f = 0, m, h, g = "t", v = l, b = !0, x, S, C = s, w = 0) {
1478
- let T = h, D = r.seriesDataLabels;
1479
- if (p(D, T) || t.showDataLabelsOverMax !== !0 && S != null && Number.isFinite(S) && C > S) return;
1480
- let k = T?.showVal ?? D?.showVal ?? t.showDataLabels, A = T?.showCatName ?? D?.showCatName ?? !1, j = T?.showSerName ?? D?.showSerName ?? !1, M = T?.showPercent ?? D?.showPercent ?? !1, P = T?.text, F = N({
1477
+ function tn(e, t, r, i, a, o, s, c, l, f = 0, p, m, g = "t", _ = s, v = !0, y, x, S = o, C = 0) {
1478
+ let w = m, T = r.seriesDataLabels;
1479
+ if (d(T, w) || t.showDataLabelsOverMax !== !0 && x != null && Number.isFinite(x) && S > x) return;
1480
+ let O = w?.showVal ?? T?.showVal ?? t.showDataLabels, A = w?.showCatName ?? T?.showCatName ?? !1, j = w?.showSerName ?? T?.showSerName ?? !1, N = w?.showPercent ?? T?.showPercent ?? !1, P = w?.text, F = B({
1481
1481
  customText: P,
1482
1482
  showCategory: A,
1483
1483
  showSeries: j,
1484
- showValue: k,
1485
- showPercent: M,
1486
- category: r.categories?.[o] ?? t.categories[o] ?? `${o + 1}`,
1484
+ showValue: O,
1485
+ showPercent: N,
1486
+ category: r.categories?.[a] ?? t.categories[a] ?? `${a + 1}`,
1487
1487
  seriesName: r.name || `Series ${i + 1}`,
1488
- sourceValue: s,
1489
- valueDivisor: x?.divisor,
1490
- percentRatio: m != null && Number.isFinite(m) ? m : void 0,
1491
- formatCode: T?.formatCode ?? D?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1492
- percentFormatCode: T?.formatCode ?? D?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1488
+ sourceValue: o,
1489
+ valueDivisor: y?.divisor,
1490
+ percentRatio: p != null && Number.isFinite(p) ? p : void 0,
1491
+ formatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
1492
+ percentFormatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? "0%",
1493
1493
  date1904: t.date1904,
1494
- separator: T?.separator ?? D?.separator
1494
+ separator: w?.separator ?? T?.separator
1495
1495
  });
1496
1496
  if (!F) return;
1497
- let I = H(T?.fontSizeHpt ?? D?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, L = T?.fontBold ?? D?.fontBold ?? t.dataLabelFontBold ?? !1, R = y(T, D), z = Rt(t, T?.fontFace ?? D?.fontFace ?? t.dataLabelFontFace);
1497
+ let I = G(w?.fontSizeHpt ?? T?.fontSizeHpt ?? t.dataLabelFontSizeHpt, l) ?? 9 * l, L = w?.fontBold ?? T?.fontBold ?? t.dataLabelFontBold ?? !1, R = E(w, T), z = Rt(t, w?.fontFace ?? T?.fontFace ?? t.dataLabelFontFace);
1498
1498
  e.font = `${R.fontItalic ? "italic " : ""}${L ? "bold " : ""}${I}px ${z}`;
1499
- let B = `#${T?.fontColor ?? D?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, V = P && T?.richRuns?.length ? Fe(e, {
1500
- runs: T.richRuns,
1501
- ptToPx: d,
1499
+ let V = `#${w?.fontColor ?? T?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, H = P && w?.richRuns?.length ? Fe(e, {
1500
+ runs: w.richRuns,
1501
+ ptToPx: l,
1502
1502
  fontFamily: z,
1503
1503
  fallbackBold: L,
1504
1504
  fallbackItalic: R.fontItalic,
1505
1505
  fallbackBaseline: R.fontBaseline,
1506
1506
  fallbackColorHidden: R.fontPaintAuthored === !0 && (R.fontHidden === !0 || R.fontColor == null),
1507
1507
  fontFamilyForFace: (e) => Rt(t, e)
1508
- }, I, B) : null, U = V ? [] : be(F, Math.max(I, u.w * .45), Math.max(I * 1.2, u.h * .35), I * 1.2, (t) => e.measureText(t).width, R);
1509
- if (!V && !U.length) return;
1510
- let ee = V?.width ?? Math.max(...U.map((t) => e.measureText(t).width)), G = V?.height ?? U.length * I * 1.2, K = c(R, d), te = n(ee + K.left + K.right, G + K.top + K.bottom, R.textRotation, R.textVerticalMode), q = O({
1508
+ }, I, V) : null, U = H ? [] : k(F, Math.max(I, c.w * .45), Math.max(I * 1.2, c.h * .35), I * 1.2, (t) => e.measureText(t).width, R);
1509
+ if (!H && !U.length) return;
1510
+ let ee = H?.width ?? Math.max(...U.map((t) => e.measureText(t).width)), te = H?.height ?? U.length * I * 1.2, W = D(R, l), K = u(ee + W.left + W.right, te + W.top + W.bottom, R.textRotation, R.textVerticalMode), q = M({
1511
1511
  kind: "point",
1512
- x: l.x,
1513
- y: l.y,
1514
- position: T?.position ?? D?.position ?? t.dataLabelPosition ?? g,
1512
+ x: s.x,
1513
+ y: s.y,
1514
+ position: w?.position ?? T?.position ?? t.dataLabelPosition ?? g,
1515
1515
  markerGap: f
1516
- }, u, {
1517
- w: te.w,
1518
- h: te.h
1519
- }, I, T?.manualLayout, u);
1516
+ }, c, {
1517
+ w: K.w,
1518
+ h: K.h
1519
+ }, I, w?.manualLayout, c);
1520
1520
  if (!q) return;
1521
- let ne = pe(T?.labelBox, D?.labelBox);
1522
- D?.showLeaderLines && D.leaderLineHidden !== !0 && b && (e.beginPath(), e.moveTo(v.x, v.y), e.lineTo(Math.max(q.rect.x, Math.min(v.x, q.rect.x + q.rect.w)), Math.max(q.rect.y, Math.min(v.y, q.rect.y + q.rect.h))), e.strokeStyle = `#${D.leaderLineColor ?? "808080"}`, e.lineWidth = D.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, D.leaderLineWidthEmu / W * d), e.setLineDash(Se(D.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ve(e, ne, q.rect, d, w), e.save(), e.beginPath(), e.rect(q.clip.x, q.clip.y, q.clip.w, q.clip.h), e.clip();
1523
- let J = a(R, q.textAlign), Y = _(q.x, q.y, q.rect, G + K.top + K.bottom, R, T?.manualLayout != null, J, q.textAlign, ee + K.left + K.right, te.radians), X = E(e, Y.x, Y.y, te.radians, J, q.textBaseline, K);
1524
- if (V) {
1525
- Pe(e, V, X.x, X.y, J, q.textBaseline, T?.manualLayout ? Math.max(0, q.rect.w - K.left - K.right) : V.width), e.restore();
1521
+ let J = fe(w?.labelBox, T?.labelBox);
1522
+ T?.showLeaderLines && T.leaderLineHidden !== !0 && v && (e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(Math.max(q.rect.x, Math.min(_.x, q.rect.x + q.rect.w)), Math.max(q.rect.y, Math.min(_.y, q.rect.y + q.rect.h))), e.strokeStyle = `#${T.leaderLineColor ?? "808080"}`, e.lineWidth = T.leaderLineWidthEmu == null ? .75 * l : Math.max(.25, T.leaderLineWidthEmu / b * l), e.setLineDash(Se(T.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), ye(e, J, q.rect, l, C), e.save(), e.beginPath(), e.rect(q.clip.x, q.clip.y, q.clip.w, q.clip.h), e.clip();
1523
+ let Y = n(R, q.textAlign), ne = be(q.x, q.y, q.rect, te + W.top + W.bottom, R, w?.manualLayout != null, Y, q.textAlign, ee + W.left + W.right, K.radians), X = h(e, ne.x, ne.y, K.radians, Y, q.textBaseline, W);
1524
+ if (H) {
1525
+ Pe(e, H, X.x, X.y, Y, q.textBaseline, w?.manualLayout ? Math.max(0, q.rect.w - W.left - W.right) : H.width), e.restore();
1526
1526
  return;
1527
1527
  }
1528
1528
  if (!(R.fontPaintAuthored === !0 && (R.fontHidden === !0 || R.fontColor == null))) {
1529
- e.fillStyle = B, e.textAlign = J, e.textBaseline = "middle";
1529
+ e.fillStyle = V, e.textAlign = Y, e.textBaseline = "middle";
1530
1530
  let t = I * 1.2, n = (R.fontBaseline ?? 0) * I, r = X.y - (U.length - 1) * t / 2 - n;
1531
1531
  U.forEach((n, i) => e.fillText(n, X.x, r + i * t));
1532
1532
  }
@@ -1534,104 +1534,104 @@ function tn(e, t, r, i, o, s, l, u, d, f = 0, m, h, g = "t", v = l, b = !0, x, S
1534
1534
  }
1535
1535
  function nn(e, t, n) {
1536
1536
  let r = t.seriesDataLabels;
1537
- return p(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1538
- }
1539
- function rn(e, t, n, r, i, a) {
1540
- let o = j(t, n.h, r), s = t.titleRichRuns?.length ? {
1541
- ...o,
1542
- bandH: o.bandH + G(t.title, o.fontPx)
1543
- } : o;
1544
- if (t.title) {
1545
- e.font = `${t.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${Lt(t, t.titleFontFace)}`, e.fillStyle = t.titleFontColor ? `#${t.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1546
- let r = M(e, t.title), i = {
1547
- x: n.x + (n.w - r) / 2,
1548
- y: n.y + s.topPad,
1549
- w: r,
1550
- h: Math.max(1, s.fontPx) + G(t.title, s.fontPx)
1551
- }, a = t.titleManualLayout ? P({
1552
- ...t.titleManualLayout,
1537
+ return d(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
1538
+ }
1539
+ function rn(e, n, r, i, a, o) {
1540
+ let s = J(n, r.h, i), c = n.titleRichRuns?.length ? {
1541
+ ...s,
1542
+ bandH: s.bandH + K(n.title, s.fontPx)
1543
+ } : s;
1544
+ if (n.title) {
1545
+ e.font = `${n.titleFontBold === !1 ? "" : "bold "}${c.fontPx}px ${Lt(n, n.titleFontFace)}`, e.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
1546
+ let t = w(e, n.title), i = {
1547
+ x: r.x + (r.w - t) / 2,
1548
+ y: r.y + c.topPad,
1549
+ w: t,
1550
+ h: Math.max(1, c.fontPx) + K(n.title, c.fontPx)
1551
+ }, a = n.titleManualLayout ? X({
1552
+ ...n.titleManualLayout,
1553
1553
  w: void 0,
1554
1554
  h: void 0
1555
- }, n, i) : null;
1556
- B(e, t.title, a ? a.x + a.w / 2 : n.x + n.w / 2, a?.y ?? i.y, s.fontPx);
1555
+ }, r, i) : null;
1556
+ R(e, n.title, a ? a.x + a.w / 2 : r.x + r.w / 2, a?.y ?? i.y, c.fontPx);
1557
1557
  }
1558
- let c = yt(t);
1558
+ let l = yt(n);
1559
1559
  e.save();
1560
- let l = (t.chartType === "pie" ? t.series[0]?.categories?.length ? t.series[0].categories : t.categories : t.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => c.get(t)?.deleted === !0 ? [] : [{
1560
+ let u = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => l.get(t)?.deleted === !0 ? [] : [{
1561
1561
  label: e,
1562
1562
  index: t
1563
- }]), d = l.map((e) => bt(t, c.get(e.index), r)), p = Math.max(0, ...d.map((e) => e.fontPx)), m = l.map((t, n) => (e.font = d[n].font, 7 * r + 4 + M(e, t.label))), h = ne(t, n.w, n.h, {
1564
- itemWidths: m,
1565
- rowHeight: Math.max(p * 1.45, 12) + Qt(l.map((e) => e.label), p),
1563
+ }]), d = u.map((e) => bt(n, l.get(e.index), i)), f = Math.max(0, ...d.map((e) => e.fontPx)), p = u.map((t, n) => (e.font = d[n].font, 7 * i + 4 + w(e, t.label))), m = ie(n, r.w, r.h, {
1564
+ itemWidths: p,
1565
+ rowHeight: Math.max(f * 1.45, 12) + Qt(u.map((e) => e.label), f),
1566
1566
  itemGap: 12,
1567
1567
  horizontalPadding: 8,
1568
1568
  verticalPadding: 4
1569
1569
  });
1570
1570
  e.restore();
1571
- let g = le(h, t.legendOverlay === !0), _ = I(t, n.w, n.h, r), v = k(t.catAxisTitleTextVerticalInsetEmu, r), y = k(t.valAxisTitleTextVerticalInsetEmu, r), b = i === "horizontal" ? t.catAxisTitle ? _.catFontPx + v + u(n.w) + 4 + f(t.catAxisTitle, _.catFontPx, "left", t.catAxisTitleRotation, t.catAxisTitleVerticalMode) : 0 : i === "vertical" ? _.valBandW : 0, x = i === "horizontal" ? t.valAxisTitle ? _.valFontPx + y + u(n.h) + 4 + f(t.valAxisTitle, _.valFontPx, "horizontal", t.valAxisTitleRotation, t.valAxisTitleVerticalMode) : 0 : i === "vertical" ? _.catBandH : 0, S = Y(t, n.x, n.y, n.w, n.h, r, {
1572
- titleBand: s,
1573
- legendReserve: h,
1571
+ let h = Y(m, n.legendOverlay === !0), g = I(n, r.w, r.h, i), _ = le(n.catAxisTitleTextVerticalInsetEmu, i), v = le(n.valAxisTitleTextVerticalInsetEmu, i), y = a === "horizontal" ? n.catAxisTitle ? g.catFontPx + _ + t(r.w) + 4 + P(n.catAxisTitle, g.catFontPx, "left", n.catAxisTitleRotation, n.catAxisTitleVerticalMode) : 0 : a === "vertical" ? g.valBandW : 0, b = a === "horizontal" ? n.valAxisTitle ? g.valFontPx + v + t(r.h) + 4 + P(n.valAxisTitle, g.valFontPx, "horizontal", n.valAxisTitleRotation, n.valAxisTitleVerticalMode) : 0 : a === "vertical" ? g.catBandH : 0, x = V(n, r.x, r.y, r.w, r.h, i, {
1572
+ titleBand: c,
1573
+ legendReserve: m,
1574
1574
  pad: {
1575
- t: s.bandH + g.legTopH + n.h * .04,
1576
- r: g.legRightW + n.w * .05,
1577
- b: g.legBottomH + n.h * .19 + x,
1578
- l: g.legLeftW + n.w * .13 + b
1575
+ t: c.bandH + h.legTopH + r.h * .04,
1576
+ r: h.legRightW + r.w * .05,
1577
+ b: h.legBottomH + r.h * .19 + b,
1578
+ l: h.legLeftW + r.w * .13 + y
1579
1579
  },
1580
1580
  honorPlotAreaManualLayout: !0,
1581
1581
  manualOuterInsets: {
1582
- t: s.bandH,
1583
- r: g.legRightW,
1584
- b: g.legBottomH + x,
1585
- l: g.legLeftW + b
1582
+ t: c.bandH,
1583
+ r: h.legRightW,
1584
+ b: h.legBottomH + b,
1585
+ l: h.legLeftW + y
1586
1586
  }
1587
- }), C = {
1588
- x: S.plotRect.px0,
1589
- y: S.plotRect.py0,
1590
- w: Math.max(1, S.plotRect.pw),
1591
- h: Math.max(1, S.plotRect.ph)
1587
+ }), S = {
1588
+ x: x.plotRect.px0,
1589
+ y: x.plotRect.py0,
1590
+ w: Math.max(1, x.plotRect.pw),
1591
+ h: Math.max(1, x.plotRect.ph)
1592
1592
  };
1593
- ce(e, t, C.x, C.y, C.w, C.h, r, a);
1594
- let w = h ? h.side === "r" ? {
1595
- x: n.x + n.w - h.reserveW,
1596
- y: C.y,
1597
- w: h.reserveW,
1598
- h: C.h
1599
- } : h.side === "l" ? {
1600
- x: n.x,
1601
- y: C.y,
1602
- w: h.reserveW,
1603
- h: C.h
1604
- } : h.side === "t" ? {
1605
- x: n.x + 4,
1606
- y: n.y + s.bandH,
1607
- w: Math.max(1, n.w - 8),
1608
- h: h.reserveH
1593
+ ce(e, n, S.x, S.y, S.w, S.h, i, o);
1594
+ let C = m ? m.side === "r" ? {
1595
+ x: r.x + r.w - m.reserveW,
1596
+ y: S.y,
1597
+ w: m.reserveW,
1598
+ h: S.h
1599
+ } : m.side === "l" ? {
1600
+ x: r.x,
1601
+ y: S.y,
1602
+ w: m.reserveW,
1603
+ h: S.h
1604
+ } : m.side === "t" ? {
1605
+ x: r.x + 4,
1606
+ y: r.y + c.bandH,
1607
+ w: Math.max(1, r.w - 8),
1608
+ h: m.reserveH
1609
1609
  } : {
1610
- x: n.x + 4,
1611
- y: n.y + n.h - h.reserveH,
1612
- w: Math.max(1, n.w - 8),
1613
- h: h.reserveH
1610
+ x: r.x + 4,
1611
+ y: r.y + r.h - m.reserveH,
1612
+ w: Math.max(1, r.w - 8),
1613
+ h: m.reserveH
1614
1614
  } : null;
1615
1615
  return {
1616
- plot: C,
1617
- legend: (w && t.legendManualLayout ? P(t.legendManualLayout, n, w) : null) ?? w,
1616
+ plot: S,
1617
+ legend: (C && n.legendManualLayout ? X(n.legendManualLayout, r, C) : null) ?? C,
1618
1618
  legendMeasure: {
1619
- labels: l.map((e) => e.label),
1619
+ labels: u.map((e) => e.label),
1620
1620
  styles: d,
1621
- itemWidths: m
1621
+ itemWidths: p
1622
1622
  }
1623
1623
  };
1624
1624
  }
1625
1625
  function an(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1626
1626
  e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
1627
- let m = f ? t : on(e, t, p), h = A(i, u, d), g = r;
1627
+ let m = f ? t : on(e, t, p), h = H(i, u, d), g = r;
1628
1628
  if (f) {
1629
- let t = M(e, m), i = a + G(m, a), o = Math.abs(Math.cos(h)), s = Math.abs(Math.sin(h)), c = {
1629
+ let t = w(e, m), i = a + K(m, a), o = Math.abs(Math.cos(h)), s = Math.abs(Math.sin(h)), c = {
1630
1630
  x: r.x - (t * o + i * s) / 2,
1631
1631
  y: r.y - (t * s + i * o) / 2,
1632
1632
  w: t * o + i * s,
1633
1633
  h: t * s + i * o
1634
- }, l = P({
1634
+ }, l = X({
1635
1635
  ...f,
1636
1636
  w: void 0,
1637
1637
  h: void 0
@@ -1641,32 +1641,32 @@ function an(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
1641
1641
  y: l.y + l.h / 2
1642
1642
  });
1643
1643
  }
1644
- e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", B(e, m, 0, 0, a), e.restore();
1644
+ e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", R(e, m, 0, 0, a), e.restore();
1645
1645
  }
1646
1646
  function on(e, t, n) {
1647
- let r = re(t);
1648
- return r.length === 1 ? de(e, t, n) : r.map((t) => de(e, t, n)).join("\n");
1649
- }
1650
- function sn(e, t, n, r, i, a) {
1651
- if (t.valAxisTitle) {
1652
- let o = Z(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left", c = f(t.valAxisTitle, o, s, t.valAxisTitleRotation, t.valAxisTitleVerticalMode) / 2;
1653
- an(e, t.valAxisTitle, n, i ? {
1654
- x: r.x + r.w / 2,
1655
- y: r.y + r.h + u(n.h) + o / 2 + c
1647
+ let i = de(t);
1648
+ return i.length === 1 ? r(e, t, n) : i.map((t) => r(e, t, n)).join("\n");
1649
+ }
1650
+ function sn(e, n, r, i, a, o) {
1651
+ if (n.valAxisTitle) {
1652
+ let s = x(n.valAxisTitleFontSizeHpt, o), c = a ? "horizontal" : "left", l = P(n.valAxisTitle, s, c, n.valAxisTitleRotation, n.valAxisTitleVerticalMode) / 2;
1653
+ an(e, n.valAxisTitle, r, a ? {
1654
+ x: i.x + i.w / 2,
1655
+ y: i.y + i.h + t(r.h) + s / 2 + l
1656
1656
  } : {
1657
- x: r.x - u(n.w) - o / 2 - c,
1658
- y: r.y + r.h / 2
1659
- }, s, o, Rt(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
1660
- }
1661
- if (t.catAxisTitle) {
1662
- let o = Z(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal", c = f(t.catAxisTitle, o, s, t.catAxisTitleRotation, t.catAxisTitleVerticalMode) / 2;
1663
- an(e, t.catAxisTitle, n, i ? {
1664
- x: r.x - u(n.w) - o / 2 - c,
1665
- y: r.y + r.h / 2
1657
+ x: i.x - t(r.w) - s / 2 - l,
1658
+ y: i.y + i.h / 2
1659
+ }, c, s, Rt(n, n.valAxisTitleFontFace, "major"), n.valAxisTitleFontColor, n.valAxisTitleFontBold ?? !0, n.valAxisTitleFontItalic ?? !1, n.valAxisTitleRotation, n.valAxisTitleVerticalMode, n.valAxisTitleManualLayout, a ? i.w : i.h);
1660
+ }
1661
+ if (n.catAxisTitle) {
1662
+ let s = x(n.catAxisTitleFontSizeHpt, o), c = a ? "left" : "horizontal", l = P(n.catAxisTitle, s, c, n.catAxisTitleRotation, n.catAxisTitleVerticalMode) / 2;
1663
+ an(e, n.catAxisTitle, r, a ? {
1664
+ x: i.x - t(r.w) - s / 2 - l,
1665
+ y: i.y + i.h / 2
1666
1666
  } : {
1667
- x: r.x + r.w / 2,
1668
- y: r.y + r.h + u(n.h) + o / 2 + c
1669
- }, s, o, Rt(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
1667
+ x: i.x + i.w / 2,
1668
+ y: i.y + i.h + t(r.h) + s / 2 + l
1669
+ }, c, s, Rt(n, n.catAxisTitleFontFace, "major"), n.catAxisTitleFontColor, n.catAxisTitleFontBold ?? !0, n.catAxisTitleFontItalic ?? !1, n.catAxisTitleRotation, n.catAxisTitleVerticalMode, n.catAxisTitleManualLayout, a ? i.h : i.w);
1670
1670
  }
1671
1671
  }
1672
1672
  function cn(e, t, n, r, i, a, o, s, c, l, u) {
@@ -1680,109 +1680,109 @@ function cn(e, t, n, r, i, a, o, s, c, l, u) {
1680
1680
  }, b = {
1681
1681
  x: -y.y,
1682
1682
  y: y.x
1683
- }, x = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), S = {
1683
+ }, S = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), C = {
1684
1684
  x: (g.x + _.x) / 2,
1685
1685
  y: (g.y + _.y) / 2
1686
1686
  };
1687
- (S.x - x.x) * b.x + (S.y - x.y) * b.y < 0 && (b = {
1687
+ (C.x - S.x) * b.x + (C.y - S.y) * b.y < 0 && (b = {
1688
1688
  x: -b.x,
1689
1689
  y: -b.y
1690
1690
  }), (d.tickLabelPos === "low" && b.y < 0 || d.tickLabelPos === "high" && b.y > 0) && (b = {
1691
1691
  x: -b.x,
1692
1692
  y: -b.y
1693
1693
  }), d.lineHidden || (yn(e, _n(d.lineColor, d.lineWidthEmu, d.lineDash, u)), e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(_.x, _.y), e.stroke());
1694
- let C = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), w = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), T = d.majorTickMark ?? "out", E = H(d.fontSizeHpt, u) ?? 9 * u;
1695
- if (e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${E}px ${Rt(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.fontColor}` : "#595959", e.textAlign = Math.abs(b.x) < .2 ? "center" : b.x < 0 ? "right" : "left", e.textBaseline = Math.abs(b.y) < .2 ? "middle" : b.y < 0 ? "bottom" : "top", l && !d.lineHidden && T !== "none") {
1694
+ let w = Math.max(1, Math.floor(d.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(d.tickLabelSkip ?? 1)), E = d.majorTickMark ?? "out", D = G(d.fontSizeHpt, u) ?? 9 * u;
1695
+ if (e.font = `${d.fontItalic ? "italic " : ""}${d.fontBold ? "bold " : ""}${D}px ${Rt(t, d.fontFace)}`, e.fillStyle = d.fontColor ? `#${d.fontColor}` : "#595959", e.textAlign = Math.abs(b.x) < .2 ? "center" : b.x < 0 ? "right" : "left", e.textBaseline = Math.abs(b.y) < .2 ? "middle" : b.y < 0 ? "bottom" : "top", l && !d.lineHidden && E !== "none") {
1696
1696
  yn(e, vn(d.lineColor, d.lineWidthEmu, d.lineDash, u));
1697
1697
  let n = t.series.length;
1698
- for (let t = 0; t <= n; t += C) {
1699
- let i = t / n, a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a), s = 6 * u, c = T === "cross" ? s / 2 : T === "out" ? s : 0, l = T === "cross" ? s / 2 : T === "in" ? s : 0;
1698
+ for (let t = 0; t <= n; t += w) {
1699
+ let i = t / n, a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a), s = 6 * u, c = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "in" ? s : 0;
1700
1700
  e.beginPath(), e.moveTo(o.x + b.x * c, o.y + b.y * c), e.lineTo(o.x - b.x * l, o.y - b.y * l), e.stroke();
1701
1701
  }
1702
1702
  }
1703
1703
  for (let n = 0; n < t.series.length; n++) {
1704
1704
  let i = r.seriesDepth(n, t.series.length, !1), a = d.orientation === "maxMin" ? 1 - i : i, o = r.project(m, h, a);
1705
- if (!l && !d.lineHidden && n % C === 0 && T !== "none") {
1706
- let t = 6 * u, n = T === "cross" ? t / 2 : T === "out" ? t : 0, r = T === "cross" ? t / 2 : T === "in" ? t : 0;
1705
+ if (!l && !d.lineHidden && n % w === 0 && E !== "none") {
1706
+ let t = 6 * u, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
1707
1707
  e.beginPath(), e.moveTo(o.x + b.x * n, o.y + b.y * n), e.lineTo(o.x - b.x * r, o.y - b.y * r), e.stroke();
1708
1708
  }
1709
- d.tickLabelPos !== "none" && n % w === 0 && B(e, t.series[n].name || `Series ${n + 1}`, o.x + b.x * (6 * u + 3), o.y + b.y * (6 * u + 3), K(E));
1709
+ d.tickLabelPos !== "none" && n % T === 0 && R(e, t.series[n].name || `Series ${n + 1}`, o.x + b.x * (6 * u + 3), o.y + b.y * (6 * u + 3), _e(D));
1710
1710
  }
1711
1711
  if (e.setLineDash([]), d.title) {
1712
- let i = Z(d.titleFontSizeHpt, u), a = E + i + 12 + F(t.series.map((e, t) => e.name || `Series ${t + 1}`), K(E)) + G(d.title, i) / 2;
1712
+ let i = x(d.titleFontSizeHpt, u), a = D + i + 12 + ee(t.series.map((e, t) => e.name || `Series ${t + 1}`), _e(D)) + K(d.title, i) / 2;
1713
1713
  an(e, d.title, n, {
1714
- x: S.x + b.x * a,
1715
- y: S.y + b.y * a
1714
+ x: C.x + b.x * a,
1715
+ y: C.y + b.y * a
1716
1716
  }, "horizontal", i, Rt(t, d.titleFontFace, "major"), d.titleFontColor, d.titleFontBold ?? !0, d.titleFontItalic ?? !1, d.titleRotation, d.titleVerticalMode, d.titleManualLayout, Math.max(r.front.w, r.front.h));
1717
1717
  }
1718
1718
  }
1719
- function ln(e, t, n, r, i, a, c) {
1720
- let u = l(e, "dataPointMarker", i), d = J(e, "dataPointMarker"), f = t.chartexFormatIdx ?? i, p = v(n?.markerStyle, d, r), h = v(t.markerStyle, d, f), g = p !== void 0 || n?.markerFillPaint !== void 0 || n?.markerFill != null || n?.color != null || n?.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, _ = h !== void 0 || t.markerFillPaint !== void 0 || t.markerFill != null || t.markerFillPaintAuthored === !0 && t.markerStyle?.fillHidden !== !0, y = s(u, d, f), b = g ? p ?? n?.markerFillPaint : _ ? h ?? t.markerFillPaint : y, x = z(t, n, r, a), S = b;
1721
- b?.fillType === "solid" ? (x = b.color, S = void 0) : b === null && (x = "00000000");
1722
- let C = ye(n?.markerStyle, d, r), w = ye(t.markerStyle, d, f), T = C !== void 0 || n?.markerLine != null || n?.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, E = w !== void 0 || t.markerLine != null || t.markerLinePaintAuthored === !0 && t.markerStyle?.lineHidden !== !0, D = o(u, f), O = T ? C ?? (n?.markerLinePaintAuthored === !0 ? null : void 0) : E ? w ?? (t.markerLinePaintAuthored === !0 ? null : void 0) : D, k = n?.markerLine ?? t.markerLine ?? t.lineColor ?? a, A = O;
1723
- O?.fillType === "solid" ? (k = O.color, A = void 0) : O === null && (k = "00000000");
1724
- let j = n?.markerStyle ?? t.markerStyle ?? u, M = L(n?.markerStyle, t.markerStyle, u);
1719
+ function ln(t, n, r, i, a, o, s) {
1720
+ let c = e(t, "dataPointMarker", a), l = oe(t, "dataPointMarker"), u = n.chartexFormatIdx ?? a, d = T(r?.markerStyle, l, i), f = T(n.markerStyle, l, u), p = d !== void 0 || r?.markerFillPaint !== void 0 || r?.markerFill != null || r?.color != null || r?.markerFillPaintAuthored === !0 && r.markerStyle?.fillHidden !== !0, m = f !== void 0 || n.markerFillPaint !== void 0 || n.markerFill != null || n.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, h = Z(c, l, u), _ = p ? d ?? r?.markerFillPaint : m ? f ?? n.markerFillPaint : h, v = me(n, r, i, o), y = _;
1721
+ _?.fillType === "solid" ? (v = _.color, y = void 0) : _ === null && (v = "00000000");
1722
+ let x = O(r?.markerStyle, l, i), S = O(n.markerStyle, l, u), C = x !== void 0 || r?.markerLine != null || r?.markerLinePaintAuthored === !0 && r.markerStyle?.lineHidden !== !0, w = S !== void 0 || n.markerLine != null || n.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, E = A(c, u), D = C ? x ?? (r?.markerLinePaintAuthored === !0 ? null : void 0) : w ? S ?? (n.markerLinePaintAuthored === !0 ? null : void 0) : E, k = r?.markerLine ?? n.markerLine ?? n.lineColor ?? o, j = D;
1723
+ D?.fillType === "solid" ? (k = D.color, j = void 0) : D === null && (k = "00000000");
1724
+ let M = r?.markerStyle ?? n.markerStyle ?? c, N = L(r?.markerStyle, n.markerStyle, c);
1725
1725
  return {
1726
- fill: x,
1727
- fillPaint: S,
1726
+ fill: v,
1727
+ fillPaint: y,
1728
1728
  line: k,
1729
- linePaint: A,
1730
- lineWidth: (n?.markerLineWidthEmu ?? t.markerLineWidthEmu ?? j?.lineWidthEmu) == null ? Math.max(.75, c) : Math.max(.25, (n?.markerLineWidthEmu ?? t.markerLineWidthEmu ?? j?.lineWidthEmu ?? 0) / W * c),
1731
- lineDash: M?.lineDash,
1732
- lineCustomDash: M?.lineCustomDash,
1733
- lineCap: j?.lineCap,
1734
- lineJoin: j?.lineJoin,
1735
- effectDirect: m(n?.markerStyle, n?.chartexStyle, t.markerStyle),
1736
- effectFallback: u,
1737
- effectIndex: n?.markerStyle || n?.chartexStyle ? r : f,
1738
- effectFallbackIndex: f
1729
+ linePaint: j,
1730
+ lineWidth: (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? M?.lineWidthEmu) == null ? Math.max(.75, s) : Math.max(.25, (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? M?.lineWidthEmu ?? 0) / b * s),
1731
+ lineDash: N?.lineDash,
1732
+ lineCustomDash: N?.lineCustomDash,
1733
+ lineCap: M?.lineCap,
1734
+ lineJoin: M?.lineJoin,
1735
+ effectDirect: g(r?.markerStyle, r?.chartexStyle, n.markerStyle),
1736
+ effectFallback: c,
1737
+ effectIndex: r?.markerStyle || r?.chartexStyle ? i : u,
1738
+ effectFallbackIndex: u
1739
1739
  };
1740
1740
  }
1741
- function un(e, t, n, r, i, a, o, s, c, u, d, f) {
1742
- let p = $(t, n, r, i, a, f), h = Le(t, n, i, a), g = {
1743
- x: o,
1744
- y: s - c / 2,
1745
- w: c,
1746
- h: c
1741
+ function un(t, n, r, i, a, o, s, c, l, u, d, f) {
1742
+ let p = $(n, r, i, a, o, f), m = Le(n, r, a, o), h = {
1743
+ x: s,
1744
+ y: c - l / 2,
1745
+ w: l,
1746
+ h: l
1747
1747
  }, _ = (e) => {
1748
1748
  if (p.fill !== null) {
1749
- let t = p.fill === void 0 ? p.color : p.fill.fillType === "image" ? null : se(p.fill, e, g.x, g.y, g.w, g.h, d);
1750
- t && (e.fillStyle = t, e.fillRect(g.x, g.y, g.w, g.h));
1749
+ let t = p.fill === void 0 ? p.color : p.fill.fillType === "image" ? null : se(p.fill, e, h.x, h.y, h.w, h.h, d);
1750
+ t && (e.fillStyle = t, e.fillRect(h.x, h.y, h.w, h.h));
1751
1751
  }
1752
- let t = p.lineFill === void 0 ? p.lineColor : p.lineFill == null || p.lineFill.fillType === "image" ? null : se(p.lineFill, e, g.x, g.y, g.w, g.h, d);
1753
- t && (e.strokeStyle = t, e.lineWidth = p.lineWidthEmu == null ? .75 * u : Math.max(.25, p.lineWidthEmu / W * u), e.setLineDash(x(p.lineCustomDash, p.lineDash, e.lineWidth)), e.lineCap = p.lineCap, e.lineJoin = p.lineJoin, e.strokeRect(g.x, g.y, g.w, g.h), e.setLineDash([]));
1754
- }, v = m(r?.chartexStyle, n.chartexStyle);
1755
- b(e, v, l(t, "dataPoint3D", a), v === r?.chartexStyle ? i : h, g, u, _, h);
1752
+ let t = p.lineFill === void 0 ? p.lineColor : p.lineFill == null || p.lineFill.fillType === "image" ? null : se(p.lineFill, e, h.x, h.y, h.w, h.h, d);
1753
+ t && (e.strokeStyle = t, e.lineWidth = p.lineWidthEmu == null ? .75 * u : Math.max(.25, p.lineWidthEmu / b * u), e.setLineDash(C(p.lineCustomDash, p.lineDash, e.lineWidth)), e.lineCap = p.lineCap, e.lineJoin = p.lineJoin, e.strokeRect(h.x, h.y, h.w, h.h), e.setLineDash([]));
1754
+ }, v = g(i?.chartexStyle, r.chartexStyle);
1755
+ S(t, v, e(n, "dataPoint3D", o), v === i?.chartexStyle ? a : m, h, u, _, m);
1756
1756
  }
1757
- function dn(e, t, n, r, i, a, o, s, c, u) {
1758
- let d = $(t, n, void 0, r, r, !1), f = d.lineFill === void 0 ? d.lineColor == null ? d.fill : {
1757
+ function dn(t, n, r, i, a, o, s, c, l, u) {
1758
+ let d = $(n, r, void 0, i, i, !1), f = d.lineFill === void 0 ? d.lineColor == null ? d.fill : {
1759
1759
  fillType: "solid",
1760
1760
  color: d.lineColor.replace(/^#/, "")
1761
1761
  } : d.lineFill;
1762
1762
  if (f !== null) {
1763
- let i = d.lineWidthEmu == null ? Math.max(1, 2 * c) : Math.max(.5, d.lineWidthEmu / W * c), p = {
1764
- x: a,
1765
- y: o - i / 2,
1766
- w: s,
1767
- h: i
1768
- }, h = f === void 0 ? d.color : f.fillType === "image" ? null : f.fillType === "solid" ? `#${f.color}` : se(f, e, a, o - i / 2, s, i, u);
1769
- if (h) {
1770
- let g = (t) => {
1771
- t.beginPath(), t.moveTo(a, o), t.lineTo(a + s, o), t.strokeStyle = t === e ? h : f === void 0 ? d.color : f.fillType === "image" ? "rgba(0,0,0,0)" : f.fillType === "solid" ? `#${f.color}` : se(f, t, a, o - i / 2, s, i, u) ?? "rgba(0,0,0,0)", t.lineWidth = i, t.setLineDash(x(d.lineCustomDash, d.lineDash, i)), t.stroke(), t.setLineDash([]);
1772
- }, _ = Le(t, n, r, r);
1773
- b(e, m(n.chartexStyle), l(t, "dataPoint3D", r), _, p, c, g, _);
1763
+ let a = d.lineWidthEmu == null ? Math.max(1, 2 * l) : Math.max(.5, d.lineWidthEmu / b * l), p = {
1764
+ x: o,
1765
+ y: s - a / 2,
1766
+ w: c,
1767
+ h: a
1768
+ }, m = f === void 0 ? d.color : f.fillType === "image" ? null : f.fillType === "solid" ? `#${f.color}` : se(f, t, o, s - a / 2, c, a, u);
1769
+ if (m) {
1770
+ let h = (e) => {
1771
+ e.beginPath(), e.moveTo(o, s), e.lineTo(o + c, s), e.strokeStyle = e === t ? m : f === void 0 ? d.color : f.fillType === "image" ? "rgba(0,0,0,0)" : f.fillType === "solid" ? `#${f.color}` : se(f, e, o, s - a / 2, c, a, u) ?? "rgba(0,0,0,0)", e.lineWidth = a, e.setLineDash(C(d.lineCustomDash, d.lineDash, a)), e.stroke(), e.setLineDash([]);
1772
+ }, _ = Le(n, r, i, i);
1773
+ S(t, g(r.chartexStyle), e(n, "dataPoint3D", i), _, p, l, h, _);
1774
1774
  }
1775
1775
  }
1776
- if (n.showMarker !== !0 || n.markerSymbol === "none") return;
1777
- let p = n.markerSymbol ?? "circle", h = ln(t, n, void 0, r, r, i.replace(/^#/, ""), c);
1778
- en(e, {
1779
- x: a + s / 2,
1780
- y: o
1781
- }, p, Math.min(s, Math.max(2, (n.markerSize ?? 5) * c)), h.fill === "00000000" ? "transparent" : `#${h.fill.replace(/^#/, "")}`, h.line === "00000000" ? "rgba(0,0,0,0)" : `#${h.line.replace(/^#/, "")}`, h.lineWidth, h.fillPaint, u, c, h.effectDirect, h.effectFallback, h.effectIndex, h.effectFallbackIndex, h.linePaint, h.lineDash, h.lineCustomDash, h.lineCap, h.lineJoin);
1776
+ if (r.showMarker !== !0 || r.markerSymbol === "none") return;
1777
+ let p = r.markerSymbol ?? "circle", m = ln(n, r, void 0, i, i, a.replace(/^#/, ""), l);
1778
+ en(t, {
1779
+ x: o + c / 2,
1780
+ y: s
1781
+ }, p, Math.min(c, Math.max(2, (r.markerSize ?? 5) * l)), m.fill === "00000000" ? "transparent" : `#${m.fill.replace(/^#/, "")}`, m.line === "00000000" ? "rgba(0,0,0,0)" : `#${m.line.replace(/^#/, "")}`, m.lineWidth, m.fillPaint, u, l, m.effectDirect, m.effectFallback, m.effectIndex, m.effectFallbackIndex, m.linePaint, m.lineDash, m.lineCustomDash, m.lineCap, m.lineJoin);
1782
1782
  }
1783
1783
  function fn(e, t, n, r, i = !1, a, o = 0) {
1784
1784
  if (!n) return;
1785
- ie(e, t, n, r, o);
1785
+ re(e, t, n, r, o);
1786
1786
  let s = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), c = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
1787
1787
  let r = t.series[0]?.dataPointColors?.[n];
1788
1788
  return {
@@ -1802,38 +1802,38 @@ function fn(e, t, n, r, i = !1, a, o = 0) {
1802
1802
  seriesIndex: t
1803
1803
  })), l = yt(t), u = c.filter((e) => l.get(e.sourceIndex)?.deleted !== !0), d = a != null && a.labels.length === u.length && a.labels.every((e, t) => e === u[t].label), f = d ? a.styles : u.map((e) => bt(t, l.get(e.sourceIndex), r));
1804
1804
  e.textAlign = "left", e.textBaseline = "middle";
1805
- let p = Math.max(0, ...f.map((e) => e.fontPx)), m = Math.max(p * 1.45, 12), h = Math.min(7 * r, m * .7), g = m + Qt(u.map((e) => e.label), p);
1805
+ let m = Math.max(0, ...f.map((e) => e.fontPx)), h = Math.max(m * 1.45, 12), g = Math.min(7 * r, h * .7), _ = h + Qt(u.map((e) => e.label), m);
1806
1806
  if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
1807
- let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, h + 4 + M(e, t.label))), c = ae(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / g))), l = n.y + 2 + g / 2;
1807
+ let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, g + 4 + w(e, t.label))), c = U(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / _))), l = n.y + 2 + _ / 2;
1808
1808
  for (let a of c) {
1809
1809
  let c = a.map((e) => Math.min(n.w, s[e])), d = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, p = n.x + Math.max(4, (n.w - d) / 2);
1810
1810
  for (let n = 0; n < a.length; n++) {
1811
1811
  let s = a[n], d = u[s], m = f[s];
1812
1812
  e.font = m.font;
1813
- let g = Math.max(0, c[n] - h - 4);
1814
- !i && t.chartType.toLowerCase().includes("line") && d.series ? dn(e, t, d.series, d.seriesIndex, d.color, p, l, h, r, o) : d.series && un(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, p, l, h, r, o, i), e.fillStyle = m.color, B(e, d.label, p + h + 4, l, Zt(m.fontPx), g), p += c[n] + 12;
1813
+ let h = Math.max(0, c[n] - g - 4);
1814
+ !i && t.chartType.toLowerCase().includes("line") && d.series ? dn(e, t, d.series, d.seriesIndex, d.color, p, l, g, r, o) : d.series && un(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, p, l, g, r, o, i), e.fillStyle = m.color, R(e, d.label, p + g + 4, l, Zt(m.fontPx), h), p += c[n] + 12;
1815
1815
  }
1816
- l += g;
1816
+ l += _;
1817
1817
  }
1818
1818
  return;
1819
1819
  }
1820
- let _ = n.y;
1820
+ let v = n.y;
1821
1821
  for (let a = 0; a < u.length; a++) {
1822
1822
  let s = u[a], c = f[a];
1823
1823
  e.font = c.font;
1824
- let l = n.x + 8 + h, d = Math.max(0, n.x + n.w - 4 - l), p = Math.max(c.fontPx * 1.2, 10), g = re(s.label), v = (t) => w(t, d, p * (i ? 1 : 2), p, (t) => e.measureText(t).width), y = g.length === 1 ? v(s.label) : g.flatMap(v);
1825
- if (y.length === 0) continue;
1826
- let b = Math.max(m, y.length * p + 2);
1827
- if (_ + b > n.y + n.h + 1e-6) break;
1828
- let x = _ + b / 2;
1829
- !i && t.chartType.toLowerCase().includes("line") && s.series ? dn(e, t, s.series, s.seriesIndex, s.color, n.x + 4, x, h, r, o) : s.series && un(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, x, h, r, o, i), e.fillStyle = c.color;
1830
- let S = x - (y.length - 1) * p / 2;
1831
- y.forEach((t, n) => e.fillText(t, l, S + n * p)), _ += b;
1824
+ let l = n.x + 8 + g, d = Math.max(0, n.x + n.w - 4 - l), m = Math.max(c.fontPx * 1.2, 10), _ = de(s.label), y = (t) => p(t, d, m * (i ? 1 : 2), m, (t) => e.measureText(t).width), b = _.length === 1 ? y(s.label) : _.flatMap(y);
1825
+ if (b.length === 0) continue;
1826
+ let x = Math.max(h, b.length * m + 2);
1827
+ if (v + x > n.y + n.h + 1e-6) break;
1828
+ let S = v + x / 2;
1829
+ !i && t.chartType.toLowerCase().includes("line") && s.series ? dn(e, t, s.series, s.seriesIndex, s.color, n.x + 4, S, g, r, o) : s.series && un(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, S, g, r, o, i), e.fillStyle = c.color;
1830
+ let C = S - (b.length - 1) * m / 2;
1831
+ b.forEach((t, n) => e.fillText(t, l, C + n * m)), v += x;
1832
1832
  }
1833
1833
  }
1834
1834
  function pn(e, t, n, r, i, a) {
1835
1835
  let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
1836
- return h({
1836
+ return _({
1837
1837
  dataMin: t,
1838
1838
  dataMax: n,
1839
1839
  explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
@@ -1886,7 +1886,7 @@ function hn(e) {
1886
1886
  };
1887
1887
  }
1888
1888
  function gn(e, t, n, r, i = "A6A6A6", a = .75) {
1889
- let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / W * r) : a * r;
1889
+ let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / b * r) : a * r;
1890
1890
  return {
1891
1891
  color: `#${e ?? i}`,
1892
1892
  width: o,
@@ -1896,7 +1896,7 @@ function gn(e, t, n, r, i = "A6A6A6", a = .75) {
1896
1896
  function _n(e, t, n, r) {
1897
1897
  let i = gn(e, t, n, r, "898989", 1);
1898
1898
  if (t == null || !Number.isFinite(t) || t < 0) return i;
1899
- let a = t / W * r;
1899
+ let a = t / b * r;
1900
1900
  if (!(a > 0)) return i;
1901
1901
  let o = a;
1902
1902
  return {
@@ -1911,15 +1911,15 @@ function vn(e, t, n, r) {
1911
1911
  function yn(e, t) {
1912
1912
  e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
1913
1913
  }
1914
- function bn(e, t, n, r, i, a, o, s, c) {
1915
- let { front: l } = n, u = l.x, f = l.x + l.w, p = hn(n), { sideX: m, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = p, y = Dn(t, n, r, a, o, s, i), b = [], C = t.catAxisLinePaintAuthored === !0, w = t.valAxisLinePaintAuthored === !0, T = i === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : w && !t.valAxisHidden && !t.valAxisLineHidden, E = i === "vertical" ? w && !t.valAxisHidden && !t.valAxisLineHidden : C && !t.catAxisHidden && !t.catAxisLineHidden;
1916
- T && b.push([y.horizontalStart, y.horizontalEnd]), E && b.push([y.verticalStart, y.verticalEnd]);
1914
+ function bn(e, t, n, r, i, a, s, c, l) {
1915
+ let { front: u } = n, d = u.x, f = u.x + u.w, p = hn(n), { sideX: m, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = p, y = Dn(t, n, r, a, s, c, i), x = [], S = t.catAxisLinePaintAuthored === !0, w = t.valAxisLinePaintAuthored === !0, T = i === "vertical" ? S && !t.catAxisHidden && !t.catAxisLineHidden : w && !t.valAxisHidden && !t.valAxisLineHidden, E = i === "vertical" ? w && !t.valAxisHidden && !t.valAxisLineHidden : S && !t.catAxisHidden && !t.catAxisLineHidden;
1916
+ T && x.push([y.horizontalStart, y.horizontalEnd]), E && x.push([y.verticalStart, y.verticalEnd]);
1917
1917
  let D = t.threeD?.seriesAxis, O = D?.linePaintAuthored === !0;
1918
1918
  if (D && !D.hidden && !D.lineHidden && O && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
1919
1919
  let e = i === "vertical" ? p.seriesAxisX : y.axisX, t = i === "horizontal" ? h === n.front.y ? n.front.y + n.front.h : n.front.y : h;
1920
- b.push([n.project(e, t, _), n.project(e, t, v)]);
1920
+ x.push([n.project(e, t, _), n.project(e, t, v)]);
1921
1921
  }
1922
- let k = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, A = (e, t) => b.some(([n, r]) => k(e, n) && k(t, r) || k(e, r) && k(t, n)), j = (e, t) => {
1922
+ let k = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, A = (e, t) => x.some(([n, r]) => k(e, n) && k(t, r) || k(e, r) && k(t, n)), j = (e, t) => {
1923
1923
  let r = Ce(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
1924
1924
  scenePoints: e,
1925
1925
  faceIndex: t
@@ -1934,59 +1934,59 @@ function bn(e, t, n, r, i, a, o, s, c) {
1934
1934
  faces: i,
1935
1935
  visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
1936
1936
  };
1937
- }, M = j("floor", t.threeD?.floor), N = j("sideWall", t.threeD?.sideWall), P = j("backWall", t.threeD?.backWall), F = M.faces, I = N.faces, L = P.faces, R = (i, a, o, s) => {
1938
- let l = d(t, a, o), u = i.faces;
1939
- if (!l.fill || !u.length) return;
1940
- if (l.fill.fillType === "image") {
1941
- let t = l.fill, o = ke(i.slab, c), u = ee(l.fill, o ? q(l.fill, o.widthPt, o.heightPt) : void 0);
1937
+ }, M = j("floor", t.threeD?.floor), P = j("sideWall", t.threeD?.sideWall), F = j("backWall", t.threeD?.backWall), I = M.faces, L = P.faces, R = F.faces, z = (i, a, o, s) => {
1938
+ let c = N(t, a, o), u = i.faces;
1939
+ if (!c.fill || !u.length) return;
1940
+ if (c.fill.fillType === "image") {
1941
+ let t = c.fill, o = ke(i.slab, l), u = W(c.fill, o ? q(c.fill, o.widthPt, o.heightPt) : void 0);
1942
1942
  if (!u) return;
1943
- Ee(e, l.fill, u, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min, (e, n) => ee(t, q(t, e, n)), c);
1943
+ Ee(e, c.fill, u, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min, (e, n) => W(t, q(t, e, n)), l);
1944
1944
  return;
1945
1945
  }
1946
- let f = u.flatMap((e) => e.points), p = Math.min(...f.map((e) => e.x)), m = Math.max(...f.map((e) => e.x)), h = Math.min(...f.map((e) => e.y)), g = Math.max(...f.map((e) => e.y)), _ = l.fill.fillType === "solid" ? `#${l.fill.color}` : se(l.fill, e, p, h, m - p, g - h);
1947
- if (_) for (let t of u) t.points.length < 3 || (zt(e, t.points), e.fillStyle = _, e.fill());
1946
+ let d = u.flatMap((e) => e.points), f = Math.min(...d.map((e) => e.x)), p = Math.max(...d.map((e) => e.x)), m = Math.min(...d.map((e) => e.y)), h = Math.max(...d.map((e) => e.y)), g = c.fill.fillType === "solid" ? `#${c.fill.color}` : se(c.fill, e, f, m, p - f, h - m);
1947
+ if (g) for (let t of u) t.points.length < 3 || (zt(e, t.points), e.fillStyle = g, e.fill());
1948
1948
  };
1949
- R(M, t.threeD?.floor, "floor", "floor"), R(N, t.threeD?.sideWall, "wall", "sideWall"), R(P, t.threeD?.backWall, "wall", "backWall");
1950
- let z = (t, r, i, a, o = !0) => {
1949
+ z(M, t.threeD?.floor, "floor", "floor"), z(P, t.threeD?.sideWall, "wall", "sideWall"), z(F, t.threeD?.backWall, "wall", "backWall");
1950
+ let B = (t, r, i, a, o = !0) => {
1951
1951
  for (let s of Oe(t.slab, r, i, a)) {
1952
1952
  if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
1953
1953
  let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
1954
1954
  e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
1955
1955
  }
1956
- }, B = (t, a, o) => {
1956
+ }, V = (t, a, o) => {
1957
1957
  yn(e, a);
1958
1958
  for (let a of t) {
1959
1959
  let t = r.fraction(a);
1960
1960
  if (o) {
1961
- i === "horizontal" ? (z(M, "floor", "x", t), z(P, "backWall", "x", t)) : (z(N, "sideWall", "y", t), z(P, "backWall", "y", t));
1961
+ i === "horizontal" ? (B(M, "floor", "x", t), B(F, "backWall", "x", t)) : (B(P, "sideWall", "y", t), B(F, "backWall", "y", t));
1962
1962
  continue;
1963
1963
  }
1964
1964
  if (i === "horizontal") {
1965
- let r = l.x + t * l.w, i = n.project(r, h, v), a = n.project(r, g, v);
1965
+ let r = u.x + t * u.w, i = n.project(r, h, v), a = n.project(r, g, v);
1966
1966
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
1967
1967
  } else {
1968
- let r = l.y + l.h - t * l.h, i = n.project(m, r, _), a = n.project(m, r, v), o = n.project(m === u ? f : u, r, v);
1968
+ let r = u.y + u.h - t * u.h, i = n.project(m, r, _), a = n.project(m, r, v), o = n.project(m === d ? f : d, r, v);
1969
1969
  e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke(), e.beginPath(), e.moveTo(a.x, a.y), e.lineTo(o.x, o.y), e.stroke();
1970
1970
  }
1971
1971
  }
1972
1972
  };
1973
- t.valAxisMinorGridlines === !0 && B(r.minorTicks, gn(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, c, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && B(r.majorTicks, gn(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, c, "898989", 1), !0);
1974
- let V = (t, n) => {
1973
+ t.valAxisMinorGridlines === !0 && V(r.minorTicks, gn(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, l, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && V(r.majorTicks, gn(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, l, "898989", 1), !0);
1974
+ let H = (t, n) => {
1975
1975
  yn(e, n);
1976
- for (let e of t) i === "vertical" ? (z(M, "floor", "x", e), z(P, "backWall", "x", e)) : (z(N, "sideWall", "y", e), z(P, "backWall", "y", e));
1976
+ for (let e of t) i === "vertical" ? (B(M, "floor", "x", e), B(F, "backWall", "x", e)) : (B(P, "sideWall", "y", e), B(F, "backWall", "y", e));
1977
1977
  };
1978
- t.catAxisMinorGridlines === !0 && V(S(a, o), gn(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, c, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && V(_e(a, o), gn(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, c, "E0E0E0", .5));
1979
- let H = (n, r, i) => {
1978
+ t.catAxisMinorGridlines === !0 && H(o(a, s), gn(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, l, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && H(pe(a, s), gn(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, l, "E0E0E0", .5));
1979
+ let U = (n, r, i) => {
1980
1980
  if (!n.length) return;
1981
- let a = d(t, r, i);
1981
+ let a = N(t, r, i);
1982
1982
  if (a.line === null) return;
1983
1983
  let o = a.line ?? {
1984
1984
  fillType: "solid",
1985
1985
  color: "898989"
1986
- }, s = n.flatMap((e) => e.points), l = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), f = Math.min(...s.map((e) => e.y)), p = Math.max(...s.map((e) => e.y)), m = o.fillType === "solid" ? `#${o.color}` : se(o, e, l, f, u - l, p - f);
1987
- if (!m) return;
1988
- let h = a.lineWidthEmu == null ? c : Math.max(.25, a.lineWidthEmu / W * c);
1989
- e.strokeStyle = m, e.lineWidth = h, e.setLineDash(x(a.lineCustomDash, a.lineDash, h)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1986
+ }, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), d = Math.min(...s.map((e) => e.y)), f = Math.max(...s.map((e) => e.y)), p = o.fillType === "solid" ? `#${o.color}` : se(o, e, c, d, u - c, f - d);
1987
+ if (!p) return;
1988
+ let m = a.lineWidthEmu == null ? l : Math.max(.25, a.lineWidthEmu / b * l);
1989
+ e.strokeStyle = p, e.lineWidth = m, e.setLineDash(C(a.lineCustomDash, a.lineDash, m)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
1990
1990
  for (let t of n) {
1991
1991
  if (t.points.length < 2) continue;
1992
1992
  let n = t.points.map((e, n) => ({
@@ -2002,7 +2002,7 @@ function bn(e, t, n, r, i, a, o, s, c) {
2002
2002
  e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
2003
2003
  }
2004
2004
  };
2005
- H(F, t.threeD?.floor, "floor"), H(I, t.threeD?.sideWall, "wall"), H(L, t.threeD?.backWall, "wall"), e.setLineDash([]);
2005
+ U(I, t.threeD?.floor, "floor"), U(L, t.threeD?.sideWall, "wall"), U(R, t.threeD?.backWall, "wall"), e.setLineDash([]);
2006
2006
  }
2007
2007
  function xn(e, t, n, r, i, a, o, s, c) {
2008
2008
  let l = Dn(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
@@ -2039,189 +2039,189 @@ function En(e, t, n, r) {
2039
2039
  let i = Tn(e, "major", n);
2040
2040
  return Math.max(r, i + 3 * n);
2041
2041
  }
2042
- function Dn(e, t, n, i, a, o, s) {
2043
- let { front: c } = t, l = (e) => Math.max(0, Math.min(1, e)), u = t.topology.axisX === "min" ? c.x : c.x + c.w, d = t.topology.axisY === "min" ? c.y : c.y + c.h, f = () => {
2042
+ function Dn(e, t, n, r, i, a, o) {
2043
+ let { front: s } = t, c = (e) => Math.max(0, Math.min(1, e)), l = t.topology.axisX === "min" ? s.x : s.x + s.w, u = t.topology.axisY === "min" ? s.y : s.y + s.h, d = () => {
2044
2044
  if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
2045
2045
  let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
2046
- return l(n.fraction(t));
2046
+ return c(n.fraction(t));
2047
2047
  }
2048
2048
  let t = e.catAxisCrosses ?? "autoZero";
2049
- return l(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
2050
- }, p = () => {
2049
+ return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
2050
+ }, f = () => {
2051
2051
  let t = e.valAxisCrossesAt;
2052
- if (t != null && Number.isFinite(t)) return r(t - 1, i, a, o);
2052
+ if (t != null && Number.isFinite(t)) return v(t - 1, r, i, a);
2053
2053
  let n = e.valAxisCrosses;
2054
2054
  if (n !== "min" && n !== "max") return null;
2055
- let s = +(n === "max");
2056
- return o ? 1 - s : s;
2057
- }, m = f(), h = p(), g = s === "horizontal" ? c.x + m * c.w : h == null ? u : c.x + h * c.w, _ = s === "vertical" ? c.y + c.h - m * c.h : h == null ? d : c.y + h * c.h, v = t.topology.nearDepth;
2055
+ let o = +(n === "max");
2056
+ return a ? 1 - o : o;
2057
+ }, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, g = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, _ = t.topology.nearDepth;
2058
2058
  return {
2059
- axisX: g,
2060
- axisY: _,
2061
- depth: v,
2062
- horizontalStart: t.project(c.x, _, v),
2063
- horizontalEnd: t.project(c.x + c.w, _, v),
2064
- verticalStart: t.project(g, c.y + c.h, v),
2065
- verticalEnd: t.project(g, c.y, v)
2059
+ axisX: h,
2060
+ axisY: g,
2061
+ depth: _,
2062
+ horizontalStart: t.project(s.x, g, _),
2063
+ horizontalEnd: t.project(s.x + s.w, g, _),
2064
+ verticalStart: t.project(h, s.y + s.h, _),
2065
+ verticalEnd: t.project(h, s.y, _)
2066
2066
  };
2067
2067
  }
2068
- function On(e, t, n, i, a, o, s, c, l, u) {
2069
- let { front: d } = n, f = Dn(t, n, i, a, o, s, c), { axisX: p, axisY: m, depth: h } = f, g = n.project(d.x + d.w / 2, d.y + d.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = l ? vn : _n;
2068
+ function On(e, t, n, r, i, a, o, s, c, l) {
2069
+ let { front: u } = n, d = Dn(t, n, r, i, a, o, s), { axisX: f, axisY: p, depth: m } = d, h = n.project(u.x + u.w / 2, u.y + u.h / 2, m), g = t.valAxisMinorTickMark ?? "none", _ = c ? vn : _n;
2070
2070
  if (!t.valAxisHidden && !t.valAxisLineHidden) {
2071
- yn(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
2072
- let r = (e) => c === "horizontal" ? n.project(d.x + i.fraction(e) * d.w, m, h) : n.project(p, d.y + d.h - i.fraction(e) * d.h, h), a = c === "horizontal" ? f.horizontalStart : f.verticalStart, o = c === "horizontal" ? f.horizontalEnd : f.verticalEnd;
2073
- for (let n of i.majorTicks) Cn(e, t.valAxisMajorTickMark, r(n), a, o, g, c === "vertical" ? "horizontal" : "vertical", "major", u);
2074
- for (let t of i.minorTicks) Cn(e, _, r(t), a, o, g, c === "vertical" ? "horizontal" : "vertical", "minor", u);
2071
+ yn(e, _(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, l));
2072
+ let i = (e) => s === "horizontal" ? n.project(u.x + r.fraction(e) * u.w, p, m) : n.project(f, u.y + u.h - r.fraction(e) * u.h, m), a = s === "horizontal" ? d.horizontalStart : d.verticalStart, o = s === "horizontal" ? d.horizontalEnd : d.verticalEnd;
2073
+ for (let n of r.majorTicks) Cn(e, t.valAxisMajorTickMark, i(n), a, o, h, s === "vertical" ? "horizontal" : "vertical", "major", l);
2074
+ for (let t of r.minorTicks) Cn(e, g, i(t), a, o, h, s === "vertical" ? "horizontal" : "vertical", "minor", l);
2075
2075
  }
2076
2076
  if (!t.catAxisHidden && !t.catAxisLineHidden) {
2077
- yn(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
2078
- let i = c === "vertical" ? f.horizontalStart : f.verticalStart, _ = c === "vertical" ? f.horizontalEnd : f.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (r) => {
2079
- let a = c === "vertical" ? n.project(d.x + r * d.w, m, h) : n.project(p, d.y + r * d.h, h);
2080
- Cn(e, t.catAxisMajorTickMark, a, i, _, g, c === "vertical" ? "vertical" : "horizontal", "major", u);
2077
+ yn(e, _(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, l));
2078
+ let r = s === "vertical" ? d.horizontalStart : d.verticalStart, g = s === "vertical" ? d.horizontalEnd : d.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (i) => {
2079
+ let a = s === "vertical" ? n.project(u.x + i * u.w, p, m) : n.project(f, u.y + i * u.h, m);
2080
+ Cn(e, t.catAxisMajorTickMark, a, r, g, h, s === "vertical" ? "vertical" : "horizontal", "major", l);
2081
2081
  };
2082
- if (l) {
2083
- let e = _e(a, o);
2084
- for (let t = 0; t < e.length; t += y) b(s ? 1 - e[t] : e[t]);
2085
- } else for (let e = 0; e < a; e += y) b(r(e, a, o, s));
2082
+ if (c) {
2083
+ let e = pe(i, a);
2084
+ for (let t = 0; t < e.length; t += y) b(o ? 1 - e[t] : e[t]);
2085
+ } else for (let e = 0; e < i; e += y) b(v(e, i, a, o));
2086
2086
  let x = t.catAxisMinorUnit;
2087
2087
  if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && x != null && Number.isFinite(x) && x > 0) {
2088
- let l = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, f = Math.min(512, Math.ceil(a / x));
2089
- for (let v = 1; v < f; v++) {
2090
- let f = v * x;
2091
- if (!(f < a)) break;
2092
- if (Math.abs(f / l - Math.round(f / l)) < 1e-9) continue;
2093
- let y = r(f, a, o, s), b = c === "vertical" ? n.project(d.x + y * d.w, m, h) : n.project(p, d.y + y * d.h, h);
2094
- Cn(e, t.catAxisMinorTickMark, b, i, _, g, c === "vertical" ? "vertical" : "horizontal", "minor", u);
2088
+ let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, d = Math.min(512, Math.ceil(i / x));
2089
+ for (let _ = 1; _ < d; _++) {
2090
+ let d = _ * x;
2091
+ if (!(d < i)) break;
2092
+ if (Math.abs(d / c - Math.round(d / c)) < 1e-9) continue;
2093
+ let y = v(d, i, a, o), b = s === "vertical" ? n.project(u.x + y * u.w, p, m) : n.project(f, u.y + y * u.h, m);
2094
+ Cn(e, t.catAxisMinorTickMark, b, r, g, h, s === "vertical" ? "vertical" : "horizontal", "minor", l);
2095
2095
  }
2096
2096
  }
2097
2097
  }
2098
2098
  e.setLineDash([]);
2099
2099
  }
2100
- function kn(e, t, n, a, o) {
2101
- if (!t.threeD) return !1;
2102
- let s = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), c = t.chartType.endsWith("H") || t.chartType.includes("BarH"), u = t.chartType.startsWith("stacked"), d = s && !u && t.threeD.barGrouping === "standard", { plot: f, legend: p, legendMeasure: h } = rn(e, t, n, a, c ? "horizontal" : "vertical", o), _ = Te(t.threeD, f, {
2103
- sceneDepthScale: s ? d ? .65 : .1 : .4,
2104
- perspectiveTangentGain: d ? 1 : 2,
2105
- sceneHeightScale: !s && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
2100
+ function kn(t, n, r, i, o) {
2101
+ if (!n.threeD) return !1;
2102
+ let l = n.chartType === "clusteredBar" || n.chartType === "clusteredBarH" || n.chartType.startsWith("stackedBar"), u = n.chartType.endsWith("H") || n.chartType.includes("BarH"), d = n.chartType.startsWith("stacked"), p = l && !d && n.threeD.barGrouping === "standard", { plot: m, legend: h, legendMeasure: _ } = rn(t, n, r, i, u ? "horizontal" : "vertical", o), x = Te(n.threeD, m, {
2103
+ sceneDepthScale: l ? p ? .65 : .1 : .4,
2104
+ perspectiveTangentGain: p ? 1 : 2,
2105
+ sceneHeightScale: !l && !(n.threeD.heightPercentAuthored ?? n.threeD.heightPercent != null) ? 1 / 3 : void 0
2106
2106
  });
2107
- if (!_) return !0;
2108
- _ = De(_, t.threeD, f);
2109
- let v = t.chartType.endsWith("Pct"), y = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, b = Math.max(1, y.length, ...t.series.map((e) => e.values.length)), S = v ? kt(t, b) : void 0, w = t.catAxisOrientation === "maxMin", T = t.catAxisCrossBetween === "between", E = t.dispBlanksAs ?? "gap", D = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, O = (e, n) => {
2110
- let r = t.series[e]?.values[n];
2111
- return r != null && Number.isFinite(r) && (!D || r > 0) || r == null && (u || E === "zero");
2112
- }, k = (e, n) => At(t, e, n, S), A = 0, j = 0;
2113
- if (u) {
2114
- for (let e = 0; e < b; e++) {
2115
- let n = 0, r = 0;
2116
- for (let i = 0; i < t.series.length; i++) {
2117
- let t = k(i, e);
2118
- t >= 0 ? n = jt(n, t) : r = jt(r, t);
2107
+ if (!x) return !0;
2108
+ x = De(x, n.threeD, m);
2109
+ let S = n.chartType.endsWith("Pct"), T = n.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? n.categories, E = Math.max(1, T.length, ...n.series.map((e) => e.values.length)), D = S ? kt(n, E) : void 0, O = n.catAxisOrientation === "maxMin", k = n.catAxisCrossBetween === "between", A = n.dispBlanksAs ?? "gap", j = n.valAxisLogBase != null && Number.isFinite(n.valAxisLogBase) && n.valAxisLogBase >= 2, M = (e, t) => {
2110
+ let r = n.series[e]?.values[t];
2111
+ return r != null && Number.isFinite(r) && (!j || r > 0) || r == null && (d || A === "zero");
2112
+ }, N = (e, t) => At(n, e, t, D), P = 0, F = 0;
2113
+ if (d) {
2114
+ for (let e = 0; e < E; e++) {
2115
+ let t = 0, r = 0;
2116
+ for (let i = 0; i < n.series.length; i++) {
2117
+ let n = N(i, e);
2118
+ n >= 0 ? t = jt(t, n) : r = jt(r, n);
2119
2119
  }
2120
- A = Math.min(A, r), j = Math.max(j, n);
2120
+ P = Math.min(P, r), F = Math.max(F, t);
2121
2121
  }
2122
- v && (A = A < 0 ? -100 : 0, j = j > 0 ? 100 : 0, A === 0 && j === 0 && (j = 1));
2122
+ S && (P = P < 0 ? -100 : 0, F = F > 0 ? 100 : 0, P === 0 && F === 0 && (F = 1));
2123
2123
  } else {
2124
- let e = g(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!D || e > 0)), D ? {
2124
+ let e = y(n.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!j || e > 0)), j ? {
2125
2125
  min: 1,
2126
2126
  max: 10
2127
2127
  } : {
2128
2128
  min: 0,
2129
2129
  max: 1
2130
2130
  });
2131
- A = D ? e.min : Math.min(0, e.min), j = D ? e.max : Math.max(0, e.max);
2132
- }
2133
- let N = c ? _.project(_.front.x, _.topology.axisY === "min" ? _.front.y : _.front.y + _.front.h, _.topology.nearDepth) : _.project(_.topology.axisX === "min" ? _.front.x : _.front.x + _.front.w, _.front.y, _.topology.nearDepth), P = c ? _.project(_.front.x + _.front.w, _.topology.axisY === "min" ? _.front.y : _.front.y + _.front.h, _.topology.nearDepth) : _.project(_.topology.axisX === "min" ? _.front.x : _.front.x + _.front.w, _.front.y + _.front.h, _.topology.nearDepth), F = Math.hypot(P.x - N.x, P.y - N.y) / a, I = pn(t, A, j, F, v, c ? "horizontal" : "vertical"), L = (e) => Number.isFinite(e) ? Math.max(I.min, Math.min(I.max, e)) : I.min;
2134
- s || bn(e, t, _, I, c ? "horizontal" : "vertical", b, T, w, a);
2135
- let { front: R } = _, z = Math.max(1, t.series.length), ee = [], G = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), q = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2136
- if (s) {
2137
- let r = _.prismInterval(0, 1, !0), i = [], s = Array(b).fill(0), f = Array(b).fill(0), p = (c ? R.h : R.w) / b, h = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
2138
- for (let e = 0; e < t.series.length; e++) {
2139
- let n = t.series[e], o = d ? _.prismInterval(e, z, !1) : r, l = je(p, h, d ? 0 : e, d ? 1 : z, u || d);
2140
- for (let r = 0; r < b; r++) {
2141
- if (!O(e, r)) continue;
2142
- let d = k(e, r), m = $(t, n, G[e].get(r), r, e), h = m.fill === null ? "transparent" : m.color, g = m.lineFill !== null && (m.lineColor != null || m.lineFill !== void 0), _ = u ? d >= 0 ? s[r] : f[r] : 0, y = jt(_, d);
2143
- u && (d >= 0 ? s[r] = y : f[r] = y);
2144
- let x = L(_), S = L(y), C = n.threeDShape ?? t.threeD.shape ?? "box", T = C === "cone" || C === "pyramid", E = C === "coneToMax" || C === "pyramidToMax", A = (e) => {
2145
- if (!T) return 1;
2146
- let t = D && !(_ > 0) ? I.min : _, n = I.fraction(t), r = I.fraction(y), i = I.fraction(e), a = r - n;
2131
+ P = j ? e.min : Math.min(0, e.min), F = j ? e.max : Math.max(0, e.max);
2132
+ }
2133
+ let I = u ? x.project(x.front.x, x.topology.axisY === "min" ? x.front.y : x.front.y + x.front.h, x.topology.nearDepth) : x.project(x.topology.axisX === "min" ? x.front.x : x.front.x + x.front.w, x.front.y, x.topology.nearDepth), L = u ? x.project(x.front.x + x.front.w, x.topology.axisY === "min" ? x.front.y : x.front.y + x.front.h, x.topology.nearDepth) : x.project(x.topology.axisX === "min" ? x.front.x : x.front.x + x.front.w, x.front.y + x.front.h, x.topology.nearDepth), B = Math.hypot(L.x - I.x, L.y - I.y) / i, V = pn(n, P, F, B, S, u ? "horizontal" : "vertical"), H = (e) => Number.isFinite(e) ? Math.max(V.min, Math.min(V.max, e)) : V.min;
2134
+ l || bn(t, n, x, V, u ? "horizontal" : "vertical", E, k, O, i);
2135
+ let { front: U } = x, ee = Math.max(1, n.series.length), te = [], W = n.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), K = n.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
2136
+ if (l) {
2137
+ let a = x.prismInterval(0, 1, !0), s = [], c = Array(E).fill(0), l = Array(E).fill(0), m = (u ? U.h : U.w) / E, h = n.barGapWidth != null && Number.isFinite(n.barGapWidth) && n.barGapWidth >= 0 ? n.barGapWidth : 150;
2138
+ for (let e = 0; e < n.series.length; e++) {
2139
+ let t = n.series[e], r = p ? x.prismInterval(e, ee, !1) : a, o = je(m, h, p ? 0 : e, p ? 1 : ee, d || p);
2140
+ for (let a = 0; a < E; a++) {
2141
+ if (!M(e, a)) continue;
2142
+ let p = N(e, a), h = $(n, t, W[e].get(a), a, e), g = h.fill === null ? "transparent" : h.color, _ = h.lineFill !== null && (h.lineColor != null || h.lineFill !== void 0), v = d ? p >= 0 ? c[a] : l[a] : 0, y = jt(v, p);
2143
+ d && (p >= 0 ? c[a] = y : l[a] = y);
2144
+ let b = H(v), x = H(y), C = t.threeDShape ?? n.threeD.shape ?? "box", w = C === "cone" || C === "pyramid", T = C === "coneToMax" || C === "pyramidToMax", D = (e) => {
2145
+ if (!w) return 1;
2146
+ let t = j && !(v > 0) ? V.min : v, n = V.fraction(t), r = V.fraction(y), i = V.fraction(e), a = r - n;
2147
2147
  return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
2148
- }, j = (e) => {
2149
- if (!E) return 1;
2150
- let t = y >= _ ? I.max : I.min, n = D ? I.min : 0, r = I.fraction(t), i = I.fraction(n), a = I.fraction(e), o = Math.abs(r - i);
2148
+ }, k = (e) => {
2149
+ if (!T) return 1;
2150
+ let t = y >= v ? V.max : V.min, n = j ? V.min : 0, r = V.fraction(t), i = V.fraction(n), a = V.fraction(e), o = Math.abs(r - i);
2151
2151
  return !(o > 0) || ![
2152
2152
  r,
2153
2153
  i,
2154
2154
  a
2155
- ].every(Number.isFinite) ? we(e, I.min, I.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2156
- }, M = E ? j(x) : A(x), N = E ? j(S) : A(S);
2157
- if (c) {
2158
- let t = R.x + I.fraction(x) * R.w, n = R.x + I.fraction(S) * R.w, s = w ? b - 1 - r : r, c = R.y + s * p + l.offset;
2159
- i.push({
2155
+ ].every(Number.isFinite) ? we(e, V.min, V.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
2156
+ }, A = T ? k(b) : D(b), P = T ? k(x) : D(x);
2157
+ if (u) {
2158
+ let t = U.x + V.fraction(b) * U.w, n = U.x + V.fraction(x) * U.w, c = O ? E - 1 - a : a, l = U.y + c * m + o.offset;
2159
+ s.push({
2160
2160
  x: Math.min(t, n),
2161
- y: c,
2161
+ y: l,
2162
2162
  width: Math.abs(n - t),
2163
- height: l.size,
2164
- nearDepth: o.near,
2165
- farDepth: o.far,
2166
- categoryIndex: r,
2163
+ height: o.size,
2164
+ nearDepth: r.near,
2165
+ farDepth: r.far,
2166
+ categoryIndex: a,
2167
2167
  seriesIndex: e,
2168
- color: h,
2169
- fillPaint: m.fill,
2170
- lineFill: m.lineFill,
2168
+ color: g,
2169
+ fillPaint: h.fill,
2170
+ lineFill: h.lineFill,
2171
2171
  shape: C,
2172
2172
  baseCoord: t,
2173
2173
  endCoord: n,
2174
- baseScale: M,
2175
- endScale: N,
2174
+ baseScale: A,
2175
+ endScale: P,
2176
2176
  omitBaseCap: !1,
2177
2177
  omitEndCap: !1,
2178
- outline: g,
2179
- outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2180
- outlineWidth: m.lineWidthEmu == null ? .75 * a / U : Tt(m.lineWidthEmu, a),
2181
- outlineDash: m.lineDash ?? "solid",
2182
- outlineCustomDash: m.lineCustomDash,
2183
- outlineCap: m.lineCap,
2184
- outlineJoin: m.lineJoin,
2185
- labelValue: v ? d / 100 : d,
2178
+ outline: _,
2179
+ outlineColor: h.lineColor ?? "rgba(0,0,0,0.42)",
2180
+ outlineWidth: h.lineWidthEmu == null ? .75 * i / f : Tt(h.lineWidthEmu, i),
2181
+ outlineDash: h.lineDash ?? "solid",
2182
+ outlineCustomDash: h.lineCustomDash,
2183
+ outlineCap: h.lineCap,
2184
+ outlineJoin: h.lineJoin,
2185
+ labelValue: S ? p / 100 : p,
2186
2186
  plottedLabelValue: y
2187
2187
  });
2188
2188
  } else {
2189
- let t = R.y + R.h - I.fraction(x) * R.h, n = R.y + R.h - I.fraction(S) * R.h, s = w ? b - 1 - r : r, c = R.x + s * p + l.offset;
2190
- i.push({
2191
- x: c,
2189
+ let t = U.y + U.h - V.fraction(b) * U.h, n = U.y + U.h - V.fraction(x) * U.h, c = O ? E - 1 - a : a, l = U.x + c * m + o.offset;
2190
+ s.push({
2191
+ x: l,
2192
2192
  y: Math.min(t, n),
2193
- width: l.size,
2193
+ width: o.size,
2194
2194
  height: Math.abs(n - t),
2195
- nearDepth: o.near,
2196
- farDepth: o.far,
2197
- categoryIndex: r,
2195
+ nearDepth: r.near,
2196
+ farDepth: r.far,
2197
+ categoryIndex: a,
2198
2198
  seriesIndex: e,
2199
- color: h,
2200
- fillPaint: m.fill,
2201
- lineFill: m.lineFill,
2199
+ color: g,
2200
+ fillPaint: h.fill,
2201
+ lineFill: h.lineFill,
2202
2202
  shape: C,
2203
2203
  baseCoord: t,
2204
2204
  endCoord: n,
2205
- baseScale: M,
2206
- endScale: N,
2205
+ baseScale: A,
2206
+ endScale: P,
2207
2207
  omitBaseCap: !1,
2208
2208
  omitEndCap: !1,
2209
- outline: g,
2210
- outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
2211
- outlineWidth: m.lineWidthEmu == null ? .75 * a / U : Tt(m.lineWidthEmu, a),
2212
- outlineDash: m.lineDash ?? "solid",
2213
- outlineCustomDash: m.lineCustomDash,
2214
- outlineCap: m.lineCap,
2215
- outlineJoin: m.lineJoin,
2216
- labelValue: v ? d / 100 : d,
2209
+ outline: _,
2210
+ outlineColor: h.lineColor ?? "rgba(0,0,0,0.42)",
2211
+ outlineWidth: h.lineWidthEmu == null ? .75 * i / f : Tt(h.lineWidthEmu, i),
2212
+ outlineDash: h.lineDash ?? "solid",
2213
+ outlineCustomDash: h.lineCustomDash,
2214
+ outlineCap: h.lineCap,
2215
+ outlineJoin: h.lineJoin,
2216
+ labelValue: S ? p / 100 : p,
2217
2217
  plottedLabelValue: y
2218
2218
  });
2219
2219
  }
2220
2220
  }
2221
2221
  }
2222
- if (u) {
2223
- let e = Et(i, b);
2224
- for (let t = 0; t < b; t++) {
2222
+ if (d) {
2223
+ let e = Et(s, E);
2224
+ for (let t = 0; t < E; t++) {
2225
2225
  let n = e[t];
2226
2226
  for (let e of [-1, 1]) {
2227
2227
  let t = n.filter((t) => Math.sign(t.labelValue) === e && !Bt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
@@ -2237,67 +2237,67 @@ function kn(e, t, n, a, o) {
2237
2237
  }
2238
2238
  }
2239
2239
  }
2240
- bn(e, t, _, I, c ? "horizontal" : "vertical", b, T, w, a);
2241
- let g = {
2240
+ bn(t, n, x, V, u ? "horizontal" : "vertical", E, k, O, i);
2241
+ let _ = {
2242
2242
  remaining: rt,
2243
2243
  exceeded: !1
2244
- }, y = i.map((t) => {
2245
- let n = Ut(_, t.shape, c, t.x, t.y, t.width, t.height, t.baseCoord, t.endCoord, t.nearDepth, t.farDepth, t.color, t.baseScale, t.endScale, t.omitBaseCap, t.omitEndCap, t.outline && t.outlineColor ? {
2246
- color: t.outlineColor,
2247
- width: t.outlineWidth,
2248
- dash: x(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
2249
- cap: t.outlineCap,
2250
- join: t.outlineJoin
2251
- } : void 0, g);
2252
- return Jt(e, n, "fill", t.fillPaint, o), Jt(e, n, "outline", t.lineFill, o), {
2253
- item: t,
2244
+ }, v = s.map((e) => {
2245
+ let n = Ut(x, e.shape, u, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
2246
+ color: e.outlineColor,
2247
+ width: e.outlineWidth,
2248
+ dash: C(e.outlineCustomDash, e.outlineDash, e.outlineWidth),
2249
+ cap: e.outlineCap,
2250
+ join: e.outlineJoin
2251
+ } : void 0, _);
2252
+ return Jt(t, n, "fill", e.fillPaint, o), Jt(t, n, "outline", e.lineFill, o), {
2253
+ item: e,
2254
2254
  faces: n
2255
2255
  };
2256
- }), S = y.flatMap((e) => e.faces);
2257
- if (g.exceeded) return Yt(e, n), !0;
2258
- for (let t of nt(S)) Kt(e, t);
2259
- for (let { item: n, faces: r } of y) {
2260
- let i = t.series[n.seriesIndex], o = G[n.seriesIndex].get(n.categoryIndex), s = Le(t, i, n.categoryIndex, n.seriesIndex), c = m(o?.chartexStyle), u = m(i.chartexStyle);
2261
- xe(e, c ?? u, l(t, "dataPoint3D", n.seriesIndex), c ? n.categoryIndex : s, a, (e) => qt(e, r), s);
2256
+ }), y = v.flatMap((e) => e.faces);
2257
+ if (_.exceeded) return Yt(t, r), !0;
2258
+ for (let e of nt(y)) Kt(t, e);
2259
+ for (let { item: r, faces: a } of v) {
2260
+ let o = n.series[r.seriesIndex], s = W[r.seriesIndex].get(r.categoryIndex), c = Le(n, o, r.categoryIndex, r.seriesIndex), l = g(s?.chartexStyle), u = g(o.chartexStyle);
2261
+ xe(t, l ?? u, e(n, "dataPoint3D", r.seriesIndex), l ? r.categoryIndex : c, i, (e) => qt(e, a), c);
2262
2262
  }
2263
- for (let r of i) {
2264
- let i = t.series[r.seriesIndex], s = c ? _.project(r.endCoord, r.y + r.height / 2, (r.nearDepth + r.farDepth) / 2) : _.project(r.x + r.width / 2, r.endCoord, (r.nearDepth + r.farDepth) / 2), l = q[r.seriesIndex].get(r.categoryIndex);
2265
- nn(t, i, l) && ee.push(() => tn(e, t, i, r.seriesIndex, r.categoryIndex, r.labelValue, s, n, a, 0, void 0, l, "t", s, !0, t.valAxisDisplayUnits, I.max, r.plottedLabelValue, o));
2263
+ for (let e of s) {
2264
+ let a = n.series[e.seriesIndex], s = u ? x.project(e.endCoord, e.y + e.height / 2, (e.nearDepth + e.farDepth) / 2) : x.project(e.x + e.width / 2, e.endCoord, (e.nearDepth + e.farDepth) / 2), c = K[e.seriesIndex].get(e.categoryIndex);
2265
+ nn(n, a, c) && te.push(() => tn(t, n, a, e.seriesIndex, e.categoryIndex, e.labelValue, s, r, i, 0, void 0, c, "t", s, !0, n.valAxisDisplayUnits, V.max, e.plottedLabelValue, o));
2266
2266
  }
2267
2267
  } else {
2268
- let i = t.series.map(() => Array(b).fill(0)), s = t.series.map(() => Array(b).fill(0));
2269
- if (u) {
2270
- let e = Array(b).fill(0), n = Array(b).fill(0);
2271
- for (let r = 0; r < t.series.length; r++) for (let t = 0; t < b; t++) {
2272
- let a = k(r, t), o = a >= 0 ? e[t] : n[t];
2273
- i[r][t] = o, s[r][t] = jt(o, a), a >= 0 ? e[t] = jt(e[t], a) : n[t] = jt(n[t], a);
2268
+ let e = n.series.map(() => Array(E).fill(0)), a = n.series.map(() => Array(E).fill(0));
2269
+ if (d) {
2270
+ let t = Array(E).fill(0), r = Array(E).fill(0);
2271
+ for (let i = 0; i < n.series.length; i++) for (let n = 0; n < E; n++) {
2272
+ let o = N(i, n), s = o >= 0 ? t[n] : r[n];
2273
+ e[i][n] = s, a[i][n] = jt(s, o), o >= 0 ? t[n] = jt(t[n], o) : r[n] = jt(r[n], o);
2274
2274
  }
2275
2275
  }
2276
2276
  let c = (e) => {
2277
- let t = _.seriesDepth(e, z, u), n = 0, i = 0;
2278
- for (let a = 0; a < b; a++) {
2279
- if (!O(e, a)) continue;
2280
- let o = u ? s[e][a] : k(e, a), c = R.x + r(a, b, T, w) * R.w, l = R.y + R.h - I.fraction(L(o)) * R.h;
2281
- n += _.cameraDepth(c, l, t), i++;
2277
+ let t = x.seriesDepth(e, ee, d), n = 0, r = 0;
2278
+ for (let i = 0; i < E; i++) {
2279
+ if (!M(e, i)) continue;
2280
+ let o = d ? a[e][i] : N(e, i), s = U.x + v(i, E, k, O) * U.w, c = U.y + U.h - V.fraction(H(o)) * U.h;
2281
+ n += x.cameraDepth(s, c, t), r++;
2282
2282
  }
2283
- return i > 0 ? n / i : -Infinity;
2284
- }, l = t.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), d = t.series.map((e, n) => $(t, e, void 0, n, n)), f = [], p = [], m = !1;
2283
+ return r > 0 ? n / r : -Infinity;
2284
+ }, l = n.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), u = n.series.map((e, t) => $(n, e, void 0, t, t)), f = [], p = [], m = !1;
2285
2285
  for (let c of l) {
2286
2286
  if (m) break;
2287
- let l = t.series[c], h = d[c], g = h.fill === null ? "transparent" : h.color, y = u ? _.prismInterval(0, 1, !0) : _.prismInterval(c, z, !1), S = R.x + R.w / 2, D = R.y + R.h / 2, A = _.cameraDepth(S, D, y.near) >= _.cameraDepth(S, D, y.far) ? y.near : y.far, j = [], M = [], N = [], P = [], F = [], L = [], B = [], H = [], U = [], K = [];
2288
- for (let e = 0; e < b; e++) {
2289
- if (!O(c, e)) {
2290
- j.push(null), M.push(null), N.push(null), P.push(null), F.push(null), L.push(null), B.push(null), H.push(null), U.push(null), K.push(null);
2287
+ let l = n.series[c], h = u[c], g = h.fill === null ? "transparent" : h.color, _ = d ? x.prismInterval(0, 1, !0) : x.prismInterval(c, ee, !1), y = U.x + U.w / 2, w = U.y + U.h / 2, T = x.cameraDepth(y, w, _.near) >= x.cameraDepth(y, w, _.far) ? _.near : _.far, D = [], j = [], P = [], F = [], I = [], L = [], R = [], B = [], H = [], G = [];
2288
+ for (let t = 0; t < E; t++) {
2289
+ if (!M(c, t)) {
2290
+ D.push(null), j.push(null), P.push(null), F.push(null), I.push(null), L.push(null), R.push(null), B.push(null), H.push(null), G.push(null);
2291
2291
  continue;
2292
2292
  }
2293
- let n = u ? s[c][e] : k(c, e), a = u ? i[c][e] : 0, o = R.x + r(e, b, T, w) * R.w, l = I.fraction(n), d = I.fraction(a), f = Number.isFinite(d) ? d : a <= I.min ? 0 : 1, p = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= I.min ? 0 : 1, h = R.y + R.h - m * R.h, g = R.y + R.h - Math.max(0, Math.min(1, f)) * R.h;
2294
- j.push(t.chartType.toLowerCase().includes("area") || p ? _.project(o, h, A) : null), M.push(_.project(o, g, A)), N.push(p ? _.cameraDepth(o, h, A) : null), P.push(_.cameraDepth(o, g, A)), F.push(n), L.push(o), B.push(h), H.push(g), U.push(l), K.push(f);
2293
+ let r = d ? a[c][t] : N(c, t), i = d ? e[c][t] : 0, o = U.x + v(t, E, k, O) * U.w, s = V.fraction(r), l = V.fraction(i), u = Number.isFinite(l) ? l : i <= V.min ? 0 : 1, f = Number.isFinite(s) && s >= 0 && s <= 1, p = Number.isFinite(s) ? Math.max(0, Math.min(1, s)) : r <= V.min ? 0 : 1, m = U.y + U.h - p * U.h, h = U.y + U.h - Math.max(0, Math.min(1, u)) * U.h;
2294
+ D.push(n.chartType.toLowerCase().includes("area") || f ? x.project(o, m, T) : null), j.push(x.project(o, h, T)), P.push(f ? x.cameraDepth(o, m, T) : null), F.push(x.cameraDepth(o, h, T)), I.push(r), L.push(o), R.push(m), B.push(h), H.push(s), G.push(u);
2295
2295
  }
2296
- let ne = [], J = null;
2297
- for (let e = 0; e < j.length; e++) {
2298
- let t = j[e], n = M[e];
2296
+ let q = [], J = null;
2297
+ for (let e = 0; e < D.length; e++) {
2298
+ let t = D[e], n = j[e];
2299
2299
  if (!t || !n) {
2300
- E === "gap" && (J && ne.push(J), J = null);
2300
+ A === "gap" && (J && q.push(J), J = null);
2301
2301
  continue;
2302
2302
  }
2303
2303
  J ??= {
@@ -2311,40 +2311,40 @@ function kn(e, t, n, a, o) {
2311
2311
  lowerYs: [],
2312
2312
  upperFractions: [],
2313
2313
  lowerFractions: []
2314
- }, J.upper.push(t), J.lower.push(n), J.upperDepths.push(N[e] ?? 0), J.lowerDepths.push(P[e] ?? 0), J.indices.push(e), J.sceneXs.push(L[e] ?? 0), J.upperYs.push(B[e] ?? 0), J.lowerYs.push(H[e] ?? 0), J.upperFractions.push(U[e] ?? 0), J.lowerFractions.push(K[e] ?? 0);
2314
+ }, J.upper.push(t), J.lower.push(n), J.upperDepths.push(P[e] ?? 0), J.lowerDepths.push(F[e] ?? 0), J.indices.push(e), J.sceneXs.push(L[e] ?? 0), J.upperYs.push(R[e] ?? 0), J.lowerYs.push(B[e] ?? 0), J.upperFractions.push(H[e] ?? 0), J.lowerFractions.push(G[e] ?? 0);
2315
2315
  }
2316
- J && ne.push(J);
2317
- let Y = [], X = [];
2318
- if (t.chartType.toLowerCase().includes("area")) {
2319
- for (let t of ne) {
2316
+ J && q.push(J);
2317
+ let Y = [], ne = [];
2318
+ if (n.chartType.toLowerCase().includes("area")) {
2319
+ for (let e of q) {
2320
2320
  let n = null;
2321
- for (let r = 0; r + 1 < t.upper.length; r++) {
2322
- let i = Xe(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
2321
+ for (let r = 0; r + 1 < e.upper.length; r++) {
2322
+ let i = Xe(e.lowerFractions[r], e.lowerFractions[r + 1], e.upperFractions[r], e.upperFractions[r + 1]);
2323
2323
  for (let a = 0; a < i.length; a++) {
2324
- let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, l = R.y + R.h - o.lowerStart * R.h, u = R.y + R.h - o.lowerEnd * R.h, d = R.y + R.h - o.upperStart * R.h, p = R.y + R.h - o.upperEnd * R.h, h = {
2325
- ..._.project(s, d, A),
2326
- cameraDepth: _.cameraDepth(s, d, A),
2327
- cameraWeight: _.cameraProjectionWeight(s, d, A)
2324
+ let o = i[a], s = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.startT, c = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.endT, l = U.y + U.h - o.lowerStart * U.h, u = U.y + U.h - o.lowerEnd * U.h, d = U.y + U.h - o.upperStart * U.h, p = U.y + U.h - o.upperEnd * U.h, h = {
2325
+ ...x.project(s, d, T),
2326
+ cameraDepth: x.cameraDepth(s, d, T),
2327
+ cameraWeight: x.cameraProjectionWeight(s, d, T)
2328
2328
  }, v = {
2329
- ..._.project(c, p, A),
2330
- cameraDepth: _.cameraDepth(c, p, A),
2331
- cameraWeight: _.cameraProjectionWeight(c, p, A)
2329
+ ...x.project(c, p, T),
2330
+ cameraDepth: x.cameraDepth(c, p, T),
2331
+ cameraWeight: x.cameraProjectionWeight(c, p, T)
2332
2332
  };
2333
2333
  n != null && Math.hypot(n.at(-1).x - h.x, n.at(-1).y - h.y) <= 1e-8 ? n.push(v) : (n && n.length >= 2 && Y.push(n), n = [h, v]);
2334
- let b = Ht(_, s, c, l, u, d, p, y.near, y.far, g, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
2335
- for (let t of b) {
2334
+ let y = Ht(x, s, c, l, u, d, p, _.near, _.far, g, r === 0 && a === 0 && o.startT === 0, r + 2 === e.upper.length && a + 1 === i.length && o.endT === 1);
2335
+ for (let e of y) {
2336
2336
  if (f.length >= 1e4) {
2337
2337
  m = !0;
2338
2338
  break;
2339
2339
  }
2340
2340
  f.push({
2341
- points: t.points,
2342
- cameraDepth: t.cameraDepth,
2343
- cameraDepths: t.cameraDepths,
2344
- cameraWeights: t.cameraWeights,
2341
+ points: e.points,
2342
+ cameraDepth: e.cameraDepth,
2343
+ cameraDepths: e.cameraDepths,
2344
+ cameraWeights: e.cameraWeights,
2345
2345
  layer: 0,
2346
- paint: () => Kt(e, t)
2347
- }), X.push(t);
2346
+ paint: () => Kt(t, e)
2347
+ }), ne.push(e);
2348
2348
  }
2349
2349
  if (m) break;
2350
2350
  }
@@ -2352,33 +2352,33 @@ function kn(e, t, n, a, o) {
2352
2352
  }
2353
2353
  if (n && n.length >= 2 && Y.push(n), m) break;
2354
2354
  }
2355
- Jt(e, X, "fill", h.fill, o);
2355
+ Jt(t, ne, "fill", h.fill, o);
2356
2356
  }
2357
- let re = [];
2358
- if (!t.chartType.toLowerCase().includes("area")) {
2357
+ let X = [];
2358
+ if (!n.chartType.toLowerCase().includes("area")) {
2359
2359
  let e = [], t = null;
2360
- for (let n = 0; n < b; n++) {
2361
- let i = F[n], a = i == null ? NaN : I.fraction(i);
2362
- if (i == null || !Number.isFinite(a)) {
2363
- E === "gap" && t && (e.push(t), t = null);
2360
+ for (let n = 0; n < E; n++) {
2361
+ let r = I[n], i = r == null ? NaN : V.fraction(r);
2362
+ if (r == null || !Number.isFinite(i)) {
2363
+ A === "gap" && t && (e.push(t), t = null);
2364
2364
  continue;
2365
2365
  }
2366
2366
  t ??= [], t.push({
2367
- x: R.x + r(n, b, T, w) * R.w,
2368
- fraction: a,
2367
+ x: U.x + v(n, E, k, O) * U.w,
2368
+ fraction: i,
2369
2369
  ownerIndex: n
2370
2370
  });
2371
2371
  }
2372
2372
  t && e.push(t);
2373
2373
  let n = (e) => {
2374
- let t = Math.max(0, Math.min(1, e.fraction)), n = R.y + R.h - t * R.h;
2374
+ let t = Math.max(0, Math.min(1, e.fraction)), n = U.y + U.h - t * U.h;
2375
2375
  return {
2376
- ..._.project(e.x, n, A),
2377
- cameraDepth: _.cameraDepth(e.x, n, A),
2378
- cameraWeight: _.cameraProjectionWeight(e.x, n, A)
2376
+ ...x.project(e.x, n, T),
2377
+ cameraDepth: x.cameraDepth(e.x, n, T),
2378
+ cameraWeight: x.cameraProjectionWeight(e.x, n, T)
2379
2379
  };
2380
- }, i = (e) => {
2381
- e && e.path.length >= 2 && re.push(e);
2380
+ }, r = (e) => {
2381
+ e && e.path.length >= 2 && X.push(e);
2382
2382
  };
2383
2383
  for (let t of e) {
2384
2384
  if (t.length < 2) continue;
@@ -2405,48 +2405,48 @@ function kn(e, t, n, a, o) {
2405
2405
  });
2406
2406
  }
2407
2407
  }
2408
- let r = null, a = 0;
2408
+ let i = null, a = 0;
2409
2409
  for (let t = 0; t + 1 < e.length; t++) {
2410
- let o = e[t], s = e[t + 1], c = (e) => _.project(e.x, R.y + R.h - e.fraction * R.h, A), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * R.h), p = Ye(o.fraction, s.fraction);
2410
+ let o = e[t], s = e[t + 1], c = (e) => x.project(e.x, U.y + U.h - e.fraction * U.h, T), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * U.h), p = Ye(o.fraction, s.fraction);
2411
2411
  if (!p || p.endT - p.startT <= 1e-12) {
2412
- i(r), r = null, a += f;
2412
+ r(i), i = null, a += f;
2413
2413
  continue;
2414
2414
  }
2415
2415
  let m = (e) => ({
2416
2416
  x: o.x + (s.x - o.x) * e,
2417
2417
  fraction: o.fraction + (s.fraction - o.fraction) * e,
2418
2418
  ownerIndex: s.ownerIndex
2419
- }), h = c(m(p.startT)), g = Math.hypot(h.x - l.x, h.y - l.y), v = n(m(p.startT)), y = n(m(p.endT)), b = m(p.startT), x = m(p.endT), S = (e) => ({
2419
+ }), h = c(m(p.startT)), g = Math.hypot(h.x - l.x, h.y - l.y), _ = n(m(p.startT)), v = n(m(p.endT)), y = m(p.startT), b = m(p.endT), S = (e) => ({
2420
2420
  x: e.x,
2421
- y: R.y + R.h - Math.max(0, Math.min(1, e.fraction)) * R.h
2421
+ y: U.y + U.h - Math.max(0, Math.min(1, e.fraction)) * U.h
2422
2422
  });
2423
- r != null && Math.hypot(r.path.at(-1).x - v.x, r.path.at(-1).y - v.y) <= 1e-8 && r.ownerIndex === s.ownerIndex ? (r.path.push(y), r.modelPath.push(S(x)), r.endClipped = t + 1 < e.length - 1 || p.endT < 1) : (i(r), r = {
2424
- path: [v, y],
2425
- modelPath: [S(b), S(x)],
2423
+ i != null && Math.hypot(i.path.at(-1).x - _.x, i.path.at(-1).y - _.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(v), i.modelPath.push(S(b)), i.endClipped = t + 1 < e.length - 1 || p.endT < 1) : (r(i), i = {
2424
+ path: [_, v],
2425
+ modelPath: [S(y), S(b)],
2426
2426
  ownerIndex: s.ownerIndex,
2427
2427
  startClipped: t > 0 || p.startT > 0,
2428
2428
  endClipped: t + 1 < e.length - 1 || p.endT < 1,
2429
2429
  dashOffset: a + (Number.isFinite(g) ? g : f * p.startT)
2430
2430
  }), a += f;
2431
2431
  }
2432
- i(r);
2432
+ r(i);
2433
2433
  }
2434
2434
  }
2435
- let Z = t.chartType.toLowerCase().includes("area"), ie = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || h.lineColor != null || h.lineFill !== void 0;
2436
- if (!Z || h.lineFill !== null && ie) {
2437
- let n = /* @__PURE__ */ new Map(), r = (e) => {
2438
- let r = G[c].get(e);
2435
+ let Z = n.chartType.toLowerCase().includes("area"), re = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || h.lineColor != null || h.lineFill !== void 0;
2436
+ if (!Z || h.lineFill !== null && re) {
2437
+ let e = /* @__PURE__ */ new Map(), r = (t) => {
2438
+ let r = W[c].get(t);
2439
2439
  if (!Pt(r)) return h;
2440
- let i = n.get(e);
2441
- return i || (i = $(t, l, r, e, c), n.set(e, i)), i;
2442
- }, i = /* @__PURE__ */ new Map(), s = {
2440
+ let i = e.get(t);
2441
+ return i || (i = $(n, l, r, t, c), e.set(t, i)), i;
2442
+ }, a = /* @__PURE__ */ new Map(), s = {
2443
2443
  remaining: rt,
2444
2444
  exceeded: !1
2445
- }, u = (t, n, r, o = r, c = 0, l) => {
2445
+ }, u = (e, n, r, o = r, c = 0, l) => {
2446
2446
  if (n.lineFill === null) return;
2447
- let u = n === h ? g : n.color, d = n.lineColor ?? Ne(u, .7), p = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / W) * a : Z ? .75 * a : Math.max(1, 2 * a), v = {
2447
+ let u = n === h ? g : n.color, d = n.lineColor ?? Ne(u, .7), p = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / b) * i : Z ? .75 * i : Math.max(1, 2 * i), v = {
2448
2448
  width: p,
2449
- dash: x(n.lineCustomDash, n.lineDash, p),
2449
+ dash: C(n.lineCustomDash, n.lineDash, p),
2450
2450
  dashOffset: c,
2451
2451
  lineCap: n.lineCap,
2452
2452
  startCap: r,
@@ -2454,24 +2454,24 @@ function kn(e, t, n, a, o) {
2454
2454
  lineJoin: n.lineJoin
2455
2455
  };
2456
2456
  if (!Z && l && l.length >= 2) {
2457
- let t = dt(l.map((e) => ({
2457
+ let e = dt(l.map((e) => ({
2458
2458
  ...e,
2459
2459
  cameraDepth: 0,
2460
2460
  cameraWeight: 1
2461
2461
  })), v);
2462
- if (t == null) {
2462
+ if (e == null) {
2463
2463
  m = !0;
2464
2464
  return;
2465
2465
  }
2466
- let r = i.get(n) ?? [];
2467
- for (let n of t) {
2468
- let t = qe({
2466
+ let r = a.get(n) ?? [];
2467
+ for (let n of e) {
2468
+ let e = qe({
2469
2469
  outline: n.points,
2470
- nearDepth: y.near,
2471
- farDepth: y.far
2470
+ nearDepth: _.near,
2471
+ farDepth: _.far
2472
2472
  });
2473
- if (!t) continue;
2474
- let i = Wt(_, t, d, void 0, s).map((e) => ({
2473
+ if (!e) continue;
2474
+ let i = Wt(x, e, d, void 0, s).map((e) => ({
2475
2475
  ...e,
2476
2476
  paintRole: "outline"
2477
2477
  }));
@@ -2480,147 +2480,147 @@ function kn(e, t, n, a, o) {
2480
2480
  return;
2481
2481
  }
2482
2482
  r.push(...i);
2483
- for (let t of i) f.push({
2484
- points: t.points,
2485
- cameraDepth: t.cameraDepth,
2486
- cameraDepths: t.cameraDepths,
2487
- cameraWeights: t.cameraWeights,
2483
+ for (let e of i) f.push({
2484
+ points: e.points,
2485
+ cameraDepth: e.cameraDepth,
2486
+ cameraDepths: e.cameraDepths,
2487
+ cameraWeights: e.cameraWeights,
2488
2488
  layer: 1,
2489
- paint: () => Kt(e, t)
2489
+ paint: () => Kt(t, e)
2490
2490
  });
2491
2491
  }
2492
- i.set(n, r);
2492
+ a.set(n, r);
2493
2493
  return;
2494
2494
  }
2495
- let b = dt(t, v);
2496
- if (b == null) {
2495
+ let y = dt(e, v);
2496
+ if (y == null) {
2497
2497
  m = !0;
2498
2498
  return;
2499
2499
  }
2500
- if (f.length + b.length > 1e4) {
2500
+ if (f.length + y.length > 1e4) {
2501
2501
  m = !0;
2502
2502
  return;
2503
2503
  }
2504
- for (let t of b) {
2504
+ for (let e of y) {
2505
2505
  let r = {
2506
- points: t.points,
2506
+ points: e.points,
2507
2507
  color: d,
2508
2508
  paintRole: "outline",
2509
2509
  shade: 0,
2510
- cameraDepth: t.cameraDepth,
2511
- cameraDepths: t.cameraDepths,
2512
- cameraWeights: t.cameraWeights,
2510
+ cameraDepth: e.cameraDepth,
2511
+ cameraDepths: e.cameraDepths,
2512
+ cameraWeights: e.cameraWeights,
2513
2513
  outline: !1
2514
- }, a = i.get(n) ?? [];
2515
- a.push(r), i.set(n, a), f.push({
2516
- points: t.points,
2517
- cameraDepth: t.cameraDepth,
2518
- cameraDepths: t.cameraDepths,
2519
- cameraWeights: t.cameraWeights,
2514
+ }, i = a.get(n) ?? [];
2515
+ i.push(r), a.set(n, i), f.push({
2516
+ points: e.points,
2517
+ cameraDepth: e.cameraDepth,
2518
+ cameraDepths: e.cameraDepths,
2519
+ cameraWeights: e.cameraWeights,
2520
2520
  layer: 1,
2521
- paint: () => Kt(e, r)
2521
+ paint: () => Kt(t, r)
2522
2522
  });
2523
2523
  }
2524
2524
  };
2525
2525
  if (Z) for (let e of Y) u(e, h, h.lineCap);
2526
- else for (let e of re) {
2526
+ else for (let e of X) {
2527
2527
  let t = r(e.ownerIndex);
2528
2528
  u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
2529
2529
  }
2530
- for (let [t, n] of i) Jt(e, n, "outline", t.lineFill, o);
2530
+ for (let [e, n] of a) Jt(t, n, "outline", e.lineFill, o);
2531
2531
  }
2532
- let ae = (Z ? l.showMarker === !0 || C(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2533
- if ((t.chartType.toLowerCase().includes("line") || Z) && (ae || V(l))) for (let n = 0; n < j.length; n++) {
2534
- let r = j[n];
2532
+ let ie = (Z ? l.showMarker === !0 || s(l) : l.showMarker === !0) && l.markerSymbol !== "none";
2533
+ if ((n.chartType.toLowerCase().includes("line") || Z) && (ie || z(l))) for (let e = 0; e < D.length; e++) {
2534
+ let r = D[e];
2535
2535
  if (!r) continue;
2536
- let i = G[c].get(n), s = te(l, i, "circle", ae);
2536
+ let a = W[c].get(e), s = ve(l, a, "circle", ie);
2537
2537
  if (s === "none") continue;
2538
- let u = i?.markerSize ?? l.markerSize ?? 5, d = ln(t, l, i, n, c, l.color ?? xt[c % xt.length], a);
2539
- p.push(() => en(e, r, s, Math.max(2, u) * a, d.fill === "00000000" ? "transparent" : `#${d.fill.replace(/^#/, "")}`, d.line === "00000000" ? "rgba(0,0,0,0)" : `#${d.line.replace(/^#/, "")}`, d.lineWidth, d.fillPaint, o, a, d.effectDirect, d.effectFallback, d.effectIndex, d.effectFallbackIndex, d.linePaint, d.lineDash, d.lineCustomDash, d.lineCap, d.lineJoin));
2538
+ let u = a?.markerSize ?? l.markerSize ?? 5, d = ln(n, l, a, e, c, l.color ?? xt[c % xt.length], i);
2539
+ p.push(() => en(t, r, s, Math.max(2, u) * i, d.fill === "00000000" ? "transparent" : `#${d.fill.replace(/^#/, "")}`, d.line === "00000000" ? "rgba(0,0,0,0)" : `#${d.line.replace(/^#/, "")}`, d.lineWidth, d.fillPaint, o, i, d.effectDirect, d.effectFallback, d.effectIndex, d.effectFallbackIndex, d.linePaint, d.lineDash, d.lineCustomDash, d.lineCap, d.lineJoin));
2540
2540
  }
2541
- for (let r = 0; r < j.length; r++) {
2542
- let i = j[r];
2543
- if (!i) continue;
2544
- let d = k(c, r), f = G[c].get(r), p = f?.markerSize ?? l.markerSize ?? 5, m = q[c].get(r);
2545
- nn(t, l, m) && ee.push(() => tn(e, t, l, c, r, v ? d / 100 : d, i, n, a, l.showMarker === !0 || f?.markerSymbol != null ? p * a / 2 : 0, void 0, m, "t", i, !0, t.valAxisDisplayUnits, I.max, u ? s[c][r] : d, o));
2541
+ for (let e = 0; e < D.length; e++) {
2542
+ let s = D[e];
2543
+ if (!s) continue;
2544
+ let u = N(c, e), f = W[c].get(e), p = f?.markerSize ?? l.markerSize ?? 5, m = K[c].get(e);
2545
+ nn(n, l, m) && te.push(() => tn(t, n, l, c, e, S ? u / 100 : u, s, r, i, l.showMarker === !0 || f?.markerSymbol != null ? p * i / 2 : 0, void 0, m, "t", s, !0, n.valAxisDisplayUnits, V.max, d ? a[c][e] : u, o));
2546
2546
  }
2547
2547
  }
2548
- if (m) return Yt(e, n), !0;
2548
+ if (m) return Yt(t, r), !0;
2549
2549
  for (let e of nt(f)) e.paint();
2550
2550
  for (let e of p) e();
2551
2551
  }
2552
- xn(e, t, _, I, b, T, w, a, c ? "horizontal" : "vertical"), On(e, t, _, I, b, T, w, c ? "horizontal" : "vertical", s, a), cn(e, t, n, _, I, b, T, w, c ? "horizontal" : "vertical", s, a);
2553
- let ne = Dn(t, _, I, b, T, w, c ? "horizontal" : "vertical"), J = (e, t) => {
2554
- if (t !== "low" && t !== "high") return ne;
2555
- let n = _.topology.nearDepth, r = ne.axisX, i = ne.axisY;
2556
- if (e === "value" === c) {
2557
- let e = R.y, r = R.y + R.h, a = _.project(R.x + R.w / 2, e, n), o = _.project(R.x + R.w / 2, r, n), s = a.y >= o.y ? e : r;
2552
+ xn(t, n, x, V, E, k, O, i, u ? "horizontal" : "vertical"), On(t, n, x, V, E, k, O, u ? "horizontal" : "vertical", l, i), cn(t, n, r, x, V, E, k, O, u ? "horizontal" : "vertical", l, i);
2553
+ let q = Dn(n, x, V, E, k, O, u ? "horizontal" : "vertical"), J = (e, t) => {
2554
+ if (t !== "low" && t !== "high") return q;
2555
+ let n = x.topology.nearDepth, r = q.axisX, i = q.axisY;
2556
+ if (e === "value" === u) {
2557
+ let e = U.y, r = U.y + U.h, a = x.project(U.x + U.w / 2, e, n), o = x.project(U.x + U.w / 2, r, n), s = a.y >= o.y ? e : r;
2558
2558
  i = t === "low" ? s : s === e ? r : e;
2559
2559
  } else {
2560
- let e = R.x, i = R.x + R.w, a = _.project(e, R.y + R.h / 2, n), o = _.project(i, R.y + R.h / 2, n), s = a.x <= o.x ? e : i;
2560
+ let e = U.x, i = U.x + U.w, a = x.project(e, U.y + U.h / 2, n), o = x.project(i, U.y + U.h / 2, n), s = a.x <= o.x ? e : i;
2561
2561
  r = t === "low" ? s : s === e ? i : e;
2562
2562
  }
2563
2563
  return {
2564
2564
  axisX: r,
2565
2565
  axisY: i,
2566
2566
  depth: n,
2567
- horizontalStart: _.project(R.x, i, n),
2568
- horizontalEnd: _.project(R.x + R.w, i, n),
2569
- verticalStart: _.project(r, R.y + R.h, n),
2570
- verticalEnd: _.project(r, R.y, n)
2567
+ horizontalStart: x.project(U.x, i, n),
2568
+ horizontalEnd: x.project(U.x + U.w, i, n),
2569
+ verticalStart: x.project(r, U.y + U.h, n),
2570
+ verticalEnd: x.project(r, U.y, n)
2571
2571
  };
2572
- }, Y = J("value", t.valAxisTickLabelPos), X = J("category", t.catAxisTickLabelPos), re = H(t.valAxisFontSizeHpt, a) ?? 9 * a;
2573
- if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${re}px ${Lt(t, t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = c ? "center" : "right", e.textBaseline = c ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
2574
- let { axisX: n, axisY: r, depth: o } = Y, s = _.project(R.x + R.w / 2, R.y + R.h / 2, o), l = Sn(c ? Y.horizontalStart : Y.verticalStart, c ? Y.horizontalEnd : Y.verticalEnd, s, c ? "vertical" : "horizontal");
2575
- e.textAlign = Math.abs(l.x) < .2 ? "center" : l.x < 0 ? "right" : "left", e.textBaseline = Math.abs(l.y) < .2 ? "middle" : l.y < 0 ? "bottom" : "top";
2576
- let u = En(t.valAxisMajorTickMark, t.valAxisLineHidden, a, 5), d = t.valAxisDisplayUnits?.divisor;
2577
- for (let a of I.majorTicks) {
2578
- let s = c ? _.project(R.x + I.fraction(a) * R.w, r, o) : _.project(n, R.y + R.h - I.fraction(a) * R.h, o);
2579
- B(e, i(v ? a / 100 : d != null && Number.isFinite(d) && d > 0 ? a / d : a, v ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + l.x * u, s.y + l.y * u, K(re));
2572
+ }, Y = J("value", n.valAxisTickLabelPos), ne = J("category", n.catAxisTickLabelPos), X = G(n.valAxisFontSizeHpt, i) ?? 9 * i;
2573
+ if (t.font = `${n.valAxisFontItalic ? "italic " : ""}${n.valAxisFontBold ? "bold " : ""}${X}px ${Lt(n, n.valAxisFontFace)}`, t.fillStyle = n.valAxisFontColor ? `#${n.valAxisFontColor}` : "#595959", t.textAlign = u ? "center" : "right", t.textBaseline = u ? "top" : "middle", !n.valAxisHidden && n.valAxisTickLabelPos !== "none") {
2574
+ let { axisX: e, axisY: r, depth: o } = Y, s = x.project(U.x + U.w / 2, U.y + U.h / 2, o), c = Sn(u ? Y.horizontalStart : Y.verticalStart, u ? Y.horizontalEnd : Y.verticalEnd, s, u ? "vertical" : "horizontal");
2575
+ t.textAlign = Math.abs(c.x) < .2 ? "center" : c.x < 0 ? "right" : "left", t.textBaseline = Math.abs(c.y) < .2 ? "middle" : c.y < 0 ? "bottom" : "top";
2576
+ let l = En(n.valAxisMajorTickMark, n.valAxisLineHidden, i, 5), d = n.valAxisDisplayUnits?.divisor;
2577
+ for (let i of V.majorTicks) {
2578
+ let s = u ? x.project(U.x + V.fraction(i) * U.w, r, o) : x.project(e, U.y + U.h - V.fraction(i) * U.h, o);
2579
+ R(t, a(S ? i / 100 : d != null && Number.isFinite(d) && d > 0 ? i / d : i, S ? n.valAxisFormatCode ?? "0%" : n.valAxisFormatCode, n.date1904), s.x + c.x * l, s.y + c.y * l, _e(X));
2580
2580
  }
2581
2581
  }
2582
- let Z = H(t.catAxisFontSizeHpt, a) ?? 9 * a;
2583
- if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${Z}px ${Lt(t, t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
2584
- let n = me(En(t.catAxisMajorTickMark, t.catAxisLineHidden, a, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: b }, (e, n) => he(String(y[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), o = Xt(t);
2585
- if (o == null && (o = 0, !c && b > 1)) {
2586
- let t = Infinity, n = null, a = X.axisY;
2587
- for (let e = 0; e < b; e++) {
2588
- let i = r(e, b, T, w), o = _.project(R.x + i * R.w, a, _.topology.nearDepth);
2589
- n && (t = Math.min(t, Math.hypot(o.x - n.x, o.y - n.y))), n = o;
2582
+ let Z = G(n.catAxisFontSizeHpt, i) ?? 9 * i;
2583
+ if (t.font = `${n.catAxisFontItalic ? "italic " : ""}${n.catAxisFontBold ? "bold " : ""}${Z}px ${Lt(n, n.catAxisFontFace)}`, t.fillStyle = n.catAxisFontColor ? `#${n.catAxisFontColor}` : "#595959", !n.catAxisHidden && n.catAxisTickLabelPos !== "none") {
2584
+ let e = c(En(n.catAxisMajorTickMark, n.catAxisLineHidden, i, 6), n.catAxisLabelOffsetPercent), r = Array.from({ length: E }, (e, t) => he(String(T[t] ?? t + 1), n.catAxisFormatCode, n.date1904)), a = Xt(n);
2585
+ if (a == null && (a = 0, !u && E > 1)) {
2586
+ let e = Infinity, n = null, i = ne.axisY;
2587
+ for (let t = 0; t < E; t++) {
2588
+ let r = v(t, E, k, O), a = x.project(U.x + r * U.w, i, x.topology.nearDepth);
2589
+ n && (e = Math.min(e, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
2590
2590
  }
2591
- Math.max(0, ...i.map((t) => M(e, t))) > t * .9 && (o = -Math.PI / 4);
2591
+ Math.max(0, ...r.map((e) => w(t, e))) > e * .9 && (a = -Math.PI / 4);
2592
2592
  }
2593
- let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
2594
- for (let t = 0; t < b; t += s) {
2595
- let a = r(t, b, T, w), { axisX: s, axisY: l, depth: u } = X, d = c ? _.project(s, R.y + r(t, b, T, w) * R.h, u) : _.project(R.x + a * R.w, l, u);
2596
- if (c) {
2597
- let r = _.project(s, R.y + R.h / 2, u), a = _.project(R.x + R.w / 2, R.y + R.h / 2, u), o = r.x <= a.x;
2598
- e.textAlign = o ? "right" : "left", e.textBaseline = "middle", B(e, i[t], d.x + (o ? -n : n), d.y, K(Z));
2593
+ let o = Math.max(1, Math.floor(n.catAxisTickLabelSkip ?? 1));
2594
+ for (let n = 0; n < E; n += o) {
2595
+ let i = v(n, E, k, O), { axisX: o, axisY: s, depth: c } = ne, l = u ? x.project(o, U.y + v(n, E, k, O) * U.h, c) : x.project(U.x + i * U.w, s, c);
2596
+ if (u) {
2597
+ let i = x.project(o, U.y + U.h / 2, c), a = x.project(U.x + U.w / 2, U.y + U.h / 2, c), s = i.x <= a.x;
2598
+ t.textAlign = s ? "right" : "left", t.textBaseline = "middle", R(t, r[n], l.x + (s ? -e : e), l.y, _e(Z));
2599
2599
  } else {
2600
- let r = _.project(R.x + R.w / 2, R.y + R.h / 2, u), a = Sn(X.horizontalStart, X.horizontalEnd, r, "vertical");
2601
- $t(e, i[t], d, o, c, a.y < 0 ? -1 : 1, n, K(Z));
2600
+ let i = x.project(U.x + U.w / 2, U.y + U.h / 2, c), o = Sn(ne.horizontalStart, ne.horizontalEnd, i, "vertical");
2601
+ $t(t, r[n], l, a, u, o.y < 0 ? -1 : 1, e, _e(Z));
2602
2602
  }
2603
2603
  }
2604
2604
  }
2605
- sn(e, t, n, f, c, a);
2606
- for (let e of ee) e();
2607
- return fn(e, t, p, a, !1, h, o), !0;
2605
+ sn(t, n, r, m, u, i);
2606
+ for (let e of te) e();
2607
+ return fn(t, n, h, i, !1, _, o), !0;
2608
2608
  }
2609
- function An(e, t, n, r, i) {
2610
- if (!t.threeD || t.chartType !== "pie") return !1;
2611
- let a = t.series[0];
2612
- if (!a) return !0;
2613
- let o = a.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2609
+ function An(t, n, r, i, a) {
2610
+ if (!n.threeD || n.chartType !== "pie") return !1;
2611
+ let o = n.series[0];
2612
+ if (!o) return !0;
2613
+ let s = o.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
2614
2614
  index: t,
2615
2615
  value: Math.abs(e)
2616
- }] : []), s = 0;
2617
- for (let e of o) s = Math.max(s, e.value);
2618
- if (!(s > 0)) return !0;
2619
- let c = o.reduce((e, t) => e + t.value / s, 0);
2620
- if (!(c > 0) || !Number.isFinite(c)) return !0;
2621
- let { plot: u, legend: d, legendMeasure: f } = rn(e, t, n, r, "radial", i), p = Te({
2622
- ...t.threeD,
2623
- rotationY: t.threeD.rotationY ?? 0,
2616
+ }] : []), c = 0;
2617
+ for (let e of s) c = Math.max(c, e.value);
2618
+ if (!(c > 0)) return !0;
2619
+ let l = s.reduce((e, t) => e + t.value / c, 0);
2620
+ if (!(l > 0) || !Number.isFinite(l)) return !0;
2621
+ let { plot: u, legend: d, legendMeasure: f } = rn(t, n, r, i, "radial", a), p = Te({
2622
+ ...n.threeD,
2623
+ rotationY: n.threeD.rotationY ?? 0,
2624
2624
  heightPercent: void 0,
2625
2625
  depthPercent: 100
2626
2626
  }, u, {
@@ -2628,139 +2628,139 @@ function An(e, t, n, r, i) {
2628
2628
  sceneHeightScale: .15
2629
2629
  });
2630
2630
  if (!p) return !0;
2631
- let h = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), g = 0;
2632
- for (let e of h.values()) e.explosion != null && Number.isFinite(e.explosion) && (g = Math.max(g, Math.max(0, Math.min(100, e.explosion)) / 100));
2633
- let { scene: _ } = p, v = Math.min(_.w * .45 / (1 + g), p.modelDepth * .45 / (1 + g), _.h / .45);
2631
+ let m = new Map(o.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
2632
+ for (let e of m.values()) e.explosion != null && Number.isFinite(e.explosion) && (h = Math.max(h, Math.max(0, Math.min(100, e.explosion)) / 100));
2633
+ let { scene: _ } = p, v = Math.min(_.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), _.h / .45);
2634
2634
  if (!(v > 0)) return !0;
2635
- let y = _.x + _.w / 2, b = _.y + _.h / 2, S = .5, C = v * .3 * Ae(t.threeD), w = 0, T = [], E = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), D = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * v / 4)));
2636
- for (let e of o) {
2637
- let n = e.value / s / c, r = mn(t.firstSliceAngle, w, n), i = h.get(e.index), o = $(t, a, i, e.index, 0), l = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = y + Math.cos(l) * v * u, f = S + Math.sin(l) * v * u / p.modelDepth, m = Math.max(2, Math.ceil(D * n)), g = Je({
2635
+ let y = _.x + _.w / 2, x = _.y + _.h / 2, S = .5, w = v * .3 * Ae(n.threeD), T = 0, E = [], D = new Map(o.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), O = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * v / 4)));
2636
+ for (let e of s) {
2637
+ let t = e.value / c / l, r = mn(n.firstSliceAngle, T, t), i = m.get(e.index), a = $(n, o, i, e.index, 0), s = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = y + Math.cos(s) * v * u, f = S + Math.sin(s) * v * u / p.modelDepth, h = Math.max(2, Math.ceil(O * t)), g = Je({
2638
2638
  centerX: d,
2639
- centerY: b,
2639
+ centerY: x,
2640
2640
  centerDepth: f,
2641
2641
  radius: v,
2642
2642
  modelDepth: p.modelDepth,
2643
- thickness: C,
2643
+ thickness: w,
2644
2644
  startAngle: r.start,
2645
2645
  endAngle: r.end,
2646
- segments: m
2646
+ segments: h
2647
2647
  });
2648
2648
  if (!g) {
2649
- w += n;
2649
+ T += t;
2650
2650
  continue;
2651
2651
  }
2652
- T.push({
2652
+ E.push({
2653
2653
  index: e.index,
2654
2654
  start: r.start,
2655
2655
  end: r.end,
2656
- color: o.fill === null ? "transparent" : o.color,
2657
- fillPaint: o.fill,
2656
+ color: a.fill === null ? "transparent" : a.color,
2657
+ fillPaint: a.fill,
2658
2658
  value: e.value,
2659
- percentValue: n,
2659
+ percentValue: t,
2660
2660
  centerX: d,
2661
2661
  centerDepth: f,
2662
- segments: m,
2662
+ segments: h,
2663
2663
  mesh: g,
2664
- lineColor: o.lineColor,
2665
- lineFill: o.lineFill,
2666
- lineWidthEmu: o.lineWidthEmu ?? null,
2667
- lineDash: o.lineDash ?? "solid",
2668
- lineCustomDash: o.lineCustomDash,
2669
- lineCap: o.lineCap,
2670
- lineJoin: o.lineJoin
2671
- }), w += n;
2672
- }
2673
- p = Me(p, T.flatMap((e) => e.mesh.vertices), u, .08);
2674
- let O = [], k = {
2664
+ lineColor: a.lineColor,
2665
+ lineFill: a.lineFill,
2666
+ lineWidthEmu: a.lineWidthEmu ?? null,
2667
+ lineDash: a.lineDash ?? "solid",
2668
+ lineCustomDash: a.lineCustomDash,
2669
+ lineCap: a.lineCap,
2670
+ lineJoin: a.lineJoin
2671
+ }), T += t;
2672
+ }
2673
+ p = Me(p, E.flatMap((e) => e.mesh.vertices), u, .08);
2674
+ let k = [], A = {
2675
2675
  remaining: rt,
2676
2676
  exceeded: !1
2677
- }, A = (e) => {
2678
- let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / W * r);
2677
+ }, j = (e) => {
2678
+ let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / b * i);
2679
2679
  return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
2680
2680
  color: e.lineColor ?? "rgba(0,0,0,0.42)",
2681
2681
  width: t,
2682
- dash: x(e.lineCustomDash, e.lineDash, t),
2682
+ dash: C(e.lineCustomDash, e.lineDash, t),
2683
2683
  cap: e.lineCap,
2684
2684
  join: e.lineJoin
2685
2685
  } : void 0;
2686
- }, j = T.map((t) => {
2687
- let n = Wt(p, t.mesh, t.color, void 0, k);
2688
- return Jt(e, n, "fill", t.fillPaint, i), {
2689
- slice: t,
2686
+ }, M = E.map((e) => {
2687
+ let n = Wt(p, e.mesh, e.color, void 0, A);
2688
+ return Jt(t, n, "fill", e.fillPaint, a), {
2689
+ slice: e,
2690
2690
  faces: n
2691
2691
  };
2692
- }), M = j.flatMap((e) => e.faces), P = [], F = T.map(A), I = F[0], L = (e) => e == null ? null : [
2692
+ }), N = M.flatMap((e) => e.faces), P = [], F = E.map(j), I = F[0], L = (e) => e == null ? null : [
2693
2693
  e.color,
2694
2694
  e.width,
2695
2695
  e.dash.join(","),
2696
2696
  e.cap,
2697
2697
  e.join
2698
- ].join("|"), R = I != null && T.every((e) => e.lineFill === void 0) && F.every((e) => L(e) === L(I)) && T.every((e) => Math.abs(e.centerX - y) < 1e-9 && Math.abs(e.centerDepth - S) < 1e-9);
2699
- if (R) P.push(...Gt(p, T, b, v, C, I, k));
2700
- else for (let t = 0; t < T.length; t++) {
2701
- let n = F[t];
2698
+ ].join("|"), R = I != null && E.every((e) => e.lineFill === void 0) && F.every((e) => L(e) === L(I)) && E.every((e) => Math.abs(e.centerX - y) < 1e-9 && Math.abs(e.centerDepth - S) < 1e-9);
2699
+ if (R) P.push(...Gt(p, E, x, v, w, I, A));
2700
+ else for (let e = 0; e < E.length; e++) {
2701
+ let n = F[e];
2702
2702
  if (!n) continue;
2703
- let r = Wt(p, T[t].mesh, "transparent", n, k, !0);
2704
- Jt(e, r, "outline", T[t].lineFill, i), P.push(...r);
2703
+ let r = Wt(p, E[e].mesh, "transparent", n, A, !0);
2704
+ Jt(t, r, "outline", E[e].lineFill, a), P.push(...r);
2705
2705
  }
2706
- if (k.exceeded) return Yt(e, n), !0;
2706
+ if (A.exceeded) return Yt(t, r), !0;
2707
2707
  if (R) {
2708
- for (let t of nt(M)) Kt(e, t);
2709
- for (let t of nt(P)) Kt(e, t);
2710
- } else for (let t of nt([...M, ...P])) Kt(e, t);
2711
- for (let { slice: n, faces: i } of j) {
2712
- let o = h.get(n.index), s = Le(t, a, n.index, 0), c = m(o?.chartexStyle);
2713
- xe(e, c ?? m(a.chartexStyle), l(t, "dataPoint3D", 0), c ? n.index : s, r, (e) => qt(e, i), s);
2714
- }
2715
- for (let n of T) {
2716
- let o = (n.start + n.end) / 2, s = E.get(n.index);
2717
- if (nn(t, a, s)) {
2718
- let c = a.seriesDataLabels, l = H(s?.fontSizeHpt ?? c?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
2719
- e.font = `${s?.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace)}`;
2720
- let d = N({
2708
+ for (let e of nt(N)) Kt(t, e);
2709
+ for (let e of nt(P)) Kt(t, e);
2710
+ } else for (let e of nt([...N, ...P])) Kt(t, e);
2711
+ for (let { slice: r, faces: a } of M) {
2712
+ let s = m.get(r.index), c = Le(n, o, r.index, 0), l = g(s?.chartexStyle);
2713
+ xe(t, l ?? g(o.chartexStyle), e(n, "dataPoint3D", 0), l ? r.index : c, i, (e) => qt(e, a), c);
2714
+ }
2715
+ for (let e of E) {
2716
+ let r = (e.start + e.end) / 2, s = D.get(e.index);
2717
+ if (nn(n, o, s)) {
2718
+ let c = o.seriesDataLabels, l = G(s?.fontSizeHpt ?? c?.fontSizeHpt ?? n.dataLabelFontSizeHpt, i) ?? 9 * i;
2719
+ t.font = `${s?.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ? "bold " : ""}${l}px ${Rt(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace)}`;
2720
+ let d = B({
2721
2721
  customText: s?.text,
2722
2722
  showCategory: s?.showCatName ?? c?.showCatName ?? !1,
2723
2723
  showSeries: s?.showSerName ?? c?.showSerName ?? !1,
2724
- showValue: s?.showVal ?? c?.showVal ?? t.showDataLabels,
2724
+ showValue: s?.showVal ?? c?.showVal ?? n.showDataLabels,
2725
2725
  showPercent: s?.showPercent ?? c?.showPercent ?? !1,
2726
- category: a.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
2727
- seriesName: a.name || "Series 1",
2728
- sourceValue: n.value,
2729
- percentRatio: n.percentValue,
2730
- formatCode: s?.formatCode ?? c?.formatCode ?? t.dataLabelFormatCode ?? a.valFormatCode,
2726
+ category: o.categories?.[e.index] ?? n.categories[e.index] ?? `${e.index + 1}`,
2727
+ seriesName: o.name || "Series 1",
2728
+ sourceValue: e.value,
2729
+ percentRatio: e.percentValue,
2730
+ formatCode: s?.formatCode ?? c?.formatCode ?? n.dataLabelFormatCode ?? o.valFormatCode,
2731
2731
  separator: s?.separator ?? c?.separator,
2732
- date1904: t.date1904
2733
- }), f = Rt(t, s?.fontFace ?? c?.fontFace ?? t.dataLabelFontFace), m = s?.text && s.richRuns?.length ? Fe(e, {
2732
+ date1904: n.date1904
2733
+ }), f = Rt(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace), m = s?.text && s.richRuns?.length ? Fe(t, {
2734
2734
  runs: s.richRuns,
2735
- ptToPx: r,
2735
+ ptToPx: i,
2736
2736
  fontFamily: f,
2737
- fallbackBold: s.fontBold ?? c?.fontBold ?? t.dataLabelFontBold ?? !1,
2738
- fontFamilyForFace: (e) => Rt(t, e)
2739
- }, l, `#${s.fontColor ?? c?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? t.dataLabelPosition, g = b - C / 2, _ = b + C / 2, y = p.cameraDepth(n.centerX, g, n.centerDepth) >= p.cameraDepth(n.centerX, _, n.centerDepth) ? g : _, x = 0, S = null;
2740
- for (let e = 0; e <= 12; e++) {
2741
- let t = n.start + (n.end - n.start) * e / 12, r = p.project(n.centerX + Math.cos(t) * v * .64, y, n.centerDepth + Math.sin(t) * v * .64 / p.modelDepth);
2742
- S && (x += Math.hypot(r.x - S.x, r.y - S.y)), S = r;
2737
+ fallbackBold: s.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ?? !1,
2738
+ fontFamilyForFace: (e) => Rt(n, e)
2739
+ }, l, `#${s.fontColor ?? c?.fontColor ?? o.labelColor ?? n.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? n.dataLabelPosition, g = x - w / 2, _ = x + w / 2, y = p.cameraDepth(e.centerX, g, e.centerDepth) >= p.cameraDepth(e.centerX, _, e.centerDepth) ? g : _, b = 0, S = null;
2740
+ for (let t = 0; t <= 12; t++) {
2741
+ let n = e.start + (e.end - e.start) * t / 12, r = p.project(e.centerX + Math.cos(n) * v * .64, y, e.centerDepth + Math.sin(n) * v * .64 / p.modelDepth);
2742
+ S && (b += Math.hypot(r.x - S.x, r.y - S.y)), S = r;
2743
2743
  }
2744
- let w = (h == null || h === "bestFit") && (n.percentValue === 0 || x < (m?.width ?? e.measureText(d).width)) || h === "outEnd", T = v * (w ? 1.12 : .64), E = p.project(n.centerX + Math.cos(o) * T, y, n.centerDepth + Math.sin(o) * T / p.modelDepth), D = p.project(n.centerX + Math.cos(o) * v, y, n.centerDepth + Math.sin(o) * v / p.modelDepth);
2745
- O.push(() => tn(e, t, a, 0, n.index, n.value, E, u, r, 0, n.percentValue, s, "ctr", D, w, void 0, void 0, void 0, i));
2744
+ let C = (h == null || h === "bestFit") && (e.percentValue === 0 || b < (m?.width ?? t.measureText(d).width)) || h === "outEnd", T = v * (C ? 1.12 : .64), E = p.project(e.centerX + Math.cos(r) * T, y, e.centerDepth + Math.sin(r) * T / p.modelDepth), D = p.project(e.centerX + Math.cos(r) * v, y, e.centerDepth + Math.sin(r) * v / p.modelDepth);
2745
+ k.push(() => tn(t, n, o, 0, e.index, e.value, E, u, i, 0, e.percentValue, s, "ctr", D, C, void 0, void 0, void 0, a));
2746
2746
  }
2747
2747
  }
2748
- for (let e of O) e();
2749
- let z = a.categories?.length ? a.categories : t.categories, B = Array.from({ length: z.length }, (e, n) => {
2750
- let r = h.get(n), i = Re(t, a, r, n, 0);
2748
+ for (let e of k) e();
2749
+ let z = o.categories?.length ? o.categories : n.categories, V = Array.from({ length: z.length }, (e, t) => {
2750
+ let r = m.get(t), i = Re(n, o, r, t, 0);
2751
2751
  if (i === null) return "00000000";
2752
- let o = i?.fillType === "solid" ? i.color : r?.color ?? a.dataPointColors?.[n] ?? a.color;
2753
- return o === "00000000" ? "00000000" : Ne(o ? `#${o}` : Dt(n), .8).replace(/^#/, "");
2752
+ let a = i?.fillType === "solid" ? i.color : r?.color ?? o.dataPointColors?.[t] ?? o.color;
2753
+ return a === "00000000" ? "00000000" : Ne(a ? `#${a}` : Dt(t), .8).replace(/^#/, "");
2754
2754
  });
2755
- return fn(e, {
2756
- ...t,
2755
+ return fn(t, {
2756
+ ...n,
2757
2757
  categories: z,
2758
2758
  series: [{
2759
- ...a,
2759
+ ...o,
2760
2760
  categories: z,
2761
- dataPointColors: B
2761
+ dataPointColors: V
2762
2762
  }]
2763
- }, d, r, !0, f, i), !0;
2763
+ }, d, i, !0, f, a), !0;
2764
2764
  }
2765
2765
  function jn(e, t, n, r, i = 0) {
2766
2766
  return !t.threeD || !(t.chartType === "pie" || wt.has(t.chartType)) ? !1 : Mt(t) ? An(e, t, n, r, i) ? !0 : kn(e, t, n, r, i) : (Yt(e, n), !0);