@silurus/ooxml 0.85.3 → 0.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-BCGnuBLj.js +10 -0
  3. package/dist/assets/render-worker-CB4DxjXg.js +31 -0
  4. package/dist/assets/render-worker-CHW0F0n6.js +11 -0
  5. package/dist/{bounded-raw-part-cache-C6ro6Ezf.js → bounded-raw-part-cache-DVx3Camo.js} +12 -10
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-B3A7KLLi.js} +1 -1
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-ssI6IE39.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-xZrA2IjM.js} +577 -576
  13. package/dist/{docx-BYvm3TWw.js → docx-DzDiGvqe.js} +63 -63
  14. package/dist/docx.mjs +5 -5
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-DK1JLkrz.js} +2 -2
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-enyPbflR.js} +847 -877
  18. package/dist/index.mjs +3 -3
  19. package/dist/line-distribute-BFB575d6.js +1023 -0
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +91 -91
  22. package/dist/{pptx-BqpVTP8p.js → pptx-D_U62nl-.js} +71 -71
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DSn0d35X.js} +1 -1
  26. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-BHz9vjxB.js} +1 -1
  27. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-CO0UYoQh.js} +1 -1
  28. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-CbYDBg7U.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-Do07ZRcR.js} +7 -7
  30. package/dist/{session-n2p5_jxV.js → session-C1GYhr6n.js} +77 -77
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-DuEaUxPw.js} +732 -732
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -10
  34. package/dist/types/index.d.ts +38 -18
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-eDiHHEG2.js} +99 -96
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-CMHmYTHP.js} +1629 -1469
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  51. package/dist/line-distribute-BsV4MVZ2.js +0 -1023
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-Dhdplprg.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
@@ -1,12 +1,12 @@
1
- import { $ as e, A as t, At as n, Bt as r, C as i, Ct as a, D as o, Et as s, Ft as c, Ht as l, It as u, J as d, Lt as f, M as p, Mt as m, N as h, Nt as g, O as _, Ot as v, Pt as y, Rt as b, S as x, St as S, Tt as C, Vt as w, Wt as T, Xt as E, Yt as D, _ as O, _t as k, at as A, bt as j, c as M, cn as N, ct as P, d as F, dt as I, et as L, f as R, g as z, gt as B, h as V, i as H, it as U, j as ee, jt as W, lt as G, m as K, mt as q, n as J, nt as te, p as ne, r as re, rt as ie, s as ae, tt as oe, u as se, w as ce, wt as le, xt as ue, y as de, zt as fe } from "./line-metrics-BGtFM-ec.js";
2
- import { a as pe, c as me, d as he, f as ge, i as _e, l as ve, o as ye, p as be, r as xe, s as Se, t as Ce, u as we } from "./line-distribute-BsV4MVZ2.js";
1
+ import { $ as e, A as t, At as n, Bt as r, Ct as i, E as a, Et as o, Ft as s, It as c, Jt as l, K as u, Lt as d, Mt as f, Nt as p, O as m, Ot as h, Pt as g, Q as _, Rt as v, S as y, St as b, T as x, Ut as S, Vt as C, Yt as w, Z as T, _ as E, a as D, b as O, bt as k, c as A, d as j, et as M, f as N, ft as P, h as F, ht as I, j as L, jt as R, k as z, kt as B, l as V, lt as H, m as ee, mt as U, n as W, nt as te, o as G, ot as K, p as q, rt as J, sn as ne, st as re, t as ie, tt as ae, u as oe, vt as se, wt as ce, x as le, xt as ue, yt as de, zt as fe } from "./hyperlink-enyPbflR.js";
2
+ import { a as pe, c as me, d as he, f as ge, i as _e, l as ve, o as ye, p as be, r as xe, s as Se, t as Ce, u as we } from "./line-distribute-BFB575d6.js";
3
3
  import { A as Te, D as Ee, S as De, _ as Oe, h as ke, hn as Ae, in as je, j as Me, on as Ne, sn as Pe, v as Fe, w as Ie } from "./plot-area-frame-D5hEOgkJ.js";
4
4
  import { l as Le } from "./pixel-budget-Dgjw269h.js";
5
5
  import { r as Y } from "./units-EJdC96r6.js";
6
6
  import { A as Re, F as ze, I as Be, L as Ve, M as He, N as Ue, P as We, j as Ge } from "./three-d-YYghQndN.js";
7
7
  import { k as Ke } from "./renderer-XFSCOT6m.js";
8
8
  import { s as qe } from "./raster-target-ojDdQizC.js";
9
- import { a as Je, i as Ye, n as Xe, t as Ze } from "./resource-measurement-D41R-0Bl.js";
9
+ import { a as Je, i as Ye, n as Xe, t as Ze } from "./resource-measurement-Do07ZRcR.js";
10
10
  //#region packages/pptx/src/types.ts
11
11
  function Qe(e) {
12
12
  return e;
@@ -2402,8 +2402,8 @@ function it(e) {
2402
2402
  if (t) return t;
2403
2403
  let n = tt[e];
2404
2404
  return n ? (t = {
2405
- adj: n.adj.map(([e, t]) => [e, y(t)]),
2406
- gd: n.gd.map(([e, t]) => [e, y(t)]),
2405
+ adj: n.adj.map(([e, t]) => [e, f(t)]),
2406
+ gd: n.gd.map(([e, t]) => [e, f(t)]),
2407
2407
  paths: n.paths
2408
2408
  }, nt.set(e, t), t) : null;
2409
2409
  }
@@ -2476,16 +2476,16 @@ function st(e) {
2476
2476
  function ct(e, t, n, r) {
2477
2477
  let i = it(e.toLowerCase());
2478
2478
  if (!i || i.paths.length === 0) return null;
2479
- let a = c({
2479
+ let a = p({
2480
2480
  w: n,
2481
2481
  h: r,
2482
2482
  adj: t
2483
- }, i.adj, i.gd), o = i.paths.length === 1, s = ot(i.paths[0], a, n, r), l = o ? s : ot(i.paths[i.paths.length - 1], a, n, r);
2483
+ }, i.adj, i.gd), o = i.paths.length === 1, s = ot(i.paths[0], a, n, r), c = o ? s : ot(i.paths[i.paths.length - 1], a, n, r);
2484
2484
  return {
2485
2485
  top: s,
2486
- bottom: l,
2486
+ bottom: c,
2487
2487
  topLen: st(s),
2488
- bottomLen: st(l),
2488
+ bottomLen: st(c),
2489
2489
  singleEdge: o
2490
2490
  };
2491
2491
  }
@@ -3079,32 +3079,32 @@ function Xt(e, t, n) {
3079
3079
  }
3080
3080
  //#endregion
3081
3081
  //#region packages/core/src/text/underline.ts
3082
- function Zt(t, n, r, i, a, o, s, c = 1) {
3083
- let l = Math.max(1, a * .05), u = s === "heavy" || (s?.endsWith("Heavy") ?? !1) ? l * 1.8 : l, d = r + Math.max(2, u), f = e(d, u, c);
3084
- if (t.strokeStyle = o, t.lineWidth = u, t.setLineDash([]), s && s.startsWith("wavy")) {
3085
- let e = u, r = u * 6;
3086
- t.beginPath(), t.moveTo(n, d);
3087
- let a = Math.max(1, u * .5);
3088
- for (let o = 0; o <= i; o += a) {
3089
- let i = d + Math.sin(o / r * Math.PI * 2) * e;
3090
- t.lineTo(n + o, i);
3082
+ function Zt(e, t, n, r, i, a, o, s = 1) {
3083
+ let c = Math.max(1, i * .05), l = o === "heavy" || (o?.endsWith("Heavy") ?? !1) ? c * 1.8 : c, u = n + Math.max(2, l), d = T(u, l, s);
3084
+ if (e.strokeStyle = a, e.lineWidth = l, e.setLineDash([]), o && o.startsWith("wavy")) {
3085
+ let n = l, i = l * 6;
3086
+ e.beginPath(), e.moveTo(t, u);
3087
+ let a = Math.max(1, l * .5);
3088
+ for (let o = 0; o <= r; o += a) {
3089
+ let r = u + Math.sin(o / i * Math.PI * 2) * n;
3090
+ e.lineTo(t + o, r);
3091
3091
  }
3092
- if (t.stroke(), s === "wavyDbl") {
3093
- t.beginPath(), t.moveTo(n, d + e * 2.5);
3094
- for (let o = 0; o <= i; o += a) {
3095
- let i = d + e * 2.5 + Math.sin(o / r * Math.PI * 2) * e;
3096
- t.lineTo(n + o, i);
3092
+ if (e.stroke(), o === "wavyDbl") {
3093
+ e.beginPath(), e.moveTo(t, u + n * 2.5);
3094
+ for (let o = 0; o <= r; o += a) {
3095
+ let r = u + n * 2.5 + Math.sin(o / i * Math.PI * 2) * n;
3096
+ e.lineTo(t + o, r);
3097
3097
  }
3098
- t.stroke();
3098
+ e.stroke();
3099
3099
  }
3100
3100
  return;
3101
3101
  }
3102
- if (s === "dbl") {
3103
- let r = u * 1.4, a = d - r / 2, o = d + r / 2;
3104
- t.beginPath(), t.moveTo(n, a + e(a, u, c)), t.lineTo(n + i, a + e(a, u, c)), t.moveTo(n, o + e(o, u, c)), t.lineTo(n + i, o + e(o, u, c)), t.stroke();
3102
+ if (o === "dbl") {
3103
+ let n = l * 1.4, i = u - n / 2, a = u + n / 2;
3104
+ e.beginPath(), e.moveTo(t, i + T(i, l, s)), e.lineTo(t + r, i + T(i, l, s)), e.moveTo(t, a + T(a, l, s)), e.lineTo(t + r, a + T(a, l, s)), e.stroke();
3105
3105
  return;
3106
3106
  }
3107
- t.setLineDash(De(s ?? "sng", u)), t.beginPath(), t.moveTo(n, d + f), t.lineTo(n + i, d + f), t.stroke(), t.setLineDash([]);
3107
+ e.setLineDash(De(o ?? "sng", l)), e.beginPath(), e.moveTo(t, u + d), e.lineTo(t + r, u + d), e.stroke(), e.setLineDash([]);
3108
3108
  }
3109
3109
  //#endregion
3110
3110
  //#region packages/core/src/text/highlight-box.ts
@@ -3159,8 +3159,8 @@ function rn(e, t) {
3159
3159
  kind: "internal",
3160
3160
  ref: n ?? r
3161
3161
  };
3162
- let i = n, a = H(i);
3163
- return a !== null && re.includes(a) ? {
3162
+ let i = n, a = W(i);
3163
+ return a !== null && ie.includes(a) ? {
3164
3164
  kind: "external",
3165
3165
  url: i
3166
3166
  } : {
@@ -3191,7 +3191,7 @@ var on = (e) => {
3191
3191
  function cn(e) {
3192
3192
  for (let t of e) {
3193
3193
  let e = on(t);
3194
- if (e !== void 0 && ee(e)) return !0;
3194
+ if (e !== void 0 && z(e)) return !0;
3195
3195
  }
3196
3196
  return !1;
3197
3197
  }
@@ -3211,7 +3211,7 @@ function ln(e, n) {
3211
3211
  }
3212
3212
  }
3213
3213
  if (o) for (; o.length < i.length;) o.push(null);
3214
- let { levels: s, paragraphLevel: c } = p().computeLevels(i, n ? "rtl" : "ltr", o), { order: l, segLevels: u } = t(s, c, a), d = Array(r);
3214
+ let { levels: s, paragraphLevel: c } = t().computeLevels(i, n ? "rtl" : "ltr", o), { order: l, segLevels: u } = m(s, c, a), d = Array(r);
3215
3215
  for (let e = 0; e < r; e++) d[e] = (u[e] & 1) == 1;
3216
3216
  return {
3217
3217
  order: l,
@@ -3222,17 +3222,17 @@ function ln(e, n) {
3222
3222
  //#region packages/pptx/src/cjk-wrap.ts
3223
3223
  function un(e, t, n, r, i = 0, a = !1) {
3224
3224
  if (e.length === 0) return 0;
3225
- let s = t === 0, c = 0, l = t;
3225
+ let o = t === 0, s = 0, c = t;
3226
3226
  for (let t of e) {
3227
- let e = c > 0 || a ? i : 0;
3228
- if (l + e + t.w > n) {
3229
- if (c > 0 || !s) break;
3230
- l += e + t.w, c++;
3227
+ let e = s > 0 || a ? i : 0;
3228
+ if (c + e + t.w > n) {
3229
+ if (s > 0 || !o) break;
3230
+ c += e + t.w, s++;
3231
3231
  break;
3232
3232
  }
3233
- l += e + t.w, c++;
3233
+ c += e + t.w, s++;
3234
3234
  }
3235
- return c === 0 ? 0 : c >= e.length ? e.length : o(e.map((e) => e.ch), c, r, +!!s);
3235
+ return s === 0 ? 0 : s >= e.length ? e.length : x(e.map((e) => e.ch), s, r, +!!o);
3236
3236
  }
3237
3237
  //#endregion
3238
3238
  //#region packages/pptx/src/text-justify.ts
@@ -3244,7 +3244,7 @@ function fn(e, t, n, r, i) {
3244
3244
  let o = Ce(e, a, {
3245
3245
  firstContentSi: 0,
3246
3246
  lastDrawnSi: e.length,
3247
- isGapChar: ce,
3247
+ isGapChar: y,
3248
3248
  isWhitespace: dn,
3249
3249
  seaClusterGaps: r === "thaiDist"
3250
3250
  });
@@ -3298,9 +3298,9 @@ function hn(e, t) {
3298
3298
  //#endregion
3299
3299
  //#region packages/pptx/src/smartart-fallback-contrast.ts
3300
3300
  function gn(e) {
3301
- let t = P(e.length === 8 ? e.slice(0, 6) : e);
3301
+ let t = K(e.length === 8 ? e.slice(0, 6) : e);
3302
3302
  if (!t) return null;
3303
- let n = G(t[0], t[1], t[2]);
3303
+ let n = re(t[0], t[1], t[2]);
3304
3304
  if (e.length !== 8) return n;
3305
3305
  let r = Number.parseInt(e.slice(6, 8), 16);
3306
3306
  if (Number.isNaN(r)) return null;
@@ -3381,12 +3381,12 @@ function Cn(e, t) {
3381
3381
  function wn(e, t, n, r, i, a, o = "fill", s = xn) {
3382
3382
  let c = e.textAlign, l = e.textBaseline, u = o === "stroke" ? e.strokeText.bind(e) : e.fillText.bind(e), d = r - Sn(e, t, i), f = 0;
3383
3383
  for (let o of t) {
3384
- let t = o.codePointAt(0) ?? 0, l = R(t), p = e.measureText(o).width + a, m = l === "Tr" ? se(t) : null, h = l === "Tr" && m === null && K(t), g = l === "U" || l === "Tu" || m !== null || h;
3385
- if (ne(t) && s(t)) {
3384
+ let t = o.codePointAt(0) ?? 0, l = oe(t), p = e.measureText(o).width + a, m = l === "Tr" ? A(t) : null, h = l === "Tr" && m === null && N(t), g = l === "U" || l === "Tu" || m !== null || h;
3385
+ if (j(t) && s(t)) {
3386
3386
  let t = n + f + p / 2;
3387
- e.save(), e.translate(t, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", M(e, () => u(o, 0, 0)), e.restore();
3387
+ e.save(), e.translate(t, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", G(e, () => u(o, 0, 0)), e.restore();
3388
3388
  } else if (g) {
3389
- let r = m === null && l === "Tu" ? F(t) : null, a = m === null ? r : m, s = a === null ? o : String.fromCodePoint(a), c = n + f + p / 2, h = r === null ? Cn(e, s) / i : 0;
3389
+ let r = m === null && l === "Tu" ? V(t) : null, a = m === null ? r : m, s = a === null ? o : String.fromCodePoint(a), c = n + f + p / 2, h = r === null ? Cn(e, s) / i : 0;
3390
3390
  e.save(), e.translate(c, d), e.rotate(-Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", u(s, 0, h * i), e.restore();
3391
3391
  } else if (l === "Tr") {
3392
3392
  let t = n + f + p / 2;
@@ -3397,7 +3397,7 @@ function wn(e, t, n, r, i, a, o = "fill", s = xn) {
3397
3397
  e.textAlign = c, e.textBaseline = l;
3398
3398
  }
3399
3399
  function Tn(e, t, n, r, i, a, o = "fill") {
3400
- wn(e, t, n, r, i, a, o, (t) => ae(e, t));
3400
+ wn(e, t, n, r, i, a, o, (t) => D(e, t));
3401
3401
  }
3402
3402
  //#endregion
3403
3403
  //#region packages/pptx/src/renderer.ts
@@ -3423,7 +3423,7 @@ function Dn(e, t) {
3423
3423
  } : void 0;
3424
3424
  }
3425
3425
  function On(e) {
3426
- return A(e) ? e.svgImagePath : e.imagePath;
3426
+ return J(e) ? e.svgImagePath : e.imagePath;
3427
3427
  }
3428
3428
  function kn(e, t, n, r) {
3429
3429
  let i = Qe(t.bullet);
@@ -3436,64 +3436,64 @@ function kn(e, t, n, r) {
3436
3436
  let o = a ?? t.defFontSize ?? e.defaultFontSize ?? 18, s = i.sizePts == null ? o * ((i.sizePct ?? 100) / 100) : i.sizePts;
3437
3437
  return Math.max(1, s * Y * n * r);
3438
3438
  }
3439
- async function An(e, t, n, r, i, a, o, c, l, u) {
3440
- let d = ue(a), f = [], p = [], m = (e, t, n, r, i, a = 1, o = i) => {
3441
- if (!(!t || !i)) {
3442
- if (C(r) && (d.resolution === "display" || d.strategy === "adaptive")) {
3439
+ async function An(e, t, n, r, a, o, s, c, l, u) {
3440
+ let d = de(o), f = [], p = [], m = (e, t, n, r, a, o = 1, s = a) => {
3441
+ if (!(!t || !a)) {
3442
+ if (i(r) && (d.resolution === "display" || d.strategy === "adaptive")) {
3443
3443
  f.push({
3444
3444
  key: e,
3445
3445
  ...t,
3446
- retainedSurfaceCount: a
3446
+ retainedSurfaceCount: o
3447
3447
  });
3448
3448
  return;
3449
3449
  }
3450
- p.push(B(n, r, i, o).then((n) => n.dimensions && s(n.format, u !== void 0) ? {
3450
+ p.push(U(n, r, a, s).then((n) => n.dimensions && ce(n.format, u !== void 0) ? {
3451
3451
  key: e,
3452
3452
  ...t,
3453
3453
  sourceWidthPx: n.dimensions.width,
3454
3454
  sourceHeightPx: n.dimensions.height,
3455
- retainedSurfaceCount: a
3455
+ retainedSurfaceCount: o
3456
3456
  } : null).catch(() => null));
3457
3457
  }
3458
3458
  }, h = e.background;
3459
3459
  if (h?.fillType === "image" && h.imagePath && !h.tile && !h.duotone) {
3460
- let e = h.fillRect ?? {}, r = t * (1 - (e.l ?? 0) - (e.r ?? 0)), a = n * (1 - (e.t ?? 0) - (e.b ?? 0));
3461
- m(Z(h.imagePath, h.duotone), En(r, a, i, h.srcRect), h.imagePath, h.mimeType, o, 1);
3460
+ let e = h.fillRect ?? {}, r = t * (1 - (e.l ?? 0) - (e.r ?? 0)), i = n * (1 - (e.t ?? 0) - (e.b ?? 0));
3461
+ m(Z(h.imagePath, h.duotone), En(r, i, a, h.srcRect), h.imagePath, h.mimeType, s, 1);
3462
3462
  }
3463
- for (let t of e.elements) if (t.type === "picture") !(A(t) || t.mimeType === "image/svg+xml") && !t.duotone && m(Z(t.imagePath, t.duotone), En(X(t.width, r), X(t.height, r), i, t.srcRect), t.imagePath, t.mimeType, o, 1);
3463
+ for (let t of e.elements) if (t.type === "picture") !(J(t) || t.mimeType === "image/svg+xml") && !t.duotone && m(Z(t.imagePath, t.duotone), En(X(t.width, r), X(t.height, r), a, t.srcRect), t.imagePath, t.mimeType, s, 1);
3464
3464
  else if (t.type === "media" && t.posterPath) {
3465
3465
  let e = c ? qr(c) : void 0;
3466
- m(Z(t.posterPath), En(X(t.width, r), X(t.height, r), i), t.posterPath, t.posterMimeType || "application/octet-stream", e, 1, l ?? e);
3466
+ m(Z(t.posterPath), En(X(t.width, r), X(t.height, r), a), t.posterPath, t.posterMimeType || "application/octet-stream", e, 1, l ?? e);
3467
3467
  } else if (t.type === "chart") {
3468
3468
  let e = {
3469
3469
  widthPt: t.width / Y,
3470
3470
  heightPt: t.height / Y,
3471
- targetWidthPx: X(t.width, r) * i,
3472
- targetHeightPx: X(t.height, r) * i
3471
+ targetWidthPx: X(t.width, r) * a,
3472
+ targetHeightPx: X(t.height, r) * a
3473
3473
  };
3474
3474
  for (let n of Te(t.chart)) {
3475
3475
  let t = n.fill, r = Ee(n, e);
3476
- !(t.mimeType === "image/svg+xml" || A({
3476
+ !(t.mimeType === "image/svg+xml" || J({
3477
3477
  svgImagePath: t.svgImagePath,
3478
3478
  srcRect: n.hasSourceCrop ? !0 : null
3479
3479
  })) && !t.duotone && !n.preserveNaturalSize && r?.targetWidthPx && r.targetHeightPx && m(Z(t.imagePath, t.duotone), {
3480
3480
  targetWidthPx: r.targetWidthPx,
3481
3481
  targetHeightPx: r.targetHeightPx
3482
- }, t.imagePath, t.mimeType, o, 1);
3482
+ }, t.imagePath, t.mimeType, s, 1);
3483
3483
  }
3484
3484
  } else if (t.type === "shape" && t.textBody) for (let e of t.textBody.paragraphs) {
3485
3485
  let n = Qe(e.bullet);
3486
3486
  if (n.type !== "blip") continue;
3487
- let a = kn(t.textBody, e, r, i);
3488
- !a || !o || p.push(B(n.imagePath, n.mimeType, o).then((e) => e.dimensions && e.dimensions.width > 0 && e.dimensions.height > 0 && s(e.format, u !== void 0) ? {
3487
+ let i = kn(t.textBody, e, r, a);
3488
+ !i || !s || p.push(U(n.imagePath, n.mimeType, s).then((e) => e.dimensions && e.dimensions.width > 0 && e.dimensions.height > 0 && ce(e.format, u !== void 0) ? {
3489
3489
  key: Z(n.imagePath),
3490
- targetWidthPx: a * e.dimensions.width / e.dimensions.height,
3491
- targetHeightPx: a,
3490
+ targetWidthPx: i * e.dimensions.width / e.dimensions.height,
3491
+ targetHeightPx: i,
3492
3492
  sourceWidthPx: e.dimensions.width,
3493
3493
  sourceHeightPx: e.dimensions.height
3494
3494
  } : null).catch(() => null));
3495
3495
  }
3496
- return f.push(...(await Promise.all(p)).filter((e) => e !== null)), S(f, d);
3496
+ return f.push(...(await Promise.all(p)).filter((e) => e !== null)), k(f, d);
3497
3497
  }
3498
3498
  function jn(e) {
3499
3499
  return e.background?.fillType === "image" ? !0 : e.elements.some((e) => e.type === "picture" ? !0 : e.type === "media" ? !!e.posterPath : e.type === "chart" ? Te(e.chart).length > 0 : e.type === "shape" && !!e.textBody?.paragraphs.some((e) => Qe(e.bullet).type === "blip"));
@@ -3510,7 +3510,7 @@ var Pn = /* @__PURE__ */ new WeakMap();
3510
3510
  function Fn(e, t) {
3511
3511
  let n = e.tinted.get(t);
3512
3512
  if (n) return n;
3513
- let r = ie(e.raster, t);
3513
+ let r = ae(e.raster, t);
3514
3514
  return e.tinted.set(t, r), r;
3515
3515
  }
3516
3516
  function In(e) {
@@ -3529,7 +3529,7 @@ async function Ln(e, t) {
3529
3529
  if (n.length !== 0) {
3530
3530
  await t.loadMathJax();
3531
3531
  for (let e of n) if (!Pn.has(e.nodes)) try {
3532
- let n = await t.mathMLToSvg(U(e.nodes, e.display)), r = await te(n, "#000000");
3532
+ let n = await t.mathMLToSvg(te(e.nodes, e.display)), r = await M(n, "#000000");
3533
3533
  Pn.set(e.nodes, {
3534
3534
  raster: r,
3535
3535
  widthEm: n.widthEm,
@@ -3556,7 +3556,7 @@ var zn = new Set([
3556
3556
  "system-ui"
3557
3557
  ]);
3558
3558
  function Bn(e) {
3559
- let t = l(e);
3559
+ let t = r(e);
3560
3560
  return t === "mono" ? "monospace" : t === "serif" ? "serif" : "sans-serif";
3561
3561
  }
3562
3562
  var Vn = {
@@ -3581,10 +3581,10 @@ function Wn(e) {
3581
3581
  return e.map((e) => `"${e}"`).join(", ");
3582
3582
  }
3583
3583
  function Gn(e, t = e) {
3584
- let n = Bn(t), i = Vn[t.toLowerCase()], a = i ? `"${i}", ` : "";
3585
- if (Un(t)) return `"${e}", ${a}${Hn}, ${n}`;
3586
- let o = n === "serif" ? "serif" : "sans", s = w(t);
3587
- return `"${e}", ${a}${s ? `${Wn(r(s, o))}, ` : ""}${`${Wn(o === "serif" ? f : u)}, `}${n}`;
3584
+ let n = Bn(t), r = Vn[t.toLowerCase()], i = r ? `"${r}", ` : "", a = C(t), o = a ? `"${a}", ` : "";
3585
+ if (Un(t)) return `"${e}", ${i}${Hn}, ${n}`;
3586
+ let c = n === "serif" ? "serif" : "sans", l = fe(t), u = l ? v(l, c).filter((e) => e !== a) : [];
3587
+ return `"${e}", ${i}${o}${u.length > 0 ? `${Wn(u)}, ` : ""}${`${Wn(c === "serif" ? s : g)}, `}${n}`;
3588
3588
  }
3589
3589
  function Kn(e) {
3590
3590
  return e ? e.kind === "external" ? `e:${e.url}` : `i:${e.ref}` : "";
@@ -3666,7 +3666,7 @@ function er(e, t, n, r, i, a, o) {
3666
3666
  return !1;
3667
3667
  }
3668
3668
  function tr(e) {
3669
- for (let t of e) if (ce(t.codePointAt(0) ?? 0)) return !0;
3669
+ for (let t of e) if (y(t.codePointAt(0) ?? 0)) return !0;
3670
3670
  return !1;
3671
3671
  }
3672
3672
  function nr(e) {
@@ -3710,7 +3710,7 @@ function $(e, t, n) {
3710
3710
  let a = Math.max(0, nr(t) - 1);
3711
3711
  return e.measureText(t).width + n * a;
3712
3712
  }
3713
- function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3713
+ function ar(e, t, n, r, i, o, s, c = !1, l = !1, u = 1, d, f = {
3714
3714
  themeMajorFont: null,
3715
3715
  themeMinorFont: null,
3716
3716
  dpr: 1
@@ -3723,21 +3723,21 @@ function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3723
3723
  let r = n.text.replace(/ +$/u, "");
3724
3724
  r !== n.text && h.set(n, r), (r.length > 0 || n.fieldType != null) && (g = !1);
3725
3725
  }
3726
- let v = () => n - (m.length === 0 ? p : 0), y = { segments: [] }, b = 0, S = !1, C = t.rtl === !0, w = X(t.marR, o), T = (t.tabStops ?? []).map((e) => ({
3726
+ let _ = () => n - (m.length === 0 ? p : 0), v = { segments: [] }, b = 0, x = !1, S = t.rtl === !0, C = X(t.marR, o), w = (t.tabStops ?? []).map((e) => ({
3727
3727
  pos: X(e.pos, o),
3728
3728
  algn: e.algn
3729
- })), E = X(t.defTabSz ?? 914400, o), D = !1, k = [], A = 0, j = () => C ? w : s + (m.length === 0 ? p : 0), M = (e = 0) => {
3729
+ })), T = X(t.defTabSz ?? 914400, o), D = !1, k = [], A = 0, j = () => S ? C : s + (m.length === 0 ? p : 0), M = (e = 0) => {
3730
3730
  let t = bn(e > 0 ? [...k, {
3731
3731
  isTab: !1,
3732
3732
  width: e
3733
- }] : k, T, j(), Infinity, A, E), n = 0;
3733
+ }] : k, w, j(), Infinity, A, T), n = 0;
3734
3734
  for (let e of t) n += e;
3735
3735
  return n;
3736
3736
  }, N = (e) => {
3737
- let t = v();
3737
+ let t = _();
3738
3738
  return Number.isFinite(t) ? D ? M(e) <= t : b + e <= t : !0;
3739
3739
  }, P = () => {
3740
- let e = v();
3740
+ let e = _();
3741
3741
  if (!D) return e - b;
3742
3742
  if (!Number.isFinite(e)) return Infinity;
3743
3743
  if (M(0) >= e) return 0;
@@ -3747,28 +3747,27 @@ function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3747
3747
  M(r) <= e ? t = r : n = r;
3748
3748
  }
3749
3749
  return t;
3750
- }, F = (e = !1) => {
3751
- e && (y.endsWithBreak = !0), m.push(y), y = { segments: [] }, b = 0, D = !1, k = [], S = !1;
3752
- }, I = (t, n, r, i) => {
3750
+ }, I = (e = !1) => {
3751
+ e && (v.endsWithBreak = !0), m.push(v), v = { segments: [] }, b = 0, D = !1, k = [], x = !1;
3752
+ }, L = (t, n, r, i) => {
3753
3753
  e.font = n;
3754
- let a = $(e, t, r), o = y.segments.at(-1);
3754
+ let a = $(e, t, r), o = v.segments.at(-1);
3755
3755
  return !o || o.isTab || o.math || o.sourceRunId !== i ? a : o.font === n && (o.letterSpacingPx ?? 0) === r ? $(e, o.text + t, r) - $(e, o.text, r) : a + r;
3756
- }, L = (t, n, r, i, a, o, s, c) => {
3756
+ }, R = (t, n, r, i, a, o, s, c) => {
3757
3757
  if (!t) return;
3758
3758
  e.font = n;
3759
- let l = c?.letterSpacingPx ?? 0, u = c?.sourceRunId, d = c?.strikeDouble, f = c?.underlineStyle, p = c?.underlineColor, m = c?.shadow, h = c?.reflection, g = c?.outline, _ = c?.highlight, v = c?.fontFamily, x = c?.hyperlink, S = c?.drawSizePx ?? r, C = (e) => !e.math && !e.isTab && e.font === n && e.color === i && e.underline === a && (e.underlineStyle ?? "") === (f ?? "") && (e.underlineColor ?? "") === (p ?? "") && e.strikethrough === o && (e.strikeDouble ?? !1) === (d ?? !1) && (e.letterSpacingPx ?? 0) === l && e.baseline === s && e.shadow === m && e.reflection === h && e.outline === g && (e.highlight ?? "") === (_ ?? "") && (e.fontFamily ?? "") === (v ?? "") && (e.drawSizePx ?? e.sizePx) === S && Kn(e.hyperlink) === Kn(x) && (l === 0 || e.sourceRunId === u), w = y.segments.at(-1), T = $(e, t, l);
3760
- if (w && C(w) ? T = $(e, w.text + t, l) - $(e, w.text, l) : w && !w.isTab && !w.math && u != null && w.sourceRunId === u && (T += l), b += T, k.push({
3759
+ let l = c?.letterSpacingPx ?? 0, u = c?.sourceRunId, d = c?.strikeDouble, f = c?.underlineStyle, p = c?.underlineColor, m = c?.shadow, h = c?.reflection, g = c?.outline, _ = c?.highlight, y = c?.hyperlink, x = c?.drawSizePx ?? r, S = (e) => !e.math && !e.isTab && e.font === n && e.color === i && e.underline === a && (e.underlineStyle ?? "") === (f ?? "") && (e.underlineColor ?? "") === (p ?? "") && e.strikethrough === o && (e.strikeDouble ?? !1) === (d ?? !1) && (e.letterSpacingPx ?? 0) === l && e.baseline === s && e.shadow === m && e.reflection === h && e.outline === g && (e.highlight ?? "") === (_ ?? "") && (e.drawSizePx ?? e.sizePx) === x && Kn(e.hyperlink) === Kn(y) && (l === 0 || e.sourceRunId === u), C = v.segments.at(-1), w = $(e, t, l);
3760
+ if (C && S(C) ? w = $(e, C.text + t, l) - $(e, C.text, l) : C && !C.isTab && !C.math && u != null && C.sourceRunId === u && (w += l), b += w, k.push({
3761
3761
  isTab: !1,
3762
- width: T
3763
- }), w && C(w)) w.text += t;
3762
+ width: w
3763
+ }), C && S(C)) C.text += t;
3764
3764
  else {
3765
- let e = w && !w.isTab && !w.math && u != null && w.sourceRunId === u ? l : 0;
3766
- y.segments.push({
3765
+ let e = C && !C.isTab && !C.math && u != null && C.sourceRunId === u ? l : 0;
3766
+ v.segments.push({
3767
3767
  text: t,
3768
3768
  font: n,
3769
- fontFamily: v,
3770
3769
  sizePx: r,
3771
- drawSizePx: S,
3770
+ drawSizePx: x,
3772
3771
  color: i,
3773
3772
  underline: a,
3774
3773
  underlineStyle: f,
@@ -3783,17 +3782,17 @@ function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3783
3782
  reflection: h,
3784
3783
  outline: g,
3785
3784
  highlight: _,
3786
- hyperlink: x
3785
+ hyperlink: y
3787
3786
  });
3788
3787
  }
3789
- }, R = () => {
3790
- let e = y.segments.at(-1);
3788
+ }, z = () => {
3789
+ let e = v.segments.at(-1);
3791
3790
  if (!e || e.math) return !1;
3792
3791
  let t = /^(.*\s)(\S+)$/s.exec(e.text), n;
3793
3792
  if (t) e.text = t[1], n = t[2];
3794
- else if (y.segments.length > 1) y.segments.pop(), n = e.text;
3793
+ else if (v.segments.length > 1) v.segments.pop(), n = e.text;
3795
3794
  else return !1;
3796
- return F(), L(n, e.font, e.sizePx, e.color, e.underline, e.strikethrough, e.baseline, {
3795
+ return I(), R(n, e.font, e.sizePx, e.color, e.underline, e.strikethrough, e.baseline, {
3797
3796
  strikeDouble: e.strikeDouble,
3798
3797
  letterSpacingPx: e.letterSpacingPx,
3799
3798
  underlineStyle: e.underlineStyle,
@@ -3802,69 +3801,66 @@ function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3802
3801
  reflection: e.reflection,
3803
3802
  outline: e.outline,
3804
3803
  highlight: e.highlight,
3805
- fontFamily: e.fontFamily,
3806
3804
  sourceRunId: e.sourceRunId,
3807
3805
  drawSizePx: e.drawSizePx
3808
3806
  }), !0;
3809
3807
  };
3810
3808
  for (let [n, s] of t.runs.entries()) {
3811
3809
  if (s.type === "break") {
3812
- F(!0);
3810
+ I(!0);
3813
3811
  continue;
3814
3812
  }
3815
3813
  if (s.type === "math") {
3816
- let e = Pn.get(s.nodes), t = s.fontSize == null ? r : s.fontSize * Y * o * u, n = e ? e.widthEm * t : 0, i = e ? e.ascentEm * t : 0, c = e ? e.descentEm * t : 0;
3817
- (s.display && b > 0 || !N(n) && b > 0) && F(), k.push({
3814
+ let e = Pn.get(s.nodes), t = s.fontSize == null ? r : s.fontSize * Y * o * u, n = e ? e.widthEm * t : 0, a = e ? e.ascentEm * t : 0, c = e ? e.descentEm * t : 0;
3815
+ (s.display && b > 0 || !N(n) && b > 0) && I(), k.push({
3818
3816
  isTab: !1,
3819
3817
  width: n
3820
- }), y.segments.push({
3818
+ }), v.segments.push({
3821
3819
  text: "",
3822
3820
  font: `${t}px sans-serif`,
3823
3821
  sizePx: t,
3824
- color: s.color ? Q(s.color) : a,
3822
+ color: s.color ? Q(s.color) : i,
3825
3823
  underline: !1,
3826
3824
  strikethrough: !1,
3827
3825
  math: {
3828
3826
  nodes: s.nodes,
3829
3827
  display: s.display,
3830
3828
  width: n,
3831
- ascent: i,
3829
+ ascent: a,
3832
3830
  descent: c
3833
3831
  }
3834
- }), b += n, s.display && F();
3832
+ }), b += n, s.display && I();
3835
3833
  continue;
3836
3834
  }
3837
- let p = s.fontSize == null ? r : s.fontSize * Y * o * u, m = $n(p, s.baseline ?? void 0), g = Rn(s.fontFamily ?? t.defFontFamily ?? null, f), C = s.fontFamilyEa ? Rn(s.fontFamilyEa, f) : null, w = s.fontFamilySym ? Rn(s.fontFamilySym, f) : null, T;
3838
- T = s.color ? Q(s.color) : s.hyperlink && f.themeHlinkColor ? Q(f.themeHlinkColor) : a;
3839
- let E = s.bold ?? t.defBold ?? c, j = s.italic ?? t.defItalic ?? l, M = Yn(E, j, m, g, f), B = C ? Yn(E, j, m, C, f) : M;
3835
+ let p = s.fontSize == null ? r : s.fontSize * Y * o * u, m = $n(p, s.baseline ?? void 0), g = Rn(s.fontFamily ?? t.defFontFamily ?? null, f), S = s.fontFamilyEa ? Rn(s.fontFamilyEa, f) : null, C = s.fontFamilySym ? Rn(s.fontFamilySym, f) : null, w;
3836
+ w = s.color ? Q(s.color) : s.hyperlink && f.themeHlinkColor ? Q(f.themeHlinkColor) : i;
3837
+ let T = s.bold ?? t.defBold ?? c, j = s.italic ?? t.defItalic ?? l, M = Yn(T, j, m, g, f), B = S ? Yn(T, j, m, S, f) : M;
3840
3838
  e.font = M;
3841
- let H = s.caps, U = h.get(s) ?? s.text;
3842
- (H === "all" || H === "small") && (U = U.toUpperCase());
3843
- let ee = s.fieldType === "slidenum" && d !== void 0 ? String(d) : U, W = s.underline || s.hyperlink !== void 0, G = s.strikeDouble === !0, K = s.letterSpacing == null ? 0 : s.letterSpacing * Y * o, q = {
3844
- strikeDouble: G,
3845
- letterSpacingPx: K,
3839
+ let V = s.caps, H = h.get(s) ?? s.text;
3840
+ (V === "all" || V === "small") && (H = H.toUpperCase());
3841
+ let U = s.fieldType === "slidenum" && d !== void 0 ? String(d) : H, W = s.underline || s.hyperlink !== void 0, te = s.strikeDouble === !0, G = s.letterSpacing == null ? 0 : s.letterSpacing * Y * o, K = {
3842
+ strikeDouble: te,
3843
+ letterSpacingPx: G,
3846
3844
  underlineStyle: s.underlineStyle,
3847
3845
  underlineColor: s.underlineColor ? Q(s.underlineColor) : void 0,
3848
3846
  shadow: s.shadow,
3849
3847
  reflection: s.reflection,
3850
3848
  outline: s.outline,
3851
- fontFamily: g,
3852
3849
  highlight: s.highlight ? Q(s.highlight) : void 0,
3853
3850
  hyperlink: rn(s.hyperlink),
3854
3851
  sourceRunId: n,
3855
3852
  drawSizePx: m
3856
- }, J = ee.split(/(\s+)/);
3853
+ }, J = U.split(/(\s+)/);
3857
3854
  for (let r of J) {
3858
3855
  if (!r) continue;
3859
3856
  if (/^\t+$/.test(r)) {
3860
3857
  D || (e.font = M, A = e.measureText(" ").width);
3861
- for (let e of r) y.segments.push({
3858
+ for (let e of r) v.segments.push({
3862
3859
  text: "",
3863
3860
  isTab: !0,
3864
3861
  font: M,
3865
- fontFamily: g,
3866
3862
  sizePx: p,
3867
- color: T,
3863
+ color: w,
3868
3864
  underline: !1,
3869
3865
  strikethrough: !1
3870
3866
  }), k.push({
@@ -3875,132 +3871,133 @@ function ar(e, t, n, r, a, o, s, c = !1, l = !1, u = 1, d, f = {
3875
3871
  continue;
3876
3872
  }
3877
3873
  e.font = M;
3878
- let a = I(r, M, K, n), o = /^\s+$/.test(r), c = /[-]/;
3879
- if (c.test(r) && (w != null || ge(g))) {
3880
- let t = w ?? g;
3874
+ let i = L(r, M, G, n), o = /^\s+$/.test(r), c = /[-]/;
3875
+ if (c.test(r) && (C != null || ge(g))) {
3876
+ let t = C ?? g;
3881
3877
  for (let i of r) {
3882
3878
  let r = i, a = M;
3883
3879
  if (c.test(i)) {
3884
3880
  let e = be(i, t);
3885
- e === i ? a = Yn(E, j, m, t, f) : (r = e, a = Yn(E, j, m, "sans-serif", f));
3881
+ e === i ? a = Yn(T, j, m, t, f) : (r = e, a = Yn(T, j, m, "sans-serif", f));
3886
3882
  }
3887
- e.font = a, !N(I(r, a, K, n)) && b > 0 && F(), L(r, a, p, T, W, s.strikethrough, s.baseline ?? void 0, q);
3883
+ e.font = a, !N(L(r, a, G, n)) && b > 0 && I(), R(r, a, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3888
3884
  }
3889
3885
  continue;
3890
3886
  }
3891
- if (tr(r) && (!V(r) || t.eaLnBrk === !1)) {
3892
- let i = [];
3887
+ if (tr(r) && (!q(r) || t.eaLnBrk === !1)) {
3888
+ let i = [], o = "", c = () => {
3889
+ o !== "" && (e.font = M, i.push({
3890
+ ch: o,
3891
+ w: $(e, o, G),
3892
+ font: M
3893
+ }), o = "");
3894
+ };
3893
3895
  for (let t of r) {
3894
- let n = ce(t.codePointAt(0) ?? 0) && C != null, r = n ? B : M, a = n ? C : g;
3895
- e.font = r, i.push({
3896
+ if (!y(t.codePointAt(0) ?? 0)) {
3897
+ o += t;
3898
+ continue;
3899
+ }
3900
+ c();
3901
+ let n = S == null ? M : B;
3902
+ e.font = n, i.push({
3896
3903
  ch: t,
3897
3904
  w: $(e, t, 0),
3898
- font: r,
3899
- family: a
3905
+ font: n
3900
3906
  });
3901
3907
  }
3902
- if (t.eaLnBrk === !1) {
3903
- let e = y.segments.at(-1), t = !!e && !e.isTab && !e.math && e.sourceRunId === n, r = i.reduce((e, t) => e + t.w, 0) + Math.max(0, i.length - 1) * K + (t && i.length > 0 ? K : 0);
3904
- b > 0 && !N(r) && F();
3905
- for (let e of i) L(e.ch, e.font, p, T, W, s.strikethrough, s.baseline ?? void 0, {
3906
- ...q,
3907
- fontFamily: e.family
3908
- });
3908
+ if (c(), t.eaLnBrk === !1) {
3909
+ let e = v.segments.at(-1), t = !!e && !e.isTab && !e.math && e.sourceRunId === n, r = i.reduce((e, t) => e + t.w, 0) + Math.max(0, i.length - 1) * G + (t && i.length > 0 ? G : 0);
3910
+ b > 0 && !N(r) && I();
3911
+ for (let e of i) R(e.ch, e.font, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3909
3912
  continue;
3910
3913
  }
3911
- let a = i;
3912
- for (; a.length > 0;) {
3913
- let e = Number.isFinite(v()) ? v() - P() : b, t = y.segments.at(-1), r = !!t && !t.isTab && !t.math && t.sourceRunId === n, i = un(a, e, v(), _, K, r);
3914
+ let l = i;
3915
+ for (; l.length > 0;) {
3916
+ let e = Number.isFinite(_()) ? _() - P() : b, t = v.segments.at(-1), r = !!t && !t.isTab && !t.math && t.sourceRunId === n, i = un(l, e, _(), a, G, r);
3914
3917
  if (i === 0) {
3915
3918
  if (b > 0) {
3916
- F();
3919
+ I();
3917
3920
  continue;
3918
3921
  }
3919
3922
  i = 1;
3920
3923
  }
3921
3924
  for (let e = 0; e < i; e++) {
3922
- let t = a[e];
3923
- L(t.ch, t.font, p, T, W, s.strikethrough, s.baseline ?? void 0, {
3924
- ...q,
3925
- fontFamily: t.family
3926
- });
3925
+ let t = l[e];
3926
+ R(t.ch, t.font, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3927
3927
  }
3928
- a = a.slice(i), a.length > 0 && F();
3928
+ l = l.slice(i), l.length > 0 && I();
3929
3929
  }
3930
3930
  continue;
3931
3931
  }
3932
- if (V(r)) {
3933
- let t = x(r, {
3932
+ if (q(r)) {
3933
+ let t = O(r, {
3934
3934
  cjk: !0,
3935
- kinsoku: _
3936
- }), i = C != null && B !== M, a = (e) => i && ce(e.codePointAt(0) ?? 0), o = (t) => {
3937
- let r = 0, i = y.segments.at(-1), o = !!i && !i.isTab && !i.math && i.sourceRunId === n, s = "", c = null, l = () => {
3938
- s !== "" && (e.font = c ? B : M, r += $(e, s, K), o && (r += K), o = !0, s = "");
3935
+ kinsoku: a
3936
+ }), i = S != null && B !== M, o = (e) => i && y(e.codePointAt(0) ?? 0), c = (t) => {
3937
+ let r = 0, i = v.segments.at(-1), a = !!i && !i.isTab && !i.math && i.sourceRunId === n, s = "", c = null, l = () => {
3938
+ s !== "" && (e.font = c ? B : M, r += $(e, s, G), a && (r += G), a = !0, s = "");
3939
3939
  };
3940
3940
  for (let e of t) {
3941
- let t = a(e);
3941
+ let t = o(e);
3942
3942
  c === null || t === c ? (s += e, c = t) : (l(), s = e, c = t);
3943
3943
  }
3944
3944
  return l(), r;
3945
- }, c = (e) => {
3945
+ }, l = (e) => {
3946
3946
  let t = "", n = null, r = () => {
3947
- if (t === "") return;
3948
- let e = n ? B : M, r = n ? C : g;
3949
- L(t, e, p, T, W, s.strikethrough, s.baseline ?? void 0, {
3950
- ...q,
3951
- fontFamily: r
3952
- }), t = "";
3947
+ t !== "" && (R(t, n ? B : M, p, w, W, s.strikethrough, s.baseline ?? void 0, K), t = "");
3953
3948
  };
3954
3949
  for (let i of e) {
3955
- let e = a(i);
3950
+ let e = o(i);
3956
3951
  n === null || e === n ? (t += i, n = e) : (r(), t = i, n = e);
3957
3952
  }
3958
3953
  r();
3959
- }, l = de(r), u = r.length, d = 0;
3960
- for (; d < u;) {
3961
- let e = P(), n = z(r, t, d, e, o, l);
3962
- if (n <= d) {
3954
+ }, u = E(r), d = r.length, f = 0;
3955
+ for (; f < d;) {
3956
+ let e = P(), n = ee(r, t, f, e, c, u);
3957
+ if (n <= f) {
3963
3958
  if (b > 0) {
3964
- F();
3959
+ I();
3965
3960
  continue;
3966
3961
  }
3967
- let i = t.find((e) => e > d) ?? u, a = r.slice(d, i), s = O(a), c = z(a, s, 0, e, o, l);
3968
- c <= 0 && (c = s.length > 0 ? s[0] : a.length), n = d + c;
3962
+ let i = t.find((e) => e > f) ?? d, a = r.slice(f, i), o = F(a), s = ee(a, o, 0, e, c, u);
3963
+ s <= 0 && (s = o.length > 0 ? o[0] : a.length), n = f + s;
3969
3964
  }
3970
- c(r.slice(d, n)), d = n, d < u && F();
3965
+ l(r.slice(f, n)), f = n, f < d && I();
3971
3966
  }
3972
3967
  continue;
3973
3968
  }
3974
- if (N(a)) L(r, M, p, T, W, s.strikethrough, s.baseline ?? void 0, q), o && (S = !0);
3975
- else if (o) b > 0 && F();
3976
- else if (a > v()) {
3977
- b > 0 && F();
3978
- for (let t of r) e.font = M, !N(I(t, M, K, n)) && b > 0 && F(), L(t, M, p, T, W, s.strikethrough, s.baseline ?? void 0, q);
3979
- } else if (!S) L(r, M, p, T, W, s.strikethrough, s.baseline ?? void 0, q);
3980
- else {
3981
- let e = y.segments.at(-1)?.text ?? "", t = r.codePointAt(0), n = [...e].at(-1)?.codePointAt(0), a = /\S$/u.test(e) && /^\S/u.test(r) && n !== 8203 && t !== 8203, o = t !== void 0 && _.lineStartForbidden.has(t) && a, c = n !== void 0 && t !== void 0 && a && !V(e) && !V(r) && i(n, t);
3982
- (o || c) && R() || F(), L(r, M, p, T, W, s.strikethrough, s.baseline ?? void 0, q);
3969
+ if (N(i)) R(r, M, p, w, W, s.strikethrough, s.baseline ?? void 0, K), o && (x = !0);
3970
+ else if (o) b > 0 && I();
3971
+ else if (i > _()) {
3972
+ b > 0 && I();
3973
+ for (let t of r) e.font = M, !N(L(t, M, G, n)) && b > 0 && I(), R(t, M, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3974
+ } else if (x) {
3975
+ let e = v.segments.at(-1)?.text ?? "", t = r.codePointAt(0), n = [...e].at(-1)?.codePointAt(0), i = /\S$/u.test(e) && /^\S/u.test(r) && n !== 8203 && t !== 8203, o = t !== void 0 && a.lineStartForbidden.has(t) && i, c = n !== void 0 && t !== void 0 && i && !q(e) && !q(r) && le(n, t);
3976
+ (o || c) && z() || I(), R(r, M, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3977
+ } else {
3978
+ let e = [...v.segments.at(-1)?.text ?? ""].at(-1)?.codePointAt(0), t = r.codePointAt(0);
3979
+ e !== void 0 && t !== void 0 && y(e) !== y(t) && !le(e, t) && b > 0 && I(), R(r, M, p, w, W, s.strikethrough, s.baseline ?? void 0, K);
3983
3980
  }
3984
3981
  }
3985
3982
  }
3986
- return m.push(y), m;
3983
+ return m.push(v), m;
3987
3984
  }
3988
- async function or(e, t, n, r, i, o, s, c, l, u) {
3985
+ async function or(e, t, n, r, i, a, o, s, c, l) {
3989
3986
  if (t && t.fillType === "image") {
3990
- if (e.fillStyle = "#FFFFFF", e.fillRect(0, 0, n, r), !t.imagePath || !t.mimeType || !s) return;
3987
+ if (e.fillStyle = "#FFFFFF", e.fillRect(0, 0, n, r), !t.imagePath || !t.mimeType || !o) return;
3991
3988
  try {
3992
- let a = t.fillRect ?? {}, d = a.l ?? 0, f = a.t ?? 0, p = a.r ?? 0, m = a.b ?? 0, h = d * n, g = f * r, _ = n * (1 - d - p), v = r * (1 - f - m), y = u && !t.duotone ? Dn(u, Z(t.imagePath, t.duotone)) : void 0, b = t.tile ? await B(t.imagePath, t.mimeType, s) : void 0, x = await Je(t.imagePath, t.mimeType, t.duotone, s, {
3989
+ let u = t.fillRect ?? {}, d = u.l ?? 0, f = u.t ?? 0, p = u.r ?? 0, m = u.b ?? 0, h = d * n, g = f * r, _ = n * (1 - d - p), v = r * (1 - f - m), y = l && !t.duotone ? Dn(l, Z(t.imagePath, t.duotone)) : void 0, b = t.tile ? await U(t.imagePath, t.mimeType, o) : void 0, x = await Je(t.imagePath, t.mimeType, t.duotone, o, {
3993
3990
  widthPt: n / i / Y,
3994
3991
  heightPt: r / i / Y,
3995
3992
  ...y ?? {},
3996
- tiff: c,
3997
- svgDecoder: l
3993
+ tiff: s,
3994
+ svgDecoder: c
3998
3995
  });
3999
- if (o() || !x) return;
3996
+ if (a() || !x) return;
4000
3997
  e.save(), e.beginPath(), e.rect(0, 0, n, r), e.clip(), t.alpha != null && (e.globalAlpha = t.alpha), t.tile ? ur(e, x, t.tile, n, r, i, t.srcRect, b?.dimensions ?? void 0) : je(e, x, t.srcRect, h, g, _, v), e.restore();
4001
3998
  } catch (t) {
4002
- if (a(t, "tiff")) {
4003
- le(e, "tiff", {
3999
+ if (ue(t, "tiff")) {
4000
+ b(e, "tiff", {
4004
4001
  x: 0,
4005
4002
  y: 0,
4006
4003
  width: n,
@@ -4361,9 +4358,9 @@ function Fr(e, t, r, i = "#000000", a, o = {
4361
4358
  }
4362
4359
  return;
4363
4360
  }
4364
- let h = t.scene3d && Ct(t.scene3d.camera) ? t.scene3d : null;
4365
- if (h && d > 0 && f > 0) {
4366
- let n = e.getTransform(), s = Math.abs(n.a * n.d - n.b * n.c), c = s > 0 ? Math.sqrt(s) : 1, p = Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, c), m = Ur(t.sp3d, h.camera, d, f, r, c), g = Dr(t.rotation, t.flipH, t.flipV);
4361
+ let m = t.scene3d && Ct(t.scene3d.camera) ? t.scene3d : null;
4362
+ if (m && d > 0 && f > 0) {
4363
+ let n = e.getTransform(), s = Math.abs(n.a * n.d - n.b * n.c), c = s > 0 ? Math.sqrt(s) : 1, p = Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, c), h = Ur(t.sp3d, m.camera, d, f, r, c), g = Dr(t.rotation, t.flipH, t.flipV);
4367
4364
  e.save(), g.outerRotation !== 0 && (e.translate(l + d / 2, u + f / 2), e.rotate(g.outerRotation * Math.PI / 180), e.translate(-(l + d / 2), -(u + f / 2)));
4368
4365
  let _ = {
4369
4366
  ...t,
@@ -4386,15 +4383,15 @@ function Fr(e, t, r, i = "#000000", a, o = {
4386
4383
  ..._,
4387
4384
  fill: null,
4388
4385
  stroke: null
4389
- }, b = (t.stroke ? t.stroke.width * r / 2 : 0) + (t.sp3d?.contourW ? t.sp3d.contourW * r : 0) + (m ? Math.hypot(m.offsetX, m.offsetY) / c : 0) + 2, x = (e, t, n) => Wr(e, h.camera, l, u, d, f, (e) => {
4386
+ }, b = (t.stroke ? t.stroke.width * r / 2 : 0) + (t.sp3d?.contourW ? t.sp3d.contourW * r : 0) + (h ? Math.hypot(h.offsetX, h.offsetY) / c : 0) + 2, x = (e, t, n) => Wr(e, m.camera, l, u, d, f, (e) => {
4390
4387
  Fr(e, t, r, i, a, o, void 0);
4391
4388
  }, n ? {
4392
4389
  bevels: p,
4393
- extrusion: m ?? void 0,
4390
+ extrusion: h ?? void 0,
4394
4391
  edgePadCss: b
4395
4392
  } : {}), S = (e) => x(e, v, !0), C = (e) => !t.textBody || x(e, y, !1);
4396
4393
  if (t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection) {
4397
- let n = e.getTransform(), i = Math.abs(n.a * n.d - n.b * n.c), a = i > 0 ? Math.sqrt(i) : 1, o = Mr(h.camera, n, l, u, d, f, b, t.shadow?.algn), s = !1, c = Nr((e) => {
4394
+ let n = e.getTransform(), i = Math.abs(n.a * n.d - n.b * n.c), a = i > 0 ? Math.sqrt(i) : 1, o = Mr(m.camera, n, l, u, d, f, b, t.shadow?.algn), s = !1, c = Nr((e) => {
4398
4395
  s = S(e) || s;
4399
4396
  }, n, o.bbox, {
4400
4397
  w: e.canvas.width || 0,
@@ -4411,9 +4408,9 @@ function Fr(e, t, r, i = "#000000", a, o = {
4411
4408
  e.restore();
4412
4409
  }
4413
4410
  e.save(), (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(l + d / 2, u + f / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(l + d / 2), -(u + f / 2)));
4414
- let _ = t.geometry.toLowerCase(), v = Nn(t.fill, e, l, u, d, f, t.rotation);
4411
+ let g = t.geometry.toLowerCase(), _ = Nn(t.fill, e, l, u, d, f, t.rotation);
4415
4412
  t.shadow || fr(e, t.glow ?? null, r);
4416
- let y = new Set([
4413
+ let v = new Set([
4417
4414
  "line",
4418
4415
  "straightconnector1",
4419
4416
  "bentconnector2",
@@ -4424,7 +4421,7 @@ function Fr(e, t, r, i = "#000000", a, o = {
4424
4421
  "curvedconnector3",
4425
4422
  "curvedconnector4",
4426
4423
  "curvedconnector5"
4427
- ]), b = new Set([
4424
+ ]), y = new Set([
4428
4425
  "callout1",
4429
4426
  "callout2",
4430
4427
  "callout3",
@@ -4437,22 +4434,22 @@ function Fr(e, t, r, i = "#000000", a, o = {
4437
4434
  "accentbordercallout1",
4438
4435
  "accentbordercallout2",
4439
4436
  "accentbordercallout3"
4440
- ]), x = (e) => b.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector"), S = !t.custGeom && m(_), C = (n, i, a = {
4437
+ ]), b = (e) => y.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector"), x = !t.custGeom && n(g), S = (n, i, a = {
4441
4438
  x: l,
4442
4439
  y: u,
4443
4440
  w: d,
4444
4441
  h: f
4445
4442
  }) => {
4446
- let { x: o, y: s, w: c, h: p } = a, m = i ?? (n === e && o === l && s === u && c === d && p === f ? v : Nn(t.fill, n, o, s, c, p, t.rotation)), h = i ? null : t.stroke ? () => {
4443
+ let { x: o, y: s, w: c, h: p } = a, m = i ?? (n === e && o === l && s === u && c === d && p === f ? _ : Nn(t.fill, n, o, s, c, p, t.rotation)), h = i ? null : t.stroke ? () => {
4447
4444
  $r(n, t.stroke, r, {
4448
4445
  x: o,
4449
4446
  y: s,
4450
4447
  w: c,
4451
4448
  h: p
4452
4449
  }, t.rotation), n.stroke();
4453
- } : null, y = () => pr(n);
4454
- if (S && !i) {
4455
- g(n, _, o, s, c, p, [
4450
+ } : null, v = () => pr(n);
4451
+ if (x && !i) {
4452
+ R(n, g, o, s, c, p, [
4456
4453
  t.adj,
4457
4454
  t.adj2,
4458
4455
  t.adj3,
@@ -4461,11 +4458,11 @@ function Fr(e, t, r, i = "#000000", a, o = {
4461
4458
  t.adj6,
4462
4459
  t.adj7,
4463
4460
  t.adj8
4464
- ], m, h, y, x(_) ? { skipTrailingStroke: !0 } : void 0);
4461
+ ], m, h, v, b(g) ? { skipTrailingStroke: !0 } : void 0);
4465
4462
  return;
4466
4463
  }
4467
- n.beginPath(), t.custGeom && t.custGeom.length > 0 ? Ir(n, t.custGeom, o, s, c, p) : me(n, _, o, s, c, p, t.adj, t.adj2, t.adj3, t.adj4), m && _ !== "arc" && (n.fillStyle = m, _ === "donut" || _ === "smileyface" || _ === "frame" ? n.fill("evenodd") : n.fill(), i || y()), h && h();
4468
- }, w = e.getTransform(), T = Math.abs(w.a * w.d - w.b * w.c), E = T > 0 ? Math.sqrt(T) : 1, D = (t.shadow || t.reflection || t.softEdge || t.innerShadow ? S ? W(_, l, u, d, f, [
4464
+ n.beginPath(), t.custGeom && t.custGeom.length > 0 ? Ir(n, t.custGeom, o, s, c, p) : me(n, g, o, s, c, p, t.adj, t.adj2, t.adj3, t.adj4), m && g !== "arc" && (n.fillStyle = m, g === "donut" || g === "smileyface" || g === "frame" ? n.fill("evenodd") : n.fill(), i || v()), h && h();
4465
+ }, C = e.getTransform(), w = Math.abs(C.a * C.d - C.b * C.c), T = w > 0 ? Math.sqrt(w) : 1, E = (t.shadow || t.reflection || t.softEdge || t.innerShadow ? x ? B(g, l, u, d, f, [
4469
4466
  t.adj,
4470
4467
  t.adj2,
4471
4468
  t.adj3,
@@ -4479,15 +4476,15 @@ function Fr(e, t, r, i = "#000000", a, o = {
4479
4476
  y: u,
4480
4477
  w: d,
4481
4478
  h: f
4482
- }, O = t.stroke ? t.stroke.width * r / 2 : 0, k = t.stroke ? Math.max(t.stroke.headEnd ? pe(t.stroke.headEnd, t.stroke, r) : 0, t.stroke.tailEnd ? pe(t.stroke.tailEnd, t.stroke, r) : 0) : 0, A = t.sp3d?.contourW ? t.sp3d.contourW * r : 0, j = Math.max(O, k, A), M = j > 0 ? {
4483
- x: D.x - j,
4484
- y: D.y - j,
4485
- w: D.w + j * 2,
4486
- h: D.h + j * 2
4487
- } : D, N = Or(w, M.x, M.y, M.w, M.h), P = r * E, F = h ? [] : Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, E), I = (t.stroke ? t.stroke.width * r / 2 : 0) + 2, L = (e) => {
4488
- let i = t.stroke?.fill ? Nn(t.stroke.fill, e, l, u, d, f, t.rotation) ?? void 0 : void 0;
4489
- if (t.stroke && (y.has(_) || b.has(_))) {
4490
- let a = n(_, l, u, d, f, [
4479
+ }, D = t.stroke ? t.stroke.width * r / 2 : 0, O = t.stroke ? Math.max(t.stroke.headEnd ? pe(t.stroke.headEnd, t.stroke, r) : 0, t.stroke.tailEnd ? pe(t.stroke.tailEnd, t.stroke, r) : 0) : 0, k = t.sp3d?.contourW ? t.sp3d.contourW * r : 0, A = Math.max(D, O, k), j = A > 0 ? {
4480
+ x: E.x - A,
4481
+ y: E.y - A,
4482
+ w: E.w + A * 2,
4483
+ h: E.h + A * 2
4484
+ } : E, M = Or(C, j.x, j.y, j.w, j.h), N = r * T, P = m ? [] : Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d?.prstMaterial, r, T), F = (t.stroke ? t.stroke.width * r / 2 : 0) + 2, I = (e) => {
4485
+ let n = t.stroke?.fill ? Nn(t.stroke.fill, e, l, u, d, f, t.rotation) ?? void 0 : void 0;
4486
+ if (t.stroke && (v.has(g) || y.has(g))) {
4487
+ let i = h(g, l, u, d, f, [
4491
4488
  t.adj,
4492
4489
  t.adj2,
4493
4490
  t.adj3,
@@ -4497,10 +4494,10 @@ function Fr(e, t, r, i = "#000000", a, o = {
4497
4494
  t.adj7,
4498
4495
  t.adj8
4499
4496
  ]);
4500
- if (!a) return;
4501
- let o = t.stroke.cmpd, s = _ === "line" || _ === "straightconnector1";
4502
- if (x(_) && a.vertices.length >= 2 && !(o && s)) {
4503
- let n = a.vertices.map((e) => ({
4497
+ if (!i) return;
4498
+ let a = t.stroke.cmpd, o = g === "line" || g === "straightconnector1";
4499
+ if (b(g) && i.vertices.length >= 2 && !(a && o)) {
4500
+ let n = i.vertices.map((e) => ({
4504
4501
  x: e.x,
4505
4502
  y: e.y
4506
4503
  }));
@@ -4521,40 +4518,40 @@ function Fr(e, t, r, i = "#000000", a, o = {
4521
4518
  for (let t = 1; t < n.length; t++) e.lineTo(n[t].x, n[t].y);
4522
4519
  e.stroke();
4523
4520
  }
4524
- o && s && Qr(e, a.start, a.end, t.stroke, o, r, t.rotation), t.stroke.tailEnd && _e(e, a.end.x, a.end.y, a.end.angle, t.stroke.tailEnd, t.stroke, r, i), t.stroke.headEnd && _e(e, a.start.x, a.start.y, a.start.angle, t.stroke.headEnd, t.stroke, r, i);
4521
+ a && o && Qr(e, i.start, i.end, t.stroke, a, r, t.rotation), t.stroke.tailEnd && _e(e, i.end.x, i.end.y, i.end.angle, t.stroke.tailEnd, t.stroke, r, n), t.stroke.headEnd && _e(e, i.start.x, i.start.y, i.start.angle, t.stroke.headEnd, t.stroke, r, n);
4525
4522
  return;
4526
4523
  }
4527
4524
  if (!t.stroke || !t.custGeom || t.custGeom.length === 0 || (!t.stroke.headEnd || t.stroke.headEnd.type === "none") && (!t.stroke.tailEnd || t.stroke.tailEnd.type === "none")) return;
4528
- let { start: a, end: o } = ve(t.custGeom);
4529
- a && t.stroke.headEnd && t.stroke.headEnd.type !== "none" && _e(e, l + a.x * d, u + a.y * f, Math.atan2(a.dy * f, a.dx * d), t.stroke.headEnd, t.stroke, r, i), o && t.stroke.tailEnd && t.stroke.tailEnd.type !== "none" && _e(e, l + o.x * d, u + o.y * f, Math.atan2(o.dy * f, o.dx * d), t.stroke.tailEnd, t.stroke, r, i);
4530
- }, R = (e) => {
4531
- if (F.length > 0 && Gr(e, l, u, d, f, F, (e, t, n, r, i) => C(e, void 0, {
4525
+ let { start: i, end: a } = ve(t.custGeom);
4526
+ i && t.stroke.headEnd && t.stroke.headEnd.type !== "none" && _e(e, l + i.x * d, u + i.y * f, Math.atan2(i.dy * f, i.dx * d), t.stroke.headEnd, t.stroke, r, n), a && t.stroke.tailEnd && t.stroke.tailEnd.type !== "none" && _e(e, l + a.x * d, u + a.y * f, Math.atan2(a.dy * f, a.dx * d), t.stroke.tailEnd, t.stroke, r, n);
4527
+ }, L = (e) => {
4528
+ if (P.length > 0 && Gr(e, l, u, d, f, P, (e, t, n, r, i) => S(e, void 0, {
4532
4529
  x: t,
4533
4530
  y: n,
4534
4531
  w: r,
4535
4532
  h: i
4536
- }), void 0, I)) {
4537
- L(e), pr(e);
4533
+ }), void 0, F)) {
4534
+ I(e), pr(e);
4538
4535
  return;
4539
4536
  }
4540
- C(e), L(e);
4537
+ S(e), I(e);
4541
4538
  };
4542
- if (Pr(e, t, R, R, N, jr(w, l, u, d, f, t.shadow?.algn), r, P, w, !!v, (e) => C(e, "#000")), t.textBody) {
4539
+ if (Pr(e, t, L, L, M, jr(C, l, u, d, f, t.shadow?.algn), r, N, C, !!_, (e) => S(e, "#000")), t.textBody) {
4543
4540
  let n = Er(t, o);
4544
4541
  if (e.save(), t.flipH || t.flipV) {
4545
4542
  let n = l + d / 2, r = u + f / 2;
4546
4543
  e.translate(n, r), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-n, -r);
4547
4544
  }
4548
- let s = l, m = u, h = d, g = f;
4549
- if (t.textRect) s = X(t.textRect.x, r), m = X(t.textRect.y, r), h = X(t.textRect.width, r), g = X(t.textRect.height, r);
4550
- else if (_ === "ellipse") {
4545
+ let s = l, m = u, h = d, _ = f;
4546
+ if (t.textRect) s = X(t.textRect.x, r), m = X(t.textRect.y, r), h = X(t.textRect.width, r), _ = X(t.textRect.height, r);
4547
+ else if (g === "ellipse") {
4551
4548
  let e = d * (1 - 1 / Math.SQRT2) / 2, t = f * (1 - 1 / Math.SQRT2) / 2;
4552
- s = l + e, m = u + t, h = d / Math.SQRT2, g = f / Math.SQRT2;
4549
+ s = l + e, m = u + t, h = d / Math.SQRT2, _ = f / Math.SQRT2;
4553
4550
  } else {
4554
- let e = Tr(_, l, u, d, f, t.adj, t.adj2);
4555
- e && (s = e.tx, m = e.ty, h = e.tw, g = e.th);
4551
+ let e = Tr(g, l, u, d, f, t.adj, t.adj2);
4552
+ e && (s = e.tx, m = e.ty, h = e.tw, _ = e.th);
4556
4553
  }
4557
- Vr(e, t.textBody, s, m, h, g, r, n, t.rotation, !1, !1, i, a, o, p, !1, c), e.restore();
4554
+ Vr(e, t.textBody, s, m, h, _, r, n, t.rotation, !1, !1, i, a, o, p, !1, c), e.restore();
4558
4555
  }
4559
4556
  e.restore();
4560
4557
  }
@@ -4634,231 +4631,234 @@ function Br(e, t) {
4634
4631
  }
4635
4632
  return t.clear(), "";
4636
4633
  }
4637
- function Vr(t, n, r, i, a, o, s, c = null, l = 0, u = !1, d = !1, f = "#000000", p, m = {
4634
+ function Vr(e, t, n, r, i, a, o, s = null, c = 0, l = !1, u = !1, d = "#000000", f, p = {
4638
4635
  themeMajorFont: null,
4639
4636
  themeMinorFont: null,
4640
4637
  dpr: 1
4641
- }, h, g = !1, _, v = !1, y = g) {
4642
- let b = n.vert === "vert" || n.vert === "eaVert", x = n.vert === "vert270";
4643
- if (b || x) {
4644
- let e = r + a / 2, u = i + o / 2, d = b ? 90 : -90, v = h ? (e) => h({
4638
+ }, m, h = !1, g, _ = !1, v = h) {
4639
+ let y = t.vert === "vert" || t.vert === "eaVert", b = t.vert === "vert270";
4640
+ if (y || b) {
4641
+ let l = n + i / 2, u = r + a / 2, _ = y ? 90 : -90, v = m ? (e) => m({
4645
4642
  ...e,
4646
- inShapeX: e.inShapeX - o / 2 + a / 2,
4647
- inShapeY: e.inShapeY - a / 2 + o / 2,
4648
- shapeX: r,
4649
- shapeY: i,
4650
- shapeW: a,
4651
- shapeH: o,
4652
- rotation: l,
4653
- textBodyRotation: d
4643
+ inShapeX: e.inShapeX - a / 2 + i / 2,
4644
+ inShapeY: e.inShapeY - i / 2 + a / 2,
4645
+ shapeX: n,
4646
+ shapeY: r,
4647
+ shapeW: i,
4648
+ shapeH: a,
4649
+ rotation: c,
4650
+ textBodyRotation: _
4654
4651
  }) : void 0;
4655
- if (g) return a;
4656
- t.save(), t.translate(e, u), t.rotate(x ? -Math.PI / 2 : Math.PI / 2), Vr(t, {
4657
- ...n,
4652
+ if (h) return i;
4653
+ e.save(), e.translate(l, u), e.rotate(b ? -Math.PI / 2 : Math.PI / 2), Vr(e, {
4654
+ ...t,
4658
4655
  vert: "horz"
4659
- }, -o / 2, -a / 2, o, a, s, c, 0, !1, !1, f, p, m, v, !1, _, n.vert === "eaVert"), t.restore();
4656
+ }, -a / 2, -i / 2, a, i, o, s, 0, !1, !1, d, f, p, v, !1, g, t.vert === "eaVert"), e.restore();
4660
4657
  return;
4661
4658
  }
4662
- let S = n.textWarp;
4663
- if (!g && S && rt(S.preset)) {
4664
- wr(t, n, S.preset, S.adj ?? [], r, i, a, o, s, c ?? f, m);
4659
+ let x = t.textWarp;
4660
+ if (!h && x && rt(x.preset)) {
4661
+ wr(e, t, x.preset, x.adj ?? [], n, r, i, a, o, s ?? d, p);
4665
4662
  return;
4666
4663
  }
4667
- let C = X(n.lIns, s), w = X(n.rIns, s), T = X(n.tIns, s), E = X(n.bIns, s), D = n.wrap !== "none", O = n.autoFit === "sp", A = O ? D && er(t, n, a, C, w, s, m) : D, j = Math.max(1, n.numCol ?? 1), M = X(n.spcCol ?? 0, s), N = n.defaultBold ?? !1, P = n.defaultItalic ?? !1, F = c ?? f, I = (e) => {
4668
- let i = (n.defaultFontSize ?? 18) * Y * s * e, o = [], c = 0, l = /* @__PURE__ */ new Map();
4669
- for (let u = 0; u < n.paragraphs.length; u++) {
4670
- let d = n.paragraphs[u], f = X(d.marL, s), h = X(d.marR, s), _ = X(d.indent, s), v = d.defFontSize == null ? i : d.defFontSize * Y * s * e, b = d.defColor ? Q(d.defColor) : F, x = Xn(d), S = (() => {
4671
- for (let e of d.runs) if (e.type === "text" && e.fontSize != null) return e.fontSize;
4672
- return d.defFontSize ?? n.defaultFontSize ?? 18;
4673
- })() * Y * s * e, T = (() => {
4674
- for (let e of d.runs) if (e.type === "text" && e.color) return e.color;
4664
+ let S = X(t.lIns, o), C = X(t.rIns, o), w = X(t.tIns, o), E = X(t.bIns, o), D = t.wrap !== "none", O = t.autoFit === "sp", k = O ? D && er(e, t, i, S, C, o, p) : D, A = Math.max(1, t.numCol ?? 1), j = X(t.spcCol ?? 0, o), M = t.defaultBold ?? !1, N = t.defaultItalic ?? !1, P = s ?? d, F = (r) => {
4665
+ let a = (t.defaultFontSize ?? 18) * Y * o * r, s = [], c = 0, l = 0, u = /* @__PURE__ */ new Map();
4666
+ for (let d = 0; d < t.paragraphs.length; d++) {
4667
+ let m = t.paragraphs[d], g = X(m.marL, o), _ = X(m.marR, o), y = X(m.indent, o), b = m.defFontSize == null ? a : m.defFontSize * Y * o * r, x = m.defColor ? Q(m.defColor) : P, w = Xn(m), T = (() => {
4668
+ for (let e of m.runs) if (e.type === "text" && e.fontSize != null) return e.fontSize;
4669
+ return m.defFontSize ?? t.defaultFontSize ?? 18;
4670
+ })() * Y * o * r, E = (() => {
4671
+ for (let e of m.runs) if (e.type === "text" && e.color) return e.color;
4675
4672
  return null;
4676
- })(), E = T ? Q(T) : b, D = (() => {
4677
- for (let e of d.runs) if (e.type === "text" && e.fontFamily) return e.fontFamily;
4678
- return d.defFontFamily ?? null;
4679
- })(), k = "", I = Yn(!1, !1, S, "sans-serif", m), L = E, R = null;
4680
- k = Br(d, l);
4681
- let z = Qe(d.bullet);
4682
- if (z.type === "char") {
4683
- let t = z;
4684
- I = Yn(!1, !1, t.sizePts == null ? t.sizePct == null ? S : S * (t.sizePct / 100) : t.sizePts * Y * s * e, k === t.char ? Rn(t.fontFamily ?? null, m) : "sans-serif", m), L = t.color ? Q(t.color) : E;
4685
- } else if (z.type === "autoNum") {
4686
- let t = z;
4687
- I = Yn(!1, !1, t.sizePts == null ? t.sizePct == null ? S : S * (t.sizePct / 100) : t.sizePts * Y * s * e, Rn(t.fontFamily ?? D, m), m), L = z.color ? Q(z.color) : E;
4688
- } else if (z.type === "blip") {
4689
- let t = z, r = Zn(n, d, t) * Y * s * e;
4690
- R = {
4691
- imagePath: t.imagePath,
4692
- mimeType: t.mimeType,
4693
- sizePx: r
4673
+ })(), D = E ? Q(E) : x, F = (() => {
4674
+ for (let e of m.runs) if (e.type === "text" && e.fontFamily) return e.fontFamily;
4675
+ return m.defFontFamily ?? null;
4676
+ })(), I = "", L = Yn(!1, !1, T, "sans-serif", p), R = D, z = null;
4677
+ I = Br(m, u);
4678
+ let B = Qe(m.bullet);
4679
+ if (B.type === "char") {
4680
+ let e = B;
4681
+ L = Yn(!1, !1, e.sizePts == null ? e.sizePct == null ? T : T * (e.sizePct / 100) : e.sizePts * Y * o * r, I === e.char ? Rn(e.fontFamily ?? null, p) : "sans-serif", p), R = e.color ? Q(e.color) : D;
4682
+ } else if (B.type === "autoNum") {
4683
+ let e = B;
4684
+ L = Yn(!1, !1, e.sizePts == null ? e.sizePct == null ? T : T * (e.sizePct / 100) : e.sizePts * Y * o * r, Rn(e.fontFamily ?? F, p), p), R = B.color ? Q(B.color) : D;
4685
+ } else if (B.type === "blip") {
4686
+ let e = B, n = Zn(t, m, e) * Y * o * r;
4687
+ z = {
4688
+ imagePath: e.imagePath,
4689
+ mimeType: e.mimeType,
4690
+ sizePx: n
4694
4691
  };
4695
4692
  }
4696
- let B = j > 1 ? (a - C - w - (j - 1) * M) / j : a - C - w, V = r + C + f, H = r + C + f + _, U = B - f - h, ee = ar(t, d, A ? U : Infinity, v, b, s, f, N, P, e, p, m, Qn(x, _)), W = d.spaceBefore == null ? 0 : d.spaceBefore / 100 * Y * s * e, G = d.spaceAfter == null ? 0 : d.spaceAfter / 100 * Y * s * e;
4697
- for (let e = 0; e < ee.length; e++) {
4698
- let r = ee[e], i = e === 0, a = e === ee.length - 1, l = 0, f = 0, p = 0;
4699
- for (let e of r.segments) {
4700
- let n = e.math ? Math.max(e.sizePx, (e.math.ascent + e.math.descent) / 1.2) : e.sizePx;
4701
- if (n > l && (l = n), !e.math) {
4702
- let n = J(e.fontFamily, e.sizePx);
4703
- if (n > f && (f = n), O) {
4704
- t.font = e.font;
4705
- let n = t.measureText(e.text || "M"), r = (n.fontBoundingBoxAscent ?? 0) + (n.fontBoundingBoxDescent ?? 0);
4706
- r > p && (p = r);
4707
- }
4693
+ let V = A > 1 ? (i - S - C - (A - 1) * j) / A : i - S - C, H = n + S + g, ee = n + S + g + y, U = V - g - _, W = ar(e, m, k ? U : Infinity, b, x, o, g, M, N, r, f, p, Qn(w, y)), te = m.spaceBefore == null ? 0 : m.spaceBefore / 100 * Y * o * r, G = m.spaceAfter == null ? 0 : m.spaceAfter / 100 * Y * o * r;
4694
+ for (let n = 0; n < W.length; n++) {
4695
+ let r = W[n], i = n === 0, a = n === W.length - 1, u = 0, f = 0;
4696
+ for (let t of r.segments) {
4697
+ let n = t.math ? Math.max(t.sizePx, (t.math.ascent + t.math.descent) / 1.2) : t.sizePx;
4698
+ if (n > u && (u = n), !t.math && O) {
4699
+ e.font = t.font;
4700
+ let n = e.measureText(t.text || "M"), r = (n.fontBoundingBoxAscent ?? 0) + (n.fontBoundingBoxDescent ?? 0);
4701
+ r > f && (f = r);
4708
4702
  }
4709
4703
  }
4710
- if (l === 0 && (l = v), i && k) {
4711
- t.font = I;
4712
- let e = t.measureText("M"), n = e.actualBoundingBoxAscent + e.actualBoundingBoxDescent;
4713
- n > l && (l = n);
4704
+ if (u === 0 && (u = b), i && I) {
4705
+ e.font = L;
4706
+ let t = e.measureText("M"), n = t.actualBoundingBoxAscent + t.actualBoundingBoxDescent;
4707
+ n > u && (u = n);
4714
4708
  }
4715
- i && R && R.sizePx > l && (l = R.sizePx);
4716
- let m = l * 1.2, h = O && f > m && p > 0, b = h ? Math.max(m, p) : Math.max(m, f), S;
4717
- S = d.spaceLine ? d.spaceLine.type === "pct" ? (g ? l : m) * (d.spaceLine.val / 1e5) : d.spaceLine.val * Y * s : g && !O ? y ? m : l : b, n.autoFit === "norm" && n.lnSpcReduction != null && d.spaceLine?.type !== "pts" && (S *= 1 - n.lnSpcReduction);
4718
- let C = S + (a ? G : 0), w = i && u > 0 ? W : 0, T = i ? Qn(x, _) : 0, E = r.segments.some((e) => e.text && e.text.length > 0 || e.math != null), D = i && E ? R : null;
4719
- o.push({
4709
+ i && z && z.sizePx > u && (u = z.sizePx);
4710
+ let p = u * 1.2, g = O && f > p, _ = p, x;
4711
+ x = m.spaceLine ? m.spaceLine.type === "pct" ? (h ? u : p) * (m.spaceLine.val / 1e5) : m.spaceLine.val * Y * o : h && !O ? v ? p : u : _;
4712
+ let S = m.spaceLine?.type === "pct" ? u * (m.spaceLine.val / 1e5) : x;
4713
+ t.autoFit === "norm" && t.lnSpcReduction != null && m.spaceLine?.type !== "pts" && (x *= 1 - t.lnSpcReduction);
4714
+ let C = x + (a ? G : 0), T = i && d > 0 ? te : 0, E = i ? Qn(w, y) : 0, D = r.segments.some((e) => e.text && e.text.length > 0 || e.math != null), k = i && D ? z : null;
4715
+ s.push({
4720
4716
  line: r,
4721
4717
  linePx: C,
4722
- lineHeight: S,
4723
- topGapPx: w,
4724
- textXOffset: T,
4725
- bulletLabel: i ? k : "",
4726
- bulletFont: I,
4727
- bulletColor: L,
4728
- bulletX: H,
4729
- bulletImage: D,
4730
- textX: V,
4718
+ lineHeight: x,
4719
+ baselineLineHeight: S,
4720
+ topGapPx: T,
4721
+ textXOffset: E,
4722
+ bulletLabel: i ? I : "",
4723
+ bulletFont: L,
4724
+ bulletColor: R,
4725
+ bulletX: ee,
4726
+ bulletImage: k,
4727
+ textX: H,
4731
4728
  textMaxW: U,
4732
- alignment: d.alignment,
4729
+ alignment: m.alignment,
4733
4730
  isLastLine: a,
4734
- para: d,
4735
- useResolvedFontMetrics: h
4736
- }), c += C + w;
4731
+ para: m,
4732
+ useResolvedFontMetrics: g
4733
+ });
4734
+ let A = c + T;
4735
+ c += C + T, l = Math.max(l, c, A + (g ? Math.max(x, f) : x) + (a ? G : 0));
4737
4736
  }
4738
4737
  }
4739
4738
  return {
4740
- allLines: o,
4741
- totalHeight: c
4739
+ allLines: s,
4740
+ totalHeight: c,
4741
+ requiredHeight: l
4742
4742
  };
4743
- }, { allLines: L, totalHeight: R } = I(1);
4744
- if (n.autoFit === "norm") if (n.fontScale != null && n.fontScale > 0) n.fontScale < 1 && ({allLines: L, totalHeight: R} = I(n.fontScale));
4743
+ }, { allLines: L, totalHeight: R, requiredHeight: z } = F(1);
4744
+ if (t.autoFit === "norm") if (t.fontScale != null && t.fontScale > 0) t.fontScale < 1 && ({allLines: L, totalHeight: R, requiredHeight: z} = F(t.fontScale));
4745
4745
  else {
4746
- let e = o - T - E;
4747
- if (R > e && e > 0) {
4746
+ let e = a - w - E;
4747
+ if (z > e && e > 0) {
4748
4748
  let t = .1, n = 1;
4749
4749
  for (let r = 0; r < 6; r++) {
4750
4750
  let r = (t + n) / 2;
4751
- I(r).totalHeight <= e ? t = r : n = r;
4751
+ F(r).requiredHeight <= e ? t = r : n = r;
4752
4752
  }
4753
- ({allLines: L, totalHeight: R} = I(t));
4753
+ ({allLines: L, totalHeight: R, requiredHeight: z} = F(t));
4754
4754
  }
4755
4755
  }
4756
- if (g) return T + R + E;
4757
- let z = n.verticalAnchor ?? "t", B = i, V;
4758
- o === 0 && z === "b" ? (V = T + R + E, B = i - V) : V = n.autoFit === "sp" ? Math.max(o, T + R + E) : o;
4759
- let H, U = Math.max(0, V - T - E);
4760
- H = z === "ctr" ? B + T + (U - R) / 2 : z === "b" ? B + V - E - R : B + T, t.save(), t.textAlign = "left", t.textBaseline = "alphabetic";
4761
- let ee = H, W = j > 1 ? (a - C - w - (j - 1) * M) / j + M : 0, G = Math.max(0, V - T - E), K = L[L.length - 1], q = K ? Math.max(0, K.linePx - K.lineHeight) : 0, te = R - q, ne = o === 0 || te <= G + .5, re = j > 1 && !ne ? Math.ceil(L.length / j) : L.length, ie = 0, ae = 0;
4762
- for (let c of L) {
4763
- let { line: u, linePx: d, lineHeight: f, topGapPx: p, textXOffset: g, bulletLabel: y, bulletFont: b, bulletColor: x, bulletImage: S, alignment: C, isLastLine: w, useResolvedFontMetrics: T } = c;
4764
- j > 1 && ie < j - 1 && ae >= re && (ie++, ae = 0, H = ee), H += p, ae++;
4765
- let E = (n.rtlCol ? j - 1 - ie : ie) * W, D = c.textX + E, O = c.bulletX + E, A = c.textMaxW, M = c.para.rtl === !0, N = M || cn(u.segments), P = u.segments.some((e) => e.isTab);
4766
- if (P) {
4767
- let e = X(c.para.marL, s), n = X(c.para.marR, s), r = M ? n : e + g, i = A + e + n;
4768
- t.font = u.segments.find((e) => e.isTab).font;
4769
- let a = t.measureText(" ").width, o = bn(u.segments.map((e) => {
4770
- if (e.isTab) return {
4756
+ if (h) return w + z + E;
4757
+ let B = t.verticalAnchor ?? "t", V = r, H;
4758
+ a === 0 && B === "b" ? (H = w + z + E, V = r - H) : H = t.autoFit === "sp" ? Math.max(a, w + z + E) : a;
4759
+ let ee, U = Math.max(0, H - w - E);
4760
+ ee = B === "ctr" ? V + w + (U - z) / 2 : B === "b" ? V + H - E - z : V + w, e.save(), e.textAlign = "left", e.textBaseline = "alphabetic";
4761
+ let W = ee, te = A > 1 ? (i - S - C - (A - 1) * j) / A + j : 0, G = Math.max(0, H - w - E), K = L[L.length - 1], q = K ? Math.max(0, K.linePx - K.lineHeight) : 0, J = z - q, ne = a === 0 || J <= G + .5, re = A > 1 && !ne ? Math.ceil(L.length / A) : L.length, ie = 0, ae = 0;
4762
+ for (let s of L) {
4763
+ let { line: l, linePx: u, lineHeight: d, topGapPx: f, textXOffset: h, bulletLabel: v, bulletFont: y, bulletColor: b, bulletImage: x, alignment: S, isLastLine: C, useResolvedFontMetrics: w } = s;
4764
+ A > 1 && ie < A - 1 && ae >= re && (ie++, ae = 0, ee = W), ee += f, ae++;
4765
+ let E = (t.rtlCol ? A - 1 - ie : ie) * te, D = s.textX + E, O = s.bulletX + E, k = s.textMaxW, j = s.para.rtl === !0, M = j || cn(l.segments), N = l.segments.some((e) => e.isTab);
4766
+ if (N) {
4767
+ let t = X(s.para.marL, o), n = X(s.para.marR, o), r = j ? n : t + h, i = k + t + n;
4768
+ e.font = l.segments.find((e) => e.isTab).font;
4769
+ let a = e.measureText(" ").width, c = bn(l.segments.map((t) => {
4770
+ if (t.isTab) return {
4771
4771
  isTab: !0,
4772
4772
  width: 0
4773
4773
  };
4774
- if (e.math) return {
4774
+ if (t.math) return {
4775
4775
  isTab: !1,
4776
- width: e.math.width
4776
+ width: t.math.width
4777
4777
  };
4778
- t.font = e.font;
4779
- let n = e.letterSpacingPx ?? 0;
4778
+ e.font = t.font;
4779
+ let n = t.letterSpacingPx ?? 0;
4780
4780
  return {
4781
4781
  isTab: !1,
4782
- width: e.text ? (e.leadingLetterSpacingPx ?? 0) + $(t, e.text, n) : 0
4782
+ width: t.text ? (t.leadingLetterSpacingPx ?? 0) + $(e, t.text, n) : 0
4783
4783
  };
4784
- }), (c.para.tabStops ?? []).map((e) => ({
4785
- pos: X(e.pos, s),
4784
+ }), (s.para.tabStops ?? []).map((e) => ({
4785
+ pos: X(e.pos, o),
4786
4786
  algn: e.algn
4787
- })), r, i, a, X(c.para.defTabSz ?? 914400, s));
4788
- for (let e = 0; e < u.segments.length; e++) u.segments[e].isTab && (u.segments[e].tabWidthPx = o[e]);
4787
+ })), r, i, a, X(s.para.defTabSz ?? 914400, o));
4788
+ for (let e = 0; e < l.segments.length; e++) l.segments[e].isTab && (l.segments[e].tabWidthPx = c[e]);
4789
4789
  }
4790
- let F = 0, I = 0, L = 0, R = 0;
4791
- for (let e of u.segments) {
4792
- if (e.isTab) {
4793
- F += e.tabWidthPx ?? 0;
4790
+ let P = 0, F = 0, L = 0, R = 0;
4791
+ for (let t of l.segments) {
4792
+ if (t.isTab) {
4793
+ P += t.tabWidthPx ?? 0;
4794
4794
  continue;
4795
4795
  }
4796
- if (e.math) {
4797
- F += e.math.width, I = Math.max(I, e.math.ascent);
4796
+ if (t.math) {
4797
+ P += t.math.width, F = Math.max(F, t.math.ascent);
4798
4798
  continue;
4799
4799
  }
4800
- t.font = e.font;
4801
- let n = t.measureText(e.text || "M"), r = e.letterSpacingPx ?? 0;
4802
- if (F += e.leadingLetterSpacingPx ?? 0, F += e.text ? $(t, e.text, r) : 0, n.actualBoundingBoxAscent > 0 && (I = Math.max(I, n.actualBoundingBoxAscent)), T) {
4800
+ e.font = t.font;
4801
+ let n = e.measureText(t.text || "M"), r = t.letterSpacingPx ?? 0;
4802
+ if (P += t.leadingLetterSpacingPx ?? 0, P += t.text ? $(e, t.text, r) : 0, n.actualBoundingBoxAscent > 0 && (F = Math.max(F, n.actualBoundingBoxAscent)), w) {
4803
4803
  let e = n.fontBoundingBoxAscent ?? 0, t = e + (n.fontBoundingBoxDescent ?? 0);
4804
4804
  t > R && (R = t, L = e);
4805
4805
  }
4806
4806
  }
4807
- let B = T && R > 0 ? z === "t" && I > 0 ? I : Math.max(I, L + Math.max(0, f - R) / 2) : Math.max(f * .8, I), V = H + B, U = D + A, G = S && _ ? m.pictureBulletImages?.has(S.imagePath) ? m.pictureBulletImages.get(S.imagePath) : k(S.imagePath, _) : void 0, K = 0;
4808
- if (N && M) {
4809
- if (y) t.font = b, K = t.measureText(y).width;
4810
- else if (S && G) {
4811
- let e = S.sizePx;
4812
- K = G.height > 0 ? e * (G.width / G.height) : e;
4807
+ let z = w && R > 0 ? B === "t" && F > 0 ? s.para.spaceLine?.type === "pct" ? Math.max(F, L + (s.baselineLineHeight - R) / 2) : F : Math.max(F, L + Math.max(0, d - R) / 2) : Math.max(d * .8, F), V = ee + z, H = D + k, U = x && g ? p.pictureBulletImages?.has(x.imagePath) ? p.pictureBulletImages.get(x.imagePath) : I(x.imagePath, g) : void 0, G = 0;
4808
+ if (M && j) {
4809
+ if (v) e.font = y, G = e.measureText(v).width;
4810
+ else if (x && U) {
4811
+ let e = x.sizePx;
4812
+ G = U.height > 0 ? e * (U.width / U.height) : e;
4813
4813
  }
4814
4814
  }
4815
- if (y) if (t.font = b, t.fillStyle = x, N && M) {
4816
- let e = t.direction;
4817
- t.direction = "rtl", t.fillText(y, U - K, V), t.direction = e;
4818
- } else t.fillText(y, O, V);
4819
- if (S && _ && G) {
4820
- let e = S.sizePx, n = G.height > 0 ? e * (G.width / G.height) : e, r = V - e;
4821
- N && M ? t.drawImage(G, U - n, r, n, e) : t.drawImage(G, O, r, n, e);
4815
+ if (v) if (e.font = y, e.fillStyle = b, M && j) {
4816
+ let t = e.direction;
4817
+ e.direction = "rtl", e.fillText(v, H - G, V), e.direction = t;
4818
+ } else e.fillText(v, O, V);
4819
+ if (x && g && U) {
4820
+ let t = x.sizePx, n = U.height > 0 ? t * (U.width / U.height) : t, r = V - t;
4821
+ M && j ? e.drawImage(U, H - n, r, n, t) : e.drawImage(U, O, r, n, t);
4822
4822
  }
4823
- let q = D + g, J;
4824
- J = P ? M ? D + A - K - F : q : C === "ctr" ? q + (A - g - F) / 2 : C === "r" ? D + A - K - F : q;
4825
- let te = C === "just" || C === "justLow" ? "just" : C === "thaiDist" ? "thaiDist" : C === "dist" ? "dist" : null, ne = w || (u.endsWithBreak ?? !1), oe = (te && !N && !P ? fn(u.segments, A - g, F, te, ne) : null) ?? u.segments, se = N ? ln(u.segments, M) : null, ce = (e, t) => {
4823
+ let K = D + h, q;
4824
+ q = N ? j ? D + k - G - P : K : S === "ctr" ? K + (k - h - P) / 2 : S === "r" ? D + k - G - P : K;
4825
+ let J = S === "just" || S === "justLow" ? "just" : S === "thaiDist" ? "thaiDist" : S === "dist" ? "dist" : null, ne = C || (l.endsWithBreak ?? !1), oe = (J && !M && !N ? fn(l.segments, k - h, P, J, ne) : null) ?? l.segments, se = M ? ln(l.segments, j) : null, ce = (e, t) => {
4826
4826
  if (Math.abs(e - t) !== 1) return 0;
4827
- let n = u.segments[Math.min(e, t)], r = u.segments[Math.max(e, t)];
4827
+ let n = l.segments[Math.min(e, t)], r = l.segments[Math.max(e, t)];
4828
4828
  return n.isTab || n.math || r.isTab || r.math || n.sourceRunId == null || n.sourceRunId !== r.sourceRunId ? 0 : r.leadingLetterSpacingPx ?? 0;
4829
4829
  }, le = oe.length;
4830
- for (let n = 0; n < le; n++) {
4831
- let c = se ? se.order[n] : n, u = oe[c], d = se ? se.rtl[c] : !1;
4832
- if (N && (t.direction = d ? "rtl" : "ltr"), n > 0) {
4833
- let e = se ? se.order[n - 1] : n - 1;
4834
- J += ce(e, c);
4830
+ for (let t = 0; t < le; t++) {
4831
+ let s = se ? se.order[t] : t, l = oe[s], u = se ? se.rtl[s] : !1;
4832
+ if (M && (e.direction = u ? "rtl" : "ltr"), t > 0) {
4833
+ let e = se ? se.order[t - 1] : t - 1;
4834
+ q += ce(e, s);
4835
4835
  }
4836
- if (u.isTab) {
4837
- J += u.tabWidthPx ?? 0;
4836
+ if (l.isTab) {
4837
+ q += l.tabWidthPx ?? 0;
4838
4838
  continue;
4839
4839
  }
4840
- let p = u.jext ?? 0, g = u.splitBefore, _ = u.perGap ?? 0, y = g && g.length > 0 ? g.length * _ : 0;
4841
- if (u.math) {
4842
- let e = Pn.get(u.math.nodes), n = u.math.width, r = u.math.ascent + u.math.descent;
4843
- if (e && n > 0 && r > 0) {
4844
- let i = V - u.math.ascent, a = Fn(e, u.color);
4845
- t.drawImage(a, J, i, n, r);
4840
+ let f = l.jext ?? 0, h = l.splitBefore, g = l.perGap ?? 0, v = h && h.length > 0 ? h.length * g : 0;
4841
+ if (l.math) {
4842
+ let t = Pn.get(l.math.nodes), n = l.math.width, r = l.math.ascent + l.math.descent;
4843
+ if (t && n > 0 && r > 0) {
4844
+ let i = V - l.math.ascent, a = Fn(t, l.color);
4845
+ e.drawImage(a, q, i, n, r);
4846
4846
  }
4847
- J += n, J += p;
4847
+ q += n, q += f;
4848
4848
  continue;
4849
4849
  }
4850
- t.font = u.font, t.fillStyle = u.color;
4851
- let b = u.drawSizePx ?? u.sizePx, x = V + (u.baseline ? -(u.baseline / 1e5) * u.sizePx : 0), S = u.letterSpacingPx ?? 0;
4852
- if (u.highlight && u.text) {
4853
- let e = $(t, u.text, S) + y + p;
4854
- Mn(t, J, x, e, b, u.highlight, u.color);
4850
+ e.font = l.font, e.fillStyle = l.color;
4851
+ let y = l.drawSizePx ?? l.sizePx, b = V + (l.baseline ? -(l.baseline / 1e5) * l.sizePx : 0), x = l.letterSpacingPx ?? 0;
4852
+ if (l.highlight && l.text) {
4853
+ let t = $(e, l.text, x) + v + f;
4854
+ Mn(e, q, b, t, y, l.highlight, l.color);
4855
4855
  }
4856
- let C = u.shadow, w = (e, t, n, r) => {
4856
+ let S = l.shadow, C = (e, t, n, r) => {
4857
4857
  let i = r === "fill" ? e.fillText.bind(e) : e.strokeText.bind(e);
4858
- if (S !== 0 && nr(t) > 1) {
4858
+ if (x !== 0 && nr(t) > 1) {
4859
4859
  let r = e, a = r.letterSpacing;
4860
4860
  if (ir(e)) {
4861
- r.letterSpacing = `${S}px`, i(t, n, x);
4861
+ r.letterSpacing = `${x}px`, i(t, n, b);
4862
4862
  try {
4863
4863
  r.letterSpacing = a;
4864
4864
  } catch {}
@@ -4866,88 +4866,88 @@ function Vr(t, n, r, i, a, o, s, c = null, l = 0, u = !1, d = !1, f = "#000000",
4866
4866
  let r = n, a = [...t];
4867
4867
  for (let t = 0; t < a.length; t++) {
4868
4868
  let n = a[t];
4869
- i(n, r, x), t < a.length - 1 && (r += e.measureText(n).width + S);
4869
+ i(n, r, b), t < a.length - 1 && (r += e.measureText(n).width + x);
4870
4870
  }
4871
4871
  }
4872
- } else i(t, n, x);
4873
- }, T = (e) => $(t, e, S), E = g && g.length > 0 ? $t([...u.text], g, _, T) : null, D = [...u.text], O = !!g && g.length === D.length - 1 && D.length > 1, k = (e, t) => {
4874
- if (v) {
4875
- let n = O ? S + _ : S;
4876
- Tn(e, u.text, J, x, b, n, t);
4872
+ } else i(t, n, b);
4873
+ }, w = (t) => $(e, t, x), E = h && h.length > 0 ? $t([...l.text], h, g, w) : null, D = [...l.text], O = !!h && h.length === D.length - 1 && D.length > 1, k = (e, t) => {
4874
+ if (_) {
4875
+ let n = O ? x + g : x;
4876
+ Tn(e, l.text, q, b, y, n, t);
4877
4877
  return;
4878
4878
  }
4879
4879
  if (O) {
4880
- let n = t === "fill" ? e.fillText.bind(e) : e.strokeText.bind(e), r = S + _;
4880
+ let n = t === "fill" ? e.fillText.bind(e) : e.strokeText.bind(e), r = x + g;
4881
4881
  if (ir(e)) {
4882
4882
  let t = e, i = t.letterSpacing;
4883
- t.letterSpacing = `${r}px`, n(u.text, J, x);
4883
+ t.letterSpacing = `${r}px`, n(l.text, q, b);
4884
4884
  try {
4885
4885
  t.letterSpacing = i;
4886
4886
  } catch {}
4887
4887
  } else {
4888
- let t = J;
4888
+ let t = q;
4889
4889
  for (let i = 0; i < D.length; i++) {
4890
4890
  let a = D[i];
4891
- n(a, t, x), i < D.length - 1 && (t += e.measureText(a).width + r);
4891
+ n(a, t, b), i < D.length - 1 && (t += e.measureText(a).width + r);
4892
4892
  }
4893
4893
  }
4894
- } else if (E) for (let { text: n, dx: r } of E) w(e, n, J + r, t);
4895
- else w(e, u.text, J, t);
4896
- }, A = u.reflection;
4897
- if (A && u.text) {
4898
- let e = t.canvas.width || 0, n = t.canvas.height || 0;
4899
- if (e > 0 && n > 0) {
4900
- t.font = u.font;
4901
- let r = t.measureText(u.text), i = Number.isFinite(r.actualBoundingBoxAscent) ? r.actualBoundingBoxAscent : b * .8, a = Number.isFinite(r.actualBoundingBoxDescent) ? r.actualBoundingBoxDescent : b * .2, o = Number.isFinite(r.actualBoundingBoxLeft) ? r.actualBoundingBoxLeft : 0, c = Number.isFinite(r.actualBoundingBoxRight) ? r.actualBoundingBoxRight : r.width, l = t.getTransform(), d = Math.abs(l.a * l.d - l.b * l.c), f = d > 0 ? Math.sqrt(d) : 1;
4902
- Jn(t, (e) => {
4903
- e.font = u.font, e.fillStyle = u.color, k(e, "fill");
4894
+ } else if (E) for (let { text: n, dx: r } of E) C(e, n, q + r, t);
4895
+ else C(e, l.text, q, t);
4896
+ }, A = l.reflection;
4897
+ if (A && l.text) {
4898
+ let t = e.canvas.width || 0, n = e.canvas.height || 0;
4899
+ if (t > 0 && n > 0) {
4900
+ e.font = l.font;
4901
+ let r = e.measureText(l.text), i = Number.isFinite(r.actualBoundingBoxAscent) ? r.actualBoundingBoxAscent : y * .8, a = Number.isFinite(r.actualBoundingBoxDescent) ? r.actualBoundingBoxDescent : y * .2, s = Number.isFinite(r.actualBoundingBoxLeft) ? r.actualBoundingBoxLeft : 0, c = Number.isFinite(r.actualBoundingBoxRight) ? r.actualBoundingBoxRight : r.width, u = e.getTransform(), d = Math.abs(u.a * u.d - u.b * u.c), f = d > 0 ? Math.sqrt(d) : 1;
4902
+ Jn(e, (e) => {
4903
+ e.font = l.font, e.fillStyle = l.color, k(e, "fill");
4904
4904
  }, {
4905
- x: (J - o) * f,
4906
- y: (x - i) * f,
4907
- w: Math.max(1, o + c) * f,
4905
+ x: (q - s) * f,
4906
+ y: (b - i) * f,
4907
+ w: Math.max(1, s + c) * f,
4908
4908
  h: Math.max(1, i + a) * f
4909
- }, A, s * f, l, e, n), t.font = u.font, t.fillStyle = u.color;
4909
+ }, A, o * f, u, t, n), e.font = l.font, e.fillStyle = l.color;
4910
4910
  }
4911
4911
  }
4912
- if (C) {
4913
- let e = C.dir * Math.PI / 180, n = X(C.dist, s);
4914
- t.save(), t.shadowColor = Q(C.color, C.alpha), t.shadowBlur = X(C.blur, s), t.shadowOffsetX = Math.cos(e) * n, t.shadowOffsetY = Math.sin(e) * n;
4912
+ if (S) {
4913
+ let t = S.dir * Math.PI / 180, n = X(S.dist, o);
4914
+ e.save(), e.shadowColor = Q(S.color, S.alpha), e.shadowBlur = X(S.blur, o), e.shadowOffsetX = Math.cos(t) * n, e.shadowOffsetY = Math.sin(t) * n;
4915
4915
  }
4916
- k(t, "fill"), C && t.restore();
4917
- let j = u.outline;
4918
- j && j.width > 0 && (t.save(), t.lineWidth = Math.max(.5, X(j.width, s)), t.strokeStyle = j.color ? `#${j.color}` : u.color, t.lineJoin = "round", k(t, "stroke"), t.restore()), t.font = u.font;
4919
- let M = $(t, u.text, S) + y;
4920
- if (h && u.text && h({
4921
- text: u.text,
4922
- inShapeX: J - r,
4923
- inShapeY: H - i,
4924
- w: M + p,
4925
- h: f,
4926
- fontSize: b,
4927
- font: u.font,
4928
- shapeX: r,
4929
- shapeY: i,
4930
- shapeW: a,
4931
- shapeH: o,
4932
- rotation: l,
4933
- hyperlink: u.hyperlink
4934
- }), u.underline && Zt(t, J, x, M + p, b, u.underlineColor ?? u.color, u.underlineStyle, m.dpr), u.strikethrough) {
4935
- let n = Math.max(1, b * .05);
4936
- t.strokeStyle = u.color, t.lineWidth = n, t.setLineDash([]);
4937
- let r = x - b * .32;
4938
- if (u.strikeDouble) {
4939
- let i = n * .9, a = r - i, o = r + i;
4940
- t.beginPath(), t.moveTo(J, a + e(a, n, m.dpr)), t.lineTo(J + M + p, a + e(a, n, m.dpr)), t.moveTo(J, o + e(o, n, m.dpr)), t.lineTo(J + M + p, o + e(o, n, m.dpr)), t.stroke();
4916
+ k(e, "fill"), S && e.restore();
4917
+ let j = l.outline;
4918
+ j && j.width > 0 && (e.save(), e.lineWidth = Math.max(.5, X(j.width, o)), e.strokeStyle = j.color ? `#${j.color}` : l.color, e.lineJoin = "round", k(e, "stroke"), e.restore()), e.font = l.font;
4919
+ let N = $(e, l.text, x) + v;
4920
+ if (m && l.text && m({
4921
+ text: l.text,
4922
+ inShapeX: q - n,
4923
+ inShapeY: ee - r,
4924
+ w: N + f,
4925
+ h: d,
4926
+ fontSize: y,
4927
+ font: l.font,
4928
+ shapeX: n,
4929
+ shapeY: r,
4930
+ shapeW: i,
4931
+ shapeH: a,
4932
+ rotation: c,
4933
+ hyperlink: l.hyperlink
4934
+ }), l.underline && Zt(e, q, b, N + f, y, l.underlineColor ?? l.color, l.underlineStyle, p.dpr), l.strikethrough) {
4935
+ let t = Math.max(1, y * .05);
4936
+ e.strokeStyle = l.color, e.lineWidth = t, e.setLineDash([]);
4937
+ let n = b - y * .32;
4938
+ if (l.strikeDouble) {
4939
+ let r = t * .9, i = n - r, a = n + r;
4940
+ e.beginPath(), e.moveTo(q, i + T(i, t, p.dpr)), e.lineTo(q + N + f, i + T(i, t, p.dpr)), e.moveTo(q, a + T(a, t, p.dpr)), e.lineTo(q + N + f, a + T(a, t, p.dpr)), e.stroke();
4941
4941
  } else {
4942
- let i = r + e(r, n, m.dpr);
4943
- t.beginPath(), t.moveTo(J, i), t.lineTo(J + M + p, i), t.stroke();
4942
+ let r = n + T(n, t, p.dpr);
4943
+ e.beginPath(), e.moveTo(q, r), e.lineTo(q + N + f, r), e.stroke();
4944
4944
  }
4945
4945
  }
4946
- J += M, J += p;
4946
+ q += N, q += f;
4947
4947
  }
4948
- N && (t.direction = "ltr"), H += d;
4948
+ M && (e.direction = "ltr"), ee += u;
4949
4949
  }
4950
- t.restore();
4950
+ e.restore();
4951
4951
  }
4952
4952
  function Hr(e, t, n, r, i) {
4953
4953
  if (!e) return [];
@@ -5047,7 +5047,7 @@ function qr(e) {
5047
5047
  }
5048
5048
  function Jr(e, t, n = qr(t), r, i, a) {
5049
5049
  let o = qr(t);
5050
- return q(e.posterPath, e.posterMimeType || "application/octet-stream", o, {
5050
+ return P(e.posterPath, e.posterMimeType || "application/octet-stream", o, {
5051
5051
  tiff: r,
5052
5052
  svgDecoder: a,
5053
5053
  ...i ?? {}
@@ -5060,7 +5060,7 @@ function Yr(e, t, n) {
5060
5060
  let r = X(t.x, n), i = X(t.y, n), a = X(t.width, n), o = X(t.height, n);
5061
5061
  e.save();
5062
5062
  try {
5063
- t.alpha != null && (e.globalAlpha *= t.alpha), (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(r + a / 2, i + o / 2), e.rotate(t.rotation * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-(r + a / 2), -(i + o / 2))), le(e, "tiff", {
5063
+ t.alpha != null && (e.globalAlpha *= t.alpha), (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(r + a / 2, i + o / 2), e.rotate(t.rotation * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-(r + a / 2), -(i + o / 2))), b(e, "tiff", {
5064
5064
  x: r,
5065
5065
  y: i,
5066
5066
  width: a,
@@ -5070,117 +5070,117 @@ function Yr(e, t, n) {
5070
5070
  e.restore();
5071
5071
  }
5072
5072
  }
5073
- async function Xr(e, t, n, r, i, o, s = 1, c, l) {
5074
- if (i) try {
5075
- let a = t.mimeType === "image/svg+xml", u = Ne(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
5076
- if (!u) return;
5077
- let { widthPt: d, heightPt: f } = u, p = En(X(t.width, n), X(t.height, n), s, t.srcRect), h = A(t) || a, g = h ? p : l && !t.duotone ? Dn(l, Z(On(t), h ? void 0 : t.duotone)) : void 0, _ = g && "maxRetainedPixels" in g ? g.maxRetainedPixels : void 0, y = {
5078
- ...g ? {
5079
- targetWidthPx: g.targetWidthPx,
5080
- targetHeightPx: g.targetHeightPx,
5081
- ..._ === void 0 ? {} : { maxRetainedPixels: _ }
5073
+ async function Xr(e, t, r, i, a, s, c = 1, l, u) {
5074
+ if (a) try {
5075
+ let d = t.mimeType === "image/svg+xml", f = Ne(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
5076
+ if (!f) return;
5077
+ let { widthPt: p, heightPt: m } = f, h = En(X(t.width, r), X(t.height, r), c, t.srcRect), g = J(t) || d, _ = g ? h : u && !t.duotone ? Dn(u, Z(On(t), g ? void 0 : t.duotone)) : void 0, v = _ && "maxRetainedPixels" in _ ? _.maxRetainedPixels : void 0, y = {
5078
+ ..._ ? {
5079
+ targetWidthPx: _.targetWidthPx,
5080
+ targetHeightPx: _.targetHeightPx,
5081
+ ...v === void 0 ? {} : { maxRetainedPixels: v }
5082
5082
  } : {},
5083
- workerDecoder: c
5083
+ workerDecoder: l
5084
5084
  }, b;
5085
- if (A(t)) try {
5086
- b = await I(t.svgImagePath, i, y);
5085
+ if (J(t)) try {
5086
+ b = await H(t.svgImagePath, a, y);
5087
5087
  } catch {
5088
- b = a ? await I(t.imagePath, i, y) : await Je(t.imagePath, t.mimeType, t.duotone, i, {
5089
- widthPt: d,
5090
- heightPt: f,
5091
- ...g ?? {},
5092
- tiff: o
5088
+ b = d ? await H(t.imagePath, a, y) : await Je(t.imagePath, t.mimeType, t.duotone, a, {
5089
+ widthPt: p,
5090
+ heightPt: m,
5091
+ ..._ ?? {},
5092
+ tiff: s
5093
5093
  });
5094
5094
  }
5095
- else b = a ? await I(t.imagePath, i, y) : await Je(t.imagePath, t.mimeType, t.duotone, i, {
5096
- widthPt: d,
5097
- heightPt: f,
5098
- ...g ?? {},
5099
- tiff: o
5095
+ else b = d ? await H(t.imagePath, a, y) : await Je(t.imagePath, t.mimeType, t.duotone, a, {
5096
+ widthPt: p,
5097
+ heightPt: m,
5098
+ ..._ ?? {},
5099
+ tiff: s
5100
5100
  });
5101
- if (!b || r()) return;
5101
+ if (!b || i()) return;
5102
5102
  e.save(), t.alpha != null && (e.globalAlpha *= t.alpha);
5103
- let x = X(t.x, n), S = X(t.y, n), C = X(t.width, n), w = X(t.height, n);
5103
+ let x = X(t.x, r), S = X(t.y, r), C = X(t.width, r), w = X(t.height, r);
5104
5104
  (t.rotation !== 0 || t.flipH || t.flipV) && (e.translate(x + C / 2, S + w / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(x + C / 2), -(S + w / 2)));
5105
5105
  let T = (e, n, r, i, a) => {
5106
- t.custGeom && t.custGeom.length > 0 ? Ir(e, t.custGeom, n, r, i, a) : t.prstGeom && v(e, t.prstGeom, n, r, i, a, t.prstAdjust ?? []) || e.rect(n, r, i, a);
5106
+ t.custGeom && t.custGeom.length > 0 ? Ir(e, t.custGeom, n, r, i, a) : t.prstGeom && o(e, t.prstGeom, n, r, i, a, t.prstAdjust ?? []) || e.rect(n, r, i, a);
5107
5107
  }, E = (e, t, n, r, i) => {
5108
5108
  e.beginPath(), T(e, t, n, r, i);
5109
5109
  }, D = (e, n, r, i, a) => {
5110
5110
  (t.prstGeom || t.custGeom && t.custGeom.length > 0) && (E(e, n, r, i, a), e.clip());
5111
- }, O = (e, r, i, a, o) => {
5112
- t.stroke && (e.save(), $r(e, t.stroke, n, {
5113
- x: r,
5111
+ }, O = (e, n, i, a, o) => {
5112
+ t.stroke && (e.save(), $r(e, t.stroke, r, {
5113
+ x: n,
5114
5114
  y: i,
5115
5115
  w: a,
5116
5116
  h: o
5117
- }, t.rotation), E(e, r, i, a, o), e.stroke(), e.restore());
5118
- }, k = (e, r, i, a, o) => {
5117
+ }, t.rotation), E(e, n, i, a, o), e.stroke(), e.restore());
5118
+ }, k = (e, n, i, a, o) => {
5119
5119
  let s = t.sp3d;
5120
5120
  if (s && (s.contourW ?? 0) > 0 && s.contourClr) {
5121
- let t = Math.max(.5, s.contourW * n);
5121
+ let t = Math.max(.5, s.contourW * r);
5122
5122
  e.save(), e.beginPath();
5123
5123
  let c = t * 2 + Math.max(a, o);
5124
- e.rect(r - c, i - c, a + 2 * c, o + 2 * c), T(e, r, i, a, o), e.clip("evenodd"), e.beginPath(), E(e, r, i, a, o), e.strokeStyle = Q(s.contourClr), e.lineWidth = t * 2, e.setLineDash([]), e.stroke(), e.restore();
5124
+ e.rect(n - c, i - c, a + 2 * c, o + 2 * c), T(e, n, i, a, o), e.clip("evenodd"), e.beginPath(), E(e, n, i, a, o), e.strokeStyle = Q(s.contourClr), e.lineWidth = t * 2, e.setLineDash([]), e.stroke(), e.restore();
5125
5125
  }
5126
- }, j = t.scene3d && Ct(t.scene3d.camera) ? t.scene3d : null, M = (e, n, r, i, a) => {
5126
+ }, A = t.scene3d && Ct(t.scene3d.camera) ? t.scene3d : null, j = (e, n, r, i, a) => {
5127
5127
  e.save(), D(e, n, r, i, a), je(e, b, t.srcRect, n, r, i, a), e.restore();
5128
+ }, M = (e, t, n, r, i) => {
5129
+ j(e, t, n, r, i), O(e, t, n, r, i), k(e, t, n, r, i);
5128
5130
  }, N = (e, t, n, r, i) => {
5129
- M(e, t, n, r, i), O(e, t, n, r, i), k(e, t, n, r, i);
5130
- }, P = (e, t, n, r, i) => {
5131
- M(e, t, n, r, i), O(e, t, n, r, i);
5132
- }, F = e.getTransform(), L = Math.abs(F.a * F.d - F.b * F.c), R = L > 0 ? Math.sqrt(L) : 1, z = Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d ? t.sp3d.prstMaterial : void 0, n, R), B = j ? Ur(t.sp3d, j.camera, C, w, n, R) : null, V = t.stroke ? t.stroke.width * n / 2 : 0, H = t.sp3d?.contourW ? t.sp3d.contourW * n : 0, U = B ? Math.hypot(B.offsetX, B.offsetY) / R : 0, ee = V + H + U + 2, G = (e) => {
5133
- if (j) {
5134
- if (Wr(e, j.camera, x, S, C, w, P, {
5135
- bevels: z,
5136
- extrusion: B ?? void 0,
5131
+ j(e, t, n, r, i), O(e, t, n, r, i);
5132
+ }, P = e.getTransform(), F = Math.abs(P.a * P.d - P.b * P.c), I = F > 0 ? Math.sqrt(F) : 1, L = Hr(t.sp3d, t.scene3d?.lightRig, t.sp3d ? t.sp3d.prstMaterial : void 0, r, I), R = A ? Ur(t.sp3d, A.camera, C, w, r, I) : null, z = t.stroke ? t.stroke.width * r / 2 : 0, V = t.sp3d?.contourW ? t.sp3d.contourW * r : 0, ee = R ? Math.hypot(R.offsetX, R.offsetY) / I : 0, U = z + V + ee + 2, W = (e) => {
5133
+ if (A) {
5134
+ if (Wr(e, A.camera, x, S, C, w, N, {
5135
+ bevels: L,
5136
+ extrusion: R ?? void 0,
5137
5137
  paintEdges: k,
5138
- edgePadCss: ee
5138
+ edgePadCss: U
5139
5139
  })) return;
5140
- } else if (z.length > 0 && Gr(e, x, S, C, w, z, P, k, ee)) return;
5141
- N(e, x, S, C, w);
5142
- }, K = (e, t, n, r, i, a) => {
5140
+ } else if (L.length > 0 && Gr(e, x, S, C, w, L, N, k, U)) return;
5141
+ M(e, x, S, C, w);
5142
+ }, te = (e, t, n, r, i, a) => {
5143
5143
  e.save(), D(e, n, r, i, a), e.fillStyle = t, e.fillRect(n, r, i, a), e.restore();
5144
- }, q = (e, t) => {
5145
- j && Wr(e, j.camera, x, S, C, w, (e, n, r, i, a) => K(e, t, n, r, i, a)) || K(e, t, x, S, C, w);
5146
- }, J = e.getTransform(), te = Math.abs(J.a * J.d - J.b * J.c), ne = te > 0 ? Math.sqrt(te) : 1, re = V + H, ie = (t.custGeom && t.custGeom.length > 0 ? he(t.custGeom, x, S, C, w) : t.prstGeom && m(t.prstGeom.toLowerCase()) ? W(t.prstGeom.toLowerCase(), x, S, C, w, t.prstAdjust ?? []) : null) ?? {
5144
+ }, G = (e, t) => {
5145
+ A && Wr(e, A.camera, x, S, C, w, (e, n, r, i, a) => te(e, t, n, r, i, a)) || te(e, t, x, S, C, w);
5146
+ }, K = e.getTransform(), q = Math.abs(K.a * K.d - K.b * K.c), ne = q > 0 ? Math.sqrt(q) : 1, re = z + V, ie = (t.custGeom && t.custGeom.length > 0 ? he(t.custGeom, x, S, C, w) : t.prstGeom && n(t.prstGeom.toLowerCase()) ? B(t.prstGeom.toLowerCase(), x, S, C, w, t.prstAdjust ?? []) : null) ?? {
5147
5147
  x,
5148
5148
  y: S,
5149
5149
  w: C,
5150
5150
  h: w
5151
- }, ae = j ? Mr(j.camera, J, x, S, C, w, ee, t.shadow?.algn) : {
5152
- bbox: Or(J, ie.x - re, ie.y - re, ie.w + re * 2, ie.h + re * 2),
5153
- anchor: jr(J, x, S, C, w, t.shadow?.algn)
5154
- }, oe = n * ne, se = !!(t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection), ce = (e) => q(e, "#000");
5155
- Pr(e, t, j && se ? Nr(G, J, ae.bbox, {
5151
+ }, ae = A ? Mr(A.camera, K, x, S, C, w, U, t.shadow?.algn) : {
5152
+ bbox: Or(K, ie.x - re, ie.y - re, ie.w + re * 2, ie.h + re * 2),
5153
+ anchor: jr(K, x, S, C, w, t.shadow?.algn)
5154
+ }, oe = r * ne, se = !!(t.shadow || t.innerShadow || t.glow || t.softEdge || t.reflection), ce = (e) => G(e, "#000");
5155
+ Pr(e, t, A && se ? Nr(W, K, ae.bbox, {
5156
5156
  w: e.canvas.width || 0,
5157
5157
  h: e.canvas.height || 0
5158
- }) : G, j && se ? Nr(ce, J, ae.bbox, {
5158
+ }) : W, A && se ? Nr(ce, K, ae.bbox, {
5159
5159
  w: e.canvas.width || 0,
5160
5160
  h: e.canvas.height || 0
5161
- }) : ce, ae.bbox, ae.anchor, n, oe, J), e.restore();
5162
- } catch (i) {
5163
- if (a(i, "tiff")) {
5164
- r() || Yr(e, t, n);
5161
+ }) : ce, ae.bbox, ae.anchor, r, oe, K), e.restore();
5162
+ } catch (n) {
5163
+ if (ue(n, "tiff")) {
5164
+ i() || Yr(e, t, r);
5165
5165
  return;
5166
5166
  }
5167
- if (Le(i) || qe(i)) throw i;
5167
+ if (Le(n) || qe(n)) throw n;
5168
5168
  }
5169
5169
  }
5170
- async function Zr(e, t, n, r, i, o, s, c, l = 1, u, d) {
5171
- let f = X(t.x, n), p = X(t.y, n), m = X(t.width, n), h = X(t.height, n), g, _ = !1;
5170
+ async function Zr(e, t, n, r, i, a, o, s, c = 1, l, u) {
5171
+ let d = X(t.x, n), f = X(t.y, n), p = X(t.width, n), m = X(t.height, n), h, g = !1;
5172
5172
  if (t.posterPath && i) try {
5173
- g = await Jr(t, i, s, c, t.posterMimeType === "image/svg+xml" ? En(m, h, l) : d ? Dn(d, Z(t.posterPath)) : void 0, u);
5173
+ h = await Jr(t, i, o, s, t.posterMimeType === "image/svg+xml" ? En(p, m, c) : u ? Dn(u, Z(t.posterPath)) : void 0, l);
5174
5174
  } catch (e) {
5175
- if (a(e, "tiff")) _ = !0;
5175
+ if (ue(e, "tiff")) g = !0;
5176
5176
  else if (Le(e) || qe(e)) throw e;
5177
5177
  }
5178
- r() || (e.save(), ei(e, t, n), g ? e.drawImage(g, f, p, m, h) : (e.fillStyle = t.mediaKind === "video" ? "#111" : "#f0f0f0", e.fillRect(f, p, m, h), _ && le(e, "tiff", {
5179
- x: f,
5180
- y: p,
5181
- width: m,
5182
- height: h
5183
- })), o || an(e, f + m / 2, p + h / 2, m, h, "paused"), e.restore());
5178
+ r() || (e.save(), ei(e, t, n), h ? e.drawImage(h, d, f, p, m) : (e.fillStyle = t.mediaKind === "video" ? "#111" : "#f0f0f0", e.fillRect(d, f, p, m), g && b(e, "tiff", {
5179
+ x: d,
5180
+ y: f,
5181
+ width: p,
5182
+ height: m
5183
+ })), a || an(e, d + p / 2, f + m / 2, p, m, "paused"), e.restore());
5184
5184
  }
5185
5185
  function Qr(e, t, n, r, i, a, o) {
5186
5186
  let s = Math.max(.5, X(r.width, a)), c = n.x - t.x, l = n.y - t.y, u = Math.hypot(c, l);
@@ -5250,172 +5250,172 @@ function ei(e, t, n) {
5250
5250
  let r = X(t.x, n), i = X(t.y, n), a = X(t.width, n), o = X(t.height, n);
5251
5251
  e.translate(r + a / 2, i + o / 2), e.rotate(t.rotation * Math.PI / 180), t.flipH && e.scale(-1, 1), t.flipV && e.scale(1, -1), e.translate(-(r + a / 2), -(i + o / 2));
5252
5252
  }
5253
- function ti(t, n, r, i, a = {
5253
+ function ti(e, t, n, r, i = {
5254
5254
  themeMajorFont: null,
5255
5255
  themeMinorFont: null,
5256
5256
  dpr: 1
5257
- }, o) {
5258
- t.save(), ei(t, n, r);
5259
- let s = X(n.x, r), c = X(n.y, r), l = n.cols.map((e) => X(e, r)), u = l.length, d = (e, t) => {
5257
+ }, a) {
5258
+ e.save(), ei(e, t, n);
5259
+ let o = X(t.x, n), s = X(t.y, n), c = t.cols.map((e) => X(e, n)), l = c.length, u = (e, t) => {
5260
5260
  let n = 0;
5261
- for (let r = 0; r < t; r++) n += l[e + r] ?? 0;
5261
+ for (let r = 0; r < t; r++) n += c[e + r] ?? 0;
5262
5262
  return n;
5263
- }, f = n.rows.map((e) => X(e.height, r));
5264
- for (let e = 0; e < n.rows.length; e++) {
5265
- let o = n.rows[e];
5266
- for (let n = 0; n < o.cells.length; n++) {
5267
- let s = o.cells[n];
5263
+ }, d = t.rows.map((e) => X(e.height, n));
5264
+ for (let a = 0; a < t.rows.length; a++) {
5265
+ let o = t.rows[a];
5266
+ for (let t = 0; t < o.cells.length; t++) {
5267
+ let s = o.cells[t];
5268
5268
  if (s.hMerge || s.vMerge || (s.rowSpan || 1) > 1 || !s.textBody) continue;
5269
- let c = d(n, s.gridSpan || 1), l = Vr(t, s.textBody, 0, 0, c, 0, r, null, 0, !1, !1, "#000000", i, a, void 0, !0, void 0, !1, o.height === 0) || 0;
5270
- l > f[e] && (f[e] = l);
5269
+ let c = u(t, s.gridSpan || 1), l = Vr(e, s.textBody, 0, 0, c, 0, n, null, 0, !1, !1, "#000000", r, i, void 0, !0, void 0, !1, o.height === 0) || 0;
5270
+ l > d[a] && (d[a] = l);
5271
5271
  }
5272
5272
  }
5273
- for (let e = 0; e < n.rows.length; e++) {
5274
- let o = n.rows[e];
5273
+ for (let a = 0; a < t.rows.length; a++) {
5274
+ let o = t.rows[a];
5275
5275
  for (let s = 0; s < o.cells.length; s++) {
5276
5276
  let c = o.cells[s];
5277
5277
  if (c.hMerge || c.vMerge) continue;
5278
5278
  let l = c.rowSpan || 1;
5279
5279
  if (l <= 1 || !c.textBody) continue;
5280
- let u = d(s, c.gridSpan || 1), p = n.rows.slice(e, Math.min(n.rows.length, e + l)).some((e) => e.height === 0), m = Vr(t, c.textBody, 0, 0, u, 0, r, null, 0, !1, !1, "#000000", i, a, void 0, !0, void 0, !1, p) || 0, h = 0;
5281
- for (let t = 0; t < l && e + t < f.length; t++) h += f[e + t];
5280
+ let f = u(s, c.gridSpan || 1), p = t.rows.slice(a, Math.min(t.rows.length, a + l)).some((e) => e.height === 0), m = Vr(e, c.textBody, 0, 0, f, 0, n, null, 0, !1, !1, "#000000", r, i, void 0, !0, void 0, !1, p) || 0, h = 0;
5281
+ for (let e = 0; e < l && a + e < d.length; e++) h += d[a + e];
5282
5282
  if (m > h) {
5283
- let t = (m - h) / l;
5284
- for (let n = 0; n < l && e + n < f.length; n++) f[e + n] += t;
5283
+ let e = (m - h) / l;
5284
+ for (let t = 0; t < l && a + t < d.length; t++) d[a + t] += e;
5285
5285
  }
5286
5286
  }
5287
5287
  }
5288
- let p = l.reduce((e, t) => e + t, 0), m = Array(u);
5289
- if (n.rtl) {
5290
- let e = s + p;
5291
- for (let t = 0; t < u; t++) e -= l[t], m[t] = e;
5288
+ let f = c.reduce((e, t) => e + t, 0), p = Array(l);
5289
+ if (t.rtl) {
5290
+ let e = o + f;
5291
+ for (let t = 0; t < l; t++) e -= c[t], p[t] = e;
5292
5292
  } else {
5293
- let e = s;
5294
- for (let t = 0; t < u; t++) m[t] = e, e += l[t];
5293
+ let e = o;
5294
+ for (let t = 0; t < l; t++) p[t] = e, e += c[t];
5295
5295
  }
5296
- let h = (e, t) => n.rtl ? m[e + t - 1] : m[e], g = Array(n.rows.length);
5296
+ let m = (e, n) => t.rtl ? p[e + n - 1] : p[e], h = Array(t.rows.length);
5297
5297
  {
5298
- let e = c;
5299
- for (let t = 0; t < n.rows.length; t++) g[t] = e, e += f[t];
5298
+ let e = s;
5299
+ for (let n = 0; n < t.rows.length; n++) h[n] = e, e += d[n];
5300
5300
  }
5301
- let _, v = {
5301
+ let g, _ = {
5302
5302
  row: 0,
5303
5303
  column: 0
5304
5304
  };
5305
- if (o) {
5306
- let e = X(n.width, r), t = X(n.height, r), i = s + e / 2, a = c + t / 2, l = n.rotation * Math.PI / 180, u = Math.cos(l), d = Math.sin(l);
5307
- _ = (e) => {
5308
- let t = e.shapeX + e.shapeW / 2 - i, r = e.shapeY + e.shapeH / 2 - a;
5309
- n.flipH && (t = -t), n.flipV && (r = -r);
5310
- let s = i + u * t - d * r, c = a + d * t + u * r;
5311
- o({
5305
+ if (a) {
5306
+ let e = X(t.width, n), r = X(t.height, n), i = o + e / 2, c = s + r / 2, l = t.rotation * Math.PI / 180, u = Math.cos(l), d = Math.sin(l);
5307
+ g = (e) => {
5308
+ let n = e.shapeX + e.shapeW / 2 - i, r = e.shapeY + e.shapeH / 2 - c;
5309
+ t.flipH && (n = -n), t.flipV && (r = -r);
5310
+ let o = i + u * n - d * r, s = c + d * n + u * r;
5311
+ a({
5312
5312
  ...e,
5313
- ...n.id === void 0 ? {} : { shapeId: n.id },
5314
- shapeX: s - e.shapeW / 2,
5315
- shapeY: c - e.shapeH / 2,
5316
- rotation: n.rotation,
5317
- ...n.flipH ? { shapeFlipH: !0 } : {},
5318
- ...n.flipV ? { shapeFlipV: !0 } : {},
5319
- tableCell: v
5313
+ ...t.id === void 0 ? {} : { shapeId: t.id },
5314
+ shapeX: o - e.shapeW / 2,
5315
+ shapeY: s - e.shapeH / 2,
5316
+ rotation: t.rotation,
5317
+ ...t.flipH ? { shapeFlipH: !0 } : {},
5318
+ ...t.flipV ? { shapeFlipV: !0 } : {},
5319
+ tableCell: _
5320
5320
  });
5321
5321
  };
5322
5322
  }
5323
- let y = [], b = n.rows.map(() => Array(u).fill(-1));
5324
- for (let e = 0; e < n.rows.length; e++) {
5325
- let t = n.rows[e], r = g[e];
5326
- for (let i = 0; i < t.cells.length; i++) {
5327
- let a = t.cells[i];
5323
+ let v = [], y = t.rows.map(() => Array(l).fill(-1));
5324
+ for (let e = 0; e < t.rows.length; e++) {
5325
+ let n = t.rows[e], r = h[e];
5326
+ for (let i = 0; i < n.cells.length; i++) {
5327
+ let a = n.cells[i];
5328
5328
  if (a.hMerge || a.vMerge) continue;
5329
- let o = a.gridSpan || 1, s = a.rowSpan || 1, c = d(i, o), l = 0;
5330
- for (let t = 0; t < s; t++) l += f[e + t] ?? 0;
5331
- let p = h(i, o), m = Math.min(e + s - 1, n.rows.length - 1), g = y.length;
5332
- y.push({
5329
+ let o = a.gridSpan || 1, s = a.rowSpan || 1, c = u(i, o), f = 0;
5330
+ for (let t = 0; t < s; t++) f += d[e + t] ?? 0;
5331
+ let p = m(i, o), h = Math.min(e + s - 1, t.rows.length - 1), g = v.length;
5332
+ v.push({
5333
5333
  cell: a,
5334
5334
  colX: p,
5335
5335
  rowY: r,
5336
5336
  cellW: c,
5337
- cellH: l,
5337
+ cellH: f,
5338
5338
  ci: i,
5339
5339
  ri: e,
5340
5340
  span: o,
5341
- lastRi: m
5341
+ lastRi: h
5342
5342
  });
5343
- for (let t = e; t <= m; t++) for (let e = i; e < i + o && e < u; e++) b[t][e] = g;
5343
+ for (let t = e; t <= h; t++) for (let e = i; e < i + o && e < l; e++) y[t][e] = g;
5344
5344
  }
5345
5345
  }
5346
- for (let { cell: e, colX: o, rowY: s, cellW: c, cellH: l, ci: u, ri: d } of y) {
5347
- let f = Nn(e.fill, t, o, s, c, l, n.rotation);
5348
- if (f && (t.fillStyle = f, t.fillRect(o, s, c, l)), e.textBody) {
5349
- _ && (v = {
5346
+ for (let { cell: a, colX: o, rowY: s, cellW: c, cellH: l, ci: u, ri: d } of v) {
5347
+ let f = Nn(a.fill, e, o, s, c, l, t.rotation);
5348
+ if (f && (e.fillStyle = f, e.fillRect(o, s, c, l)), a.textBody) {
5349
+ g && (_ = {
5350
5350
  row: d,
5351
5351
  column: u
5352
5352
  });
5353
- let n = e.textColor ? Q(e.textColor) : null;
5354
- Vr(t, e.textBody, o, s, c, l, r, n, 0, !1, !1, "#000000", i, a, _);
5353
+ let t = a.textColor ? Q(a.textColor) : null;
5354
+ Vr(e, a.textBody, o, s, c, l, n, t, 0, !1, !1, "#000000", r, i, g);
5355
5355
  }
5356
5356
  }
5357
- let x = a.dpr, S = (e, t) => {
5358
- if (e < 0 || e >= b.length || t < 0 || t >= u) return null;
5359
- let n = b[e][t];
5360
- return n < 0 ? null : y[n];
5361
- }, C = (i, a, o, s, c) => {
5362
- if ($r(t, i, r, {
5363
- x: Math.min(a, s),
5364
- y: Math.min(o, c),
5365
- w: Math.max(1, Math.abs(s - a)),
5366
- h: Math.max(1, Math.abs(c - o))
5367
- }, n.rotation), i.cmpd === "dbl" && !i.dashStyle && !i.customDash?.length && (a === s || o === c)) {
5368
- t.fillStyle = t.strokeStyle, xe(t, a, o, s, c, Math.max(.5, X(i.width, r)), x);
5357
+ let b = i.dpr, x = (e, t) => {
5358
+ if (e < 0 || e >= y.length || t < 0 || t >= l) return null;
5359
+ let n = y[e][t];
5360
+ return n < 0 ? null : v[n];
5361
+ }, S = (r, i, a, o, s) => {
5362
+ if ($r(e, r, n, {
5363
+ x: Math.min(i, o),
5364
+ y: Math.min(a, s),
5365
+ w: Math.max(1, Math.abs(o - i)),
5366
+ h: Math.max(1, Math.abs(s - a))
5367
+ }, t.rotation), r.cmpd === "dbl" && !r.dashStyle && !r.customDash?.length && (i === o || a === s)) {
5368
+ e.fillStyle = e.strokeStyle, xe(e, i, a, o, s, Math.max(.5, X(r.width, n)), b);
5369
5369
  return;
5370
5370
  }
5371
- let l = a === s ? e(a, t.lineWidth, x) : 0, u = o === c ? e(o, t.lineWidth, x) : 0;
5372
- t.beginPath(), t.moveTo(a + l, o + u), t.lineTo(s + l, c + u), t.stroke();
5371
+ let c = i === o ? T(i, e.lineWidth, b) : 0, l = a === s ? T(a, e.lineWidth, b) : 0;
5372
+ e.beginPath(), e.moveTo(i + c, a + l), e.lineTo(o + c, s + l), e.stroke();
5373
5373
  };
5374
- for (let e of y) {
5375
- let { cell: i, colX: a, rowY: o, cellW: s, cellH: c } = e;
5376
- t.save();
5377
- let l = n.rtl ? i.borderR : i.borderL, p = n.rtl ? i.borderL : i.borderR, m = n.rtl ? e.ci + e.span === u : e.ci === 0, _ = n.rtl ? e.ci === 0 : e.ci + e.span === u, v = n.rtl ? e.ci - 1 : e.ci + e.span, y = (e) => n.rtl ? e.borderR : e.borderL;
5378
- if (e.ri === 0 && i.borderT && C(i.borderT, a, o, a + s, o), m && l && C(l, a, o, a, o + c), e.lastRi === n.rows.length - 1) {
5374
+ for (let r of v) {
5375
+ let { cell: i, colX: a, rowY: o, cellW: s, cellH: c } = r;
5376
+ e.save();
5377
+ let f = t.rtl ? i.borderR : i.borderL, p = t.rtl ? i.borderL : i.borderR, g = t.rtl ? r.ci + r.span === l : r.ci === 0, _ = t.rtl ? r.ci === 0 : r.ci + r.span === l, v = t.rtl ? r.ci - 1 : r.ci + r.span, b = (e) => t.rtl ? e.borderR : e.borderL;
5378
+ if (r.ri === 0 && i.borderT && S(i.borderT, a, o, a + s, o), g && f && S(f, a, o, a, o + c), r.lastRi === t.rows.length - 1) {
5379
5379
  let e = i.borderB;
5380
- e && C(e, a, o + c, a + s, o + c);
5380
+ e && S(e, a, o + c, a + s, o + c);
5381
5381
  } else {
5382
- let t = e.lastRi + 1, n = o + c, r = Math.min(e.ci + e.span, u), a = e.ci;
5383
- for (; a < r;) {
5384
- let e = b[t][a], o = a + 1;
5385
- for (; o < r && b[t][o] === e;) o++;
5386
- let s = S(t, a), c = hn(i.borderB, s ? s.cell.borderT : null);
5382
+ let e = r.lastRi + 1, t = o + c, n = Math.min(r.ci + r.span, l), a = r.ci;
5383
+ for (; a < n;) {
5384
+ let r = y[e][a], o = a + 1;
5385
+ for (; o < n && y[e][o] === r;) o++;
5386
+ let s = x(e, a), c = hn(i.borderB, s ? s.cell.borderT : null);
5387
5387
  if (c) {
5388
- let e = h(a, o - a);
5389
- C(c, e, n, e + d(a, o - a), n);
5388
+ let e = m(a, o - a);
5389
+ S(c, e, t, e + u(a, o - a), t);
5390
5390
  }
5391
5391
  a = o;
5392
5392
  }
5393
5393
  }
5394
5394
  if (_) {
5395
5395
  let e = p;
5396
- e && C(e, a + s, o, a + s, o + c);
5396
+ e && S(e, a + s, o, a + s, o + c);
5397
5397
  } else {
5398
- let t = a + s, n = e.ri;
5399
- for (; n <= e.lastRi;) {
5400
- let r = b[n][v], i = n;
5401
- for (; i + 1 <= e.lastRi && b[i + 1][v] === r;) i++;
5402
- let a = S(n, v), o = hn(p, a ? y(a.cell) : null);
5403
- o && C(o, t, g[n], t, g[i] + f[i]), n = i + 1;
5398
+ let e = a + s, t = r.ri;
5399
+ for (; t <= r.lastRi;) {
5400
+ let n = y[t][v], i = t;
5401
+ for (; i + 1 <= r.lastRi && y[i + 1][v] === n;) i++;
5402
+ let a = x(t, v), o = hn(p, a ? b(a.cell) : null);
5403
+ o && S(o, e, h[t], e, h[i] + d[i]), t = i + 1;
5404
5404
  }
5405
5405
  }
5406
- i.diagonalTL && ($r(t, i.diagonalTL, r, {
5406
+ i.diagonalTL && ($r(e, i.diagonalTL, n, {
5407
5407
  x: a,
5408
5408
  y: o,
5409
5409
  w: s,
5410
5410
  h: c
5411
- }, n.rotation), t.beginPath(), t.moveTo(a, o), t.lineTo(a + s, o + c), t.stroke()), i.diagonalTR && ($r(t, i.diagonalTR, r, {
5411
+ }, t.rotation), e.beginPath(), e.moveTo(a, o), e.lineTo(a + s, o + c), e.stroke()), i.diagonalTR && ($r(e, i.diagonalTR, n, {
5412
5412
  x: a,
5413
5413
  y: o,
5414
5414
  w: s,
5415
5415
  h: c
5416
- }, n.rotation), t.beginPath(), t.moveTo(a + s, o), t.lineTo(a, o + c), t.stroke()), t.restore();
5416
+ }, t.rotation), e.beginPath(), e.moveTo(a + s, o), e.lineTo(a, o + c), e.stroke()), e.restore();
5417
5417
  }
5418
- t.restore();
5418
+ e.restore();
5419
5419
  }
5420
5420
  function ni(e, t, n, r) {
5421
5421
  e.save(), e.globalAlpha = t.opacity, e.fillStyle = t.color, e.fillRect(0, 0, n, r), e.restore();
@@ -5451,56 +5451,56 @@ async function si(e, t, n, r, i = {}, a) {
5451
5451
  let o = i.fetchImage ?? (i.fetchMedia ? qr(i.fetchMedia) : void 0), s = (ri.get(e) ?? 0) + 1;
5452
5452
  ri.set(e, s);
5453
5453
  let c = () => ri.get(e) !== s, l = () => c() ? Promise.resolve(e) : ci(e, t, n, r, i, a, o, c);
5454
- return o && jn(t) ? j(o, i.imageResources, l) : l();
5455
- }
5456
- async function ci(e, t, n, r, i = {}, o, s, c = () => !1) {
5457
- let l = i.width ?? ((oe(e) ? e.offsetWidth : 0) || 960), u = l / n, d = Math.round(l), f = Math.round(r * u), p = i.dpr ?? L(), m = Ve(d * p, f * p), h = m.clamped ? p * m.scale : p, g = await An(t, d, f, u, h, i.imageResources, i.fetchImage, i.fetchMedia, s, i.tiff);
5458
- e.width = m.width, e.height = m.height, oe(e) && (e.style.width = `${d}px`, e.style.display || (e.style.display = "block"));
5459
- let _ = e.getContext("2d");
5460
- if (!_) throw Error("Could not get 2D context");
5461
- if (_.scale(h, h), t.parseError) return ai(_, d, f, t.slideNumber, t.parseError), e;
5462
- let v = i.defaultTextColor ? `#${i.defaultTextColor}` : "#000000", y = /* @__PURE__ */ new Map(), b = {
5463
- themeMajorFont: i.majorFont ?? null,
5464
- themeMinorFont: i.minorFont ?? null,
5465
- themeHlinkColor: i.hlinkColor ?? null,
5466
- embeddedFontAliases: i.embeddedFontAliases,
5467
- embeddedFontAuthoredFamilies: i.embeddedFontAuthoredFamilies,
5454
+ return o && jn(t) ? se(o, i.imageResources, l) : l();
5455
+ }
5456
+ async function ci(t, n, r, i, a = {}, o, s, c = () => !1) {
5457
+ let l = a.width ?? ((e(t) ? t.offsetWidth : 0) || 960), u = l / r, d = Math.round(l), f = Math.round(i * u), p = a.dpr ?? _(), m = Ve(d * p, f * p), h = m.clamped ? p * m.scale : p, g = await An(n, d, f, u, h, a.imageResources, a.fetchImage, a.fetchMedia, s, a.tiff);
5458
+ t.width = m.width, t.height = m.height, e(t) && (t.style.width = `${d}px`, t.style.display || (t.style.display = "block"));
5459
+ let v = t.getContext("2d");
5460
+ if (!v) throw Error("Could not get 2D context");
5461
+ if (v.scale(h, h), n.parseError) return ai(v, d, f, n.slideNumber, n.parseError), t;
5462
+ let y = a.defaultTextColor ? `#${a.defaultTextColor}` : "#000000", b = /* @__PURE__ */ new Map(), x = {
5463
+ themeMajorFont: a.majorFont ?? null,
5464
+ themeMinorFont: a.minorFont ?? null,
5465
+ themeHlinkColor: a.hlinkColor ?? null,
5466
+ embeddedFontAliases: a.embeddedFontAliases,
5467
+ embeddedFontAuthoredFamilies: a.embeddedFontAuthoredFamilies,
5468
5468
  dpr: h,
5469
- smartArtFallbackTextColor: yn(t.background, v),
5470
- pictureBulletImages: y
5469
+ smartArtFallbackTextColor: yn(n.background, y),
5470
+ pictureBulletImages: b
5471
5471
  };
5472
- if (await or(_, t.background, d, f, u, c, i.fetchImage, i.tiff, i.svgDecoder, g), c() || (i.math && await Ln(t, i.math), c())) return e;
5473
- let x = t.slideNumber;
5474
- for (let e of t.elements) if (e.type === "picture" && i.fetchImage) {
5475
- let t = e, n = t.mimeType === "image/svg+xml", r = A(t) || n, a = !r && !t.duotone ? Dn(g, Z(On(t), t.duotone)) : void 0, o = En(X(t.width, u), X(t.height, u), h, t.srcRect), s = r ? o : a, c = s && "maxRetainedPixels" in s ? s.maxRetainedPixels : void 0, l = {
5472
+ if (await or(v, n.background, d, f, u, c, a.fetchImage, a.tiff, a.svgDecoder, g), c() || (a.math && await Ln(n, a.math), c())) return t;
5473
+ let S = n.slideNumber;
5474
+ for (let e of n.elements) if (e.type === "picture" && a.fetchImage) {
5475
+ let t = e, n = t.mimeType === "image/svg+xml", r = J(t) || n, i = !r && !t.duotone ? Dn(g, Z(On(t), t.duotone)) : void 0, o = En(X(t.width, u), X(t.height, u), h, t.srcRect), s = r ? o : i, c = s && "maxRetainedPixels" in s ? s.maxRetainedPixels : void 0, l = {
5476
5476
  ...s ? {
5477
5477
  targetWidthPx: s.targetWidthPx,
5478
5478
  targetHeightPx: s.targetHeightPx,
5479
5479
  ...c === void 0 ? {} : { maxRetainedPixels: c }
5480
5480
  } : {},
5481
- workerDecoder: i.svgDecoder
5481
+ workerDecoder: a.svgDecoder
5482
5482
  };
5483
- if (A(t)) I(t.svgImagePath, i.fetchImage, l).catch(() => void 0);
5484
- else if (n) I(t.imagePath, i.fetchImage, l).catch(() => void 0);
5483
+ if (J(t)) H(t.svgImagePath, a.fetchImage, l).catch(() => void 0);
5484
+ else if (n) H(t.imagePath, a.fetchImage, l).catch(() => void 0);
5485
5485
  else {
5486
5486
  let e = Ne(t.mimeType, t.srcRect, t.width / Y, t.height / Y);
5487
5487
  if (!e) continue;
5488
- Je(t.imagePath, t.mimeType, t.duotone, i.fetchImage, {
5488
+ Je(t.imagePath, t.mimeType, t.duotone, a.fetchImage, {
5489
5489
  widthPt: e.widthPt,
5490
5490
  heightPt: e.heightPt,
5491
5491
  ...s ?? {},
5492
- tiff: i.tiff,
5493
- svgDecoder: i.svgDecoder
5492
+ tiff: a.tiff,
5493
+ svgDecoder: a.svgDecoder
5494
5494
  }).catch(() => void 0);
5495
5495
  }
5496
5496
  } else if (e.type === "media") {
5497
5497
  let t = e;
5498
- t.posterPath && i.fetchMedia && Jr(t, i.fetchMedia, s, i.tiff, t.posterMimeType === "image/svg+xml" ? En(X(t.width, u), X(t.height, u), h) : Dn(g, Z(t.posterPath)), i.svgDecoder).catch(() => void 0);
5498
+ t.posterPath && a.fetchMedia && Jr(t, a.fetchMedia, s, a.tiff, t.posterMimeType === "image/svg+xml" ? En(X(t.width, u), X(t.height, u), h) : Dn(g, Z(t.posterPath)), a.svgDecoder).catch(() => void 0);
5499
5499
  }
5500
- let S = /* @__PURE__ */ new Map();
5501
- if (i.fetchImage) {
5502
- let n = i.fetchImage, r = /* @__PURE__ */ new Map(), o = [];
5503
- for (let e of t.elements) {
5500
+ let C = /* @__PURE__ */ new Map();
5501
+ if (a.fetchImage) {
5502
+ let e = a.fetchImage, r = /* @__PURE__ */ new Map(), i = [];
5503
+ for (let e of n.elements) {
5504
5504
  if (e.type !== "chart" || !Number.isFinite(e.width) || e.width <= 0 || !Number.isFinite(e.height) || e.height <= 0) continue;
5505
5505
  let t = {
5506
5506
  widthPt: e.width / Y,
@@ -5519,16 +5519,16 @@ async function ci(e, t, n, r, i = {}, o, s, c = () => !1) {
5519
5519
  size: e
5520
5520
  });
5521
5521
  }
5522
- r && o.push({
5522
+ r && i.push({
5523
5523
  element: e,
5524
5524
  frame: t,
5525
5525
  usages: n
5526
5526
  });
5527
5527
  }
5528
- let s = /* @__PURE__ */ new Map();
5529
- for (let e of Me(o.map(({ element: e }) => e.chart), (e, t) => Ee(e, o[t].frame) != null)) {
5528
+ let o = /* @__PURE__ */ new Map();
5529
+ for (let e of Me(i.map(({ element: e }) => e.chart), (e, t) => Ee(e, i[t].frame) != null)) {
5530
5530
  let { fill: t } = e, n = Ie(t);
5531
- s.has(n) || s.set(n, {
5531
+ o.has(n) || o.set(n, {
5532
5532
  fill: t,
5533
5533
  widthPt: 0,
5534
5534
  heightPt: 0,
@@ -5536,14 +5536,14 @@ async function ci(e, t, n, r, i = {}, o, s, c = () => !1) {
5536
5536
  hasSourceCrop: e.hasSourceCrop
5537
5537
  });
5538
5538
  }
5539
- for (let { usages: e } of o) for (let { usage: t, size: n } of e) {
5540
- let { fill: e } = t, r = Ie(e), i = s.get(r);
5539
+ for (let { usages: e } of i) for (let { usage: t, size: n } of e) {
5540
+ let { fill: e } = t, r = Ie(e), i = o.get(r);
5541
5541
  if (!i) continue;
5542
- let a = i.preserveNaturalSize || t.preserveNaturalSize, o = i.hasSourceCrop || t.hasSourceCrop, c = a || e.duotone ? void 0 : Dn(g, Z(e.imagePath, e.duotone)), l = !e.duotone && (e.mimeType === "image/svg+xml" || A({
5542
+ let a = i.preserveNaturalSize || t.preserveNaturalSize, s = i.hasSourceCrop || t.hasSourceCrop, c = a || e.duotone ? void 0 : Dn(g, Z(e.imagePath, e.duotone)), l = !e.duotone && (e.mimeType === "image/svg+xml" || J({
5543
5543
  svgImagePath: e.svgImagePath,
5544
- srcRect: o ? !0 : null
5544
+ srcRect: s ? !0 : null
5545
5545
  }));
5546
- s.set(r, {
5546
+ o.set(r, {
5547
5547
  ...i,
5548
5548
  widthPt: Math.max(i.widthPt, n.widthPt),
5549
5549
  heightPt: Math.max(i.heightPt, n.heightPt),
@@ -5551,10 +5551,10 @@ async function ci(e, t, n, r, i = {}, o, s, c = () => !1) {
5551
5551
  targetHeightPx: a ? void 0 : c?.targetHeightPx ?? (l && Math.max(i.targetHeightPx ?? 0, n.targetHeightPx ?? 0) || void 0),
5552
5552
  maxRetainedPixels: c?.maxRetainedPixels,
5553
5553
  preserveNaturalSize: a,
5554
- hasSourceCrop: o
5554
+ hasSourceCrop: s
5555
5555
  });
5556
5556
  }
5557
- for (let e of t.elements) if (!(e.type !== "shape" || !e.textBody)) for (let t of e.textBody.paragraphs) {
5557
+ for (let e of n.elements) if (!(e.type !== "shape" || !e.textBody)) for (let t of e.textBody.paragraphs) {
5558
5558
  let n = Qe(t.bullet);
5559
5559
  if (n.type === "blip") {
5560
5560
  let i = Zn(e.textBody, t, n) * Y * u * h, a = r.get(n.imagePath);
@@ -5564,101 +5564,101 @@ async function ci(e, t, n, r, i = {}, o, s, c = () => !1) {
5564
5564
  });
5565
5565
  }
5566
5566
  }
5567
- if (r.size > 0 || s.size > 0) {
5568
- let t = [...r].map(async ([e, { mimeType: t, targetHeightPx: r }]) => {
5567
+ if (r.size > 0 || o.size > 0) {
5568
+ let n = [...r].map(async ([t, { mimeType: n, targetHeightPx: r }]) => {
5569
5569
  try {
5570
- let a = t === "image/svg+xml" ? r === void 0 ? {} : {
5570
+ let i = n === "image/svg+xml" ? r === void 0 ? {} : {
5571
5571
  targetWidthPx: 1,
5572
5572
  targetHeightPx: r
5573
- } : Dn(g, Z(e)) ?? {}, o = t === "image/svg+xml" ? await I(e, n, {
5574
- ...a,
5575
- workerDecoder: i.svgDecoder
5576
- }) : await q(e, t, n, {
5577
- tiff: i.tiff,
5578
- ...a
5573
+ } : Dn(g, Z(t)) ?? {}, o = n === "image/svg+xml" ? await H(t, e, {
5574
+ ...i,
5575
+ workerDecoder: a.svgDecoder
5576
+ }) : await P(t, n, e, {
5577
+ tiff: a.tiff,
5578
+ ...i
5579
5579
  });
5580
- y.set(e, o);
5581
- } catch (t) {
5582
- if (a(t, "tiff")) {
5583
- y.set(e, null);
5580
+ b.set(t, o);
5581
+ } catch (e) {
5582
+ if (ue(e, "tiff")) {
5583
+ b.set(t, null);
5584
5584
  return;
5585
5585
  }
5586
- if (Le(t) || qe(t)) throw t;
5587
- y.set(e, null);
5586
+ if (Le(e) || qe(e)) throw e;
5587
+ b.set(t, null);
5588
5588
  }
5589
- }), o = [...s].map(async ([e, t]) => {
5590
- let { fill: r, widthPt: o, heightPt: s, targetWidthPx: c, targetHeightPx: l, maxRetainedPixels: u, hasSourceCrop: d } = t, f = c && l ? {
5591
- targetWidthPx: c,
5592
- targetHeightPx: l,
5593
- ...u === void 0 ? {} : { maxRetainedPixels: u }
5589
+ }), i = [...o].map(async ([t, n]) => {
5590
+ let { fill: r, widthPt: i, heightPt: o, targetWidthPx: s, targetHeightPx: c, maxRetainedPixels: l, hasSourceCrop: u } = n, d = s && c ? {
5591
+ targetWidthPx: s,
5592
+ targetHeightPx: c,
5593
+ ...l === void 0 ? {} : { maxRetainedPixels: l }
5594
5594
  } : void 0;
5595
5595
  try {
5596
- let t = () => r.mimeType === "image/svg+xml" ? r.duotone ? Promise.resolve(null) : I(r.imagePath, n, {
5597
- ...f ?? {},
5598
- workerDecoder: i.svgDecoder
5599
- }) : Je(r.imagePath, r.mimeType, r.duotone, n, {
5600
- widthPt: o,
5601
- heightPt: s,
5602
- ...f ?? {},
5596
+ let n = () => r.mimeType === "image/svg+xml" ? r.duotone ? Promise.resolve(null) : H(r.imagePath, e, {
5597
+ ...d ?? {},
5598
+ workerDecoder: a.svgDecoder
5599
+ }) : Je(r.imagePath, r.mimeType, r.duotone, e, {
5600
+ widthPt: i,
5601
+ heightPt: o,
5602
+ ...d ?? {},
5603
5603
  failClosedOnDuotoneFailure: !0,
5604
- tiff: i.tiff
5605
- }), a, c = {
5604
+ tiff: a.tiff
5605
+ }), s, c = {
5606
5606
  svgImagePath: r.svgImagePath,
5607
- srcRect: d ? !0 : null
5607
+ srcRect: u ? !0 : null
5608
5608
  };
5609
- if (!r.duotone && A(c)) try {
5610
- a = await I(c.svgImagePath, n, {
5611
- ...f ?? {},
5612
- workerDecoder: i.svgDecoder
5609
+ if (!r.duotone && J(c)) try {
5610
+ s = await H(c.svgImagePath, e, {
5611
+ ...d ?? {},
5612
+ workerDecoder: a.svgDecoder
5613
5613
  });
5614
5614
  } catch {
5615
- a = await t();
5615
+ s = await n();
5616
5616
  }
5617
- else a = await t();
5618
- S.set(e, a);
5619
- } catch (t) {
5620
- if (a(t, "tiff")) {
5621
- S.set(e, null);
5617
+ else s = await n();
5618
+ C.set(t, s);
5619
+ } catch (e) {
5620
+ if (ue(e, "tiff")) {
5621
+ C.set(t, null);
5622
5622
  return;
5623
5623
  }
5624
- if (Le(t) || qe(t)) throw t;
5625
- S.set(e, null);
5624
+ if (Le(e) || qe(e)) throw e;
5625
+ C.set(t, null);
5626
5626
  }
5627
5627
  });
5628
- if (await Promise.all([...t, ...o]), c()) return e;
5628
+ if (await Promise.all([...n, ...i]), c()) return t;
5629
5629
  }
5630
5630
  }
5631
- for (let [n, r] of t.elements.entries()) {
5632
- if (c()) return e;
5633
- if (r.type === "shape") Fr(_, r, u, v, x, b, o ? (e) => o({
5634
- ...e,
5635
- elementIndex: n,
5636
- origin: t.elementSources?.[n]?.origin ?? "slide"
5637
- }) : void 0, i.fetchImage);
5638
- else if (r.type === "picture") await Xr(_, r, u, c, i.fetchImage, i.tiff, h, i.svgDecoder, g);
5639
- else if (r.type === "table") ti(_, r, u, x, b, o ? (e) => o({
5640
- ...e,
5641
- elementIndex: n,
5642
- origin: t.elementSources?.[n]?.origin ?? "slide"
5631
+ for (let [e, r] of n.elements.entries()) {
5632
+ if (c()) return t;
5633
+ if (r.type === "shape") Fr(v, r, u, y, S, x, o ? (t) => o({
5634
+ ...t,
5635
+ elementIndex: e,
5636
+ origin: n.elementSources?.[e]?.origin ?? "slide"
5637
+ }) : void 0, a.fetchImage);
5638
+ else if (r.type === "picture") await Xr(v, r, u, c, a.fetchImage, a.tiff, h, a.svgDecoder, g);
5639
+ else if (r.type === "table") ti(v, r, u, S, x, o ? (t) => o({
5640
+ ...t,
5641
+ elementIndex: e,
5642
+ origin: n.elementSources?.[e]?.origin ?? "slide"
5643
5643
  }) : void 0);
5644
- else if (r.type === "media") await Zr(_, r, u, c, i.fetchMedia, i.skipMediaControls, i.fetchImage, i.tiff, h, i.svgDecoder, g);
5644
+ else if (r.type === "media") await Zr(v, r, u, c, a.fetchMedia, a.skipMediaControls, a.fetchImage, a.tiff, h, a.svgDecoder, g);
5645
5645
  else if (r.type === "chart") {
5646
5646
  let e = Y * u;
5647
- _.save(), ei(_, r, u), Ke(_, r.chart, {
5647
+ v.save(), ei(v, r, u), Ke(v, r.chart, {
5648
5648
  x: X(r.x, u),
5649
5649
  y: X(r.y, u),
5650
5650
  w: X(r.width, u),
5651
5651
  h: X(r.height, u)
5652
- }, e, r.rotation, i.threeD, i.regionMap, (e) => S.get(Ie(e)), i.chartEx), _.restore();
5652
+ }, e, r.rotation, a.threeD, a.regionMap, (e) => C.get(Ie(e)), a.chartEx), v.restore();
5653
5653
  }
5654
5654
  }
5655
- return c() || i.dim && ni(_, i.dim, d, f), e;
5655
+ return c() || a.dim && ni(v, a.dim, d, f), t;
5656
5656
  }
5657
5657
  //#endregion
5658
5658
  //#region packages/pptx/src/google-fonts.ts
5659
5659
  var li = {
5660
- ...T,
5661
- ...b
5660
+ ...S,
5661
+ ...c
5662
5662
  };
5663
5663
  function* ui(e) {
5664
5664
  for (let t of e?.paragraphs ?? []) for (let e of t.runs) e.type === "text" && (yield e.text);
@@ -5683,8 +5683,8 @@ var pi = class e {
5683
5683
  families;
5684
5684
  constructor(e, t, n, r) {
5685
5685
  this.majorFont = e, this.minorFont = t;
5686
- let i = w(e) ?? w(t) ?? null;
5687
- this.scripts = n ?? new fe(i), this.families = r ?? /* @__PURE__ */ new Set(), e && this.families.add(e), t && this.families.add(t);
5686
+ let i = fe(e) ?? fe(t) ?? null;
5687
+ this.scripts = n ?? new d(i), this.families = r ?? /* @__PURE__ */ new Set(), e && this.families.add(e), t && this.families.add(t);
5688
5688
  }
5689
5689
  addSlide(e) {
5690
5690
  this.scripts.addText(fi(e));
@@ -5703,7 +5703,7 @@ var pi = class e {
5703
5703
  declaredInflatedBytes: 0,
5704
5704
  distinctInflatedBytes: 0,
5705
5705
  operationInflatedBytes: 0
5706
- }), hi = D;
5706
+ }), hi = l;
5707
5707
  function gi(e, t) {
5708
5708
  if (e !== null && typeof e != "string") throw Error(`invalid PPTX presentation bootstrap ${t}`);
5709
5709
  }
@@ -5945,7 +5945,7 @@ function Ni(e, t) {
5945
5945
  });
5946
5946
  }
5947
5947
  function Pi(e, t, n) {
5948
- if (!(e <= t)) throw new N(`PPTX presentation preflight exceeded its hard limit of ${t} projected bytes`, {
5948
+ if (!(e <= t)) throw new ne(`PPTX presentation preflight exceeded its hard limit of ${t} projected bytes`, {
5949
5949
  stage: "parsing",
5950
5950
  violation: {
5951
5951
  format: "pptx",
@@ -6100,9 +6100,9 @@ var Fi = class {
6100
6100
  sessionId: r,
6101
6101
  operationId: r,
6102
6102
  generation: this.options.generation ?? 1
6103
- }, a = new h(this.options.transport, {
6103
+ }, a = new L(this.options.transport, {
6104
6104
  ...i,
6105
- maxByteCredit: E,
6105
+ maxByteCredit: w,
6106
6106
  timeoutMs: n
6107
6107
  });
6108
6108
  this.active.add(a);
@@ -6144,7 +6144,7 @@ async function zi(e) {
6144
6144
  }
6145
6145
  }
6146
6146
  function Bi(e) {
6147
- return d(e, Ii, E);
6147
+ return u(e, Ii, w);
6148
6148
  }
6149
6149
  //#endregion
6150
6150
  export { yi as a, li as c, si as d, an as f, Mi as i, ii as l, Ri as n, Ai as o, Fi as r, ji as s, Li as t, oi as u };