@silurus/ooxml 0.84.1 → 0.85.1

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 (68) hide show
  1. package/README.md +44 -18
  2. package/dist/assets/render-worker-BRKOyWVH.js +24 -0
  3. package/dist/assets/render-worker-CtLMFj9r.js +10 -0
  4. package/dist/assets/render-worker-NZPOUOTU.js +11 -0
  5. package/dist/{canvas-viewer-mechanics-CIfhCgYA.js → canvas-viewer-mechanics-CfRzOhz5.js} +308 -234
  6. package/dist/chart-ex.mjs +270 -270
  7. package/dist/{comment-ui-runtime-CdMMApEN.js → comment-ui-runtime-CAbpuWi_.js} +4 -4
  8. package/dist/{comment-ui-runtime-C5qimVMD.js → comment-ui-runtime-DAKBCpsM.js} +5 -5
  9. package/dist/comment-ui-runtime-DTaaZdXC.js +2 -0
  10. package/dist/{comments-BAlAyIhb.js → comments-Brfxa3hQ.js} +1 -1
  11. package/dist/{document-pull-client-BXw6AAhY.js → document-pull-client-BkHHIdR4.js} +4661 -4357
  12. package/dist/{docx-BA1vB0V-.js → docx-_uelcAui.js} +338 -304
  13. package/dist/docx.mjs +7 -6
  14. package/dist/docx_parser_bg.wasm +0 -0
  15. package/dist/{dom-interaction-boundary-DS6BVyHA.js → dom-interaction-boundary-CMDDgICk.js} +1 -1
  16. package/dist/index.mjs +3 -3
  17. package/dist/line-distribute-CiKeWjBF.js +1023 -0
  18. package/dist/{line-metrics-CXyjyYd5.js → line-metrics-u87yCAfV.js} +2182 -705
  19. package/dist/math.mjs +2 -2
  20. package/dist/node.mjs +404 -394
  21. package/dist/pixel-budget-Dgjw269h.js +37 -0
  22. package/dist/{plot-area-frame-DuXZzovH.js → plot-area-frame-D5hEOgkJ.js} +691 -1418
  23. package/dist/{pptx-C17oBD8Z.js → pptx-WpBbS0mq.js} +255 -222
  24. package/dist/pptx.mjs +7 -6
  25. package/dist/pptx_parser_bg.wasm +0 -0
  26. package/dist/raster-target-whZhvVMt.js +87 -0
  27. package/dist/region-map.mjs +5 -5
  28. package/dist/{render-CVeGktZG.js → render-DrAAZWwH.js} +9 -6
  29. package/dist/{render-worker-host-BbhwA24Y.js → render-worker-host-CBVe8aeD.js} +1 -1
  30. package/dist/{render-worker-host-BWdhjVH_.js → render-worker-host-CHlwYJdK.js} +1 -1
  31. package/dist/{render-worker-host-CbaQivE7.js → render-worker-host-XDMsyVsv.js} +1 -1
  32. package/dist/{renderer-Bmky2yBc.js → renderer-XFSCOT6m.js} +1937 -1936
  33. package/dist/resource-measurement-6uR3Huao.js +150 -0
  34. package/dist/{session-Cl0RVnMs.js → session-DoPwA4gv.js} +79 -79
  35. package/dist/{slide-pull-client-BS0EeZo2.js → slide-pull-client-8i8C4VyD.js} +1054 -824
  36. package/dist/{three-d-B7LsKeOS.js → three-d-YYghQndN.js} +109 -110
  37. package/dist/three-d.mjs +726 -726
  38. package/dist/tiff.mjs +664 -78
  39. package/dist/types/chart-ex.d.ts +2 -2
  40. package/dist/types/docx.d.ts +31 -13
  41. package/dist/types/index.d.ts +46 -21
  42. package/dist/types/math.d.ts +1 -1
  43. package/dist/types/node.d.ts +11 -7
  44. package/dist/types/pptx.d.ts +35 -15
  45. package/dist/types/region-map.d.ts +2 -2
  46. package/dist/types/three-d.d.ts +2 -2
  47. package/dist/types/tiff.d.ts +13 -3
  48. package/dist/types/xlsx.d.ts +30 -13
  49. package/dist/{worksheet-pull-client-B0zfEVau.js → worksheet-pull-client-Btydoxto.js} +47 -47
  50. package/dist/{xlsx-FyKAiNo-.js → xlsx-Bd16V4Xx.js} +1395 -1196
  51. package/dist/xlsx.mjs +7 -6
  52. package/package.json +2 -2
  53. package/dist/assets/render-worker-BWPpayBu.js +0 -10
  54. package/dist/assets/render-worker-CiEWCh_T.js +0 -11
  55. package/dist/assets/render-worker-Cpmy3GDF.js +0 -24
  56. package/dist/comment-ui-runtime-aPzHfV_A.js +0 -2
  57. package/dist/line-distribute-MqInuujx.js +0 -1003
  58. package/dist/resource-measurement-esyGbzAF.js +0 -120
  59. package/dist/tiff-contract-Xjn3qXqK.js +0 -69
  60. /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-tj54AXXB.js} +0 -0
  61. /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-DBcYVJDv.js} +0 -0
  62. /package/dist/{mathjax-DPEX346v.js → mathjax-DS69BmJd.js} +0 -0
  63. /package/dist/{read-only-comment-decoration-BYCXoSdC.js → read-only-comment-decoration-Mv_SAiHy.js} +0 -0
  64. /package/dist/{read-only-comment-margin-C7b3l0ro.js → read-only-comment-margin-Cqu-Ir0C.js} +0 -0
  65. /package/dist/{renderer-module-contract-C6sYZvTV.js → renderer-module-contract-Cu-GKuPd.js} +0 -0
  66. /package/dist/{source-key-DORuuFb-.js → source-key-BkBB3X82.js} +0 -0
  67. /package/dist/{transfer-vNOFQuvv.js → transfer-mIj7E7NB.js} +0 -0
  68. /package/dist/{visible-index-DwJzuGmJ.js → visible-index-DPoQYSDt.js} +0 -0
@@ -1,5 +1,4 @@
1
- import { c as e, l as t } from "./tiff-contract-Xjn3qXqK.js";
2
- import { Bt as n, D as r, F as i, I as a, M as o, N as s, O as c, P as l, _ as u, a as d, b as f, nn as p, rn as m, tn as h, v as g } from "./plot-area-frame-DuXZzovH.js";
1
+ import { F as e, Ht as t, I as n, L as r, O as i, P as a, R as o, _ as s, a as c, an as l, b as u, gn as d, hn as f, in as p, k as m, rn as h, v as g } from "./plot-area-frame-D5hEOgkJ.js";
3
2
  import { r as _ } from "./units-EJdC96r6.js";
4
3
  //#region packages/core/src/canvas/clamp.ts
5
4
  var v = 32767, y = 1 << 24;
@@ -53,60 +52,60 @@ function T(e, t) {
53
52
  }
54
53
  });
55
54
  }
56
- function E(t, n, r, i, a, o, s, c = 0, l) {
57
- let d = Math.max(0, S(i.blur, a)), f = S(i.dist, a), p = i.rotWithShape === !1 ? 0 : c, m = (i.dir + p) * Math.PI / 180, h = Math.cos(m) * f, g = Math.sin(m) * f, _ = w(r, Math.ceil(d * 3 + Math.max(Math.abs(h), Math.abs(g))) + 2, o, s), v = e(_.w, _.h);
55
+ function E(e, t, n, r, i, a, o, c = 0, l) {
56
+ let u = Math.max(0, S(r.blur, i)), d = S(r.dist, i), p = r.rotWithShape === !1 ? 0 : c, m = (r.dir + p) * Math.PI / 180, h = Math.cos(m) * d, g = Math.sin(m) * d, _ = w(n, Math.ceil(u * 3 + Math.max(Math.abs(h), Math.abs(g))) + 2, a, o), v = f(_.w, _.h);
58
57
  if (!v) return !1;
59
58
  let y = C(v);
60
59
  if (!y) return !1;
61
- n(T(y, _)), y.save(), y.setTransform(1, 0, 0, 1, 0, 0), y.globalCompositeOperation = "source-in", y.fillStyle = u(i.color, i.alpha), y.fillRect(0, 0, _.w, _.h), y.restore(), t.save(), d > 0 && (t.filter = `blur(${d}px)`);
62
- let [b, E] = l ?? x(r, i.algn ?? "b"), D = i.sx ?? 1, O = i.sy ?? 1, k = Math.tan((i.kx ?? 0) * Math.PI / 180), A = Math.tan((i.ky ?? 0) * Math.PI / 180);
63
- return t.translate(h, g), t.translate(b, E), p !== 0 && t.rotate(p * Math.PI / 180), t.transform(D, A, k, O, 0, 0), p !== 0 && t.rotate(-p * Math.PI / 180), t.translate(-b, -E), t.drawImage(v, _.x, _.y), t.restore(), !0;
60
+ t(T(y, _)), y.save(), y.setTransform(1, 0, 0, 1, 0, 0), y.globalCompositeOperation = "source-in", y.fillStyle = s(r.color, r.alpha), y.fillRect(0, 0, _.w, _.h), y.restore(), e.save(), u > 0 && (e.filter = `blur(${u}px)`);
61
+ let [b, E] = l ?? x(n, r.algn ?? "b"), D = r.sx ?? 1, O = r.sy ?? 1, k = Math.tan((r.kx ?? 0) * Math.PI / 180), A = Math.tan((r.ky ?? 0) * Math.PI / 180);
62
+ return e.translate(h, g), e.translate(b, E), p !== 0 && e.rotate(p * Math.PI / 180), e.transform(D, A, k, O, 0, 0), p !== 0 && e.rotate(-p * Math.PI / 180), e.translate(-b, -E), e.drawImage(v, _.x, _.y), e.restore(), !0;
64
63
  }
65
- function D(t, n, r, i, a, o, s) {
66
- let c = S(i.blur, a), l = S(i.dist, a), d = i.dir * Math.PI / 180, f = Math.cos(d) * l, p = Math.sin(d) * l, m = w(r, Math.ceil(3 * c + Math.abs(l)) + 2, o, s), h = e(m.w, m.h);
64
+ function D(e, t, n, r, i, a, o) {
65
+ let c = S(r.blur, i), l = S(r.dist, i), u = r.dir * Math.PI / 180, d = Math.cos(u) * l, p = Math.sin(u) * l, m = w(n, Math.ceil(3 * c + Math.abs(l)) + 2, a, o), h = f(m.w, m.h);
67
66
  if (!h) return;
68
67
  let g = C(h);
69
68
  if (!g) return;
70
69
  let _ = T(g, m);
71
- _.save(), _.fillStyle = u(i.color, i.alpha), n(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-out", _.filter = c > 0 ? `blur(${c}px)` : "none", _.translate(f, p), _.fillStyle = "#000", n(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-in", _.filter = "none", _.fillStyle = "#000", n(_), _.restore(), t.save(), t.drawImage(h, m.x, m.y), t.restore();
70
+ _.save(), _.fillStyle = s(r.color, r.alpha), t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-out", _.filter = c > 0 ? `blur(${c}px)` : "none", _.translate(d, p), _.fillStyle = "#000", t(_), _.restore(), _.save(), _.globalCompositeOperation = "destination-in", _.filter = "none", _.fillStyle = "#000", t(_), _.restore(), e.save(), e.drawImage(h, m.x, m.y), e.restore();
72
71
  }
73
- function O(t, n, r, i, a, o, s, c) {
74
- let l = S(i.radius, a);
75
- if (l <= 0) {
76
- n(t);
72
+ function O(e, t, n, r, i, a, o, s) {
73
+ let c = S(r.radius, i);
74
+ if (c <= 0) {
75
+ t(e);
77
76
  return;
78
77
  }
79
- let u = w(r, Math.ceil(l) + 2, o, s), d = r.x - u.x, f = r.y - u.y, p = e(u.w, u.h);
78
+ let l = w(n, Math.ceil(c) + 2, a, o), u = n.x - l.x, d = n.y - l.y, p = f(l.w, l.h);
80
79
  if (!p) {
81
- n(t);
80
+ t(e);
82
81
  return;
83
82
  }
84
83
  let m = C(p);
85
84
  if (!m) {
86
- n(t);
85
+ t(e);
87
86
  return;
88
87
  }
89
- let h = T(m, u), g = c ?? n;
90
- n(h);
91
- let _ = e(u.w, u.h), v = e(u.w, u.h), y = _ ? C(_) : null, b = v ? C(v) : null;
88
+ let h = T(m, l), g = s ?? t;
89
+ t(h);
90
+ let _ = f(l.w, l.h), v = f(l.w, l.h), y = _ ? C(_) : null, b = v ? C(v) : null;
92
91
  if (_ && y && v && b) {
93
- let e = T(y, u);
94
- e.fillStyle = "#000", g(e), b.drawImage(p, d, f, r.w, r.h, d - l, f - l, r.w + l * 2, r.h + l * 2), b.drawImage(p, 0, 0), b.globalCompositeOperation = "destination-in", b.filter = `blur(${l / 3}px)`, b.drawImage(_, 0, 0), b.filter = "none", b.globalCompositeOperation = "source-over", t.save(), t.drawImage(v, u.x, u.y), t.restore();
92
+ let t = T(y, l);
93
+ t.fillStyle = "#000", g(t), b.drawImage(p, u, d, n.w, n.h, u - c, d - c, n.w + c * 2, n.h + c * 2), b.drawImage(p, 0, 0), b.globalCompositeOperation = "destination-in", b.filter = `blur(${c / 3}px)`, b.drawImage(_, 0, 0), b.filter = "none", b.globalCompositeOperation = "source-over", e.save(), e.drawImage(v, l.x, l.y), e.restore();
95
94
  return;
96
95
  }
97
- t.save(), t.drawImage(p, 0, 0), t.restore();
96
+ e.save(), e.drawImage(p, 0, 0), e.restore();
98
97
  }
99
- function k(t, n, r, i, a, o, s) {
100
- let c = e(o, s);
98
+ function k(e, t, n, r, i, a, o) {
99
+ let s = f(a, o);
100
+ if (!s) return;
101
+ let c = C(s);
101
102
  if (!c) return;
102
- let l = C(c);
103
- if (!l) return;
104
- let u = S(i.blur, a);
105
- l.save(), u > 0 && (l.filter = `blur(${u}px)`), n(l), l.restore(), l.save(), l.globalCompositeOperation = "destination-in";
106
- let d = r.y, f = r.y + r.h, p = l.createLinearGradient(0, f, 0, d), m = A(i.stPos), h = A(i.endPos);
107
- p.addColorStop(0, `rgba(0,0,0,${i.stA})`), m > 0 && p.addColorStop(m, `rgba(0,0,0,${i.stA})`), h < 1 && h > m && p.addColorStop(h, `rgba(0,0,0,${i.endA})`), p.addColorStop(1, `rgba(0,0,0,${i.endA})`), l.fillStyle = p, l.fillRect(0, 0, o, s), l.restore();
108
- let g = S(i.dist, a), _ = i.dir * Math.PI / 180, v = Math.cos(_) * g, y = Math.sin(_) * g;
109
- t.save(), t.translate(r.x + v, f + y), t.scale(i.sx, i.sy), t.translate(-r.x, -f), t.drawImage(c, 0, 0), t.restore();
103
+ let l = S(r.blur, i);
104
+ c.save(), l > 0 && (c.filter = `blur(${l}px)`), t(c), c.restore(), c.save(), c.globalCompositeOperation = "destination-in";
105
+ let u = n.y, d = n.y + n.h, p = c.createLinearGradient(0, d, 0, u), m = A(r.stPos), h = A(r.endPos);
106
+ p.addColorStop(0, `rgba(0,0,0,${r.stA})`), m > 0 && p.addColorStop(m, `rgba(0,0,0,${r.stA})`), h < 1 && h > m && p.addColorStop(h, `rgba(0,0,0,${r.endA})`), p.addColorStop(1, `rgba(0,0,0,${r.endA})`), c.fillStyle = p, c.fillRect(0, 0, a, o), c.restore();
107
+ let g = S(r.dist, i), _ = r.dir * Math.PI / 180, v = Math.cos(_) * g, y = Math.sin(_) * g;
108
+ e.save(), e.translate(n.x + v, d + y), e.scale(r.sx, r.sy), e.translate(-n.x, -d), e.drawImage(s, 0, 0), e.restore();
110
109
  }
111
110
  function A(e) {
112
111
  return e < 0 ? 0 : e > 1 ? 1 : e;
@@ -235,30 +234,30 @@ function H() {
235
234
  V || (V = !0, typeof console < "u" && typeof console.warn == "function" && console.warn("[ooxml] scene3d: no offscreen canvas available — using the direct warp fallback (per-cell bleed only, no supersample). Textured-source seams may be faintly visible; the silhouette and geometry are unaffected."));
236
235
  }
237
236
  var U = 2;
238
- function W(t, n, r, i, a, o, s, c, l, u, d) {
239
- let f = a.map((e) => ({
240
- x: o[0] * e.x + o[2] * e.y + o[4],
241
- y: o[1] * e.x + o[3] * e.y + o[5]
237
+ function W(e, t, n, r, i, a, o, s, c, l, u) {
238
+ let d = i.map((e) => ({
239
+ x: a[0] * e.x + a[2] * e.y + a[4],
240
+ y: a[1] * e.x + a[3] * e.y + a[5]
242
241
  })), p = Infinity, m = Infinity, h = -Infinity, g = -Infinity;
243
- for (let e of f) e.x < p && (p = e.x), e.y < m && (m = e.y), e.x > h && (h = e.x), e.y > g && (g = e.y);
242
+ for (let e of d) e.x < p && (p = e.x), e.y < m && (m = e.y), e.x > h && (h = e.x), e.y > g && (g = e.y);
244
243
  p = Math.floor(p) - 1, m = Math.floor(m) - 1, h = Math.ceil(h) + 1, g = Math.ceil(g) + 1;
245
244
  let _ = h - p, v = g - m;
246
245
  if (_ <= 0 || v <= 0) return !1;
247
- let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x = e(y, b);
246
+ let y = Math.max(1, Math.ceil(_ * U)), b = Math.max(1, Math.ceil(v * U)), x = f(y, b);
248
247
  if (!x || x.width !== y || x.height !== b) return !1;
249
248
  let S = x.getContext("2d") ?? null;
250
249
  if (!S) return !1;
251
250
  let C = U, w = [
252
- o[0] * C,
253
- o[1] * C,
254
- o[2] * C,
255
- o[3] * C,
256
- (o[4] - p) * C,
257
- (o[5] - m) * C
251
+ a[0] * C,
252
+ a[1] * C,
253
+ a[2] * C,
254
+ a[3] * C,
255
+ (a[4] - p) * C,
256
+ (a[5] - m) * C
258
257
  ];
259
- S.save(), S.setTransform(w[0], w[1], w[2], w[3], w[4], w[5]), S.beginPath(), S.moveTo(a[0].x, a[0].y), S.lineTo(a[1].x, a[1].y), S.lineTo(a[2].x, a[2].y), S.lineTo(a[3].x, a[3].y), S.closePath(), S.clip(), I(S, t, r, i, w, s, c, l, 0, 0, 1, 1, u * C, d), S.restore(), n.save(), n.setTransform(1, 0, 0, 1, 0, 0);
260
- let T = n.imageSmoothingEnabled, E = n.imageSmoothingQuality;
261
- return n.imageSmoothingEnabled = !0, n.imageSmoothingQuality = "high", n.drawImage(x, 0, 0, _ * C, v * C, p, m, _, v), n.imageSmoothingEnabled = T, n.imageSmoothingQuality = E, n.restore(), !0;
258
+ S.save(), S.setTransform(w[0], w[1], w[2], w[3], w[4], w[5]), S.beginPath(), S.moveTo(i[0].x, i[0].y), S.lineTo(i[1].x, i[1].y), S.lineTo(i[2].x, i[2].y), S.lineTo(i[3].x, i[3].y), S.closePath(), S.clip(), I(S, e, n, r, w, o, s, c, 0, 0, 1, 1, l * C, u), S.restore(), t.save(), t.setTransform(1, 0, 0, 1, 0, 0);
259
+ let T = t.imageSmoothingEnabled, E = t.imageSmoothingQuality;
260
+ return t.imageSmoothingEnabled = !0, t.imageSmoothingQuality = "high", t.drawImage(x, 0, 0, _ * C, v * C, p, m, _, v), t.imageSmoothingEnabled = T, t.imageSmoothingQuality = E, t.restore(), !0;
262
261
  }
263
262
  //#endregion
264
263
  //#region packages/core/src/chart/three-d-surface-picture.ts
@@ -314,12 +313,12 @@ function ne(e, t, n) {
314
313
  function re(e, t, n) {
315
314
  return Math.hypot(e.x - t.x, e.y - t.y, (e.depth - t.depth) * n);
316
315
  }
317
- function ie(e, n, u, d, f, g, _, v, y) {
318
- let b = o(n, d, f, y);
316
+ function ie(t, s, c, u, f, g, _, v, y) {
317
+ let b = a(s, u, f, y);
319
318
  if (!b || g.inner.length !== 4) return !1;
320
- let x = m(u);
319
+ let x = l(c);
321
320
  if (!(x.w > 0) || !(x.h > 0)) return !1;
322
- let S = h(u, n.srcRect), C = S ? {
321
+ let S = h(c, s.srcRect), C = S ? {
323
322
  x0: S.sx,
324
323
  y0: S.sy,
325
324
  x1: S.sx + S.sw,
@@ -338,42 +337,42 @@ function ie(e, n, u, d, f, g, _, v, y) {
338
337
  v(T(e[2], e[1], n)),
339
338
  v(T(e[2], e[1], t)),
340
339
  v(T(e[3], e[0], t))
341
- ], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ? r(n, u) : null, k = [];
340
+ ], D = b.mode === "stack" ? ne(g.pictureStackAspect, x.w, x.h) : null, O = b.mode === "tile" ? i(s, c) : null, k = [];
342
341
  if (b.mode === "stack") {
343
342
  if (D == null) return !1;
344
- let e = 0, t = !1;
345
- for (let n of _) {
346
- if (!s(b, n) || !G(g, f, n, v)) continue;
347
- let r = i(b, n) ? Math.ceil(1 / D) : 1;
348
- if (!Number.isSafeInteger(r) || r < 1 || (e += r, e > 4096)) return !1;
349
- t = !0;
343
+ let t = 0, n = !1;
344
+ for (let i of _) {
345
+ if (!e(b, i) || !G(g, f, i, v)) continue;
346
+ let a = r(b, i) ? Math.ceil(1 / D) : 1;
347
+ if (!Number.isSafeInteger(a) || a < 1 || (t += a, t > 4096)) return !1;
348
+ n = !0;
350
349
  }
351
- if (!t) return !1;
350
+ if (!n) return !1;
352
351
  }
353
352
  if (b.mode === "tile") {
354
353
  if (!O) return !1;
355
354
  let n = 0, r = 0, i = !1;
356
355
  for (let a of _) {
357
- if (!s(b, a)) continue;
356
+ if (!e(b, a)) continue;
358
357
  let o = G(g, f, a, v);
359
358
  if (!o) continue;
360
- let l = re(o[0], o[1], g.modelDepth), u = re(o[0], o[3], g.modelDepth);
361
- if (!(l > 0) || !(u > 0)) continue;
362
- let d = c(O, l, u), p = Math.floor(-d.x / O.tileW), m = Math.floor(-d.y / O.tileH), h = Math.ceil((l - d.x) / O.tileW), _ = Math.ceil((u - d.y) / O.tileH), y = Math.max(0, h - p) * Math.max(0, _ - m);
359
+ let s = re(o[0], o[1], g.modelDepth), c = re(o[0], o[3], g.modelDepth);
360
+ if (!(s > 0) || !(c > 0)) continue;
361
+ let l = m(O, s, c), u = Math.floor(-l.x / O.tileW), p = Math.floor(-l.y / O.tileH), h = Math.ceil((s - l.x) / O.tileW), _ = Math.ceil((c - l.y) / O.tileH), y = Math.max(0, h - u) * Math.max(0, _ - p);
363
362
  if (!Number.isSafeInteger(y) || (n += y, n > 4096)) return !1;
364
363
  if (y === 0) continue;
365
- let x = Math.ceil(l), S = Math.ceil(u);
364
+ let x = Math.ceil(s), S = Math.ceil(c);
366
365
  if (!(x > 0 && x <= 32767) || !(S > 0 && S <= 32767) || x > Math.floor((16777216 - r) / S)) return !1;
367
366
  r += x * S;
368
- let C = t(e, x, S), w = C?.getContext("2d");
367
+ let C = d(t, x, S), w = C?.getContext("2d");
369
368
  if (!C || !w) return !1;
370
369
  k.push({
371
370
  faceIndex: a,
372
- width: l,
373
- height: u,
374
- origin: d,
375
- firstColumn: p,
376
- firstRow: m,
371
+ width: s,
372
+ height: c,
373
+ origin: l,
374
+ firstColumn: u,
375
+ firstRow: p,
377
376
  lastColumn: h,
378
377
  lastRow: _,
379
378
  canvas: C,
@@ -382,11 +381,11 @@ function ie(e, n, u, d, f, g, _, v, y) {
382
381
  }
383
382
  if (!i) return !1;
384
383
  }
385
- if (e.save(), n.alpha != null && (e.globalAlpha *= n.alpha), b.mode === "stretch") for (let t of _) {
386
- if (!s(b, t)) continue;
387
- let r = G(g, f, t, v), i = g.thickness === 0 && t === 0 ? w : r?.map(v);
384
+ if (t.save(), s.alpha != null && (t.globalAlpha *= s.alpha), b.mode === "stretch") for (let n of _) {
385
+ if (!e(b, n)) continue;
386
+ let r = G(g, f, n, v), i = g.thickness === 0 && n === 0 ? w : r?.map(v);
388
387
  if (!i) continue;
389
- let a = ee(i, n.fillRect);
388
+ let a = ee(i, s.fillRect);
390
389
  if (!a) continue;
391
390
  let o = S ? ee(a, {
392
391
  l: S.dxFraction,
@@ -395,43 +394,43 @@ function ie(e, n, u, d, f, g, _, v, y) {
395
394
  b: 1 - S.dyFraction - S.dhFraction
396
395
  }) : a;
397
396
  if (o) {
398
- e.save(), e.beginPath(), e.moveTo(i[0].x, i[0].y);
399
- for (let t = 1; t < i.length; t++) e.lineTo(i[t].x, i[t].y);
400
- e.closePath(), e.clip(), L(u, e, x.w, x.h, o, .5, C), e.restore();
397
+ t.save(), t.beginPath(), t.moveTo(i[0].x, i[0].y);
398
+ for (let e = 1; e < i.length; e++) t.lineTo(i[e].x, i[e].y);
399
+ t.closePath(), t.clip(), L(c, t, x.w, x.h, o, .5, C), t.restore();
401
400
  }
402
401
  }
403
- else for (let t of _) {
404
- if (!s(b, t)) continue;
405
- let r = G(g, f, t, v);
406
- if (!r) continue;
407
- let o = r.map(v);
408
- e.save(), e.beginPath(), e.moveTo(o[0].x, o[0].y);
409
- for (let t = 1; t < o.length; t++) e.lineTo(o[t].x, o[t].y);
410
- e.closePath(), e.clip();
411
- let c = l(b, t);
402
+ else for (let i of _) {
403
+ if (!e(b, i)) continue;
404
+ let a = G(g, f, i, v);
405
+ if (!a) continue;
406
+ let l = a.map(v);
407
+ t.save(), t.beginPath(), t.moveTo(l[0].x, l[0].y);
408
+ for (let e = 1; e < l.length; e++) t.lineTo(l[e].x, l[e].y);
409
+ t.closePath(), t.clip();
410
+ let u = n(b, i);
412
411
  if (b.mode === "tile") {
413
412
  if (!O) continue;
414
- let r = k.find((e) => e.faceIndex === t);
415
- if (!r) continue;
416
- let i = r.canvas.width / r.width, a = r.canvas.height / r.height;
417
- r.context.save(), r.context.scale(i, a);
418
- for (let e = r.firstRow; e < r.lastRow; e++) for (let t = r.firstColumn; t < r.lastColumn; t++) {
419
- let i = r.origin.x + t * O.tileW, a = r.origin.y + e * O.tileH, o = O.flipX && Math.abs(t) % 2 == 1, s = O.flipY && Math.abs(e) % 2 == 1;
420
- r.context.save(), r.context.translate(i + (o ? O.tileW : 0), a + (s ? O.tileH : 0)), r.context.scale(o ? -1 : 1, s ? -1 : 1), p(r.context, u, n.srcRect, 0, 0, O.tileW, O.tileH), r.context.restore();
413
+ let e = k.find((e) => e.faceIndex === i);
414
+ if (!e) continue;
415
+ let n = e.canvas.width / e.width, r = e.canvas.height / e.height;
416
+ e.context.save(), e.context.scale(n, r);
417
+ for (let t = e.firstRow; t < e.lastRow; t++) for (let n = e.firstColumn; n < e.lastColumn; n++) {
418
+ let r = e.origin.x + n * O.tileW, i = e.origin.y + t * O.tileH, a = O.flipX && Math.abs(n) % 2 == 1, o = O.flipY && Math.abs(t) % 2 == 1;
419
+ e.context.save(), e.context.translate(r + (a ? O.tileW : 0), i + (o ? O.tileH : 0)), e.context.scale(a ? -1 : 1, o ? -1 : 1), p(e.context, c, s.srcRect, 0, 0, O.tileW, O.tileH), e.context.restore();
421
420
  }
422
- r.context.restore(), L(r.canvas, e, r.canvas.width, r.canvas.height, o, .5);
421
+ e.context.restore(), L(e.canvas, t, e.canvas.width, e.canvas.height, l, .5);
423
422
  } else if (b.mode === "stack") {
424
423
  if (D == null) continue;
425
- if (i(b, t)) for (let t = 0; t < Math.ceil(1 / D); t++) L(u, e, x.w, x.h, E(r, t * D, (t + 1) * D), .5, C);
426
- else L(u, e, x.w, x.h, o, .5, C);
427
- } else if (b.stackUnit != null && a(b, t)) for (let t = 0; t < c; t++) {
428
- let n = t * b.stackUnit / y, i = (t + 1) * b.stackUnit / y;
429
- L(u, e, x.w, x.h, E(r, n, i), .5, C);
424
+ if (r(b, i)) for (let e = 0; e < Math.ceil(1 / D); e++) L(c, t, x.w, x.h, E(a, e * D, (e + 1) * D), .5, C);
425
+ else L(c, t, x.w, x.h, l, .5, C);
426
+ } else if (b.stackUnit != null && o(b, i)) for (let e = 0; e < u; e++) {
427
+ let n = e * b.stackUnit / y, r = (e + 1) * b.stackUnit / y;
428
+ L(c, t, x.w, x.h, E(a, n, r), .5, C);
430
429
  }
431
- else b.stackUnit != null && L(u, e, x.w, x.h, o, .5, C);
432
- e.restore();
430
+ else b.stackUnit != null && L(c, t, x.w, x.h, l, .5, C);
431
+ t.restore();
433
432
  }
434
- return e.restore(), !0;
433
+ return t.restore(), !0;
435
434
  }
436
435
  //#endregion
437
436
  //#region packages/core/src/chart/label-box.ts
@@ -467,7 +466,7 @@ function ae(e, t, n, r, i = 0) {
467
466
  }
468
467
  if (t.borderHidden === !0) return;
469
468
  let a = t.borderFill ? g(t.borderFill, e, n.x, n.y, n.w, n.h, i) : t.borderColor ? `#${t.borderColor}` : null;
470
- a && (e.save(), e.strokeStyle = a, e.lineWidth = t.borderWidthEmu == null ? Math.max(.25, .75 * r) : Math.max(.25, t.borderWidthEmu / _ * r), e.setLineDash(f(t.borderCustomDash, t.borderDash, e.lineWidth)), t.borderCap === "rnd" ? e.lineCap = "round" : t.borderCap === "sq" ? e.lineCap = "square" : t.borderCap === "flat" && (e.lineCap = "butt"), t.borderJoin === "round" ? e.lineJoin = "round" : t.borderJoin === "bevel" ? e.lineJoin = "bevel" : t.borderJoin === "miter" && (e.lineJoin = "miter"), e.strokeRect(n.x, n.y, n.w, n.h), e.restore());
469
+ a && (e.save(), e.strokeStyle = a, e.lineWidth = t.borderWidthEmu == null ? Math.max(.25, .75 * r) : Math.max(.25, t.borderWidthEmu / _ * r), e.setLineDash(u(t.borderCustomDash, t.borderDash, e.lineWidth)), t.borderCap === "rnd" ? e.lineCap = "round" : t.borderCap === "sq" ? e.lineCap = "square" : t.borderCap === "flat" && (e.lineCap = "butt"), t.borderJoin === "round" ? e.lineJoin = "round" : t.borderJoin === "bevel" ? e.lineJoin = "bevel" : t.borderJoin === "miter" && (e.lineJoin = "miter"), e.strokeRect(n.x, n.y, n.w, n.h), e.restore());
471
470
  }
472
471
  //#endregion
473
472
  //#region packages/core/src/chart/axis-scale.ts
@@ -824,16 +823,16 @@ function ye(e, t, n) {
824
823
  //#endregion
825
824
  //#region packages/core/src/chart/rich-data-label.ts
826
825
  var be = 4096, xe = 4, Se = be;
827
- function Ce(e, t, r, i) {
826
+ function Ce(e, n, r, i) {
828
827
  let a = [[]], o = [null], s = 0, c = (e) => {
829
828
  if (!e) return null;
830
829
  let t = e.startsWith("#") ? e.slice(1) : e;
831
830
  return /^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(t) ? `#${t}` : null;
832
831
  };
833
- outer: for (let l = 0; l < t.runs.length && l < Se; l++) {
834
- let u = t.runs[l];
832
+ outer: for (let l = 0; l < n.runs.length && l < Se; l++) {
833
+ let u = n.runs[l];
835
834
  u.text !== "\n" && o[a.length - 1] == null && (o[a.length - 1] = u.paragraphAlign ?? null);
836
- let d = n(u.fontSizeHpt, t.ptToPx) ?? r, f = u.fontFace?.trim().replaceAll("\"", ""), p = f && !f.startsWith("+") ? f : null, m = f && t.fontFamilyForFace ? t.fontFamilyForFace(f) : p ? `"${p}", Calibri, Arial, sans-serif` : t.fontFamily, h = `${u.italic ?? t.fallbackItalic ?? !1 ? "italic " : ""}${u.bold ?? t.fallbackBold ? "bold " : ""}${d}px ${m}`, g = (u.baseline ?? t.fallbackBaseline ?? 0) * d, _ = u.colorPaintAuthored === !0 || u.color != null || u.colorHidden === !0 ? u.colorHidden === !0 ? null : c(u.color) : t.fallbackColorHidden === !0 ? null : i, v = "", y = () => {
835
+ let d = t(u.fontSizeHpt, n.ptToPx) ?? r, f = u.fontFace?.trim().replaceAll("\"", ""), p = f && !f.startsWith("+") ? f : null, m = f && n.fontFamilyForFace ? n.fontFamilyForFace(f) : p ? `"${p}", Calibri, Arial, sans-serif` : n.fontFamily, h = `${u.italic ?? n.fallbackItalic ?? !1 ? "italic " : ""}${u.bold ?? n.fallbackBold ? "bold " : ""}${d}px ${m}`, g = (u.baseline ?? n.fallbackBaseline ?? 0) * d, _ = u.colorPaintAuthored === !0 || u.color != null || u.colorHidden === !0 ? u.colorHidden === !0 ? null : c(u.color) : n.fallbackColorHidden === !0 ? null : i, v = "", y = () => {
837
836
  v &&= (e.font = h, a[a.length - 1].push({
838
837
  text: v,
839
838
  font: h,
@@ -893,9 +892,9 @@ function Te(e) {
893
892
  let t = [];
894
893
  if (e.showCategory && e.category && t.push(e.category), e.showSeries && e.seriesName && t.push(e.seriesName), e.showValue && e.sourceValue != null) {
895
894
  let n = e.valueDivisor != null && Number.isFinite(e.valueDivisor) && e.valueDivisor > 0 ? e.valueDivisor : 1;
896
- t.push(d(e.sourceValue / n, e.formatCode ?? null, e.date1904));
895
+ t.push(c(e.sourceValue / n, e.formatCode ?? null, e.date1904));
897
896
  }
898
- return e.showPercent && e.percentRatio != null && t.push(d(e.percentRatio, e.percentFormatCode ?? e.formatCode ?? "0%", e.date1904)), e.showBubbleSize && e.bubbleSize != null && t.push(d(e.bubbleSize, e.formatCode ?? null, e.date1904)), t.filter((e) => e !== "").join(e.separator ?? e.defaultSeparator ?? " ");
897
+ return e.showPercent && e.percentRatio != null && t.push(c(e.percentRatio, e.percentFormatCode ?? e.formatCode ?? "0%", e.date1904)), e.showBubbleSize && e.bubbleSize != null && t.push(c(e.bubbleSize, e.formatCode ?? null, e.date1904)), t.filter((e) => e !== "").join(e.separator ?? e.defaultSeparator ?? " ");
899
898
  }
900
899
  //#endregion
901
900
  //#region packages/core/src/chart/material-color.ts