@univerjs/core 0.1.0-beta.5 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -168,7 +168,7 @@ function Cs(t) {
168
168
  index: -1
169
169
  };
170
170
  }
171
- function ae(t) {
171
+ function le(t) {
172
172
  var e = typeof Symbol == "function" && Symbol.iterator, s = e && t[e], n = 0;
173
173
  if (s)
174
174
  return s.call(t);
@@ -180,7 +180,7 @@ function ae(t) {
180
180
  };
181
181
  throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
182
182
  }
183
- function le(t, e) {
183
+ function ae(t, e) {
184
184
  var s = typeof Symbol == "function" && t[Symbol.iterator];
185
185
  if (!s)
186
186
  return t;
@@ -242,15 +242,15 @@ var Te = function() {
242
242
  if (o)
243
243
  if (this._parentage = null, Array.isArray(o))
244
244
  try {
245
- for (var u = ae(o), a = u.next(); !a.done; a = u.next()) {
246
- var c = a.value;
245
+ for (var u = le(o), l = u.next(); !l.done; l = u.next()) {
246
+ var c = l.value;
247
247
  c.remove(this);
248
248
  }
249
249
  } catch (R) {
250
250
  e = { error: R };
251
251
  } finally {
252
252
  try {
253
- a && !a.done && (s = u.return) && s.call(u);
253
+ l && !l.done && (s = u.return) && s.call(u);
254
254
  } finally {
255
255
  if (e)
256
256
  throw e.error;
@@ -258,10 +258,10 @@ var Te = function() {
258
258
  }
259
259
  else
260
260
  o.remove(this);
261
- var l = this.initialTeardown;
262
- if (st(l))
261
+ var a = this.initialTeardown;
262
+ if (st(a))
263
263
  try {
264
- l();
264
+ a();
265
265
  } catch (R) {
266
266
  i = R instanceof Dt ? R.errors : [R];
267
267
  }
@@ -269,12 +269,12 @@ var Te = function() {
269
269
  if (_) {
270
270
  this._finalizers = null;
271
271
  try {
272
- for (var d = ae(_), f = d.next(); !f.done; f = d.next()) {
272
+ for (var d = le(_), f = d.next(); !f.done; f = d.next()) {
273
273
  var g = f.value;
274
274
  try {
275
275
  _e(g);
276
276
  } catch (R) {
277
- i = i != null ? i : [], R instanceof Dt ? i = ce(ce([], le(i)), le(R.errors)) : i.push(R);
277
+ i = i != null ? i : [], R instanceof Dt ? i = ce(ce([], ae(i)), ae(R.errors)) : i.push(R);
278
278
  }
279
279
  }
280
280
  } catch (R) {
@@ -686,7 +686,7 @@ class Ts {
686
686
  return this._commands.has(e) ? [this._commands.get(e)] : null;
687
687
  }
688
688
  }
689
- let pt = class {
689
+ let Bt = class {
690
690
  constructor(t, e) {
691
691
  h(this, "_commandRegistry");
692
692
  h(this, "_beforeCommandExecutionListeners", []);
@@ -726,9 +726,9 @@ let pt = class {
726
726
  type: r.type,
727
727
  params: e
728
728
  }, o = this._pushCommandExecutionStack(i);
729
- this._beforeCommandExecutionListeners.forEach((a) => a(i, s));
729
+ this._beforeCommandExecutionListeners.forEach((l) => l(i, s));
730
730
  const u = await this._execute(r, e);
731
- return this._commandExecutedListeners.forEach((a) => a(i, s)), o.dispose(), u;
731
+ return this._commandExecutedListeners.forEach((l) => l(i, s)), o.dispose(), u;
732
732
  }
733
733
  throw new Error(`[CommandService]: command "${t}" is not registered.`);
734
734
  }
@@ -744,15 +744,15 @@ let pt = class {
744
744
  if (i.type === 2) {
745
745
  const c = As(
746
746
  this._commandExecutionStack,
747
- (l) => l.type === 0
747
+ (a) => a.type === 0
748
748
  /* COMMAND */
749
749
  );
750
750
  c && (o.params = (r = o.params) != null ? r : {}, o.params.trigger = c.id);
751
751
  }
752
752
  const u = this._pushCommandExecutionStack(o);
753
753
  this._beforeCommandExecutionListeners.forEach((c) => c(o, s));
754
- const a = this._syncExecute(i, e);
755
- return this._commandExecutedListeners.forEach((c) => c(o, s)), u.dispose(), a;
754
+ const l = this._syncExecute(i, e);
755
+ return this._commandExecutedListeners.forEach((c) => c(o, s)), u.dispose(), l;
756
756
  }
757
757
  throw new Error(`[CommandService]: command "${t}" is not registered.`);
758
758
  }
@@ -812,10 +812,10 @@ let pt = class {
812
812
  return s;
813
813
  }
814
814
  };
815
- pt = Us([
815
+ Bt = Us([
816
816
  de(0, D(J)),
817
817
  de(1, y)
818
- ], pt);
818
+ ], Bt);
819
819
  class Ps {
820
820
  constructor(e) {
821
821
  h(this, "name");
@@ -888,8 +888,8 @@ class Ws extends U {
888
888
  this._error$.next({ errorKey: s });
889
889
  }
890
890
  }
891
- const Bi = "__default_document_sub_component_id20231101__";
892
- class Bs {
891
+ const pi = "__default_document_sub_component_id20231101__";
892
+ class ps {
893
893
  constructor() {
894
894
  h(this, "_managerInfo", /* @__PURE__ */ new Map());
895
895
  /**
@@ -978,7 +978,7 @@ class Bs {
978
978
  return n == null ? [] : (s == null || s.delete(e.floatingObjectId), [{ ...e, floatingObject: n }]);
979
979
  }
980
980
  }
981
- const ps = F(
981
+ const Bs = F(
982
982
  "univer.floating-object.service"
983
983
  );
984
984
  class Gs {
@@ -1025,7 +1025,7 @@ function ks(t, e) {
1025
1025
  }
1026
1026
  return i;
1027
1027
  }
1028
- function pi(t, e) {
1028
+ function Bi(t, e) {
1029
1029
  let s = t.length - 1;
1030
1030
  return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[s - 20] ? s = ks(t, e) : s = $s(t, e), s);
1031
1031
  }
@@ -1119,7 +1119,7 @@ class tt {
1119
1119
  }
1120
1120
  static hexToRgbString(e) {
1121
1121
  const s = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
1122
- e = e.replace(s, (i, o, u, a) => o + o + u + u + a + a);
1122
+ e = e.replace(s, (i, o, u, l) => o + o + u + u + l + l);
1123
1123
  const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
1124
1124
  let r = null;
1125
1125
  if (n) {
@@ -1150,12 +1150,12 @@ class on {
1150
1150
  h(this, "_hue", 0);
1151
1151
  h(this, "_lightness", 0);
1152
1152
  h(this, "_alpha", 0);
1153
- const s = e.getRed() / 255, n = e.getGreen() / 255, r = e.getBlue() / 255, i = e.getAlpha() / 255, o = Math.min(s, Math.min(n, r)), u = Math.max(s, Math.max(n, r)), a = u - o;
1153
+ const s = e.getRed() / 255, n = e.getGreen() / 255, r = e.getBlue() / 255, i = e.getAlpha() / 255, o = Math.min(s, Math.min(n, r)), u = Math.max(s, Math.max(n, r)), l = u - o;
1154
1154
  if (u === o) {
1155
1155
  this._hue = 0, this._saturation = 0, this._lightness = u;
1156
1156
  return;
1157
1157
  }
1158
- this._lightness = (o + u) / 2, this._lightness < 0.5 ? this._saturation = a / (u + o) : this._saturation = a / (2 - u - o), s === u && (this._hue = (n - r) / a), n === u && (this._hue = 2 + (r - s) / a), r === u && (this._hue = 4 + (s - n) / a), this._hue *= 60, this._hue < 0 && (this._hue += 360), this._alpha = i;
1158
+ this._lightness = (o + u) / 2, this._lightness < 0.5 ? this._saturation = l / (u + o) : this._saturation = l / (2 - u - o), s === u && (this._hue = (n - r) / l), n === u && (this._hue = 2 + (r - s) / l), r === u && (this._hue = 4 + (s - n) / l), this._hue *= 60, this._hue < 0 && (this._hue += 360), this._alpha = i;
1159
1159
  }
1160
1160
  asRgbColor() {
1161
1161
  const e = new re();
@@ -1165,7 +1165,7 @@ class on {
1165
1165
  ), e.asRgbColor();
1166
1166
  let s;
1167
1167
  this._lightness < 0.5 ? s = this._lightness * (1 + this._saturation) : s = this._lightness + this._saturation - this._lightness * this._saturation;
1168
- const n = 2 * this._lightness - s, r = this._hue / 360, i = r + 1 / 3, o = this.setColor(s, n, i), u = this.setColor(s, n, r), a = r - 1 / 3, c = this.setColor(s, n, a);
1168
+ const n = 2 * this._lightness - s, r = this._hue / 360, i = r + 1 / 3, o = this.setColor(s, n, i), u = this.setColor(s, n, r), l = r - 1 / 3, c = this.setColor(s, n, l);
1169
1169
  return e.setRgbColor(
1170
1170
  `rgba(${Math.round(o * 255)},${Math.round(u * 255)},${Math.round(c * 255)},${this._alpha * 255})`
1171
1171
  ), e.asRgbColor();
@@ -1201,8 +1201,8 @@ const x = class x extends tt {
1201
1201
  h(this, "_alpha");
1202
1202
  let r = s.match(x.RGBA_EXTRACT);
1203
1203
  if (r) {
1204
- const i = +r[1], o = +r[2], u = +r[3], a = +r[4];
1205
- this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = a;
1204
+ const i = +r[1], o = +r[2], u = +r[3], l = +r[4];
1205
+ this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = l;
1206
1206
  return;
1207
1207
  }
1208
1208
  if (r = s.match(x.RGB_EXTRACT), r) {
@@ -1448,7 +1448,7 @@ const ki = "rgb(", Vi = "rgba(", fe = {
1448
1448
  yellow: [255, 255, 0],
1449
1449
  yellowGreen: [154, 205, 5]
1450
1450
  };
1451
- class B {
1451
+ class p {
1452
1452
  constructor(e) {
1453
1453
  h(this, "_color");
1454
1454
  h(this, "_rgbColor");
@@ -1457,7 +1457,7 @@ class B {
1457
1457
  this._setNullColor();
1458
1458
  return;
1459
1459
  }
1460
- if (e instanceof B) {
1460
+ if (e instanceof p) {
1461
1461
  this._color = { ...e._color }, this._rgbColor = { ...e._rgbColor };
1462
1462
  return;
1463
1463
  }
@@ -1475,18 +1475,18 @@ class B {
1475
1475
  this._rgbColor = n, this._isValid = !0;
1476
1476
  }
1477
1477
  static mix(e, s, n) {
1478
- var c, l;
1478
+ var c, a;
1479
1479
  n = Math.min(1, Math.max(0, n));
1480
- const r = new B(e).toRgb(), i = new B(s).toRgb(), o = (c = r.a) != null ? c : 1, u = (l = i.a) != null ? l : 1, a = {
1480
+ const r = new p(e).toRgb(), i = new p(s).toRgb(), o = (c = r.a) != null ? c : 1, u = (a = i.a) != null ? a : 1, l = {
1481
1481
  r: (i.r - r.r) * n + r.r,
1482
1482
  g: (i.g - r.g) * n + r.g,
1483
1483
  b: (i.b - r.b) * n + r.b,
1484
1484
  a: (u - o) * n + o
1485
1485
  };
1486
- return new B(a);
1486
+ return new p(l);
1487
1487
  }
1488
1488
  static getContrastRatio(e, s) {
1489
- const n = new B(e).getLuminance(), r = new B(s).getLuminance();
1489
+ const n = new p(e).getLuminance(), r = new p(s).getLuminance();
1490
1490
  return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
1491
1491
  }
1492
1492
  get isValid() {
@@ -1519,14 +1519,14 @@ class B {
1519
1519
  }
1520
1520
  lighten(e = 10) {
1521
1521
  const s = this.toHsl();
1522
- return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new B(s);
1522
+ return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new p(s);
1523
1523
  }
1524
1524
  darken(e = 10) {
1525
1525
  const s = this.toHsl();
1526
- return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new B(s);
1526
+ return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new p(s);
1527
1527
  }
1528
1528
  setAlpha(e) {
1529
- return new B({ ...this._rgbColor, a: e });
1529
+ return new p({ ...this._rgbColor, a: e });
1530
1530
  }
1531
1531
  getLuminance() {
1532
1532
  let { r: e, g: s, b: n } = this.toRgb();
@@ -1597,9 +1597,9 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1597
1597
  if (e.startsWith("#"))
1598
1598
  return un(e);
1599
1599
  if (e.startsWith("rgb"))
1600
- return an(e);
1601
- if (e.startsWith("hsl"))
1602
1600
  return ln(e);
1601
+ if (e.startsWith("hsl"))
1602
+ return an(e);
1603
1603
  if (e.startsWith("hsv"))
1604
1604
  return cn(e);
1605
1605
  }, un = (t) => {
@@ -1614,7 +1614,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1614
1614
  b: Number.parseInt(n[2], 16)
1615
1615
  };
1616
1616
  return n.length > 3 && (r.a = Number.parseInt(n[3], 16) / 255), r;
1617
- }, an = (t) => {
1617
+ }, ln = (t) => {
1618
1618
  const e = t.indexOf("(");
1619
1619
  if (e === -1)
1620
1620
  throw new Error(`The color '${t}' is illegal rgb color`);
@@ -1627,7 +1627,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1627
1627
  b: Number.parseInt(s[2], 10)
1628
1628
  };
1629
1629
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
1630
- }, ln = (t) => {
1630
+ }, an = (t) => {
1631
1631
  const e = t.indexOf("(");
1632
1632
  if (e === -1)
1633
1633
  throw new Error(`The color '${t}' is illegal hsl color`);
@@ -1664,8 +1664,8 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1664
1664
  if (s === 0)
1665
1665
  r = i = o = n;
1666
1666
  else {
1667
- const a = n < 0.5 ? n * (1 + s) : n + s - n * s, c = 2 * n - a;
1668
- r = Ut(c, a, e + 1 / 3), i = Ut(c, a, e), o = Ut(c, a, e - 1 / 3);
1667
+ const l = n < 0.5 ? n * (1 + s) : n + s - n * s, c = 2 * n - l;
1668
+ r = Ut(c, l, e + 1 / 3), i = Ut(c, l, e), o = Ut(c, l, e - 1 / 3);
1669
1669
  }
1670
1670
  const u = {
1671
1671
  r: Math.round(r * 255),
@@ -1676,8 +1676,8 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1676
1676
  }, dn = (t) => {
1677
1677
  let { h: e, s, v: n } = t;
1678
1678
  e = e / 360 * 6, s /= 100, n /= 100;
1679
- const r = Math.floor(e), i = e - r, o = n * (1 - s), u = n * (1 - i * s), a = n * (1 - (1 - i) * s), c = r % 6, l = [n, u, o, o, a, n][c], _ = [a, n, n, u, o, o][c], d = [o, o, a, n, n, u][c], f = {
1680
- r: l * 255,
1679
+ const r = Math.floor(e), i = e - r, o = n * (1 - s), u = n * (1 - i * s), l = n * (1 - (1 - i) * s), c = r % 6, a = [n, u, o, o, l, n][c], _ = [l, n, n, u, o, o][c], d = [o, o, l, n, n, u][c], f = {
1680
+ r: a * 255,
1681
1681
  g: _ * 255,
1682
1682
  b: d * 255
1683
1683
  };
@@ -1686,27 +1686,27 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1686
1686
  let { r: e, g: s, b: n } = t;
1687
1687
  e /= 255, s /= 255, n /= 255;
1688
1688
  const r = Math.max(e, s, n), i = Math.min(e, s, n), o = (r + i) / 2;
1689
- let u, a;
1689
+ let u, l;
1690
1690
  if (r === i)
1691
- u = a = 0;
1691
+ u = l = 0;
1692
1692
  else {
1693
- const l = r - i;
1694
- switch (a = o > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
1693
+ const a = r - i;
1694
+ switch (l = o > 0.5 ? a / (2 - r - i) : a / (r + i), r) {
1695
1695
  case e:
1696
- u = (s - n) / l + (s < n ? 6 : 0);
1696
+ u = (s - n) / a + (s < n ? 6 : 0);
1697
1697
  break;
1698
1698
  case s:
1699
- u = (n - e) / l + 2;
1699
+ u = (n - e) / a + 2;
1700
1700
  break;
1701
1701
  default:
1702
- u = (e - s) / l + 4;
1702
+ u = (e - s) / a + 4;
1703
1703
  break;
1704
1704
  }
1705
1705
  u /= 6;
1706
1706
  }
1707
1707
  const c = {
1708
1708
  h: Math.round(u * 360),
1709
- s: Math.round(a * 100),
1709
+ s: Math.round(l * 100),
1710
1710
  l: Math.round(o * 100)
1711
1711
  };
1712
1712
  return t.a !== void 0 && (c.a = t.a), c;
@@ -1715,29 +1715,29 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Mt = (t) => (t /= 255, t <= 0.03
1715
1715
  e /= 255, s /= 255, n /= 255;
1716
1716
  const r = Math.max(e, s, n), i = Math.min(e, s, n);
1717
1717
  let o;
1718
- const u = r, a = r - i, c = r === 0 ? 0 : a / r;
1718
+ const u = r, l = r - i, c = r === 0 ? 0 : l / r;
1719
1719
  if (r === i)
1720
1720
  o = 0;
1721
1721
  else {
1722
1722
  switch (r) {
1723
1723
  case e:
1724
- o = (s - n) / a + (s < n ? 6 : 0);
1724
+ o = (s - n) / l + (s < n ? 6 : 0);
1725
1725
  break;
1726
1726
  case s:
1727
- o = (n - e) / a + 2;
1727
+ o = (n - e) / l + 2;
1728
1728
  break;
1729
1729
  default:
1730
- o = (e - s) / a + 4;
1730
+ o = (e - s) / l + 4;
1731
1731
  break;
1732
1732
  }
1733
1733
  o /= 6;
1734
1734
  }
1735
- const l = {
1735
+ const a = {
1736
1736
  h: Math.round(o * 360),
1737
1737
  s: Math.round(c * 100),
1738
1738
  v: Math.round(u * 100)
1739
1739
  };
1740
- return t.a !== void 0 && (l.a = t.a), l;
1740
+ return t.a !== void 0 && (a.a = t.a), a;
1741
1741
  }, En = (t) => t == null, Rn = (t) => !En(t) && typeof t == "object";
1742
1742
  var M = /* @__PURE__ */ ((t) => (t[t.COVER = 0] = "COVER", t[t.REPLACE = 1] = "REPLACE", t[t.INTERSECTION = 2] = "INTERSECTION", t))(M || {});
1743
1743
  const mn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
@@ -1821,13 +1821,13 @@ class E {
1821
1821
  return "Unknown system";
1822
1822
  }
1823
1823
  static getBrowserType() {
1824
- const e = navigator.userAgent, s = e.indexOf("Opera") > -1, n = e.indexOf("compatible") > -1 && e.indexOf("MSIE") > -1 && !s, r = e.indexOf("Trident") > -1 && e.indexOf("rv:11.0") > -1, i = e.indexOf("Edge") > -1, o = e.indexOf("Firefox") > -1, u = e.indexOf("Safari") > -1 && e.indexOf("Chrome") === -1, a = e.indexOf("Chrome") > -1 && e.indexOf("Safari") > -1;
1824
+ const e = navigator.userAgent, s = e.indexOf("Opera") > -1, n = e.indexOf("compatible") > -1 && e.indexOf("MSIE") > -1 && !s, r = e.indexOf("Trident") > -1 && e.indexOf("rv:11.0") > -1, i = e.indexOf("Edge") > -1, o = e.indexOf("Firefox") > -1, u = e.indexOf("Safari") > -1 && e.indexOf("Chrome") === -1, l = e.indexOf("Chrome") > -1 && e.indexOf("Safari") > -1;
1825
1825
  if (n) {
1826
1826
  new RegExp("MSIE (\\d+\\.\\d+);").test(e);
1827
- const l = Number.parseFloat(RegExp.$1);
1828
- return l === 7 ? "IE7" : l === 8 ? "IE8" : l === 9 ? "IE9" : l === 10 ? "IE10" : "0";
1827
+ const a = Number.parseFloat(RegExp.$1);
1828
+ return a === 7 ? "IE7" : a === 8 ? "IE8" : a === 9 ? "IE9" : a === 10 ? "IE10" : "0";
1829
1829
  }
1830
- return o ? "FF" : s ? "Opera" : u ? "Safari" : a ? "Chrome" : i ? "Edge" : r ? "IE11" : "Unknown browser";
1830
+ return o ? "FF" : s ? "Opera" : u ? "Safari" : l ? "Chrome" : i ? "Edge" : r ? "IE11" : "Unknown browser";
1831
1831
  }
1832
1832
  static generateRandomId(e = 21) {
1833
1833
  return On(e);
@@ -1838,53 +1838,53 @@ class E {
1838
1838
  static deepMerge(e, ...s) {
1839
1839
  s.forEach((o) => o && i(o));
1840
1840
  function n(o, u) {
1841
- o.forEach((a, c) => {
1842
- var l, _;
1843
- if (E.isArray(a)) {
1844
- const d = (l = u[c]) != null ? l : [];
1845
- u[c] = d, n(a, d);
1841
+ o.forEach((l, c) => {
1842
+ var a, _;
1843
+ if (E.isArray(l)) {
1844
+ const d = (a = u[c]) != null ? a : [];
1845
+ u[c] = d, n(l, d);
1846
1846
  return;
1847
1847
  }
1848
- if (E.isObject(a)) {
1848
+ if (E.isObject(l)) {
1849
1849
  const d = (_ = u[c]) != null ? _ : {};
1850
- u[c] = d, r(a, d);
1850
+ u[c] = d, r(l, d);
1851
1851
  return;
1852
1852
  }
1853
- u[c] = a;
1853
+ u[c] = l;
1854
1854
  });
1855
1855
  }
1856
1856
  function r(o, u) {
1857
- Object.keys(o).forEach((a) => {
1858
- var l, _;
1859
- const c = o[a];
1857
+ Object.keys(o).forEach((l) => {
1858
+ var a, _;
1859
+ const c = o[l];
1860
1860
  if (E.isObject(c)) {
1861
- const d = (l = u[a]) != null ? l : {};
1862
- u[a] = d, r(c, d);
1861
+ const d = (a = u[l]) != null ? a : {};
1862
+ u[l] = d, r(c, d);
1863
1863
  return;
1864
1864
  }
1865
1865
  if (E.isArray(c)) {
1866
- const d = (_ = u[a]) != null ? _ : [];
1867
- u[a] = d, n(c, d);
1866
+ const d = (_ = u[l]) != null ? _ : [];
1867
+ u[l] = d, n(c, d);
1868
1868
  return;
1869
1869
  }
1870
- u[a] = c;
1870
+ u[l] = c;
1871
1871
  });
1872
1872
  }
1873
1873
  function i(o) {
1874
1874
  Object.keys(o).forEach((u) => {
1875
- var c, l;
1876
- const a = o[u];
1877
- if (E.isArray(a)) {
1875
+ var c, a;
1876
+ const l = o[u];
1877
+ if (E.isArray(l)) {
1878
1878
  const _ = (c = e[u]) != null ? c : [];
1879
- e[u] = _, n(a, _);
1879
+ e[u] = _, n(l, _);
1880
1880
  return;
1881
1881
  }
1882
- if (E.isObject(a)) {
1883
- const _ = (l = e[u]) != null ? l : {};
1884
- e[u] = _, r(a, _);
1882
+ if (E.isObject(l)) {
1883
+ const _ = (a = e[u]) != null ? a : {};
1884
+ e[u] = _, r(l, _);
1885
1885
  return;
1886
1886
  }
1887
- e[u] = a;
1887
+ e[u] = l;
1888
1888
  });
1889
1889
  }
1890
1890
  return e;
@@ -1894,27 +1894,27 @@ class E {
1894
1894
  }
1895
1895
  static diffValue(e, s) {
1896
1896
  function n(o, u) {
1897
- const a = E.getValueType(o), c = E.getValueType(u);
1898
- return a !== c ? !1 : E.isArray(o) ? r(o, u) : E.isObject(o) ? i(o, u) : E.isDate(o) ? o.getTime() === u.getTime() : E.isRegExp(o) ? o.toString() === u.toString() : o === u;
1897
+ const l = E.getValueType(o), c = E.getValueType(u);
1898
+ return l !== c ? !1 : E.isArray(o) ? r(o, u) : E.isObject(o) ? i(o, u) : E.isDate(o) ? o.getTime() === u.getTime() : E.isRegExp(o) ? o.toString() === u.toString() : o === u;
1899
1899
  }
1900
1900
  function r(o, u) {
1901
1901
  if (e.length !== s.length)
1902
1902
  return !1;
1903
- for (let a = 0, c = o.length; a < c; a++) {
1904
- const l = o[a], _ = u[a];
1905
- if (!n(l, _))
1903
+ for (let l = 0, c = o.length; l < c; l++) {
1904
+ const a = o[l], _ = u[l];
1905
+ if (!n(a, _))
1906
1906
  return !1;
1907
1907
  }
1908
1908
  return !0;
1909
1909
  }
1910
1910
  function i(o, u) {
1911
- const a = Object.keys(o), c = Object.keys(u);
1912
- if (a.length !== c.length)
1911
+ const l = Object.keys(o), c = Object.keys(u);
1912
+ if (l.length !== c.length)
1913
1913
  return !1;
1914
- for (const l of a) {
1915
- if (!c.includes(l))
1914
+ for (const a of l) {
1915
+ if (!c.includes(a))
1916
1916
  return !1;
1917
- const _ = o[l], d = u[l];
1917
+ const _ = o[a], d = u[a];
1918
1918
  if (!n(_, d))
1919
1919
  return !1;
1920
1920
  }
@@ -2156,7 +2156,7 @@ function ji(t) {
2156
2156
  if (!t)
2157
2157
  return;
2158
2158
  const { actualRow: e, actualColumn: s, isMerged: n, isMergedMainCell: r, mergeInfo: i } = t;
2159
- let { startY: o, endY: u, startX: a, endX: c } = t, l = e, _ = s, d = e, f = s;
2159
+ let { startY: o, endY: u, startX: l, endX: c } = t, a = e, _ = s, d = e, f = s;
2160
2160
  if (n && i) {
2161
2161
  const {
2162
2162
  startRow: g,
@@ -2166,18 +2166,18 @@ function ji(t) {
2166
2166
  startY: W,
2167
2167
  endY: G,
2168
2168
  startX: et,
2169
- endX: ls
2169
+ endX: as
2170
2170
  } = i;
2171
- l = g, _ = R, d = w, f = S, o = W, u = G, a = et, c = ls;
2171
+ a = g, _ = R, d = w, f = S, o = W, u = G, l = et, c = as;
2172
2172
  }
2173
- return r && (o = i.startY, u = i.endY, a = i.startX, c = i.endX, d = i.endRow, f = i.endColumn), {
2174
- startRow: l,
2173
+ return r && (o = i.startY, u = i.endY, l = i.startX, c = i.endX, d = i.endRow, f = i.endColumn), {
2174
+ startRow: a,
2175
2175
  startColumn: _,
2176
2176
  endRow: d,
2177
2177
  endColumn: f,
2178
2178
  startY: o,
2179
2179
  endY: u,
2180
- startX: a,
2180
+ startX: l,
2181
2181
  endX: c
2182
2182
  };
2183
2183
  }
@@ -2192,12 +2192,12 @@ function Yi(t) {
2192
2192
  startRow: i,
2193
2193
  startColumn: o,
2194
2194
  endRow: u,
2195
- endColumn: a
2195
+ endColumn: l
2196
2196
  } = t;
2197
- let c = e, l = s, _ = e, d = s;
2198
- return (n || r) && (c = i, l = o, _ = u, d = a), {
2197
+ let c = e, a = s, _ = e, d = s;
2198
+ return (n || r) && (c = i, a = o, _ = u, d = l), {
2199
2199
  startRow: c,
2200
- startColumn: l,
2200
+ startColumn: a,
2201
2201
  endRow: _,
2202
2202
  endColumn: d
2203
2203
  };
@@ -2285,8 +2285,8 @@ function qi(t, e = !1) {
2285
2285
  [
2286
2286
  "bd",
2287
2287
  () => {
2288
- var o, u, a, c, l, _, d, f, g, R, w, S;
2289
- (o = t.bd) != null && o.b && (s += `border-bottom: ${dt((u = t.bd) == null ? void 0 : u.b.s)} ${(a = $(t.bd.b.cl)) != null ? a : ""}; `), (c = t.bd) != null && c.t && (s += `border-top: ${dt((l = t.bd) == null ? void 0 : l.t.s)} ${(_ = $(t.bd.t.cl)) != null ? _ : ""}; `), (d = t.bd) != null && d.r && (s += `border-right: ${dt((f = t.bd) == null ? void 0 : f.r.s)} ${(g = $(t.bd.r.cl)) != null ? g : ""}; `), (R = t.bd) != null && R.l && (s += `border-left: ${dt((w = t.bd) == null ? void 0 : w.l.s)} ${(S = $(t.bd.l.cl)) != null ? S : ""}; `);
2288
+ var o, u, l, c, a, _, d, f, g, R, w, S;
2289
+ (o = t.bd) != null && o.b && (s += `border-bottom: ${dt((u = t.bd) == null ? void 0 : u.b.s)} ${(l = $(t.bd.b.cl)) != null ? l : ""}; `), (c = t.bd) != null && c.t && (s += `border-top: ${dt((a = t.bd) == null ? void 0 : a.t.s)} ${(_ = $(t.bd.t.cl)) != null ? _ : ""}; `), (d = t.bd) != null && d.r && (s += `border-right: ${dt((f = t.bd) == null ? void 0 : f.r.s)} ${(g = $(t.bd.r.cl)) != null ? g : ""}; `), (R = t.bd) != null && R.l && (s += `border-left: ${dt((w = t.bd) == null ? void 0 : w.l.s)} ${(S = $(t.bd.l.cl)) != null ? S : ""}; `);
2290
2290
  }
2291
2291
  ],
2292
2292
  [
@@ -2310,8 +2310,8 @@ function qi(t, e = !1) {
2310
2310
  [
2311
2311
  "tr",
2312
2312
  () => {
2313
- var o, u, a;
2314
- t.tr && (s += `data-rotate: (${(o = t.tr) == null ? void 0 : o.a}deg${(u = t.tr) != null && u.v ? ` ,${(a = t.tr) == null ? void 0 : a.v}` : ""});`);
2313
+ var o, u, l;
2314
+ t.tr && (s += `data-rotate: (${(o = t.tr) == null ? void 0 : o.a}deg${(u = t.tr) != null && u.v ? ` ,${(l = t.tr) == null ? void 0 : l.v}` : ""});`);
2315
2315
  }
2316
2316
  ],
2317
2317
  [
@@ -2335,9 +2335,9 @@ function qi(t, e = !1) {
2335
2335
  [
2336
2336
  "pd",
2337
2337
  () => {
2338
- var l, _, d, f, g, R, w, S;
2339
- const o = `${(l = t.pd) == null ? void 0 : l.b}pt`, u = `${(_ = t.pd) == null ? void 0 : _.t}pt`, a = `${(d = t.pd) == null ? void 0 : d.l}pt`, c = `${(f = t.pd) == null ? void 0 : f.r}pt`;
2340
- (g = t.pd) != null && g.b && (s += `padding-bottom: ${o}; `), (R = t.pd) != null && R.t && (s += `padding-top: ${u}; `), (w = t.pd) != null && w.l && (s += `padding-left: ${a}; `), (S = t.pd) != null && S.r && (s += `padding-right: ${c}; `);
2338
+ var a, _, d, f, g, R, w, S;
2339
+ const o = `${(a = t.pd) == null ? void 0 : a.b}pt`, u = `${(_ = t.pd) == null ? void 0 : _.t}pt`, l = `${(d = t.pd) == null ? void 0 : d.l}pt`, c = `${(f = t.pd) == null ? void 0 : f.r}pt`;
2340
+ (g = t.pd) != null && g.b && (s += `padding-bottom: ${o}; `), (R = t.pd) != null && R.t && (s += `padding-top: ${u}; `), (w = t.pd) != null && w.l && (s += `padding-left: ${l}; `), (S = t.pd) != null && S.r && (s += `padding-right: ${c}; `);
2341
2341
  }
2342
2342
  ]
2343
2343
  ]), r = ["bd", "tr", "tb"];
@@ -2392,7 +2392,7 @@ function Cn(t, e) {
2392
2392
  const s = t.ts || {}, n = e.ts || {};
2393
2393
  return t.sId !== e.sId ? !1 : We(s, n);
2394
2394
  }
2395
- function Be(t, e, s, n) {
2395
+ function pe(t, e, s, n) {
2396
2396
  if (t > e && ([t, e] = [e, t]), s > n && ([s, n] = [n, s]), e < s || n < t)
2397
2397
  return [t, e];
2398
2398
  s < t && (s = t), n > e && (n = e);
@@ -2631,35 +2631,35 @@ function Ee(t, e, s) {
2631
2631
  function Re(t, e, s, n) {
2632
2632
  const r = t + e, i = j(s), o = s;
2633
2633
  let u = 0;
2634
- const a = {};
2634
+ const l = {};
2635
2635
  for (let d = t; d < r; d++) {
2636
2636
  const f = o[d];
2637
- f !== void 0 && (delete o[d], a[u] = f, u++);
2637
+ f !== void 0 && (delete o[d], l[u] = f, u++);
2638
2638
  }
2639
- const c = n ? j(n) : 0, l = t - r + c, _ = i;
2640
- if (l > 0)
2639
+ const c = n ? j(n) : 0, a = t - r + c, _ = i;
2640
+ if (a > 0)
2641
2641
  for (let d = _ - 1; d >= r; d--)
2642
- o[d] !== void 0 && (o[d + l] = o[d], delete o[d]);
2643
- else if (l < 0)
2642
+ o[d] !== void 0 && (o[d + a] = o[d], delete o[d]);
2643
+ else if (a < 0)
2644
2644
  for (let d = r; d < _; d++)
2645
- o[d] !== void 0 && (o[d + l] = o[d], delete o[d]);
2645
+ o[d] !== void 0 && (o[d + a] = o[d], delete o[d]);
2646
2646
  if (n)
2647
2647
  for (let d = 0; d < c; d++)
2648
2648
  o[t + d] = n[d];
2649
- return a;
2649
+ return l;
2650
2650
  }
2651
2651
  function no(t, e) {
2652
- const s = t, n = Object.keys(s), r = n.length, i = e, o = Object.keys(i), u = o.length, a = {};
2652
+ const s = t, n = Object.keys(s), r = n.length, i = e, o = Object.keys(i), u = o.length, l = {};
2653
2653
  let c = 0;
2654
- for (let l = 0; l < r; l++, c++) {
2655
- const _ = n[l];
2656
- a[c] = s[_];
2654
+ for (let a = 0; a < r; a++, c++) {
2655
+ const _ = n[a];
2656
+ l[c] = s[_];
2657
2657
  }
2658
- for (let l = 0; l < u; l++, c++) {
2659
- const _ = o[l];
2660
- a[c] = i[_];
2658
+ for (let a = 0; a < u; a++, c++) {
2659
+ const _ = o[a];
2660
+ l[c] = i[_];
2661
2661
  }
2662
- return a;
2662
+ return l;
2663
2663
  }
2664
2664
  function ro(t, e, s) {
2665
2665
  const n = s;
@@ -2730,7 +2730,7 @@ class V {
2730
2730
  const i = Number(r), o = s[i];
2731
2731
  if (e(
2732
2732
  i,
2733
- Object.keys(o).map((a) => Number(a))
2733
+ Object.keys(o).map((l) => Number(l))
2734
2734
  ) === !1)
2735
2735
  return this;
2736
2736
  }
@@ -2743,9 +2743,9 @@ class V {
2743
2743
  if (!o)
2744
2744
  continue;
2745
2745
  const u = Object.keys(o);
2746
- for (const a of u) {
2747
- const c = Number(a), l = o[Number(a)];
2748
- if (e(i, c, l) === !1)
2746
+ for (const l of u) {
2747
+ const c = Number(l), a = o[Number(l)];
2748
+ if (e(i, c, a) === !1)
2749
2749
  return this;
2750
2750
  }
2751
2751
  }
@@ -2845,13 +2845,13 @@ class V {
2845
2845
  const i = new V();
2846
2846
  let o = 0;
2847
2847
  for (let u = e; u <= s; u++) {
2848
- const a = {};
2848
+ const l = {};
2849
2849
  let c = 0;
2850
- for (let l = n; l <= r; l++) {
2851
- const _ = this.getValue(u, l);
2852
- a[c] = _, c++;
2850
+ for (let a = n; a <= r; a++) {
2851
+ const _ = this.getValue(u, a);
2852
+ l[c] = _, c++;
2853
2853
  }
2854
- i.setRow(o, a), o++;
2854
+ i.setRow(o, l), o++;
2855
2855
  }
2856
2856
  return i;
2857
2857
  }
@@ -2870,8 +2870,8 @@ class V {
2870
2870
  const i = new V();
2871
2871
  for (let o = e; o <= s; o++)
2872
2872
  for (let u = n; u <= r; u++) {
2873
- const a = this.getValue(o, u);
2874
- a && i.setValue(o, u, E.deepClone(a));
2873
+ const l = this.getValue(o, u);
2874
+ l && i.setValue(o, u, E.deepClone(l));
2875
2875
  }
2876
2876
  return i;
2877
2877
  }
@@ -2888,8 +2888,8 @@ class V {
2888
2888
  for (let o = 0; o < i; o++) {
2889
2889
  const u = this.getRow(o);
2890
2890
  if (u) {
2891
- const a = j(u) - 1;
2892
- r = a > r ? a : r;
2891
+ const l = j(u) - 1;
2892
+ r = l > r ? l : r;
2893
2893
  }
2894
2894
  }
2895
2895
  return {
@@ -2934,21 +2934,21 @@ class V {
2934
2934
  let e = 0, s = 0, n = !1, r = !1;
2935
2935
  const i = new V();
2936
2936
  return this.forEach((o, u) => {
2937
- n || (n = !0, e = o), Object.keys(u).forEach((a) => {
2938
- const c = Number(a);
2937
+ n || (n = !0, e = o), Object.keys(u).forEach((l) => {
2938
+ const c = Number(l);
2939
2939
  r ? c < s && (s = c) : (r = !0, s = c);
2940
- const l = this.getValue(o, c);
2941
- i.setValue(o - e, c - s, l);
2940
+ const a = this.getValue(o, c);
2941
+ i.setValue(o - e, c - s, a);
2942
2942
  });
2943
2943
  }), i.getData();
2944
2944
  }
2945
2945
  getDataRange() {
2946
2946
  let e = 0, s = 0, n = 0, r = -1, i = !1, o = !1;
2947
- return this.forEach((u, a) => {
2947
+ return this.forEach((u, l) => {
2948
2948
  i || (i = !0, e = u);
2949
- const c = j(a) - 1;
2950
- c > n && (n = c), Object.keys(a).forEach((l) => {
2951
- const _ = Number(l);
2949
+ const c = j(l) - 1;
2950
+ c > n && (n = c), Object.keys(l).forEach((a) => {
2951
+ const _ = Number(a);
2952
2952
  o ? _ < s && (s = _) : (o = !0, s = _);
2953
2953
  }), u > r && (r = u);
2954
2954
  }), {
@@ -2988,7 +2988,7 @@ class V {
2988
2988
  this._matrix = e;
2989
2989
  }
2990
2990
  }
2991
- var pe = /* @__PURE__ */ ((t) => (t.INIT = "init", t.FETCHING = "fetching", t.DONE = "done", t))(pe || {});
2991
+ var Be = /* @__PURE__ */ ((t) => (t.INIT = "init", t.FETCHING = "fetching", t.DONE = "done", t))(Be || {});
2992
2992
  class Tn {
2993
2993
  constructor() {
2994
2994
  h(this, "status", "init");
@@ -3024,26 +3024,26 @@ const z = class z {
3024
3024
  return e == null || s == null ? !1 : e.endRow === s.endRow && e.endColumn === s.endColumn && e.startRow === s.startRow && e.startColumn === s.startColumn && (e.rangeType === s.rangeType || e.rangeType === void 0 && s.rangeType === P.NORMAL || s.rangeType === void 0 && e.rangeType === P.NORMAL);
3025
3025
  }
3026
3026
  static intersects(e, s) {
3027
- const n = e.startRow, r = e.endRow, i = e.startColumn, o = e.endColumn, u = s.startRow, a = s.endRow, c = s.startColumn, l = s.endColumn, _ = Math.abs(i + o - c - l), d = Math.abs(i - o) + Math.abs(c - l), f = Math.abs(n + r - u - a), g = Math.abs(n - r) + Math.abs(u - a);
3027
+ const n = e.startRow, r = e.endRow, i = e.startColumn, o = e.endColumn, u = s.startRow, l = s.endRow, c = s.startColumn, a = s.endColumn, _ = Math.abs(i + o - c - a), d = Math.abs(i - o) + Math.abs(c - a), f = Math.abs(n + r - u - l), g = Math.abs(n - r) + Math.abs(u - l);
3028
3028
  return _ <= d && f <= g;
3029
3029
  }
3030
3030
  static getIntersects(e, s) {
3031
- const n = e.startRow, r = e.endRow, i = e.startColumn, o = e.endColumn, u = s.startRow, a = s.endRow, c = s.startColumn, l = s.endColumn;
3031
+ const n = e.startRow, r = e.endRow, i = e.startColumn, o = e.endColumn, u = s.startRow, l = s.endRow, c = s.startColumn, a = s.endColumn;
3032
3032
  let _, d, f, g;
3033
3033
  if (u <= r)
3034
3034
  u >= n ? d = u : d = n;
3035
3035
  else
3036
3036
  return null;
3037
- if (a >= n)
3038
- a >= r ? g = r : g = a;
3037
+ if (l >= n)
3038
+ l >= r ? g = r : g = l;
3039
3039
  else
3040
3040
  return null;
3041
3041
  if (c <= o)
3042
3042
  c > i ? _ = c : _ = i;
3043
3043
  else
3044
3044
  return null;
3045
- if (l >= i)
3046
- l >= o ? f = o : f = l;
3045
+ if (a >= i)
3046
+ a >= o ? f = o : f = a;
3047
3047
  else
3048
3048
  return null;
3049
3049
  return {
@@ -3207,7 +3207,7 @@ function Oe(t, e, s, n) {
3207
3207
  }
3208
3208
  };
3209
3209
  }
3210
- function ao(t) {
3210
+ function lo(t) {
3211
3211
  if (t == null || t.length === 0)
3212
3212
  return Number.NaN;
3213
3213
  const e = t.toLowerCase().split(""), s = e.length, n = (o) => o.charCodeAt(0) - 96;
@@ -3217,7 +3217,7 @@ function ao(t) {
3217
3217
  return r === 0 ? Number.NaN : r - 1;
3218
3218
  }
3219
3219
  const St = 65, Ge = 90, xn = 97;
3220
- function lo(t) {
3220
+ function ao(t) {
3221
3221
  const e = Ge - St + 1;
3222
3222
  let s = "";
3223
3223
  for (; t >= 0; )
@@ -3274,14 +3274,14 @@ function Ve(t, e, s, n) {
3274
3274
  return;
3275
3275
  const i = [], o = r.length;
3276
3276
  let u = !1;
3277
- const a = (c = e.textRuns) != null ? c : [];
3278
- if (a.length)
3279
- for (let l = 0, _ = a.length; l < _; l++) {
3280
- const d = a[l];
3277
+ const l = (c = e.textRuns) != null ? c : [];
3278
+ if (l.length)
3279
+ for (let a = 0, _ = l.length; a < _; a++) {
3280
+ const d = l[a];
3281
3281
  d.st += n, d.ed += n;
3282
3282
  }
3283
- for (let l = 0; l < o; l++) {
3284
- const _ = r[l], { st: d, ed: f } = _;
3283
+ for (let a = 0; a < o; a++) {
3284
+ const _ = r[a], { st: d, ed: f } = _;
3285
3285
  if (f < n)
3286
3286
  i.push(_);
3287
3287
  else if (n >= d && n <= f)
@@ -3290,14 +3290,14 @@ function Ve(t, e, s, n) {
3290
3290
  else {
3291
3291
  u = !0, _.ed += s;
3292
3292
  const g = [];
3293
- if (a.length) {
3293
+ if (l.length) {
3294
3294
  const R = {
3295
3295
  ..._,
3296
3296
  st: d,
3297
- ed: a[0].st
3297
+ ed: l[0].st
3298
3298
  };
3299
- g.push(R), g.push(...a);
3300
- const w = a[a.length - 1], S = {
3299
+ g.push(R), g.push(...l);
3300
+ const w = l[l.length - 1], S = {
3301
3301
  ..._,
3302
3302
  st: w.ed,
3303
3303
  ed: f + s
@@ -3308,31 +3308,31 @@ function Ve(t, e, s, n) {
3308
3308
  i.push(...g);
3309
3309
  }
3310
3310
  else
3311
- _.st += s, _.ed += s, u || (u = !0, i.push(...a)), i.push(_);
3311
+ _.st += s, _.ed += s, u || (u = !0, i.push(...l)), i.push(_);
3312
3312
  }
3313
- u || (u = !0, i.push(...a)), t.textRuns = ke(i);
3313
+ u || (u = !0, i.push(...l)), t.textRuns = ke(i);
3314
3314
  }
3315
3315
  function ie(t, e, s, n) {
3316
3316
  const { paragraphs: r } = t;
3317
3317
  if (r == null)
3318
3318
  return;
3319
3319
  const { paragraphs: i, dataStream: o } = e, u = [];
3320
- let a = -1;
3321
- for (let l = 0, _ = r.length; l < _; l++) {
3322
- const d = r[l], { startIndex: f } = d;
3323
- f >= n && (d.startIndex += s), a === -1 && f >= n && (a = l), u.push(d.startIndex);
3320
+ let l = -1;
3321
+ for (let a = 0, _ = r.length; a < _; a++) {
3322
+ const d = r[a], { startIndex: f } = d;
3323
+ f >= n && (d.startIndex += s), l === -1 && f >= n && (l = a), u.push(d.startIndex);
3324
3324
  }
3325
3325
  let c = -1;
3326
3326
  if (i) {
3327
- for (let l = 0, _ = i.length; l < _; l++) {
3328
- const d = i[l];
3327
+ for (let a = 0, _ = i.length; a < _; a++) {
3328
+ const d = i[a];
3329
3329
  d.startIndex += n;
3330
3330
  const f = d.startIndex;
3331
3331
  c = u.indexOf(f);
3332
3332
  }
3333
3333
  if (o === $e.PARAGRAPH && i.length === 1) {
3334
- const l = r[a], _ = i[0], d = l.paragraphStyle, f = l.bullet;
3335
- l.paragraphStyle = _.paragraphStyle, l.bullet = _.bullet, _.paragraphStyle = d, _.bullet = f;
3334
+ const a = r[l], _ = i[0], d = a.paragraphStyle, f = a.bullet;
3335
+ a.paragraphStyle = _.paragraphStyle, a.bullet = _.bullet, _.paragraphStyle = d, _.bullet = f;
3336
3336
  }
3337
3337
  c !== -1 && r.splice(c, 1), r.push(...i), r.sort(ct("startIndex"));
3338
3338
  }
@@ -3342,14 +3342,14 @@ function Wn(t, e, s, n) {
3342
3342
  if (r == null)
3343
3343
  return;
3344
3344
  for (let o = 0, u = r.length; o < u; o++) {
3345
- const a = r[o], { startIndex: c } = a;
3346
- c >= n && (a.startIndex += s);
3345
+ const l = r[o], { startIndex: c } = l;
3346
+ c >= n && (l.startIndex += s);
3347
3347
  }
3348
3348
  const i = e.sectionBreaks;
3349
3349
  if (i) {
3350
3350
  for (let o = 0, u = i.length; o < u; o++) {
3351
- const a = i[o];
3352
- a.startIndex += n;
3351
+ const l = i[o];
3352
+ l.startIndex += n;
3353
3353
  }
3354
3354
  r.push(...i), r.sort(ct("startIndex"));
3355
3355
  }
@@ -3359,14 +3359,14 @@ function je(t, e, s, n) {
3359
3359
  if (r == null)
3360
3360
  return;
3361
3361
  for (let o = 0, u = r.length; o < u; o++) {
3362
- const a = r[o], { startIndex: c } = a;
3363
- c >= n && (a.startIndex += s);
3362
+ const l = r[o], { startIndex: c } = l;
3363
+ c >= n && (l.startIndex += s);
3364
3364
  }
3365
3365
  const i = e.customBlocks;
3366
3366
  if (i) {
3367
3367
  for (let o = 0, u = i.length; o < u; o++) {
3368
- const a = i[o];
3369
- a.startIndex += n;
3368
+ const l = i[o];
3369
+ l.startIndex += n;
3370
3370
  }
3371
3371
  r.push(...i), r.sort(ct("startIndex"));
3372
3372
  }
@@ -3376,31 +3376,31 @@ function oe(t, e, s, n) {
3376
3376
  if (r == null)
3377
3377
  return;
3378
3378
  for (let o = 0, u = r.length; o < u; o++) {
3379
- const a = r[o], { startIndex: c, endIndex: l } = a;
3380
- c > n ? (a.startIndex += s, a.endIndex += s) : l >= n - 1 && (a.endIndex += s);
3379
+ const l = r[o], { startIndex: c, endIndex: a } = l;
3380
+ c > n ? (l.startIndex += s, l.endIndex += s) : a >= n - 1 && (l.endIndex += s);
3381
3381
  }
3382
3382
  const i = e.tables;
3383
3383
  if (i) {
3384
3384
  for (let o = 0, u = i.length; o < u; o++) {
3385
- const a = i[o];
3386
- a.startIndex += n, a.endIndex += n;
3385
+ const l = i[o];
3386
+ l.startIndex += n, l.endIndex += n;
3387
3387
  }
3388
3388
  r.push(...i), r.sort(ct("startIndex"));
3389
3389
  }
3390
3390
  }
3391
- function Bn(t, e, s, n) {
3391
+ function pn(t, e, s, n) {
3392
3392
  const { customRanges: r } = t;
3393
3393
  if (r == null)
3394
3394
  return;
3395
3395
  for (let o = 0, u = r.length; o < u; o++) {
3396
- const a = r[o], { startIndex: c, endIndex: l } = a;
3397
- c > n ? (a.startIndex += s, a.endIndex += s) : l >= n - 1 && (a.endIndex += s);
3396
+ const l = r[o], { startIndex: c, endIndex: a } = l;
3397
+ c > n ? (l.startIndex += s, l.endIndex += s) : a >= n - 1 && (l.endIndex += s);
3398
3398
  }
3399
3399
  const i = e.customRanges;
3400
3400
  if (i) {
3401
3401
  for (let o = 0, u = i.length; o < u; o++) {
3402
- const a = i[o];
3403
- a.startIndex += n, a.endIndex += n;
3402
+ const l = i[o];
3403
+ l.startIndex += n, l.endIndex += n;
3404
3404
  }
3405
3405
  r.push(...i), r.sort(ct("startIndex"));
3406
3406
  }
@@ -3409,30 +3409,30 @@ function Ye(t, e, s) {
3409
3409
  const { textRuns: n } = t, r = s, i = s + e, o = [];
3410
3410
  if (n) {
3411
3411
  const u = [];
3412
- for (let a = 0, c = n.length; a < c; a++) {
3413
- const l = n[a], { st: _, ed: d } = l;
3412
+ for (let l = 0, c = n.length; l < c; l++) {
3413
+ const a = n[l], { st: _, ed: d } = a;
3414
3414
  if (r <= _ && i >= d) {
3415
3415
  o.push({
3416
- ...l,
3416
+ ...a,
3417
3417
  st: _ - r,
3418
3418
  ed: d - r
3419
3419
  });
3420
3420
  continue;
3421
3421
  } else
3422
3422
  _ <= r && d >= i ? (o.push({
3423
- ...l,
3423
+ ...a,
3424
3424
  st: r - r,
3425
3425
  ed: i - r
3426
- }), l.ed -= e) : r >= _ && r < d ? (o.push({
3427
- ...l,
3426
+ }), a.ed -= e) : r >= _ && r < d ? (o.push({
3427
+ ...a,
3428
3428
  st: r - r,
3429
3429
  ed: d - r
3430
- }), l.ed = r) : i > _ && i <= d ? (o.push({
3431
- ...l,
3430
+ }), a.ed = r) : i > _ && i <= d ? (o.push({
3431
+ ...a,
3432
3432
  st: _ - r,
3433
3433
  ed: i - r
3434
- }), l.st = i - e, l.ed -= e) : _ >= i && (l.st -= e, l.ed -= e);
3435
- u.push(l);
3434
+ }), a.st = i - e, a.ed -= e) : _ >= i && (a.st -= e, a.ed -= e);
3435
+ u.push(a);
3436
3436
  }
3437
3437
  t.textRuns = u;
3438
3438
  }
@@ -3442,17 +3442,17 @@ function Ke(t, e, s) {
3442
3442
  const { paragraphs: n } = t, r = s, i = s + e, o = [];
3443
3443
  if (n) {
3444
3444
  const u = [];
3445
- for (let a = 0, c = n.length; a < c; a++) {
3446
- const l = n[a], { startIndex: _ } = l;
3445
+ for (let l = 0, c = n.length; l < c; l++) {
3446
+ const a = n[l], { startIndex: _ } = a;
3447
3447
  if (_ >= r && _ < i) {
3448
3448
  o.push({
3449
- ...l,
3449
+ ...a,
3450
3450
  startIndex: _ - s
3451
3451
  });
3452
3452
  continue;
3453
3453
  } else
3454
- _ >= i && (l.startIndex -= e);
3455
- u.push(l);
3454
+ _ >= i && (a.startIndex -= e);
3455
+ u.push(a);
3456
3456
  }
3457
3457
  t.paragraphs = u;
3458
3458
  }
@@ -3462,17 +3462,17 @@ function ze(t, e, s) {
3462
3462
  const { sectionBreaks: n } = t, r = s, i = s + e - 1, o = [];
3463
3463
  if (n) {
3464
3464
  const u = [];
3465
- for (let a = 0, c = n.length; a < c; a++) {
3466
- const l = n[a], { startIndex: _ } = l;
3465
+ for (let l = 0, c = n.length; l < c; l++) {
3466
+ const a = n[l], { startIndex: _ } = a;
3467
3467
  if (_ >= r && _ <= i) {
3468
3468
  o.push({
3469
- ...l,
3469
+ ...a,
3470
3470
  startIndex: _ - s
3471
3471
  });
3472
3472
  continue;
3473
3473
  } else
3474
- _ > i && (l.startIndex -= e);
3475
- u.push(l);
3474
+ _ > i && (a.startIndex -= e);
3475
+ u.push(a);
3476
3476
  }
3477
3477
  t.sectionBreaks = u;
3478
3478
  }
@@ -3482,17 +3482,17 @@ function Xe(t, e, s) {
3482
3482
  const { customBlocks: n } = t, r = s, i = s + e - 1, o = [];
3483
3483
  if (n) {
3484
3484
  const u = [];
3485
- for (let a = 0, c = n.length; a < c; a++) {
3486
- const l = n[a], { startIndex: _ } = l;
3485
+ for (let l = 0, c = n.length; l < c; l++) {
3486
+ const a = n[l], { startIndex: _ } = a;
3487
3487
  if (_ >= r && _ <= i) {
3488
3488
  o.push({
3489
- ...l,
3489
+ ...a,
3490
3490
  startIndex: _ - s
3491
3491
  });
3492
3492
  continue;
3493
3493
  } else
3494
- _ > i && (l.startIndex -= e);
3495
- u.push(l);
3494
+ _ > i && (a.startIndex -= e);
3495
+ u.push(a);
3496
3496
  }
3497
3497
  t.customBlocks = u;
3498
3498
  }
@@ -3502,21 +3502,21 @@ function Qe(t, e, s) {
3502
3502
  const { tables: n } = t, r = s, i = s + e - 1, o = [];
3503
3503
  if (n) {
3504
3504
  const u = [];
3505
- for (let a = 0, c = n.length; a < c; a++) {
3506
- const l = n[a], { startIndex: _, endIndex: d } = l;
3505
+ for (let l = 0, c = n.length; l < c; l++) {
3506
+ const a = n[l], { startIndex: _, endIndex: d } = a;
3507
3507
  if (r <= _ && i >= d) {
3508
3508
  o.push({
3509
- ...l,
3509
+ ...a,
3510
3510
  startIndex: _ - s,
3511
3511
  endIndex: d - s
3512
3512
  });
3513
3513
  continue;
3514
3514
  } else if (_ <= r && d >= i) {
3515
- const f = Be(_, d, r, i);
3516
- l.startIndex = f[0], l.endIndex = f[1];
3515
+ const f = pe(_, d, r, i);
3516
+ a.startIndex = f[0], a.endIndex = f[1];
3517
3517
  } else
3518
- i < _ && (l.startIndex -= e, l.endIndex -= e);
3519
- u.push(l);
3518
+ i < _ && (a.startIndex -= e, a.endIndex -= e);
3519
+ u.push(a);
3520
3520
  }
3521
3521
  t.tables = u;
3522
3522
  }
@@ -3526,43 +3526,43 @@ function qe(t, e, s) {
3526
3526
  const { customRanges: n } = t, r = s, i = s + e - 1, o = [];
3527
3527
  if (n) {
3528
3528
  const u = [];
3529
- for (let a = 0, c = n.length; a < c; a++) {
3530
- const l = n[a], { startIndex: _, endIndex: d } = l;
3529
+ for (let l = 0, c = n.length; l < c; l++) {
3530
+ const a = n[l], { startIndex: _, endIndex: d } = a;
3531
3531
  if (r <= _ && i >= d) {
3532
3532
  o.push({
3533
- ...l,
3533
+ ...a,
3534
3534
  startIndex: _ - s,
3535
3535
  endIndex: d - s
3536
3536
  });
3537
3537
  continue;
3538
3538
  } else if (_ <= r && d >= i) {
3539
- const f = Be(_, d, r, i);
3540
- l.startIndex = f[0], l.endIndex = f[1];
3539
+ const f = pe(_, d, r, i);
3540
+ a.startIndex = f[0], a.endIndex = f[1];
3541
3541
  } else
3542
- i < _ && (l.startIndex -= e, l.endIndex -= e);
3543
- u.push(l);
3542
+ i < _ && (a.startIndex -= e, a.endIndex -= e);
3543
+ u.push(a);
3544
3544
  }
3545
3545
  t.customRanges = u;
3546
3546
  }
3547
3547
  return o;
3548
3548
  }
3549
- function pn(t, e, s) {
3550
- const { dataStream: n } = t, r = s, i = s + e, o = Ye(t, e, s), u = Ke(t, e, s), a = ze(t, e, s), c = Xe(t, e, s), l = Qe(t, e, s), _ = qe(t, e, s);
3549
+ function Bn(t, e, s) {
3550
+ const { dataStream: n } = t, r = s, i = s + e, o = Ye(t, e, s), u = Ke(t, e, s), l = ze(t, e, s), c = Xe(t, e, s), a = Qe(t, e, s), _ = qe(t, e, s);
3551
3551
  let d = "";
3552
3552
  return n && (t.dataStream = wn(n, r, i), d = n.slice(r, i)), {
3553
3553
  dataStream: d,
3554
3554
  textRuns: o,
3555
3555
  paragraphs: u,
3556
- sectionBreaks: a,
3556
+ sectionBreaks: l,
3557
3557
  customBlocks: c,
3558
- tables: l,
3558
+ tables: a,
3559
3559
  customRanges: _
3560
3560
  };
3561
3561
  }
3562
3562
  function Gn(t, e, s, n) {
3563
- t.dataStream = Sn(t.dataStream, n, e.dataStream), Ve(t, e, s, n), ie(t, e, s, n), Wn(t, e, s, n), je(t, e, s, n), oe(t, e, s, n), Bn(t, e, s, n);
3563
+ t.dataStream = Sn(t.dataStream, n, e.dataStream), Ve(t, e, s, n), ie(t, e, s, n), Wn(t, e, s, n), je(t, e, s, n), oe(t, e, s, n), pn(t, e, s, n);
3564
3564
  }
3565
- var $n = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))($n || {}), kn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(kn || {}), Ot = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ot || {}), Q = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(Q || {}), Vn = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(Vn || {}), jn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(jn || {}), Yn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(Yn || {}), Kn = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(Kn || {}), zn = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(zn || {}), Xn = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(Xn || {}), Qn = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(Qn || {}), qn = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(qn || {}), Jn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(Jn || {}), Zn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Zn || {}), yn = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(yn || {}), tr = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(tr || {}), er = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(er || {}), sr = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(sr || {}), nr = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(nr || {}), rr = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(rr || {}), ir = /* @__PURE__ */ ((t) => (t[t.CHARACTER = 0] = "CHARACTER", t[t.COLUMN = 1] = "COLUMN", t[t.INSIDE_MARGIN = 2] = "INSIDE_MARGIN", t[t.LEFT_MARGIN = 3] = "LEFT_MARGIN", t[t.MARGIN = 4] = "MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.PAGE = 6] = "PAGE", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(ir || {}), or = /* @__PURE__ */ ((t) => (t[t.BOTTOM_MARGIN = 0] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 1] = "INSIDE_MARGIN", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.OUTSIDE_MARGIN = 4] = "OUTSIDE_MARGIN", t[t.PAGE = 5] = "PAGE", t[t.PARAGRAPH = 6] = "PARAGRAPH", t[t.TOP_MARGIN = 7] = "TOP_MARGIN", t))(or || {}), ur = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(ur || {}), ar = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(ar || {}), lr = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(lr || {}), cr = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(cr || {}), hr = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(hr || {}), Yt = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(Yt || {});
3565
+ var $n = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))($n || {}), kn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(kn || {}), Ot = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ot || {}), Q = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(Q || {}), Vn = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(Vn || {}), jn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(jn || {}), Yn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(Yn || {}), Kn = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(Kn || {}), zn = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(zn || {}), Xn = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(Xn || {}), Qn = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(Qn || {}), qn = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(qn || {}), Jn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(Jn || {}), Zn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Zn || {}), yn = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(yn || {}), tr = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(tr || {}), er = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(er || {}), sr = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(sr || {}), nr = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(nr || {}), rr = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(rr || {}), ir = /* @__PURE__ */ ((t) => (t[t.CHARACTER = 0] = "CHARACTER", t[t.COLUMN = 1] = "COLUMN", t[t.INSIDE_MARGIN = 2] = "INSIDE_MARGIN", t[t.LEFT_MARGIN = 3] = "LEFT_MARGIN", t[t.MARGIN = 4] = "MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.PAGE = 6] = "PAGE", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(ir || {}), or = /* @__PURE__ */ ((t) => (t[t.BOTTOM_MARGIN = 0] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 1] = "INSIDE_MARGIN", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.OUTSIDE_MARGIN = 4] = "OUTSIDE_MARGIN", t[t.PAGE = 5] = "PAGE", t[t.PARAGRAPH = 6] = "PARAGRAPH", t[t.TOP_MARGIN = 7] = "TOP_MARGIN", t))(or || {}), ur = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(ur || {}), lr = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(lr || {}), ar = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(ar || {}), cr = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(cr || {}), hr = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(hr || {}), Yt = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(Yt || {});
3566
3566
  const fo = {
3567
3567
  BULLET_LIST: {
3568
3568
  listType: "BULLET_LIST",
@@ -3642,15 +3642,15 @@ const fo = {
3642
3642
  }
3643
3643
  };
3644
3644
  function _r(t, e, s, n, r) {
3645
- const i = dr(t, e, s, n, r), o = fr(t, e, s, n, r), u = gr(t, e, s, n, r), a = Er(t, e, s, n, r), c = Rr(t, e, s, n, r), l = mr(t, e, s, n, r);
3645
+ const i = dr(t, e, s, n, r), o = fr(t, e, s, n, r), u = gr(t, e, s, n, r), l = Er(t, e, s, n, r), c = Rr(t, e, s, n, r), a = mr(t, e, s, n, r);
3646
3646
  return {
3647
3647
  dataStream: "",
3648
3648
  textRuns: i,
3649
3649
  paragraphs: o,
3650
3650
  sectionBreaks: u,
3651
- customBlocks: a,
3651
+ customBlocks: l,
3652
3652
  tables: c,
3653
- customRanges: l
3653
+ customRanges: a
3654
3654
  };
3655
3655
  }
3656
3656
  function dr(t, e, s, n, r) {
@@ -3659,8 +3659,8 @@ function dr(t, e, s, n, r) {
3659
3659
  return;
3660
3660
  const u = Ye(t, s, n);
3661
3661
  if (r !== M.REPLACE) {
3662
- const a = Je(o, u, r);
3663
- e.textRuns = a;
3662
+ const l = Je(o, u, r);
3663
+ e.textRuns = l;
3664
3664
  }
3665
3665
  return Ve(t, e, s, n), u;
3666
3666
  }
@@ -3669,9 +3669,9 @@ function Je(t, e, s) {
3669
3669
  return t;
3670
3670
  t = E.deepClone(t), e = E.deepClone(e);
3671
3671
  const n = [], r = t.length, i = e.length;
3672
- let o = 0, u = 0, a = null;
3672
+ let o = 0, u = 0, l = null;
3673
3673
  function c() {
3674
- return a ? (n.push(a), a = null, !0) : !1;
3674
+ return l ? (n.push(l), l = null, !0) : !1;
3675
3675
  }
3676
3676
  for (; o < r && u < i; ) {
3677
3677
  const { st: f, ed: g, ts: R } = t[o], { st: w, ed: S, ts: W, sId: G } = e[u];
@@ -3686,7 +3686,7 @@ function Je(t, e, s) {
3686
3686
  ed: Math.min(g, S),
3687
3687
  ts: et,
3688
3688
  sId: G
3689
- }), g < S ? (o++, e[u].st = g) : (u++, t[o].st = S), a = {
3689
+ }), g < S ? (o++, e[u].st = g) : (u++, t[o].st = S), l = {
3690
3690
  st: Math.min(g, S),
3691
3691
  ed: Math.max(g, S),
3692
3692
  ts: g < S ? { ...W } : { ...R },
@@ -3694,8 +3694,8 @@ function Je(t, e, s) {
3694
3694
  });
3695
3695
  }
3696
3696
  c();
3697
- const l = n[n.length - 1], _ = t[r - 1], d = e[i - 1];
3698
- return l.ed !== Math.max(_.ed, d.ed) && (_.ed > d.ed ? n.push(_) : n.push(d)), ke(n);
3697
+ const a = n[n.length - 1], _ = t[r - 1], d = e[i - 1];
3698
+ return a.ed !== Math.max(_.ed, d.ed) && (_.ed > d.ed ? n.push(_) : n.push(d)), ke(n);
3699
3699
  }
3700
3700
  function fr(t, e, s, n, r) {
3701
3701
  const { paragraphs: i } = t, { paragraphs: o } = e;
@@ -3703,10 +3703,10 @@ function fr(t, e, s, n, r) {
3703
3703
  return;
3704
3704
  const u = Ke(t, s, n);
3705
3705
  if (r !== M.REPLACE) {
3706
- const a = [];
3706
+ const l = [];
3707
3707
  for (const c of o) {
3708
3708
  const {
3709
- startIndex: l,
3709
+ startIndex: a,
3710
3710
  paragraphStyle: _,
3711
3711
  bullet: d
3712
3712
  } = c;
@@ -3732,18 +3732,18 @@ function fr(t, e, s, n, r) {
3732
3732
  textStyle: {},
3733
3733
  ...d,
3734
3734
  ...S
3735
- }), l === R) {
3735
+ }), a === R) {
3736
3736
  f.push({
3737
- startIndex: l,
3737
+ startIndex: a,
3738
3738
  paragraphStyle: W,
3739
3739
  bullet: G
3740
3740
  });
3741
3741
  break;
3742
3742
  }
3743
3743
  }
3744
- a.push(...f), f = [];
3744
+ l.push(...f), f = [];
3745
3745
  }
3746
- e.paragraphs = a;
3746
+ e.paragraphs = l;
3747
3747
  }
3748
3748
  return ie(t, e, s, n), u;
3749
3749
  }
@@ -3753,13 +3753,13 @@ function gr(t, e, s, n, r) {
3753
3753
  return;
3754
3754
  const u = ze(t, s, n);
3755
3755
  if (r !== M.REPLACE) {
3756
- const a = [];
3756
+ const l = [];
3757
3757
  for (const c of o) {
3758
- const { startIndex: l } = c;
3758
+ const { startIndex: a } = c;
3759
3759
  let _ = [];
3760
3760
  for (const d of u) {
3761
3761
  const { startIndex: f } = d;
3762
- if (l === f) {
3762
+ if (a === f) {
3763
3763
  r === M.COVER ? _.push({
3764
3764
  ...d,
3765
3765
  ...c
@@ -3770,9 +3770,9 @@ function gr(t, e, s, n, r) {
3770
3770
  break;
3771
3771
  }
3772
3772
  }
3773
- a.push(..._), _ = [];
3773
+ l.push(..._), _ = [];
3774
3774
  }
3775
- e.sectionBreaks = a;
3775
+ e.sectionBreaks = l;
3776
3776
  }
3777
3777
  return ie(t, e, s, n), u;
3778
3778
  }
@@ -3782,13 +3782,13 @@ function Er(t, e, s, n, r) {
3782
3782
  return;
3783
3783
  const u = Xe(t, s, n);
3784
3784
  if (r !== M.REPLACE) {
3785
- const a = [];
3785
+ const l = [];
3786
3786
  for (const c of o) {
3787
- const { startIndex: l } = c;
3787
+ const { startIndex: a } = c;
3788
3788
  let _ = [];
3789
3789
  for (const d of u) {
3790
3790
  const { startIndex: f } = d;
3791
- if (l === f) {
3791
+ if (a === f) {
3792
3792
  r === M.COVER ? _.push({
3793
3793
  ...d,
3794
3794
  ...c
@@ -3799,9 +3799,9 @@ function Er(t, e, s, n, r) {
3799
3799
  break;
3800
3800
  }
3801
3801
  }
3802
- a.push(..._), _ = [];
3802
+ l.push(..._), _ = [];
3803
3803
  }
3804
- e.customBlocks = a;
3804
+ e.customBlocks = l;
3805
3805
  }
3806
3806
  return je(t, e, s, n), u;
3807
3807
  }
@@ -3811,13 +3811,13 @@ function Rr(t, e, s, n, r) {
3811
3811
  return;
3812
3812
  const u = Qe(t, s, n);
3813
3813
  if (r !== M.REPLACE) {
3814
- const a = [];
3814
+ const l = [];
3815
3815
  for (const c of o) {
3816
- const { startIndex: l, endIndex: _ } = c;
3816
+ const { startIndex: a, endIndex: _ } = c;
3817
3817
  let d = [];
3818
3818
  for (const f of u) {
3819
3819
  const { startIndex: g, endIndex: R } = f;
3820
- if (g >= l && R <= _) {
3820
+ if (g >= a && R <= _) {
3821
3821
  r === M.COVER ? d.push({
3822
3822
  ...f,
3823
3823
  ...c
@@ -3828,9 +3828,9 @@ function Rr(t, e, s, n, r) {
3828
3828
  break;
3829
3829
  }
3830
3830
  }
3831
- a.push(...d), d = [];
3831
+ l.push(...d), d = [];
3832
3832
  }
3833
- e.tables = a;
3833
+ e.tables = l;
3834
3834
  }
3835
3835
  return oe(t, e, s, n), u;
3836
3836
  }
@@ -3840,13 +3840,13 @@ function mr(t, e, s, n, r) {
3840
3840
  return;
3841
3841
  const u = qe(t, s, n);
3842
3842
  if (r !== M.REPLACE) {
3843
- const a = [];
3843
+ const l = [];
3844
3844
  for (const c of o) {
3845
- const { startIndex: l, endIndex: _ } = c;
3845
+ const { startIndex: a, endIndex: _ } = c;
3846
3846
  let d = [];
3847
3847
  for (const f of u) {
3848
3848
  const { startIndex: g, endIndex: R } = f;
3849
- if (g >= l && R <= _) {
3849
+ if (g >= a && R <= _) {
3850
3850
  r === M.COVER ? d.push({
3851
3851
  ...f,
3852
3852
  ...c
@@ -3857,9 +3857,9 @@ function mr(t, e, s, n, r) {
3857
3857
  break;
3858
3858
  }
3859
3859
  }
3860
- a.push(...d), d = [];
3860
+ l.push(...d), d = [];
3861
3861
  }
3862
- e.customRanges = a;
3862
+ e.customRanges = l;
3863
3863
  }
3864
3864
  return oe(t, e, s, n), u;
3865
3865
  }
@@ -3869,31 +3869,31 @@ function Ze(t, e, s) {
3869
3869
  dataStream: n.slice(e, s)
3870
3870
  }, u = [];
3871
3871
  for (const c of r) {
3872
- const l = E.deepClone(c), { st: _, ed: d } = l;
3872
+ const a = E.deepClone(c), { st: _, ed: d } = a;
3873
3873
  E.hasIntersectionBetweenTwoRanges(_, d, e, s) && (e >= _ && e <= d ? u.push({
3874
- ...l,
3874
+ ...a,
3875
3875
  st: e,
3876
3876
  ed: Math.min(s, d)
3877
3877
  }) : s >= _ && s <= d ? u.push({
3878
- ...l,
3878
+ ...a,
3879
3879
  st: Math.max(e, _),
3880
3880
  ed: s
3881
- }) : u.push(l));
3881
+ }) : u.push(a));
3882
3882
  }
3883
3883
  u.length && (o.textRuns = u.map((c) => {
3884
- const { st: l, ed: _ } = c;
3884
+ const { st: a, ed: _ } = c;
3885
3885
  return {
3886
3886
  ...c,
3887
- st: l - e,
3887
+ st: a - e,
3888
3888
  ed: _ - e
3889
3889
  };
3890
3890
  }));
3891
- const a = [];
3891
+ const l = [];
3892
3892
  for (const c of i) {
3893
- const { startIndex: l } = c;
3894
- l >= e && l <= s && a.push(E.deepClone(c));
3893
+ const { startIndex: a } = c;
3894
+ a >= e && a <= s && l.push(E.deepClone(c));
3895
3895
  }
3896
- return a.length && (o.paragraphs = a.map((c) => ({
3896
+ return l.length && (o.paragraphs = l.map((c) => ({
3897
3897
  ...c,
3898
3898
  startIndex: c.startIndex - e
3899
3899
  }))), o;
@@ -3903,15 +3903,15 @@ function Ae(t, e, s = M.COVER) {
3903
3903
  throw new Error("Cannot compose other body with non-empty dataStream");
3904
3904
  const n = {
3905
3905
  dataStream: t.dataStream
3906
- }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, a = Je(o, r, s);
3907
- a.length && (n.textRuns = a);
3906
+ }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, l = Je(o, r, s);
3907
+ l.length && (n.textRuns = l);
3908
3908
  const c = [];
3909
- let l = 0, _ = 0;
3910
- for (; l < i.length && _ < u.length; ) {
3911
- const d = i[l], f = u[_], { startIndex: g } = d, { startIndex: R } = f;
3912
- g === R ? (c.push(E.deepMerge(d, f)), l++, _++) : g < R ? (c.push(E.deepClone(d)), l++) : (c.push(E.deepClone(f)), _++);
3909
+ let a = 0, _ = 0;
3910
+ for (; a < i.length && _ < u.length; ) {
3911
+ const d = i[a], f = u[_], { startIndex: g } = d, { startIndex: R } = f;
3912
+ g === R ? (c.push(E.deepMerge(d, f)), a++, _++) : g < R ? (c.push(E.deepClone(d)), a++) : (c.push(E.deepClone(f)), _++);
3913
3913
  }
3914
- return l < i.length && c.push(...i.slice(l)), _ < u.length && c.push(...u.slice(_)), c.length && (n.paragraphs = c), n;
3914
+ return a < i.length && c.push(...i.slice(a)), _ < u.length && c.push(...u.slice(_)), c.length && (n.paragraphs = c), n;
3915
3915
  }
3916
3916
  function Or(t) {
3917
3917
  const { body: e } = t;
@@ -3973,6 +3973,12 @@ class Ar {
3973
3973
  ...e
3974
3974
  };
3975
3975
  }
3976
+ updateDocumentStyle(e) {
3977
+ this.snapshot.documentStyle == null ? this.snapshot.documentStyle = e : this.snapshot.documentStyle = {
3978
+ ...this.snapshot.documentStyle,
3979
+ ...e
3980
+ };
3981
+ }
3976
3982
  updateDocumentDataMargin(e) {
3977
3983
  const { t: s, l: n, b: r, r: i } = e, { documentStyle: o } = this.snapshot;
3978
3984
  s != null && (o.marginTop = s), n != null && (o.marginLeft = n), r != null && (o.marginBottom = r), i != null && (o.marginRight = i);
@@ -3989,10 +3995,10 @@ class Ar {
3989
3995
  e !== void 0 && (n.pageSize.width = e), s !== void 0 && (n.pageSize.height = s);
3990
3996
  }
3991
3997
  updateDrawing(e, s) {
3992
- const { drawings: n } = this, { width: r, height: i, left: o, top: u } = s, a = n == null ? void 0 : n[e];
3993
- if (!a)
3998
+ const { drawings: n } = this, { width: r, height: i, left: o, top: u } = s, l = n == null ? void 0 : n[e];
3999
+ if (!l)
3994
4000
  return;
3995
- const c = a.objectTransform;
4001
+ const c = l.objectTransform;
3996
4002
  c.size.width = r, c.size.height = i, c.positionH.posOffset = o, c.positionV.posOffset = u;
3997
4003
  }
3998
4004
  setZoomRatio(e = 1) {
@@ -4050,35 +4056,35 @@ class ut extends Ar {
4050
4056
  const n = [], r = new Gs();
4051
4057
  return r.reset(), s.forEach((i) => {
4052
4058
  if (i = E.deepClone(i), i.t === m.RETAIN) {
4053
- const { coverType: o, body: u, len: a, segmentId: c } = i;
4059
+ const { coverType: o, body: u, len: l, segmentId: c } = i;
4054
4060
  if (u != null) {
4055
- const l = this._updateApply(u, a, r.cursor, o, c);
4061
+ const a = this._updateApply(u, l, r.cursor, o, c);
4056
4062
  n.push({
4057
4063
  ...i,
4058
4064
  t: m.RETAIN,
4059
4065
  coverType: M.REPLACE,
4060
- body: l
4066
+ body: a
4061
4067
  });
4062
4068
  } else
4063
4069
  n.push({
4064
4070
  ...i,
4065
4071
  t: m.RETAIN
4066
4072
  });
4067
- r.moveCursor(a);
4073
+ r.moveCursor(l);
4068
4074
  } else if (i.t === m.INSERT) {
4069
- const { body: o, len: u, segmentId: a, line: c } = i;
4070
- this._insertApply(o, u, r.cursor, a), r.moveCursor(u), n.push({
4075
+ const { body: o, len: u, segmentId: l, line: c } = i;
4076
+ this._insertApply(o, u, r.cursor, l), r.moveCursor(u), n.push({
4071
4077
  t: m.DELETE,
4072
4078
  len: u,
4073
4079
  line: c,
4074
- segmentId: a
4080
+ segmentId: l
4075
4081
  });
4076
4082
  } else if (i.t === m.DELETE) {
4077
- const { len: o, segmentId: u } = i, a = this._deleteApply(o, r.cursor, u);
4083
+ const { len: o, segmentId: u } = i, l = this._deleteApply(o, r.cursor, u);
4078
4084
  n.push({
4079
4085
  ...i,
4080
4086
  t: m.INSERT,
4081
- body: a
4087
+ body: l
4082
4088
  });
4083
4089
  } else
4084
4090
  throw new Error(`Unknown action type for action: ${i}.`);
@@ -4092,16 +4098,16 @@ class ut extends Ar {
4092
4098
  _updateApply(s, n, r, i = M.COVER, o) {
4093
4099
  if (s == null)
4094
4100
  throw new Error("updateBody is none");
4095
- const u = this.snapshot, a = Tt(u, o);
4096
- if (a == null)
4101
+ const u = this.snapshot, l = Tt(u, o);
4102
+ if (l == null)
4097
4103
  throw new Error("no body has changed");
4098
- return _r(a, s, n, r, i);
4104
+ return _r(l, s, n, r, i);
4099
4105
  }
4100
4106
  _deleteApply(s, n, r) {
4101
4107
  const i = this.snapshot, o = Tt(i, r);
4102
4108
  if (o == null)
4103
4109
  throw new Error("no body has changed");
4104
- return s <= 0 ? { dataStream: "" } : pn(o, s, n);
4110
+ return s <= 0 ? { dataStream: "" } : Bn(o, s, n);
4105
4111
  }
4106
4112
  _insertApply(s, n, r, i) {
4107
4113
  const o = this.snapshot, u = Tt(o, i);
@@ -4128,7 +4134,7 @@ class ut extends Ar {
4128
4134
  super.updateDocumentId(s), this._unitId = s;
4129
4135
  }
4130
4136
  }
4131
- const Ir = "0.1.0-beta.5", gt = {
4137
+ const Ir = "0.1.1", gt = {
4132
4138
  sheetId: "",
4133
4139
  range: {
4134
4140
  startRow: -1,
@@ -4458,33 +4464,34 @@ class vr {
4458
4464
  }
4459
4465
  }
4460
4466
  function Et(t, e) {
4461
- const { textRuns: s = [], paragraphs: n = [], sectionBreaks: r = [] } = e;
4462
- let i = 0;
4463
- for (const o of s) {
4464
- const { ts: u = {}, st: a, ed: c } = o;
4465
- if (u[t] == null)
4467
+ const { textRuns: s = [] } = e;
4468
+ let n = 0;
4469
+ for (const i of s) {
4470
+ const { ts: o = {}, st: u, ed: l } = i;
4471
+ if (o[t] == null)
4466
4472
  return O.FALSE;
4467
4473
  switch (t) {
4468
4474
  case "bl":
4469
4475
  case "it": {
4470
- if (u[t] === O.FALSE)
4476
+ if (o[t] === O.FALSE)
4471
4477
  return O.FALSE;
4472
4478
  break;
4473
4479
  }
4474
4480
  case "ul":
4475
4481
  case "st": {
4476
- if (u[t].s === O.FALSE)
4482
+ if (o[t].s === O.FALSE)
4477
4483
  return O.FALSE;
4478
4484
  break;
4479
4485
  }
4480
4486
  default:
4481
4487
  throw new Error(`unknown style key: ${t} in IStyleBase`);
4482
4488
  }
4483
- i += c - a;
4489
+ n += l - u;
4484
4490
  }
4485
- return e.dataStream.length - n.length - r.length === i ? O.TRUE : O.FALSE;
4491
+ return e.dataStream.indexOf(`\r
4492
+ `) === n ? O.TRUE : O.FALSE;
4486
4493
  }
4487
- class at {
4494
+ class lt {
4488
4495
  constructor(e, s, n) {
4489
4496
  h(this, "_range");
4490
4497
  h(this, "_worksheet");
@@ -4493,8 +4500,8 @@ class at {
4493
4500
  static foreach(e, s) {
4494
4501
  const { startRow: n, startColumn: r, endRow: i, endColumn: o } = e;
4495
4502
  for (let u = n; u <= i; u++)
4496
- for (let a = r; a <= o; a++)
4497
- s(u, a);
4503
+ for (let l = r; l <= o; l++)
4504
+ s(u, l);
4498
4505
  }
4499
4506
  /**
4500
4507
  * get current range data
@@ -4529,8 +4536,8 @@ class at {
4529
4536
  const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = [];
4530
4537
  for (let o = e; o <= s; o++) {
4531
4538
  const u = [];
4532
- for (let a = n; a <= r; a++)
4533
- u.push(this.getMatrix().getValue(o, a) || null);
4539
+ for (let l = n; l <= r; l++)
4540
+ u.push(this.getMatrix().getValue(o, l) || null);
4534
4541
  i.push(u);
4535
4542
  }
4536
4543
  return i;
@@ -4543,8 +4550,8 @@ class at {
4543
4550
  getMatrix() {
4544
4551
  const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new V();
4545
4552
  for (let u = e; u <= s; u++)
4546
- for (let a = n; a <= r; a++)
4547
- o.setValue(u, a, i.getValue(u, a) || null);
4553
+ for (let l = n; l <= r; l++)
4554
+ o.setValue(u, l, i.getValue(u, l) || null);
4548
4555
  return o;
4549
4556
  }
4550
4557
  /**
@@ -4555,8 +4562,8 @@ class at {
4555
4562
  getMatrixObject() {
4556
4563
  const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new V();
4557
4564
  for (let u = e; u <= s; u++)
4558
- for (let a = n; a <= r; a++)
4559
- o.setValue(u - e, a - n, i.getValue(u, a) || {});
4565
+ for (let l = n; l <= r; l++)
4566
+ o.setValue(u - e, l - n, i.getValue(u, l) || {});
4560
4567
  return o;
4561
4568
  }
4562
4569
  /**
@@ -4606,7 +4613,7 @@ class at {
4606
4613
  startColumn: i + s,
4607
4614
  endColumn: i + s
4608
4615
  };
4609
- return new at(this._worksheet, u, this._deps);
4616
+ return new lt(this._worksheet, u, this._deps);
4610
4617
  }
4611
4618
  /**
4612
4619
  * Returns the starting column position for this range
@@ -4632,13 +4639,13 @@ class at {
4632
4639
  var u;
4633
4640
  const { startRow: s, endRow: n, startColumn: r, endColumn: i } = this._range, o = this._worksheet.getCellMatrix().getFragment(s, n, r, i).getData();
4634
4641
  if (e.isIncludeStyle) {
4635
- const a = this._deps.getStyles();
4642
+ const l = this._deps.getStyles();
4636
4643
  for (let c = 0; c <= n - s; c++)
4637
- for (let l = 0; l <= i - r; l++) {
4638
- if (o == null || ((u = o == null ? void 0 : o[c]) == null ? void 0 : u[l]) == null)
4644
+ for (let a = 0; a <= i - r; a++) {
4645
+ if (o == null || ((u = o == null ? void 0 : o[c]) == null ? void 0 : u[a]) == null)
4639
4646
  continue;
4640
- const _ = o[c][l].s;
4641
- _ && (o[c][l].s = a.get(_));
4647
+ const _ = o[c][a].s;
4648
+ _ && (o[c][a].s = l.get(_));
4642
4649
  }
4643
4650
  }
4644
4651
  return o;
@@ -4749,12 +4756,12 @@ class at {
4749
4756
  getFontStyle() {
4750
4757
  var s, n;
4751
4758
  const { p: e } = (s = this.getValue()) != null ? s : {};
4752
- return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Et("it", e.body) === O.TRUE ? Gt.ITALIC : Gt.NORMAL : this.getFontStyles()[0][0];
4759
+ return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Et("it", e.body) === O.TRUE ? Gt.ITALIC : Gt.NORMAL : this._getFontStyles()[0][0];
4753
4760
  }
4754
4761
  /**
4755
4762
  * Returns the font styles of the cells in the range.
4756
4763
  */
4757
- getFontStyles() {
4764
+ _getFontStyles() {
4758
4765
  return this._getStyles("it");
4759
4766
  }
4760
4767
  /**
@@ -4940,7 +4947,7 @@ class at {
4940
4947
  return this.getWrapStrategies()[0][0];
4941
4948
  }
4942
4949
  forEach(e) {
4943
- at.foreach(this._range, e);
4950
+ lt.foreach(this._range, e);
4944
4951
  }
4945
4952
  /**
4946
4953
  *
@@ -4985,8 +4992,8 @@ class Dr {
4985
4992
  const u = n[o + e] || {
4986
4993
  hd: O.FALSE,
4987
4994
  h: r.defaultRowHeight
4988
- }, { ia: a, ah: c, h: l = r.defaultRowHeight } = u;
4989
- i += (a == null || a === O.TRUE) && typeof c == "number" ? c : l;
4995
+ }, { ia: l, ah: c, h: a = r.defaultRowHeight } = u;
4996
+ i += (l == null || l === O.TRUE) && typeof c == "number" ? c : a;
4990
4997
  }
4991
4998
  return i;
4992
4999
  }
@@ -5182,15 +5189,15 @@ class wt {
5182
5189
  */
5183
5190
  getCellMatrixPrintRange() {
5184
5191
  const e = this.getCellMatrix(), s = this.getMergeData();
5185
- let n = -1, r = -1, i = -1, o = -1, u = !1, a = !1;
5186
- return e.forEach((c, l) => {
5187
- Object.keys(l).forEach((_) => {
5192
+ let n = -1, r = -1, i = -1, o = -1, u = !1, l = !1;
5193
+ return e.forEach((c, a) => {
5194
+ Object.keys(a).forEach((_) => {
5188
5195
  const d = +_, f = e.getValue(c, d), g = f != null && f.s ? this._styles.get(f.s) : null, R = (g == null ? void 0 : g.bd) && (g.bd.b || g.bd.l || g.bd.r || g.bd.t || g.bd.bc_tr || g.bd.bl_tr || g.bd.ml_tr || g.bd.tl_bc || g.bd.tl_br || g.bd.tl_mr);
5189
- (f && (f.v || f.p) || g != null && g.bg || R) && (u ? n = Math.min(n, c) : (n = c, u = !0), r = Math.max(r, c), a ? i = Math.min(i, d) : (a = !0, i = d), o = Math.max(o, d));
5196
+ (f && (f.v || f.p) || g != null && g.bg || R) && (u ? n = Math.min(n, c) : (n = c, u = !0), r = Math.max(r, c), l ? i = Math.min(i, d) : (l = !0, i = d), o = Math.max(o, d));
5190
5197
  });
5191
5198
  }), s.forEach((c) => {
5192
- u ? n = Math.min(n, c.startRow) : (n = c.startRow, u = !0), r = Math.max(r, c.endRow), a ? i = Math.min(i, c.startColumn) : (i = c.startColumn, u = !0), o = Math.max(o, c.endColumn);
5193
- }), !u || !a ? null : {
5199
+ u ? n = Math.min(n, c.startRow) : (n = c.startRow, u = !0), r = Math.max(r, c.endRow), l ? i = Math.min(i, c.startColumn) : (i = c.startColumn, u = !0), o = Math.max(o, c.endColumn);
5200
+ }), !u || !l ? null : {
5194
5201
  startColumn: i,
5195
5202
  startRow: n,
5196
5203
  endColumn: o,
@@ -5291,26 +5298,26 @@ class wt {
5291
5298
  // PERF: we could not skip indexes with merged cells, because we have already known the merged cells' range
5292
5299
  getMatrixWithMergedCells(e, s, n, r) {
5293
5300
  const i = this.getCellMatrix(), o = this._snapshot.mergeData.filter(
5294
- (a) => it.intersects({ startRow: e, startColumn: s, endRow: n, endColumn: r }, a)
5301
+ (l) => it.intersects({ startRow: e, startColumn: s, endRow: n, endColumn: r }, l)
5295
5302
  ), u = new V();
5296
- return Oe(e, n, s, r).forEach((a, c) => {
5297
- const l = i.getValue(a, c);
5298
- l && u.setValue(a, c, l);
5299
- }), o.forEach((a) => {
5300
- const { startColumn: c, startRow: l, endColumn: _, endRow: d } = a;
5301
- Oe(l, d, c, _).forEach((f, g) => {
5302
- f === l && g === c && u.setValue(f, g, {
5303
+ return Oe(e, n, s, r).forEach((l, c) => {
5304
+ const a = i.getValue(l, c);
5305
+ a && u.setValue(l, c, a);
5306
+ }), o.forEach((l) => {
5307
+ const { startColumn: c, startRow: a, endColumn: _, endRow: d } = l;
5308
+ Oe(a, d, c, _).forEach((f, g) => {
5309
+ f === a && g === c && u.setValue(f, g, {
5303
5310
  ...i.getValue(f, g),
5304
- rowSpan: d - l + 1,
5311
+ rowSpan: d - a + 1,
5305
5312
  colSpan: _ - c + 1
5306
- }), (f !== l || g !== c) && u.realDeleteValue(f, g);
5313
+ }), (f !== a || g !== c) && u.realDeleteValue(f, g);
5307
5314
  });
5308
5315
  }), u;
5309
5316
  }
5310
5317
  getRange(e, s, n, r) {
5311
- return typeof e == "object" ? new at(this, e, {
5318
+ return typeof e == "object" ? new lt(this, e, {
5312
5319
  getStyles: () => this._styles
5313
- }) : new at(
5320
+ }) : new lt(
5314
5321
  this,
5315
5322
  {
5316
5323
  startRow: e,
@@ -5469,10 +5476,10 @@ class wt {
5469
5476
  // #region iterators
5470
5477
  // #endregion
5471
5478
  }
5472
- var Br = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Gr = (t, e, s, n) => {
5473
- for (var r = n > 1 ? void 0 : n ? pr(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5479
+ var pr = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, Gr = (t, e, s, n) => {
5480
+ for (var r = n > 1 ? void 0 : n ? Br(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5474
5481
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
5475
- return n && r && Br(e, s, r), r;
5482
+ return n && r && pr(e, s, r), r;
5476
5483
  }, $r = (t, e) => (s, n) => e(s, n, t);
5477
5484
  function vo(t, e) {
5478
5485
  return `${t.getUnitId()}|${e.getSheetId()}`;
@@ -5732,7 +5739,7 @@ let Lt = class extends U {
5732
5739
  * @returns
5733
5740
  */
5734
5741
  _getCellRange(e) {
5735
- var c, l, _, d, f;
5742
+ var c, a, _, d, f;
5736
5743
  let s = "", n = "";
5737
5744
  if (e.indexOf("!") > -1) {
5738
5745
  const g = e.split("!");
@@ -5752,7 +5759,7 @@ let Lt = class extends U {
5752
5759
  } : gt;
5753
5760
  }
5754
5761
  n = n.split(":");
5755
- const r = [0, 0], i = [0, 0], o = ((c = this.getSheetBySheetName(s)) == null ? void 0 : c.getMaxRows()) || ((l = this.getActiveSheet()) == null ? void 0 : l.getMaxRows()), u = ((_ = this.getSheetBySheetName(s)) == null ? void 0 : _.getMaxColumns()) || ((d = this.getActiveSheet()) == null ? void 0 : d.getMaxColumns());
5762
+ const r = [0, 0], i = [0, 0], o = ((c = this.getSheetBySheetName(s)) == null ? void 0 : c.getMaxRows()) || ((a = this.getActiveSheet()) == null ? void 0 : a.getMaxRows()), u = ((_ = this.getSheetBySheetName(s)) == null ? void 0 : _.getMaxColumns()) || ((d = this.getActiveSheet()) == null ? void 0 : d.getMaxColumns());
5756
5763
  return r[0] = Number.parseInt(n[0].replace(/[^0-9]/g, ""), 10) - 1, r[1] = Number.parseInt(n[1].replace(/[^0-9]/g, ""), 10) - 1, Number.isNaN(r[0]) && (r[0] = 0), Number.isNaN(r[1]) && (r[1] = o), r[0] > r[1] || (i[0] = E.ABCatNum(n[0].replace(/[^A-Za-z]/g, "")), i[1] = E.ABCatNum(n[1].replace(/[^A-Za-z]/g, "")), Number.isNaN(i[0]) && (i[0] = 0), Number.isNaN(i[1]) && (i[1] = u), i[0] > i[1]) ? gt : {
5757
5764
  sheetId: ((f = this.getSheetBySheetName(s)) == null ? void 0 : f.getSheetId()) || "",
5758
5765
  range: {
@@ -5776,8 +5783,8 @@ let Lt = class extends U {
5776
5783
  for (const i in n) {
5777
5784
  const o = n[i], { name: u } = o;
5778
5785
  o.name = this.uniqueSheetName(u), o.name !== u && this._logService.error(`The worksheet name ${u} is duplicated, we change it to ${o.name}`);
5779
- const a = new wt(o, this._styles);
5780
- s.set(i, a), r.includes(i) || r.push(i);
5786
+ const l = new wt(o, this._styles);
5787
+ s.set(i, l), r.includes(i) || r.push(i);
5781
5788
  }
5782
5789
  }
5783
5790
  };
@@ -5840,7 +5847,7 @@ var jr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Kr = (t, e
5840
5847
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
5841
5848
  return n && r && jr(e, s, r), r;
5842
5849
  }, zr = (t, e) => (s, n) => e(s, n, t), Xr = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.DOC = 1] = "DOC", t[t.SHEET = 2] = "SHEET", t[t.SLIDE = 3] = "SLIDE", t))(Xr || {});
5843
- const lt = F("univer.current");
5850
+ const at = F("univer.current");
5844
5851
  let zt = class extends U {
5845
5852
  constructor(e, s) {
5846
5853
  super();
@@ -6001,7 +6008,7 @@ var qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, rs = (t, e
6001
6008
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6002
6009
  return n && r && qr(e, s, r), r;
6003
6010
  }, Xt = (t, e) => (s, n) => e(s, n, t);
6004
- let p = class extends U {
6011
+ let B = class extends U {
6005
6012
  constructor(e) {
6006
6013
  super();
6007
6014
  h(this, "_lifecycle$", new k(C.Starting));
@@ -6031,9 +6038,9 @@ let p = class extends U {
6031
6038
  this._logService.debug("[LifecycleService]", `lifecycle progressed to "${Qr[e]}".`);
6032
6039
  }
6033
6040
  };
6034
- p = rs([
6041
+ B = rs([
6035
6042
  Xt(0, y)
6036
- ], p);
6043
+ ], B);
6037
6044
  let X = class extends U {
6038
6045
  constructor(e, s) {
6039
6046
  super();
@@ -6055,7 +6062,7 @@ let X = class extends U {
6055
6062
  }
6056
6063
  };
6057
6064
  X = rs([
6058
- Xt(0, D(p)),
6065
+ Xt(0, D(B)),
6059
6066
  Xt(1, D(J))
6060
6067
  ], X);
6061
6068
  class Rt extends U {
@@ -6090,19 +6097,19 @@ class Rt extends U {
6090
6097
  h(this, "t", (s, ...n) => {
6091
6098
  if (!this._locales)
6092
6099
  throw new Error("Locale not initialized");
6093
- function r(u, a) {
6094
- const c = a.shift();
6100
+ function r(u, l) {
6101
+ const c = l.shift();
6095
6102
  if (c && u && c in u) {
6096
- const l = u[c];
6097
- return a.length > 0 && (typeof l == "object" || Array.isArray(l)) ? r(l, a) : l;
6103
+ const a = u[c];
6104
+ return l.length > 0 && (typeof a == "object" || Array.isArray(a)) ? r(a, l) : a;
6098
6105
  }
6099
6106
  return null;
6100
6107
  }
6101
6108
  const i = s.split("."), o = r(this._locales[this._currentLocale], i);
6102
6109
  if (typeof o == "string") {
6103
6110
  let u = o;
6104
- return n.forEach((a, c) => {
6105
- u = u.replace(`{${c}}`, a);
6111
+ return n.forEach((l, c) => {
6112
+ u = u.replace(`{${c}}`, l);
6106
6113
  }), u;
6107
6114
  } else
6108
6115
  return s;
@@ -6157,7 +6164,7 @@ let It = class extends U {
6157
6164
  const i = r.get(s);
6158
6165
  if (i) {
6159
6166
  const o = i.getValue();
6160
- o.value = n, o.status = pe.DONE, i.next(o);
6167
+ o.value = n, o.status = Be.DONE, i.next(o);
6161
6168
  }
6162
6169
  });
6163
6170
  h(this, "getPermissionPoint", (e, s) => {
@@ -6229,7 +6236,7 @@ let It = class extends U {
6229
6236
  It = ei([
6230
6237
  ss(C.Starting, It),
6231
6238
  Ne(0, D(is)),
6232
- Ne(1, D(lt))
6239
+ Ne(1, D(at))
6233
6240
  ], It);
6234
6241
  const si = "univer.editable";
6235
6242
  class xt extends Tn {
@@ -6270,7 +6277,7 @@ let Ct = class extends U {
6270
6277
  Ct = ii([
6271
6278
  ss(C.Starting, Ct),
6272
6279
  we(0, D(os)),
6273
- we(1, D(lt))
6280
+ we(1, D(at))
6274
6281
  ], Ct);
6275
6282
  class oi extends U {
6276
6283
  constructor() {
@@ -6329,12 +6336,12 @@ class Le extends U {
6329
6336
  this._currentTheme = s, this._currentTheme$.next(s);
6330
6337
  }
6331
6338
  }
6332
- const ui = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", ai = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", To = `\r
6339
+ const ui = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", li = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", To = `\r
6333
6340
  `;
6334
- var li = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, hi = (t, e, s, n) => {
6341
+ var ai = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, hi = (t, e, s, n) => {
6335
6342
  for (var r = n > 1 ? void 0 : n ? ci(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6336
6343
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6337
- return n && r && li(e, s, r), r;
6344
+ return n && r && ai(e, s, r), r;
6338
6345
  }, Ht = (t, e) => (s, n) => e(s, n, t);
6339
6346
  const ue = F("univer.undo-redo.service"), _i = 20;
6340
6347
  class us {
@@ -6435,14 +6442,14 @@ let Qt = class extends U {
6435
6442
  return this._getRedoStack(e, !0);
6436
6443
  }
6437
6444
  _getFocusedUniverInstanceId() {
6438
- var i, o, u, a;
6445
+ var i, o, u, l;
6439
6446
  let e = "";
6440
6447
  const s = this._contextService.getContextValue(Kt), n = this._contextService.getContextValue(Vr), r = this._contextService.getContextValue(kr);
6441
- return s ? n ? e = ai : r ? e = ui : e = (o = (i = this._univerInstanceService.getFocusedUniverInstance()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (u = this._univerInstanceService.getFocusedUniverInstance()) == null ? void 0 : u.getUnitId()) != null ? a : "", e;
6448
+ return s ? n ? e = li : r ? e = ui : e = (o = (i = this._univerInstanceService.getFocusedUniverInstance()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (l = (u = this._univerInstanceService.getFocusedUniverInstance()) == null ? void 0 : u.getUnitId()) != null ? l : "", e;
6442
6449
  }
6443
6450
  };
6444
6451
  Qt = hi([
6445
- Ht(0, lt),
6452
+ Ht(0, at),
6446
6453
  Ht(1, bt),
6447
6454
  Ht(2, ot)
6448
6455
  ], Qt);
@@ -6506,7 +6513,7 @@ let qt = class extends vt {
6506
6513
  };
6507
6514
  qt = Oi([
6508
6515
  Ft(0, D(J)),
6509
- Ft(1, D(p)),
6516
+ Ft(1, D(B)),
6510
6517
  Ft(2, D(X))
6511
6518
  ], qt);
6512
6519
  var Ai = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ci = (t, e, s, n) => {
@@ -6524,14 +6531,14 @@ let Jt = class extends vt {
6524
6531
  };
6525
6532
  Jt = Ci([
6526
6533
  Wt(0, D(J)),
6527
- Wt(1, D(p)),
6534
+ Wt(1, D(B)),
6528
6535
  Wt(2, D(X))
6529
6536
  ], Jt);
6530
6537
  var Ni = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, wi = (t, e, s, n) => {
6531
6538
  for (var r = n > 1 ? void 0 : n ? Si(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6532
6539
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6533
6540
  return n && r && Ni(e, s, r), r;
6534
- }, Bt = (t, e) => (s, n) => e(s, n, t);
6541
+ }, pt = (t, e) => (s, n) => e(s, n, t);
6535
6542
  let Zt = class extends vt {
6536
6543
  constructor(t, e, s) {
6537
6544
  super(), this._injector = t, this._lifecycleService = e, this._lifecycleInitializerService = s;
@@ -6541,9 +6548,9 @@ let Zt = class extends vt {
6541
6548
  }
6542
6549
  };
6543
6550
  Zt = wi([
6544
- Bt(0, D(J)),
6545
- Bt(1, D(p)),
6546
- Bt(2, D(X))
6551
+ pt(0, D(J)),
6552
+ pt(1, D(B)),
6553
+ pt(2, D(X))
6547
6554
  ], Zt);
6548
6555
  const Li = 200;
6549
6556
  class Po extends vt {
@@ -6561,10 +6568,10 @@ class Po extends vt {
6561
6568
  n && this._injector.get(Le).setTheme(n), i && this._injector.get(Rt).load(i), r && this._injector.get(Rt).setLocale(r), o && this._injector.get(y).setLogLevel(o);
6562
6569
  }
6563
6570
  get _univerInstanceService() {
6564
- return this._injector.get(lt);
6571
+ return this._injector.get(at);
6565
6572
  }
6566
6573
  get _lifecycleService() {
6567
- return this._injector.get(p);
6574
+ return this._injector.get(B);
6568
6575
  }
6569
6576
  get _lifecycleInitializerService() {
6570
6577
  return this._injector.get(X);
@@ -6626,7 +6633,7 @@ class Po extends vt {
6626
6633
  _initDependencies() {
6627
6634
  return new J([
6628
6635
  [
6629
- lt,
6636
+ at,
6630
6637
  {
6631
6638
  useFactory: (s) => new zt(
6632
6639
  {
@@ -6642,16 +6649,16 @@ class Po extends vt {
6642
6649
  [Ws],
6643
6650
  [Rt],
6644
6651
  [Le],
6645
- [p],
6652
+ [B],
6646
6653
  [X],
6647
6654
  [os, { useClass: It }],
6648
6655
  [Ct],
6649
6656
  [y, { useClass: vs, lazy: !0 }],
6650
- [bt, { useClass: pt, lazy: !0 }],
6657
+ [bt, { useClass: Bt, lazy: !0 }],
6651
6658
  [ue, { useClass: Qt, lazy: !0 }],
6652
6659
  [Hs, { useClass: Fs }],
6653
6660
  [ot, { useClass: Ls }],
6654
- [ps, { useClass: Bs, lazy: !0 }],
6661
+ [Bs, { useClass: ps, lazy: !0 }],
6655
6662
  [is, { useClass: oi, lazy: !0 }]
6656
6663
  ]);
6657
6664
  }
@@ -6662,7 +6669,7 @@ class Po extends vt {
6662
6669
  this._started || (this._injector.get(X).start(), this._started = !0);
6663
6670
  }
6664
6671
  _tryProgressToReady() {
6665
- this._injector.get(p).stage < C.Ready && (this._injector.get(p).stage = C.Ready, this._univerPluginStore.forEachPlugin((n) => n.onReady()));
6672
+ this._injector.get(B).stage < C.Ready && (this._injector.get(B).stage = C.Ready, this._univerPluginStore.forEachPlugin((n) => n.onReady()));
6666
6673
  }
6667
6674
  // #region register plugins
6668
6675
  /** Register a plugin into univer. */
@@ -6797,26 +6804,26 @@ class be {
6797
6804
  function ve(t) {
6798
6805
  return Object.keys(t).length === 1;
6799
6806
  }
6800
- class as {
6807
+ class ls {
6801
6808
  constructor() {
6802
6809
  h(this, "_actions", []);
6803
6810
  }
6804
6811
  static compose(e, s) {
6805
- const n = new be(e), r = new be(s), i = new as();
6812
+ const n = new be(e), r = new be(s), i = new ls();
6806
6813
  for (; n.hasNext() || r.hasNext(); )
6807
6814
  if (r.peekType() === m.INSERT)
6808
6815
  i.push(r.next());
6809
6816
  else if (n.peekType() === m.DELETE)
6810
6817
  i.push(n.next());
6811
6818
  else {
6812
- const o = Math.min(n.peekLength(), r.peekLength()), u = n.next(o), a = r.next(o);
6813
- u.t === m.INSERT && a.t === m.RETAIN ? a.body == null ? i.push(u) : i.push({
6819
+ const o = Math.min(n.peekLength(), r.peekLength()), u = n.next(o), l = r.next(o);
6820
+ u.t === m.INSERT && l.t === m.RETAIN ? l.body == null ? i.push(u) : i.push({
6814
6821
  ...u,
6815
- body: Ae(u.body, a.body, a.coverType)
6816
- }) : u.t === m.RETAIN && a.t === m.RETAIN ? u.body == null && a.body == null ? i.push(u.len !== Number.POSITIVE_INFINITY ? u : a) : u.body && a.body ? i.push({
6822
+ body: Ae(u.body, l.body, l.coverType)
6823
+ }) : u.t === m.RETAIN && l.t === m.RETAIN ? u.body == null && l.body == null ? i.push(u.len !== Number.POSITIVE_INFINITY ? u : l) : u.body && l.body ? i.push({
6817
6824
  ...u,
6818
- body: Ae(u.body, a.body, a.coverType)
6819
- }) : i.push(u.body ? u : a) : u.t === m.RETAIN && a.t === m.DELETE ? i.push(a) : u.t === m.INSERT && (a.t, m.DELETE);
6825
+ body: Ae(u.body, l.body, l.coverType)
6826
+ }) : i.push(u.body ? u : l) : u.t === m.RETAIN && l.t === m.DELETE ? i.push(l) : u.t === m.INSERT && (l.t, m.DELETE);
6820
6827
  }
6821
6828
  return i.trimEndUselessRetainAction(), i.serialize();
6822
6829
  }
@@ -6900,7 +6907,7 @@ class Fo extends te {
6900
6907
  makeObserverBottomPriority() {
6901
6908
  }
6902
6909
  }
6903
- const Wo = F("ILocalStorageService"), Bo = (t) => `sheet_interceptor_${t}`, bi = (t) => function(e, s) {
6910
+ const Wo = F("ILocalStorageService"), po = (t) => `sheet_interceptor_${t}`, bi = (t) => function(e, s) {
6904
6911
  let n = -1;
6905
6912
  function r(i, o) {
6906
6913
  if (i <= n)
@@ -6909,7 +6916,7 @@ const Wo = F("ILocalStorageService"), Bo = (t) => `sheet_interceptor_${t}`, bi =
6909
6916
  }
6910
6917
  return r(0, e);
6911
6918
  };
6912
- class po {
6919
+ class Bo {
6913
6920
  constructor(e) {
6914
6921
  h(this, "_interceptorsByName", /* @__PURE__ */ new Map());
6915
6922
  h(this, "_interceptorPoints");
@@ -6926,8 +6933,8 @@ class po {
6926
6933
  return r.push(s), this._interceptorsByName.set(
6927
6934
  n,
6928
6935
  r.sort((i, o) => {
6929
- var u, a;
6930
- return ((u = o.priority) != null ? u : 0) - ((a = i.priority) != null ? a : 0);
6936
+ var u, l;
6937
+ return ((u = o.priority) != null ? u : 0) - ((l = i.priority) != null ? l : 0);
6931
6938
  })
6932
6939
  // from large to small
6933
6940
  ), () => q(this._interceptorsByName.get(n), s);
@@ -6938,11 +6945,11 @@ class po {
6938
6945
  }
6939
6946
  gs();
6940
6947
  export {
6941
- ao as ABCToNumber,
6948
+ lo as ABCToNumber,
6942
6949
  Pn as AbsoluteRefType,
6943
6950
  be as ActionIterator,
6944
- ar as AlignTypeH,
6945
- lr as AlignTypeV,
6951
+ lr as AlignTypeH,
6952
+ ar as AlignTypeV,
6946
6953
  Vs as AutoFillSeries,
6947
6954
  kt as BaselineOffset,
6948
6955
  jn as BlockType,
@@ -6954,10 +6961,10 @@ export {
6954
6961
  mt as CellValueType,
6955
6962
  tt as Color,
6956
6963
  re as ColorBuilder,
6957
- B as ColorKit,
6964
+ p as ColorKit,
6958
6965
  H as ColorType,
6959
6966
  zn as ColumnSeparatorType,
6960
- pt as CommandService,
6967
+ Bt as CommandService,
6961
6968
  ee as CommandType,
6962
6969
  Ys as CommonHideTypes,
6963
6970
  Ks as ConditionType,
@@ -6967,7 +6974,7 @@ export {
6967
6974
  Vn as CustomRangeType,
6968
6975
  Ro as DEFAULT_CELL,
6969
6976
  ye as DEFAULT_DOC,
6970
- Bi as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
6977
+ pi as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
6971
6978
  To as DEFAULT_EMPTY_DOCUMENT_VALUE,
6972
6979
  go as DEFAULT_RANGE,
6973
6980
  gt as DEFAULT_RANGE_ARRAY,
@@ -6987,7 +6994,7 @@ export {
6987
6994
  So as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
6988
6995
  xr as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
6989
6996
  Lo as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
6990
- ai as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
6997
+ li as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
6991
6998
  ui as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
6992
6999
  tr as DashStyleType,
6993
7000
  Fn as DataStreamTreeNodeType,
@@ -7013,7 +7020,7 @@ export {
7013
7020
  Kt as FOCUSING_SHEET,
7014
7021
  Ce as FOCUSING_SLIDE,
7015
7022
  Uo as FOCUSING_UNIVER_EDITOR,
7016
- Bs as FloatingObjectManagerService,
7023
+ ps as FloatingObjectManagerService,
7017
7024
  kn as FollowNumberWithType,
7018
7025
  Gt as FontItalic,
7019
7026
  rr as FontStyleType,
@@ -7026,20 +7033,20 @@ export {
7026
7033
  bt as ICommandService,
7027
7034
  Hs as IConfigService,
7028
7035
  ot as IContextService,
7029
- ps as IFloatingObjectManagerService,
7036
+ Bs as IFloatingObjectManagerService,
7030
7037
  Wo as ILocalStorageService,
7031
7038
  y as ILogService,
7032
7039
  os as IPermissionService,
7033
7040
  is as IResourceManagerService,
7034
7041
  Zr as ISnapshotPersistenceService,
7035
7042
  ue as IUndoRedoService,
7036
- lt as IUniverInstanceService,
7037
- po as InterceptorManager,
7043
+ at as IUniverInstanceService,
7044
+ Bo as InterceptorManager,
7038
7045
  Zs as InterpolationPointType,
7039
7046
  Ln as KeyIterator,
7040
7047
  ft as LRUHelper,
7041
7048
  Dn as LRUMap,
7042
- p as LifecycleService,
7049
+ B as LifecycleService,
7043
7050
  C as LifecycleStages,
7044
7051
  Qt as LocalUndoRedoService,
7045
7052
  Rt as LocaleService,
@@ -7063,7 +7070,7 @@ export {
7063
7070
  Qn as ParagraphElementType,
7064
7071
  Tn as PermissionPoint,
7065
7072
  It as PermissionService,
7066
- pe as PermissionStatus,
7073
+ Be as PermissionStatus,
7067
7074
  Rs as Plugin,
7068
7075
  L as PluginType,
7069
7076
  Jn as PositionedObjectLayoutType,
@@ -7072,7 +7079,7 @@ export {
7072
7079
  P as RANGE_TYPE,
7073
7080
  Vi as RGBA_PAREN,
7074
7081
  ki as RGB_PAREN,
7075
- at as Range,
7082
+ lt as Range,
7076
7083
  it as Rectangle,
7077
7084
  Ei as RedoCommand,
7078
7085
  di as RedoCommandId,
@@ -7096,7 +7103,7 @@ export {
7096
7103
  nn as TextDecoration,
7097
7104
  Nt as TextDirection,
7098
7105
  Xn as TextDirectionType,
7099
- as as TextX,
7106
+ ls as TextX,
7100
7107
  m as TextXActionType,
7101
7108
  jt as ThemeColor,
7102
7109
  T as ThemeColorType,
@@ -7130,7 +7137,7 @@ export {
7130
7137
  Ae as composeBody,
7131
7138
  bi as composeInterceptors,
7132
7139
  no as concatMatrixArray,
7133
- Bo as createInterceptorKey,
7140
+ po as createInterceptorKey,
7134
7141
  Oe as createRowColIter,
7135
7142
  xi as dedupe,
7136
7143
  We as deepCompare,
@@ -7148,7 +7155,7 @@ export {
7148
7155
  Qi as handleJsonToDom,
7149
7156
  qi as handleStyleToString,
7150
7157
  so as hashAlgorithm,
7151
- Be as horizontalLineSegmentsSubtraction,
7158
+ pe as horizontalLineSegmentsSubtraction,
7152
7159
  Ee as insertMatrixArray,
7153
7160
  Sn as insertTextToContent,
7154
7161
  Io as isCellV,
@@ -7166,14 +7173,14 @@ export {
7166
7173
  Fr as mergeWorksheetSnapshotWithDefault,
7167
7174
  me as moveMatrixArray,
7168
7175
  ke as normalizeTextRuns,
7169
- lo as numberToABC,
7176
+ ao as numberToABC,
7170
7177
  co as numberToListABC,
7171
7178
  ks as orderSearchArray,
7172
7179
  q as remove,
7173
7180
  Hn as repeatStringNumTimes,
7174
7181
  Ho as requestImmediateMacroTask,
7175
7182
  ns as runOnLifecycle,
7176
- pi as searchArray,
7183
+ Bi as searchArray,
7177
7184
  oo as selectionToArray,
7178
7185
  Cs as sequence,
7179
7186
  Is as sequenceAsync,