@univerjs/engine-render 0.12.1-nightly.202511221011 → 0.12.2-nightly.202511241159

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.
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var R8 = Object.defineProperty;
2
2
  var M8 = (r, t, e) => t in r ? R8(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
3
  var k = (r, t, e) => M8(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { Tools as o1, DEFAULT_STYLES as d2, FontStyleType as Fe, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as R3, ColorKit as d4, Disposable as D2, EventSubject as r1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as M1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as K1, sortRules as c2, Registry as j0, Range as H3, numberToABC as P8, HorizontalAlign as d1, VerticalAlign as m2, CellValueType as T2, TextDecoration as i1, insertTextToContent as N8, horizontalLineSegmentsSubtraction as $8, deleteContent as U8, DataStreamTreeNodeType as V1, GridType as U1, BulletAlignment as I0, TableTextWrapType as Je, PositionedObjectLayoutType as Z1, WrapTextType as We, ColumnSeparatorType as ue, TableRowHeightRule as ne, VerticalAlignmentType as V2, TableAlignmentType as L0, NAMED_STYLE_SPACE_MAP as H8, ObjectRelativeFromV as y1, SpacingRule as Qe, CustomDecorationType as G8, CustomRangeType as P0, ObjectMatrix as Y1, SectionType as e0, NumberUnitType as q8, DocumentFlavor as l7, WrapStrategy as O1, PageOrientType as N4, NAMED_STYLE_MAP as W8, mergeWith as v6, AlignTypeH as l3, ObjectRelativeFromH as _1, AlignTypeV as J3, ListGlyphType as S3, numberToListABC as u7, Skeleton as Y8, PRESET_LIST_TYPE as X8, DocumentDataModel as g4, DEFAULT_EMPTY_DOCUMENT_VALUE as d7, Inject as b3, LocaleService as V8, IContextService as K8, IConfigService as g7, Injector as w0, SheetSkeleton as Z8, extractPureTextFromCell as c7, addLinkToDocumentModel as J8, searchArray as Se, isNullCell as Q8, getColorStyle as y3, isWhiteColor as b6, requestImmediateMacroTask as h7, COLORS as y6, createIdentifier as $4, ThemeService as k7, invertColorByMatrix as ea, MOVE_BUFFER_VALUE as z6, sortRulesByDesc as _6, isClassDependencyItem as ta, IUniverInstanceService as aa, remove as D6, UniverInstanceType as ra, Plugin as sa, merge as na, registerDependencies as ia } from "@univerjs/core";
4
+ import { Tools as o1, DEFAULT_STYLES as d2, FontStyleType as Fe, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as R3, ColorKit as d4, Disposable as D2, EventSubject as r1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as M1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as K1, sortRules as c2, Registry as j0, Range as H3, numberToABC as P8, HorizontalAlign as d1, VerticalAlign as m2, CellValueType as B2, TextDecoration as i1, insertTextToContent as N8, horizontalLineSegmentsSubtraction as $8, deleteContent as U8, DataStreamTreeNodeType as G1, GridType as U1, BulletAlignment as I0, TableTextWrapType as Je, PositionedObjectLayoutType as Z1, WrapTextType as We, ColumnSeparatorType as ue, TableRowHeightRule as ne, VerticalAlignmentType as V2, TableAlignmentType as L0, NAMED_STYLE_SPACE_MAP as H8, ObjectRelativeFromV as y1, SpacingRule as Qe, CustomDecorationType as G8, CustomRangeType as P0, ObjectMatrix as X1, SectionType as e0, NumberUnitType as q8, DocumentFlavor as l7, WrapStrategy as O1, PageOrientType as N4, NAMED_STYLE_MAP as W8, mergeWith as v6, AlignTypeH as l3, ObjectRelativeFromH as _1, AlignTypeV as J3, ListGlyphType as S3, numberToListABC as u7, Skeleton as Y8, PRESET_LIST_TYPE as X8, DocumentDataModel as g4, DEFAULT_EMPTY_DOCUMENT_VALUE as d7, Inject as b3, LocaleService as V8, IContextService as K8, IConfigService as g7, Injector as w0, SheetSkeleton as Z8, extractPureTextFromCell as c7, addLinkToDocumentModel as J8, searchArray as Se, isNullCell as Q8, getColorStyle as y3, isWhiteColor as b6, requestImmediateMacroTask as h7, COLORS as y6, createIdentifier as $4, ThemeService as k7, invertColorByMatrix as ea, MOVE_BUFFER_VALUE as z6, sortRulesByDesc as _6, isClassDependencyItem as ta, IUniverInstanceService as aa, remove as D6, UniverInstanceType as ra, Plugin as sa, merge as na, registerDependencies as ia } from "@univerjs/core";
5
5
  import { BehaviorSubject as I3, Subject as $1, startWith as oa, distinctUntilChanged as m7, Subscription as la, Observable as p7, shareReplay as ua, debounceTime as da } from "rxjs";
6
6
  var f7 = /* @__PURE__ */ ((r) => (r.RECT = "rect", r.CIRCLE = "circle", r.PATH = "path", r))(f7 || {}), ga = /* @__PURE__ */ ((r) => (r[r.XY = 0] = "XY", r[r.X = 1] = "X", r[r.Y = 2] = "Y", r))(ga || {});
7
7
  const L3 = 1, G3 = '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', v7 = {
@@ -36,20 +36,20 @@ class fa {
36
36
  return new RegExp(this.toString(t), t);
37
37
  }
38
38
  }
39
- class B2 extends fa {
39
+ class A2 extends fa {
40
40
  constructor(...t) {
41
41
  super(), this.data = [];
42
42
  for (const e of t)
43
- e instanceof B2 ? this.data.push(...e.data) : this.data.push(ba(e));
43
+ e instanceof A2 ? this.data.push(...e.data) : this.data.push(ba(e));
44
44
  this._unique();
45
45
  }
46
46
  union(...t) {
47
- return new B2(this, ...t);
47
+ return new A2(this, ...t);
48
48
  }
49
49
  subtract(...t) {
50
50
  const e = this.data.slice(), a = [];
51
51
  let s = 0;
52
- const { data: n } = new B2(...t);
52
+ const { data: n } = new A2(...t);
53
53
  for (; e.length !== 0; ) {
54
54
  const i = e.shift(), [o, l] = i;
55
55
  let u;
@@ -64,7 +64,7 @@ class B2 extends fa {
64
64
  g < o ? (u = !1, s++) : l < c ? a.push(i) : c <= o && g < l ? (s++, e.unshift([g + 1, l])) : o < c && g < l ? (s++, a.push([o, c - 1]), e.unshift([g + 1, l])) : o < c && l <= g && a.push([o, c - 1]);
65
65
  } while (!u);
66
66
  }
67
- return new B2(...a);
67
+ return new A2(...a);
68
68
  }
69
69
  intersect(...t) {
70
70
  return this.subtract(this.subtract(...t));
@@ -87,7 +87,7 @@ class B2 extends fa {
87
87
  this.data = t;
88
88
  }
89
89
  }
90
- const C0 = (...r) => new B2(...r);
90
+ const C0 = (...r) => new A2(...r);
91
91
  function va(r) {
92
92
  if (r.length !== 1) {
93
93
  const t = `${r.length} (${JSON.stringify(r)})`;
@@ -164,8 +164,8 @@ function ja(r) {
164
164
  l.l === 57343 ? a(l.h) : s(l.h, 56320, l.l);
165
165
  }
166
166
  return {
167
- entire: new B2(...t),
168
- partial: e.map(({ h: n, l: i }) => ({ h: n, l: new B2(...i) }))
167
+ entire: new A2(...t),
168
+ partial: e.map(({ h: n, l: i }) => ({ h: n, l: new A2(...i) }))
169
169
  };
170
170
  function a(n) {
171
171
  t.push(n);
@@ -32868,12 +32868,12 @@ function b7(r) {
32868
32868
  throw new Error("Expected at least one sub category, but received 0.");
32869
32869
  return t.map((a) => {
32870
32870
  const n = r[a].map((i) => Bv(a, i));
32871
- return new B2().union(...n);
32871
+ return new A2().union(...n);
32872
32872
  }).reduce((a, s) => a.intersect(s));
32873
32873
  }
32874
32874
  function Bv(r, t) {
32875
32875
  const a = Tv[r][t];
32876
- return new B2().union(...a);
32876
+ return new A2().union(...a);
32877
32877
  }
32878
32878
  const U4 = b7({
32879
32879
  Script: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
@@ -33086,10 +33086,10 @@ class S1 {
33086
33086
  subscriptSizeRatio: c,
33087
33087
  subscriptOffset: g,
33088
33088
  superscriptSizeRatio: h,
33089
- superscriptOffset: p,
33090
- hdmxData: f,
33089
+ superscriptOffset: f,
33090
+ hdmxData: p,
33091
33091
  glyphHorizonMap: m
33092
- } = s, v = f == null ? void 0 : f.indexOf(Math.floor(e)), y = m.get(a.charCodeAt(0));
33092
+ } = s, v = p == null ? void 0 : p.indexOf(Math.floor(e)), y = m.get(a.charCodeAt(0));
33093
33093
  let z = n;
33094
33094
  if (y) {
33095
33095
  const { width: _, pixelsPerEm: j = [] } = y;
@@ -33105,7 +33105,7 @@ class S1 {
33105
33105
  sbr: c,
33106
33106
  sbo: g * e,
33107
33107
  spr: h,
33108
- spo: p * e
33108
+ spo: f * e
33109
33109
  };
33110
33110
  }
33111
33111
  static _calculateBoundingBoxByMeasureText(t, e) {
@@ -33132,7 +33132,7 @@ class S1 {
33132
33132
  }
33133
33133
  }
33134
33134
  k(S1, "_getTextHeightCache", {}), k(S1, "_context"), k(S1, "_fontDataMap", /* @__PURE__ */ new Map()), k(S1, "_globalFontMeasureCache", /* @__PURE__ */ new Map());
33135
- const z7 = 180, Lv = Math.PI / z7, Pv = z7 / Math.PI, E6 = "rgb(", Nv = "rgba(", M2 = (r, t) => r ? t != null ? `${Nv + r.join(",")},${t})` : `${E6 + r.join(",")})` : `${E6}0,0,0)`, $v = 100, K2 = (r, t) => {
33135
+ const z7 = 180, Lv = Math.PI / z7, Pv = z7 / Math.PI, E6 = "rgb(", Nv = "rgba(", O2 = (r, t) => r ? t != null ? `${Nv + r.join(",")},${t})` : `${E6 + r.join(",")})` : `${E6}0,0,0)`, $v = 100, K2 = (r, t) => {
33136
33136
  if (o1.isNumber(r))
33137
33137
  return r;
33138
33138
  if (t && r && o1.isString(r) && r.substr(r.length - 1, 1) === "%") {
@@ -33327,12 +33327,12 @@ function eb(r, t, e, a, s) {
33327
33327
  e,
33328
33328
  a
33329
33329
  );
33330
- const { isMerged: u, isMergedMainCell: d, startRow: c, startColumn: g, endRow: h, endColumn: p } = s;
33331
- let f = {
33330
+ const { isMerged: u, isMergedMainCell: d, startRow: c, startColumn: g, endRow: h, endColumn: f } = s;
33331
+ let p = {
33332
33332
  startRow: c,
33333
33333
  startColumn: g,
33334
33334
  endRow: h,
33335
- endColumn: p,
33335
+ endColumn: f,
33336
33336
  startY: 0,
33337
33337
  endY: 0,
33338
33338
  startX: 0,
@@ -33340,18 +33340,18 @@ function eb(r, t, e, a, s) {
33340
33340
  };
33341
33341
  const m = e.length - 1, v = a.length - 1;
33342
33342
  if (u && c !== -1 && g !== -1) {
33343
- const y = e[c - 1] || 0, z = e[h] || e[m], _ = a[g - 1] || 0, j = a[p] || a[v];
33344
- f = {
33345
- ...f,
33343
+ const y = e[c - 1] || 0, z = e[h] || e[m], _ = a[g - 1] || 0, j = a[f] || a[v];
33344
+ p = {
33345
+ ...p,
33346
33346
  startY: y,
33347
33347
  endY: z,
33348
33348
  startX: _,
33349
33349
  endX: j
33350
33350
  };
33351
- } else if (!u && h !== -1 && p !== -1) {
33352
- const y = e[h] || e[m], z = a[p] || a[v];
33353
- f = {
33354
- ...f,
33351
+ } else if (!u && h !== -1 && f !== -1) {
33352
+ const y = e[h] || e[m], z = a[f] || a[v];
33353
+ p = {
33354
+ ...p,
33355
33355
  startY: n,
33356
33356
  endY: y,
33357
33357
  startX: o,
@@ -33367,7 +33367,7 @@ function eb(r, t, e, a, s) {
33367
33367
  endY: i,
33368
33368
  startX: o,
33369
33369
  endX: l,
33370
- mergeInfo: f
33370
+ mergeInfo: p
33371
33371
  };
33372
33372
  }
33373
33373
  const DB = eb;
@@ -34888,13 +34888,13 @@ function nb(r, t, e) {
34888
34888
  }
34889
34889
  function ib(r, t, e) {
34890
34890
  let a = 0, s = 0, n = 0, i = 0, o = 0, l = 0, u = 0, d = 0;
34891
- const { startX: c, startY: g, endX: h, endY: p } = e;
34891
+ const { startX: c, startY: g, endX: h, endY: f } = e;
34892
34892
  switch (t) {
34893
34893
  case X.TL_BR:
34894
- a = c, s = g + 1.5, n = h - 1.5, i = p, o = c + 1.5, l = g, u = h, d = p - 1.5;
34894
+ a = c, s = g + 1.5, n = h - 1.5, i = f, o = c + 1.5, l = g, u = h, d = f - 1.5;
34895
34895
  break;
34896
34896
  case X.BL_TR:
34897
- a = c, s = p - 1.5, n = h - 1.5, i = g, o = c + 1.5, l = p, u = h, d = g + 1.5;
34897
+ a = c, s = f - 1.5, n = h - 1.5, i = g, o = c + 1.5, l = f, u = h, d = g + 1.5;
34898
34898
  break;
34899
34899
  }
34900
34900
  r.beginPath(), r.moveToByPrecision(a, s), r.lineToByPrecision(n, i), r.closePathByEnv(), r.stroke(), r.beginPath(), r.moveToByPrecision(o, l), r.lineToByPrecision(u, d), r.closePathByEnv(), r.stroke();
@@ -34943,29 +34943,29 @@ function db(r) {
34943
34943
  return r > 0 ? t0.DOWN : t0.UP;
34944
34944
  }
34945
34945
  function M7(r, t, e) {
34946
- var p;
34946
+ var f;
34947
34947
  const a = [];
34948
34948
  let s = 0, n = 0, i = 0, o = 0, l = 0;
34949
34949
  const u = db(e), d = r.length;
34950
34950
  e = Math.abs(e);
34951
34951
  const c = Math.tan(e), g = Math.sin(e), h = Math.cos(e);
34952
34952
  if (u === t0.UP) {
34953
- let f = 0;
34953
+ let p = 0;
34954
34954
  for (let m = 0; m < d; m++) {
34955
34955
  const v = r[m], { lineHeight: y = 0 } = v;
34956
- f += m === 0 ? 0 : y;
34956
+ p += m === 0 ? 0 : y;
34957
34957
  const z = t * g + y * h;
34958
- a.push(f / c), z > n && (n = z), m === 0 && (i += y * g, l += y * h);
34958
+ a.push(p / c), z > n && (n = z), m === 0 && (i += y * g, l += y * h);
34959
34959
  }
34960
- i += f / g + t * h, l -= n;
34960
+ i += p / g + t * h, l -= n;
34961
34961
  } else {
34962
- let f = 0, m = -1;
34962
+ let p = 0, m = -1;
34963
34963
  const v = [];
34964
34964
  for (let _ = d - 1; _ >= 0; _--) {
34965
34965
  const j = r[_], { lineHeight: w = 0 } = j, C = w / c, x = (t + C) * g;
34966
- v.unshift(w / c), x > n && (n = x, f = C, m = _), _ === 0 ? i += w * g : _ === d - 1 ? i += t * h + w / g : i += w / g;
34966
+ v.unshift(w / c), x > n && (n = x, p = C, m = _), _ === 0 ? i += w * g : _ === d - 1 ? i += t * h + w / g : i += w / g;
34967
34967
  }
34968
- let y = ((p = r[m]) == null ? void 0 : p.lineHeight) || 0, z = 0;
34968
+ let y = ((f = r[m]) == null ? void 0 : f.lineHeight) || 0, z = 0;
34969
34969
  for (let _ = m + 1; _ <= d - 1; _++) {
34970
34970
  const j = r[_], { lineHeight: w = 0 } = j;
34971
34971
  y += w, z += v[_] || 0, a[_] = -z;
@@ -34975,7 +34975,7 @@ function M7(r, t, e) {
34975
34975
  const j = r[_], { lineHeight: w = 0 } = j;
34976
34976
  z += v[_ + 1] || 0, a[_] = z, s += w;
34977
34977
  }
34978
- a[m] = 0, d === 1 && (i += t * h), o = y / g - f * h;
34978
+ a[m] = 0, d === 1 && (i += t * h), o = y / g - p * h;
34979
34979
  }
34980
34980
  return {
34981
34981
  rotateTranslateXList: a,
@@ -35015,7 +35015,7 @@ function gb(r, t, e) {
35015
35015
  };
35016
35016
  }
35017
35017
  function cb(r, t, e, a) {
35018
- const { left: s = 0, top: n = 0, width: i = 0, height: o = 0, angle: l = 0 } = r, { left: u = 0, top: d = 0, angle: c = 0 } = t, g = u + e / 2, h = d + a / 2, p = s + u, f = n + d, m = p + i / 2, v = f + o / 2, y = W4(new U(g, h), c, new U(p, f), new U(m, v));
35018
+ const { left: s = 0, top: n = 0, width: i = 0, height: o = 0, angle: l = 0 } = r, { left: u = 0, top: d = 0, angle: c = 0 } = t, g = u + e / 2, h = d + a / 2, f = s + u, p = n + d, m = f + i / 2, v = p + o / 2, y = W4(new U(g, h), c, new U(f, p), new U(m, v));
35019
35019
  return {
35020
35020
  left: y.x,
35021
35021
  top: y.y,
@@ -35923,7 +35923,7 @@ class yb extends O7 {
35923
35923
  }
35924
35924
  clearRect(e, a, s, n) {
35925
35925
  const { scaleX: i, scaleY: o } = this._getScale();
35926
- e = Z(e, i), a = Z(a, o), s = Z(s, i), n = Z(n, o), this._context.save(), this._context.fillStyle = M2([255, 255, 255]), this._context.fillRect(e, a, s, n), this._context.restore();
35926
+ e = Z(e, i), a = Z(a, o), s = Z(s, i), n = Z(n, o), this._context.save(), this._context.fillStyle = O2([255, 255, 255]), this._context.fillRect(e, a, s, n), this._context.restore();
35927
35927
  }
35928
35928
  clearRectForTexture(e, a, s, n) {
35929
35929
  }
@@ -36291,13 +36291,13 @@ let Sb = class extends C3 {
36291
36291
  }
36292
36292
  // eslint-disable-next-line max-lines-per-function
36293
36293
  draw(e, a, s, n, { viewRanges: i, checkOutOfViewBound: o }) {
36294
- const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background: p, backgroundPositions: f } = l;
36295
- if (!u || !p || !d || !g || c === void 0 || h === void 0)
36294
+ const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background: f, backgroundPositions: p } = l;
36295
+ if (!u || !f || !d || !g || c === void 0 || h === void 0)
36296
36296
  return;
36297
36297
  e.save();
36298
36298
  const { scaleX: m, scaleY: v } = e.getScale(), y = {
36299
36299
  ctx: e,
36300
- backgroundPositions: f,
36300
+ backgroundPositions: p,
36301
36301
  scaleX: m,
36302
36302
  scaleY: v,
36303
36303
  checkOutOfViewBound: o,
@@ -36310,14 +36310,14 @@ let Sb = class extends C3 {
36310
36310
  z.push(...x);
36311
36311
  });
36312
36312
  const _ = (C) => {
36313
- const x = p[C], S = (B, A, L) => {
36313
+ const x = f[C], S = (B, A, L) => {
36314
36314
  if (s.worksheet.getSpanModel().getMergeDataIndex(B, A) !== -1)
36315
36315
  return;
36316
36316
  const O = s.getCellByIndexWithNoHeader(B, A);
36317
36317
  if (!O) return;
36318
36318
  (L || x.getValue(B, A)) && (y.cellInfo = O, this.renderBGByCell(y, B, A));
36319
36319
  };
36320
- e.fillStyle = C || M2([255, 255, 255]);
36320
+ e.fillStyle = C || O2([255, 255, 255]);
36321
36321
  const F = new Path2D();
36322
36322
  y.backgroundPaths = F, e.beginPath();
36323
36323
  const T = x.getSizeOf();
@@ -36325,8 +36325,8 @@ let Sb = class extends C3 {
36325
36325
  H3.foreach(B, S);
36326
36326
  }) : x.forValue(S), e.fill(F), e.closePath();
36327
36327
  }, j = (C) => {
36328
- const x = p[C];
36329
- e.fillStyle = C || M2([255, 255, 255]);
36328
+ const x = f[C];
36329
+ e.fillStyle = C || O2([255, 255, 255]);
36330
36330
  const S = new Path2D();
36331
36331
  y.backgroundPaths = S, e.beginPath(), z.forEach((F) => {
36332
36332
  if (x.getValue(F.startRow, F.startColumn)) {
@@ -36335,7 +36335,7 @@ let Sb = class extends C3 {
36335
36335
  y.cellInfo = M, this.renderBGByCell(y, F.startRow, F.startColumn);
36336
36336
  }
36337
36337
  }), e.fill(S), e.closePath();
36338
- }, w = Object.keys(p);
36338
+ }, w = Object.keys(f);
36339
36339
  for (let C = 0; C < w.length; C++) {
36340
36340
  const x = w[C];
36341
36341
  _(x), j(x);
@@ -36344,9 +36344,9 @@ let Sb = class extends C3 {
36344
36344
  }
36345
36345
  renderBGByCell(e, a, s) {
36346
36346
  const { spreadsheetSkeleton: n, backgroundPaths: i, scaleX: o, scaleY: l, viewRanges: u, diffRanges: d, cellInfo: c } = e;
36347
- let { startY: g, endY: h, startX: p, endX: f } = c;
36347
+ let { startY: g, endY: h, startX: f, endX: p } = c;
36348
36348
  const { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c, z = d && d.length > 0 ? d : u;
36349
- if (g = y.startY, h = y.endY, p = y.startX, f = y.endX, !m && !v && !S7(z, a, s))
36349
+ if (g = y.startY, h = y.endY, f = y.startX, p = y.endX, !m && !v && !S7(z, a, s))
36350
36350
  return !0;
36351
36351
  if (!m && !v) {
36352
36352
  if (!n.worksheet.getRowVisible(a) || !n.worksheet.getColVisible(s)) return !0;
@@ -36366,7 +36366,7 @@ let Sb = class extends C3 {
36366
36366
  }
36367
36367
  if (S) return !0;
36368
36368
  }
36369
- const _ = Z(p, o), j = Z(g, l), w = Z(f, o), C = Z(h, l);
36369
+ const _ = Z(f, o), j = Z(g, l), w = Z(p, o), C = Z(h, l);
36370
36370
  i.rect(_, j, w - _, C - j);
36371
36371
  }
36372
36372
  };
@@ -36385,11 +36385,11 @@ let Ab = class extends C3 {
36385
36385
  if (!u || !d || !g || c === void 0 || h === void 0)
36386
36386
  return;
36387
36387
  e.save(), e.translateWithPrecisionRatio(p2, p2);
36388
- const p = this._getScale(e.getScale()), { border: f } = o;
36389
- if (!f) return;
36388
+ const f = this._getScale(e.getScale()), { border: p } = o;
36389
+ if (!p) return;
36390
36390
  const m = {
36391
36391
  ctx: e,
36392
- precisionScale: p,
36392
+ precisionScale: f,
36393
36393
  overflowCache: l,
36394
36394
  diffRanges: n,
36395
36395
  viewRanges: i,
@@ -36397,20 +36397,20 @@ let Ab = class extends C3 {
36397
36397
  };
36398
36398
  e.beginPath(), i.forEach((v) => {
36399
36399
  H3.foreach(v, (y, z) => {
36400
- const _ = f.getValue(y, z);
36400
+ const _ = p.getValue(y, z);
36401
36401
  _ && this.renderBorderByCell(m, y, z, _);
36402
36402
  });
36403
36403
  }), e.closePath(), e.restore();
36404
36404
  }
36405
36405
  renderBorderByCell(e, a, s, n) {
36406
- const { ctx: i, precisionScale: o, overflowCache: l, spreadsheetSkeleton: u, diffRanges: d } = e, c = u.getCellWithCoordByIndex(a, s, !1), { startY: g, endY: h, startX: p, endX: f } = c, { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c;
36406
+ const { ctx: i, precisionScale: o, overflowCache: l, spreadsheetSkeleton: u, diffRanges: d } = e, c = u.getCellWithCoordByIndex(a, s, !1), { startY: g, endY: h, startX: f, endX: p } = c, { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c;
36407
36407
  if (!m && (!u.worksheet.getRowVisible(a) || !u.worksheet.getColVisible(s)) || !this.isRenderDiffRangesByRow(y.startRow, y.endRow, d))
36408
36408
  return !0;
36409
36409
  for (const z in n) {
36410
36410
  const { type: _, style: j, color: w } = n[z];
36411
36411
  if (j === M1.NONE)
36412
36412
  continue;
36413
- let C = g, x = h, S = p, F = f;
36413
+ let C = g, x = h, S = f, F = p;
36414
36414
  if (_ !== X.TOP && _ !== X.BOTTOM && _ !== X.LEFT && _ !== X.RIGHT) {
36415
36415
  if (m)
36416
36416
  return !0;
@@ -36453,8 +36453,8 @@ const Rb = "DefaultColumnHeaderLayoutExtension", Mb = {
36453
36453
  fontSize: 13,
36454
36454
  fontFamily: G3,
36455
36455
  fontColor: "#000000",
36456
- backgroundColor: M2([248, 249, 250]),
36457
- borderColor: M2([217, 217, 217]),
36456
+ backgroundColor: O2([248, 249, 250]),
36457
+ borderColor: O2([217, 217, 217]),
36458
36458
  textAlign: "center",
36459
36459
  textBaseline: "middle"
36460
36460
  };
@@ -36502,8 +36502,8 @@ class Ob extends C3 {
36502
36502
  const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
36503
36503
  if (!u || !c || d === void 0 || g === void 0)
36504
36504
  return;
36505
- const p = this.getColumnsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
36506
- this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, d, i), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
36505
+ const f = this.getColumnsCfg(h.getSheetId()), p = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
36506
+ this.setStyleToCtx(e, p), e.save(), e.fillStyle = p.backgroundColor, e.fillRectByPrecision(0, 0, d, i), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
36507
36507
  let v = 0;
36508
36508
  for (let z = o - 1; z <= l; z++) {
36509
36509
  if (z < 0 || z > c.length - 1)
@@ -36511,7 +36511,7 @@ class Ob extends C3 {
36511
36511
  const _ = c[z];
36512
36512
  if (v === _)
36513
36513
  continue;
36514
- const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, C] = this.getCfgOfCurrentColumn(p, f, z);
36514
+ const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, C] = this.getCfgOfCurrentColumn(f, p, z);
36515
36515
  C && w.backgroundColor && (e.save(), e.fillStyle = w.backgroundColor, e.fillRectByPrecision(j.left, j.top, j.width, j.height), e.restore()), e.beginPath(), e.moveToByPrecision(j.right, 0), e.lineToByPrecision(j.right, j.height), e.stroke();
36516
36516
  const x = (() => {
36517
36517
  switch (w.textAlign) {
@@ -36552,8 +36552,8 @@ class Nb extends C3 {
36552
36552
  return;
36553
36553
  let g = s.getCellWithCoordByIndex(d, c, !1);
36554
36554
  const { mergeInfo: h } = g;
36555
- let p = i.getCell(d, c);
36556
- if (g.isMerged && (p = i.getCell(h.startRow, h.startColumn)), !(p != null && p.customRender))
36555
+ let f = i.getCell(d, c);
36556
+ if (g.isMerged && (f = i.getCell(h.startRow, h.startColumn)), !(f != null && f.customRender))
36557
36557
  return;
36558
36558
  if (!this.isRenderDiffRangesByRow(h.startRow, h.endRow, n))
36559
36559
  return !0;
@@ -36564,18 +36564,18 @@ class Nb extends C3 {
36564
36564
  l.add(v);
36565
36565
  }
36566
36566
  g.isMerged && (g = s.getCellWithCoordByIndex(h.startRow, h.startColumn, !1));
36567
- const f = {
36568
- data: p,
36569
- style: s.getStyles().getStyleByCell(p),
36567
+ const p = {
36568
+ data: f,
36569
+ style: s.getStyles().getStyleByCell(f),
36570
36570
  primaryWithCoord: g,
36571
36571
  subUnitId: u,
36572
36572
  row: d,
36573
36573
  col: c,
36574
36574
  worksheet: i,
36575
36575
  unitId: i.unitId
36576
- }, m = p.customRender.sort(c2);
36576
+ }, m = f.customRender.sort(c2);
36577
36577
  e.save(), m.forEach((v) => {
36578
- v.drawWith(e, f, s, this.parent);
36578
+ v.drawWith(e, p, s, this.parent);
36579
36579
  }), e.restore();
36580
36580
  });
36581
36581
  }
@@ -42179,23 +42179,23 @@ class v4 {
42179
42179
  for (; l.length > 0; ) {
42180
42180
  let u = 0, d = "", c = 0, g = Math.min(this._lastBreakLength, l.length);
42181
42181
  g === 0 && (g = Math.min(10, l.length));
42182
- let h = l.slice(0, g), p = S1.getMeasureText(h, this._fontStyle);
42183
- if (p.width + e.width <= this._width) {
42182
+ let h = l.slice(0, g), f = S1.getMeasureText(h, this._fontStyle);
42183
+ if (f.width + e.width <= this._width) {
42184
42184
  u = g;
42185
- for (let f = g + 1; f <= l.length && (h = l.slice(0, f), p = S1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width); f++)
42186
- u = f;
42185
+ for (let p = g + 1; p <= l.length && (h = l.slice(0, p), f = S1.getMeasureText(h, this._fontStyle), f.width + e.width <= this._width); p++)
42186
+ u = p;
42187
42187
  } else {
42188
42188
  u = 0;
42189
- for (let f = g - 1; f >= 1; f--)
42190
- if (h = l.slice(0, f), p = S1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width) {
42191
- u = f;
42189
+ for (let p = g - 1; p >= 1; p--)
42190
+ if (h = l.slice(0, p), f = S1.getMeasureText(h, this._fontStyle), f.width + e.width <= this._width) {
42191
+ u = p;
42192
42192
  break;
42193
42193
  }
42194
42194
  }
42195
42195
  if (u > 0 && (this._lastBreakLength = u), u > 0 && (d = l.slice(0, u), c = S1.getMeasureText(d, this._fontStyle).width), u === 0 && e.text.length === 0 && (u = 1, d = l[0], c = S1.getMeasureText(d, this._fontStyle).width), u > 0) {
42196
42196
  e.text += d, e.width += c;
42197
- const f = S1.getMeasureText(e.text, this._fontStyle);
42198
- if (e.height = f.fontBoundingBoxAscent + f.fontBoundingBoxDescent, e.baseline = f.fontBoundingBoxAscent, l = l.slice(u), l.length > 0) {
42197
+ const p = S1.getMeasureText(e.text, this._fontStyle);
42198
+ if (e.height = p.fontBoundingBoxAscent + p.fontBoundingBoxDescent, e.baseline = p.fontBoundingBoxAscent, l = l.slice(u), l.length > 0) {
42199
42199
  if (this._lines.push(e), a += e.height, a > this._height)
42200
42200
  break;
42201
42201
  e = {
@@ -42477,13 +42477,13 @@ class Z4 extends x3 {
42477
42477
  }
42478
42478
  static drawWith(e, a, s) {
42479
42479
  var _, j;
42480
- const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0, cellValueType: p } = a, f = s != null ? s : new v4(n, i, !!o, d, u === m2.TOP ? c : 1 / 0), m = f.calculate(), v = f.getTotalHeight(), y = u === m2.TOP ? 0 : u === m2.MIDDLE ? (c - v) / 2 : c - v;
42480
+ const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0, cellValueType: f } = a, p = s != null ? s : new v4(n, i, !!o, d, u === m2.TOP ? c : 1 / 0), m = p.calculate(), v = p.getTotalHeight(), y = u === m2.TOP ? 0 : u === m2.MIDDLE ? (c - v) / 2 : c - v;
42481
42481
  let z = h + y;
42482
42482
  e.save(), e.font = i, e.fillStyle = (_ = a.color) != null ? _ : z3;
42483
42483
  for (const w of m) {
42484
42484
  const C = w.height, x = w.width;
42485
42485
  let S = 0;
42486
- if (!(!o && d < x && p === T2.NUMBER))
42486
+ if (!(!o && d < x && f === B2.NUMBER))
42487
42487
  switch (l) {
42488
42488
  case d1.CENTER:
42489
42489
  S = (d - x) / 2;
@@ -42712,7 +42712,7 @@ class J4 {
42712
42712
  };
42713
42713
  }
42714
42714
  }
42715
- class N2 {
42715
+ class T2 {
42716
42716
  constructor(t, e) {
42717
42717
  k(this, "children", []);
42718
42718
  k(this, "parent");
@@ -42724,7 +42724,7 @@ class N2 {
42724
42724
  this.nodeType = t, this.content = e;
42725
42725
  }
42726
42726
  static create(t, e) {
42727
- return new N2(t, e);
42727
+ return new T2(t, e);
42728
42728
  }
42729
42729
  dispose() {
42730
42730
  this.children.forEach((t) => {
@@ -42765,26 +42765,26 @@ class N2 {
42765
42765
  const { children: e, parent: a, startIndex: s, nodeType: n, content: i = "" } = this.getProps();
42766
42766
  if (this.exclude(t))
42767
42767
  return;
42768
- const o = 0, l = t - s, u = l, d = i.slice(o, l), c = N2.create(n, d);
42768
+ const o = 0, l = t - s, u = l, d = i.slice(o, l), c = T2.create(n, d);
42769
42769
  c.parent = a, c.setIndexRange(o, l - 1);
42770
- const g = i.slice(u), h = N2.create(n, g);
42770
+ const g = i.slice(u), h = T2.create(n, g);
42771
42771
  h.parent = a, h.setIndexRange(u, u + g.length - 1);
42772
- const p = [], f = [];
42772
+ const f = [], p = [];
42773
42773
  for (const m of e) {
42774
42774
  const { startIndex: v } = m;
42775
42775
  if (m.exclude(t))
42776
- t < v ? p.push(m) : f.push(m);
42776
+ t < v ? f.push(m) : p.push(m);
42777
42777
  else {
42778
42778
  const y = m.split(t);
42779
42779
  if (y == null) {
42780
- p.push(m);
42780
+ f.push(m);
42781
42781
  continue;
42782
42782
  }
42783
42783
  const { firstNode: z, lastNode: _ } = y;
42784
- p.push(z), p.push(_);
42784
+ f.push(z), f.push(_);
42785
42785
  }
42786
42786
  }
42787
- return c.children = p, h.children = f, c._resetBlocks(), h._resetBlocks(), {
42787
+ return c.children = f, h.children = p, c._resetBlocks(), h._resetBlocks(), {
42788
42788
  firstNode: c,
42789
42789
  lastNode: h
42790
42790
  };
@@ -42819,7 +42819,7 @@ class N2 {
42819
42819
  }
42820
42820
  }
42821
42821
  _resetBlocks() {
42822
- if (this.nodeType === V1.PARAGRAPH && this.content != null && this.content.length !== 0) {
42822
+ if (this.nodeType === G1.PARAGRAPH && this.content != null && this.content.length !== 0) {
42823
42823
  this.blocks = [];
42824
42824
  for (let t = 0, e = this.content.length; t < e; t++)
42825
42825
  this.content[t] === J.CUSTOM_BLOCK && this.blocks.push(this.startIndex + t);
@@ -42827,12 +42827,12 @@ class N2 {
42827
42827
  }
42828
42828
  }
42829
42829
  var d3 = /* @__PURE__ */ ((r) => (r.BODY = "BODY", r.HEADER = "HEADER", r.FOOTER = "FOOTER", r))(d3 || {});
42830
- function Q3(r, t, e = V1.SECTION_BREAK) {
42830
+ function Q3(r, t, e = G1.SECTION_BREAK) {
42831
42831
  if (t.length === 0)
42832
42832
  throw new Error("Missing `paragraphs` or `sectionBreaks` fields, or doesn't correspond to the location in `dataStream`.");
42833
42833
  for (const n of t)
42834
42834
  n.parent = r, r.children.push(n);
42835
- const a = e === V1.SECTION_BREAK ? 0 : 1, s = r.children;
42835
+ const a = e === G1.SECTION_BREAK ? 0 : 1, s = r.children;
42836
42836
  r.setIndexRange(s[0].startIndex - a, s[s.length - 1].endIndex + 1);
42837
42837
  }
42838
42838
  function G6(r, t) {
@@ -42842,46 +42842,50 @@ function G6(r, t) {
42842
42842
  const h = r[g];
42843
42843
  if (h === J.PARAGRAPH) {
42844
42844
  e += J.PARAGRAPH;
42845
- const p = N2.create(V1.PARAGRAPH, e), f = l[l.length - 1];
42846
- if (f && f.isFinished) {
42847
- if (Q3(p, [f.table], V1.PARAGRAPH), t) {
42848
- const m = t.find((v) => v.startIndex === f.table.startIndex && v.endIndex === f.table.endIndex + 1);
42849
- m && n.set(m.tableId, { table: f.table });
42845
+ const f = T2.create(G1.PARAGRAPH, e), p = l[l.length - 1];
42846
+ if (p && p.isFinished) {
42847
+ if (Q3(f, [p.table], G1.PARAGRAPH), t) {
42848
+ const m = t.find((v) => v.startIndex === p.table.startIndex && v.endIndex === p.table.endIndex + 1);
42849
+ m && n.set(m.tableId, { table: p.table });
42850
42850
  }
42851
42851
  l.pop();
42852
42852
  }
42853
- p.setIndexRange(g - e.length + 1, g), p.addBlocks(c), c.length = 0, e = "", d.length > 0 ? o.push(p) : i.push(p);
42853
+ f.setIndexRange(g - e.length + 1, g), f.addBlocks(c), c.length = 0, e = "", d.length > 0 ? o.push(f) : i.push(f);
42854
42854
  } else if (h === J.SECTION_BREAK) {
42855
- const p = N2.create(V1.SECTION_BREAK), f = d.length > 0 ? o : i;
42856
- Q3(p, f);
42857
- const m = f[f.length - 1];
42855
+ const f = T2.create(G1.SECTION_BREAK), p = d.length > 0 ? o : i;
42856
+ if (p.length === 0) {
42857
+ const v = T2.create(G1.PARAGRAPH, "");
42858
+ v.setIndexRange(g, g - 1), p.push(v);
42859
+ }
42860
+ Q3(f, p);
42861
+ const m = p[p.length - 1];
42858
42862
  if (m && m.content && (m.content += J.SECTION_BREAK), d.length > 0) {
42859
42863
  const v = d[d.length - 1];
42860
- Q3(v, [p], V1.TABLE_CELL);
42864
+ Q3(v, [f], G1.TABLE_CELL);
42861
42865
  } else
42862
- s.push(p);
42863
- f.length = 0;
42866
+ s.push(f);
42867
+ p.length = 0;
42864
42868
  } else if (h === J.TABLE_START) {
42865
- const p = N2.create(V1.TABLE);
42869
+ const f = T2.create(G1.TABLE);
42866
42870
  l.push({
42867
- table: p,
42871
+ table: f,
42868
42872
  isFinished: !1
42869
42873
  });
42870
42874
  } else if (h === J.TABLE_ROW_START) {
42871
- const p = N2.create(V1.TABLE_ROW);
42872
- u.push(p);
42875
+ const f = T2.create(G1.TABLE_ROW);
42876
+ u.push(f);
42873
42877
  } else if (h === J.TABLE_CELL_START) {
42874
- const p = N2.create(V1.TABLE_CELL);
42875
- d.push(p);
42878
+ const f = T2.create(G1.TABLE_CELL);
42879
+ d.push(f);
42876
42880
  } else if (h === J.TABLE_END) {
42877
- const p = l[l.length - 1];
42878
- p.isFinished = !0, e = "";
42881
+ const f = l[l.length - 1];
42882
+ f.isFinished = !0, e = "";
42879
42883
  } else if (h === J.TABLE_ROW_END) {
42880
- const p = u.pop(), f = l[l.length - 1];
42881
- Q3(f.table, [p], V1.TABLE);
42884
+ const f = u.pop(), p = l[l.length - 1];
42885
+ Q3(p.table, [f], G1.TABLE);
42882
42886
  } else if (h === J.TABLE_CELL_END) {
42883
- const p = d.pop(), f = u[u.length - 1];
42884
- Q3(f, [p], V1.TABLE_ROW);
42887
+ const f = d.pop(), p = u[u.length - 1];
42888
+ Q3(p, [f], G1.TABLE_ROW);
42885
42889
  } else h === J.CUSTOM_BLOCK && c.push(g), e += h;
42886
42890
  }
42887
42891
  return { sectionList: s, tableNodeCache: n };
@@ -43094,7 +43098,7 @@ function n0(r, t) {
43094
43098
  function jy(r, t, e) {
43095
43099
  return F0(e2.WORD, r, t, e);
43096
43100
  }
43097
- function P2(r, t, e, a) {
43101
+ function N2(r, t, e, a) {
43098
43102
  return F0(e2.LETTER, r, t, e, a);
43099
43103
  }
43100
43104
  function q6(r, t) {
@@ -43182,24 +43186,24 @@ function F0(r, t, e, a, s) {
43182
43186
  t === J.PARAGRAPH && (c = J.PARAGRAPH);
43183
43187
  let g = null, h = 0;
43184
43188
  s && s.boundingBox && s.font ? g = S1.getBBoxFromGlyphInfo(s, n) : g = S1.getTextSize(t, n);
43185
- const { width: p = 0 } = g;
43186
- let f = a != null ? a : p;
43187
- if (ct(l, u) && (f = p + (x0(t) ? o : o / 2), l === U1.SNAP_TO_CHARS && (h = (f - p) / 2)), s && s.kerning !== 0 && s.font) {
43189
+ const { width: f = 0 } = g;
43190
+ let p = a != null ? a : f;
43191
+ if (ct(l, u) && (p = f + (x0(t) ? o : o / 2), l === U1.SNAP_TO_CHARS && (h = (p - f) / 2)), s && s.kerning !== 0 && s.font) {
43188
43192
  const m = c3(n.fontSize) / s.font.unitsPerEm, v = s.kerning * m;
43189
- f += v, h += v;
43193
+ p += v, h += v;
43190
43194
  }
43191
43195
  return {
43192
43196
  content: t,
43193
43197
  ts: i,
43194
43198
  fontStyle: n,
43195
- width: f,
43199
+ width: p,
43196
43200
  bBox: g,
43197
43201
  xOffset: h,
43198
43202
  left: 0,
43199
43203
  glyphType: r,
43200
43204
  streamType: c,
43201
43205
  isJustifiable: et(t),
43202
- adjustability: n0(t, f),
43206
+ adjustability: n0(t, p),
43203
43207
  count: t.length,
43204
43208
  raw: t
43205
43209
  };
@@ -43270,13 +43274,13 @@ function Ey(r, t, e, a, s = 0, n = !1, i, o, l, u) {
43270
43274
  lineTop: c = 0,
43271
43275
  contentHeight: g = 0,
43272
43276
  paddingLeft: h = 0,
43273
- paddingRight: p = 0,
43274
- paddingTop: f = 0,
43277
+ paddingRight: f = 0,
43278
+ paddingTop: p = 0,
43275
43279
  paddingBottom: m = 0,
43276
43280
  marginTop: v = 0,
43277
43281
  spaceBelowApply: y = 0
43278
43282
  } = e, { skeTablesInParagraph: z } = i, _ = (T = o.skeDrawings) != null ? T : /* @__PURE__ */ new Map(), j = (M = o.skeTables) != null ? M : /* @__PURE__ */ new Map(), w = l == null ? void 0 : l.skeDrawings, C = u == null ? void 0 : u.skeDrawings, x = Oy(t, r);
43279
- if (x.lineIndex = s, x.paragraphStart = n, x.contentHeight = g, x.top = c, x.lineHeight = d, x.paddingTop = f, x.paddingBottom = m, x.marginTop = v, x.spaceBelowApply = y, n && Array.isArray(z) && z.length > 0) {
43283
+ if (x.lineIndex = s, x.paragraphStart = n, x.contentHeight = g, x.top = c, x.lineHeight = d, x.paddingTop = p, x.paddingBottom = m, x.marginTop = v, x.spaceBelowApply = y, n && Array.isArray(z) && z.length > 0) {
43280
43284
  const B = z[z.length - 1].tableId;
43281
43285
  x.isBehindTable = !0, x.tableId = B;
43282
43286
  }
@@ -43286,7 +43290,7 @@ function Ey(r, t, e, a, s = 0, n = !1, i, o, l, u) {
43286
43290
  c,
43287
43291
  a,
43288
43292
  h,
43289
- p,
43293
+ f,
43290
43294
  o,
43291
43295
  l,
43292
43296
  u,
@@ -43326,8 +43330,8 @@ function X0(r, t, e) {
43326
43330
  if (u !== Z1.WRAP_TOP_AND_BOTTOM)
43327
43331
  return;
43328
43332
  if (o === 0) {
43329
- const p = a - d, f = d + s + c;
43330
- return p + f < e || p > t + e ? void 0 : p + f;
43333
+ const f = a - d, p = d + s + c;
43334
+ return f + p < e || f > t + e ? void 0 : f + p;
43331
43335
  }
43332
43336
  let { top: g = 0, height: h = 0 } = S0(o, n, i, a, s);
43333
43337
  if (g -= d, h += c, !(g + h < e || g > t + e))
@@ -43345,16 +43349,16 @@ function Ty(r, t, e, a, s, n, i, o, l, u, d, c) {
43345
43349
  width: s
43346
43350
  }
43347
43351
  ), i && u && u.forEach((h) => {
43348
- const p = i0(h, i, n, !0), f = V0(p, r, t, e);
43349
- f && g.push(f);
43352
+ const f = i0(h, i, n, !0), p = V0(f, r, t, e);
43353
+ p && g.push(p);
43350
43354
  }), o && d && d.forEach((h) => {
43351
- const p = i0(h, o, n, !1), f = V0(p, r, t, e);
43352
- f && g.push(f);
43353
- }), l == null || l.forEach((h) => {
43354
- const p = V0(h, r, t, e);
43355
+ const f = i0(h, o, n, !1), p = V0(f, r, t, e);
43355
43356
  p && g.push(p);
43357
+ }), l == null || l.forEach((h) => {
43358
+ const f = V0(h, r, t, e);
43359
+ f && g.push(f);
43356
43360
  }), c && c.size > 0 && c.forEach((h) => {
43357
- const { left: p, top: f, width: m, height: v, tableSource: y } = h, { dist: z } = y, _ = b4(f, v, p, m, t, r, e, z);
43361
+ const { left: f, top: p, width: m, height: v, tableSource: y } = h, { dist: z } = y, _ = b4(p, v, f, m, t, r, e, z);
43358
43362
  _ && g.push(_);
43359
43363
  }), My(e, g);
43360
43364
  }
@@ -43391,9 +43395,9 @@ function V0(r, t, e, a) {
43391
43395
  }
43392
43396
  return X6(_, e, t, a);
43393
43397
  }
43394
- const { distL: c = 0, distT: g = 0, distB: h = 0, distR: p = 0, wrapText: f } = u, m = { distL: c, distT: g, distB: h, distR: p };
43398
+ const { distL: c = 0, distT: g = 0, distB: h = 0, distR: f = 0, wrapText: p } = u, m = { distL: c, distT: g, distB: h, distR: f };
43395
43399
  if (l === 0)
43396
- return b4(s, n, i, o, e, t, a, m, d, f);
43400
+ return b4(s, n, i, o, e, t, a, m, d, p);
43397
43401
  const v = S0(l, i, o, s, n);
43398
43402
  if (d === Z1.WRAP_SQUARE) {
43399
43403
  const { left: y, width: z, top: _, height: j } = v;
@@ -43407,7 +43411,7 @@ function V0(r, t, e, a) {
43407
43411
  a,
43408
43412
  m,
43409
43413
  d,
43410
- f
43414
+ p
43411
43415
  );
43412
43416
  }
43413
43417
  return X6(v.points, e, t, a);
@@ -43454,8 +43458,8 @@ function b4(r, t, e, a, s, n, i, o, l = Z1.WRAP_SQUARE, u = We.BOTH_SIDES) {
43454
43458
  distR: c = 0,
43455
43459
  distT: g = 0,
43456
43460
  distB: h = 0
43457
- } = o, p = r - (l === Z1.WRAP_SQUARE ? g : 0), f = t + (l === Z1.WRAP_SQUARE ? h + g : 0);
43458
- if (p + f <= s || p >= n + s)
43461
+ } = o, f = r - (l === Z1.WRAP_SQUARE ? g : 0), p = t + (l === Z1.WRAP_SQUARE ? h + g : 0);
43462
+ if (f + p <= s || f >= n + s)
43459
43463
  return;
43460
43464
  let m = e - d, v = a + d + c;
43461
43465
  const y = Ry(u, m, v, i);
@@ -43601,8 +43605,8 @@ function K0(r, t, e, a) {
43601
43605
  };
43602
43606
  }
43603
43607
  function Ly(r, t, e, a, s) {
43604
- var f;
43605
- const { startIndex: n, endIndex: i, children: o } = a, l = (f = e.getTableByStartIndex(n)) == null ? void 0 : f.tableSource;
43608
+ var p;
43609
+ const { startIndex: n, endIndex: i, children: o } = a, l = (p = e.getTableByStartIndex(n)) == null ? void 0 : p.tableSource;
43606
43610
  if (l == null)
43607
43611
  return console.warn("Table not found when creating table skeleton"), null;
43608
43612
  const u = e6(n, i, l);
@@ -43649,8 +43653,8 @@ function Ly(r, t, e, a, s) {
43649
43653
  C.height = T, C.top = d, d += T, c = Math.max(c, F);
43650
43654
  }
43651
43655
  u.width = c, u.height = d;
43652
- const { pageWidth: g, marginLeft: h = 0, marginRight: p = 0 } = t;
43653
- return u.left = it(g - h - p, c, l.align, l.indent), u;
43656
+ const { pageWidth: g, marginLeft: h = 0, marginRight: f = 0 } = t;
43657
+ return u.left = it(g - h - f, c, l.align, l.indent), u;
43654
43658
  }
43655
43659
  function Py(r, t) {
43656
43660
  const { startIndex: e, endIndex: a } = t;
@@ -43661,8 +43665,8 @@ function Py(r, t) {
43661
43665
  }
43662
43666
  }
43663
43667
  function Ny(r, t, e, a, s, n) {
43664
- var f;
43665
- const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (f = e.getTableByStartIndex(o)) == null ? void 0 : f.tableSource;
43668
+ var p;
43669
+ const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (p = e.getTableByStartIndex(o)) == null ? void 0 : p.tableSource;
43666
43670
  if (d == null)
43667
43671
  return console.warn("Table not found when creating table skeletons"), {
43668
43672
  skeTables: i,
@@ -43691,10 +43695,10 @@ function Ny(r, t, e, a, s, n) {
43691
43695
  );
43692
43696
  }
43693
43697
  $y(h, t, i, d);
43694
- const p = i[0].height <= n;
43698
+ const f = i[0].height <= n;
43695
43699
  return {
43696
43700
  skeTables: i,
43697
- fromCurrentPage: p
43701
+ fromCurrentPage: f
43698
43702
  };
43699
43703
  }
43700
43704
  function $y(r, t, e, a) {
@@ -43712,7 +43716,7 @@ function Me(r, t, e) {
43712
43716
  return e && (i -= t.repeatRowHeight), i;
43713
43717
  }
43714
43718
  function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43715
- const d = Me(t, l, !1), c = Me(t, l, !0), { children: g, startIndex: h, endIndex: p } = n, f = o.tableRows[i], { trHeight: m, cantSplit: v } = f, y = [], { hRule: z, val: _ } = m, j = v === t1.TRUE && m.hRule === ne.AUTO, w = 72, C = l.remainHeight <= w;
43719
+ const d = Me(t, l, !1), c = Me(t, l, !0), { children: g, startIndex: h, endIndex: f } = n, p = o.tableRows[i], { trHeight: m, cantSplit: v } = p, y = [], { hRule: z, val: _ } = m, j = v === t1.TRUE && m.hRule === ne.AUTO, w = 72, C = l.remainHeight <= w;
43716
43720
  let x = K6(e);
43717
43721
  const S = [0];
43718
43722
  for (const F of g) {
@@ -43728,7 +43732,7 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43728
43732
  d
43729
43733
  );
43730
43734
  for (; y.length < M.length; ) {
43731
- const B = ot(h, p, i, f, u), A = g.length;
43735
+ const B = ot(h, f, i, p, u), A = g.length;
43732
43736
  B.cells = [...new Array(A)].map((L, I) => {
43733
43737
  const O = vt(
43734
43738
  r,
@@ -43757,10 +43761,10 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43757
43761
  }
43758
43762
  i === 0 && l.repeatRow && (l.repeatRowHeight = S[S.length - 1]);
43759
43763
  for (const F of y)
43760
- Uy(F, f);
43764
+ Uy(F, p);
43761
43765
  for (; y.length > 0; ) {
43762
43766
  const F = y.shift(), T = x.rows[x.rows.length - 1];
43763
- (l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = Me(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, x.rows.length > 0 && (x = e6(h, p, o), e.push(x), l.repeatRow && u === !1 && i !== 0 && F.index !== T.index && (l.remainHeight = Me(t, l, !1), nt(
43767
+ (l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = Me(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, x.rows.length > 0 && (x = e6(h, f, o), e.push(x), l.repeatRow && u === !1 && i !== 0 && F.index !== T.index && (l.remainHeight = Me(t, l, !1), nt(
43764
43768
  r,
43765
43769
  t,
43766
43770
  e,
@@ -43854,12 +43858,12 @@ function QB(r) {
43854
43858
  function Gy(r, t, e, a, s, n, i = L1.Normal) {
43855
43859
  if (n)
43856
43860
  if (s.bulletSkeleton) {
43857
- const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = U1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = l0(d, c, u, g), p = Cy(t[0], o, h), f = o.paragraphProperties || {};
43858
- s.paragraphStyle = Cz(s.paragraphStyle, { ...f, hanging: { v: p.width } }), he(r, [p, ...t], e, a, s, n, i);
43861
+ const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = U1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = l0(d, c, u, g), f = Cy(t[0], o, h), p = o.paragraphProperties || {};
43862
+ s.paragraphStyle = Cz(s.paragraphStyle, { ...p, hanging: { v: f.width } }), he(r, [f, ...t], e, a, s, n, i);
43859
43863
  } else
43860
43864
  he(r, t, e, a, s, n, i);
43861
43865
  else
43862
- L2(r, t, e, a, s, n, i);
43866
+ P2(r, t, e, a, s, n, i);
43863
43867
  return [...e];
43864
43868
  }
43865
43869
  function qy(r) {
@@ -43907,11 +43911,11 @@ function Xy(r) {
43907
43911
  t.unshift(e), e = r.glyphGroup.pop();
43908
43912
  return r.glyphGroup.length === 0 && (r.glyphGroup.push(...t), t.length = 0), t;
43909
43913
  }
43910
- function L2(r, t, e, a, s, n, i = L1.Normal, o) {
43914
+ function P2(r, t, e, a, s, n, i = L1.Normal, o) {
43911
43915
  var d;
43912
43916
  const l = $3(e), u = cz(l);
43913
43917
  if (u) {
43914
- const c = J6(t), { divide: g, isLast: h } = u, p = (d = g == null ? void 0 : g.glyphGroup) == null ? void 0 : d[g.glyphGroup.length - 1], f = (p == null ? void 0 : p.width) || 0, m = (p == null ? void 0 : p.left) || 0, v = f + m, { hyphenationZone: y } = a;
43918
+ const c = J6(t), { divide: g, isLast: h } = u, f = (d = g == null ? void 0 : g.glyphGroup) == null ? void 0 : d[g.glyphGroup.length - 1], p = (f == null ? void 0 : f.width) || 0, m = (f == null ? void 0 : f.left) || 0, v = p + m, { hyphenationZone: y } = a;
43915
43919
  if (v + c > g.width) {
43916
43920
  Re(g, {
43917
43921
  isFull: !0
@@ -43931,7 +43935,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
43931
43935
  j.length > 1 && t.unshift(j.pop());
43932
43936
  break;
43933
43937
  }
43934
- j.length > 0 && Ae(g, j, v), t.length && L2(
43938
+ j.length > 0 && Ae(g, j, v), t.length && P2(
43935
43939
  r,
43936
43940
  t,
43937
43941
  e,
@@ -43945,7 +43949,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
43945
43949
  const j = Xy(g);
43946
43950
  j.length > 0 && (Re(g, {
43947
43951
  breakType: L1.Normal
43948
- }), L2(r, j, e, a, s, n, L1.Hyphen)), L2(
43952
+ }), P2(r, j, e, a, s, n, L1.Hyphen)), P2(
43949
43953
  r,
43950
43954
  t,
43951
43955
  e,
@@ -43956,7 +43960,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
43956
43960
  o
43957
43961
  );
43958
43962
  } else
43959
- L2(
43963
+ P2(
43960
43964
  r,
43961
43965
  t,
43962
43966
  e,
@@ -43972,7 +43976,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
43972
43976
  )
43973
43977
  Re(g, {
43974
43978
  isFull: !0
43975
- }), L2(
43979
+ }), P2(
43976
43980
  r,
43977
43981
  t,
43978
43982
  e,
@@ -44010,7 +44014,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
44010
44014
  T + M
44011
44015
  );
44012
44016
  for (let H = P; H < L.length; H++)
44013
- L2(
44017
+ P2(
44014
44018
  r,
44015
44019
  [L[H]],
44016
44020
  e,
@@ -44018,7 +44022,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
44018
44022
  s,
44019
44023
  n
44020
44024
  );
44021
- L2(r, t, e, a, s, n, i);
44025
+ P2(r, t, e, a, s, n, i);
44022
44026
  return;
44023
44027
  }
44024
44028
  }
@@ -44036,18 +44040,18 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44036
44040
  console.error("The column width is less than 0, need to adjust page width to make it great than 0");
44037
44041
  return;
44038
44042
  }
44039
- const c = gz(d), g = Math.max(...t.map((F1) => F1.bBox.ba)), h = Math.max(...t.map((F1) => F1.bBox.bd)), p = o || g + h, {
44040
- paragraphStyle: f = {},
44043
+ const c = gz(d), g = Math.max(...t.map((F1) => F1.bBox.ba)), h = Math.max(...t.map((F1) => F1.bBox.bd)), f = o || g + h, {
44044
+ paragraphStyle: p = {},
44041
44045
  paragraphNonInlineSkeDrawings: m,
44042
44046
  skeTablesInParagraph: v,
44043
44047
  skeHeaders: y,
44044
44048
  skeFooters: z,
44045
44049
  pDrawingAnchor: _,
44046
44050
  paragraphIndex: j
44047
- } = s, { namedStyleType: w } = f, C = w !== void 0 ? H8[w] : null, x = {
44048
- ...f,
44049
- spaceAbove: (n3 = f.spaceAbove) != null ? n3 : C == null ? void 0 : C.spaceAbove,
44050
- spaceBelow: (H2 = f.spaceBelow) != null ? H2 : C == null ? void 0 : C.spaceBelow
44051
+ } = s, { namedStyleType: w } = p, C = w !== void 0 ? H8[w] : null, x = {
44052
+ ...p,
44053
+ spaceAbove: (n3 = p.spaceAbove) != null ? n3 : C == null ? void 0 : C.spaceAbove,
44054
+ spaceBelow: (H2 = p.spaceBelow) != null ? H2 : C == null ? void 0 : C.spaceBelow
44051
44055
  }, {
44052
44056
  // direction,
44053
44057
  spaceAbove: S,
@@ -44067,7 +44071,7 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44067
44071
  a,
44068
44072
  s
44069
44073
  ), { paddingTop: H, paddingBottom: K, contentHeight: Q, lineSpacingApply: h1 } = gt(
44070
- p,
44074
+ f,
44071
44075
  L,
44072
44076
  I,
44073
44077
  $,
@@ -44084,8 +44088,8 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44084
44088
  ), l1 = g1 + H + Q + K;
44085
44089
  let k1 = d.parent;
44086
44090
  k1 || (k1 = T0(l));
44087
- const f1 = (c == null ? void 0 : c.lineHeight) || 0, j1 = (c == null ? void 0 : c.top) || 0, p1 = f1 + j1, { pageWidth: w1, headerId: H1, footerId: z1, segmentId: E1 } = l, P1 = (E3 = y == null ? void 0 : y.get(H1)) == null ? void 0 : E3.get(w1), G1 = (X3 = z == null ? void 0 : z.get(z1)) == null ? void 0 : X3.get(w1);
44088
- let O2 = !1;
44091
+ const f1 = (c == null ? void 0 : c.lineHeight) || 0, j1 = (c == null ? void 0 : c.top) || 0, p1 = f1 + j1, { pageWidth: w1, headerId: H1, footerId: z1, segmentId: E1 } = l, P1 = (E3 = y == null ? void 0 : y.get(H1)) == null ? void 0 : E3.get(w1), q1 = (X3 = z == null ? void 0 : z.get(z1)) == null ? void 0 : X3.get(w1);
44092
+ let I2 = !1;
44089
44093
  if (c) {
44090
44094
  const F1 = Jy(c);
44091
44095
  if (F1.length > 0) {
@@ -44097,15 +44101,15 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44097
44101
  const F1 = [...m.values()].filter((C2) => C2.drawingOrigin.docTransform.positionV.relativeFrom !== y1.LINE);
44098
44102
  Z6(r, p1, l1, d, F1, s.paragraphIndex, n, (K3 = _ == null ? void 0 : _.get(j)) == null ? void 0 : K3.top);
44099
44103
  }
44100
- v != null && v.length > 0 && (O2 = Zy(r, p1, l1, l, d, k1, v, s.paragraphIndex, a, (u2 = _ == null ? void 0 : _.get(j)) == null ? void 0 : u2.top));
44101
- const I2 = Fy(
44104
+ v != null && v.length > 0 && (I2 = Zy(r, p1, l1, l, d, k1, v, s.paragraphIndex, a, (u2 = _ == null ? void 0 : _.get(j)) == null ? void 0 : u2.top));
44105
+ const L2 = Fy(
44102
44106
  l1,
44103
44107
  p1,
44104
44108
  l,
44105
44109
  P1,
44106
- G1
44110
+ q1
44107
44111
  );
44108
- if (l1 + I2 > k1.height && d.lines.length > 0 && l.sections.length > 0 || O2) {
44112
+ if (l1 + L2 > k1.height && d.lines.length > 0 && l.sections.length > 0 || I2) {
44109
44113
  if (st(d, !0), ut(
44110
44114
  r,
44111
44115
  t,
@@ -44120,7 +44124,7 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44120
44124
  l.skeDrawings.has(F1.drawingId) && l.skeDrawings.delete(F1.drawingId), r.floatObjectsCache.has(F1.drawingId) && (r.floatObjectsCache.delete(F1.drawingId), r.isDirty = !1, r.layoutStartPointer[E1] = null);
44121
44125
  return;
44122
44126
  }
44123
- const q1 = c ? c.lineIndex + 1 : 0, { charSpace: n2, defaultTabStop: t2 } = kz(a, s), R1 = l0(n2, t2, $, N);
44127
+ const W1 = c ? c.lineIndex + 1 : 0, { charSpace: n2, defaultTabStop: t2 } = kz(a, s), R1 = l0(n2, t2, $, N);
44124
44128
  let { paddingLeft: N1, paddingRight: i2 } = ez(
44125
44129
  T,
44126
44130
  M,
@@ -44139,7 +44143,7 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44139
44143
  {
44140
44144
  lineHeight: l1,
44141
44145
  contentHeight: Q,
44142
- lineTop: I2,
44146
+ lineTop: L2,
44143
44147
  paddingLeft: N1,
44144
44148
  paddingRight: i2,
44145
44149
  paddingTop: H,
@@ -44148,14 +44152,14 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
44148
44152
  spaceBelowApply: n1
44149
44153
  },
44150
44154
  d.width,
44151
- q1,
44155
+ W1,
44152
44156
  n,
44153
44157
  s,
44154
44158
  l,
44155
44159
  P1,
44156
- G1
44160
+ q1
44157
44161
  );
44158
- d.lines.push(o2), o2.parent = d, Iy(j, o2, p1, _), L2(
44162
+ d.lines.push(o2), o2.parent = d, Iy(j, o2, p1, _), P2(
44159
44163
  r,
44160
44164
  t,
44161
44165
  e,
@@ -44183,12 +44187,12 @@ function Z6(r, t, e, a, s, n, i, o) {
44183
44187
  const c = d.drawingOrigin.layoutType;
44184
44188
  return c !== Z1.INLINE && c !== Z1.WRAP_NONE;
44185
44189
  }).map((d) => {
44186
- const { drawingOrigin: c, drawingId: g, aTop: h, aLeft: p, width: f, height: m, angle: v } = d, y = c.docTransform.positionV;
44190
+ const { drawingOrigin: c, drawingId: g, aTop: h, aLeft: f, width: p, height: m, angle: v } = d, y = c.docTransform.positionV;
44187
44191
  return {
44188
44192
  id: g,
44189
44193
  top: h,
44190
- left: p,
44191
- width: f,
44194
+ left: f,
44195
+ width: p,
44192
44196
  height: m,
44193
44197
  angle: v,
44194
44198
  type: a6.IMAGE,
@@ -44204,7 +44208,7 @@ function Vy(r, t, e, a, s, n, i) {
44204
44208
  const o = Ky(t, s, e, a, i);
44205
44209
  if (o == null)
44206
44210
  return;
44207
- const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o, p = {
44211
+ const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o, f = {
44208
44212
  id: l,
44209
44213
  top: h,
44210
44214
  left: g,
@@ -44214,14 +44218,14 @@ function Vy(r, t, e, a, s, n, i) {
44214
44218
  type: a6.TABLE,
44215
44219
  positionV: c.position.positionV
44216
44220
  };
44217
- lt(r, [p], s, n), t.top = h, t.left = g;
44221
+ lt(r, [f], s, n), t.top = h, t.left = g;
44218
44222
  }
44219
44223
  function Ky(r, t, e, a, s) {
44220
- var p, f, m;
44221
- const n = (p = t.parent) == null ? void 0 : p.parent;
44224
+ var f, p, m;
44225
+ const n = (f = t.parent) == null ? void 0 : f.parent;
44222
44226
  if (n == null)
44223
44227
  return;
44224
- const i = t6(t), { tableSource: o, width: l, height: u } = r, { positionH: d, positionV: c } = o.position, g = (f = kt(d, t, n, l, i)) != null ? f : 0, h = (m = mt(
44228
+ const i = t6(t), { tableSource: o, width: l, height: u } = r, { positionH: d, positionV: c } = o.position, g = (p = kt(d, t, n, l, i)) != null ? p : 0, h = (m = mt(
44225
44229
  c,
44226
44230
  n,
44227
44231
  e,
@@ -44260,10 +44264,10 @@ function Zy(r, t, e, a, s, n, i, o, l, u) {
44260
44264
  default:
44261
44265
  throw new Error(`Unsupported table text wrap type: ${h.textWrap}`);
44262
44266
  }
44263
- const { top: p, left: f, height: m } = g;
44264
- if (!r.isDirty && p + m > n.height && d.isSlideTable === !1) {
44267
+ const { top: f, left: p, height: m } = g;
44268
+ if (!r.isDirty && f + m > n.height && d.isSlideTable === !1) {
44265
44269
  i.pop();
44266
- const v = n.height - p, { segmentId: y } = a, z = r.viewModel.getSelfOrHeaderFooterViewModel(y), _ = d.tableNode;
44270
+ const v = n.height - f, { segmentId: y } = a, z = r.viewModel.getSelfOrHeaderFooterViewModel(y), _ = d.tableNode;
44267
44271
  Py(r.skeletonResourceReference.skeListLevel, _);
44268
44272
  const {
44269
44273
  fromCurrentPage: j,
@@ -44277,7 +44281,7 @@ function Zy(r, t, e, a, s, n, i, o, l, u) {
44277
44281
  v
44278
44282
  );
44279
44283
  if (w.forEach((C, x) => {
44280
- C.top = x === 0 && j ? p : 0, C.left = f;
44284
+ C.top = x === 0 && j ? f : 0, C.left = p;
44281
44285
  }), j) {
44282
44286
  const C = w.shift();
44283
44287
  a.skeTables.set(C.tableId, C), C.parent = a, i.push({
@@ -44312,22 +44316,22 @@ function lt(r, t, e, a) {
44312
44316
  return;
44313
44317
  let n = !1;
44314
44318
  for (const h of t) {
44315
- const p = r.floatObjectsCache.get(h.id);
44316
- if (p == null || p.page.segmentId !== s.segmentId)
44319
+ const f = r.floatObjectsCache.get(h.id);
44320
+ if (f == null || f.page.segmentId !== s.segmentId)
44317
44321
  continue;
44318
- const f = (u = (l = (o = p.page.sections[0]) == null ? void 0 : o.columns[0]) == null ? void 0 : l.lines[0]) == null ? void 0 : u.paragraphIndex, m = (g = (c = (d = s.sections[0]) == null ? void 0 : d.columns[0]) == null ? void 0 : c.lines[0]) == null ? void 0 : g.paragraphIndex;
44319
- p.page && f && m && f !== m && (p.page.skeDrawings.delete(h.id), r.floatObjectsCache.delete(h.id), d0([p.page], (v) => {
44322
+ const p = (u = (l = (o = f.page.sections[0]) == null ? void 0 : o.columns[0]) == null ? void 0 : l.lines[0]) == null ? void 0 : u.paragraphIndex, m = (g = (c = (d = s.sections[0]) == null ? void 0 : d.columns[0]) == null ? void 0 : c.lines[0]) == null ? void 0 : g.paragraphIndex;
44323
+ f.page && p && m && p !== m && (f.page.skeDrawings.delete(h.id), r.floatObjectsCache.delete(h.id), d0([f.page], (v) => {
44320
44324
  var x;
44321
44325
  const { lineHeight: y, top: z } = v, _ = v.parent;
44322
44326
  if (n || _ == null)
44323
44327
  return;
44324
44328
  const { width: j, left: w } = _;
44325
- Y6(p.floatObject, y, z, w, j) && (n = !0, r.isDirty = !0, r.layoutStartPointer[p.page.segmentId] = Math.min(v.paragraphIndex, (x = r.layoutStartPointer[p.page.segmentId]) != null ? x : Number.POSITIVE_INFINITY), r.paragraphsOpenNewPage.add(a));
44329
+ Y6(f.floatObject, y, z, w, j) && (n = !0, r.isDirty = !0, r.layoutStartPointer[f.page.segmentId] = Math.min(v.paragraphIndex, (x = r.layoutStartPointer[f.page.segmentId]) != null ? x : Number.POSITIVE_INFINITY), r.paragraphsOpenNewPage.add(a));
44326
44330
  }));
44327
44331
  }
44328
44332
  n = !1, d0([s], (h) => {
44329
44333
  var y, z;
44330
- const { lineHeight: p, top: f } = h, { width: m, left: v } = e;
44334
+ const { lineHeight: f, top: p } = h, { width: m, left: v } = e;
44331
44335
  if (!n)
44332
44336
  for (const _ of t.values()) {
44333
44337
  let j = _;
@@ -44340,7 +44344,7 @@ function lt(r, t, e, a) {
44340
44344
  else
44341
44345
  continue;
44342
44346
  }
44343
- if (Y6(j, p, f, v, m)) {
44347
+ if (Y6(j, f, p, v, m)) {
44344
44348
  n = !0, r.isDirty = !0, r.layoutStartPointer[s.segmentId] = Math.min(h.paragraphIndex, (z = r.layoutStartPointer[s.segmentId]) != null ? z : Number.POSITIVE_INFINITY);
44345
44349
  let C = r.floatObjectsCache.get(_.id);
44346
44350
  C == null && (C = {
@@ -44430,16 +44434,16 @@ function az(r, t, e) {
44430
44434
  return;
44431
44435
  const n = t6(a), i = /* @__PURE__ */ new Map(), { top: o, lineHeight: l, marginBottom: u = 0 } = r;
44432
44436
  for (const h of r.divides)
44433
- for (const p of h.glyphGroup)
44434
- if (p.streamType === J.CUSTOM_BLOCK && p.width !== 0) {
44435
- const { drawingId: f } = p;
44436
- if (f == null)
44437
+ for (const f of h.glyphGroup)
44438
+ if (f.streamType === J.CUSTOM_BLOCK && f.width !== 0) {
44439
+ const { drawingId: p } = f;
44440
+ if (p == null)
44437
44441
  continue;
44438
- const m = t == null ? void 0 : t.get(f), v = m == null ? void 0 : m.drawingOrigin;
44442
+ const m = t == null ? void 0 : t.get(p), v = m == null ? void 0 : m.drawingOrigin;
44439
44443
  if (v == null || m == null)
44440
44444
  continue;
44441
- const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, C = p.bBox.bd + p.bBox.ba;
44442
- m.aLeft = h.left + h.paddingLeft + p.left + 0.5 * p.width - 0.5 * j || 0, m.aTop = o + l - 0.5 * C - 0.5 * w - u, m.width = j, m.height = w, m.angle = _, m.isPageBreak = n, m.lineTop = o, m.columnLeft = a.left, m.blockAnchorTop = e != null ? e : o, m.lineHeight = r.lineHeight, i.set(m.drawingId, m);
44445
+ const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, C = f.bBox.bd + f.bBox.ba;
44446
+ m.aLeft = h.left + h.paddingLeft + f.left + 0.5 * f.width - 0.5 * j || 0, m.aTop = o + l - 0.5 * C - 0.5 * w - u, m.width = j, m.height = w, m.angle = _, m.isPageBreak = n, m.lineTop = o, m.columnLeft = a.left, m.blockAnchorTop = e != null ? e : o, m.lineHeight = r.lineHeight, i.set(m.drawingId, m);
44443
44447
  }
44444
44448
  const d = new Map([...s.skeDrawings, ...i]);
44445
44449
  s.skeDrawings = d;
@@ -44455,8 +44459,8 @@ function rz(r, t, e, a, s, n = []) {
44455
44459
  const { drawingOrigin: h } = g;
44456
44460
  if (!h)
44457
44461
  continue;
44458
- const { docTransform: p } = h, { positionH: f, positionV: m, size: v, angle: y } = p, { width: z = 0, height: _ = 0 } = v;
44459
- g.aLeft = (d = kt(f, e, i, z, l)) != null ? d : 0, g.aTop = (c = mt(
44462
+ const { docTransform: f } = h, { positionH: p, positionV: m, size: v, angle: y } = f, { width: z = 0, height: _ = 0 } = v;
44463
+ g.aLeft = (d = kt(p, e, i, z, l)) != null ? d : 0, g.aTop = (c = mt(
44460
44464
  m,
44461
44465
  i,
44462
44466
  r,
@@ -44637,7 +44641,7 @@ function u0(r, t = -1) {
44637
44641
  let o = i, l = Number.NEGATIVE_INFINITY, u = 0;
44638
44642
  for (const d of s) {
44639
44643
  const { columns: c } = d, g = o;
44640
- let h = g, p = Number.NEGATIVE_INFINITY, f = 0;
44644
+ let h = g, f = Number.NEGATIVE_INFINITY, p = 0;
44641
44645
  for (const m of c) {
44642
44646
  const { lines: v } = m, y = h;
44643
44647
  let z = y, _ = 0, j = Number.NEGATIVE_INFINITY;
@@ -44665,9 +44669,9 @@ function u0(r, t = -1) {
44665
44669
  }
44666
44670
  w.st = P ? M + 1 : M, w.ed = B >= w.st ? B : w.st, w.width = A, w.asc = L, w.dsc = I, j = Math.max(j, A), z = w.ed;
44667
44671
  }
44668
- m.st = y + 1, m.ed = z >= m.st ? z : m.st, m.height = _, m.width = j, f += j, p = Math.max(p, m.height), h = m.ed;
44672
+ m.st = y + 1, m.ed = z >= m.st ? z : m.st, m.height = _, m.width = j, p += j, f = Math.max(f, m.height), h = m.ed;
44669
44673
  }
44670
- d.st = g + 1, d.ed = h >= d.st ? h : d.st, d.height = p, u += p, l = Math.max(l, f), o = d.ed;
44674
+ d.st = g + 1, d.ed = h >= d.st ? h : d.st, d.height = f, u += f, l = Math.max(l, p), o = d.ed;
44671
44675
  }
44672
44676
  for (const d of n.values()) {
44673
44677
  const { ed: c } = d;
@@ -44678,12 +44682,12 @@ function u0(r, t = -1) {
44678
44682
  }
44679
44683
  function Ve(r, t) {
44680
44684
  d0(t, (e, a, s, n) => {
44681
- var c, g, h, p;
44682
- const { segmentId: i } = n, o = (c = r.paragraphConfigCache.get(i)) == null ? void 0 : c.get(e.paragraphIndex), l = o == null ? void 0 : o.paragraphInlineSkeDrawings, u = (p = (h = (g = r.skeletonResourceReference) == null ? void 0 : g.drawingAnchor) == null ? void 0 : h.get(i)) == null ? void 0 : p.get(e.paragraphIndex);
44685
+ var c, g, h, f;
44686
+ const { segmentId: i } = n, o = (c = r.paragraphConfigCache.get(i)) == null ? void 0 : c.get(e.paragraphIndex), l = o == null ? void 0 : o.paragraphInlineSkeDrawings, u = (f = (h = (g = r.skeletonResourceReference) == null ? void 0 : g.drawingAnchor) == null ? void 0 : h.get(i)) == null ? void 0 : f.get(e.paragraphIndex);
44683
44687
  l && l.size > 0 && az(e, l, u == null ? void 0 : u.top);
44684
44688
  const d = o == null ? void 0 : o.paragraphStyle;
44685
44689
  if (e.divides.length > 0) {
44686
- const f = e.divides[e.divides.length - 1], m = f.glyphGroup[f.glyphGroup.length - 1];
44690
+ const p = e.divides[e.divides.length - 1], m = p.glyphGroup[p.glyphGroup.length - 1];
44687
44691
  (m == null ? void 0 : m.streamType) === J.PARAGRAPH && (d != null && d.borderBottom) && (e.borderBottom = d.borderBottom);
44688
44692
  }
44689
44693
  });
@@ -44699,8 +44703,8 @@ function tA(r, t) {
44699
44703
  const { divides: u } = l, d = u.length;
44700
44704
  for (let c = 0; c < d; c++) {
44701
44705
  const g = u[c], { glyphGroup: h } = g;
44702
- for (const p of h)
44703
- t && H4(t) && t(p, g, l, i, s, e);
44706
+ for (const f of h)
44707
+ t && H4(t) && t(f, g, l, i, s, e);
44704
44708
  }
44705
44709
  }
44706
44710
  }
@@ -44824,7 +44828,7 @@ function Q6(r) {
44824
44828
  t += e.width;
44825
44829
  return t;
44826
44830
  }
44827
- const y4 = new Y1();
44831
+ const y4 = new X1();
44828
44832
  function pz() {
44829
44833
  y4.reset();
44830
44834
  }
@@ -44867,7 +44871,7 @@ function f3(r, t, e, a, s) {
44867
44871
  marginLeft: d = 0,
44868
44872
  // localeService,
44869
44873
  renderConfig: c = {}
44870
- } = a, { paragraphStyle: g = {}, bullet: h } = s, { isRenderStyle: p } = c, { startIndex: f } = e, m = t.getTextRun(r + f), v = p === t1.FALSE ? e5 : m != null ? m : e5, y = t.getCustomDecoration(r + f), z = y && y.show !== !1, _ = z ? lz(y) : null, j = t.getCustomRange(r + f), w = j && j.show !== !1, C = w ? uz(j) : null, x = w || z || !!h || (g == null ? void 0 : g.namedStyleType), { st: S, ed: F } = v;
44874
+ } = a, { paragraphStyle: g = {}, bullet: h } = s, { isRenderStyle: f } = c, { startIndex: p } = e, m = t.getTextRun(r + p), v = f === t1.FALSE ? e5 : m != null ? m : e5, y = t.getCustomDecoration(r + p), z = y && y.show !== !1, _ = z ? lz(y) : null, j = t.getCustomRange(r + p), w = j && j.show !== !1, C = w ? uz(j) : null, x = w || z || !!h || (g == null ? void 0 : g.namedStyleType), { st: S, ed: F } = v;
44871
44875
  let { ts: T = {} } = v;
44872
44876
  const M = y4.getValue(S, F);
44873
44877
  if (M && !x && m)
@@ -44964,8 +44968,8 @@ function wz(r, t) {
44964
44968
  pageOrient: c = N4.PORTRAIT,
44965
44969
  defaultHeaderId: g,
44966
44970
  defaultFooterId: h,
44967
- evenPageHeaderId: p,
44968
- evenPageFooterId: f,
44971
+ evenPageHeaderId: f,
44972
+ evenPageFooterId: p,
44969
44973
  firstPageHeaderId: m,
44970
44974
  firstPageFooterId: v,
44971
44975
  useFirstPageHeaderFooter: y,
@@ -45005,18 +45009,18 @@ function wz(r, t) {
45005
45009
  marginFooter: n1 = S,
45006
45010
  defaultHeaderId: l1 = g,
45007
45011
  defaultFooterId: k1 = h,
45008
- evenPageHeaderId: f1 = p,
45009
- evenPageFooterId: j1 = f,
45012
+ evenPageHeaderId: f1 = f,
45013
+ evenPageFooterId: j1 = p,
45010
45014
  firstPageHeaderId: p1 = m,
45011
45015
  firstPageFooterId: w1 = v,
45012
45016
  useFirstPageHeaderFooter: H1 = y,
45013
45017
  evenAndOddHeaders: z1 = z,
45014
45018
  columnProperties: E1 = [],
45015
45019
  columnSeparatorType: P1 = ue.NONE,
45016
- contentDirection: G1,
45017
- sectionType: O2,
45018
- textDirection: I2,
45019
- renderConfig: q1 = A
45020
+ contentDirection: q1,
45021
+ sectionType: I2,
45022
+ textDirection: L2,
45023
+ renderConfig: W1 = A
45020
45024
  } = l, n2 = e.getChildren()[t + 1], t2 = (o2 = e.getSectionBreak(n2 == null ? void 0 : n2.endIndex)) == null ? void 0 : o2.sectionType, R1 = { defaultHeaderId: l1, evenPageHeaderId: f1, firstPageHeaderId: p1 }, N1 = { defaultFooterId: k1, evenPageFooterId: j1, firstPageFooterId: w1 };
45021
45025
  return N.width === null && (N.width = Number.POSITIVE_INFINITY), N.height === null && (N.height = Number.POSITIVE_INFINITY), {
45022
45026
  charSpace: L,
@@ -45037,11 +45041,11 @@ function wz(r, t) {
45037
45041
  evenAndOddHeaders: z1,
45038
45042
  columnProperties: E1,
45039
45043
  columnSeparatorType: P1,
45040
- contentDirection: G1,
45041
- sectionType: O2,
45044
+ contentDirection: q1,
45045
+ sectionType: I2,
45042
45046
  sectionTypeNext: t2,
45043
- textDirection: I2,
45044
- renderConfig: q1,
45047
+ textDirection: L2,
45048
+ renderConfig: W1,
45045
45049
  autoHyphenation: F,
45046
45050
  doNotHyphenateCaps: T,
45047
45051
  consecutiveHyphenLimit: M,
@@ -45091,8 +45095,8 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
45091
45095
  useFirstPageHeaderFooter: c,
45092
45096
  evenAndOddHeaders: g,
45093
45097
  footerTreeMap: h,
45094
- headerTreeMap: p,
45095
- columnProperties: f = [],
45098
+ headerTreeMap: f,
45099
+ columnProperties: p = [],
45096
45100
  columnSeparatorType: m,
45097
45101
  marginTop: v = 0,
45098
45102
  marginBottom: y = 0,
@@ -45107,9 +45111,9 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
45107
45111
  let P = M != null ? M : "", N = L != null ? L : "";
45108
45112
  a === i && c === t1.TRUE ? (P = A != null ? A : "", N = O != null ? O : "") : a % 2 === 0 && g === t1.TRUE && (P = B != null ? B : "", N = I != null ? I : "");
45109
45113
  let $, H;
45110
- P && ((w1 = x.get(P)) != null && w1.has(F) ? $ = (H1 = x.get(P)) == null ? void 0 : H1.get(F) : p && p.has(P) && ($ = z4(
45114
+ P && ((w1 = x.get(P)) != null && w1.has(F) ? $ = (H1 = x.get(P)) == null ? void 0 : H1.get(F) : f && f.has(P) && ($ = z4(
45111
45115
  r,
45112
- p.get(P),
45116
+ f.get(P),
45113
45117
  t,
45114
45118
  e,
45115
45119
  P,
@@ -45126,7 +45130,7 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
45126
45130
  let j1 = 0;
45127
45131
  Q && (j1 = Q.top + Q.height);
45128
45132
  const p1 = rt(
45129
- f,
45133
+ p,
45130
45134
  m,
45131
45135
  j1,
45132
45136
  0,
@@ -45175,8 +45179,8 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
45175
45179
  localeService: c,
45176
45180
  pageSize: g,
45177
45181
  drawings: h,
45178
- marginLeft: p = 0,
45179
- marginRight: f = 0,
45182
+ marginLeft: f = 0,
45183
+ marginRight: p = 0,
45180
45184
  marginHeader: m = 0,
45181
45185
  marginFooter: v = 0
45182
45186
  } = e, y = (g == null ? void 0 : g.width) || Number.POSITIVE_INFINITY, z = (g == null ? void 0 : g.height) || Number.POSITIVE_INFINITY, _ = {
@@ -45184,7 +45188,7 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
45184
45188
  footerTreeMap: u,
45185
45189
  headerTreeMap: d,
45186
45190
  pageSize: {
45187
- width: y - p - f,
45191
+ width: y - f - p,
45188
45192
  height: ft(z) - (n ? m : v) - 5
45189
45193
  },
45190
45194
  localeService: c,
@@ -45222,12 +45226,12 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
45222
45226
  }
45223
45227
  function vt(r, t, e, a, s, n = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY) {
45224
45228
  var F, T;
45225
- const { lists: o, footerTreeMap: l, headerTreeMap: u, localeService: d, drawings: c } = t, { skeletonResourceReference: g } = r, { cellMargin: h, tableRows: p, tableColumns: f, tableId: m } = e, v = p[a].tableCells[s], {
45229
+ const { lists: o, footerTreeMap: l, headerTreeMap: u, localeService: d, drawings: c } = t, { skeletonResourceReference: g } = r, { cellMargin: h, tableRows: f, tableColumns: p, tableId: m } = e, v = f[a].tableCells[s], {
45226
45230
  start: y = { v: 10 },
45227
45231
  end: z = { v: 10 },
45228
45232
  top: _ = { v: 5 },
45229
45233
  bottom: j = { v: 5 }
45230
- } = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w = f[s].size.width.v, C = i, x = {
45234
+ } = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w = p[s].size.width.v, C = i, x = {
45231
45235
  lists: o,
45232
45236
  footerTreeMap: l,
45233
45237
  headerTreeMap: u,
@@ -45540,18 +45544,18 @@ function Vz(r, t, e, a, s, n) {
45540
45544
  glyphType: d,
45541
45545
  glyphSymbol: c
45542
45546
  } = i, g = { ...s, ...u }, h = g3(g);
45543
- let p;
45544
- c ? p = c : p = Kz(l, t, e, a);
45545
- const f = (v = (m = a == null ? void 0 : a[t]) == null ? void 0 : m.startIndexItem) != null ? v : 1;
45547
+ let f;
45548
+ c ? f = c : f = Kz(l, t, e, a);
45549
+ const p = (v = (m = a == null ? void 0 : a[t]) == null ? void 0 : m.startIndexItem) != null ? v : 1;
45546
45550
  return {
45547
45551
  listId: r,
45548
- symbol: p,
45552
+ symbol: f,
45549
45553
  // symbol 列表的内容
45550
45554
  ts: g,
45551
45555
  // 文字样式
45552
45556
  fontStyle: h,
45553
45557
  //
45554
- startIndexItem: f + 1,
45558
+ startIndexItem: p + 1,
45555
45559
  // bBox,
45556
45560
  nestingLevel: i,
45557
45561
  bulletAlign: o,
@@ -45644,9 +45648,9 @@ function t_(r, t, e, a, s, n, i) {
45644
45648
  lists: l,
45645
45649
  drawings: u = {},
45646
45650
  localeService: d
45647
- } = n, { endIndex: c, blocks: g = [], children: h } = s, { segmentId: p } = a, f = t.getParagraph(c) || { startIndex: 0 }, { paragraphStyle: m = {}, bullet: v } = f, { skeHeaders: y, skeFooters: z, skeListLevel: _, drawingAnchor: j } = o, w = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
45648
- let x = j == null ? void 0 : j.get(p);
45649
- x == null && (x = /* @__PURE__ */ new Map(), j == null || j.set(p, x));
45651
+ } = n, { endIndex: c, blocks: g = [], children: h } = s, { segmentId: f } = a, p = t.getParagraph(c) || { startIndex: 0 }, { paragraphStyle: m = {}, bullet: v } = p, { skeHeaders: y, skeFooters: z, skeListLevel: _, drawingAnchor: j } = o, w = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
45652
+ let x = j == null ? void 0 : j.get(f);
45653
+ x == null && (x = /* @__PURE__ */ new Map(), j == null || j.set(f, x));
45650
45654
  const S = {
45651
45655
  paragraphIndex: c,
45652
45656
  // TODO optimize this deepClone
@@ -45666,13 +45670,13 @@ function t_(r, t, e, a, s, n, i) {
45666
45670
  skeFooters: z,
45667
45671
  pDrawingAnchor: x
45668
45672
  };
45669
- let F = r.paragraphConfigCache.get(p);
45670
- if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(p, F)), F.has(c)) {
45673
+ let F = r.paragraphConfigCache.get(f);
45674
+ if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(f, F)), F.has(c)) {
45671
45675
  const A = (B = F.get(c)) == null ? void 0 : B.bulletSkeleton;
45672
45676
  S.bulletSkeleton = A;
45673
45677
  } else {
45674
45678
  const A = Qz(v, _), L = Xz(v, l, A);
45675
- e_(f, v, L, _), S.bulletSkeleton = L;
45679
+ e_(p, v, L, _), S.bulletSkeleton = L;
45676
45680
  }
45677
45681
  for (let A = 0, L = g.length; A < L; A++) {
45678
45682
  const I = g[A], O = t.getCustomBlock(I);
@@ -46163,19 +46167,19 @@ s3.prototype.addBezier = function(r, t, e, a, s, n, i, o) {
46163
46167
  var l = [r, t], u = [e, a], d = [s, n], c = [i, o];
46164
46168
  this.addPoint(r, t), this.addPoint(i, o);
46165
46169
  for (var g = 0; g <= 1; g++) {
46166
- var h = 6 * l[g] - 12 * u[g] + 6 * d[g], p = -3 * l[g] + 9 * u[g] - 9 * d[g] + 3 * c[g], f = 3 * u[g] - 3 * l[g];
46167
- if (p === 0) {
46170
+ var h = 6 * l[g] - 12 * u[g] + 6 * d[g], f = -3 * l[g] + 9 * u[g] - 9 * d[g] + 3 * c[g], p = 3 * u[g] - 3 * l[g];
46171
+ if (f === 0) {
46168
46172
  if (h === 0)
46169
46173
  continue;
46170
- var m = -f / h;
46174
+ var m = -p / h;
46171
46175
  0 < m && m < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], m)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], m)));
46172
46176
  continue;
46173
46177
  }
46174
- var v = Math.pow(h, 2) - 4 * f * p;
46178
+ var v = Math.pow(h, 2) - 4 * p * f;
46175
46179
  if (!(v < 0)) {
46176
- var y = (-h + Math.sqrt(v)) / (2 * p);
46180
+ var y = (-h + Math.sqrt(v)) / (2 * f);
46177
46181
  0 < y && y < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], y)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], y)));
46178
- var z = (-h - Math.sqrt(v)) / (2 * p);
46182
+ var z = (-h - Math.sqrt(v)) / (2 * f);
46179
46183
  0 < z && z < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], z)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], z)));
46180
46184
  }
46181
46185
  }
@@ -47153,8 +47157,8 @@ function L_(r, t, e, a, s) {
47153
47157
  var n;
47154
47158
  r.segCount = n = t.parseUShort() >> 1, t.skip("uShort", 3), r.glyphIndexMap = {};
47155
47159
  for (var i = new Y.Parser(e, a + s + 14), o = new Y.Parser(e, a + s + 16 + n * 2), l = new Y.Parser(e, a + s + 16 + n * 4), u = new Y.Parser(e, a + s + 16 + n * 6), d = a + s + 16 + n * 8, c = 0; c < n - 1; c += 1)
47156
- for (var g = void 0, h = i.parseUShort(), p = o.parseUShort(), f = l.parseShort(), m = u.parseUShort(), v = p; v <= h; v += 1)
47157
- m !== 0 ? (d = u.offset + u.relativeOffset - 2, d += m, d += (v - p) * 2, g = Y.getUShort(e, d), g !== 0 && (g = g + f & 65535)) : g = v + f & 65535, r.glyphIndexMap[v] = g;
47160
+ for (var g = void 0, h = i.parseUShort(), f = o.parseUShort(), p = l.parseShort(), m = u.parseUShort(), v = f; v <= h; v += 1)
47161
+ m !== 0 ? (d = u.offset + u.relativeOffset - 2, d += m, d += (v - f) * 2, g = Y.getUShort(e, d), g !== 0 && (g = g + p & 65535)) : g = v + p & 65535, r.glyphIndexMap[v] = g;
47158
47162
  }
47159
47163
  function P_(r, t) {
47160
47164
  var e = {};
@@ -47236,23 +47240,23 @@ function U_(r) {
47236
47240
  });
47237
47241
  }
47238
47242
  $_(n);
47239
- var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [], p = [], f = [];
47243
+ var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [], f = [], p = [];
47240
47244
  for (e = 0; e < l; e += 1) {
47241
47245
  var m = n.segments[e];
47242
- m.end <= 65535 && m.start <= 65535 ? (d = d.concat({ name: "end_" + e, type: "USHORT", value: m.end }), c = c.concat({ name: "start_" + e, type: "USHORT", value: m.start }), g = g.concat({ name: "idDelta_" + e, type: "SHORT", value: m.delta }), h = h.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: m.offset }), m.glyphId !== void 0 && (p = p.concat({ name: "glyph_" + e, type: "USHORT", value: m.glyphId }))) : u += 1, !t && m.glyphIndex !== void 0 && (f = f.concat({ name: "cmap12Start_" + e, type: "ULONG", value: m.start }), f = f.concat({ name: "cmap12End_" + e, type: "ULONG", value: m.end }), f = f.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: m.glyphIndex }));
47246
+ m.end <= 65535 && m.start <= 65535 ? (d = d.concat({ name: "end_" + e, type: "USHORT", value: m.end }), c = c.concat({ name: "start_" + e, type: "USHORT", value: m.start }), g = g.concat({ name: "idDelta_" + e, type: "SHORT", value: m.delta }), h = h.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: m.offset }), m.glyphId !== void 0 && (f = f.concat({ name: "glyph_" + e, type: "USHORT", value: m.glyphId }))) : u += 1, !t && m.glyphIndex !== void 0 && (p = p.concat({ name: "cmap12Start_" + e, type: "ULONG", value: m.start }), p = p.concat({ name: "cmap12End_" + e, type: "ULONG", value: m.end }), p = p.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: m.glyphIndex }));
47243
47247
  }
47244
- if (n.segCountX2 = (l - u) * 2, n.searchRange = Math.pow(2, Math.floor(Math.log(l - u) / Math.log(2))) * 2, n.entrySelector = Math.log(n.searchRange / 2) / Math.log(2), n.rangeShift = n.segCountX2 - n.searchRange, n.fields = n.fields.concat(d), n.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), n.fields = n.fields.concat(c), n.fields = n.fields.concat(g), n.fields = n.fields.concat(h), n.fields = n.fields.concat(p), n.cmap4Length = 14 + // Subtable header
47248
+ if (n.segCountX2 = (l - u) * 2, n.searchRange = Math.pow(2, Math.floor(Math.log(l - u) / Math.log(2))) * 2, n.entrySelector = Math.log(n.searchRange / 2) / Math.log(2), n.rangeShift = n.segCountX2 - n.searchRange, n.fields = n.fields.concat(d), n.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), n.fields = n.fields.concat(c), n.fields = n.fields.concat(g), n.fields = n.fields.concat(h), n.fields = n.fields.concat(f), n.cmap4Length = 14 + // Subtable header
47245
47249
  d.length * 2 + 2 + // reservedPad
47246
- c.length * 2 + g.length * 2 + h.length * 2 + p.length * 2, !t) {
47250
+ c.length * 2 + g.length * 2 + h.length * 2 + f.length * 2, !t) {
47247
47251
  var v = 16 + // Subtable header
47248
- f.length * 4;
47252
+ p.length * 4;
47249
47253
  n.cmap12Offset = 20 + n.cmap4Length, n.fields = n.fields.concat([
47250
47254
  { name: "cmap12Format", type: "USHORT", value: 12 },
47251
47255
  { name: "cmap12Reserved", type: "USHORT", value: 0 },
47252
47256
  { name: "cmap12Length", type: "ULONG", value: v },
47253
47257
  { name: "cmap12Language", type: "ULONG", value: 0 },
47254
- { name: "cmap12nGroups", type: "ULONG", value: f.length / 3 }
47255
- ]), n.fields = n.fields.concat(f);
47258
+ { name: "cmap12nGroups", type: "ULONG", value: p.length / 3 }
47259
+ ]), n.fields = n.fields.concat(p);
47256
47260
  }
47257
47261
  return n;
47258
47262
  }
@@ -48577,10 +48581,10 @@ f2.prototype.draw = function(r, t, e, a, s) {
48577
48581
  this.getPath(t, e, a, s).draw(r);
48578
48582
  };
48579
48583
  f2.prototype.drawPoints = function(r, t, e, a) {
48580
- function s(c, g, h, p) {
48584
+ function s(c, g, h, f) {
48581
48585
  r.beginPath();
48582
- for (var f = 0; f < c.length; f += 1)
48583
- r.moveTo(g + c[f].x * p, h + c[f].y * p), r.arc(g + c[f].x * p, h + c[f].y * p, 2, 0, Math.PI * 2, !1);
48586
+ for (var p = 0; p < c.length; p += 1)
48587
+ r.moveTo(g + c[p].x * f, h + c[p].y * f), r.arc(g + c[p].x * f, h + c[p].y * f, 2, 0, Math.PI * 2, !1);
48584
48588
  r.closePath(), r.fill();
48585
48589
  }
48586
48590
  t = t !== void 0 ? t : 0, e = e !== void 0 ? e : 0, a = a !== void 0 ? a : 24;
@@ -48653,7 +48657,7 @@ function J_(r, t, e, a) {
48653
48657
  }, s;
48654
48658
  };
48655
48659
  }
48656
- var R2 = { GlyphSet: l6, glyphLoader: K_, ttfGlyphLoader: Z_, cffGlyphLoader: J_ };
48660
+ var M2 = { GlyphSet: l6, glyphLoader: K_, ttfGlyphLoader: Z_, cffGlyphLoader: J_ };
48657
48661
  function Rt(r, t) {
48658
48662
  if (r === t)
48659
48663
  return !0;
@@ -48877,12 +48881,12 @@ function oD(r, t, e) {
48877
48881
  return new f0(s, e);
48878
48882
  }
48879
48883
  function p5(r, t, e) {
48880
- var a, s, n, i, o = new T1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0, p, f, m, v;
48884
+ var a, s, n, i, o = new T1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0, f, p, m, v;
48881
48885
  if (r.isCIDFont) {
48882
48886
  var y = r.tables.cff.topDict._fdSelect[t.index], z = r.tables.cff.topDict._fdArray[y];
48883
- p = z._subrs, f = z._subrsBias, m = z._defaultWidthX, v = z._nominalWidthX;
48887
+ f = z._subrs, p = z._subrsBias, m = z._defaultWidthX, v = z._nominalWidthX;
48884
48888
  } else
48885
- p = r.tables.cff.topDict._subrs, f = r.tables.cff.topDict._subrsBias, m = r.tables.cff.topDict._defaultWidthX, v = r.tables.cff.topDict._nominalWidthX;
48889
+ f = r.tables.cff.topDict._subrs, p = r.tables.cff.topDict._subrsBias, m = r.tables.cff.topDict._defaultWidthX, v = r.tables.cff.topDict._nominalWidthX;
48886
48890
  var _ = m;
48887
48891
  function j(x, S) {
48888
48892
  c && o.closePath(), o.moveTo(x, S), c = !0;
@@ -48921,7 +48925,7 @@ function p5(r, t, e) {
48921
48925
  a = g + l.shift(), s = h + l.shift(), n = a + l.shift(), i = s + l.shift(), g = n + l.shift(), h = i + l.shift(), o.curveTo(a, s, n, i, g, h);
48922
48926
  break;
48923
48927
  case 10:
48924
- B = l.pop() + f, A = p[B], A && C(A);
48928
+ B = l.pop() + p, A = f[B], A && C(A);
48925
48929
  break;
48926
48930
  case 11:
48927
48931
  return;
@@ -49042,27 +49046,27 @@ function uD(r, t, e, a) {
49042
49046
  if (c === 0 || g === 0)
49043
49047
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
49044
49048
  c += t;
49045
- var h = Y2(r, c), p = m5(r, t, h.objects, o.objects);
49046
- d._fdArray = p, g += t, d._fdSelect = lD(r, g, e.numGlyphs, p.length);
49049
+ var h = Y2(r, c), f = m5(r, t, h.objects, o.objects);
49050
+ d._fdArray = f, g += t, d._fdSelect = lD(r, g, e.numGlyphs, f.length);
49047
49051
  }
49048
- var f = t + d.private[1], m = Pt(r, f, d.private[0], o.objects);
49052
+ var p = t + d.private[1], m = Pt(r, p, d.private[0], o.objects);
49049
49053
  if (e.defaultWidthX = m.defaultWidthX, e.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
49050
- var v = f + m.subrs, y = Y2(r, v);
49054
+ var v = p + m.subrs, y = Y2(r, v);
49051
49055
  e.subrs = y.objects, e.subrsBias = C4(e.subrs);
49052
49056
  } else
49053
49057
  e.subrs = [], e.subrsBias = 0;
49054
49058
  var z;
49055
49059
  a.lowMemory ? (z = Q_(r, t + d.charStrings), e.nGlyphs = z.offsets.length) : (z = Y2(r, t + d.charStrings), e.nGlyphs = z.objects.length);
49056
49060
  var _ = iD(r, t + d.charset, e.nGlyphs, o.objects);
49057
- if (d.encoding === 0 ? e.cffEncoding = new f0(H_, _) : d.encoding === 1 ? e.cffEncoding = new f0(G_, _) : e.cffEncoding = oD(r, t + d.encoding, _), e.encoding = e.encoding || e.cffEncoding, e.glyphs = new R2.GlyphSet(e), a.lowMemory)
49061
+ if (d.encoding === 0 ? e.cffEncoding = new f0(H_, _) : d.encoding === 1 ? e.cffEncoding = new f0(G_, _) : e.cffEncoding = oD(r, t + d.encoding, _), e.encoding = e.encoding || e.cffEncoding, e.glyphs = new M2.GlyphSet(e), a.lowMemory)
49058
49062
  e._push = function(C) {
49059
49063
  var x = eD(C, z.offsets, r, t + d.charStrings);
49060
- e.glyphs.push(C, R2.cffGlyphLoader(e, C, p5, x));
49064
+ e.glyphs.push(C, M2.cffGlyphLoader(e, C, p5, x));
49061
49065
  };
49062
49066
  else
49063
49067
  for (var j = 0; j < e.nGlyphs; j += 1) {
49064
49068
  var w = z.objects[j];
49065
- e.glyphs.push(j, R2.cffGlyphLoader(e, j, p5, w));
49069
+ e.glyphs.push(j, M2.cffGlyphLoader(e, j, p5, w));
49066
49070
  }
49067
49071
  }
49068
49072
  function Nt(r, t) {
@@ -49150,8 +49154,8 @@ function mD(r) {
49150
49154
  else if (l.type === "L")
49151
49155
  i = Math.round(l.x - a), o = Math.round(l.y - s), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rlineto", type: "OP", value: 5 }), a = Math.round(l.x), s = Math.round(l.y);
49152
49156
  else if (l.type === "C") {
49153
- var c = Math.round(l.x1 - a), g = Math.round(l.y1 - s), h = Math.round(l.x2 - l.x1), p = Math.round(l.y2 - l.y1);
49154
- i = Math.round(l.x - l.x2), o = Math.round(l.y - l.y2), t.push({ name: "dx1", type: "NUMBER", value: c }), t.push({ name: "dy1", type: "NUMBER", value: g }), t.push({ name: "dx2", type: "NUMBER", value: h }), t.push({ name: "dy2", type: "NUMBER", value: p }), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rrcurveto", type: "OP", value: 8 }), a = Math.round(l.x), s = Math.round(l.y);
49157
+ var c = Math.round(l.x1 - a), g = Math.round(l.y1 - s), h = Math.round(l.x2 - l.x1), f = Math.round(l.y2 - l.y1);
49158
+ i = Math.round(l.x - l.x2), o = Math.round(l.y - l.y2), t.push({ name: "dx1", type: "NUMBER", value: c }), t.push({ name: "dy1", type: "NUMBER", value: g }), t.push({ name: "dx2", type: "NUMBER", value: h }), t.push({ name: "dy2", type: "NUMBER", value: f }), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rrcurveto", type: "OP", value: 8 }), a = Math.round(l.x), s = Math.round(l.y);
49155
49159
  }
49156
49160
  }
49157
49161
  return t.push({ name: "endchar", type: "OP", value: 14 }), t;
@@ -50052,10 +50056,10 @@ function Zt(r, t, e) {
50052
50056
  }
50053
50057
  function MD(r, t, e) {
50054
50058
  for (var a = {}, s = new Y.Parser(r, t), n = s.parseUShort(), i = s.parseUShort(), o = s.offset + s.parseUShort(), l = 0; l < i; l++) {
50055
- var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g, p = s.parseUShort(), f = s.parseUShort(), m = BD(u, c, e), v = Zt(u, d, c);
50059
+ var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g, f = s.parseUShort(), p = s.parseUShort(), m = BD(u, c, e), v = Zt(u, d, c);
50056
50060
  if (v !== void 0 && m !== void 0) {
50057
50061
  var y = void 0;
50058
- if (v === x4 ? y = U3.UTF16(r, o + f, p) : y = U3.MACSTRING(r, o + f, p, v), y) {
50062
+ if (v === x4 ? y = U3.UTF16(r, o + p, f) : y = U3.MACSTRING(r, o + p, f, v), y) {
50059
50063
  var z = a[h];
50060
50064
  z === void 0 && (z = a[h] = {}), z[m] = y;
50061
50065
  }
@@ -50111,9 +50115,9 @@ function ID(r, t) {
50111
50115
  for (var l = J0(Vt), u = J0(Kt), d = [], c = [], g = 0; g < a.length; g++) {
50112
50116
  e = a[g];
50113
50117
  var h = s[e];
50114
- for (var p in h) {
50115
- var f = h[p], m = 1, v = l[p], y = TD[v], z = Zt(m, y, v), _ = G.MACSTRING(f, z);
50116
- _ === void 0 && (m = 0, v = t.indexOf(p), v < 0 && (v = t.length, t.push(p)), y = 4, _ = G.UTF16(f));
50118
+ for (var f in h) {
50119
+ var p = h[f], m = 1, v = l[f], y = TD[v], z = Zt(m, y, v), _ = G.MACSTRING(p, z);
50120
+ _ === void 0 && (m = 0, v = t.indexOf(f), v < 0 && (v = t.length, t.push(f)), y = 4, _ = G.UTF16(p));
50117
50121
  var j = y5(_, c);
50118
50122
  d.push(b5(
50119
50123
  m,
@@ -50123,9 +50127,9 @@ function ID(r, t) {
50123
50127
  _.length,
50124
50128
  j
50125
50129
  ));
50126
- var w = u[p];
50130
+ var w = u[f];
50127
50131
  if (w !== void 0) {
50128
- var C = G.UTF16(f), x = y5(C, c);
50132
+ var C = G.UTF16(p), x = y5(C, c);
50129
50133
  d.push(b5(
50130
50134
  3,
50131
50135
  1,
@@ -50828,10 +50832,10 @@ function YD(r) {
50828
50832
  return t / r.length;
50829
50833
  }
50830
50834
  function XD(r) {
50831
- for (var t = [], e = [], a = [], s = [], n = [], i = [], o = [], l, u = 0, d = 0, c = 0, g = 0, h = 0, p = 0; p < r.glyphs.length; p += 1) {
50832
- var f = r.glyphs.get(p), m = f.unicode | 0;
50833
- if (isNaN(f.advanceWidth))
50834
- throw new Error("Glyph " + f.name + " (" + p + "): advanceWidth is not a number.");
50835
+ for (var t = [], e = [], a = [], s = [], n = [], i = [], o = [], l, u = 0, d = 0, c = 0, g = 0, h = 0, f = 0; f < r.glyphs.length; f += 1) {
50836
+ var p = r.glyphs.get(f), m = p.unicode | 0;
50837
+ if (isNaN(p.advanceWidth))
50838
+ throw new Error("Glyph " + p.name + " (" + f + "): advanceWidth is not a number.");
50835
50839
  (l > m || l === void 0) && m > 0 && (l = m), u < m && (u = m);
50836
50840
  var v = F4.getUnicodeRange(m);
50837
50841
  if (v < 32)
@@ -50844,9 +50848,9 @@ function XD(r) {
50844
50848
  h |= 1 << v - 96;
50845
50849
  else
50846
50850
  throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
50847
- if (f.name !== ".notdef") {
50848
- var y = f.getMetrics();
50849
- t.push(y.xMin), e.push(y.yMin), a.push(y.xMax), s.push(y.yMax), i.push(y.leftSideBearing), o.push(y.rightSideBearing), n.push(f.advanceWidth);
50851
+ if (p.name !== ".notdef") {
50852
+ var y = p.getMetrics();
50853
+ t.push(y.xMin), e.push(y.yMin), a.push(y.xMax), s.push(y.yMax), i.push(y.leftSideBearing), o.push(y.rightSideBearing), n.push(p.advanceWidth);
50850
50854
  }
50851
50855
  }
50852
50856
  var z = {
@@ -51285,11 +51289,11 @@ r2.prototype.getLigatures = function(r, t, e) {
51285
51289
  for (var a = [], s = this.getLookupTables(t, e, r, 4), n = 0; n < s.length; n++)
51286
51290
  for (var i = s[n].subtables, o = 0; o < i.length; o++)
51287
51291
  for (var l = i[o], u = this.expandCoverage(l.coverage), d = l.ligatureSets, c = 0; c < u.length; c++)
51288
- for (var g = u[c], h = d[c], p = 0; p < h.length; p++) {
51289
- var f = h[p];
51292
+ for (var g = u[c], h = d[c], f = 0; f < h.length; f++) {
51293
+ var p = h[f];
51290
51294
  a.push({
51291
- sub: [g].concat(f.components),
51292
- by: f.ligGlyph
51295
+ sub: [g].concat(p.components),
51296
+ by: p.ligGlyph
51293
51297
  });
51294
51298
  }
51295
51299
  return a;
@@ -51413,14 +51417,14 @@ function r8(r, t, e) {
51413
51417
  for (var c = a.parseByte(), g = 0; g < c; g += 1)
51414
51418
  s.push(n), d += 1;
51415
51419
  if (a1.argument(s.length === u, "Bad flags."), i.length > 0) {
51416
- var h = [], p;
51420
+ var h = [], f;
51417
51421
  if (u > 0) {
51418
- for (var f = 0; f < u; f += 1)
51419
- n = s[f], p = {}, p.onCurve = !!(n & 1), p.lastPointOfContour = i.indexOf(f) >= 0, h.push(p);
51422
+ for (var p = 0; p < u; p += 1)
51423
+ n = s[p], f = {}, f.onCurve = !!(n & 1), f.lastPointOfContour = i.indexOf(p) >= 0, h.push(f);
51420
51424
  for (var m = 0, v = 0; v < u; v += 1)
51421
- n = s[v], p = h[v], p.x = C5(a, n, m, 2, 16), m = p.x;
51425
+ n = s[v], f = h[v], f.x = C5(a, n, m, 2, 16), m = f.x;
51422
51426
  for (var y = 0, z = 0; z < u; z += 1)
51423
- n = s[z], p = h[z], p.y = C5(a, n, y, 4, 32), y = p.y;
51427
+ n = s[z], f = h[z], f.y = C5(a, n, y, 4, 32), y = f.y;
51424
51428
  }
51425
51429
  r.points = h;
51426
51430
  } else
@@ -51520,17 +51524,17 @@ function n8(r, t) {
51520
51524
  return s8(t.points);
51521
51525
  }
51522
51526
  function ej(r, t, e, a) {
51523
- for (var s = new R2.GlyphSet(a), n = 0; n < e.length - 1; n += 1) {
51527
+ for (var s = new M2.GlyphSet(a), n = 0; n < e.length - 1; n += 1) {
51524
51528
  var i = e[n], o = e[n + 1];
51525
- i !== o ? s.push(n, R2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, R2.glyphLoader(a, n));
51529
+ i !== o ? s.push(n, M2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, M2.glyphLoader(a, n));
51526
51530
  }
51527
51531
  return s;
51528
51532
  }
51529
51533
  function tj(r, t, e, a) {
51530
- var s = new R2.GlyphSet(a);
51534
+ var s = new M2.GlyphSet(a);
51531
51535
  return a._push = function(n) {
51532
51536
  var i = e[n], o = e[n + 1];
51533
- i !== o ? s.push(n, R2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, R2.glyphLoader(a, n));
51537
+ i !== o ? s.push(n, M2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, M2.glyphLoader(a, n));
51534
51538
  }, s;
51535
51539
  }
51536
51540
  function aj(r, t, e, a, s) {
@@ -51563,7 +51567,7 @@ function oj(r) {
51563
51567
  var g8 = function(r) {
51564
51568
  var t = this.srPeriod, e = this.srPhase, a = this.srThreshold, s = 1;
51565
51569
  return r < 0 && (r = -r, s = -1), r += a - e, r = Math.trunc(r / t) * t, r += e, r < 0 ? e * s : r * s;
51566
- }, A2 = {
51570
+ }, R2 = {
51567
51571
  x: 1,
51568
51572
  y: 0,
51569
51573
  axis: "x",
@@ -51588,10 +51592,10 @@ var g8 = function(r) {
51588
51592
  return;
51589
51593
  }
51590
51594
  if (s = a.distance(r, t, !0, !0), n = a.distance(r, e, !0, !0), l = a.distance(t, t, !1, !0), u = a.distance(e, e, !1, !0), i = Math.abs(s), o = Math.abs(n), d = i + o, d === 0) {
51591
- A2.setRelative(r, r, (l + u) / 2, a, !0);
51595
+ R2.setRelative(r, r, (l + u) / 2, a, !0);
51592
51596
  return;
51593
51597
  }
51594
- A2.setRelative(r, r, (l * o + u * i) / d, a, !0);
51598
+ R2.setRelative(r, r, (l * o + u * i) / d, a, !0);
51595
51599
  },
51596
51600
  // Slope of line normal to this
51597
51601
  normalSlope: Number.NEGATIVE_INFINITY,
@@ -51692,13 +51696,13 @@ var g8 = function(r) {
51692
51696
  r.yTouched = !1;
51693
51697
  }
51694
51698
  };
51695
- Object.freeze(A2);
51699
+ Object.freeze(R2);
51696
51700
  Object.freeze($2);
51697
51701
  function je(r, t) {
51698
51702
  this.x = r, this.y = t, this.axis = void 0, this.slope = t / r, this.normalSlope = -r / t, Object.freeze(this);
51699
51703
  }
51700
51704
  je.prototype.distance = function(r, t, e, a) {
51701
- return this.x * A2.distance(r, t, e, a) + this.y * $2.distance(r, t, e, a);
51705
+ return this.x * R2.distance(r, t, e, a) + this.y * $2.distance(r, t, e, a);
51702
51706
  };
51703
51707
  je.prototype.interpolate = function(r, t, e, a) {
51704
51708
  var s, n, i, o, l, u, d;
@@ -51718,7 +51722,7 @@ je.prototype.touch = function(r) {
51718
51722
  };
51719
51723
  function we(r, t) {
51720
51724
  var e = Math.sqrt(r * r + t * t);
51721
- return r /= e, t /= e, r === 1 && t === 0 ? A2 : r === 0 && t === 1 ? $2 : new je(r, t);
51725
+ return r /= e, t /= e, r === 1 && t === 0 ? R2 : r === 0 && t === 1 ? $2 : new je(r, t);
51722
51726
  }
51723
51727
  function U2(r, t, e, a) {
51724
51728
  this.x = this.xo = Math.round(r * 64) / 64, this.y = this.yo = Math.round(t * 64) / 64, this.lastPointOfContour = e, this.onCurve = a, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
@@ -51750,7 +51754,7 @@ function J2(r, t) {
51750
51754
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
51751
51755
  /* fall through */
51752
51756
  case "prep":
51753
- this.fv = this.pv = this.dpv = A2, this.round = d8;
51757
+ this.fv = this.pv = this.dpv = R2, this.round = d8;
51754
51758
  }
51755
51759
  }
51756
51760
  u8.prototype.exec = function(r, t) {
@@ -51802,14 +51806,14 @@ l8 = function(r, t) {
51802
51806
  for (var u = 0; u < s.length; u++) {
51803
51807
  var d = s[u], c = l.glyphs.get(d.glyphIndex);
51804
51808
  o = new J2("glyf", c.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1), S4(c, o, e, a);
51805
- for (var g = Math.round(d.dx * e), h = Math.round(d.dy * a), p = o.gZone, f = o.contours, m = 0; m < p.length; m++) {
51806
- var v = p[m];
51809
+ for (var g = Math.round(d.dx * e), h = Math.round(d.dy * a), f = o.gZone, p = o.contours, m = 0; m < f.length; m++) {
51810
+ var v = f[m];
51807
51811
  v.xTouched = v.yTouched = !1, v.xo = v.x = v.x + g, v.yo = v.y = v.y + h;
51808
51812
  }
51809
51813
  var y = i.length;
51810
- i.push.apply(i, p);
51811
- for (var z = 0; z < f.length; z++)
51812
- n.push(f[z] + y);
51814
+ i.push.apply(i, f);
51815
+ for (var z = 0; z < p.length; z++)
51816
+ n.push(p[z] + y);
51813
51817
  }
51814
51818
  r.instructions && !o.inhibitGridFit && (o = new J2("glyf", r.instructions), o.gZone = o.z0 = o.z1 = o.z2 = i, o.contours = n, i.push(
51815
51819
  new U2(0, 0),
@@ -51839,8 +51843,8 @@ S4 = function(r, t, e, a) {
51839
51843
  new U2(Math.round(r.advanceWidth * e), 0)
51840
51844
  ), D3(t), i.length -= 2, exports.DEBUG) {
51841
51845
  console.log("FINISHED GLYPH", t.stack);
51842
- for (var p = 0; p < n; p++)
51843
- console.log(p, i[p].x, i[p].y);
51846
+ for (var f = 0; f < n; f++)
51847
+ console.log(f, i[f].x, i[f].y);
51844
51848
  }
51845
51849
  }
51846
51850
  };
@@ -51924,8 +51928,8 @@ function hj(r) {
51924
51928
  function kj(r) {
51925
51929
  var t = r.stack, e = t.pop(), a = t.pop(), s = t.pop(), n = t.pop(), i = t.pop(), o = r.z0, l = r.z1, u = o[e], d = o[a], c = l[s], g = l[n], h = r.z2[i];
51926
51930
  exports.DEBUG && console.log("ISECT[], ", e, a, s, n, i);
51927
- var p = u.x, f = u.y, m = d.x, v = d.y, y = c.x, z = c.y, _ = g.x, j = g.y, w = (p - m) * (z - j) - (f - v) * (y - _), C = p * v - f * m, x = y * j - z * _;
51928
- h.x = (C * (y - _) - x * (p - m)) / w, h.y = (C * (z - j) - x * (f - v)) / w;
51931
+ var f = u.x, p = u.y, m = d.x, v = d.y, y = c.x, z = c.y, _ = g.x, j = g.y, w = (f - m) * (z - j) - (p - v) * (y - _), C = f * v - p * m, x = y * j - z * _;
51932
+ h.x = (C * (y - _) - x * (f - m)) / w, h.y = (C * (z - j) - x * (p - v)) / w;
51929
51933
  }
51930
51934
  function mj(r) {
51931
51935
  r.rp0 = r.stack.pop(), exports.DEBUG && console.log(r.step, "SRP0[]", r.rp0);
@@ -52278,10 +52282,10 @@ function a4(r, t) {
52278
52282
  for (var d = 0; d < a; d++) {
52279
52283
  var c = e.pop(), g = e.pop(), h = o + ((g & 240) >> 4);
52280
52284
  if (h === i) {
52281
- var p = (g & 15) - 8;
52282
- p >= 0 && p++, exports.DEBUG && console.log(t.step, "DELTAPFIX", c, "by", p * l);
52283
- var f = u[c];
52284
- s.setRelative(f, f, p * l, n);
52285
+ var f = (g & 15) - 8;
52286
+ f >= 0 && f++, exports.DEBUG && console.log(t.step, "DELTAPFIX", c, "by", f * l);
52287
+ var p = u[c];
52288
+ s.setRelative(p, p, f * l, n);
52285
52289
  }
52286
52290
  }
52287
52291
  }
@@ -52485,14 +52489,14 @@ function q2(r, t) {
52485
52489
  t.ip = e;
52486
52490
  }
52487
52491
  function W(r, t, e, a, s, n) {
52488
- var i = n.stack, o = r && i.pop(), l = i.pop(), u = n.rp0, d = n.z0[u], c = n.z1[l], g = n.minDis, h = n.fv, p = n.dpv, f, m, v, y;
52489
- m = f = p.distance(c, d, !0, !0), v = m >= 0 ? 1 : -1, m = Math.abs(m), r && (y = n.cvt[o], a && Math.abs(m - y) < n.cvCutIn && (m = y)), e && m < g && (m = g), a && (m = n.round(m)), h.setRelative(c, d, v * m, p), h.touch(c), exports.DEBUG && console.log(
52492
+ var i = n.stack, o = r && i.pop(), l = i.pop(), u = n.rp0, d = n.z0[u], c = n.z1[l], g = n.minDis, h = n.fv, f = n.dpv, p, m, v, y;
52493
+ m = p = f.distance(c, d, !0, !0), v = m >= 0 ? 1 : -1, m = Math.abs(m), r && (y = n.cvt[o], a && Math.abs(m - y) < n.cvCutIn && (m = y)), e && m < g && (m = g), a && (m = n.round(m)), h.setRelative(c, d, v * m, f), h.touch(c), exports.DEBUG && console.log(
52490
52494
  n.step,
52491
52495
  (r ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (e ? ">" : "_") + (a ? "R" : "_") + (s === 0 ? "Gr" : s === 1 ? "Bl" : s === 2 ? "Wh" : "") + "]",
52492
52496
  r ? o + "(" + n.cvt[o] + "," + y + ")" : "",
52493
52497
  l,
52494
52498
  "(d =",
52495
- f,
52499
+ p,
52496
52500
  "->",
52497
52501
  v * m,
52498
52502
  ")"
@@ -52502,15 +52506,15 @@ o8 = [
52502
52506
  /* 0x00 */
52503
52507
  x5.bind(void 0, $2),
52504
52508
  /* 0x01 */
52505
- x5.bind(void 0, A2),
52509
+ x5.bind(void 0, R2),
52506
52510
  /* 0x02 */
52507
52511
  E5.bind(void 0, $2),
52508
52512
  /* 0x03 */
52509
- E5.bind(void 0, A2),
52513
+ E5.bind(void 0, R2),
52510
52514
  /* 0x04 */
52511
52515
  F5.bind(void 0, $2),
52512
52516
  /* 0x05 */
52513
- F5.bind(void 0, A2),
52517
+ F5.bind(void 0, R2),
52514
52518
  /* 0x06 */
52515
52519
  S5.bind(void 0, 0),
52516
52520
  /* 0x07 */
@@ -52603,7 +52607,7 @@ o8 = [
52603
52607
  /* 0x30 */
52604
52608
  A5.bind(void 0, $2),
52605
52609
  /* 0x31 */
52606
- A5.bind(void 0, A2),
52610
+ A5.bind(void 0, R2),
52607
52611
  /* 0x32 */
52608
52612
  R5.bind(void 0, 0),
52609
52613
  /* 0x33 */
@@ -53373,7 +53377,7 @@ function Iw(r, t) {
53373
53377
  ), c = a.length === t.inputCoverage.length && o.length === t.lookaheadCoverage.length && d.length === t.backtrackCoverage.length, g = [];
53374
53378
  if (c)
53375
53379
  for (var h = 0; h < t.lookupRecords.length; h++)
53376
- for (var p = t.lookupRecords[h], f = p.lookupListIndex, m = this.getLookupByIndex(f), v = 0; v < m.subtables.length; v++) {
53380
+ for (var f = t.lookupRecords[h], p = f.lookupListIndex, m = this.getLookupByIndex(p), v = 0; v < m.subtables.length; v++) {
53377
53381
  var y = m.subtables[v], z = this.getLookupMethod(m, y), _ = this.getSubstitutionType(m, y);
53378
53382
  if (_ === "12")
53379
53383
  for (var j = 0; j < a.length; j++) {
@@ -53941,7 +53945,7 @@ function b1(r) {
53941
53945
  usWidthClass: r.widthClass || this.usWidthClasses.MEDIUM,
53942
53946
  fsSelection: r.fsSelection || this.fsSelectionValues.REGULAR
53943
53947
  }, r.tables.os2)
53944
- })), this.supported = !0, this.glyphs = new R2.GlyphSet(this, r.glyphs || []), this.encoding = new Bt(this), this.position = new De(this), this.substitution = new r2(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
53948
+ })), this.supported = !0, this.glyphs = new M2.GlyphSet(this, r.glyphs || []), this.encoding = new Bt(this), this.position = new De(this), this.substitution = new r2(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
53945
53949
  get: function() {
53946
53950
  if (this._hinting)
53947
53951
  return this._hinting;
@@ -54214,8 +54218,8 @@ function kC(r, t, e) {
54214
54218
  a.skip("uShort", 1);
54215
54219
  for (var i = a.parseUShort(), o = a.parseUShort(), l = a.parseUShort(), u = a.parseUShort(), d = [], c = 0; c < i; c++)
54216
54220
  d.push(dC(r, t + n + c * o, e));
54217
- for (var g = [], h = t + n + i * o, p = 0; p < l; p++)
54218
- g.push(cC(r, h + p * u, d, e));
54221
+ for (var g = [], h = t + n + i * o, f = 0; f < l; f++)
54222
+ g.push(cC(r, h + f * u, d, e));
54219
54223
  return { axes: d, instances: g };
54220
54224
  }
54221
54225
  var mC = { make: hC, parse: kC }, pC = function() {
@@ -54458,7 +54462,7 @@ function RC(r, t) {
54458
54462
  i = Y.getUShort(n, 12), o = AC(n, i);
54459
54463
  } else
54460
54464
  throw new Error("Unsupported OpenType signature " + l);
54461
- for (var d, c, g, h, p, f, m, v, y, z, _, j, w = 0; w < i; w += 1) {
54465
+ for (var d, c, g, h, f, p, m, v, y, z, _, j, w = 0; w < i; w += 1) {
54462
54466
  var C = o[w], x = void 0;
54463
54467
  switch (C.tag) {
54464
54468
  case "cmap":
@@ -54516,10 +54520,10 @@ function RC(r, t) {
54516
54520
  h = C;
54517
54521
  break;
54518
54522
  case "GPOS":
54519
- p = C;
54523
+ f = C;
54520
54524
  break;
54521
54525
  case "GSUB":
54522
- f = C;
54526
+ p = C;
54523
54527
  break;
54524
54528
  case "meta":
54525
54529
  _ = C;
@@ -54545,12 +54549,12 @@ function RC(r, t) {
54545
54549
  var O = C1(n, h);
54546
54550
  s.tables.gdef = _C.parse(O.data, O.offset);
54547
54551
  }
54548
- if (p) {
54549
- var P = C1(n, p);
54552
+ if (f) {
54553
+ var P = C1(n, f);
54550
54554
  s.tables.gpos = CC.parse(P.data, P.offset), s.position.init();
54551
54555
  }
54552
- if (f) {
54553
- var N = C1(n, f);
54556
+ if (p) {
54557
+ var N = C1(n, p);
54554
54558
  s.tables.gsub = e8.parse(N.data, N.offset);
54555
54559
  }
54556
54560
  if (c) {
@@ -54609,7 +54613,7 @@ function OC(r) {
54609
54613
  }
54610
54614
  const W5 = /* @__PURE__ */ new Map(), i4 = /* @__PURE__ */ new Map();
54611
54615
  function T4(r, t, e, a, s) {
54612
- var f, m, v, y;
54616
+ var p, m, v, y;
54613
54617
  let n = 0, i = a[n];
54614
54618
  for (; e.has(i); )
54615
54619
  n++, i = a[n];
@@ -54626,42 +54630,42 @@ function T4(r, t, e, a, s) {
54626
54630
  e.add(i);
54627
54631
  const { font: o, buffer: l } = g0.findBestMatchFontByStyle({
54628
54632
  ff: i,
54629
- bl: (f = s.bl) != null ? f : t1.FALSE,
54633
+ bl: (p = s.bl) != null ? p : t1.FALSE,
54630
54634
  it: (m = s.it) != null ? m : t1.FALSE
54631
54635
  });
54632
54636
  let u = W5.get(o.fullName);
54633
54637
  u || (u = RC(l), W5.set(o.fullName, u));
54634
54638
  const d = [], c = u.stringToGlyphs(r), g = (v = r.match(/[\s\S]/gu)) != null ? v : [];
54635
- let h = 0, p = 0;
54639
+ let h = 0, f = 0;
54636
54640
  for (; h < c.length; ) {
54637
54641
  const z = c[h];
54638
54642
  if (z.index !== 0)
54639
54643
  d.push({
54640
54644
  char: g[h],
54641
- start: p + t,
54642
- end: p + t + g[h].length,
54645
+ start: f + t,
54646
+ end: f + t + g[h].length,
54643
54647
  glyph: z,
54644
54648
  font: u,
54645
54649
  kerning: 0,
54646
54650
  boundingBox: z.getBoundingBox()
54647
54651
  });
54648
54652
  else {
54649
- const _ = p, w = r.substring(_).match(c4);
54653
+ const _ = f, w = r.substring(_).match(c4);
54650
54654
  if (w) {
54651
54655
  let C = 0;
54652
54656
  do
54653
- C += g[h].length, p += g[h].length, h++;
54657
+ C += g[h].length, f += g[h].length, h++;
54654
54658
  while (C < w[0].length);
54655
54659
  d.push(...T4(r.slice(_, _ + w[0].length), t + _, e, a, s));
54656
54660
  continue;
54657
54661
  } else {
54658
54662
  let C = c[h + 1], x = g[h + 1];
54659
54663
  for (; (C == null ? void 0 : C.index) === 0 && !c4.test(x); )
54660
- p += g[h].length, h++, C = c[h + 1], x = g[h + 1];
54661
- d.push(...T4(r.slice(_, p + g[h].length), t + _, e, a, s));
54664
+ f += g[h].length, h++, C = c[h + 1], x = g[h + 1];
54665
+ d.push(...T4(r.slice(_, f + g[h].length), t + _, e, a, s));
54662
54666
  }
54663
54667
  }
54664
- p += (y = g[h]) == null ? void 0 : y.length, h++;
54668
+ f += (y = g[h]) == null ? void 0 : y.length, h++;
54665
54669
  }
54666
54670
  return e.delete(i), d;
54667
54671
  }
@@ -54703,7 +54707,7 @@ function PC(r, t, e, a, s, n) {
54703
54707
  const d = (u = l.match(/^[\s\S]/gu)) == null ? void 0 : u[0];
54704
54708
  if (d == null || Zv(d) || h4(t.substring(o)))
54705
54709
  break;
54706
- const c = f3(r + o, e, a, s, n), g = P2(d, c);
54710
+ const c = f3(r + o, e, a, s, n), g = N2(d, c);
54707
54711
  i.push(g), l = l.substring(d.length), o += d.length;
54708
54712
  }
54709
54713
  return {
@@ -54723,14 +54727,14 @@ function NC(r, t, e, a, s, n) {
54723
54727
  }
54724
54728
  return {
54725
54729
  step: l,
54726
- glyphGroup: [P2(o.join(""), i)]
54730
+ glyphGroup: [N2(o.join(""), i)]
54727
54731
  };
54728
54732
  }
54729
54733
  function $C(r, t, e, a, s, n) {
54730
54734
  const i = f3(r, e, a, s, n), o = t.match(c4);
54731
54735
  return {
54732
54736
  step: o[0].length,
54733
- glyphGroup: [P2(o[0], i)]
54737
+ glyphGroup: [N2(o[0], i)]
54734
54738
  };
54735
54739
  }
54736
54740
  function UC(r, t, e, a, s, n) {
@@ -54780,12 +54784,12 @@ function WC(r, t, e, a, s, n = !1) {
54780
54784
  drawings: u = {}
54781
54785
  } = s, d = [];
54782
54786
  let c = new J7(t);
54783
- const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle: p = {} } = h, { snapToGrid: f = t1.TRUE } = p;
54787
+ const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle: f = {} } = h, { snapToGrid: p = t1.TRUE } = f;
54784
54788
  let m = 0, v, y = 0;
54785
54789
  const { hyphen: z, languageDetector: _ } = r, j = MC(e.getBody(), g);
54786
54790
  let w = [];
54787
54791
  n && (w = LC(j)), c_(c), d_(c), c = new u_(c);
54788
- const C = _.detect(t), x = qC(p, s), S = s.doNotHyphenateCaps === t1.TRUE;
54792
+ const C = _.detect(t), x = qC(f, s), S = s.doNotHyphenateCaps === t1.TRUE;
54789
54793
  for (C !== u1.UNKNOWN && x && (z.hasPattern(C) ? c = new r_(c, z, C, S) : z.loadPattern(C)); v = c.nextBreakPoint(); ) {
54790
54794
  const M = t.slice(m, v.position), B = [];
54791
54795
  if (g0.isReady && n) {
@@ -54801,13 +54805,13 @@ function WC(r, t, e, a, s, n = !1) {
54801
54805
  for (const P of I) {
54802
54806
  const { start: N, char: $ } = P, H = f3(N, e, a, s, h);
54803
54807
  if ($ === J.TAB) {
54804
- const K = l0(o, l, i, f), Q = q6(H, K);
54808
+ const K = l0(o, l, i, p), Q = q6(H, K);
54805
54809
  B.push(Q);
54806
54810
  } else if (h4($)) {
54807
- const K = P2($, H);
54811
+ const K = N2($, H);
54808
54812
  B.push(K);
54809
54813
  } else {
54810
- const K = P2($, H, void 0, P);
54814
+ const K = N2($, H, void 0, P);
54811
54815
  B.push(K);
54812
54816
  }
54813
54817
  }
@@ -54829,14 +54833,14 @@ function WC(r, t, e, a, s, n = !1) {
54829
54833
  } else
54830
54834
  $ = W6(N, 0, 0, Q.drawingId);
54831
54835
  }
54832
- $ == null && ($ = P2(P, N)), B.push($), O += P.length, I = I.substring(P.length);
54836
+ $ == null && ($ = N2(P, N)), B.push($), O += P.length, I = I.substring(P.length);
54833
54837
  } else if (/\s/.test(P) || x0(P)) {
54834
54838
  const N = f3(O, e, a, s, h);
54835
54839
  let $ = null;
54836
54840
  if (P === J.TAB) {
54837
- const H = l0(o, l, i, f);
54841
+ const H = l0(o, l, i, p);
54838
54842
  $ = q6(N, H);
54839
- } else P === J.PARAGRAPH && ((T = s.renderConfig) == null ? void 0 : T.zeroWidthParagraphBreak) === t1.TRUE ? $ = P2(P, N, 0) : $ = P2(P, N);
54843
+ } else P === J.PARAGRAPH && ((T = s.renderConfig) == null ? void 0 : T.zeroWidthParagraphBreak) === t1.TRUE ? $ = N2(P, N, 0) : $ = N2(P, N);
54840
54844
  B.push($), O += P.length, I = I.substring(P.length);
54841
54845
  } else if (h4(I)) {
54842
54846
  const { step: N, glyphGroup: $ } = $C(
@@ -54904,7 +54908,7 @@ function YC(r, t, e, a, s) {
54904
54908
  pz();
54905
54909
  const { content: n = "", children: i } = e;
54906
54910
  let o = null;
54907
- i.length === 1 && i[0].nodeType === V1.TABLE && (o = Ly(
54911
+ i.length === 1 && i[0].nodeType === G1.TABLE && (o = Ly(
54908
54912
  r,
54909
54913
  a,
54910
54914
  t,
@@ -54949,7 +54953,7 @@ function k6(r, t, e, a, s, n) {
54949
54953
  for (let d = l; d < e.children.length; d++) {
54950
54954
  const c = e.children[d];
54951
54955
  let g = [], h = a;
54952
- if (i.length > 0 && (h = i[i.length - 1]), c.nodeType === V1.PARAGRAPH && (r.paragraphsOpenNewPage.has(c.endIndex) && (h = _3(
54956
+ if (i.length > 0 && (h = i[i.length - 1]), c.nodeType === G1.PARAGRAPH && (r.paragraphsOpenNewPage.has(c.endIndex) && (h = _3(
54953
54957
  r,
54954
54958
  s,
54955
54959
  r.skeletonResourceReference,
@@ -55105,14 +55109,14 @@ const _0 = class _0 {
55105
55109
  if (!this._patterns.has(e))
55106
55110
  throw new Error(`Language pattern not found for ${e}, please load pattern before hyphenating`);
55107
55111
  const { levelsTable: s, pattern: n } = this._patterns.get(e), i = new Array(t.length + 1).fill(0), o = `.${t.toLocaleLowerCase()}.`.split(""), [l, u] = QC(o);
55108
- let d, c, g, h, p, f, m = -1, v, y, z;
55112
+ let d, c, g, h, f, p, m = -1, v, y, z;
55109
55113
  for (; (d = l()).length > 0; )
55110
55114
  for (m++, u() && m--, g = n, v = ex(d), y = v[0], z = v[1]; (c = y()) && g[c] !== void 0; )
55111
- if (h = g[c], g = h[0], p = h[1], g === void 0 && (g = {}, p = h), !z() && p !== void 0) {
55112
- f = s[p];
55113
- for (let w = 0; w < f.length; w++)
55115
+ if (h = g[c], g = h[0], f = h[1], g === void 0 && (g = {}, f = h), !z() && f !== void 0) {
55116
+ p = s[f];
55117
+ for (let w = 0; w < p.length; w++)
55114
55118
  i[m + w] = Math.max(
55115
- +f[w],
55119
+ +p[w],
55116
55120
  i[m + w]
55117
55121
  );
55118
55122
  }
@@ -55616,7 +55620,7 @@ class v3 extends Y8 {
55616
55620
  const s = e.parent, n = s == null ? void 0 : s.parent, i = n == null ? void 0 : n.parent, o = i == null ? void 0 : i.parent, l = o == null ? void 0 : o.parent, u = this.getSkeletonData();
55617
55621
  if (!s || !i || !o || !l || !u)
55618
55622
  return;
55619
- const d = l.type, c = s.glyphGroup.indexOf(e), g = n.divides.indexOf(s), h = i.lines.indexOf(n), p = o.columns.indexOf(i), f = l.sections.indexOf(o);
55623
+ const d = l.type, c = s.glyphGroup.indexOf(e), g = n.divides.indexOf(s), h = i.lines.indexOf(n), f = o.columns.indexOf(i), p = l.sections.indexOf(o);
55620
55624
  let m = -1;
55621
55625
  const v = X5(l);
55622
55626
  switch (d) {
@@ -55640,8 +55644,8 @@ class v3 extends Y8 {
55640
55644
  glyph: c,
55641
55645
  divide: g,
55642
55646
  line: h,
55643
- column: p,
55644
- section: f,
55647
+ column: f,
55648
+ section: p,
55645
55649
  page: m,
55646
55650
  segmentPage: a,
55647
55651
  pageType: d,
@@ -55668,7 +55672,7 @@ class v3 extends Y8 {
55668
55672
  const o = this.getSkeletonData();
55669
55673
  if (!o)
55670
55674
  return;
55671
- const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page: p, segmentPageIndex: f, pageType: m } = i, v = X5(p);
55675
+ const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page: f, segmentPageIndex: p, pageType: m } = i, v = X5(f);
55672
55676
  let y = -1;
55673
55677
  switch (m) {
55674
55678
  case c1.HEADER:
@@ -55677,7 +55681,7 @@ class v3 extends Y8 {
55677
55681
  break;
55678
55682
  }
55679
55683
  case c1.BODY: {
55680
- y = l.indexOf(p);
55684
+ y = l.indexOf(f);
55681
55685
  break;
55682
55686
  }
55683
55687
  case c1.CELL: {
@@ -55692,10 +55696,10 @@ class v3 extends Y8 {
55692
55696
  divide: c.divides.indexOf(d),
55693
55697
  line: g.lines.indexOf(c),
55694
55698
  column: h.columns.indexOf(g),
55695
- section: p.sections.indexOf(h),
55699
+ section: f.sections.indexOf(h),
55696
55700
  page: y,
55697
55701
  pageType: m,
55698
- segmentPage: f,
55702
+ segmentPage: p,
55699
55703
  isBack: a,
55700
55704
  path: v
55701
55705
  };
@@ -55711,8 +55715,8 @@ class v3 extends Y8 {
55711
55715
  const a = this.getSkeletonData();
55712
55716
  if (a == null)
55713
55717
  return;
55714
- const { pages: s, skeFooters: n, skeHeaders: i } = a, { divide: o, line: l, column: u, section: d, segmentPage: c, pageType: g, path: h, isBack: p } = e;
55715
- let { glyph: f } = e, m = null;
55718
+ const { pages: s, skeFooters: n, skeHeaders: i } = a, { divide: o, line: l, column: u, section: d, segmentPage: c, pageType: g, path: h, isBack: f } = e;
55719
+ let { glyph: p } = e, m = null;
55716
55720
  if (g === c1.HEADER || g === c1.FOOTER) {
55717
55721
  m = s[c];
55718
55722
  const { headerId: _, footerId: j, pageWidth: w } = m;
@@ -55732,7 +55736,7 @@ class v3 extends Y8 {
55732
55736
  if (m == null)
55733
55737
  return;
55734
55738
  const v = m.sections[d].columns[u].lines[l].divides[o].glyphGroup;
55735
- return f = Math.min(f, v.length - 1), v[f].glyphType === e2.LIST && (f += 1), v[f];
55739
+ return p = Math.min(p, v.length - 1), v[p].glyphType === e2.LIST && (p += 1), v[p];
55736
55740
  }
55737
55741
  findEditAreaByCoord(e, a, s, n) {
55738
55742
  const { x: i, y: o } = e;
@@ -55746,21 +55750,21 @@ class v3 extends Y8 {
55746
55750
  };
55747
55751
  this._findLiquid.reset();
55748
55752
  const { pages: g } = c;
55749
- for (let h = 0, p = g.length; h < p; h++) {
55750
- const f = g[h], { marginTop: m, marginBottom: v, pageWidth: y, pageHeight: z } = f;
55753
+ for (let h = 0, f = g.length; h < f; h++) {
55754
+ const p = g[h], { marginTop: m, marginBottom: v, pageWidth: y, pageHeight: z } = p;
55751
55755
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y && o < this._findLiquid.y + m) {
55752
- l = d3.HEADER, d = f, u = h;
55756
+ l = d3.HEADER, d = p, u = h;
55753
55757
  break;
55754
55758
  }
55755
55759
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + m && o < this._findLiquid.y + z - v) {
55756
- l = d3.BODY, d = f, u = h;
55760
+ l = d3.BODY, d = p, u = h;
55757
55761
  break;
55758
55762
  }
55759
55763
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + z - v && o < this._findLiquid.y + z) {
55760
- l = d3.FOOTER, d = f, u = h;
55764
+ l = d3.FOOTER, d = p, u = h;
55761
55765
  break;
55762
55766
  }
55763
- this._translatePage(f, a, s, n);
55767
+ this._translatePage(p, a, s, n);
55764
55768
  }
55765
55769
  return {
55766
55770
  editArea: l,
@@ -55776,12 +55780,12 @@ class v3 extends Y8 {
55776
55780
  const d = {
55777
55781
  nearestNodeList: [],
55778
55782
  nearestNodeDistanceList: []
55779
- }, { pages: c, skeHeaders: g, skeFooters: h } = u, p = this.findEditAreaByCoord(e, a, s, n).editArea, f = c.length;
55783
+ }, { pages: c, skeHeaders: g, skeFooters: h } = u, f = this.findEditAreaByCoord(e, a, s, n).editArea, p = c.length;
55780
55784
  if (this._findLiquid.reset(), i == null)
55781
- for (let w = 0; w < f; w++) {
55785
+ for (let w = 0; w < p; w++) {
55782
55786
  const C = c[w], { headerId: x, footerId: S, pageWidth: F } = C;
55783
55787
  let T = null;
55784
- if (p === d3.HEADER || p === d3.FOOTER) {
55788
+ if (f === d3.HEADER || f === d3.FOOTER) {
55785
55789
  const M = (m = g.get(x)) == null ? void 0 : m.get(F);
55786
55790
  M && (T = this._collectNearestNode(
55787
55791
  M,
@@ -55792,7 +55796,7 @@ class v3 extends Y8 {
55792
55796
  d,
55793
55797
  o,
55794
55798
  l,
55795
- f
55799
+ p
55796
55800
  ));
55797
55801
  const B = (v = h.get(S)) == null ? void 0 : v.get(F);
55798
55802
  B && (T = T != null ? T : this._collectNearestNode(
@@ -55804,7 +55808,7 @@ class v3 extends Y8 {
55804
55808
  d,
55805
55809
  o,
55806
55810
  l,
55807
- f
55811
+ p
55808
55812
  ));
55809
55813
  } else
55810
55814
  T = this._collectNearestNode(
@@ -55816,7 +55820,7 @@ class v3 extends Y8 {
55816
55820
  d,
55817
55821
  o,
55818
55822
  l,
55819
- f
55823
+ p
55820
55824
  );
55821
55825
  if (T)
55822
55826
  return T;
@@ -55826,7 +55830,7 @@ class v3 extends Y8 {
55826
55830
  const { segmentId: w, segmentPage: C, strict: x } = i;
55827
55831
  let S = null;
55828
55832
  if (x === !1)
55829
- for (let F = 0; F < f; F++) {
55833
+ for (let F = 0; F < p; F++) {
55830
55834
  const T = c[F], { headerId: M, footerId: B, pageWidth: A } = T;
55831
55835
  if (w !== "") {
55832
55836
  const L = (y = g.get(M)) == null ? void 0 : y.get(A);
@@ -55839,7 +55843,7 @@ class v3 extends Y8 {
55839
55843
  d,
55840
55844
  o,
55841
55845
  l,
55842
- f
55846
+ p
55843
55847
  ));
55844
55848
  const I = (z = h.get(B)) == null ? void 0 : z.get(A);
55845
55849
  I && (S = S != null ? S : this._collectNearestNode(
@@ -55851,7 +55855,7 @@ class v3 extends Y8 {
55851
55855
  d,
55852
55856
  o,
55853
55857
  l,
55854
- f
55858
+ p
55855
55859
  ));
55856
55860
  } else
55857
55861
  S = this._collectNearestNode(
@@ -55863,14 +55867,14 @@ class v3 extends Y8 {
55863
55867
  d,
55864
55868
  o,
55865
55869
  l,
55866
- f
55870
+ p
55867
55871
  );
55868
55872
  if (S)
55869
55873
  return S;
55870
55874
  this._translatePage(T, a, s, n);
55871
55875
  }
55872
55876
  else
55873
- for (let F = 0; F < f; F++) {
55877
+ for (let F = 0; F < p; F++) {
55874
55878
  const T = c[F];
55875
55879
  if (w) {
55876
55880
  if (C !== F) {
@@ -55887,7 +55891,7 @@ class v3 extends Y8 {
55887
55891
  d,
55888
55892
  o,
55889
55893
  l,
55890
- f
55894
+ p
55891
55895
  ));
55892
55896
  } else
55893
55897
  S = this._collectNearestNode(
@@ -55899,7 +55903,7 @@ class v3 extends Y8 {
55899
55903
  d,
55900
55904
  o,
55901
55905
  l,
55902
- f
55906
+ p
55903
55907
  );
55904
55908
  if (S)
55905
55909
  return S;
@@ -55912,8 +55916,8 @@ class v3 extends Y8 {
55912
55916
  var _, j, w, C, x, S, F, T, M;
55913
55917
  const { sections: g, skeTables: h } = e;
55914
55918
  this._findLiquid.translateSave();
55915
- const p = this._findLiquid.x, f = p + s.pageWidth, m = this._findLiquid.y + (a === c1.FOOTER ? s.pageHeight - e.pageHeight : 0), v = m + e.pageHeight;
55916
- let y = l >= p && l <= f && u >= m && u <= v;
55919
+ const f = this._findLiquid.x, p = f + s.pageWidth, m = this._findLiquid.y + (a === c1.FOOTER ? s.pageHeight - e.pageHeight : 0), v = m + e.pageHeight;
55920
+ let y = l >= f && l <= p && u >= m && u <= v;
55917
55921
  if (c === 0 && a === c1.BODY) {
55918
55922
  const B = i === 0, A = i === d - 1, L = s.originMarginTop / 2;
55919
55923
  B && A ? y = !0 : B ? y = u <= v + L : A ? y = u >= m - L : y = u >= m - L && u <= v + L;
@@ -55957,7 +55961,7 @@ class v3 extends Y8 {
55957
55961
  for (const w1 of j1) {
55958
55962
  if (!w1.content || w1.content.length === 0)
55959
55963
  continue;
55960
- const { width: H1, left: z1 } = w1, E1 = p1 + z1, P1 = p1 + z1 + H1, G1 = Math.abs(l - P1);
55964
+ const { width: H1, left: z1 } = w1, E1 = p1 + z1, P1 = p1 + z1 + H1, q1 = Math.abs(l - P1);
55961
55965
  if (u >= h1 && u <= g1) {
55962
55966
  if (l >= E1 && l <= P1)
55963
55967
  return {
@@ -55975,7 +55979,7 @@ class v3 extends Y8 {
55975
55979
  ratioY: u / (h1 + g1)
55976
55980
  }), o.nearestNodeDistanceList.push({
55977
55981
  coordInPage: y,
55978
- distance: G1,
55982
+ distance: q1,
55979
55983
  nestLevel: c
55980
55984
  }), B = Number.NEGATIVE_INFINITY;
55981
55985
  continue;
@@ -55988,7 +55992,7 @@ class v3 extends Y8 {
55988
55992
  ratioY: u / (h1 + g1)
55989
55993
  }), o.nearestNodeDistanceList.push({
55990
55994
  coordInPage: y,
55991
- distance: G1,
55995
+ distance: q1,
55992
55996
  nestLevel: c
55993
55997
  }));
55994
55998
  }
@@ -56092,13 +56096,13 @@ class v3 extends Y8 {
56092
56096
  paragraphLineGapDefault: d,
56093
56097
  defaultTabStop: c,
56094
56098
  documentTextStyle: g
56095
- }, p = bz(), { skeHeaders: f, skeFooters: m, skeListLevel: v, drawingAnchor: y } = p;
56099
+ }, f = bz(), { skeHeaders: p, skeFooters: m, skeListLevel: v, drawingAnchor: y } = f;
56096
56100
  return {
56097
56101
  viewModel: e,
56098
56102
  dataModel: a,
56099
- skeleton: p,
56103
+ skeleton: f,
56100
56104
  skeletonResourceReference: {
56101
- skeHeaders: f,
56105
+ skeHeaders: p,
56102
56106
  skeFooters: m,
56103
56107
  skeListLevel: v,
56104
56108
  drawingAnchor: y
@@ -56151,18 +56155,18 @@ class v3 extends Y8 {
56151
56155
  const u = e.layoutStartPointer[""];
56152
56156
  if (e.layoutStartPointer[""] = null, u != null)
56153
56157
  for (let c = 0; c < s.getChildren().length; c++) {
56154
- const g = s.getChildren()[c], { endIndex: h, startIndex: p } = g;
56155
- if (u >= p && u <= h) {
56158
+ const g = s.getChildren()[c], { endIndex: h, startIndex: f } = g;
56159
+ if (u >= f && u <= h) {
56156
56160
  l = c;
56157
56161
  break;
56158
56162
  }
56159
56163
  }
56160
56164
  for (let c = l, g = s.getChildren().length; c < g; c++) {
56161
- const h = s.getChildren()[c], p = wz(e, c), { sectionType: f, columnProperties: m, columnSeparatorType: v, sectionTypeNext: y, pageNumberStart: z = 1 } = p;
56165
+ const h = s.getChildren()[c], f = wz(e, c), { sectionType: p, columnProperties: m, columnSeparatorType: v, sectionTypeNext: y, pageNumberStart: z = 1 } = f;
56162
56166
  let _ = $3(o), j = !1;
56163
- e.sectionBreakConfigCache.set(h.endIndex, p), f === e0.CONTINUOUS ? (u0(o), this._addNewSectionByContinuous(_, m, v), j = !0) : (u == null || _ == null) && (_ = _3(
56167
+ e.sectionBreakConfigCache.set(h.endIndex, f), p === e0.CONTINUOUS ? (u0(o), this._addNewSectionByContinuous(_, m, v), j = !0) : (u == null || _ == null) && (_ = _3(
56164
56168
  e,
56165
- p,
56169
+ f,
56166
56170
  i,
56167
56171
  (d = _ == null ? void 0 : _.pageNumber) != null ? d : z
56168
56172
  ));
@@ -56171,7 +56175,7 @@ class v3 extends Y8 {
56171
56175
  s,
56172
56176
  h,
56173
56177
  _,
56174
- p,
56178
+ f,
56175
56179
  u
56176
56180
  );
56177
56181
  if (y === e0.CONTINUOUS && m.length > 0, j && w.splice(0, 1), o.push(...w), e.isDirty)
@@ -56197,13 +56201,13 @@ class v3 extends Y8 {
56197
56201
  marginBottom: d,
56198
56202
  marginLeft: c,
56199
56203
  marginRight: g
56200
- } = e, h = o - c - g, p = l - u - d, f = ((i == null ? void 0 : i.top) || 0) + ((i == null ? void 0 : i.height) || 0), m = rt(
56204
+ } = e, h = o - c - g, f = l - u - d, p = ((i == null ? void 0 : i.top) || 0) + ((i == null ? void 0 : i.height) || 0), m = rt(
56201
56205
  a,
56202
56206
  s,
56203
- f,
56207
+ p,
56204
56208
  0,
56205
56209
  h,
56206
- p - f
56210
+ f - p
56207
56211
  );
56208
56212
  m.parent = e, n.push(m);
56209
56213
  }
@@ -56217,27 +56221,27 @@ class v3 extends Y8 {
56217
56221
  const g = i.indexOf(c);
56218
56222
  if (a && g !== s)
56219
56223
  continue;
56220
- const { pageWidth: h, skeTables: p } = c;
56221
- let f = c;
56224
+ const { pageWidth: h, skeTables: f } = c;
56225
+ let p = c;
56222
56226
  if (a) {
56223
56227
  const z = (u = l.get(a)) == null ? void 0 : u.get(h), _ = (d = o.get(a)) == null ? void 0 : d.get(h);
56224
56228
  if (z)
56225
- f = z;
56229
+ p = z;
56226
56230
  else if (_)
56227
- f = _;
56231
+ p = _;
56228
56232
  else
56229
56233
  continue;
56230
56234
  }
56231
56235
  if (a === "") {
56232
56236
  let z = !1;
56233
- for (const _ of p.values()) {
56237
+ for (const _ of f.values()) {
56234
56238
  const { rows: j } = _;
56235
56239
  for (const w of j) {
56236
56240
  const { cells: C } = w;
56237
56241
  for (const x of C) {
56238
56242
  const { st: S, ed: F } = x;
56239
56243
  if (e >= S && e <= F) {
56240
- f = x, z = !0;
56244
+ p = x, z = !0;
56241
56245
  break;
56242
56246
  }
56243
56247
  }
@@ -56248,7 +56252,7 @@ class v3 extends Y8 {
56248
56252
  break;
56249
56253
  }
56250
56254
  }
56251
- const { sections: m, st: v, ed: y } = f;
56255
+ const { sections: m, st: v, ed: y } = p;
56252
56256
  if (!(e < v || e > y))
56253
56257
  for (const z of m) {
56254
56258
  const { columns: _, st: j, ed: w } = z;
@@ -56267,8 +56271,8 @@ class v3 extends Y8 {
56267
56271
  for (const K of P)
56268
56272
  if (H -= K.count, H < 0)
56269
56273
  return {
56270
- page: f,
56271
- pageType: f.type,
56274
+ page: p,
56275
+ pageType: p.type,
56272
56276
  section: z,
56273
56277
  column: C,
56274
56278
  line: T,
@@ -56291,7 +56295,7 @@ function $e(r, t, e = {}) {
56291
56295
  verticalAlign: o = m2.UNSPECIFIED,
56292
56296
  wrapStrategy: l = O1.UNSPECIFIED,
56293
56297
  cellValueType: u
56294
- } = e, { t: d, r: c, b: g, l: h } = n || h2, { vertexAngle: p, centerAngle: f } = A3(s), m = {
56298
+ } = e, { t: d, r: c, b: g, l: h } = n || h2, { vertexAngle: f, centerAngle: p } = A3(s), m = {
56295
56299
  id: "d",
56296
56300
  body: {
56297
56301
  dataStream: `${r}${d7}`,
@@ -56326,8 +56330,8 @@ function $e(r, t, e = {}) {
56326
56330
  renderConfig: {
56327
56331
  horizontalAlign: i,
56328
56332
  verticalAlign: o,
56329
- centerAngle: f,
56330
- vertexAngle: p,
56333
+ centerAngle: p,
56334
+ vertexAngle: f,
56331
56335
  wrapStrategy: l,
56332
56336
  cellValueType: u
56333
56337
  }
@@ -56394,17 +56398,17 @@ let Z5 = class extends Z8 {
56394
56398
  k(this, "_cacheRangeMap", /* @__PURE__ */ new Map());
56395
56399
  k(this, "_visibleRangeMap", /* @__PURE__ */ new Map());
56396
56400
  // private _dataMergeCache: IRange[] = [];
56397
- k(this, "_overflowCache", new Y1());
56401
+ k(this, "_overflowCache", new X1());
56398
56402
  k(this, "_stylesCache", {
56399
56403
  background: {},
56400
- backgroundPositions: new Y1(),
56401
- fontMatrix: new Y1(),
56402
- border: new Y1()
56404
+ backgroundPositions: new X1(),
56405
+ fontMatrix: new X1(),
56406
+ border: new X1()
56403
56407
  });
56404
56408
  k(this, "_clearTaskId", null);
56405
56409
  /** A matrix to store if a (row, column) position has render cache. */
56406
- k(this, "_handleBgMatrix", new Y1());
56407
- k(this, "_handleBorderMatrix", new Y1());
56410
+ k(this, "_handleBgMatrix", new X1());
56411
+ k(this, "_handleBorderMatrix", new X1());
56408
56412
  k(this, "_showGridlines", t1.TRUE);
56409
56413
  k(this, "_gridlinesColor");
56410
56414
  k(this, "_scene", null);
@@ -56468,9 +56472,9 @@ let Z5 = class extends Z8 {
56468
56472
  endColumn: -1
56469
56473
  }, this._stylesCache = {
56470
56474
  background: {},
56471
- backgroundPositions: new Y1(),
56472
- fontMatrix: new Y1(),
56473
- border: new Y1()
56475
+ backgroundPositions: new X1(),
56476
+ fontMatrix: new X1(),
56477
+ border: new X1()
56474
56478
  }, this._handleBgMatrix.reset(), this._handleBorderMatrix.reset(), this._overflowCache.reset();
56475
56479
  }
56476
56480
  /**
@@ -56560,15 +56564,15 @@ let Z5 = class extends Z8 {
56560
56564
  return [];
56561
56565
  const a = [], { rowData: s } = this._worksheetData, n = s, i = /* @__PURE__ */ new Set(), o = this.worksheet.getRowCount();
56562
56566
  for (const c of t) {
56563
- const { startRow: g, endRow: h, startColumn: p, endColumn: f } = c, m = Math.min(h, o);
56567
+ const { startRow: g, endRow: h, startColumn: f, endColumn: p } = c, m = Math.min(h, o);
56564
56568
  for (let v = g; v <= m; v++) {
56565
56569
  if (i.has(v) || ((l = n[v]) == null ? void 0 : l.ia) === t1.FALSE)
56566
56570
  continue;
56567
- if (this._hasUnMergedCellInRow(v, p, f))
56571
+ if (this._hasUnMergedCellInRow(v, f, p))
56568
56572
  if (e) {
56569
56573
  const z = this.worksheet.getRowHeight(v);
56570
56574
  let _ = 0, j = 0;
56571
- for (let w = p; w <= f; w++) {
56575
+ for (let w = f; w <= p; w++) {
56572
56576
  const C = (u = e.getValue(v, w)) != null ? u : 0;
56573
56577
  _ = Math.max(_, C);
56574
56578
  const x = (d = this.calculateAutoHeightForCell(v, w)) != null ? d : this._worksheetData.defaultRowHeight;
@@ -56604,7 +56608,7 @@ let Z5 = class extends Z8 {
56604
56608
  }
56605
56609
  // eslint-disable-next-line max-lines-per-function, complexity
56606
56610
  calculateAutoHeightForCell(t, e) {
56607
- var h, p, f, m, v, y, z, _, j, w, C, x, S, F, T, M;
56611
+ var h, f, p, m, v, y, z, _, j, w, C, x, S, F, T, M;
56608
56612
  const { columnData: a, defaultColumnWidth: s } = this._worksheetData, n = this.worksheet.getCellInfoInMergeData(t, e);
56609
56613
  if (this._skipAutoHeightForMergedCells && (n.isMerged || n.isMergedMainCell))
56610
56614
  return;
@@ -56614,7 +56618,7 @@ let Z5 = class extends Z8 {
56614
56618
  if (B)
56615
56619
  return B;
56616
56620
  }
56617
- const l = ((p = (h = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : h.leftOffset) != null ? p : 0) + ((m = (f = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : f.rightOffset) != null ? m : 0), { vertexAngle: u, centerAngle: d } = A3((v = o == null ? void 0 : o.tr) != null ? v : { a: 0 }), c = (i == null ? void 0 : i.p) || u || d;
56621
+ const l = ((f = (h = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : h.leftOffset) != null ? f : 0) + ((m = (p = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : p.rightOffset) != null ? m : 0), { vertexAngle: u, centerAngle: d } = A3((v = o == null ? void 0 : o.tr) != null ? v : { a: 0 }), c = (i == null ? void 0 : i.p) || u || d;
56618
56622
  let g = (z = (y = a[e]) == null ? void 0 : y.w) != null ? z : s;
56619
56623
  if (n.isMergedMainCell) {
56620
56624
  const B = n.startColumn, A = n.endColumn;
@@ -56718,19 +56722,19 @@ let Z5 = class extends Z8 {
56718
56722
  const d = (y, z, _) => [...Array.from(
56719
56723
  { length: z - y + 1 },
56720
56724
  (w, C) => C + y
56721
- ), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l), p = Math.max(0, t - 1);
56722
- let f = this.columnWidthAccumulation[t] - this.columnWidthAccumulation[p];
56723
- t === 0 && (f = this.columnWidthAccumulation[t]);
56725
+ ), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l), f = Math.max(0, t - 1);
56726
+ let p = this.columnWidthAccumulation[t] - this.columnWidthAccumulation[f];
56727
+ t === 0 && (p = this.columnWidthAccumulation[t]);
56724
56728
  for (let y = 0; y < h.length; y++) {
56725
56729
  const z = h[y], { isMerged: _, isMergedMainCell: j } = this.worksheet.getCellInfoInMergeData(t, z);
56726
56730
  if (_ && !j || !this.worksheet.getRowVisible(z)) continue;
56727
56731
  const w = e.getCell(z, t);
56728
56732
  if (!w || w.p && (z + R6 <= n || z - R6 >= i))
56729
56733
  continue;
56730
- let C = this._getMeasuredWidthByCell(w, z, t, f);
56734
+ let C = this._getMeasuredWidthByCell(w, z, t, p);
56731
56735
  if (w.fontRenderExtension && (C += (((m = w.fontRenderExtension) == null ? void 0 : m.leftOffset) || 0) + (((v = w.fontRenderExtension) == null ? void 0 : v.rightOffset) || 0)), a = Math.max(a, C), a >= j6) return j6;
56732
56736
  }
56733
- return a === 0 ? f : Math.max(pa, a);
56737
+ return a === 0 ? p : Math.max(pa, a);
56734
56738
  }
56735
56739
  getColWidth(t) {
56736
56740
  const e = Math.max(0, t - 1);
@@ -56746,10 +56750,10 @@ let Z5 = class extends Z8 {
56746
56750
  * @returns {number} currColWidth
56747
56751
  */
56748
56752
  _getMeasuredWidthByCell(t, e, a, s) {
56749
- var h, p, f;
56753
+ var h, f, p;
56750
56754
  let n = 0;
56751
56755
  if ((h = t.fontRenderExtension) != null && h.isSkip && (t != null && t.interceptorAutoWidth)) {
56752
- const m = (p = t.interceptorAutoWidth) == null ? void 0 : p.call(t);
56756
+ const m = (f = t.interceptorAutoWidth) == null ? void 0 : f.call(t);
56753
56757
  if (m)
56754
56758
  return m;
56755
56759
  }
@@ -56762,7 +56766,7 @@ let Z5 = class extends Z8 {
56762
56766
  const d = new e3(l), { vertexAngle: c } = A3(u);
56763
56767
  (i == null ? void 0 : i.tb) === O1.WRAP ? l.updateDocumentDataPageSize(s, 1 / 0) : l.updateDocumentDataPageSize(1 / 0, 1 / 0);
56764
56768
  const g = v3.create(d, this._localeService);
56765
- if (g.calculate(), n = ((f = re(g, c)) != null ? f : { width: 0 }).width, g) {
56769
+ if (g.calculate(), n = ((p = re(g, c)) != null ? p : { width: 0 }).width, g) {
56766
56770
  const m = g.getSkeletonData(), {
56767
56771
  marginTop: v,
56768
56772
  marginBottom: y,
@@ -56900,7 +56904,7 @@ let Z5 = class extends Z8 {
56900
56904
  */
56901
56905
  // eslint-disable-next-line complexity, max-lines-per-function
56902
56906
  _getCellDocumentModel(t, e = K5) {
56903
- var f;
56907
+ var p;
56904
56908
  const { isDeepClone: a, displayRawFormula: s, ignoreTextRotation: n } = {
56905
56909
  ...K5,
56906
56910
  ...e
@@ -56909,7 +56913,7 @@ let Z5 = class extends Z8 {
56909
56913
  let o, l = "document";
56910
56914
  const u = xx(i), d = n ? d2.tr : u.textRotation || d2.tr;
56911
56915
  let c = u.horizontalAlign || d2.ht;
56912
- const g = u.verticalAlign || d2.vt, h = u.wrapStrategy || d2.tb, p = u.paddingData || h2;
56916
+ const g = u.verticalAlign || d2.vt, h = u.wrapStrategy || d2.tb, f = u.paddingData || h2;
56913
56917
  if (t.f && s)
56914
56918
  o = $e(t.f.toString(), {}, { verticalAlign: g }), c = d2.ht;
56915
56919
  else if (t.p) {
@@ -56917,7 +56921,7 @@ let Z5 = class extends Z8 {
56917
56921
  o = this._updateConfigAndGetDocumentModel(
56918
56922
  a ? o1.deepClone(t.p) : t.p,
56919
56923
  c,
56920
- p,
56924
+ f,
56921
56925
  {
56922
56926
  horizontalAlign: c,
56923
56927
  verticalAlign: g,
@@ -56931,7 +56935,7 @@ let Z5 = class extends Z8 {
56931
56935
  const m = V5(i);
56932
56936
  l = g3(m).fontCache;
56933
56937
  let v = c7(t);
56934
- t.t === T2.FORCE_STRING && s && (v = `'${v}`), o = $e(v, m, {
56938
+ t.t === B2.FORCE_STRING && s && (v = `'${v}`), o = $e(v, m, {
56935
56939
  ...u,
56936
56940
  textRotation: d,
56937
56941
  cellValueType: t.t
@@ -56944,8 +56948,8 @@ let Z5 = class extends Z8 {
56944
56948
  wrapStrategy: h,
56945
56949
  verticalAlign: g,
56946
56950
  horizontalAlign: c,
56947
- paddingData: p,
56948
- fill: (f = i == null ? void 0 : i.bg) == null ? void 0 : f.rgb
56951
+ paddingData: f,
56952
+ fill: (p = i == null ? void 0 : i.bg) == null ? void 0 : p.rgb
56949
56953
  };
56950
56954
  }
56951
56955
  /**
@@ -56955,9 +56959,9 @@ let Z5 = class extends Z8 {
56955
56959
  */
56956
56960
  // eslint-disable-next-line complexity, max-lines-per-function
56957
56961
  _calculateOverflowCell(t, e, a) {
56958
- const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d = T2.STRING } = u || {};
56962
+ const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d = B2.STRING } = u || {};
56959
56963
  let c = o;
56960
- if (o === d1.UNSPECIFIED && (i === J1 && n === J1 ? c = d1.CENTER : (n > 0 && n !== J1 || n === -J1) && (c = d1.RIGHT)), (l === O1.OVERFLOW || l === O1.UNSPECIFIED) && d !== T2.NUMBER && d !== T2.BOOLEAN && o !== d1.JUSTIFIED) {
56964
+ if (o === d1.UNSPECIFIED && (i === J1 && n === J1 ? c = d1.CENTER : (n > 0 && n !== J1 || n === -J1) && (c = d1.RIGHT)), (l === O1.OVERFLOW || l === O1.UNSPECIFIED) && d !== B2.NUMBER && d !== B2.BOOLEAN && o !== d1.JUSTIFIED) {
56961
56965
  if (this.intersectMergeRange(t, e))
56962
56966
  return !0;
56963
56967
  let g;
@@ -56982,23 +56986,23 @@ let Z5 = class extends Z8 {
56982
56986
  height: j
56983
56987
  });
56984
56988
  }
56985
- const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn: p, endColumn: f } = h;
56986
- if (p === f)
56989
+ const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn: f, endColumn: p } = h;
56990
+ if (f === p)
56987
56991
  return !0;
56988
- this.appendToOverflowCache(t, e, p, f);
56992
+ this.appendToOverflowCache(t, e, f, p);
56989
56993
  } else if (l === O1.WRAP && n !== 0) {
56990
56994
  if (this.intersectMergeRange(t, e))
56991
56995
  return !0;
56992
56996
  const { startY: g, endY: h } = this.getCellWithCoordByIndex(
56993
56997
  t,
56994
56998
  e
56995
- ), p = h - g;
56996
- s.getViewModel().getDataModel().updateDocumentDataPageSize(p), s.calculate();
56997
- const f = re(s, n);
56998
- if (!f)
56999
+ ), f = h - g;
57000
+ s.getViewModel().getDataModel().updateDocumentDataPageSize(f), s.calculate();
57001
+ const p = re(s, n);
57002
+ if (!p)
56999
57003
  return !0;
57000
57004
  const { startColumn: m, endColumn: v } = this.getOverflowPosition(
57001
- f,
57005
+ p,
57002
57006
  c,
57003
57007
  t,
57004
57008
  e,
@@ -57062,9 +57066,9 @@ let Z5 = class extends Z8 {
57062
57066
  var t, e, a;
57063
57067
  this._stylesCache = {
57064
57068
  background: {},
57065
- backgroundPositions: new Y1(),
57066
- fontMatrix: new Y1(),
57067
- border: new Y1()
57069
+ backgroundPositions: new X1(),
57070
+ fontMatrix: new X1(),
57071
+ border: new X1()
57068
57072
  }, (t = this._handleBgMatrix) == null || t.reset(), (e = this._handleBorderMatrix) == null || e.reset(), (a = this._overflowCache) == null || a.reset();
57069
57073
  }
57070
57074
  resetRangeCache(t) {
@@ -57086,7 +57090,7 @@ let Z5 = class extends Z8 {
57086
57090
  var o;
57087
57091
  if (!(o1.isDefine(this._handleBgMatrix.getValue(t, e)) || !((s == null ? void 0 : s.cacheItem) || { bg: !0 }).bg) && (this._handleBgMatrix.setValue(t, e, !0), a && a.bg && a.bg.rgb)) {
57088
57092
  const l = a.bg.rgb;
57089
- this._stylesCache.background[l] || (this._stylesCache.background[l] = new Y1()), this._stylesCache.background[l].setValue(t, e, l);
57093
+ this._stylesCache.background[l] || (this._stylesCache.background[l] = new X1()), this._stylesCache.background[l].setValue(t, e, l);
57090
57094
  const d = this.getCellWithCoordByIndex(t, e, !1);
57091
57095
  (o = this._stylesCache.backgroundPositions) == null || o.setValue(t, e, d);
57092
57096
  }
@@ -57110,16 +57114,16 @@ let Z5 = class extends Z8 {
57110
57114
  if (d) {
57111
57115
  const { documentModel: g } = d;
57112
57116
  if (g) {
57113
- const { fontString: h, wrapStrategy: p, verticalAlign: f, horizontalAlign: m } = d, v = new e3(g);
57117
+ const { fontString: h, wrapStrategy: f, verticalAlign: p, horizontalAlign: m } = d, v = new e3(g);
57114
57118
  if (v) {
57115
57119
  const y = v3.create(v, this._localeService);
57116
57120
  y.calculate(), n = {
57117
57121
  documentSkeleton: y,
57118
57122
  vertexAngle: o,
57119
57123
  centerAngle: l,
57120
- verticalAlign: f,
57124
+ verticalAlign: p,
57121
57125
  horizontalAlign: m,
57122
- wrapStrategy: p,
57126
+ wrapStrategy: f,
57123
57127
  imageCacheMap: this._imageCacheMap,
57124
57128
  cellData: a,
57125
57129
  fontString: h,
@@ -57128,14 +57132,14 @@ let Z5 = class extends Z8 {
57128
57132
  }
57129
57133
  }
57130
57134
  } else {
57131
- const g = g3(s != null ? s : void 0).fontCache, { vt: h, ht: p, tb: f } = s != null ? s : {};
57135
+ const g = g3(s != null ? s : void 0).fontCache, { vt: h, ht: f, tb: p } = s != null ? s : {};
57132
57136
  n = {
57133
57137
  documentSkeleton: void 0,
57134
57138
  vertexAngle: o,
57135
57139
  centerAngle: l,
57136
57140
  verticalAlign: h != null ? h : m2.UNSPECIFIED,
57137
- horizontalAlign: p != null ? p : d1.UNSPECIFIED,
57138
- wrapStrategy: f != null ? f : O1.OVERFLOW,
57141
+ horizontalAlign: f != null ? f : d1.UNSPECIFIED,
57142
+ wrapStrategy: p != null ? p : O1.OVERFLOW,
57139
57143
  imageCacheMap: this._imageCacheMap,
57140
57144
  cellData: a,
57141
57145
  fontString: g,
@@ -57179,10 +57183,10 @@ let Z5 = class extends Z8 {
57179
57183
  const h = this.worksheet.getCell(o, l);
57180
57184
  if (!h)
57181
57185
  break;
57182
- const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this.worksheet.getComposedCellStyleByCellData(o, l, h);
57183
- if (!f && !p)
57186
+ const f = (u = h.themeStyle) == null ? void 0 : u.bd, p = this.worksheet.getComposedCellStyleByCellData(o, l, h);
57187
+ if (!p && !f)
57184
57188
  break;
57185
- const m = (c = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? c : p == null ? void 0 : p[t];
57189
+ const m = (c = (d = p == null ? void 0 : p.bd) == null ? void 0 : d[t]) != null ? c : f == null ? void 0 : f[t];
57186
57190
  if (m) {
57187
57191
  const v = y3(m.cl) || z3;
57188
57192
  s.push({
@@ -57194,10 +57198,10 @@ let Z5 = class extends Z8 {
57194
57198
  }
57195
57199
  }
57196
57200
  s.forEach((g) => {
57197
- const { r: h, c: p, style: f, color: m } = g;
57198
- e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
57201
+ const { r: h, c: f, style: p, color: m } = g;
57202
+ e.border.getValue(h, f) || e.border.setValue(h, f, {}), e.border.getValue(h, f)[t] = {
57199
57203
  type: t,
57200
- style: f,
57204
+ style: p,
57201
57205
  color: m
57202
57206
  };
57203
57207
  });
@@ -57292,8 +57296,8 @@ function re(r, t = 0) {
57292
57296
  let l = 0, u = 0;
57293
57297
  const d = [];
57294
57298
  mz([n], (g) => {
57295
- const { lines: h, width: p, spaceWidth: f } = g, { rotatedHeight: m, rotatedWidth: v } = M7(h, p, a);
57296
- u += m, d.push({ rotatedWidth: v, spaceWidth: f });
57299
+ const { lines: h, width: f, spaceWidth: p } = g, { rotatedHeight: m, rotatedWidth: v } = M7(h, f, a);
57300
+ u += m, d.push({ rotatedWidth: v, spaceWidth: p });
57297
57301
  });
57298
57302
  const c = d.length;
57299
57303
  for (let g = 0; g < c; g++) {
@@ -57340,21 +57344,21 @@ class Rx extends C3 {
57340
57344
  const { rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s;
57341
57345
  if (!d || !g || c === void 0 || h === void 0 || !l)
57342
57346
  return;
57343
- const p = this._getScale(a), { viewRanges: f = [], checkOutOfViewBound: m } = i, v = {
57347
+ const f = this._getScale(a), { viewRanges: p = [], checkOutOfViewBound: m } = i, v = {
57344
57348
  ctx: e,
57345
- scale: p,
57349
+ scale: f,
57346
57350
  // rowHeightAccumulation,
57347
57351
  columnTotalWidth: c,
57348
57352
  // columnWidthAccumulation,
57349
57353
  rowTotalHeight: h,
57350
- viewRanges: f,
57354
+ viewRanges: p,
57351
57355
  checkOutOfViewBound: m || !0,
57352
57356
  diffRanges: n,
57353
57357
  spreadsheetSkeleton: s
57354
57358
  };
57355
57359
  e.save();
57356
57360
  const y = [], z = /* @__PURE__ */ new Set(), _ = s.getRowCount() - 1, j = s.getColumnCount() - 1;
57357
- f.forEach((w) => {
57361
+ p.forEach((w) => {
57358
57362
  w.startColumn -= s0, w.endColumn += s0, w = ab(w, _, j), s.worksheet.getMergedCellRange(w.startRow, w.startColumn, w.endRow, w.endColumn).forEach((x) => {
57359
57363
  const S = s.worksheet.getSpanModel().getMergeDataIndex(x.startRow, x.startColumn);
57360
57364
  z.has(S) || (z.add(S), y.push(x));
@@ -57371,14 +57375,14 @@ class Rx extends C3 {
57371
57375
  }
57372
57376
  _renderFontEachCell(e, a, s, n) {
57373
57377
  var C, x;
57374
- const { ctx: i, viewRanges: o, diffRanges: l, spreadsheetSkeleton: u, cellInfo: d } = e, { startY: c, endY: g, startX: h, endX: p } = d, { isMerged: f, isMergedMainCell: m, mergeInfo: v } = d;
57375
- if (e.startX = h, e.startY = c, e.endX = p, e.endY = g, f && !m)
57378
+ const { ctx: i, viewRanges: o, diffRanges: l, spreadsheetSkeleton: u, cellInfo: d } = e, { startY: c, endY: g, startX: h, endX: f } = d, { isMerged: p, isMergedMainCell: m, mergeInfo: v } = d;
57379
+ if (e.startX = h, e.startY = c, e.endX = f, e.endY = g, p && !m)
57376
57380
  return !0;
57377
57381
  m && (e.startX = v.startX, e.startY = v.startY, e.endX = v.endX, e.endY = v.endY);
57378
57382
  const y = n.getValue(a, s);
57379
57383
  if (!y) return !0;
57380
57384
  e.fontCache = y;
57381
- const z = u.overflowCache.getValue(a, s), _ = l && l.length > 0 ? l : o, j = !m && !f;
57385
+ const z = u.overflowCache.getValue(a, s), _ = l && l.length > 0 ? l : o, j = !m && !p;
57382
57386
  if (!z && j && !S7(_, a, s))
57383
57387
  return !0;
57384
57388
  if (j) {
@@ -57405,27 +57409,27 @@ class Rx extends C3 {
57405
57409
  _renderImages(e, a, s, n, i, o) {
57406
57410
  var z;
57407
57411
  const { documentSkeleton: l, verticalAlign: u, horizontalAlign: d } = a, c = l.getSkeletonData().pages[0].height, g = l.getSkeletonData().pages[0].width, h = 2;
57408
- let p = s, f = n;
57412
+ let f = s, p = n;
57409
57413
  switch (u) {
57410
57414
  case m2.TOP:
57411
- f = n + h;
57415
+ p = n + h;
57412
57416
  break;
57413
57417
  case m2.MIDDLE:
57414
- f = (n + o) / 2 - c / 2;
57418
+ p = (n + o) / 2 - c / 2;
57415
57419
  break;
57416
57420
  default:
57417
- f = o - c - h;
57421
+ p = o - c - h;
57418
57422
  break;
57419
57423
  }
57420
57424
  switch (d) {
57421
57425
  case d1.RIGHT:
57422
- p = i - g - h;
57426
+ f = i - g - h;
57423
57427
  break;
57424
57428
  case d1.CENTER:
57425
- p = (s + i) / 2 - g / 2;
57429
+ f = (s + i) / 2 - g / 2;
57426
57430
  break;
57427
57431
  default:
57428
- p = s + h;
57432
+ f = s + h;
57429
57433
  break;
57430
57434
  }
57431
57435
  const v = l.getViewModel().getDataModel().getDrawings(), y = (z = l.getSkeletonData()) == null ? void 0 : z.pages[0].skeDrawings;
@@ -57443,7 +57447,7 @@ class Rx extends C3 {
57443
57447
  var A;
57444
57448
  (A = this.parent) == null || A.makeDirty();
57445
57449
  }
57446
- ), C = p + _.aLeft, x = f + _.aTop, S = _.width, F = _.height, T = _.angle, { rotatedHeight: M, rotatedWidth: B } = Ax(S, F, T);
57450
+ ), C = f + _.aLeft, x = p + _.aTop, S = _.width, F = _.height, T = _.angle, { rotatedHeight: M, rotatedWidth: B } = Ax(S, F, T);
57447
57451
  if (w && w.complete) {
57448
57452
  const A = T * Math.PI / 180;
57449
57453
  if (e.save(), e.translate(C + B / 2, x + M / 2), e.rotate(A), w.getAttribute("data-error") === "true")
@@ -57470,12 +57474,12 @@ class Rx extends C3 {
57470
57474
  var C, x, S, F, T, M;
57471
57475
  const { ctx: i, scale: o, overflowRectangle: l, fontCache: u } = e;
57472
57476
  let { startX: d, endX: c, startY: g, endY: h } = e;
57473
- const { horizontalAlign: p = 0, vertexAngle: f = 0, centerAngle: m = 0 } = u;
57474
- let v = p;
57475
- p === d1.UNSPECIFIED && (m === J1 && f === J1 ? v = d1.CENTER : (f > 0 && f !== J1 || f === -J1) && (v = d1.RIGHT));
57477
+ const { horizontalAlign: f = 0, vertexAngle: p = 0, centerAngle: m = 0 } = u;
57478
+ let v = f;
57479
+ f === d1.UNSPECIFIED && (m === J1 && p === J1 ? v = d1.CENTER : (p > 0 && p !== J1 || p === -J1) && (v = d1.RIGHT));
57476
57480
  const y = (S = (x = (C = u == null ? void 0 : u.cellData) == null ? void 0 : C.fontRenderExtension) == null ? void 0 : x.rightOffset) != null ? S : 0, z = (M = (T = (F = u == null ? void 0 : u.cellData) == null ? void 0 : F.fontRenderExtension) == null ? void 0 : T.leftOffset) != null ? M : 0;
57477
57481
  let _ = !0;
57478
- f === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
57482
+ p === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
57479
57483
  const j = c - d, w = h - g;
57480
57484
  if (l && _) {
57481
57485
  const { startColumn: B, startRow: A, endColumn: L, endRow: I } = l, { spreadsheetSkeleton: O } = e, { rowHeightAccumulation: P, columnWidthAccumulation: N } = O;
@@ -57523,14 +57527,14 @@ class Rx extends C3 {
57523
57527
  var x, S, F, T, M, B, A, L, I, O, P, N, $, H;
57524
57528
  const { fontCache: o } = n;
57525
57529
  if (!o) return;
57526
- const l = (S = (x = o.style) == null ? void 0 : x.pd) != null ? S : h2, u = (F = l.l) != null ? F : h2.l, d = (T = l.r) != null ? T : h2.r, c = (M = l.t) != null ? M : h2.t, g = (B = l.b) != null ? B : h2.b, { vertexAngle: h = 0, wrapStrategy: p, cellData: f } = o;
57527
- if ((f == null ? void 0 : f.v) === void 0 || (f == null ? void 0 : f.v) === null) return;
57528
- const m = c7(f), { startX: v, startY: y, endX: z, endY: _ } = n, j = z - v - u - d, w = _ - y - c - g;
57530
+ const l = (S = (x = o.style) == null ? void 0 : x.pd) != null ? S : h2, u = (F = l.l) != null ? F : h2.l, d = (T = l.r) != null ? T : h2.r, c = (M = l.t) != null ? M : h2.t, g = (B = l.b) != null ? B : h2.b, { vertexAngle: h = 0, wrapStrategy: f, cellData: p } = o;
57531
+ if ((p == null ? void 0 : p.v) === void 0 || (p == null ? void 0 : p.v) === null) return;
57532
+ const m = c7(p), { startX: v, startY: y, endX: z, endY: _ } = n, j = z - v - u - d, w = _ - y - c - g;
57529
57533
  let C = o.horizontalAlign;
57530
- o.horizontalAlign === d1.UNSPECIFIED && (f.t === T2.NUMBER || !o1.isDefine(f.t) && typeof f.v == "number" ? C = d1.RIGHT : f.t === T2.BOOLEAN && (C = d1.CENTER)), Z4.drawWith(e, {
57534
+ o.horizontalAlign === d1.UNSPECIFIED && (p.t === B2.NUMBER || !o1.isDefine(p.t) && typeof p.v == "number" ? C = d1.RIGHT : p.t === B2.BOOLEAN && (C = d1.CENTER)), Z4.drawWith(e, {
57531
57535
  text: m,
57532
57536
  fontStyle: o.fontString,
57533
- warp: p === O1.WRAP && h === 0,
57537
+ warp: f === O1.WRAP && h === 0,
57534
57538
  hAlign: C,
57535
57539
  vAlign: o.verticalAlign,
57536
57540
  width: j,
@@ -57541,7 +57545,7 @@ class Rx extends C3 {
57541
57545
  strokeLine: !!((O = (I = o.style) == null ? void 0 : I.st) != null && O.s),
57542
57546
  underline: !!((N = (P = o.style) == null ? void 0 : P.ul) != null && N.s),
57543
57547
  underlineType: (H = ($ = o.style) == null ? void 0 : $.ul) == null ? void 0 : H.t,
57544
- cellValueType: f.t
57548
+ cellValueType: p.t
57545
57549
  });
57546
57550
  }
57547
57551
  _renderDocuments(e, a, s, n, i) {
@@ -57553,9 +57557,9 @@ class Rx extends C3 {
57553
57557
  const { documentSkeleton: u, vertexAngle: d = 0, wrapStrategy: c } = l;
57554
57558
  if (!u) return;
57555
57559
  const g = u.getViewModel().getDataModel();
57556
- let { startX: h, startY: p, endX: f, endY: m } = n;
57557
- const v = f - h, y = m - p;
57558
- c === O1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(f - h), u.calculate()) : g.updateDocumentDataPageSize(Number.POSITIVE_INFINITY);
57560
+ let { startX: h, startY: f, endX: p, endY: m } = n;
57561
+ const v = p - h, y = m - f;
57562
+ c === O1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(p - h), u.calculate()) : g.updateDocumentDataPageSize(Number.POSITIVE_INFINITY);
57559
57563
  const z = i.getValue(a, s);
57560
57564
  if (!(c === O1.WRAP && d === 0) && z) {
57561
57565
  const w = re(u), C = g.getSnapshot().documentStyle;
@@ -57564,13 +57568,13 @@ class Rx extends C3 {
57564
57568
  u.getViewModel().getDataModel().updateDocumentDataPageSize(A + I + L), u.calculate();
57565
57569
  }
57566
57570
  const x = z.endColumn, S = z.startColumn, F = z.startRow, T = z.endRow, M = n.spreadsheetSkeleton.getCellWithCoordByIndex(T, x);
57567
- f = M.endX, m = M.endY;
57571
+ p = M.endX, m = M.endY;
57568
57572
  const B = n.spreadsheetSkeleton.getCellWithCoordByIndex(F, S);
57569
- h = B.startX, p = B.startY;
57573
+ h = B.startX, f = B.startY;
57570
57574
  }
57571
57575
  const j = {
57572
- right: f - h,
57573
- bottom: m - p
57576
+ right: p - h,
57577
+ bottom: m - f
57574
57578
  };
57575
57579
  u.makeDirty(!1), o.resize(v, y), o.changeSkeleton(u).render(e, {
57576
57580
  viewBound: {
@@ -57582,8 +57586,8 @@ class Rx extends C3 {
57582
57586
  });
57583
57587
  }
57584
57588
  _clipRectangleForOverflow(e, a, s, n, i, o, l, u, d = 0) {
57585
- const c = l[a - 1] || 0, g = l[s] || l[l.length - 1], h = u[n - 1] || 0, p = u[i] || u[u.length - 1];
57586
- e.rectByPrecision(h + d, c + d, p - h - 2 * d, g - c - 2 * d), e.clip();
57589
+ const c = l[a - 1] || 0, g = l[s] || l[l.length - 1], h = u[n - 1] || 0, f = u[i] || u[u.length - 1];
57590
+ e.rectByPrecision(h + d, c + d, f - h - 2 * d, g - c - 2 * d), e.clip();
57587
57591
  }
57588
57592
  }
57589
57593
  q3.add(Rx);
@@ -57610,19 +57614,19 @@ class Lx extends C3 {
57610
57614
  if (!i.getRowVisible(u) || !i.getColVisible(d))
57611
57615
  return;
57612
57616
  let c = i.getCell(u, d);
57613
- const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell: p, mergeInfo: f } = g;
57617
+ const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell: f, mergeInfo: p } = g;
57614
57618
  let { startY: m, endY: v, startX: y, endX: z } = g;
57615
- if ((p || h) && (m = f.startY, v = f.endY, y = f.startX, z = f.endX), h) {
57619
+ if ((f || h) && (m = p.startY, v = p.endY, y = p.startX, z = p.endX), h) {
57616
57620
  const x = {
57617
- row: f.startRow,
57618
- col: f.startColumn
57621
+ row: p.startRow,
57622
+ col: p.startColumn
57619
57623
  };
57620
57624
  c = i.getCell(x.row, x.col);
57621
57625
  }
57622
- if (!this.isRenderDiffRangesByRow(f.startRow, f.endRow, n))
57626
+ if (!this.isRenderDiffRangesByRow(p.startRow, p.endRow, n))
57623
57627
  return !0;
57624
57628
  if (g.isMerged || g.isMergedMainCell) {
57625
- const x = Ix(f);
57629
+ const x = Ix(p);
57626
57630
  if (l.has(x))
57627
57631
  return;
57628
57632
  l.add(x);
@@ -57657,8 +57661,8 @@ const Px = "DefaultRowHeaderLayoutExtension", Nx = {
57657
57661
  fontSize: 13,
57658
57662
  fontFamily: G3,
57659
57663
  fontColor: "#000000",
57660
- backgroundColor: M2([248, 249, 250]),
57661
- borderColor: M2([217, 217, 217]),
57664
+ backgroundColor: O2([248, 249, 250]),
57665
+ borderColor: O2([217, 217, 217]),
57662
57666
  textAlign: "center",
57663
57667
  textBaseline: "middle"
57664
57668
  };
@@ -57706,8 +57710,8 @@ class $x extends C3 {
57706
57710
  const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
57707
57711
  if (!u || !c || d === void 0 || g === void 0)
57708
57712
  return;
57709
- const p = this.getRowsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
57710
- this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, i, g), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
57713
+ const f = this.getRowsCfg(h.getSheetId()), p = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
57714
+ this.setStyleToCtx(e, p), e.save(), e.fillStyle = p.backgroundColor, e.fillRectByPrecision(0, 0, i, g), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
57711
57715
  let v = 0;
57712
57716
  const y = u.length;
57713
57717
  for (let _ = o - 1; _ <= l; _++) {
@@ -57723,7 +57727,7 @@ class $x extends C3 {
57723
57727
  bottom: j,
57724
57728
  width: i,
57725
57729
  height: j - v
57726
- }, [C, x] = this.getCfgOfCurrentRow(p, f, _);
57730
+ }, [C, x] = this.getCfgOfCurrentRow(f, p, _);
57727
57731
  x && C.backgroundColor && (e.save(), e.fillStyle = C.backgroundColor, e.fillRectByPrecision(w.left, w.top, w.width, w.height), e.restore()), e.beginPath(), e.moveToByPrecision(w.left, w.bottom), e.lineToByPrecision(w.right, w.bottom), e.stroke();
57728
57732
  const S = (() => {
57729
57733
  switch (C.textAlign) {
@@ -57830,8 +57834,8 @@ class y8 extends I7 {
57830
57834
  isSkipByDiffBounds(e, a, s, n) {
57831
57835
  if (n == null)
57832
57836
  return !1;
57833
- const { pageWidth: i, pageHeight: o, marginBottom: l, marginTop: u, marginLeft: d, marginRight: c } = e, g = s + i + d + c, h = a + o + l + u, { left: p, top: f, right: m, bottom: v } = n.viewBound;
57834
- return g < p || h < f || s > m && i !== Number.POSITIVE_INFINITY || a > v && o !== Number.POSITIVE_INFINITY;
57837
+ const { pageWidth: i, pageHeight: o, marginBottom: l, marginTop: u, marginLeft: d, marginRight: c } = e, g = s + i + d + c, h = a + o + l + u, { left: f, top: p, right: m, bottom: v } = n.viewBound;
57838
+ return g < f || h < p || s > m && i !== Number.POSITIVE_INFINITY || a > v && o !== Number.POSITIVE_INFINITY;
57835
57839
  }
57836
57840
  }
57837
57841
  var se = /* @__PURE__ */ ((r) => (r[r.SPAN = 0] = "SPAN", r[r.LINE = 1] = "LINE", r))(se || {});
@@ -57852,8 +57856,8 @@ class Gx extends R0 {
57852
57856
  k(this, "_preBackgroundColor", "");
57853
57857
  }
57854
57858
  draw(e, a, s) {
57855
- var p;
57856
- const n = (p = s.parent) == null ? void 0 : p.parent;
57859
+ var f;
57860
+ const n = (f = s.parent) == null ? void 0 : f.parent;
57857
57861
  if (n == null)
57858
57862
  return;
57859
57863
  const { contentHeight: i = 0 } = n, { ts: o, width: l, content: u } = s;
@@ -57877,8 +57881,8 @@ class Wx extends R0 {
57877
57881
  k(this, "_preBorderColor", "");
57878
57882
  }
57879
57883
  draw(e, a, s) {
57880
- var f;
57881
- const n = (f = s.parent) == null ? void 0 : f.parent;
57884
+ var p;
57885
+ const n = (p = s.parent) == null ? void 0 : p.parent;
57882
57886
  if (!n)
57883
57887
  return;
57884
57888
  const { asc: i = 0, lineHeight: o = 0 } = n, { ts: l, left: u, width: d } = s;
@@ -57889,17 +57893,17 @@ class Wx extends R0 {
57889
57893
  return;
57890
57894
  const g = this._getScale(e.getScale()), h = this._createBorderCache(c);
57891
57895
  e.save(), e.translateWithPrecisionRatio(p2, p2);
57892
- const { spanStartPoint: p = U.create(0, 0) } = this.extensionOffset;
57896
+ const { spanStartPoint: f = U.create(0, 0) } = this.extensionOffset;
57893
57897
  for (const m of h.keys()) {
57894
57898
  const v = h.get(m);
57895
57899
  if (!v)
57896
57900
  continue;
57897
57901
  const { s: y, cl: z } = v, _ = y3(z) || z3, j = R7(y);
57898
57902
  y !== this._preBorderStyle && (A7(e, y), e.setLineWidthByPrecision(j), this._preBorderStyle = y), _ !== this._preBorderColor && (e.strokeStyle = _, this._preBorderColor = _), X2(e, m, (j - 1) / 2 / g, {
57899
- startX: p.x,
57900
- startY: p.y,
57901
- endX: p.x + d,
57902
- endY: p.y + o
57903
+ startX: f.x,
57904
+ startY: f.y,
57905
+ endX: f.x + d,
57906
+ endY: f.y + o
57903
57907
  });
57904
57908
  }
57905
57909
  e.restore();
@@ -58049,13 +58053,13 @@ class _8 extends I1 {
58049
58053
  t.closePath(), this._renderPaintInOrder(t, e);
58050
58054
  }
58051
58055
  _draw(t, e) {
58052
- const { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: p } = this, f = this.getParent().transform, m = f.getMatrix()[4], v = f.getMatrix()[5], y = m + this.width, z = v + this.height, _ = { left: m, top: v, right: y, bottom: z };
58056
+ const { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: f } = this, p = this.getParent().transform, m = p.getMatrix()[4], v = p.getMatrix()[5], y = m + this.width, z = v + this.height, _ = { left: m, top: v, right: y, bottom: z };
58053
58057
  let { left: j, top: w, right: C, bottom: x } = _, S = C - j, F = x - w;
58054
58058
  if (e) {
58055
58059
  const T = R3.getIntersectionBetweenTwoRect(_, e.cacheBound);
58056
58060
  T && (j = T.left - m, w = T.top - v, C = T.right, x = T.bottom, S = T.width, F = T.height);
58057
58061
  }
58058
- _8.drawWith(t, { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: p, width: S, height: F, left: j, top: w });
58062
+ _8.drawWith(t, { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: f, width: S, height: F, left: j, top: w });
58059
58063
  }
58060
58064
  }
58061
58065
  class iA {
@@ -58178,7 +58182,7 @@ let oA = class extends x3 {
58178
58182
  } = this;
58179
58183
  let { left: l, top: u, width: d, height: c } = this.calculateTransformWithSrcRect();
58180
58184
  if (this.angle !== 0) {
58181
- const g = (i + this.strokeWidth) / 2, h = (o + this.strokeWidth) / 2, p = d / 2 - e, f = c / 2 - a, m = W4(new U(g, h), this.angle, new U(l, u), new U(p, f));
58185
+ const g = (i + this.strokeWidth) / 2, h = (o + this.strokeWidth) / 2, f = d / 2 - e, p = c / 2 - a, m = W4(new U(g, h), this.angle, new U(l, u), new U(f, p));
58182
58186
  l = m.x, u = m.y;
58183
58187
  }
58184
58188
  this.transformByState({
@@ -58215,14 +58219,14 @@ let oA = class extends x3 {
58215
58219
  _updateSrcRectByTransform(e) {
58216
58220
  if (this.srcRect == null || !this._transformCalculateSrcRect)
58217
58221
  return;
58218
- const { width: a, height: s, left: n, top: i, angle: o } = this, { width: l = 0, height: u = 0, left: d = 0, top: c = 0, angle: g } = e.preValue, { left: h = 0, top: p = 0, right: f = 0, bottom: m = 0 } = this.srcRect;
58219
- let v = h, y = p, z = f, _ = m, j = !1;
58222
+ const { width: a, height: s, left: n, top: i, angle: o } = this, { width: l = 0, height: u = 0, left: d = 0, top: c = 0, angle: g } = e.preValue, { left: h = 0, top: f = 0, right: p = 0, bottom: m = 0 } = this.srcRect;
58223
+ let v = h, y = f, z = p, _ = m, j = !1;
58220
58224
  if (l !== 0 && l !== a) {
58221
- const w = h / l, C = f / l;
58225
+ const w = h / l, C = p / l;
58222
58226
  v = a * w, z = a * C, j = !0;
58223
58227
  }
58224
58228
  if (u !== 0 && u !== s) {
58225
- const w = p / u, C = m / u;
58229
+ const w = f / u, C = m / u;
58226
58230
  y = s * w, _ = s * C, j = !0;
58227
58231
  }
58228
58232
  j && this.setSrcRect({
@@ -58234,7 +58238,7 @@ let oA = class extends x3 {
58234
58238
  }
58235
58239
  };
58236
58240
  const Kx = ["dataArray"];
58237
- class X1 extends x3 {
58241
+ class V1 extends x3 {
58238
58242
  constructor(e, a) {
58239
58243
  super(e, a);
58240
58244
  k(this, "_dataArray", []);
@@ -58246,7 +58250,7 @@ class X1 extends x3 {
58246
58250
  height: 0
58247
58251
  });
58248
58252
  k(this, "_reCalculateCache", !0);
58249
- a != null && a.data ? this._dataArray = X1.parsePathData(a.data) : a != null && a.dataArray && (this._dataArray = a.dataArray);
58253
+ a != null && a.data ? this._dataArray = V1.parsePathData(a.data) : a != null && a.dataArray && (this._dataArray = a.dataArray);
58250
58254
  for (let s = 0; s < this.dataArray.length; ++s)
58251
58255
  this._pathLength += this.dataArray[s].pathLength;
58252
58256
  this._setFixBoundingBox(), this.onTransformChange$.subscribeEvent((s) => {
@@ -58254,10 +58258,10 @@ class X1 extends x3 {
58254
58258
  if (n === x1.resize || n === x1.all) {
58255
58259
  this._reCalculateCache = !0;
58256
58260
  const { left: o, top: l, width: u, height: d } = this._getSelfRect(), { width: c, height: g } = i;
58257
- let h, p;
58258
- c ? h = this.width - c : h = 0, g ? p = this.height - g : p = 0;
58259
- const f = h / u, m = p / d;
58260
- this.scaleX += f, this.scaleY += m, this.left = this.left - o * f, this.top = this.top - l * m, this._setTransForm();
58261
+ let h, f;
58262
+ c ? h = this.width - c : h = 0, g ? f = this.height - g : f = 0;
58263
+ const p = h / u, m = f / d;
58264
+ this.scaleX += p, this.scaleY += m, this.left = this.left - o * p, this.top = this.top - l * m, this._setTransForm();
58261
58265
  }
58262
58266
  });
58263
58267
  }
@@ -58284,8 +58288,8 @@ class X1 extends x3 {
58284
58288
  e.quadraticCurveTo(o[0], o[1], o[2], o[3]);
58285
58289
  break;
58286
58290
  case "A": {
58287
- const l = o[0], u = o[1], d = o[2], c = o[3], g = o[4], h = o[5], p = o[6], f = o[7], m = d > c ? d : c, v = d > c ? 1 : d / c, y = d > c ? c / d : 1;
58288
- e.translate(l, u), e.rotate(p), e.scale(v, y), e.arc(0, 0, m, g, g + h, !!(1 - f)), e.scale(1 / v, 1 / y), e.rotate(-p), e.translate(-l, -u);
58291
+ const l = o[0], u = o[1], d = o[2], c = o[3], g = o[4], h = o[5], f = o[6], p = o[7], m = d > c ? d : c, v = d > c ? 1 : d / c, y = d > c ? c / d : 1;
58292
+ e.translate(l, u), e.rotate(f), e.scale(v, y), e.arc(0, 0, m, g, g + h, !!(1 - p)), e.scale(1 / v, 1 / y), e.rotate(-f), e.translate(-l, -u);
58289
58293
  break;
58290
58294
  }
58291
58295
  case "z":
@@ -58317,11 +58321,11 @@ class X1 extends x3 {
58317
58321
  };
58318
58322
  else {
58319
58323
  const h = this.getLineLength(a, s, n, i);
58320
- let p = (o - a) * (n - a) + (l - s) * (i - s);
58321
- p /= h * h;
58322
- const f = a + p * (n - a), m = s + p * (i - s), v = this.getLineLength(o, l, f, m), y = Math.sqrt(e * e - v * v);
58324
+ let f = (o - a) * (n - a) + (l - s) * (i - s);
58325
+ f /= h * h;
58326
+ const p = a + f * (n - a), m = s + f * (i - s), v = this.getLineLength(o, l, p, m), y = Math.sqrt(e * e - v * v);
58323
58327
  d = Math.sqrt(y * y / (1 + u * u)), n < a && (d *= -1), c = u * d, g = {
58324
- x: f + d,
58328
+ x: p + d,
58325
58329
  y: m + c
58326
58330
  };
58327
58331
  }
@@ -58337,24 +58341,24 @@ class X1 extends x3 {
58337
58341
  function h(v) {
58338
58342
  return 3 * v * (1 - v) * (1 - v);
58339
58343
  }
58340
- function p(v) {
58344
+ function f(v) {
58341
58345
  return (1 - v) * (1 - v) * (1 - v);
58342
58346
  }
58343
- const f = u * c(e) + o * g(e) + n * h(e) + a * p(e), m = d * c(e) + l * g(e) + i * h(e) + s * p(e);
58347
+ const p = u * c(e) + o * g(e) + n * h(e) + a * f(e), m = d * c(e) + l * g(e) + i * h(e) + s * f(e);
58344
58348
  return {
58345
- x: f,
58349
+ x: p,
58346
58350
  y: m
58347
58351
  };
58348
58352
  }
58349
58353
  static getPointOnQuadraticBezier(e, a, s, n, i, o, l) {
58350
- function u(p) {
58351
- return p * p;
58354
+ function u(f) {
58355
+ return f * f;
58352
58356
  }
58353
- function d(p) {
58354
- return 2 * p * (1 - p);
58357
+ function d(f) {
58358
+ return 2 * f * (1 - f);
58355
58359
  }
58356
- function c(p) {
58357
- return (1 - p) * (1 - p);
58360
+ function c(f) {
58361
+ return (1 - f) * (1 - f);
58358
58362
  }
58359
58363
  const g = o * u(e) + n * d(e) + a * c(e), h = l * u(e) + i * d(e) + s * c(e);
58360
58364
  return {
@@ -58392,8 +58396,8 @@ class X1 extends x3 {
58392
58396
  const d = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;
58393
58397
  let c;
58394
58398
  for (let g = 1, h = n.length; g < h; g++) {
58395
- let p = n[g], f = p.charAt(0);
58396
- for (p = p.slice(1), o.length = 0; c = d.exec(p); )
58399
+ let f = n[g], p = f.charAt(0);
58400
+ for (f = f.slice(1), o.length = 0; c = d.exec(f); )
58397
58401
  o.push(c[0]);
58398
58402
  const m = [];
58399
58403
  for (let v = 0, y = o.length; v < y; v++) {
@@ -58408,7 +58412,7 @@ class X1 extends x3 {
58408
58412
  let v, y = [];
58409
58413
  const z = l, _ = u;
58410
58414
  let j, w, C, x, S, F, T, M, B, A;
58411
- switch (f) {
58415
+ switch (p) {
58412
58416
  // Note: Keep the lineTo's above the moveTo's in this switch
58413
58417
  case "l":
58414
58418
  l += m.shift() || 0, u += m.shift() || 0, v = "L", y.push(l, u);
@@ -58426,11 +58430,11 @@ class X1 extends x3 {
58426
58430
  break;
58427
58431
  }
58428
58432
  }
58429
- y.push(l, u), f = "l";
58433
+ y.push(l, u), p = "l";
58430
58434
  break;
58431
58435
  }
58432
58436
  case "M":
58433
- l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u), f = "L";
58437
+ l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u), p = "L";
58434
58438
  break;
58435
58439
  case "h":
58436
58440
  l += m.shift() || 0, v = "L", y.push(l, u);
@@ -58481,16 +58485,16 @@ class X1 extends x3 {
58481
58485
  break;
58482
58486
  }
58483
58487
  i.push({
58484
- command: v || f,
58488
+ command: v || p,
58485
58489
  points: y,
58486
58490
  start: {
58487
58491
  x: z,
58488
58492
  y: _
58489
58493
  },
58490
- pathLength: this.calcLength(z, _, v || f, y)
58494
+ pathLength: this.calcLength(z, _, v || p, y)
58491
58495
  });
58492
58496
  }
58493
- (f === "z" || f === "Z") && i.push({
58497
+ (p === "z" || p === "Z") && i.push({
58494
58498
  command: "z",
58495
58499
  points: [],
58496
58500
  start: {
@@ -58504,7 +58508,7 @@ class X1 extends x3 {
58504
58508
  }
58505
58509
  static calcLength(e, a, s, n) {
58506
58510
  let i, o, l, u;
58507
- const d = X1;
58511
+ const d = V1;
58508
58512
  switch (s) {
58509
58513
  case "L":
58510
58514
  return d.getLineLength(e, a, n[0], n[1]);
@@ -58539,12 +58543,12 @@ class X1 extends x3 {
58539
58543
  case "A": {
58540
58544
  i = 0;
58541
58545
  const c = n[4], g = n[5], h = n[4] + g;
58542
- let p = Math.PI / 180;
58543
- if (Math.abs(c - h) < p && (p = Math.abs(c - h)), o = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], c, 0), g < 0)
58544
- for (u = c - p; u > h; u -= p)
58546
+ let f = Math.PI / 180;
58547
+ if (Math.abs(c - h) < f && (f = Math.abs(c - h)), o = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], c, 0), g < 0)
58548
+ for (u = c - f; u > h; u -= f)
58545
58549
  l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), o = l;
58546
58550
  else
58547
- for (u = c + p; u < h; u += p)
58551
+ for (u = c + f; u < h; u += f)
58548
58552
  l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), o = l;
58549
58553
  return l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], h, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), i;
58550
58554
  }
@@ -58552,13 +58556,13 @@ class X1 extends x3 {
58552
58556
  return 0;
58553
58557
  }
58554
58558
  static convertEndpointToCenterParameterization(e, a, s, n, i, o, l, u, d) {
58555
- const c = d * (Math.PI / 180), g = Math.cos(c) * (e - s) / 2 + Math.sin(c) * (a - n) / 2, h = -1 * Math.sin(c) * (e - s) / 2 + Math.cos(c) * (a - n) / 2, p = g * g / (l * l) + h * h / (u * u);
58556
- p > 1 && (l *= Math.sqrt(p), u *= Math.sqrt(p));
58557
- let f = Math.sqrt(
58559
+ const c = d * (Math.PI / 180), g = Math.cos(c) * (e - s) / 2 + Math.sin(c) * (a - n) / 2, h = -1 * Math.sin(c) * (e - s) / 2 + Math.cos(c) * (a - n) / 2, f = g * g / (l * l) + h * h / (u * u);
58560
+ f > 1 && (l *= Math.sqrt(f), u *= Math.sqrt(f));
58561
+ let p = Math.sqrt(
58558
58562
  (l * l * (u * u) - l * l * (h * h) - u * u * (g * g)) / (l * l * (h * h) + u * u * (g * g))
58559
58563
  );
58560
- i === o && (f *= -1), isNaN(f) && (f = 0);
58561
- const m = f * l * h / u, v = f * -u * g / l, y = (e + s) / 2 + Math.cos(c) * m - Math.sin(c) * v, z = (a + n) / 2 + Math.sin(c) * m + Math.cos(c) * v, _ = (T) => Math.sqrt(T[0] * T[0] + T[1] * T[1]), j = (T, M) => (T[0] * M[0] + T[1] * M[1]) / (_(T) * _(M)), w = (T, M) => (T[0] * M[1] < T[1] * M[0] ? -1 : 1) * Math.acos(j(T, M)), C = w([1, 0], [(g - m) / l, (h - v) / u]), x = [(g - m) / l, (h - v) / u], S = [(-1 * g - m) / l, (-1 * h - v) / u];
58564
+ i === o && (p *= -1), isNaN(p) && (p = 0);
58565
+ const m = p * l * h / u, v = p * -u * g / l, y = (e + s) / 2 + Math.cos(c) * m - Math.sin(c) * v, z = (a + n) / 2 + Math.sin(c) * m + Math.cos(c) * v, _ = (T) => Math.sqrt(T[0] * T[0] + T[1] * T[1]), j = (T, M) => (T[0] * M[0] + T[1] * M[1]) / (_(T) * _(M)), w = (T, M) => (T[0] * M[1] < T[1] * M[0] ? -1 : 1) * Math.acos(j(T, M)), C = w([1, 0], [(g - m) / l, (h - v) / u]), x = [(g - m) / l, (h - v) / u], S = [(-1 * g - m) / l, (-1 * h - v) / u];
58562
58566
  let F = w(x, S);
58563
58567
  return j(x, S) <= -1 && (F = Math.PI), j(x, S) >= 1 && (F = 0), o === 0 && F > 0 && (F -= 2 * Math.PI), o === 1 && F < 0 && (F += 2 * Math.PI), [y, z, l, u, C, F, c, o];
58564
58568
  }
@@ -58634,9 +58638,9 @@ class X1 extends x3 {
58634
58638
  const i = this.dataArray[s], o = i.points;
58635
58639
  switch (i.command) {
58636
58640
  case "L":
58637
- return X1.getPointOnLine(e, i.start.x, i.start.y, o[0], o[1]);
58641
+ return V1.getPointOnLine(e, i.start.x, i.start.y, o[0], o[1]);
58638
58642
  case "C":
58639
- return X1.getPointOnCubicBezier(
58643
+ return V1.getPointOnCubicBezier(
58640
58644
  e / i.pathLength,
58641
58645
  i.start.x,
58642
58646
  i.start.y,
@@ -58648,7 +58652,7 @@ class X1 extends x3 {
58648
58652
  o[5]
58649
58653
  );
58650
58654
  case "Q":
58651
- return X1.getPointOnQuadraticBezier(
58655
+ return V1.getPointOnQuadraticBezier(
58652
58656
  e / i.pathLength,
58653
58657
  i.start.x,
58654
58658
  i.start.y,
@@ -58660,14 +58664,14 @@ class X1 extends x3 {
58660
58664
  case "A": {
58661
58665
  const l = o[0], u = o[1], d = o[2], c = o[3];
58662
58666
  let g = o[4];
58663
- const h = o[5], p = o[6];
58664
- return g += h * e / i.pathLength, X1.getPointOnEllipticalArc(l, u, d, c, g, p);
58667
+ const h = o[5], f = o[6];
58668
+ return g += h * e / i.pathLength, V1.getPointOnEllipticalArc(l, u, d, c, g, f);
58665
58669
  }
58666
58670
  }
58667
58671
  return null;
58668
58672
  }
58669
58673
  _draw(e) {
58670
- X1.drawWith(e, this);
58674
+ V1.drawWith(e, this);
58671
58675
  }
58672
58676
  _setFixBoundingBox() {
58673
58677
  const { left: e, top: a, width: s, height: n } = this._getSelfRect(), i = this.width / s, o = this.height / n;
@@ -58680,34 +58684,34 @@ class X1 extends x3 {
58680
58684
  this.dataArray.forEach((d) => {
58681
58685
  if (d.command === "A") {
58682
58686
  const c = d.points[4], g = d.points[5], h = d.points[4] + g;
58683
- let p = Math.PI / 180;
58684
- if (Math.abs(c - h) < p && (p = Math.abs(c - h)), g < 0)
58685
- for (let f = c - p; f > h; f -= p) {
58686
- const m = X1.getPointOnEllipticalArc(
58687
+ let f = Math.PI / 180;
58688
+ if (Math.abs(c - h) < f && (f = Math.abs(c - h)), g < 0)
58689
+ for (let p = c - f; p > h; p -= f) {
58690
+ const m = V1.getPointOnEllipticalArc(
58687
58691
  d.points[0],
58688
58692
  d.points[1],
58689
58693
  d.points[2],
58690
58694
  d.points[3],
58691
- f,
58695
+ p,
58692
58696
  0
58693
58697
  );
58694
58698
  e.push(m.x, m.y);
58695
58699
  }
58696
58700
  else
58697
- for (let f = c + p; f < h; f += p) {
58698
- const m = X1.getPointOnEllipticalArc(
58701
+ for (let p = c + f; p < h; p += f) {
58702
+ const m = V1.getPointOnEllipticalArc(
58699
58703
  d.points[0],
58700
58704
  d.points[1],
58701
58705
  d.points[2],
58702
58706
  d.points[3],
58703
- f,
58707
+ p,
58704
58708
  0
58705
58709
  );
58706
58710
  e.push(m.x, m.y);
58707
58711
  }
58708
58712
  } else if (d.command === "C")
58709
58713
  for (let c = 0; c <= 1; c += 0.01) {
58710
- const g = X1.getPointOnCubicBezier(
58714
+ const g = V1.getPointOnCubicBezier(
58711
58715
  c,
58712
58716
  d.start.x,
58713
58717
  d.start.y,
@@ -59423,16 +59427,16 @@ class tE extends R0 {
59423
59427
  }
59424
59428
  const h = (d == null ? void 0 : d.fontString) || "";
59425
59429
  h && e.font !== this.actualFontMap[h] && (e.font = h, this.actualFontMap[h] = e.font);
59426
- const { cl: p, va: f } = l, m = y3(p) || z3;
59427
- this._preFontColor !== m && (e.fillStyle = m), f === m3.SUPERSCRIPT ? g.y += -c.spo : f === m3.SUBSCRIPT && (g.y += c.sbo), this._fillText(e, s, g);
59430
+ const { cl: f, va: p } = l, m = y3(f) || z3;
59431
+ this._preFontColor !== m && (e.fillStyle = m), p === m3.SUPERSCRIPT ? g.y += -c.spo : p === m3.SUBSCRIPT && (g.y += c.sbo), this._fillText(e, s, g);
59428
59432
  }
59429
59433
  _fillText(e, a, s) {
59430
59434
  var v, y;
59431
59435
  const { renderConfig: n, spanStartPoint: i, centerPoint: o } = this.extensionOffset, { content: l, width: u, bBox: d } = a, { aba: c, abd: g } = d;
59432
59436
  if (l == null || i == null || o == null)
59433
59437
  return;
59434
- const { vertexAngle: h, centerAngle: p } = n != null ? n : {}, f = 90;
59435
- if (h === f && p === f && !x0(l))
59438
+ const { vertexAngle: h, centerAngle: f } = n != null ? n : {}, p = 90;
59439
+ if (h === p && f === p && !x0(l))
59436
59440
  e.save(), e.translate(i.x + o.x, i.y + o.y), e.rotate(Math.PI / 2), e.translate(-u / 2, (c + g) / 2 - g), e.fillText(l, 0, 0), e.restore();
59437
59441
  else if ((l === "☐" || l === "☑") && a.glyphType === e2.LIST) {
59438
59442
  const j = Math.ceil(((y = (v = a.ts) == null ? void 0 : v.fs) != null ? y : 12) * 1.2);
@@ -59464,22 +59468,22 @@ class sE extends R0 {
59464
59468
  const n = (w = s.parent) == null ? void 0 : w.parent, { ts: i, bBox: o, content: l } = s;
59465
59469
  if (n == null || i == null || l === "\r")
59466
59470
  return;
59467
- const { asc: u, dsc: d } = n, { sp: c, spo: g, sbo: h, bd: p } = o, f = E7(a), m = 0.5, { ul: v, st: y, ol: z, va: _, bbl: j } = i;
59471
+ const { asc: u, dsc: d } = n, { sp: c, spo: g, sbo: h, bd: f } = o, p = E7(a), m = 0.5, { ul: v, st: y, ol: z, va: _, bbl: j } = i;
59468
59472
  if (v) {
59469
59473
  const C = u + d;
59470
- this._drawLine(e, s, v, C, f);
59474
+ this._drawLine(e, s, v, C, p);
59471
59475
  }
59472
59476
  if (j) {
59473
59477
  const C = u + d + 3;
59474
- this._drawLine(e, s, j, C, f, 2);
59478
+ this._drawLine(e, s, j, C, p, 2);
59475
59479
  }
59476
59480
  if (y) {
59477
- let C = u + p - c - m;
59478
- _ === m3.SUPERSCRIPT ? C -= g : _ === m3.SUBSCRIPT && (C += h), this._drawLine(e, s, y, C, f);
59481
+ let C = u + f - c - m;
59482
+ _ === m3.SUPERSCRIPT ? C -= g : _ === m3.SUBSCRIPT && (C += h), this._drawLine(e, s, y, C, p);
59479
59483
  }
59480
59484
  if (z) {
59481
59485
  const C = -ca - m;
59482
- this._drawLine(e, s, z, C, f);
59486
+ this._drawLine(e, s, z, C, p);
59483
59487
  }
59484
59488
  }
59485
59489
  clearCache() {
@@ -59494,19 +59498,19 @@ class sE extends R0 {
59494
59498
  const {
59495
59499
  originTranslate: g = U.create(0, 0),
59496
59500
  alignOffset: h = U.create(0, 0),
59497
- renderConfig: p = {}
59498
- } = this.extensionOffset, { left: f, width: m } = a, { centerAngle: v = 0, vertexAngle: y = 0 } = p;
59501
+ renderConfig: f = {}
59502
+ } = this.extensionOffset, { left: p, width: m } = a, { centerAngle: v = 0, vertexAngle: y = 0 } = f;
59499
59503
  e.save();
59500
59504
  const z = (c === t1.TRUE ? y3((x = a.ts) == null ? void 0 : x.cl) : y3(u)) || z3;
59501
59505
  e.strokeStyle = z, this._setLineType(e, d != null ? d : i1.SINGLE, o), n += this._isDouble(d) ? -0.8 : 0;
59502
59506
  const _ = Q1(v), j = Q1(y), w = v2(
59503
- g.addByPoint(f, n),
59507
+ g.addByPoint(p, n),
59504
59508
  U.create(0, 0),
59505
59509
  _,
59506
59510
  j,
59507
59511
  h
59508
59512
  ), C = v2(
59509
- g.addByPoint(f + m, n),
59513
+ g.addByPoint(p + m, n),
59510
59514
  U.create(0, 0),
59511
59515
  _,
59512
59516
  j,
@@ -59626,8 +59630,8 @@ class ve extends y8 {
59626
59630
  this.draw(e, a);
59627
59631
  }
59628
59632
  draw(e, a) {
59629
- var p, f, m, v;
59630
- const s = (p = this.getSkeleton()) == null ? void 0 : p.getSkeletonData();
59633
+ var f, p, m, v;
59634
+ const s = (f = this.getSkeleton()) == null ? void 0 : f.getSkeletonData();
59631
59635
  if (s == null || this._drawLiquid == null)
59632
59636
  return;
59633
59637
  this._drawLiquid.reset();
@@ -59697,7 +59701,7 @@ class ve extends y8 {
59697
59701
  L,
59698
59702
  l
59699
59703
  );
59700
- const f1 = (f = i.get(B)) == null ? void 0 : f.get(M), j1 = U.create(
59704
+ const f1 = (p = i.get(B)) == null ? void 0 : p.get(M), j1 = U.create(
59701
59705
  Q,
59702
59706
  (m = f1 == null ? void 0 : f1.marginTop) != null ? m : 0
59703
59707
  );
@@ -59719,10 +59723,10 @@ class ve extends y8 {
59719
59723
  const { columns: E1 } = z1;
59720
59724
  this._drawLiquid.translateSection(z1);
59721
59725
  for (const P1 of E1) {
59722
- const { lines: G1, width: O2 } = P1;
59726
+ const { lines: q1, width: I2 } = P1;
59723
59727
  this._drawLiquid.translateSave(), this._drawLiquid.translateColumn(P1);
59724
- const I2 = G1.length;
59725
- let q1 = g1, n2 = null;
59728
+ const L2 = q1.length;
59729
+ let W1 = g1, n2 = null;
59726
59730
  if (l1 !== 0) {
59727
59731
  const {
59728
59732
  rotateTranslateXList: t2,
@@ -59731,7 +59735,7 @@ class ve extends y8 {
59731
59735
  fixOffsetX: i2,
59732
59736
  fixOffsetY: o2,
59733
59737
  rotateTranslateY: n3
59734
- } = M7(G1, O2, l1);
59738
+ } = M7(q1, I2, l1);
59735
59739
  let H2 = N1;
59736
59740
  R1 > this.height && H !== O1.WRAP && (H === O1.OVERFLOW || l1 > 0) && (H2 = this.height / Math.tan(Math.abs(l1)));
59737
59741
  const E3 = this._horizontalHandler(
@@ -59748,14 +59752,14 @@ class ve extends y8 {
59748
59752
  C,
59749
59753
  O
59750
59754
  ) - o2;
59751
- R1 > this.height && (l1 < 0 ? l2 = this.height - (R1 + o2) : l2 = -o2), q1 = U.create(E3 + i2, l2), this._drawLiquid.translate(0, -n3), n2 = t2;
59752
- } else H === O1.WRAP && (P !== d1.UNSPECIFIED || K !== T2.NUMBER) && (q1.x = x);
59753
- for (let t2 = 0; t2 < I2; t2++) {
59754
- const R1 = G1[t2], { divides: N1, asc: i2 = 0, type: o2, lineHeight: n3 = 0 } = R1, H2 = i2, E3 = H2 * Math.sin(n1), X3 = H2 * Math.cos(n1);
59755
+ R1 > this.height && (l1 < 0 ? l2 = this.height - (R1 + o2) : l2 = -o2), W1 = U.create(E3 + i2, l2), this._drawLiquid.translate(0, -n3), n2 = t2;
59756
+ } else H === O1.WRAP && (P !== d1.UNSPECIFIED || K !== B2.NUMBER) && (W1.x = x);
59757
+ for (let t2 = 0; t2 < L2; t2++) {
59758
+ const R1 = q1[t2], { divides: N1, asc: i2 = 0, type: o2, lineHeight: n3 = 0 } = R1, H2 = i2, E3 = H2 * Math.sin(n1), X3 = H2 * Math.cos(n1);
59755
59759
  if (o2 === P3.BLOCK)
59756
59760
  for (const l2 of u)
59757
59761
  l2.type === se.LINE && (l2.extensionOffset = {
59758
- alignOffset: q1,
59762
+ alignOffset: W1,
59759
59763
  renderConfig: L
59760
59764
  }, l2.draw(e, l, R1));
59761
59765
  else {
@@ -59773,7 +59777,7 @@ class ve extends y8 {
59773
59777
  Z3,
59774
59778
  n1,
59775
59779
  l1,
59776
- q1
59780
+ W1
59777
59781
  )
59778
59782
  };
59779
59783
  d && (d.extensionOffset = O0, d.draw(e, l, u2));
@@ -59786,7 +59790,7 @@ class ve extends y8 {
59786
59790
  Ee,
59787
59791
  n1,
59788
59792
  l1,
59789
- q1
59793
+ W1
59790
59794
  ), B8 = v2(
59791
59795
  Z3.addByPoint(
59792
59796
  C2 + E3 + i3,
@@ -59795,13 +59799,13 @@ class ve extends y8 {
59795
59799
  Ee,
59796
59800
  n1,
59797
59801
  l1,
59798
- q1
59802
+ W1
59799
59803
  ), A8 = {
59800
59804
  originTranslate: Z3,
59801
59805
  spanStartPoint: O0,
59802
59806
  spanPointWithFont: B8,
59803
59807
  centerPoint: Ee,
59804
- alignOffset: q1,
59808
+ alignOffset: W1,
59805
59809
  renderConfig: L
59806
59810
  };
59807
59811
  for (const f6 of c)
@@ -59855,13 +59859,13 @@ class ve extends y8 {
59855
59859
  }
59856
59860
  }
59857
59861
  _drawTable(e, a, s, n, i, o, l, u, d, c, g) {
59858
- var h, p, f, m, v, y, z, _, j;
59862
+ var h, f, p, m, v, y, z, _, j;
59859
59863
  for (const [w, C] of s) {
59860
59864
  const { top: x, left: S, rows: F } = C;
59861
- (h = this._drawLiquid) == null || h.translateSave(), (p = this._drawLiquid) == null || p.translate(S, x);
59865
+ (h = this._drawLiquid) == null || h.translateSave(), (f = this._drawLiquid) == null || f.translate(S, x);
59862
59866
  for (const T of F) {
59863
59867
  const { top: M, cells: B } = T;
59864
- (f = this._drawLiquid) == null || f.translateSave(), (m = this._drawLiquid) == null || m.translate(0, M);
59868
+ (p = this._drawLiquid) == null || p.translateSave(), (m = this._drawLiquid) == null || m.translate(0, M);
59865
59869
  for (const A of B) {
59866
59870
  const { left: L } = A;
59867
59871
  (v = this._drawLiquid) == null || v.translateSave(), (y = this._drawLiquid) == null || y.translate(L, 0), this._drawTableCell(
@@ -59884,12 +59888,12 @@ class ve extends y8 {
59884
59888
  }
59885
59889
  }
59886
59890
  _drawBorderBottom(e, a, s, n = 0, i = 0) {
59887
- var h, p, f, m;
59891
+ var h, f, p, m;
59888
59892
  if (this._drawLiquid == null)
59889
59893
  return;
59890
59894
  let { x: o, y: l } = this._drawLiquid;
59891
59895
  const { pageWidth: u, marginLeft: d, marginRight: c, marginTop: g } = a;
59892
- o += d + (n != null ? n : 0), l -= s.marginTop, l -= s.paddingTop, l += g + i + s.lineHeight + ((p = (h = s.borderBottom) == null ? void 0 : h.padding) != null ? p : 0), e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (m = (f = s.borderBottom) == null ? void 0 : f.color.rgb) != null ? m : "#CDD0D8", X2(e, X.BOTTOM, 0, {
59896
+ o += d + (n != null ? n : 0), l -= s.marginTop, l -= s.paddingTop, l += g + i + s.lineHeight + ((f = (h = s.borderBottom) == null ? void 0 : h.padding) != null ? f : 0), e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (m = (p = s.borderBottom) == null ? void 0 : p.color.rgb) != null ? m : "#CDD0D8", X2(e, X.BOTTOM, 0, {
59893
59897
  startX: o,
59894
59898
  startY: l,
59895
59899
  endX: o + u - d - c,
@@ -59901,8 +59905,8 @@ class ve extends y8 {
59901
59905
  if (this._drawLiquid == null)
59902
59906
  return;
59903
59907
  this._drawTableCellBordersAndBg(e, a, s);
59904
- const { sections: h, marginLeft: p, marginTop: f } = s;
59905
- l = U.create(l.x + p, l.y + f), e.save();
59908
+ const { sections: h, marginLeft: f, marginTop: p } = s;
59909
+ l = U.create(l.x + f, l.y + p), e.save();
59906
59910
  const { x: m, y: v } = this._drawLiquid, { pageWidth: y, pageHeight: z } = s;
59907
59911
  e.beginPath(), e.rectByPrecision(m + a.marginLeft, v + a.marginTop, y, z), e.closePath(), e.clip();
59908
59912
  for (const _ of h) {
@@ -59985,14 +59989,14 @@ class ve extends y8 {
59985
59989
  const { marginLeft: n, marginTop: i } = a, { pageWidth: o, pageHeight: l } = s, u = s.parent, d = u.cells.indexOf(s), c = u.rowSource.tableCells[d], {
59986
59990
  borderTop: g = W2,
59987
59991
  borderBottom: h = W2,
59988
- borderLeft: p = W2,
59989
- borderRight: f = W2,
59992
+ borderLeft: f = W2,
59993
+ borderRight: p = W2,
59990
59994
  backgroundColor: m
59991
59995
  } = c;
59992
59996
  if (this._drawLiquid == null)
59993
59997
  return;
59994
59998
  let { x: v, y } = this._drawLiquid;
59995
- v += n, y += i, m && m.rgb && (e.save(), e.fillStyle = m.rgb, e.fillRectByPrecision(v, y, o, l), e.restore()), e.save(), e.setLineWidthByPrecision(1), e.save(), e.strokeStyle = (z = p.color.rgb) != null ? z : W2.color.rgb, X2(e, X.LEFT, 0, {
59999
+ v += n, y += i, m && m.rgb && (e.save(), e.fillStyle = m.rgb, e.fillRectByPrecision(v, y, o, l), e.restore()), e.save(), e.setLineWidthByPrecision(1), e.save(), e.strokeStyle = (z = f.color.rgb) != null ? z : W2.color.rgb, X2(e, X.LEFT, 0, {
59996
60000
  startX: v,
59997
60001
  startY: y,
59998
60002
  endX: v + o,
@@ -60002,7 +60006,7 @@ class ve extends y8 {
60002
60006
  startY: y,
60003
60007
  endX: v + o,
60004
60008
  endY: y + l
60005
- }), e.restore(), e.save(), e.strokeStyle = (j = f.color.rgb) != null ? j : W2.color.rgb, X2(e, X.RIGHT, 0, {
60009
+ }), e.restore(), e.save(), e.strokeStyle = (j = p.color.rgb) != null ? j : W2.color.rgb, X2(e, X.RIGHT, 0, {
60006
60010
  startX: v,
60007
60011
  startY: y,
60008
60012
  endX: v + o,
@@ -60017,8 +60021,8 @@ class ve extends y8 {
60017
60021
  _drawHeaderFooter(e, a, s, n, i, o, l, u, d, c, g, h = !0) {
60018
60022
  if (this._drawLiquid == null)
60019
60023
  return;
60020
- const { sections: p } = e, { y: f } = this._drawLiquid;
60021
- for (const m of p) {
60024
+ const { sections: f } = e, { y: p } = this._drawLiquid;
60025
+ for (const m of f) {
60022
60026
  const { columns: v } = m;
60023
60027
  this._drawLiquid.translateSave(), this._drawLiquid.translateSection(m);
60024
60028
  for (const y of v) {
@@ -60037,11 +60041,11 @@ class ve extends y8 {
60037
60041
  this._drawLiquid.translateSave(), this._drawLiquid.translateLine(C, !0, !0);
60038
60042
  const { y: L } = this._drawLiquid;
60039
60043
  if (h) {
60040
- if (L - f + j.y > (g.pageHeight - 100) / 2) {
60044
+ if (L - p + j.y > (g.pageHeight - 100) / 2) {
60041
60045
  this._drawLiquid.translateRestore();
60042
60046
  continue;
60043
60047
  }
60044
- } else if (L - f + j.y + T < (g.pageHeight - 100) / 2 + 100) {
60048
+ } else if (L - p + j.y + T < (g.pageHeight - 100) / 2 + 100) {
60045
60049
  this._drawLiquid.translateRestore();
60046
60050
  continue;
60047
60051
  }
@@ -60103,7 +60107,7 @@ class ve extends y8 {
60103
60107
  }
60104
60108
  }
60105
60109
  _horizontalHandler(e, a, s, n, i = 0, o = 0, l) {
60106
- n === d1.UNSPECIFIED && (o === J1 && i === J1 ? n = d1.CENTER : i > 0 && i !== J1 || i === -J1 ? n = d1.RIGHT : l === T2.NUMBER ? n = d1.RIGHT : l === T2.BOOLEAN ? n = d1.CENTER : n = d1.LEFT);
60110
+ n === d1.UNSPECIFIED && (o === J1 && i === J1 ? n = d1.CENTER : i > 0 && i !== J1 || i === -J1 ? n = d1.RIGHT : l === B2.NUMBER ? n = d1.RIGHT : l === B2.BOOLEAN ? n = d1.CENTER : n = d1.LEFT);
60107
60111
  let u = 0;
60108
60112
  return n === d1.CENTER ? u = (this.width - e) / 2 : n === d1.RIGHT ? u = this.width - e - s : u = a, u;
60109
60113
  }
@@ -60251,9 +60255,9 @@ class dA extends $7 {
60251
60255
  this._dirtyBounds = e;
60252
60256
  }
60253
60257
  renderByViewports(e, a, s) {
60254
- const { diffBounds: n, diffX: i, diffY: o, viewPortPosition: l, cacheCanvas: u, leftOrigin: d, topOrigin: c, bufferEdgeX: g, bufferEdgeY: h, isDirty: p, isForceDirty: f } = a, { rowHeaderWidth: m, columnHeaderHeight: v } = s, { a: y = 1, d: z = 1 } = e.getTransform(), _ = g * y / window.devicePixelRatio, j = h * z / window.devicePixelRatio, w = u.getContext();
60258
+ const { diffBounds: n, diffX: i, diffY: o, viewPortPosition: l, cacheCanvas: u, leftOrigin: d, topOrigin: c, bufferEdgeX: g, bufferEdgeY: h, isDirty: f, isForceDirty: p } = a, { rowHeaderWidth: m, columnHeaderHeight: v } = s, { a: y = 1, d: z = 1 } = e.getTransform(), _ = g * y / window.devicePixelRatio, j = h * z / window.devicePixelRatio, w = u.getContext();
60255
60259
  w.save();
60256
- const C = f || this.isForceDirty(), x = p || this.isDirty();
60260
+ const C = p || this.isForceDirty(), x = f || this.isDirty();
60257
60261
  n.length === 0 || i === 0 && o === 0 || C || x ? (x || C) && (this.addRenderTagToScene("scrolling", !1), this.refreshCacheCanvas(a, { cacheCanvas: u, cacheCtx: w, mainCtx: e, topOrigin: c, leftOrigin: d, bufferEdgeX: g, bufferEdgeY: h })) : (n.length !== 0 || i !== 0 || o !== 0) && (this.addRenderTagToScene("scrolling", !0), this.paintNewAreaForScrolling(a, {
60258
60262
  cacheCanvas: u,
60259
60263
  cacheCtx: w,
@@ -60271,12 +60275,12 @@ class dA extends $7 {
60271
60275
  this._applyCache(u, e, S, F, L, I, T, M, L, I), w.restore();
60272
60276
  }
60273
60277
  paintNewAreaForScrolling(e, a) {
60274
- const { cacheCanvas: s, cacheCtx: n, mainCtx: i, topOrigin: o, leftOrigin: l, bufferEdgeX: u, bufferEdgeY: d, scaleX: c, scaleY: g, columnHeaderHeight: h, rowHeaderWidth: p } = a, { shouldCacheUpdate: f, diffCacheBounds: m, diffX: v, diffY: y } = e;
60278
+ const { cacheCanvas: s, cacheCtx: n, mainCtx: i, topOrigin: o, leftOrigin: l, bufferEdgeX: u, bufferEdgeY: d, scaleX: c, scaleY: g, columnHeaderHeight: h, rowHeaderWidth: f } = a, { shouldCacheUpdate: p, diffCacheBounds: m, diffX: v, diffY: y } = e;
60275
60279
  n.save(), n.setTransform(1, 0, 0, 1, 0, 0), n.globalCompositeOperation = "copy", n.drawImage(s.getCanvasEle(), v * c, y * g), n.restore(), this._refreshIncrementalState = !0;
60276
60280
  const z = i.getTransform();
60277
- if (n.setTransform(z.a, z.b, z.c, z.d, 0, 0), n.translateWithPrecision(z.e / z.a - l + u, z.f / z.d - o + d), f)
60281
+ if (n.setTransform(z.a, z.b, z.c, z.d, 0, 0), n.translateWithPrecision(z.e / z.a - l + u, z.f / z.d - o + d), p)
60278
60282
  for (const _ of m) {
60279
- const { left: j, right: w, bottom: C, top: x } = _, S = j - p, F = x - h, T = w - j, M = C - x;
60283
+ const { left: j, right: w, bottom: C, top: x } = _, S = j - f, F = x - h, T = w - j, M = C - x;
60280
60284
  n.clearRectByPrecision(S, F, T, M), n.save(), n.beginPath(), n.rectByPrecision(S, F, T, M), n.closePath(), n.clip(), this.draw(n, {
60281
60285
  ...e,
60282
60286
  diffBounds: [_]
@@ -60385,11 +60389,11 @@ class dA extends $7 {
60385
60389
  const { rowColumnSegment: s, overflowCache: n, showGridlines: i, gridlinesColor: o } = a, l = a.getCurrentRowColumnSegmentMergeData(s), { startRow: u, endRow: d, startColumn: c, endColumn: g } = s;
60386
60390
  if (!a || i === t1.FALSE || this._forceDisableGridlines)
60387
60391
  return;
60388
- const { rowHeightAccumulation: h, columnTotalWidth: p, columnWidthAccumulation: f, rowTotalHeight: m } = a;
60389
- if (!h || !f || p === void 0 || m === void 0)
60392
+ const { rowHeightAccumulation: h, columnTotalWidth: f, columnWidthAccumulation: p, rowTotalHeight: m } = a;
60393
+ if (!h || !p || f === void 0 || m === void 0)
60390
60394
  return;
60391
- e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (I = o != null ? o : e.renderConfig.gridlinesColor) != null ? I : M2([214, 216, 219]);
60392
- const v = f.length, y = h.length, z = 0.4, _ = d - u + 1, j = g - c + 1, w = Math.ceil(_ * z), C = Math.ceil(j * z), x = Math.max(Math.floor(u - w), 0), S = Math.min(Math.ceil(d + w), y - 1), F = Math.min(Math.ceil(g + C), v - 1), T = Math.max(Math.floor(c - C), 0), M = f[T - 1] || 0, B = h[x - 1] || 0, A = f[F], L = h[S];
60395
+ e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (I = o != null ? o : e.renderConfig.gridlinesColor) != null ? I : O2([214, 216, 219]);
60396
+ const v = p.length, y = h.length, z = 0.4, _ = d - u + 1, j = g - c + 1, w = Math.ceil(_ * z), C = Math.ceil(j * z), x = Math.max(Math.floor(u - w), 0), S = Math.min(Math.ceil(d + w), y - 1), F = Math.min(Math.ceil(g + C), v - 1), T = Math.max(Math.floor(c - C), 0), M = p[T - 1] || 0, B = h[x - 1] || 0, A = p[F], L = h[S];
60393
60397
  e.translateWithPrecisionRatio(p2, p2), e.beginPath(), e.moveToByPrecision(M, B), e.lineToByPrecision(A, B), e.moveToByPrecision(M, B), e.lineToByPrecision(M, L), e.closePathByEnv(), e.stroke();
60394
60398
  for (let O = x; O <= S; O++) {
60395
60399
  if (O < 0 || O > y - 1)
@@ -60400,10 +60404,10 @@ class dA extends $7 {
60400
60404
  for (let O = T; O <= F; O++) {
60401
60405
  if (O < 0 || O > v - 1)
60402
60406
  continue;
60403
- const P = f[O];
60407
+ const P = p[O];
60404
60408
  e.beginPath(), e.moveToByPrecision(P, B), e.lineToByPrecision(P, L), e.closePathByEnv(), e.stroke();
60405
60409
  }
60406
- this._clearRectangle(e, h, f, l), this._clearRectangle(e, h, f, n.toNativeArray()), e.restore();
60410
+ this._clearRectangle(e, h, p, l), this._clearRectangle(e, h, p, n.toNativeArray()), e.restore();
60407
60411
  }
60408
60412
  /**
60409
60413
  * Clear the guide lines within a range in the table, to make room for merged cells and overflow.
@@ -60412,23 +60416,23 @@ class dA extends $7 {
60412
60416
  var i, o, l, u;
60413
60417
  if (n != null)
60414
60418
  for (const d of n) {
60415
- const { startRow: c, endRow: g, startColumn: h, endColumn: p } = d, f = (i = a[c - 1]) != null ? i : 0, m = (o = a[g]) != null ? o : a[a.length - 1], v = (l = s[h - 1]) != null ? l : 0, y = (u = s[p]) != null ? u : s[s.length - 1];
60416
- e.clearRectByPrecision(v, f, y - v, m - f), e.beginPath(), e.moveToByPrecision(v, f), e.lineToByPrecision(y, f), e.lineToByPrecision(y, m), e.lineToByPrecision(v, m), e.lineToByPrecision(v, f), e.stroke(), e.closePath();
60419
+ const { startRow: c, endRow: g, startColumn: h, endColumn: f } = d, p = (i = a[c - 1]) != null ? i : 0, m = (o = a[g]) != null ? o : a[a.length - 1], v = (l = s[h - 1]) != null ? l : 0, y = (u = s[f]) != null ? u : s[s.length - 1];
60420
+ e.clearRectByPrecision(v, p, y - v, m - p), e.beginPath(), e.moveToByPrecision(v, p), e.lineToByPrecision(y, p), e.lineToByPrecision(y, m), e.lineToByPrecision(v, m), e.lineToByPrecision(v, p), e.stroke(), e.closePath();
60417
60421
  }
60418
60422
  }
60419
60423
  testShowRuler(e, a) {
60420
60424
  const { cacheBound: s } = a, n = this.getSkeleton(), { rowHeaderWidth: i, columnHeaderHeight: o } = n, { left: l, top: u, right: d, bottom: c } = s, g = (v) => {
60421
60425
  const y = v % 100;
60422
60426
  return v + (100 - y);
60423
- }, h = g(l), p = g(d), f = g(u), m = g(c);
60427
+ }, h = g(l), f = g(d), p = g(u), m = g(c);
60424
60428
  e.save(), e.beginPath(), e.strokeStyle = "#000000", e.fillStyle = "#000000", e.font = "16px Arial", e.lineWidth = 1, e.textAlign = "center", e.textBaseline = "middle";
60425
- for (let v = h; v <= p; v += 50)
60429
+ for (let v = h; v <= f; v += 50)
60426
60430
  e.beginPath(), e.strokeStyle = v % 100 === 0 ? "red" : "#aaa", e.moveTo(v - i, u - o), e.lineTo(v - i, c - o), e.stroke(), e.closePath();
60427
- for (let v = f; v <= m; v += 50)
60431
+ for (let v = p; v <= m; v += 50)
60428
60432
  e.beginPath(), e.strokeStyle = v % 100 === 0 ? "red" : "#aaa", e.moveTo(l - i, v - o), e.lineTo(d - i, v - o), e.stroke(), e.closePath();
60429
60433
  e.fillStyle = "#666";
60430
- for (let v = h; v <= p; v += 100)
60431
- for (let y = f; y <= m; y += 100)
60434
+ for (let v = h; v <= f; v += 100)
60435
+ for (let y = p; y <= m; y += 100)
60432
60436
  e.fillText(`${v},${y}`, v - i, y - o);
60433
60437
  e.closePath(), e.restore();
60434
60438
  }
@@ -60447,15 +60451,15 @@ function iE(r, t, e, a) {
60447
60451
  s === le.UserInfo && n.userInfo ? oE(r, n.userInfo, a) : s === le.Image && n.image ? uE(r, n.image, e) : s === le.Text && n.text && lE(r, n.text);
60448
60452
  }
60449
60453
  function oE(r, t, e) {
60450
- const { x: a, y: s, repeat: n, spacingX: i, spacingY: o, rotate: l, opacity: u, name: d, fontSize: c, color: g, bold: h, italic: p, direction: f } = t;
60454
+ const { x: a, y: s, repeat: n, spacingX: i, spacingY: o, rotate: l, opacity: u, name: d, fontSize: c, color: g, bold: h, italic: f, direction: p } = t;
60451
60455
  if (!e)
60452
60456
  return;
60453
60457
  let m = "";
60454
60458
  if (d && (m += `${e.name} `), !m)
60455
60459
  return;
60456
- r.save(), r.globalAlpha = u, r.direction = f;
60460
+ r.save(), r.globalAlpha = u, r.direction = p;
60457
60461
  let v = "";
60458
- if (p && (v += "italic "), h && (v += "bold "), v += `${c}px Arial`, r.font = v, r.fillStyle = g, n) {
60462
+ if (f && (v += "italic "), h && (v += "bold "), v += `${c}px Arial`, r.font = v, r.fillStyle = g, n) {
60459
60463
  const y = r.canvas.width, z = r.canvas.height;
60460
60464
  for (let _ = s; _ < z; _ += c + o)
60461
60465
  for (let j = a; j < y; j += r.measureText(m).width + i)
@@ -60465,10 +60469,10 @@ function oE(r, t, e) {
60465
60469
  r.restore();
60466
60470
  }
60467
60471
  function lE(r, t) {
60468
- const { x: e, y: a, repeat: s, spacingX: n, spacingY: i, rotate: o, opacity: l, content: u, fontSize: d, color: c, bold: g, italic: h, direction: p } = t;
60469
- r.save(), r.globalAlpha = l, r.direction = p;
60470
- let f = "";
60471
- if (h && (f += "italic "), g && (f += "bold "), f += `${d}px Arial`, r.font = f, r.fillStyle = c, u)
60472
+ const { x: e, y: a, repeat: s, spacingX: n, spacingY: i, rotate: o, opacity: l, content: u, fontSize: d, color: c, bold: g, italic: h, direction: f } = t;
60473
+ r.save(), r.globalAlpha = l, r.direction = f;
60474
+ let p = "";
60475
+ if (h && (p += "italic "), g && (p += "bold "), p += `${d}px Arial`, r.font = p, r.fillStyle = c, u)
60472
60476
  if (s) {
60473
60477
  const m = r.canvas.width, v = r.canvas.height;
60474
60478
  for (let y = a; y < v; y += d + i)
@@ -60483,14 +60487,14 @@ function uE(r, t, e) {
60483
60487
  if (!(e != null && e.complete))
60484
60488
  return;
60485
60489
  r.save(), r.globalAlpha = u;
60486
- const p = d, f = g ? d / h : c;
60490
+ const f = d, p = g ? d / h : c;
60487
60491
  if (n) {
60488
60492
  const m = r.canvas.width, v = r.canvas.height;
60489
- for (let y = s; y < v; y += f + o)
60490
- for (let z = a; z < m; z += p + i)
60491
- r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
60493
+ for (let y = s; y < v; y += p + o)
60494
+ for (let z = a; z < m; z += f + i)
60495
+ r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, f, p), r.restore();
60492
60496
  } else
60493
- r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
60497
+ r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, f, p), r.restore();
60494
60498
  r.restore();
60495
60499
  }
60496
60500
  class j8 extends D2 {
@@ -60812,7 +60816,7 @@ class kA extends dE {
60812
60816
  const e = this.getActiveSubScene();
60813
60817
  if (e == null || this._navigationEnabled === !1)
60814
60818
  return;
60815
- const a = new X1("__slideNavigationLeft__", {
60819
+ const a = new V1("__slideNavigationLeft__", {
60816
60820
  data: a7,
60817
60821
  width: 60,
60818
60822
  height: 60,
@@ -60820,7 +60824,7 @@ class kA extends dE {
60820
60824
  top: (this.height - 30) / 2,
60821
60825
  fill: this._getArrowColor(),
60822
60826
  flipX: !0
60823
- }), s = new X1("__slideNavigationRight__", {
60827
+ }), s = new V1("__slideNavigationRight__", {
60824
60828
  data: a7,
60825
60829
  width: 60,
60826
60830
  height: 60,
@@ -60911,7 +60915,7 @@ class kA extends dE {
60911
60915
  });
60912
60916
  }
60913
60917
  _getArrowColor(e = !1) {
60914
- return e ? M2(y6.white, 0.8) : M2(y6.white, 0.5);
60918
+ return e ? O2(y6.white, 0.8) : O2(y6.white, 0.5);
60915
60919
  }
60916
60920
  }
60917
60921
  const cE = "rgba(198, 198, 198, 1)", hE = "rgba(255, 255, 255, 1)", kE = "rgba(158, 158, 158, 1)";
@@ -60936,10 +60940,10 @@ class w8 extends y8 {
60936
60940
  const { pages: o } = s;
60937
60941
  let l = 0, u = 0;
60938
60942
  for (let g = 0, h = o.length; g < h; g++) {
60939
- const p = o[g];
60940
- if (this.isSkipByDiffBounds(p, l, u, a)) {
60943
+ const f = o[g];
60944
+ if (this.isSkipByDiffBounds(f, l, u, a)) {
60941
60945
  const { x: M, y: B } = this._drawLiquid.translatePage(
60942
- p,
60946
+ f,
60943
60947
  this.pageLayoutType,
60944
60948
  this.pageMarginLeft,
60945
60949
  this.pageMarginTop
@@ -60947,10 +60951,10 @@ class w8 extends y8 {
60947
60951
  u += M, l += B;
60948
60952
  continue;
60949
60953
  }
60950
- const { width: f, pageWidth: m, height: v, pageHeight: y, originMarginTop: z, originMarginBottom: _, marginLeft: j, marginRight: w } = p;
60954
+ const { width: p, pageWidth: m, height: v, pageHeight: y, originMarginTop: z, originMarginBottom: _, marginLeft: j, marginRight: w } = f;
60951
60955
  e.save(), e.translate(u - 0.5, l - 0.5);
60952
60956
  const C = {
60953
- width: m != null ? m : f,
60957
+ width: m != null ? m : p,
60954
60958
  height: y != null ? y : v,
60955
60959
  strokeWidth: 1,
60956
60960
  stroke: cE,
@@ -60999,9 +61003,9 @@ class w8 extends y8 {
60999
61003
  strokeWidth: 1.5,
61000
61004
  stroke: kE
61001
61005
  };
61002
- X1.drawWith(e, S), e.restore();
61006
+ V1.drawWith(e, S), e.restore();
61003
61007
  const { x: F, y: T } = this._drawLiquid.translatePage(
61004
- p,
61008
+ f,
61005
61009
  this.pageLayoutType,
61006
61010
  this.pageMarginLeft,
61007
61011
  this.pageMarginTop
@@ -61128,8 +61132,8 @@ function wE(r, t) {
61128
61132
  const { left: u, top: d, width: c, height: g } = r.getBoundingClientRect();
61129
61133
  if (o || t(), !c || !g)
61130
61134
  return;
61131
- const h = qe(d), p = qe(s.clientWidth - (u + c)), f = qe(s.clientHeight - (d + g)), m = qe(u), y = {
61132
- rootMargin: `${-h}px ${-p}px ${-f}px ${-m}px`,
61135
+ const h = qe(d), f = qe(s.clientWidth - (u + c)), p = qe(s.clientHeight - (d + g)), m = qe(u), y = {
61136
+ rootMargin: `${-h}px ${-f}px ${-p}px ${-m}px`,
61133
61137
  threshold: pE(0, mE(1, l)) || 1
61134
61138
  };
61135
61139
  let z = !0;
@@ -61975,8 +61979,8 @@ const ME = "engine-render.config", n7 = {}, b2 = class b2 extends D2 {
61975
61979
  }
61976
61980
  // eslint-disable-next-line max-lines-per-function
61977
61981
  attachControl(e) {
61978
- var d, c, g, h, p, f;
61979
- const a = (d = e == null ? void 0 : e.enableDown) != null ? d : !0, s = (c = e == null ? void 0 : e.enableUp) != null ? c : !0, n = (g = e == null ? void 0 : e.enableMove) != null ? g : !0, i = (h = e == null ? void 0 : e.enableWheel) != null ? h : !0, o = (p = e == null ? void 0 : e.enableEnter) != null ? p : !0, l = (f = e == null ? void 0 : e.enableLeave) != null ? f : !0, u = this._scene.getEngine();
61982
+ var d, c, g, h, f, p;
61983
+ const a = (d = e == null ? void 0 : e.enableDown) != null ? d : !0, s = (c = e == null ? void 0 : e.enableUp) != null ? c : !0, n = (g = e == null ? void 0 : e.enableMove) != null ? g : !0, i = (h = e == null ? void 0 : e.enableWheel) != null ? h : !0, o = (f = e == null ? void 0 : e.enableEnter) != null ? f : !0, l = (p = e == null ? void 0 : e.enableLeave) != null ? p : !0, u = this._scene.getEngine();
61980
61984
  u && (this._onInput$ = u.onInputChanged$.subscribeEvent((m) => {
61981
61985
  const v = m;
61982
61986
  if (m.deviceType === g2.Keyboard)
@@ -62201,7 +62205,7 @@ const LE = [
62201
62205
  "__SpreadsheetTransformerResizeCB__",
62202
62206
  "__SpreadsheetTransformerResizeRB__"
62203
62207
  /* RESIZE_RB */
62204
- ], PE = 2, W1 = 20, a2 = 20, NE = 5e3, $E = /* @__PURE__ */ new Set([
62208
+ ], PE = 2, Y1 = 20, a2 = 20, NE = 5e3, $E = /* @__PURE__ */ new Set([
62205
62209
  w3.CHART
62206
62210
  ]);
62207
62211
  class UE extends D2 {
@@ -62325,7 +62329,7 @@ class UE extends D2 {
62325
62329
  }
62326
62330
  // eslint-disable-next-line max-lines-per-function, complexity
62327
62331
  _getConfig(e) {
62328
- var O, P, N, $, H, K, Q, h1, g1, n1, l1, k1, f1, j1, p1, w1, H1, z1, E1, P1, G1, O2, I2, q1, n2, t2, R1, N1, i2;
62332
+ var O, P, N, $, H, K, Q, h1, g1, n1, l1, k1, f1, j1, p1, w1, H1, z1, E1, P1, q1, I2, L2, W1, n2, t2, R1, N1, i2;
62329
62333
  const a = e.transformerConfig;
62330
62334
  let {
62331
62335
  isCropper: s,
@@ -62338,8 +62342,8 @@ class UE extends D2 {
62338
62342
  rotationSnapTolerance: c,
62339
62343
  rotateAnchorOffset: g,
62340
62344
  rotateSize: h,
62341
- rotateCornerRadius: p,
62342
- borderEnabled: f,
62345
+ rotateCornerRadius: f,
62346
+ borderEnabled: p,
62343
62347
  borderStroke: m,
62344
62348
  borderStrokeWidth: v,
62345
62349
  borderDash: y,
@@ -62358,7 +62362,7 @@ class UE extends D2 {
62358
62362
  useSingleNodeRotation: L,
62359
62363
  shouldOverdrawWholeArea: I
62360
62364
  } = this;
62361
- return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (K = a.rotateEnabled) != null ? K : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (h1 = a.rotationSnapTolerance) != null ? h1 : c, g = (g1 = a.rotateAnchorOffset) != null ? g1 : g, h = (n1 = a.rotateSize) != null ? n1 : h, p = (l1 = a.rotateCornerRadius) != null ? l1 : p, f = (k1 = a.borderEnabled) != null ? k1 : f, m = (f1 = a.borderStroke) != null ? f1 : m, v = (j1 = a.borderStrokeWidth) != null ? j1 : v, y = (p1 = a.borderDash) != null ? p1 : y, z = (w1 = a.borderSpacing) != null ? w1 : z, _ = (H1 = a.anchorFill) != null ? H1 : _, j = (z1 = a.anchorStroke) != null ? z1 : j, w = (E1 = a.anchorStrokeWidth) != null ? E1 : w, C = (P1 = a.anchorSize) != null ? P1 : C, x = (G1 = a.anchorCornerRadius) != null ? G1 : x, S = (O2 = a.keepRatio) != null ? O2 : S, F = (I2 = a.centeredScaling) != null ? I2 : F, T = (q1 = a.enabledAnchors) != null ? q1 : T, M = (n2 = a.flipEnabled) != null ? n2 : M, B = (t2 = a.ignoreStroke) != null ? t2 : B, A = (R1 = a.boundBoxFunc) != null ? R1 : A, L = (N1 = a.useSingleNodeRotation) != null ? N1 : L, I = (i2 = a.shouldOverdrawWholeArea) != null ? i2 : I), {
62365
+ return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (K = a.rotateEnabled) != null ? K : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (h1 = a.rotationSnapTolerance) != null ? h1 : c, g = (g1 = a.rotateAnchorOffset) != null ? g1 : g, h = (n1 = a.rotateSize) != null ? n1 : h, f = (l1 = a.rotateCornerRadius) != null ? l1 : f, p = (k1 = a.borderEnabled) != null ? k1 : p, m = (f1 = a.borderStroke) != null ? f1 : m, v = (j1 = a.borderStrokeWidth) != null ? j1 : v, y = (p1 = a.borderDash) != null ? p1 : y, z = (w1 = a.borderSpacing) != null ? w1 : z, _ = (H1 = a.anchorFill) != null ? H1 : _, j = (z1 = a.anchorStroke) != null ? z1 : j, w = (E1 = a.anchorStrokeWidth) != null ? E1 : w, C = (P1 = a.anchorSize) != null ? P1 : C, x = (q1 = a.anchorCornerRadius) != null ? q1 : x, S = (I2 = a.keepRatio) != null ? I2 : S, F = (L2 = a.centeredScaling) != null ? L2 : F, T = (W1 = a.enabledAnchors) != null ? W1 : T, M = (n2 = a.flipEnabled) != null ? n2 : M, B = (t2 = a.ignoreStroke) != null ? t2 : B, A = (R1 = a.boundBoxFunc) != null ? R1 : A, L = (N1 = a.useSingleNodeRotation) != null ? N1 : L, I = (i2 = a.shouldOverdrawWholeArea) != null ? i2 : I), {
62362
62366
  isCropper: s,
62363
62367
  hoverEnabled: n,
62364
62368
  hoverEnterFunc: i,
@@ -62369,8 +62373,8 @@ class UE extends D2 {
62369
62373
  rotationSnapTolerance: c,
62370
62374
  rotateAnchorOffset: g,
62371
62375
  rotateSize: h,
62372
- rotateCornerRadius: p,
62373
- borderEnabled: f,
62376
+ rotateCornerRadius: f,
62377
+ borderEnabled: p,
62374
62378
  borderStroke: m,
62375
62379
  borderStrokeWidth: v,
62376
62380
  borderDash: y,
@@ -62414,14 +62418,14 @@ class UE extends D2 {
62414
62418
  type: 0
62415
62419
  /* MOVE_START */
62416
62420
  })), this._moveBufferSkip = !1;
62417
- const h = u.onPointerMove$.subscribeEvent((f) => {
62418
- const { offsetX: m, offsetY: v } = f;
62421
+ const h = u.onPointerMove$.subscribeEvent((p) => {
62422
+ const { offsetX: m, offsetY: v } = p;
62419
62423
  this._moving(m, v, d, l), !l && this._clearControlMap(), d.scrolling(m, v, () => {
62420
62424
  this._moving(m, v, d, l);
62421
62425
  });
62422
- }), p = u.onPointerUp$.subscribeEvent((f) => {
62423
- h == null || h.unsubscribe(), p == null || p.unsubscribe(), u.enableObjectsEvent(), !l && this.refreshControls(), d.dispose();
62424
- const { offsetX: m, offsetY: v } = f;
62426
+ }), f = u.onPointerUp$.subscribeEvent((p) => {
62427
+ h == null || h.unsubscribe(), f == null || f.unsubscribe(), u.enableObjectsEvent(), !l && this.refreshControls(), d.dispose();
62428
+ const { offsetX: m, offsetY: v } = p;
62425
62429
  l ? this._changeEnd$.next({
62426
62430
  objects: /* @__PURE__ */ new Map([[e.oKey, e]]),
62427
62431
  type: 2,
@@ -62465,7 +62469,7 @@ class UE extends D2 {
62465
62469
  }
62466
62470
  _moving(e, a, s, n = !1) {
62467
62471
  const { scrollX: i, scrollY: o } = Be(s), l = e - this._viewportScrollX + i, u = a - this._viewportScrollY + o, { ancestorScaleX: d, ancestorScaleY: c, ancestorLeft: g, ancestorTop: h } = this._scene;
62468
- let p = this._smoothAccuracy((l - this._startOffsetX) / d, n), f = this._smoothAccuracy((u - this._startOffsetY) / c, n);
62472
+ let f = this._smoothAccuracy((l - this._startOffsetX) / d, n), p = this._smoothAccuracy((u - this._startOffsetY) / c, n);
62469
62473
  if (this._moveBufferBlocker(e, a))
62470
62474
  return;
62471
62475
  const m = this._getTopScene();
@@ -62474,11 +62478,11 @@ class UE extends D2 {
62474
62478
  const { width: v, height: y } = m;
62475
62479
  if (n) {
62476
62480
  if (this._copperSelectedObject) {
62477
- const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z, p, f, g, h, v, y);
62478
- p = _.moveLeft, f = _.moveTop, z.translate(p + z.left, f + z.top), this._changing$.next({
62481
+ const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z, f, p, g, h, v, y);
62482
+ f = _.moveLeft, p = _.moveTop, z.translate(f + z.left, p + z.top), this._changing$.next({
62479
62483
  objects: /* @__PURE__ */ new Map([[z.oKey, z]]),
62480
- moveX: p,
62481
- moveY: f,
62484
+ moveX: f,
62485
+ moveY: p,
62482
62486
  type: 1,
62483
62487
  offsetX: e,
62484
62488
  offsetY: a
@@ -62489,21 +62493,21 @@ class UE extends D2 {
62489
62493
  for (let _ = 0; _ < z.length; _++) {
62490
62494
  const j = z[_], w = this._checkMoveBoundary(
62491
62495
  j,
62492
- p,
62493
62496
  f,
62497
+ p,
62494
62498
  g,
62495
62499
  h,
62496
62500
  v,
62497
62501
  y
62498
62502
  );
62499
- p = w.moveLeft, f = w.moveTop;
62503
+ f = w.moveLeft, p = w.moveTop;
62500
62504
  }
62501
62505
  this._selectedObjectMap.forEach((_) => {
62502
- _.translate(p + _.left, f + _.top);
62506
+ _.translate(f + _.left, p + _.top);
62503
62507
  }), this._changing$.next({
62504
62508
  objects: this._selectedObjectMap,
62505
- moveX: p,
62506
- moveY: f,
62509
+ moveX: f,
62510
+ moveY: p,
62507
62511
  type: 1,
62508
62512
  offsetX: e,
62509
62513
  offsetY: a
@@ -62524,8 +62528,8 @@ class UE extends D2 {
62524
62528
  type: 1,
62525
62529
  offsetX: a,
62526
62530
  offsetY: s
62527
- })) : (this._selectedObjectMap.forEach((p) => {
62528
- this._moveFunc(p, e, c, g, i, o, h);
62531
+ })) : (this._selectedObjectMap.forEach((f) => {
62532
+ this._moveFunc(f, e, c, g, i, o, h);
62529
62533
  }), this._changing$.next({
62530
62534
  objects: this._selectedObjectMap,
62531
62535
  type: 1,
@@ -62534,34 +62538,34 @@ class UE extends D2 {
62534
62538
  })), i && e !== "__SpreadsheetTransformerResizeCT__" && e !== "__SpreadsheetTransformerResizeCB__" && e !== "__SpreadsheetTransformerResizeLM__" && e !== "__SpreadsheetTransformerResizeRM__" && !h || (this._startOffsetX = c, this._startOffsetY = g);
62535
62539
  }
62536
62540
  _moveFunc(e, a, s, n, i, o = !1, l = !1) {
62537
- const { left: u, top: d, width: c, height: g, angle: h } = e, p = this._startStateMap.get(e.oKey) || {};
62538
- let f = {};
62541
+ const { left: u, top: d, width: c, height: g, angle: h } = e, f = this._startStateMap.get(e.oKey) || {};
62542
+ let p = {};
62539
62543
  const { moveLeft: m, moveTop: v } = this._getMovePoint(s, n, e);
62540
62544
  if (i && a !== "__SpreadsheetTransformerResizeCT__" && a !== "__SpreadsheetTransformerResizeCB__" && a !== "__SpreadsheetTransformerResizeLM__" && a !== "__SpreadsheetTransformerResizeRM__" && !l)
62541
62545
  switch (a) {
62542
62546
  case "__SpreadsheetTransformerResizeLT__":
62543
- f = this._resizeLeftTop(e, m, v, p);
62547
+ p = this._resizeLeftTop(e, m, v, f);
62544
62548
  break;
62545
62549
  case "__SpreadsheetTransformerResizeRT__":
62546
- f = this._resizeRightTop(e, m, v, p);
62550
+ p = this._resizeRightTop(e, m, v, f);
62547
62551
  break;
62548
62552
  case "__SpreadsheetTransformerResizeLB__":
62549
- f = this._resizeLeftBottom(e, m, v, p);
62553
+ p = this._resizeLeftBottom(e, m, v, f);
62550
62554
  break;
62551
62555
  case "__SpreadsheetTransformerResizeRB__":
62552
- f = this._resizeRightBottom(e, m, v, p);
62556
+ p = this._resizeRightBottom(e, m, v, f);
62553
62557
  break;
62554
62558
  }
62555
62559
  else
62556
- f = this._updateCloseKeepRatioState(a, u, d, c, g, m, v);
62557
- e.transformByState(this._applyRotationForResult(f, { left: u, top: d, width: c, height: g }, h, o));
62560
+ p = this._updateCloseKeepRatioState(a, u, d, c, g, m, v);
62561
+ e.transformByState(this._applyRotationForResult(p, { left: u, top: d, width: c, height: g }, h, o));
62558
62562
  }
62559
62563
  _getMovePoint(e, a, s) {
62560
- const { ancestorScaleX: n, ancestorScaleY: i } = this._scene, { left: o, top: l, width: u, height: d, angle: c } = s, g = o + u / 2, h = l + d / 2, p = new U(g, h), f = new U(e, a);
62561
- f.rotateByPoint(Q1(-c), p);
62564
+ const { ancestorScaleX: n, ancestorScaleY: i } = this._scene, { left: o, top: l, width: u, height: d, angle: c } = s, g = o + u / 2, h = l + d / 2, f = new U(g, h), p = new U(e, a);
62565
+ p.rotateByPoint(Q1(-c), f);
62562
62566
  const m = new U(this._startOffsetX, this._startOffsetY);
62563
- m.rotateByPoint(Q1(-c), p);
62564
- const v = (f.x - m.x) / n, y = (f.y - m.y) / i;
62567
+ m.rotateByPoint(Q1(-c), f);
62568
+ const v = (p.x - m.x) / n, y = (p.y - m.y) / i;
62565
62569
  return {
62566
62570
  moveLeft: v,
62567
62571
  moveTop: y
@@ -62573,7 +62577,7 @@ class UE extends D2 {
62573
62577
  _applyRotationForResult(e, a, s, n = !1) {
62574
62578
  if (s === 0)
62575
62579
  return e;
62576
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e, { left: d = 0, top: c = 0, width: g = 0, height: h = 0 } = a, p = g / 2, f = h / 2, m = l / 2 + i - d, v = u / 2 + o - c, y = W4(new U(p, f), s, new U(i, o), new U(m, v));
62580
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e, { left: d = 0, top: c = 0, width: g = 0, height: h = 0 } = a, f = g / 2, p = h / 2, m = l / 2 + i - d, v = u / 2 + o - c, y = W4(new U(f, p), s, new U(i, o), new U(m, v));
62577
62581
  return {
62578
62582
  width: this._smoothAccuracy(l, n),
62579
62583
  height: this._smoothAccuracy(u, n),
@@ -62586,42 +62590,42 @@ class UE extends D2 {
62586
62590
  const u = { left: a, top: s, width: n, height: i };
62587
62591
  switch (e) {
62588
62592
  case "__SpreadsheetTransformerResizeLT__":
62589
- u.width = n - o < W1 ? W1 : n - o, u.height = i - l < a2 ? a2 : i - l, u.left = a + n - u.width, u.top = s + i - u.height;
62593
+ u.width = n - o < Y1 ? Y1 : n - o, u.height = i - l < a2 ? a2 : i - l, u.left = a + n - u.width, u.top = s + i - u.height;
62590
62594
  break;
62591
62595
  case "__SpreadsheetTransformerResizeCT__":
62592
62596
  u.height = i - l < a2 ? a2 : i - l, u.top = s + i - u.height;
62593
62597
  break;
62594
62598
  case "__SpreadsheetTransformerResizeRT__":
62595
- u.width = n + o < W1 ? W1 : n + o, u.height = i - l < a2 ? a2 : i - l, u.top = s + i - u.height;
62599
+ u.width = n + o < Y1 ? Y1 : n + o, u.height = i - l < a2 ? a2 : i - l, u.top = s + i - u.height;
62596
62600
  break;
62597
62601
  case "__SpreadsheetTransformerResizeLM__":
62598
- u.width = n - o < W1 ? W1 : n - o, u.left = a + n - u.width;
62602
+ u.width = n - o < Y1 ? Y1 : n - o, u.left = a + n - u.width;
62599
62603
  break;
62600
62604
  case "__SpreadsheetTransformerResizeRM__":
62601
- u.width = o + n < W1 ? W1 : o + n;
62605
+ u.width = o + n < Y1 ? Y1 : o + n;
62602
62606
  break;
62603
62607
  case "__SpreadsheetTransformerResizeLB__":
62604
- u.width = n - o < W1 ? W1 : n - o, u.height = i + l < a2 ? a2 : i + l, u.left = u.width <= W1 ? a : a + o;
62608
+ u.width = n - o < Y1 ? Y1 : n - o, u.height = i + l < a2 ? a2 : i + l, u.left = u.width <= Y1 ? a : a + o;
62605
62609
  break;
62606
62610
  case "__SpreadsheetTransformerResizeCB__":
62607
62611
  u.height = l + i < a2 ? a2 : l + i;
62608
62612
  break;
62609
62613
  case "__SpreadsheetTransformerResizeRB__":
62610
- u.width = o + n < W1 ? W1 : o + n, u.height = l + i < a2 ? a2 : l + i;
62614
+ u.width = o + n < Y1 ? Y1 : o + n, u.height = l + i < a2 ? a2 : l + i;
62611
62615
  break;
62612
62616
  }
62613
62617
  return u;
62614
62618
  }
62615
62619
  _getLimitedSize(e, a) {
62616
- let s = W1, n = a2;
62620
+ let s = Y1, n = a2;
62617
62621
  return e > a ? s = s * Math.abs(e / a) : n = n * Math.abs(a / e), {
62618
62622
  limitWidth: s,
62619
62623
  limitHeight: n
62620
62624
  };
62621
62625
  }
62622
62626
  _resizeLeftTop(e, a, s, n) {
62623
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLtRb(a, s, d, c, p);
62624
- let v = d - f, y = c - m;
62627
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLtRb(a, s, d, c, f);
62628
+ let v = d - p, y = c - m;
62625
62629
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62626
62630
  return v < z && (v = z), y < _ && (y = _), {
62627
62631
  left: i + l - v,
@@ -62631,8 +62635,8 @@ class UE extends D2 {
62631
62635
  };
62632
62636
  }
62633
62637
  _resizeRightBottom(e, a, s, n) {
62634
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLtRb(a, s, d, c, p);
62635
- let v = d + f, y = c + m;
62638
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLtRb(a, s, d, c, f);
62639
+ let v = d + p, y = c + m;
62636
62640
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62637
62641
  return v < z && (v = z), y < _ && (y = _), {
62638
62642
  left: i,
@@ -62642,8 +62646,8 @@ class UE extends D2 {
62642
62646
  };
62643
62647
  }
62644
62648
  _resizeLeftBottom(e, a, s, n) {
62645
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLbRt(a, s, d, c, p);
62646
- let v = d - f, y = c + m;
62649
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLbRt(a, s, d, c, f);
62650
+ let v = d - p, y = c + m;
62647
62651
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62648
62652
  return v < z && (v = z), y < _ && (y = _), {
62649
62653
  left: i + l - v,
@@ -62653,8 +62657,8 @@ class UE extends D2 {
62653
62657
  };
62654
62658
  }
62655
62659
  _resizeRightTop(e, a, s, n) {
62656
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLbRt(a, s, d, c, p);
62657
- let v = d + f, y = c - m;
62660
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLbRt(a, s, d, c, f);
62661
+ let v = d + p, y = c - m;
62658
62662
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62659
62663
  return v < z && (v = z), y < _ && (y = _), {
62660
62664
  left: i,
@@ -62691,9 +62695,9 @@ class UE extends D2 {
62691
62695
  u.disableObjectsEvent();
62692
62696
  const g = y0.create(u);
62693
62697
  g.startScroll(o, l);
62694
- const { scrollX: h, scrollY: p } = Be(g);
62695
- this._viewportScrollX = h, this._viewportScrollY = p;
62696
- const { ancestorLeft: f, ancestorTop: m } = this._scene, { width: v, height: y } = u, z = this._getRotateAnchorCursor(a);
62698
+ const { scrollX: h, scrollY: f } = Be(g);
62699
+ this._viewportScrollX = h, this._viewportScrollY = f;
62700
+ const { ancestorLeft: p, ancestorTop: m } = this._scene, { width: v, height: y } = u, z = this._getRotateAnchorCursor(a);
62697
62701
  if (!c)
62698
62702
  this._clearControlMap(), this._changeStart$.next({
62699
62703
  objects: this._selectedObjectMap,
@@ -62721,12 +62725,12 @@ class UE extends D2 {
62721
62725
  var C, x;
62722
62726
  (C = this._topScenePointerMoveSub) == null || C.unsubscribe(), (x = this._topScenePointerUpSub) == null || x.unsubscribe(), u.enableObjectsEvent(), u.resetCursor(), g.dispose(), this._startStateMap.clear();
62723
62727
  const { offsetX: j, offsetY: w } = _;
62724
- c ? (this._recoverySizeBoundary([s], f, m, v, y), this._changeEnd$.next({
62728
+ c ? (this._recoverySizeBoundary([s], p, m, v, y), this._changeEnd$.next({
62725
62729
  objects: /* @__PURE__ */ new Map([[s.oKey, s]]),
62726
62730
  type: 2,
62727
62731
  offsetX: j,
62728
62732
  offsetY: w
62729
- })) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()), f, m, v, y), this._changeEnd$.next({
62733
+ })) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()), p, m, v, y), this._changeEnd$.next({
62730
62734
  objects: this._selectedObjectMap,
62731
62735
  type: 2,
62732
62736
  offsetX: j,
@@ -62758,7 +62762,7 @@ class UE extends D2 {
62758
62762
  const d = this._getRotateAnchorCursor(
62759
62763
  "__SpreadsheetTransformerRotateLine__"
62760
62764
  /* ROTATE_LINE */
62761
- ), { ancestorLeft: c, ancestorTop: g, width: h, height: p, angle: f } = a, m = h / 2 + c, v = p / 2 + g;
62765
+ ), { ancestorLeft: c, ancestorTop: g, width: h, height: f, angle: p } = a, m = h / 2 + c, v = f / 2 + g;
62762
62766
  this._clearControlMap(), this._changeStart$.next({
62763
62767
  objects: this._selectedObjectMap,
62764
62768
  type: 0
@@ -62766,7 +62770,7 @@ class UE extends D2 {
62766
62770
  }), this._moveBufferSkip = !1;
62767
62771
  const y = l.onPointerMove$.subscribeEvent((_) => {
62768
62772
  const { offsetX: j, offsetY: w } = _;
62769
- this._rotateMoving(j, w, m, v, f), l.setCursor(d);
62773
+ this._rotateMoving(j, w, m, v, p), l.setCursor(d);
62770
62774
  }), z = l.onPointerUp$.subscribeEvent((_) => {
62771
62775
  y == null || y.unsubscribe(), z == null || z.unsubscribe(), l.enableObjectsEvent(), l.resetCursor(), this.refreshControls();
62772
62776
  const { offsetX: j, offsetY: w } = _;
@@ -62923,7 +62927,7 @@ class UE extends D2 {
62923
62927
  };
62924
62928
  }
62925
62929
  _createResizeAnchor(e, a, s) {
62926
- const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorCornerRadius: g, anchorSize: h } = this._getConfig(a), { left: p, top: f } = this._getRotateAnchorPosition(e, n, i, a), m = this._getRotateAnchorCursor(e), v = new I1(`${e}_${s}`, {
62930
+ const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorCornerRadius: g, anchorSize: h } = this._getConfig(a), { left: f, top: p } = this._getRotateAnchorPosition(e, n, i, a), m = this._getRotateAnchorCursor(e), v = new I1(`${e}_${s}`, {
62927
62931
  zIndex: s - 1,
62928
62932
  fill: u,
62929
62933
  stroke: d,
@@ -62931,13 +62935,13 @@ class UE extends D2 {
62931
62935
  width: h,
62932
62936
  height: h,
62933
62937
  radius: g,
62934
- left: p,
62935
- top: f
62938
+ left: f,
62939
+ top: p
62936
62940
  });
62937
62941
  return this._attachHover(v, m, v1.DEFAULT), v;
62938
62942
  }
62939
62943
  _createCopperResizeAnchor(e, a, s) {
62940
- const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorSize: g } = this._getConfig(a), { left: h, top: p } = this._getCopperAnchorPosition(e, n, i, a), f = this._getRotateAnchorCursor(e);
62944
+ const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorSize: g } = this._getConfig(a), { left: h, top: f } = this._getCopperAnchorPosition(e, n, i, a), p = this._getRotateAnchorCursor(e);
62941
62945
  let m;
62942
62946
  const v = `${e}_${s}`, y = {
62943
62947
  zIndex: s - 1,
@@ -62947,9 +62951,9 @@ class UE extends D2 {
62947
62951
  width: g,
62948
62952
  height: g,
62949
62953
  left: h,
62950
- top: p
62954
+ top: f
62951
62955
  }, z = g, _ = g / 4;
62952
- return f === v1.EAST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : f === v1.WEST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : f === v1.NORTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : f === v1.SOUTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : f === v1.NORTH_EAST_RESIZE ? (y.pointsGroup = this._getNorthEastPoints(z, _), m = new O3(v, y)) : f === v1.NORTH_WEST_RESIZE ? (y.pointsGroup = this._getNorthWestPoints(z, _), m = new O3(v, y)) : f === v1.SOUTH_EAST_RESIZE ? (y.pointsGroup = this._getSouthEastPoints(z, _), m = new O3(v, y)) : f === v1.SOUTH_WEST_RESIZE && (y.pointsGroup = this._getSouthWestPoints(z, _), m = new O3(v, y)), this._attachHover(m, f, v1.DEFAULT), m;
62956
+ return p === v1.EAST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : p === v1.WEST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : p === v1.NORTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : p === v1.SOUTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : p === v1.NORTH_EAST_RESIZE ? (y.pointsGroup = this._getNorthEastPoints(z, _), m = new O3(v, y)) : p === v1.NORTH_WEST_RESIZE ? (y.pointsGroup = this._getNorthWestPoints(z, _), m = new O3(v, y)) : p === v1.SOUTH_EAST_RESIZE ? (y.pointsGroup = this._getSouthEastPoints(z, _), m = new O3(v, y)) : p === v1.SOUTH_WEST_RESIZE && (y.pointsGroup = this._getSouthWestPoints(z, _), m = new O3(v, y)), this._attachHover(m, p, v1.DEFAULT), m;
62953
62957
  }
62954
62958
  _getNorthEastPoints(e, a) {
62955
62959
  const s = e - a;
@@ -63119,11 +63123,11 @@ class UE extends D2 {
63119
63123
  }), this._transformerControlMap.clear();
63120
63124
  }
63121
63125
  _createControl(e, a = !0) {
63122
- const { left: s = 0, top: n = 0, height: i = 0, width: o = 0 } = e.getState(), l = e.angle, { isCropper: u, resizeEnabled: d, rotateEnabled: c, rotateAnchorOffset: g, rotateSize: h, rotateCornerRadius: p, borderEnabled: f, borderStroke: m, borderStrokeWidth: v, borderSpacing: y, enabledAnchors: z } = this._getConfig(e);
63126
+ const { left: s = 0, top: n = 0, height: i = 0, width: o = 0 } = e.getState(), l = e.angle, { isCropper: u, resizeEnabled: d, rotateEnabled: c, rotateAnchorOffset: g, rotateSize: h, rotateCornerRadius: f, borderEnabled: p, borderStroke: m, borderStrokeWidth: v, borderSpacing: y, enabledAnchors: z } = this._getConfig(e);
63123
63127
  if (a && u)
63124
63128
  return;
63125
63129
  const _ = e.oKey, j = this._selectedObjectMap.size + e.maxZIndex + NE, w = e.getLayerIndex() || PE, C = [];
63126
- if (f && !u) {
63130
+ if (p && !u) {
63127
63131
  const F = new I1(`__SpreadsheetTransformerOutline___${j}`, {
63128
63132
  zIndex: j - 1,
63129
63133
  evented: !1,
@@ -63159,7 +63163,7 @@ class UE extends D2 {
63159
63163
  top: A,
63160
63164
  height: h,
63161
63165
  width: h,
63162
- radius: p,
63166
+ radius: f,
63163
63167
  strokeWidth: v * 2,
63164
63168
  stroke: m
63165
63169
  });
@@ -64837,7 +64841,7 @@ class vA {
64837
64841
  bottom: d.y
64838
64842
  };
64839
64843
  this._viewBound = c;
64840
- const g = this._preViewBound, h = this._diffViewBound(c, g), p = ((g == null ? void 0 : g.left) || 0) - c.left, f = ((g == null ? void 0 : g.top) || 0) - c.top, m = {
64844
+ const g = this._preViewBound, h = this._diffViewBound(c, g), f = ((g == null ? void 0 : g.left) || 0) - c.left, p = ((g == null ? void 0 : g.top) || 0) - c.top, m = {
64841
64845
  top: o,
64842
64846
  left: n,
64843
64847
  bottom: l,
@@ -64845,13 +64849,13 @@ class vA {
64845
64849
  }, v = this.expandBounds(c);
64846
64850
  this.cacheBound = v, this.preCacheBound || (this.preCacheBound = this.expandBounds(c));
64847
64851
  let y = [];
64848
- this._preCacheVisibleBound && (p < 0 ? this._preCacheVisibleBound.left -= p : p > 0 && (this._preCacheVisibleBound.right -= p), f < 0 ? this._preCacheVisibleBound.top -= f : f > 0 && (this._preCacheVisibleBound.bottom -= f));
64849
- const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound, p, f);
64852
+ this._preCacheVisibleBound && (f < 0 ? this._preCacheVisibleBound.left -= f : f > 0 && (this._preCacheVisibleBound.right -= f), p < 0 ? this._preCacheVisibleBound.top -= p : p > 0 && (this._preCacheVisibleBound.bottom -= p));
64853
+ const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound, f, p);
64850
64854
  return _ && (y = this._calcDiffCacheBound(this._preCacheBound, v)), {
64851
64855
  viewBound: c,
64852
64856
  diffBounds: h,
64853
- diffX: p,
64854
- diffY: f,
64857
+ diffX: f,
64858
+ diffY: p,
64855
64859
  viewPortPosition: m,
64856
64860
  viewportKey: this.viewportKey,
64857
64861
  isDirty: this.isDirty ? 2 : 0,
@@ -65094,7 +65098,7 @@ class vA {
65094
65098
  * @param isTrigger
65095
65099
  */
65096
65100
  _scrollToViewportPosCore(t, e = !0) {
65097
- var c, g, h, p, f;
65101
+ var c, g, h, f, p;
65098
65102
  if (this._scrollBar == null)
65099
65103
  return;
65100
65104
  let a = (c = t.viewportScrollX) != null ? c : this.viewportScrollX, s = (g = t.viewportScrollY) != null ? g : this.viewportScrollY;
@@ -65112,9 +65116,9 @@ class vA {
65112
65116
  rawScrollX: n.x,
65113
65117
  rawScrollY: n.y,
65114
65118
  limitX: (h = this._scrollBar) == null ? void 0 : h.limitX,
65115
- limitY: (p = this._scrollBar) == null ? void 0 : p.limitY
65119
+ limitY: (f = this._scrollBar) == null ? void 0 : f.limitY
65116
65120
  };
65117
- return (f = this._scrollBar) == null || f.makeDirty(!0), this.onScrollAfter$.emitEvent(d), this._emitScrollEnd$(d), i;
65121
+ return (p = this._scrollBar) == null || p.makeDirty(!0), this.onScrollAfter$.emitEvent(d), this._emitScrollEnd$(d), i;
65118
65122
  }
65119
65123
  expandBounds(t) {
65120
65124
  return {
@@ -67109,7 +67113,7 @@ export {
67109
67113
  nB as DRAWING_OBJECT_LOWER_LAYER_INDEX,
67110
67114
  oB as DRAWING_OBJECT_UPPER_LAYER_INDEX,
67111
67115
  _8 as DashedRect,
67112
- N2 as DataStreamTreeNode,
67116
+ T2 as DataStreamTreeNode,
67113
67117
  hb as DeviceInputEventType,
67114
67118
  g2 as DeviceType,
67115
67119
  w8 as DocBackground,
@@ -67159,7 +67163,7 @@ export {
67159
67163
  Kx as PATH_OBJECT_ARRAY,
67160
67164
  XB as PRINTING_BG_Z_INDEX,
67161
67165
  Q2 as PageLayoutType,
67162
- X1 as Path,
67166
+ V1 as Path,
67163
67167
  mb as Path2,
67164
67168
  fb as PerformanceMonitor,
67165
67169
  e1 as PointerInput,
@@ -67235,7 +67239,7 @@ export {
67235
67239
  DB as getCellByIndexWithMergeInfo,
67236
67240
  Qv as getCellPositionByIndex,
67237
67241
  l0 as getCharSpaceApply,
67238
- M2 as getColor,
67242
+ O2 as getColor,
67239
67243
  Be as getCurrentScrollXY,
67240
67244
  eF as getCurrentTypeOfRenderer,
67241
67245
  E0 as getDPI,