@sheetxl/sdk 0.8.0-beta.17 → 0.8.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/browser/esm/{CAjITJT3eLst9Rhi.mjs → -P0fym6eh9hn9row.mjs} +2 -2
  2. package/browser/esm/{CFywn1iiD35nNNUP.mjs → -nOfWMHdlTb9ShjF.mjs} +9 -9
  3. package/browser/esm/{Byp_bvP9G-tN6hcz.mjs → 0Mw5Ew_7tAiWgc5J.mjs} +14 -14
  4. package/browser/esm/{CHByUyHFA3ESf7DX.mjs → 1ktaHvjuYL6stU4C.mjs} +1 -1
  5. package/browser/esm/{CVV4xqwD8gIjYj1E.mjs → B3ifnlsuky2L9HmB.mjs} +33 -33
  6. package/browser/esm/{WR3-xqcK1gF3ewAR.mjs → B67q5ZrwyKvm3d6W.mjs} +3 -3
  7. package/browser/esm/{DTXsi--x2wgqgwtf.mjs → BQSd_URWugiyNoNj.mjs} +2 -2
  8. package/browser/esm/{C0o6WpBojS7XhV5m.mjs → BWHHWC6H2JgG11Kq.mjs} +2 -2
  9. package/browser/esm/{BlkstmZEklk6Y1QD.mjs → BYbb2weYQCb_7KI3.mjs} +21 -21
  10. package/browser/esm/{DJTEQZiR9IFTuN_4.mjs → B_hrmyuWaH5VIFpV.mjs} +2 -2
  11. package/browser/esm/{O970I8lbI7okqG7N.mjs → Bql31KGUYo0SCMwZ.mjs} +392 -392
  12. package/browser/esm/{YwDdO4YwcIE4OB0D.mjs → BtVpErObXYKJCwHG.mjs} +1 -1
  13. package/browser/esm/{B-Q1-7RgSnA75J32.mjs → By7_c19Kv2YQaDVF.mjs} +475 -475
  14. package/browser/esm/{taTjDyUIIxq2eClH.mjs → C6M_XM08QtHuaInQ.mjs} +3 -3
  15. package/browser/esm/{DDNerAeet8uDYKhf.mjs → CBHwju4PYiv85_jD.mjs} +2 -2
  16. package/browser/esm/{Dx_dZ7jrw5Hxeoot.mjs → CJhYhZtsey3OnWKd.mjs} +1 -1
  17. package/browser/esm/{DnMFW_oKYQxRjP1l.mjs → CQlxAbhdxgfu0ERF.mjs} +1 -1
  18. package/browser/esm/{CLT3qGy_brDIwbYd.mjs → CVXOtvee4oFImGyR.mjs} +504 -504
  19. package/browser/esm/{Dlk1kRgkiBIpUxd9.mjs → CXQLYHAhE5MLKxZ4.mjs} +37 -37
  20. package/browser/esm/{jotvQFBWO2jXAhWx.mjs → CZiJYw94Yt7xslXS.mjs} +1 -1
  21. package/browser/esm/{aYpwVCDSwMUuz147.mjs → ChRUNekYurtOtrP1.mjs} +113 -113
  22. package/browser/esm/{JmmPE8Vsj85wdV8H.mjs → CnobgPLHEsTPTFY5.mjs} +1 -1
  23. package/browser/esm/{DGUOlgm1_WFmf_xO.mjs → CxNnMvwtOf76r7yY.mjs} +1 -1
  24. package/browser/esm/{DW3kFc5t4Wnh5E9S.mjs → CzmmdfrOYDUGx-Yh.mjs} +1 -1
  25. package/browser/esm/{XHhDDWrJiZJgWxPM.mjs → D2P43UD6TGSXErhr.mjs} +2 -2
  26. package/browser/esm/{DrmOaEx6CQ91zBsP.mjs → DH8NuKmZAC9EaqwP.mjs} +18 -18
  27. package/browser/esm/{DUB6Oj_aiV3f8s5_.mjs → DJuiV0Y8olnwuqB-.mjs} +21 -21
  28. package/browser/esm/{DkmqFp_-iUIy_l3D.mjs → DKFaQ2QOyUPCk0sD.mjs} +3 -3
  29. package/browser/esm/{BI6NwRrdLCbPdz6f.mjs → DLR8g1DkooIBl8S1.mjs} +2 -2
  30. package/browser/esm/{DsWDvmky7CgzX_7W.mjs → DNAXbbB8DGE2xeHy.mjs} +2 -2
  31. package/browser/esm/{BY_-BTa5h6HnnZ1W.mjs → DQTUUXcERWI4l0to.mjs} +2 -2
  32. package/browser/esm/{DJrnSjYjFxJvpQiH.mjs → DpFowFtk9AeU-89B.mjs} +1 -1
  33. package/browser/esm/{Dy0TAi9WafVT8eke.mjs → DyRVg5YJn7voOO6z.mjs} +2 -2
  34. package/browser/esm/{qNv1x-Ny9TPbvZzj.mjs → Pn5Jc-47dk16sYQ4.mjs} +1 -1
  35. package/browser/esm/{CWkaF7gYWCkW7vDA.mjs → _WWjW2f-YW-AVqAL.mjs} +1 -1
  36. package/browser/esm/{gQzj95vSMXdKhpWf.mjs → _lh_Rr5SwLthmbmu.mjs} +7797 -5857
  37. package/browser/esm/index.mjs +367 -366
  38. package/browser/esm/{yudASWe8CWXYcGt3.mjs → mecFApGwMvcIzlpd.mjs} +36 -36
  39. package/browser/esm/{mufbL88lyIKJEWyP.mjs → n4LOSiYtWTzqQa4w.mjs} +661 -661
  40. package/{node/esm/Cle-_21jebWv_-D4.mjs → browser/esm/tJB0V8fKbukOYt9U.mjs} +2 -2
  41. package/browser/esm/{BWNQcQyx8wt6huOq.mjs → yRhetuEQfV7moa4B.mjs} +1 -1
  42. package/browser/esm/{BuKA3E-Ev8Dp5W2I.mjs → ybFoQ6IijUJnBeCF.mjs} +1 -1
  43. package/node/esm/{Yo7_havHbr9VL8R4.mjs → 0313aQKBU4DE3v2j.mjs} +1 -1
  44. package/node/esm/{DfrxGbxxowFmm3SF.mjs → 3gjEEXV2aSt7cKeD.mjs} +1 -1
  45. package/node/esm/{NnrDjio_xwTBs05n.mjs → 3smtwEJ0ASF0tKBY.mjs} +2 -2
  46. package/node/esm/{cRz94rkuvDrA8mr9.mjs → 4k3KKByrUw2Wr2TX.mjs} +1 -1
  47. package/node/esm/{jqBKdf9DG54xqpaw.mjs → 90jp-mCVEr43zZTj.mjs} +2 -2
  48. package/node/esm/{OCrS6pBT6lGRu82d.mjs → BAEmzj0gb8Cbgz7p.mjs} +3293 -3293
  49. package/node/esm/{CIxb44vA81H9lRip.mjs → BBC5dL9bXzOrQDGY.mjs} +1 -1
  50. package/node/esm/{7ZwdVIsOdcziHpMD.mjs → BV0cJ_YP_0qzJuPt.mjs} +180 -180
  51. package/node/esm/{DxnBYzOueAKEqaQT.mjs → BcxcYoF_4GFL7Zkl.mjs} +15 -15
  52. package/node/esm/{BwyoLlHutolJw7OW.mjs → BesaVk0x7UyfLDk2.mjs} +1 -1
  53. package/node/esm/{ClJJC8tBpgsqHwdn.mjs → C-LmDC9oNcbENOK1.mjs} +1 -1
  54. package/node/esm/{BSlFO0_8UZ38gfeE.mjs → CDkUQn5AwYGomlsT.mjs} +36 -36
  55. package/node/esm/{CjCqcGyCYGkaMQI9.mjs → CE4I5qfVmUBf7mED.mjs} +1 -1
  56. package/node/esm/{DgsBYF3xbjgx9Mzp.mjs → CO0UDgbkHGwyTfev.mjs} +1 -1
  57. package/node/esm/{DfbVTAhNutxM74E8.mjs → CTWihjVB5uFX7U4j.mjs} +2 -2
  58. package/node/esm/{-q1xF3_2jmk3QHIY.mjs → CUNaLYCntlclipWu.mjs} +497 -497
  59. package/node/esm/{BhosJbKOPgbJSZMY.mjs → CY9JqXFJTt5pGhC3.mjs} +1 -1
  60. package/node/esm/{B6BQYUDRxbRnzca4.mjs → C_Sqy290v4uzyi1E.mjs} +3 -3
  61. package/node/esm/{BoLecFnIxhYKGor-.mjs → Cf-cK3yPe9bjK6o2.mjs} +561 -561
  62. package/node/esm/{Cb1-r2RCxcJZB6fM.mjs → CpvUwhAeDmdEpdR-.mjs} +10018 -8039
  63. package/{browser/esm/DCs7bk-yx0UhCvQ4.mjs → node/esm/Crhg3srH-O5sJERh.mjs} +2 -2
  64. package/node/esm/{M3jahkTgfUxGyeZv.mjs → Cx2U91jhiTDz600y.mjs} +116 -116
  65. package/node/esm/{BQko-9y6mf2oQK7u.mjs → CyWWKan_uk4dHZ6P.mjs} +1 -1
  66. package/node/esm/{Bgy7uWJVGwkN7AlD.mjs → D48MjKzkj37XsVm1.mjs} +2 -2
  67. package/node/esm/{XhDjStxKy-dd3WKa.mjs → D7c0zfLVoG7EEln5.mjs} +43 -43
  68. package/node/esm/{CIlH2fSEpdYBZwUA.mjs → D8J4JmOPwG_Yr2GD.mjs} +1 -1
  69. package/node/esm/{oGGVbqahqfK45-Uz.mjs → D91qb21TrJX98Rw8.mjs} +3 -3
  70. package/node/esm/{btVWSwUwMjM0J5fS.mjs → D9D2NyyKbWXpTj5I.mjs} +2 -2
  71. package/node/esm/{DCSJKgcCQzOV-dMJ.mjs → DBF7pIpitcmhi65H.mjs} +2 -2
  72. package/node/esm/{CDgUHRW6vSASfqNr.mjs → DLPVrV723TSxkXqL.mjs} +1 -1
  73. package/node/esm/{DTkV7IK2_ODMJAP5.mjs → DWsnb-a-9dfRn5jJ.mjs} +24 -24
  74. package/node/esm/{DCaLNIs-_4Y6hJ8S.mjs → Dj1pybJRqeZiP1Z6.mjs} +1 -1
  75. package/node/esm/{BBUVvO9Ma1RzbKux.mjs → DtNJOImWtsXVrQps.mjs} +2 -2
  76. package/node/esm/{zh6vcRzFqdV1aYh5.mjs → DxROQlX1KHLb9tHS.mjs} +1 -1
  77. package/node/esm/{B8MYgBe4XICBSROW.mjs → dp4LxzOEkfTbVX_1.mjs} +21 -21
  78. package/node/esm/{CHS84ZGEoH6aeHsZ.mjs → ee_DgHTffiVTOiU2.mjs} +21 -21
  79. package/node/esm/{fwfAgq8qIADcHmY4.mjs → fMFapG4AGMQKX8c5.mjs} +33 -33
  80. package/node/esm/index.mjs +545 -544
  81. package/node/esm/{nxxwAZZF8NsdErJW.mjs → jmElgIMAkpc2Ab1m.mjs} +1 -1
  82. package/node/esm/{D51xu0rubo34Ppeg.mjs → yVJ2lEYZob1gwiRZ.mjs} +14 -14
  83. package/package.json +6 -6
  84. package/resources/locales/de/model.msg.json +15 -0
  85. package/resources/locales/en/model.msg.json +15 -0
  86. package/types/scripting-api.json +11445 -11299
  87. package/types/scripting-enums.json +22 -1
  88. package/types/scripting.d.ts +623 -0
  89. package/types/src/address/index.d.ts +2 -0
  90. package/types/src/anomalies/_Anomalies.d.ts +34 -0
  91. package/types/src/anomalies/_CompletenessChecks.d.ts +32 -0
  92. package/types/src/cell/ICell.d.ts +36 -1
  93. package/types/src/cellRange/ICellRange.d.ts +106 -0
  94. package/types/src/index.d.ts +1 -0
  95. package/types/src/license/runtime.browser.d.ts +3 -1
  96. package/types/src/sheet/IWorksheet.d.ts +17 -0
  97. package/types/src/sheet/SheetCell.d.ts +3 -0
  98. package/types/src/sheet/SheetRange.d.ts +6 -0
  99. package/types/src/sheet/Worksheet.d.ts +103 -1
  100. package/types/src/sheet/_ListenerAnchor.d.ts +14 -0
  101. package/types/src/sheet/_SheetStateTypes.d.ts +13 -0
  102. package/types/src/sparkline/ISparklineGroup.d.ts +338 -0
  103. package/types/src/sparkline/ISparklineGroupCollection.d.ts +68 -0
  104. package/types/src/sparkline/SparklineGroup.d.ts +271 -0
  105. package/types/src/sparkline/SparklineGroupCollection.d.ts +25 -0
  106. package/types/src/sparkline/SparklineRanges.d.ts +195 -0
  107. package/types/src/sparkline/index.d.ts +4 -0
  108. package/types/src/sparkline/layout/SparklineLayout.d.ts +71 -0
  109. package/types/src/sparkline/layout/_layoutSparkline.d.ts +42 -0
  110. package/types/src/sparkline/layout/index.d.ts +2 -0
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.17
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.18
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { a as e, l as t, o as s, t as r, u as i } from "./CjCqcGyCYGkaMQI9.mjs";
8
- import { $i as o, $n as n, $t as a, A as l, Aa as h, Ai as c, At as u, Bi as d, Bt as g, C as m, Ca as f, Ci as _, D as p, Da as w, Di as y, Dt as S, E as b, Ei as k, Er as C, Et as v, F as I, Fi as R, Ft as N, Gn as O, Gt as x, Hn as E, Ht as V, I as L, Ii as A, It as T, Jt as P, L as F, Li as B, Lt as W, M, Ma as D, Mi as j, Na as H, Ni as z, O as $, Oa as U, Oi as J, Ot as q, Pi as K, Pt as G, Qt as Z, R as X, Ri as Y, S as Q, Sa as ee, Si as te, T as se, Ta as re, Ti as ie, Tr as oe, Tt as ne, Ut as ae, Vi as le, Vn as he, Vt as ce, Wn as ue, Wt as de, Xn as ge, Xt as me, Ya as fe, Yi as _e, Yn as pe, Yt as we, Zi as ye, Zn as Se, Zt as be, _a as ke, _r as Ce, a as ve, aa as Ie, ao as Re, b as Ne, ba as Oe, co as xe, da as Ee, do as Ve, ea as Le, en as Ae, eo as Te, er as Pe, fa as Fe, fo as Be, ga as We, gi as Me, ha as De, hi as je, ho as He, i as ze, ia as $e, io as Ue, j as Je, ja as qe, ji as Ke, k as Ge, ka as Ze, ki as Xe, kt as Ye, lo as Qe, ma as et, mi as tt, mo as st, mr as rt, no as it, nr as ot, on as nt, oo as at, pa as lt, po as ht, pr as ct, qi as ut, qt as dt, r as gt, ra as mt, ro as ft, sn as _t, so as pt, tn as wt, tr as yt, ua as St, uo as bt, v as kt, va as Ct, w as vt, wi as It, wt as Rt, x as Nt, xa as Ot, xi as xt, xr as Et, y as Vt, ya as Lt, zi as At, zt as Tt } from "./Cb1-r2RCxcJZB6fM.mjs";
9
- import { $t as Pt, A as Ft, B as Bt, Dt as Wt, Et as Mt, H as Dt, K as jt, O as Ht, Qt as zt, R as $t, U as Ut, V as Jt, W as qt, Xt as Kt, Zt as Gt, an as Zt, at as Xt, ct as Yt, dt as Qt, ft as es, k as ts, lt as ss, mt as rs, on as is, pt as os, sn as ns, st as as, ut as ls, z as hs } from "./D51xu0rubo34Ppeg.mjs";
10
- import { n as cs, t as us } from "./B6BQYUDRxbRnzca4.mjs";
11
- import { FormulaError as ds, ScalarType as gs } from "@sheetxl/primitives";
12
- import { BufferUtils as ms, CommonUtils as fs, CoordUtils as _s, DefaultLanguagePackService as ps, ExpectedError as ws, ImageUtils as ys, InvalidPasswordError as Ss, MimeType as bs, Notifier as ks, NullNotAllowedError as Cs, OutOfBoundsError as vs, PasswordRequiredError as Is, ProtectedError as Rs, UndoManager as Ns, messageKey as Os, t as xs } from "@sheetxl/utils";
7
+ import { a as e, l as t, o as s, t as r, u as i } from "./CE4I5qfVmUBf7mED.mjs";
8
+ import { $t as o, A as n, Aa as a, Ai as l, At as h, Bi as c, Bt as u, C as d, Ca as g, Ci as m, D as f, Di as _, Dr as p, Dt as w, E as y, Ea as S, Ei as b, Er as k, Et as C, F as v, Fi as I, Ft as R, Gn as N, Gt as O, Hi as x, Hn as E, Ht as L, I as V, Ii as A, It as T, Ji as P, Jt as F, Kn as B, Kt as W, L as M, Li as D, Lt as j, M as H, Ma as z, Mi as U, Na as $, Ni as J, O as q, Oa as K, Oi as G, Ot as X, Pa as Z, Pi as Q, Pt as Y, Qi as ee, Qn as te, Qt as se, R as re, Ri as ie, S as oe, Sa as ne, Si as ae, Sr as le, T as he, Ti as ce, Tt as ue, Un as de, Ut as ge, Vi as me, Vt as fe, Wt as _e, Xa as pe, Xi as we, Xn as ye, Xt as Se, Yt as be, Zn as ke, Zt as Ce, _a as ve, _i as Ie, a as Re, aa as Ne, ao as Oe, b as xe, ba as Ee, cn as Le, co as Ve, da as Ae, do as Te, ea as Pe, en as Fe, er as Be, fa as We, fo as Me, ga as De, gi as je, go as He, ha as ze, hi as Ue, ho as $e, hr as Je, i as qe, ia as Ke, io as Ge, j as Xe, ja as Ze, ji as Qe, k as Ye, ka as et, ki as tt, kt as st, lo as rt, ma as it, mo as ot, mr as nt, nn as at, nr as lt, oa as ht, oo as ct, pa as ut, po as dt, r as gt, ro as mt, rr as ft, sn as _t, so as pt, ta as wt, tn as yt, to as St, tr as bt, uo as kt, v as Ct, va as vt, vr as It, w as Rt, wa as Nt, wi as Ot, wt as xt, x as Et, xa as Lt, y as Vt, ya as At, zi as Tt, zt as Pt } from "./CpvUwhAeDmdEpdR-.mjs";
9
+ import { $t as Ft, A as Bt, B as Wt, Dt as Mt, Et as Dt, H as jt, K as Ht, O as zt, Qt as Ut, R as $t, U as Jt, V as qt, W as Kt, Xt as Gt, Zt as Xt, an as Zt, at as Qt, ct as Yt, dt as es, ft as ts, k as ss, lt as rs, mt as is, on as os, pt as ns, sn as as, st as ls, ut as hs, z as cs } from "./yVJ2lEYZob1gwiRZ.mjs";
10
+ import { n as us, t as ds } from "./C_Sqy290v4uzyi1E.mjs";
11
+ import { FormulaError as gs, ScalarType as ms } from "@sheetxl/primitives";
12
+ import { BufferUtils as fs, CommonUtils as _s, CoordUtils as ps, DefaultLanguagePackService as ws, ExpectedError as ys, ImageUtils as Ss, InvalidPasswordError as bs, MimeType as ks, Notifier as Cs, NullNotAllowedError as vs, OutOfBoundsError as Is, PasswordRequiredError as Rs, ProtectedError as Ns, UndoManager as Os, messageKey as xs, t as Es } from "@sheetxl/utils";
13
13
  export * from "@sheetxl/primitives";
14
14
  export * from "@sheetxl/utils";
15
- var Es, Vs = class extends Ns {
15
+ var Ls, Vs = class extends Os {
16
16
  constructor(e, t = 50) {
17
17
  super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
18
18
  }
@@ -99,14 +99,14 @@ var Es, Vs = class extends Ns {
99
99
  return 0 === e.length && null !== this._repeatOperation && e.push(this._repeatOperation.description), Object.freeze(e);
100
100
  }
101
101
  getUndoEntries() {
102
- return this._undoCommits().map(As);
102
+ return this._undoCommits().map(Ts);
103
103
  }
104
104
  getRedoEntries() {
105
- const e = this._redoCommits().map(As);
105
+ const e = this._redoCommits().map(Ts);
106
106
  return 0 === e.length && null !== this._repeatOperation && e.push({
107
107
  description: this._repeatOperation.description,
108
108
  author: null,
109
- meta: Ls
109
+ meta: As
110
110
  }), Object.freeze(e);
111
111
  }
112
112
  addUndoOperation() {
@@ -118,11 +118,11 @@ var Es, Vs = class extends Ns {
118
118
  close() {
119
119
  this._removeListener?.();
120
120
  }
121
- }, Ls = Object.freeze({}), As = (e) => ({
121
+ }, As = Object.freeze({}), Ts = (e) => ({
122
122
  description: e.getDescription(),
123
123
  author: e.getAuthor(),
124
- meta: e.getMeta() ?? Ls
125
- }), Ts = class {
124
+ meta: e.getMeta() ?? As
125
+ }), Ps = class {
126
126
  constructor(t, s) {
127
127
  this._dirty = !1, this._store = t, this._savedCommitId = t.getCurrentCommit()?.getId() ?? null, this._emitter = new e(this);
128
128
  const r = this;
@@ -160,8 +160,8 @@ var Es, Vs = class extends Ns {
160
160
  this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
161
161
  }
162
162
  };
163
- Es || (Es = {});
164
- var Ps, Fs = class t {
163
+ Ls || (Ls = {});
164
+ var Fs, Bs = class t {
165
165
  constructor(s, r = {}) {
166
166
  this._password = null, this._emitter = new e(this), this._path = s ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? t._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
167
167
  }
@@ -174,7 +174,7 @@ var Ps, Fs = class t {
174
174
  getName() {
175
175
  if (null !== this._name && void 0 !== this._name) return this._name;
176
176
  const e = this._cleanPath();
177
- return e && Ve(e) || null;
177
+ return e && Me(e) || null;
178
178
  }
179
179
  getPath() {
180
180
  return this._path;
@@ -185,7 +185,7 @@ var Ps, Fs = class t {
185
185
  getExtension() {
186
186
  const e = this._cleanPath();
187
187
  if (!e) return null;
188
- const t = Be(e);
188
+ const t = dt(e);
189
189
  return t ? t.toLowerCase() : null;
190
190
  }
191
191
  getEncryption() {
@@ -235,26 +235,26 @@ var Ps, Fs = class t {
235
235
  ];
236
236
  return `${t} ${(s / Math.pow(1024, r)).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
237
237
  }
238
- }, Bs = /* @__PURE__ */ new WeakMap(), Ws = /* @__PURE__ */ new Set(), Ms = (e) => Bs.get(e) ?? null, Ds = class t {
238
+ }, Ws = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new Set(), Ds = (e) => Ws.get(e) ?? null, js = class t {
239
239
  constructor(s) {
240
- this._released = !1, t._assertFree(s), this._emitter = new e(this), this._origin = s, Bs.set(s, this), Ws.add(this);
240
+ this._released = !1, t._assertFree(s), this._emitter = new e(this), this._origin = s, Ws.set(s, this), Ms.add(this);
241
241
  }
242
242
  getOrigin() {
243
243
  return this._origin;
244
244
  }
245
245
  setOrigin(e) {
246
- e !== this._origin && (t._assertFree(e), this._released || (Bs.delete(this._origin), Bs.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
246
+ e !== this._origin && (t._assertFree(e), this._released || (Ws.delete(this._origin), Ws.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
247
247
  }
248
248
  release() {
249
- this._released || (this._released = !0, Bs.get(this._origin) === this && Bs.delete(this._origin), Ws.delete(this));
249
+ this._released || (this._released = !0, Ws.get(this._origin) === this && Ws.delete(this._origin), Ms.delete(this));
250
250
  }
251
251
  addListeners(e, t) {
252
252
  return this._emitter.addListeners(e, t);
253
253
  }
254
254
  static _assertFree(e) {
255
- if (Bs.has(e)) throw new Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
255
+ if (Ws.has(e)) throw new Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
256
256
  }
257
- }, js = class {
257
+ }, Hs = class {
258
258
  constructor() {
259
259
  this._defaultStringSourceType = "filepath";
260
260
  }
@@ -274,10 +274,10 @@ var Ps, Fs = class t {
274
274
  }
275
275
  switch (n) {
276
276
  case "file": {
277
- const e = s, r = e?.name, n = r ? `${Ve(r)}` : "";
277
+ const e = s, r = e?.name, n = r ? `${Me(r)}` : "";
278
278
  a = await e.arrayBuffer(), l = {
279
279
  format: o,
280
- ext: Be(r),
280
+ ext: dt(r),
281
281
  name: n,
282
282
  absolutePath: r,
283
283
  size: e.size,
@@ -301,7 +301,7 @@ var Ps, Fs = class t {
301
301
  const [, t] = s.split(",");
302
302
  e = t;
303
303
  } else e = s;
304
- a = ms.base64ToArrayBuffer(e), l = {
304
+ a = fs.base64ToArrayBuffer(e), l = {
305
305
  format: o,
306
306
  size: e.length
307
307
  };
@@ -317,7 +317,7 @@ var Ps, Fs = class t {
317
317
  e = i.input, t = i.init, r = i.timeout;
318
318
  }
319
319
  }
320
- const i = r || 3e4, n = new AbortController(), h = setTimeout(() => n.abort(), i), c = "string" == typeof e ? e : e.toString(), u = Be(c);
320
+ const i = r || 3e4, n = new AbortController(), h = setTimeout(() => n.abort(), i), c = "string" == typeof e ? e : e.toString(), u = dt(c);
321
321
  try {
322
322
  const s = await fetch(e, {
323
323
  ...t,
@@ -329,7 +329,7 @@ var Ps, Fs = class t {
329
329
  a = r, l = {
330
330
  format: o,
331
331
  ext: u,
332
- name: Ve(c, !0),
332
+ name: Me(c, !0),
333
333
  absolutePath: c
334
334
  };
335
335
  } catch (e) {
@@ -372,7 +372,7 @@ var Ps, Fs = class t {
372
372
  return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
373
373
  }
374
374
  findOpenPath(e, t) {
375
- return Array.from(Ws, (e) => e.getOrigin()).find((s) => {
375
+ return Array.from(Ms, (e) => e.getOrigin()).find((s) => {
376
376
  if (s === t || !s.canWrite()) return !1;
377
377
  const r = s.getPath();
378
378
  return !!r && this.isSamePath(r, e);
@@ -403,10 +403,10 @@ var Ps, Fs = class t {
403
403
  }
404
404
  if ("undefined" != typeof File && e instanceof File) return "file";
405
405
  if ("undefined" != typeof Blob && e instanceof Blob) return "blob";
406
- const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r = ms.isNodeBuffer(e);
406
+ const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r = fs.isNodeBuffer(e);
407
407
  return t || s || r ? "buffer" : "undefined" != typeof ReadableStream && e instanceof ReadableStream || "[object ReadableStream]" === Object.prototype.toString.call(e) || e && "function" == typeof e.getReader && void 0 !== e.locked ? "stream" : null;
408
408
  }
409
- }, Hs = class extends js {
409
+ }, zs = class extends Hs {
410
410
  constructor(e, t) {
411
411
  super();
412
412
  }
@@ -446,8 +446,8 @@ var Ps, Fs = class t {
446
446
  ), r = e.origin.getPath(), i = !(!r || !e.origin.canWrite()), o = i ? r : e.origin.getName() ? e.suggestedName : null;
447
447
  if (!o) throw new Error("No file name provided to write to.");
448
448
  const n = s.resolve(o.replace(/\\/g, "/")), a = this.findOpenPath(n, e.workbook?.getOrigin?.());
449
- if (a) throw new ws(xs("error.io.openElsewhere", { name: a.getName() ?? n }));
450
- const l = i ? e.origin : new Fs(n, {
449
+ if (a) throw new ys(Es("error.io.openElsewhere", { name: a.getName() ?? n }));
450
+ const l = i ? e.origin : new Bs(n, {
451
451
  format: e.format.key,
452
452
  canWrite: !0
453
453
  }), h = await e.encode(e.format.key, l);
@@ -463,7 +463,7 @@ var Ps, Fs = class t {
463
463
  } catch (e) {
464
464
  throw new Error(`Failed to write file '${n}': ${e.message}`);
465
465
  }
466
- if (l instanceof Fs) {
466
+ if (l instanceof Bs) {
467
467
  const e = await t.stat(n).catch(() => null);
468
468
  l.update({
469
469
  size: c.byteLength,
@@ -473,13 +473,13 @@ var Ps, Fs = class t {
473
473
  return l;
474
474
  }
475
475
  };
476
- (Ps || (Ps = {})).SortOn = {
476
+ (Fs || (Fs = {})).SortOn = {
477
477
  Value: "value",
478
478
  FillColor: "fillColor",
479
479
  FontColor: "fontColor",
480
480
  Icon: "icon"
481
481
  };
482
- var zs = {
482
+ var Us = {
483
483
  TopLeft: "tl",
484
484
  Top: "t",
485
485
  TopRight: "tr",
@@ -489,53 +489,53 @@ var zs = {
489
489
  BottomLeft: "bl",
490
490
  Bottom: "b",
491
491
  BottomRight: "br"
492
- }, $s = as.BuiltInName, Us = {
493
- [$s.Normal]: Os("style.builtin.normal"),
494
- [$s.Comma]: Os("style.builtin.comma"),
495
- [$s.Currency]: Os("style.builtin.currency"),
496
- [$s.Percent]: Os("style.builtin.percent"),
497
- [$s.Comma0]: Os("style.builtin.comma0"),
498
- [$s.Currency0]: Os("style.builtin.currency0"),
499
- [$s.Hyperlink]: Os("style.builtin.hyperlink"),
500
- [$s.FollowedHyperlink]: Os("style.builtin.followedHyperlink"),
501
- [$s.Note]: Os("style.builtin.note"),
502
- [$s.WarningText]: Os("style.builtin.warningText"),
503
- [$s.Title]: Os("style.builtin.title"),
504
- [$s.Input]: Os("style.builtin.input"),
505
- [$s.Output]: Os("style.builtin.output"),
506
- [$s.Calculation]: Os("style.builtin.calculation"),
507
- [$s.CheckCell]: Os("style.builtin.checkCell"),
508
- [$s.LinkedCell]: Os("style.builtin.linkedCell"),
509
- [$s.Total]: Os("style.builtin.total"),
510
- [$s.Good]: Os("style.builtin.good"),
511
- [$s.Bad]: Os("style.builtin.bad"),
512
- [$s.Neutral]: Os("style.builtin.neutral"),
513
- [$s.ExplanatoryText]: Os("style.builtin.explanatoryText")
514
- }, Js = Os("style.builtin.heading"), qs = Os("style.builtin.accent"), Ks = Os("style.builtin.accentTint"), Gs = /^Heading ([1-4])$/, Zs = /^Accent([1-6])$/, Xs = /^(20|40|60)% - Accent([1-6])$/;
492
+ }, $s = ls.BuiltInName, Js = {
493
+ [$s.Normal]: xs("style.builtin.normal"),
494
+ [$s.Comma]: xs("style.builtin.comma"),
495
+ [$s.Currency]: xs("style.builtin.currency"),
496
+ [$s.Percent]: xs("style.builtin.percent"),
497
+ [$s.Comma0]: xs("style.builtin.comma0"),
498
+ [$s.Currency0]: xs("style.builtin.currency0"),
499
+ [$s.Hyperlink]: xs("style.builtin.hyperlink"),
500
+ [$s.FollowedHyperlink]: xs("style.builtin.followedHyperlink"),
501
+ [$s.Note]: xs("style.builtin.note"),
502
+ [$s.WarningText]: xs("style.builtin.warningText"),
503
+ [$s.Title]: xs("style.builtin.title"),
504
+ [$s.Input]: xs("style.builtin.input"),
505
+ [$s.Output]: xs("style.builtin.output"),
506
+ [$s.Calculation]: xs("style.builtin.calculation"),
507
+ [$s.CheckCell]: xs("style.builtin.checkCell"),
508
+ [$s.LinkedCell]: xs("style.builtin.linkedCell"),
509
+ [$s.Total]: xs("style.builtin.total"),
510
+ [$s.Good]: xs("style.builtin.good"),
511
+ [$s.Bad]: xs("style.builtin.bad"),
512
+ [$s.Neutral]: xs("style.builtin.neutral"),
513
+ [$s.ExplanatoryText]: xs("style.builtin.explanatoryText")
514
+ }, qs = xs("style.builtin.heading"), Ks = xs("style.builtin.accent"), Gs = xs("style.builtin.accentTint"), Xs = /^Heading ([1-4])$/, Zs = /^Accent([1-6])$/, Qs = /^(20|40|60)% - Accent([1-6])$/;
515
515
  function Ys(e) {
516
- const t = Us[e];
516
+ const t = Js[e];
517
517
  if (t) return { key: t };
518
- let s = Gs.exec(e);
518
+ let s = Xs.exec(e);
519
519
  return s ? {
520
- key: Js,
521
- params: { n: +s[1] }
522
- } : (s = Zs.exec(e), s ? {
523
520
  key: qs,
524
521
  params: { n: +s[1] }
525
- } : (s = Xs.exec(e), s ? {
522
+ } : (s = Zs.exec(e), s ? {
526
523
  key: Ks,
524
+ params: { n: +s[1] }
525
+ } : (s = Qs.exec(e), s ? {
526
+ key: Gs,
527
527
  params: {
528
528
  pct: +s[1],
529
529
  n: +s[2]
530
530
  }
531
531
  } : null));
532
532
  }
533
- var Qs, er, tr, sr, rr = (e, t, s, r, i) => {
533
+ var er, tr, sr, rr, ir = (e, t, s, r, i) => {
534
534
  const o = JSON.parse(JSON.stringify(e.definition));
535
535
  o.adjs || (o.adjs = []);
536
536
  let n = "", a = 0, l = 0;
537
- t > 0 ? (l = t, a = 100 - t, n = xs("op.lighterPercent", { percent: t })) : t < 0 && (a = 100 + t, n = xs("op.darkerPercent", { percent: -t })), a && o.adjs.push({ [os.AdjustmentType.LumMod]: a }), l && o.adjs.push({ [os.AdjustmentType.LumOff]: l });
538
- const h = new Qt({
537
+ t > 0 ? (l = t, a = 100 - t, n = Es("op.lighterPercent", { percent: t })) : t < 0 && (a = 100 + t, n = Es("op.darkerPercent", { percent: -t })), a && o.adjs.push({ [ns.AdjustmentType.LumMod]: a }), l && o.adjs.push({ [ns.AdjustmentType.LumOff]: l });
538
+ const h = new es({
539
539
  val: o.val,
540
540
  adjs: o.adjs
541
541
  }, s), c = h.toString();
@@ -546,15 +546,15 @@ var Qs, er, tr, sr, rr = (e, t, s, r, i) => {
546
546
  definition: o
547
547
  };
548
548
  };
549
- function ir(e, t, s, r) {
549
+ function or(e, t, s, r) {
550
550
  let i = [];
551
551
  for (let o = 0; o < e.length; o++) {
552
552
  let n = [];
553
553
  i.push(n);
554
554
  const a = (i) => {
555
- for (let a = 0; a < i.length; a++) n.push(rr(e[o], i[a], t, s, r));
555
+ for (let a = 0; a < i.length; a++) n.push(ir(e[o], i[a], t, s, r));
556
556
  };
557
- let l = new Qt({
557
+ let l = new es({
558
558
  val: e[o].definition.val,
559
559
  adjs: e[o].definition.adjs
560
560
  }, t).toHSLA().lum;
@@ -592,45 +592,45 @@ function ir(e, t, s, r) {
592
592
  }
593
593
  return i;
594
594
  }
595
- (Qs || (Qs = {})).buildPalette = ir, er || (er = {}), tr || (tr = {}), sr || (sr = {});
596
- var or, nr = null;
597
- function ar() {
598
- if (!nr) {
599
- const e = import("./DxnBYzOueAKEqaQT.mjs").then(({ initializeFunctions: e }) => {
595
+ (er || (er = {})).buildPalette = or, tr || (tr = {}), sr || (sr = {}), rr || (rr = {});
596
+ var nr, ar = null;
597
+ function lr() {
598
+ if (!ar) {
599
+ const e = import("./BcxcYoF_4GFL7Zkl.mjs").then(({ initializeFunctions: e }) => {
600
600
  const t = e(() => null);
601
601
  return Object.freeze(Array.from(t.keys()));
602
602
  });
603
603
  e.catch(() => {
604
- nr = null;
605
- }), nr = e;
604
+ ar = null;
605
+ }), ar = e;
606
606
  }
607
- return nr;
607
+ return ar;
608
608
  }
609
- function lr(e) {
610
- return C.peek()?.readFormulaLiteral(e);
609
+ function hr(e) {
610
+ return p.peek()?.readFormulaLiteral(e);
611
611
  }
612
- function hr(e, t) {
613
- const s = cr(e), r = cr(t);
614
- return s !== r ? s - r : e === t ? 0 : "number" == typeof e && "number" == typeof t ? e < t ? -1 : 1 : "string" == typeof e && "string" == typeof t ? e < t ? -1 : e > t ? 1 : 0 : "boolean" == typeof e ? e ? 1 : -1 : ds.isError(e) && ds.isError(t) ? e.getCode() - t.getCode() : 0;
612
+ function cr(e, t) {
613
+ const s = ur(e), r = ur(t);
614
+ return s !== r ? s - r : e === t ? 0 : "number" == typeof e && "number" == typeof t ? e < t ? -1 : 1 : "string" == typeof e && "string" == typeof t ? e < t ? -1 : e > t ? 1 : 0 : "boolean" == typeof e ? e ? 1 : -1 : gs.isError(e) && gs.isError(t) ? e.getCode() - t.getCode() : 0;
615
615
  }
616
- function cr(e) {
616
+ function ur(e) {
617
617
  if (null === e) return 0;
618
618
  switch (typeof e) {
619
619
  case "number": return 1;
620
620
  case "string": return 2;
621
621
  case "boolean": return 3;
622
- default: return ds.isError(e) ? 4 : 5;
622
+ default: return gs.isError(e) ? 4 : 5;
623
623
  }
624
624
  }
625
625
  (function(e) {
626
626
  function t(e) {
627
- return C.peek()?.getFunctionDeclaration(e) ?? null;
627
+ return p.peek()?.getFunctionDeclaration(e) ?? null;
628
628
  }
629
629
  e.get = t, e.has = function(e) {
630
630
  return null !== t(e);
631
631
  };
632
- })(or || (or = {}));
633
- var ur = class {
632
+ })(nr || (nr = {}));
633
+ var dr = class {
634
634
  constructor(e) {
635
635
  this._children = e;
636
636
  }
@@ -680,17 +680,17 @@ var ur = class {
680
680
  }
681
681
  e = new gt(function(e) {
682
682
  const t = e.length;
683
- if (0 === t) return dr;
683
+ if (0 === t) return gr;
684
684
  if (1 === t) return e[0];
685
685
  let s = e[0];
686
- for (let r = 1; r < t; r++) s = gr(s, e[r]);
686
+ for (let r = 1; r < t; r++) s = mr(s, e[r]);
687
687
  return Object.freeze(s);
688
688
  }(r)), this._sortedNumbers = e;
689
689
  }
690
690
  return e;
691
691
  }
692
692
  getRanked(e) {
693
- return ze(this._children, e, hr)[Symbol.iterator]();
693
+ return qe(this._children, e, cr)[Symbol.iterator]();
694
694
  }
695
695
  getFrequencies(e) {
696
696
  if (e) return this._mergeFrequencies(e);
@@ -698,7 +698,7 @@ var ur = class {
698
698
  return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
699
699
  }
700
700
  _mergeFrequencies(e) {
701
- const t = e?.keyFn ?? Me, s = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, o = i.length;
701
+ const t = e?.keyFn ?? Ie, s = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, o = i.length;
702
702
  let n = 0, a = 0, l = !1;
703
703
  for (let h = 0; h < o; h++) {
704
704
  const o = i[h].getFrequencies(e);
@@ -713,22 +713,22 @@ var ur = class {
713
713
  }) : l = !0, u = c.next();
714
714
  }
715
715
  }
716
- return je.fromGroups(r, t, e, hr, n, a, l);
716
+ return je.fromGroups(r, t, e, cr, n, a, l);
717
717
  }
718
718
  getTypedCounts(e) {
719
719
  let t = this._typedCounts;
720
720
  if (!t) {
721
721
  const e = {
722
- [gs.Number]: 0,
723
- [gs.String]: 0,
724
- [gs.Boolean]: 0,
725
- [gs.Error]: 0,
726
- [gs.RichData]: 0,
727
- [gs.Null]: 0
722
+ [ms.Number]: 0,
723
+ [ms.String]: 0,
724
+ [ms.Boolean]: 0,
725
+ [ms.Error]: 0,
726
+ [ms.RichData]: 0,
727
+ [ms.Null]: 0
728
728
  }, s = this._children, r = s.length;
729
729
  for (let t = 0; t < r; t++) {
730
730
  const r = s[t].getTypedCounts();
731
- e[gs.Number] += r[gs.Number] ?? 0, e[gs.String] += r[gs.String] ?? 0, e[gs.Boolean] += r[gs.Boolean] ?? 0, e[gs.Error] += r[gs.Error] ?? 0, e[gs.RichData] += r[gs.RichData] ?? 0, e[gs.Null] += r[gs.Null] ?? 0;
731
+ e[ms.Number] += r[ms.Number] ?? 0, e[ms.String] += r[ms.String] ?? 0, e[ms.Boolean] += r[ms.Boolean] ?? 0, e[ms.Error] += r[ms.Error] ?? 0, e[ms.RichData] += r[ms.RichData] ?? 0, e[ms.Null] += r[ms.Null] ?? 0;
732
732
  }
733
733
  t = Object.freeze(e), this._typedCounts = t;
734
734
  }
@@ -749,12 +749,12 @@ var ur = class {
749
749
  sum: 0,
750
750
  sumSq: 0,
751
751
  typed: {
752
- [gs.Number]: 0,
753
- [gs.String]: 0,
754
- [gs.Boolean]: 0,
755
- [gs.Error]: 0,
756
- [gs.RichData]: 0,
757
- [gs.Null]: 0
752
+ [ms.Number]: 0,
753
+ [ms.String]: 0,
754
+ [ms.Boolean]: 0,
755
+ [ms.Error]: 0,
756
+ [ms.RichData]: 0,
757
+ [ms.Null]: 0
758
758
  }
759
759
  };
760
760
  for (let i = 0; i < s; i++) {
@@ -763,10 +763,10 @@ var ur = class {
763
763
  const o = s.numericalCount;
764
764
  o <= 0 || (r.numericalCount += o, r.sum += s.sum, r.sumSq += s.varP * o + s.sum * s.sum / o, (void 0 === r.min || s.min < r.min) && (r.min = s.min), (void 0 === r.max || s.max > r.max) && (r.max = s.max));
765
765
  }
766
- return ve(r);
766
+ return Re(r);
767
767
  }
768
- }, dr = Object.freeze([]);
769
- function gr(e, t) {
768
+ }, gr = Object.freeze([]);
769
+ function mr(e, t) {
770
770
  const s = e.length, r = t.length, i = new Array(s + r);
771
771
  let o = 0, n = 0, a = 0;
772
772
  for (; o < s && n < r;) i[a++] = e[o] <= t[n] ? e[o++] : t[n++];
@@ -774,14 +774,14 @@ function gr(e, t) {
774
774
  for (; n < r;) i[a++] = t[n++];
775
775
  return i;
776
776
  }
777
- var mr, fr = class e {
777
+ var fr, _r = class e {
778
778
  constructor(e, t) {
779
779
  this._source = null, this._fresh = /* @__PURE__ */ new WeakSet(), this._unwatch = null, this.cacheId = e, this._store = t, this._fresh.add(t.get());
780
780
  }
781
781
  static dataOf(t, s) {
782
782
  const r = e.modelOf(t);
783
783
  return {
784
- part: nt.fromJSON(t.part, s),
784
+ part: _t.fromJSON(t.part, s),
785
785
  model: r,
786
786
  partFormats: !r && t.partFormats ? t.partFormats : null,
787
787
  source: !r && t.source ? t.source : null
@@ -823,7 +823,7 @@ var mr, fr = class e {
823
823
  if (this._source) return;
824
824
  const { ref: s, sheet: r, name: i } = this._sourceAsRead() ?? {};
825
825
  let o = null, n = null;
826
- if (s && r && !s.includes("#REF!") ? (o = e(r), n = `${$e(r)}!${E(s)}`) : !i || s || r ? i && r && !s && (o = e(r), n = `${$e(r)}!${i}`) : (o = t(i), n = `${i}[#All]`), !o || !n) return;
826
+ if (s && r && !s.includes("#REF!") ? (o = e(r), n = `${Ne(r)}!${de(s)}`) : !i || s || r ? i && r && !s && (o = e(r), n = `${Ne(r)}!${i}`) : (o = t(i), n = `${i}[#All]`), !o || !n) return;
827
827
  const a = {
828
828
  formula: null,
829
829
  wired: null,
@@ -877,17 +877,17 @@ var mr, fr = class e {
877
877
  if (null === t || t === e.wired) return null;
878
878
  const s = this._sourceAsRead();
879
879
  if (s?.name && s.sheet) {
880
- const e = p(t)?.sheet;
880
+ const e = f(t)?.sheet;
881
881
  return e ? { sheet: e } : null;
882
882
  }
883
883
  const r = /^(.+)\[#All\]$/.exec(t)?.[1];
884
884
  if (r) return { name: r };
885
- const i = p(t);
885
+ const i = f(t);
886
886
  return i ? {
887
887
  name: null,
888
- ref: ue(i.reference),
888
+ ref: N(i.reference),
889
889
  sheet: i.sheet
890
- } : { ref: ue(t) };
890
+ } : { ref: N(t) };
891
891
  }
892
892
  _getSource() {
893
893
  const e = this._sourceAsRead();
@@ -906,7 +906,7 @@ var mr, fr = class e {
906
906
  return t;
907
907
  }
908
908
  toJSON(e) {
909
- const t = { cacheId: this.cacheId }, s = nt.toJSON(this.part, e);
909
+ const t = { cacheId: this.cacheId }, s = _t.toJSON(this.part, e);
910
910
  if (s) {
911
911
  t.part = s;
912
912
  const e = this._store.get().partFormats;
@@ -917,7 +917,7 @@ var mr, fr = class e {
917
917
  const i = this._getSource();
918
918
  return i && (t.source = i), t;
919
919
  }
920
- }, _r = class {
920
+ }, pr = class {
921
921
  constructor(e, t) {
922
922
  this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
923
923
  }
@@ -951,7 +951,7 @@ var mr, fr = class e {
951
951
  get isIPerson() {
952
952
  return !0;
953
953
  }
954
- }, pr = class extends He {
954
+ }, wr = class extends He {
955
955
  constructor(e) {
956
956
  super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
957
957
  }
@@ -972,10 +972,10 @@ var mr, fr = class e {
972
972
  const e = this._byDisplayName.get(r);
973
973
  if (e) return e;
974
974
  }
975
- const i = new _r({
975
+ const i = new pr({
976
976
  ...t,
977
977
  displayName: r,
978
- id: s ?? fs.uuidV4().toUpperCase()
978
+ id: s ?? _s.uuidV4().toUpperCase()
979
979
  }, (e) => this._remove(e));
980
980
  return this._byId.set(i.getId(), i), r && !this._byDisplayName.has(r) && this._byDisplayName.set(r, i), this._items = null, this._notifyCollectionChange(), i;
981
981
  }
@@ -1015,7 +1015,7 @@ var mr, fr = class e {
1015
1015
  get isIPersonCollection() {
1016
1016
  return !0;
1017
1017
  }
1018
- }, wr = (e, t) => {
1018
+ }, yr = (e, t) => {
1019
1019
  const s = [0];
1020
1020
  for (let t = 0; t < e.length; t++) "\n" === e[t] && s.push(t + 1);
1021
1021
  const r = t.map((e) => ` ${((e) => {
@@ -1027,7 +1027,7 @@ var mr, fr = class e {
1027
1027
  return `${t + 1}:${e - s[t] + 1}`;
1028
1028
  })(e.start)} ${e.code}: ${e.message}`), i = t.length;
1029
1029
  return `Script has ${i} compile error${1 === i ? "" : "s"}:\n${r.join("\n")}`;
1030
- }, yr = class {
1030
+ }, Sr = class {
1031
1031
  constructor(t) {
1032
1032
  this._options = t, this._emitter = new e(this), this._initState();
1033
1033
  }
@@ -1038,12 +1038,12 @@ var mr, fr = class e {
1038
1038
  _builtInNames() {
1039
1039
  try {
1040
1040
  const e = this._options.getBuiltInFunctions?.();
1041
- if (!e) return fs.EmptyArray;
1041
+ if (!e) return _s.EmptyArray;
1042
1042
  const t = [];
1043
1043
  for (const s of e.getItems({ includeHidden: !0 })) s.isBuiltIn() && t.push(s.getName());
1044
1044
  return t;
1045
1045
  } catch {
1046
- return fs.EmptyArray;
1046
+ return _s.EmptyArray;
1047
1047
  }
1048
1048
  }
1049
1049
  async createModule(e) {
@@ -1052,17 +1052,17 @@ var mr, fr = class e {
1052
1052
  minify: !0,
1053
1053
  ...e
1054
1054
  });
1055
- return t.module ? await Se(Pe.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
1055
+ return t.module ? await te(bt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
1056
1056
  }
1057
1057
  addModule(e, t, s) {
1058
1058
  this._modules.add(e, t, s);
1059
1059
  }
1060
1060
  async addModuleFromJSON(e, t, s) {
1061
- const r = await Se(e, t);
1061
+ const r = await te(e, t);
1062
1062
  return this.addModule(e, r, s), r;
1063
1063
  }
1064
1064
  async executeMacro(e, t, s) {
1065
- await Re.assertUsable("scripts");
1065
+ await ct.assertUsable("scripts");
1066
1066
  const r = this._modules.getItems({ name: t }), i = r.length;
1067
1067
  for (let t = 0; t < i; t++) {
1068
1068
  const i = r[t].getFunctions().getByName(e);
@@ -1075,8 +1075,8 @@ var mr, fr = class e {
1075
1075
  }
1076
1076
  async run(e, t) {
1077
1077
  try {
1078
- await Re.assertUsable("scripts");
1079
- const s = "string" == typeof e ? await this.createModule({ source: e }) : await Se(Pe.DEFAULT_MODULE, e), r = "string" == typeof e ? e : e?.source ?? "";
1078
+ await ct.assertUsable("scripts");
1079
+ const s = "string" == typeof e ? await this.createModule({ source: e }) : await te(bt.DEFAULT_MODULE, e), r = "string" == typeof e ? e : e?.source ?? "";
1080
1080
  return await this._runModule(s, r, t);
1081
1081
  } catch (e) {
1082
1082
  return {
@@ -1093,7 +1093,7 @@ var mr, fr = class e {
1093
1093
  };
1094
1094
  const i = e.getDiagnostics(), o = i.filter((e) => "error" === e.severity);
1095
1095
  if (o.length > 0) {
1096
- const e = new Error(wr(t, o));
1096
+ const e = new Error(yr(t, o));
1097
1097
  return e.diagnostics = o, {
1098
1098
  ok: !1,
1099
1099
  error: e,
@@ -1121,12 +1121,12 @@ var mr, fr = class e {
1121
1121
  }
1122
1122
  _searchable(e) {
1123
1123
  const t = this._modules;
1124
- return t && 0 !== t.getCount() ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) : fs.EmptyArray;
1124
+ return t && 0 !== t.getCount() ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) : _s.EmptyArray;
1125
1125
  }
1126
1126
  async searchFunctions(e) {
1127
1127
  await this._emitter.notify("onBeforeSearch", { async: !0 });
1128
1128
  const t = this._searchable(e?.moduleName);
1129
- if (0 === t.length) return fs.EmptyArray;
1129
+ if (0 === t.length) return _s.EmptyArray;
1130
1130
  if (1 === t.length) return t[0].search(e);
1131
1131
  const s = e?.limit, r = void 0 === s ? e : {
1132
1132
  ...e,
@@ -1144,9 +1144,9 @@ var mr, fr = class e {
1144
1144
  }
1145
1145
  }
1146
1146
  }
1147
- if (!i || 0 === i.length) return fs.EmptyArray;
1148
- const a = e?.text ? e.text.trim().toUpperCase() : null;
1149
- return a ? n(i, a) : i.sort((e, t) => {
1147
+ if (!i || 0 === i.length) return _s.EmptyArray;
1148
+ const n = e?.text ? e.text.trim().toUpperCase() : null;
1149
+ return n ? Be(i, n) : i.sort((e, t) => {
1150
1150
  const s = e.getName().toUpperCase(), r = t.getName().toUpperCase();
1151
1151
  return s < r ? -1 : s > r ? 1 : 0;
1152
1152
  }), void 0 !== s && i.length > s ? i.slice(0, s) : i;
@@ -1173,7 +1173,7 @@ var mr, fr = class e {
1173
1173
  }), r = t.length;
1174
1174
  for (let s = 0; s < r; s++) await t[s].execute(e);
1175
1175
  } catch (e) {
1176
- ks.error("Error executing autoRun script:", e);
1176
+ Cs.error("Error executing autoRun script:", e);
1177
1177
  }
1178
1178
  }
1179
1179
  }
@@ -1185,13 +1185,13 @@ var mr, fr = class e {
1185
1185
  for (let i = 0; i < r.length; i++) {
1186
1186
  const o = r[i], n = t[o];
1187
1187
  try {
1188
- s[o] = await Se(o, n, !1, [], "workbook" === n?.scope ? e : null);
1188
+ s[o] = await te(o, n, !1, [], "workbook" === n?.scope ? e : null);
1189
1189
  } catch (e) {
1190
- ks.error(`Could not load script '${o}'; it will be unavailable.`, e);
1190
+ Cs.error(`Could not load script '${o}'; it will be unavailable.`, e);
1191
1191
  }
1192
1192
  }
1193
1193
  }
1194
- const r = this, i = new ct({
1194
+ const r = this, i = new nt({
1195
1195
  transactions: this._options?.transactions,
1196
1196
  initial: s,
1197
1197
  isReadOnly: () => r.isReadOnly(),
@@ -1219,10 +1219,10 @@ var mr, fr = class e {
1219
1219
  get isIScript() {
1220
1220
  return !0;
1221
1221
  }
1222
- }, Sr = /^([a-z][a-z0-9+.-]*):/i, br = (e) => {
1222
+ }, br = /^([a-z][a-z0-9+.-]*):/i, kr = (e) => {
1223
1223
  const t = e.toLowerCase();
1224
1224
  return t.endsWith(":") ? t : t + ":";
1225
- }, kr = async (e, t) => {
1225
+ }, Cr = async (e, t) => {
1226
1226
  try {
1227
1227
  return await globalThis.fetch(e, t);
1228
1228
  } catch (s) {
@@ -1241,15 +1241,15 @@ var mr, fr = class e {
1241
1241
  } finally {
1242
1242
  clearTimeout(i), r.abort();
1243
1243
  }
1244
- })(e, t)) throw new ds.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: s });
1244
+ })(e, t)) throw new gs.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: s });
1245
1245
  throw s;
1246
1246
  }
1247
- }, Cr = class {
1247
+ }, vr = class {
1248
1248
  constructor() {
1249
- this._handlers = /* @__PURE__ */ new Map([["http:", kr], ["https:", kr]]);
1249
+ this._handlers = /* @__PURE__ */ new Map([["http:", Cr], ["https:", Cr]]);
1250
1250
  }
1251
1251
  fetch(e, t) {
1252
- const s = Sr.exec(e)?.[1], r = this._handlers.get(s ? br(s) : "https:");
1252
+ const s = br.exec(e)?.[1], r = this._handlers.get(s ? kr(s) : "https:");
1253
1253
  if (!r) return Promise.reject(/* @__PURE__ */ new TypeError(`No fetcher serves '${s}:'.`));
1254
1254
  try {
1255
1255
  return r(e, t);
@@ -1258,7 +1258,7 @@ var mr, fr = class e {
1258
1258
  }
1259
1259
  }
1260
1260
  register(e, t) {
1261
- const s = br(e), r = this._handlers.get(s);
1261
+ const s = kr(e), r = this._handlers.get(s);
1262
1262
  return this._handlers.set(s, t), () => {
1263
1263
  this._handlers.get(s) === t && (r ? this._handlers.set(s, r) : this._handlers.delete(s));
1264
1264
  };
@@ -1266,17 +1266,17 @@ var mr, fr = class e {
1266
1266
  get isIFetcher() {
1267
1267
  return !0;
1268
1268
  }
1269
- }, vr = /* @__PURE__ */ new Set([
1269
+ }, Ir = /* @__PURE__ */ new Set([
1270
1270
  101,
1271
1271
  103,
1272
1272
  204,
1273
1273
  205,
1274
1274
  304
1275
- ]), Ir = (e) => new Response(vr.has(e.status) ? null : e.body, {
1275
+ ]), Rr = (e) => new Response(Ir.has(e.status) ? null : e.body, {
1276
1276
  status: e.status,
1277
1277
  statusText: e.statusText,
1278
1278
  headers: e.headers
1279
- }), Rr = class {
1279
+ }), Nr = class {
1280
1280
  constructor(e, t) {
1281
1281
  this._kept = /* @__PURE__ */ new Map(), this._cached = /* @__PURE__ */ new Map(), this._inFlight = /* @__PURE__ */ new Map(), this._resources = e, this._fetcher = t;
1282
1282
  }
@@ -1288,19 +1288,19 @@ var mr, fr = class e {
1288
1288
  const s = this._kept.get(e) ?? this._findHeld(e);
1289
1289
  if (s && !s.isClosed()) return this._fromKept(s);
1290
1290
  const r = this._cached.get(e);
1291
- if (r) return Ir(r);
1291
+ if (r) return Rr(r);
1292
1292
  let i = this._inFlight.get(e);
1293
1293
  return i || (i = this._request(e, {
1294
1294
  ...t,
1295
1295
  signal: void 0
1296
1296
  }).finally(() => {
1297
1297
  this._inFlight.delete(e);
1298
- }), this._inFlight.set(e, i)), Ir(await ((e, t) => t ? t.aborted ? Promise.reject(t.reason) : new Promise((s, r) => {
1298
+ }), this._inFlight.set(e, i)), Rr(await ((e, t) => t ? t.aborted ? Promise.reject(t.reason) : new Promise((s, r) => {
1299
1299
  const i = () => r(t.reason);
1300
1300
  t.addEventListener("abort", i, { once: !0 }), e.then(s, r).finally(() => t.removeEventListener("abort", i));
1301
1301
  }) : e)(i, t?.signal));
1302
1302
  }
1303
- return Ir(await this._request(e, t));
1303
+ return Rr(await this._request(e, t));
1304
1304
  }
1305
1305
  adopt(e) {
1306
1306
  for (const t of e) {
@@ -1318,7 +1318,7 @@ var mr, fr = class e {
1318
1318
  }
1319
1319
  async _fromKept(e) {
1320
1320
  const [t, s] = await Promise.all([e.toBuffer(), e.getType()]);
1321
- return Ir({
1321
+ return Rr({
1322
1322
  status: 200,
1323
1323
  statusText: "OK",
1324
1324
  headers: s ? [["content-type", s.mime]] : [],
@@ -1326,7 +1326,7 @@ var mr, fr = class e {
1326
1326
  });
1327
1327
  }
1328
1328
  async _request(e, t) {
1329
- const s = await this._fetcher.fetch(e, t), r = vr.has(s.status) ? null : await s.arrayBuffer(), i = [];
1329
+ const s = await this._fetcher.fetch(e, t), r = Ir.has(s.status) ? null : await s.arrayBuffer(), i = [];
1330
1330
  s.headers.forEach((e, t) => {
1331
1331
  i.push([t, e]);
1332
1332
  });
@@ -1337,14 +1337,14 @@ var mr, fr = class e {
1337
1337
  body: r
1338
1338
  };
1339
1339
  if (s.ok && r && r.byteLength > 0) {
1340
- const t = await new y({ source: { buffer: r } }).getType();
1340
+ const t = await new G({ source: { buffer: r } }).getType();
1341
1341
  t?.mime.startsWith("image/") ? (o.headers = i.filter(([e]) => "content-type" !== e.toLowerCase()), o.headers.push(["content-type", t.mime])) : this._cached.set(e, o);
1342
1342
  }
1343
1343
  return o;
1344
1344
  }
1345
- }, Nr = class {
1345
+ }, Or = class {
1346
1346
  constructor(e, t, s, r) {
1347
- this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ?? _s.EmptyCell, this._sheet = new se({
1347
+ this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ?? ps.EmptyCell, this._sheet = new he({
1348
1348
  runtime: e,
1349
1349
  styles: this._styles,
1350
1350
  calcOnLoad: "none",
@@ -1366,14 +1366,14 @@ var mr, fr = class e {
1366
1366
  e.includes(r) && delete i[r];
1367
1367
  }
1368
1368
  }
1369
- const o = Ut(i.fontFamily);
1369
+ const o = Jt(i.fontFamily);
1370
1370
  r.font = {}, o && (r.font.family = o.family, r.font.fallbacks = o.fallbacks, r.font.size = o.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
1371
- const n = Bt(i.textDecoration);
1372
- r.font.underline = n.underline, r.font.strike = n.strike ? Pt.StrikeStyle.Single : Pt.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = Jt(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = hs(i.textAlign)), i?.textAlign && !r.alignment.horizontal && "general" !== i?.textAlign && ("center-across" === i.textAlign ? r.alignment.horizontal = ns.HorizontalAlignment.CenterContinuous : "fill" === i.textAlign ? r.alignment.horizontal = ns.HorizontalAlignment.Fill : "121" === i.textAlign || "010" === i.textAlign ? (r.alignment.horizontal = ns.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = "121" === i.textAlign) : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && ("super" === i.verticalAlign.toLowerCase() ? r.font.baseline = zt.Baseline.Superscript : "sub" === i.verticalAlign.toLowerCase() ? r.font.baseline = zt.Baseline.Subscript : r.alignment.vertical = Dt(i.verticalAlign), r.alignment.vertical || ("121" === i.verticalAlign ? r.alignment.vertical = ns.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = "no-wrap" === i.whiteSpace || "nowrap" === i.whiteSpace ? ns.Overflow.Visible : ns.Overflow.Wrap), "shrinktofit" === i.msoTextControl && (r.alignment.overflow = ns.Overflow.Shrink);
1371
+ const n = Wt(i.textDecoration);
1372
+ r.font.underline = n.underline, r.font.strike = n.strike ? Ft.StrikeStyle.Single : Ft.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = qt(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = cs(i.textAlign)), i?.textAlign && !r.alignment.horizontal && "general" !== i?.textAlign && ("center-across" === i.textAlign ? r.alignment.horizontal = as.HorizontalAlignment.CenterContinuous : "fill" === i.textAlign ? r.alignment.horizontal = as.HorizontalAlignment.Fill : "121" === i.textAlign || "010" === i.textAlign ? (r.alignment.horizontal = as.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = "121" === i.textAlign) : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && ("super" === i.verticalAlign.toLowerCase() ? r.font.baseline = Ut.Baseline.Superscript : "sub" === i.verticalAlign.toLowerCase() ? r.font.baseline = Ut.Baseline.Subscript : r.alignment.vertical = jt(i.verticalAlign), r.alignment.vertical || ("121" === i.verticalAlign ? r.alignment.vertical = as.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = "no-wrap" === i.whiteSpace || "nowrap" === i.whiteSpace ? as.Overflow.Visible : as.Overflow.Wrap), "shrinktofit" === i.msoTextControl && (r.alignment.overflow = as.Overflow.Shrink);
1373
1373
  let a = null;
1374
1374
  if (i.background ? a = i.background : i.backgroundColor && (a = i.backgroundColor), a && (r.fill = { color: a }), i.msoPattern) {
1375
- let e = jt(i.msoPattern);
1376
- e && (e.patternType === ls.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== ls.BuiltInSheetPattern.None && (a && (e.background = a), r.fill = e));
1375
+ let e = Ht(i.msoPattern);
1376
+ e && (e.patternType === hs.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== hs.BuiltInSheetPattern.None && (a && (e.background = a), r.fill = e));
1377
1377
  }
1378
1378
  "vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation = $t(i.msoRotate));
1379
1379
  const l = (e, t) => {
@@ -1381,25 +1381,25 @@ var mr, fr = class e {
1381
1381
  };
1382
1382
  i.border && "none" !== i.border && (l("top", i.border), l("left", i.border), l("right", i.border), l("bottom", i.border)), i.borderTop && l("top", i.borderTop), i.borderLeft && l("left", i.borderLeft), i.borderRight && l("right", i.borderRight), i.borderBottom && l("bottom", i.borderBottom), i.msoDiagonalUp && l("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && l("diagonalDown", i.msoDiagonalDown);
1383
1383
  let h = r.numberFormat;
1384
- i.msoNumberFormat && (h = Xt(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h = rs.Styles.lookupStyle(r.numberFormat).formatType === rs.Type.Number ? null : rs.Type.Number : "Percent" === h && (h = rs.Styles.lookupStyle(r.numberFormat).formatType === rs.Type.Percentage ? null : rs.Type.Percentage)), h && (r.numberFormat = h), e.style = this._styles.normalize(r), s && 0 === Object.keys(e.style).length && delete e.style;
1384
+ i.msoNumberFormat && (h = Qt(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h = is.Styles.lookupStyle(r.numberFormat).formatType === is.Type.Number ? null : is.Type.Number : "Percent" === h && (h = is.Styles.lookupStyle(r.numberFormat).formatType === is.Type.Percentage ? null : is.Type.Percentage)), h && (r.numberFormat = h), e.style = this._styles.normalize(r), s && 0 === Object.keys(e.style).length && delete e.style;
1385
1385
  }
1386
1386
  onCell(e, t, s, r, i) {
1387
1387
  const o = r(i);
1388
1388
  let n = { value: void 0 !== t ? t : s ?? "" };
1389
1389
  if ("string" == typeof n.value && 0 === n.value.length && (n.value = void 0), o && this.applyCSSStyle(n, o), "string" == typeof n.value && /^#+$/.test(n.value)) {
1390
1390
  const e = n.style?.numberFormat;
1391
- e && (Mt(e) || Wt(e)) && (n.value = ds.BuiltIn.Num);
1391
+ e && (Dt(e) || Mt(e)) && (n.value = gs.BuiltIn.Num);
1392
1392
  }
1393
1393
  if ("TD" === i?.tagName.toUpperCase()) {
1394
1394
  let e = n.style, t = e?.font ?? {};
1395
- (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = Pt.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = zt.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = zt.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = Pt.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = Pt.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, n.style = e), e.font || (e.font = t));
1395
+ (i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = Ft.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = Ut.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = Ut.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = Ft.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = Ft.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, n.style = e), e.font || (e.font = t));
1396
1396
  const s = i.querySelectorAll("a");
1397
1397
  if (s.length > 0) {
1398
1398
  const e = s[0].getAttribute("href");
1399
1399
  e && (n.hyperlink = e);
1400
1400
  }
1401
1401
  }
1402
- if (!_s.isSingleCell(e)) {
1402
+ if (!ps.isSingleCell(e)) {
1403
1403
  const t = {
1404
1404
  rowStart: this._topLeft.rowIndex + e.rowStart,
1405
1405
  colStart: this._topLeft.colIndex + e.colStart,
@@ -1410,7 +1410,7 @@ var mr, fr = class e {
1410
1410
  }
1411
1411
  if (void 0 === n.value && !n.style && Object.keys(n).length <= 1) return;
1412
1412
  const a = this._builder, l = this._topLeft;
1413
- if (a.pushAt(l.rowIndex + e.rowStart, l.colIndex + e.colStart, n), !_s.isSingleCell(e) && o.msoIgnore) {
1413
+ if (a.pushAt(l.rowIndex + e.rowStart, l.colIndex + e.colStart, n), !ps.isSingleCell(e) && o.msoIgnore) {
1414
1414
  if (o.msoIgnore.includes("colspan")) {
1415
1415
  const t = {};
1416
1416
  o && this.applyCSSStyle(t, o);
@@ -1440,9 +1440,9 @@ var mr, fr = class e {
1440
1440
  if ("userset" !== i.msoHeightSource) return;
1441
1441
  if (!r) return;
1442
1442
  let o = r.getAttribute("height") ?? i.height, n = null;
1443
- if (o && (n = qt(o, this._styles.getNormal().getFont().getSize(), "px")), null === n) for (let e = 0; e < r.cells.length; e++) {
1443
+ if (o && (n = Kt(o, this._styles.getNormal().getFont().getSize(), "px")), null === n) for (let e = 0; e < r.cells.length; e++) {
1444
1444
  const t = r.cells[e], i = t.getAttribute("height") ?? s(t).height;
1445
- let o = qt(i, this._styles.getNormal().getFont().getSize(), "px");
1445
+ let o = Kt(i, this._styles.getNormal().getFont().getSize(), "px");
1446
1446
  null !== o && (n = Math.max(o, n ?? 0));
1447
1447
  }
1448
1448
  null !== n && this._rowsReading.push({
@@ -1450,7 +1450,7 @@ var mr, fr = class e {
1450
1450
  min: this._topLeft.rowIndex + e,
1451
1451
  max: this._topLeft.rowIndex + e + t - 1
1452
1452
  },
1453
- update: { size: n * Pt.getDeviceScale() }
1453
+ update: { size: n * Ft.getDeviceScale() }
1454
1454
  });
1455
1455
  }
1456
1456
  onColumn(e, t, s, r) {
@@ -1458,12 +1458,12 @@ var mr, fr = class e {
1458
1458
  if ("userset" !== i.msoWidthSource) return;
1459
1459
  if (!r) return;
1460
1460
  let o = r.getAttribute("width") ?? i.width, n = null;
1461
- o && (n = qt(o, this._styles.getNormal().getFont().getSize(), "px")), null !== n && this._colsReading.push({
1461
+ o && (n = Kt(o, this._styles.getNormal().getFont().getSize(), "px")), null !== n && this._colsReading.push({
1462
1462
  address: {
1463
1463
  min: this._topLeft.colIndex + e,
1464
1464
  max: this._topLeft.colIndex + e + t - 1
1465
1465
  },
1466
- update: { size: n * Pt.getDeviceScale() }
1466
+ update: { size: n * Ft.getDeviceScale() }
1467
1467
  });
1468
1468
  }
1469
1469
  onDone() {
@@ -1474,9 +1474,9 @@ var mr, fr = class e {
1474
1474
  sheet() {
1475
1475
  return this._sheet;
1476
1476
  }
1477
- }, Or = class {
1477
+ }, xr = class {
1478
1478
  constructor(e) {
1479
- if (!e) throw new Cs("snapshot is required.");
1479
+ if (!e) throw new vs("snapshot is required.");
1480
1480
  this._snapshot = e;
1481
1481
  }
1482
1482
  getItemType() {
@@ -1506,10 +1506,10 @@ var mr, fr = class e {
1506
1506
  get isClipboardItem() {
1507
1507
  return !0;
1508
1508
  }
1509
- }, xr = class {
1509
+ }, Er = class {
1510
1510
  constructor(e, t, s, r, i) {
1511
- if (this._parsed = void 0, this._runtime = e, !t) throw new Cs("nativeItems are required.");
1512
- this._topLeft = s ?? _s.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
1511
+ if (this._parsed = void 0, this._runtime = e, !t) throw new vs("nativeItems are required.");
1512
+ this._topLeft = s ?? ps.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
1513
1513
  }
1514
1514
  getItemType() {
1515
1515
  return "range";
@@ -1554,16 +1554,16 @@ var mr, fr = class e {
1554
1554
  async parse() {
1555
1555
  let e, t = this._native?.text, s = this._native.html;
1556
1556
  if (null === s && t && t.includes("<table")) try {
1557
- const e = new DOMParser().parseFromString(t, bs.Html), r = e.querySelector("parsererror");
1558
- if (r) throw new ws("Unable to parse: " + r);
1557
+ const e = new DOMParser().parseFromString(t, ks.Html), r = e.querySelector("parsererror");
1558
+ if (r) throw new ys("Unable to parse: " + r);
1559
1559
  s = e, t = null;
1560
1560
  } catch (e) {
1561
1561
  console.warn("Discovered text as html table but could could not parse.");
1562
1562
  }
1563
1563
  try {
1564
- const r = new Nr(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ? F(t) : [[]]);
1564
+ const r = new Or(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ? M(t) : [[]]);
1565
1565
  let o;
1566
- if (L(s, i, r) ? (e = r.sheet(), o = e.getUsedRange()) : s = null, o) {
1566
+ if (V(s, i, r) ? (e = r.sheet(), o = e.getUsedRange()) : s = null, o) {
1567
1567
  const t = o.getSnapshot();
1568
1568
  return this._parsed = {
1569
1569
  prepare: (e, s) => t.prepare?.(e, s),
@@ -1577,7 +1577,7 @@ var mr, fr = class e {
1577
1577
  throw e;
1578
1578
  }
1579
1579
  if (!t && !s && this._native.image) {
1580
- const e = await this._native.image.arrayBuffer(), t = ys.getPngStatedSize(e);
1580
+ const e = await this._native.image.arrayBuffer(), t = Ss.getPngStatedSize(e);
1581
1581
  let s = null;
1582
1582
  return this._parsed = {
1583
1583
  async prepare(r) {
@@ -1586,7 +1586,7 @@ var mr, fr = class e {
1586
1586
  sheet: i,
1587
1587
  options: await i.getMovables()._preparePicture({ source: { buffer: e } }, {
1588
1588
  type: "picture",
1589
- description: Os("op.copyImageFromClipboard"),
1589
+ description: xs("op.copyImageFromClipboard"),
1590
1590
  autoSelect: !0,
1591
1591
  ...t && { bounds: t }
1592
1592
  })
@@ -1605,7 +1605,7 @@ var mr, fr = class e {
1605
1605
  get isClipboardItem() {
1606
1606
  return !0;
1607
1607
  }
1608
- }, Er = class {
1608
+ }, Lr = class {
1609
1609
  constructor(t) {
1610
1610
  this._closed = !1, this._kind = t.kind, this._id = t.id, this._part = t.part, this._styles = t.styles, this._tabColor = t.tabColor ? this._styles.parseColor(t.tabColor) : null, this._transactions = t.transactions, this._workbook = t.workbook ?? null, this._container = t.container, this._emitter = new e(this, this._transactions);
1611
1611
  }
@@ -1622,11 +1622,11 @@ var mr, fr = class e {
1622
1622
  return this._assertOpen(), this._container.setName(e, t), this;
1623
1623
  }
1624
1624
  getVisibility() {
1625
- return this._closed ? St.Visibility.VeryHidden : this._container.getVisibility();
1625
+ return this._closed ? Ae.Visibility.VeryHidden : this._container.getVisibility();
1626
1626
  }
1627
1627
  setVisibility(e = !0, t) {
1628
1628
  let s;
1629
- return this._assertOpen(), s = !0 === e ? St.Visibility.Visible : !1 === e ? St.Visibility.Hidden : e, this._container.setVisibility(s, t), this;
1629
+ return this._assertOpen(), s = !0 === e ? Ae.Visibility.Visible : !1 === e ? Ae.Visibility.Hidden : e, this._container.setVisibility(s, t), this;
1630
1630
  }
1631
1631
  getIndex() {
1632
1632
  return this._container.getIndex();
@@ -1648,12 +1648,12 @@ var mr, fr = class e {
1648
1648
  }
1649
1649
  delete() {
1650
1650
  if (this._closed) return;
1651
- const e = this._transactions.beginCommit({ description: xs("op.deleteSheet", { name: this.getName() }) });
1651
+ const e = this._transactions.beginCommit({ description: Es("op.deleteSheet", { name: this.getName() }) });
1652
1652
  try {
1653
1653
  try {
1654
1654
  this._notify("onBeforeDelete");
1655
1655
  } catch (e) {
1656
- throw e instanceof Error ? e : new ws(e?.message ?? xs("error.sheet.modelDelete"));
1656
+ throw e instanceof Error ? e : new ys(e?.message ?? Es("error.sheet.modelDelete"));
1657
1657
  }
1658
1658
  this._notify("onDelete"), e.commit();
1659
1659
  } catch (t) {
@@ -1679,7 +1679,7 @@ var mr, fr = class e {
1679
1679
  this._emitter.notify(e);
1680
1680
  }
1681
1681
  _assertOpen() {
1682
- if (this._closed) throw new Error(xs("error.sheet.modelClosed"));
1682
+ if (this._closed) throw new Error(Es("error.sheet.modelClosed"));
1683
1683
  }
1684
1684
  get [Symbol.toStringTag]() {
1685
1685
  return "[OpaqueSheet]";
@@ -1694,12 +1694,12 @@ var mr, fr = class e {
1694
1694
  return !0;
1695
1695
  }
1696
1696
  };
1697
- (mr || (mr = {})).Visibility = {
1697
+ (fr || (fr = {})).Visibility = {
1698
1698
  Visible: "visible",
1699
1699
  Hidden: "hidden",
1700
1700
  VeryHidden: "veryHidden"
1701
1701
  };
1702
- var Vr, Lr = {
1702
+ var Vr, Ar = {
1703
1703
  showFormulaBar: !0,
1704
1704
  showTabs: !0,
1705
1705
  tabRatio: 600,
@@ -1710,11 +1710,11 @@ var Vr, Lr = {
1710
1710
  firstTab: 0,
1711
1711
  windowBounds: null,
1712
1712
  minimized: !1,
1713
- visibility: mr.Visibility.Visible,
1713
+ visibility: fr.Visibility.Visible,
1714
1714
  autoFilterDateGrouping: !0
1715
- }, Ar = class {
1715
+ }, Tr = class {
1716
1716
  constructor(t) {
1717
- this._id = fs.uuidV4(), this._emitter = new e(this), this._state = { ...Lr }, t?.json && this._fromJSON(t?.json);
1717
+ this._id = _s.uuidV4(), this._emitter = new e(this), this._state = { ...Ar }, t?.json && this._fromJSON(t?.json);
1718
1718
  }
1719
1719
  getId() {
1720
1720
  return this._id;
@@ -1803,7 +1803,7 @@ var Vr, Lr = {
1803
1803
  const t = Object.keys(this._state), s = t.length;
1804
1804
  for (let r = 0; r < s; r++) {
1805
1805
  const s = t[r], i = this._state[s];
1806
- null != i && i !== Lr[s] && (e[s] = i);
1806
+ null != i && i !== Ar[s] && (e[s] = i);
1807
1807
  }
1808
1808
  return 0 === Object.keys(e).length && (e = null), e;
1809
1809
  }
@@ -1813,7 +1813,7 @@ var Vr, Lr = {
1813
1813
  }
1814
1814
  update(e, t = !0) {
1815
1815
  this._state = {
1816
- ...Lr,
1816
+ ...Ar,
1817
1817
  ...this._state,
1818
1818
  ...e
1819
1819
  }, t && this._emitter.notify("onViewChange");
@@ -1828,13 +1828,13 @@ var Vr, Lr = {
1828
1828
  get isIWorkbookView() {
1829
1829
  return !0;
1830
1830
  }
1831
- }, Tr = Object.freeze({
1831
+ }, Pr = Object.freeze({
1832
1832
  structure: !1,
1833
1833
  windows: !1,
1834
1834
  revision: !0,
1835
1835
  password: null,
1836
1836
  revisionsPassword: null
1837
- }), Pr = class extends Xe {
1837
+ }), Fr = class extends l {
1838
1838
  isWindowsAllowed() {
1839
1839
  return this._isPropertyAllowed("windows");
1840
1840
  }
@@ -1856,7 +1856,7 @@ var Vr, Lr = {
1856
1856
  const s = Object.keys(t), r = s.length;
1857
1857
  for (let i = 0; i < r; i++) {
1858
1858
  const r = s[i], o = t[r];
1859
- null != o && o !== Tr[r] && (e[r] = o);
1859
+ null != o && o !== Pr[r] && (e[r] = o);
1860
1860
  }
1861
1861
  }
1862
1862
  return super._toJSON(e);
@@ -1875,7 +1875,7 @@ var Vr, Lr = {
1875
1875
  String: "string",
1876
1876
  Float: "float"
1877
1877
  };
1878
- var Fr = (e) => {
1878
+ var Br = (e) => {
1879
1879
  if ("string" == typeof e) return {
1880
1880
  type: Vr.Type.String,
1881
1881
  value: e
@@ -1899,7 +1899,7 @@ var Fr = (e) => {
1899
1899
  };
1900
1900
  }
1901
1901
  throw new Error("A custom property value must be a string, number, boolean or Date.");
1902
- }, Br = class {
1902
+ }, Wr = class {
1903
1903
  constructor(e, t) {
1904
1904
  this._json = e, this._owner = t;
1905
1905
  }
@@ -1919,7 +1919,7 @@ var Fr = (e) => {
1919
1919
  setValue(e) {
1920
1920
  this._owner._assertCustomEditable(this), this._json = {
1921
1921
  ...this._json,
1922
- ...Fr(e)
1922
+ ...Br(e)
1923
1923
  };
1924
1924
  }
1925
1925
  delete() {
@@ -1928,7 +1928,7 @@ var Fr = (e) => {
1928
1928
  toJSON() {
1929
1929
  return { ...this._json };
1930
1930
  }
1931
- }, Wr = class {
1931
+ }, Mr = class {
1932
1932
  constructor(e) {
1933
1933
  this._json = {}, this._custom = [], this._assertOpen = e;
1934
1934
  }
@@ -2018,9 +2018,9 @@ var Fr = (e) => {
2018
2018
  if (this._assertOpen(), "string" != typeof e || "" === e) throw new Error("A custom property needs a name.");
2019
2019
  const s = this.getCustomProperty(e);
2020
2020
  if (s) return s.setValue(t), s;
2021
- const r = new Br({
2021
+ const r = new Wr({
2022
2022
  key: e,
2023
- ...Fr(t)
2023
+ ...Br(t)
2024
2024
  }, this);
2025
2025
  return this._custom.push(r), r;
2026
2026
  }
@@ -2035,26 +2035,26 @@ var Fr = (e) => {
2035
2035
  }
2036
2036
  fromJSON(e) {
2037
2037
  const { custom: t, ...s } = e ?? {};
2038
- this._json = s, this._custom = (t ?? []).map((e) => new Br({ ...e }, this));
2038
+ this._json = s, this._custom = (t ?? []).map((e) => new Wr({ ...e }, this));
2039
2039
  }
2040
2040
  toJSON() {
2041
2041
  const e = { ...this._json };
2042
2042
  return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
2043
2043
  }
2044
2044
  };
2045
- function Mr(e) {
2046
- return xs("error.workbook.invalidSheetKey", { key: e });
2047
- }
2048
2045
  function Dr(e) {
2049
- return xs("error.workbook.sheetNameNotFound", { sheetName: e });
2046
+ return Es("error.workbook.invalidSheetKey", { key: e });
2050
2047
  }
2051
- function jr(e, t) {
2052
- return xs("chart" === t ? "error.workbook.sheetIsChart" : "macro" === t ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
2048
+ function jr(e) {
2049
+ return Es("error.workbook.sheetNameNotFound", { sheetName: e });
2053
2050
  }
2054
2051
  function Hr(e, t) {
2055
- return "chart" === t ? xs("error.workbook.selectedIsChart", { sheetName: e }) : "macro" === t ? xs("error.workbook.selectedIsMacro", { sheetName: e }) : "dialog" === t ? xs("error.workbook.selectedIsDialog", { sheetName: e }) : xs("error.workbook.noWorksheet");
2052
+ return Es("chart" === t ? "error.workbook.sheetIsChart" : "macro" === t ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
2053
+ }
2054
+ function zr(e, t) {
2055
+ return "chart" === t ? Es("error.workbook.selectedIsChart", { sheetName: e }) : "macro" === t ? Es("error.workbook.selectedIsMacro", { sheetName: e }) : "dialog" === t ? Es("error.workbook.selectedIsDialog", { sheetName: e }) : Es("error.workbook.noWorksheet");
2056
2056
  }
2057
- var zr = class extends He {
2057
+ var Ur = class extends He {
2058
2058
  constructor(e, t, s, r) {
2059
2059
  super(), this._add = e, this._get = t, this._addListeners = s, this._getSelected = r;
2060
2060
  }
@@ -2085,39 +2085,39 @@ var zr = class extends He {
2085
2085
  get isIWorksheetCollection() {
2086
2086
  return !0;
2087
2087
  }
2088
- }, $r = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Ur = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
2089
- function Jr(e) {
2090
- const t = xs(Os("workbook.defaultSheetName"), { n: e + 1 });
2088
+ }, $r = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Jr = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
2089
+ function qr(e) {
2090
+ const t = Es(xs("workbook.defaultSheetName"), { n: e + 1 });
2091
2091
  return "workbook.defaultSheetName" === t ? `Sheet${e + 1}` : t;
2092
2092
  }
2093
- function qr(e, t) {
2093
+ function Kr(e, t) {
2094
2094
  return {
2095
- ...Q,
2095
+ ...oe,
2096
2096
  getWorksheet: () => null,
2097
- toString: () => _e(e, t)
2097
+ toString: () => we(e, t)
2098
2098
  };
2099
2099
  }
2100
- function Kr(e, t = !1) {
2101
- if (!e) throw new Error(xs("error.workbook.sheetNameBlank"));
2100
+ function Gr(e, t = !1) {
2101
+ if (!e) throw new Error(Es("error.workbook.sheetNameBlank"));
2102
2102
  if ($r.test(e)) {
2103
2103
  if (!t) throw new Error(function(e) {
2104
- return e ? xs("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : xs("error.workbook.sheetNameInvalidChars");
2104
+ return e ? Es("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : Es("error.workbook.sheetNameInvalidChars");
2105
2105
  }(e));
2106
2106
  e = e.replace($r, "");
2107
2107
  }
2108
- if (0 === e.length) throw new Error(xs("error.workbook.sheetNameBlank"));
2108
+ if (0 === e.length) throw new Error(Es("error.workbook.sheetNameBlank"));
2109
2109
  const s = e.length;
2110
2110
  if (s > 31) {
2111
- if (!t) throw new Error(xs("error.workbook.sheetNameTooLong"));
2111
+ if (!t) throw new Error(Es("error.workbook.sheetNameTooLong"));
2112
2112
  e = e.substring(0, 31);
2113
2113
  }
2114
2114
  if ("'" === e.charAt(0) || "'" === e.charAt(s - 1)) {
2115
- if (!t) throw new Error(xs("error.workbook.sheetNameQuotes"));
2115
+ if (!t) throw new Error(Es("error.workbook.sheetNameQuotes"));
2116
2116
  e = e.replace(/^'|'$/g, "");
2117
2117
  }
2118
2118
  return e;
2119
2119
  }
2120
- var Gr = "workbook.activeSheet", Zr = class e extends vt {
2120
+ var Xr = "workbook.activeSheet", Zr = class e extends Rt {
2121
2121
  constructor(e, t, s, r) {
2122
2122
  super(e, t, r), this._workbook = s;
2123
2123
  }
@@ -2128,24 +2128,24 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2128
2128
  let r = this._options;
2129
2129
  return s && (r = {
2130
2130
  ...this._options,
2131
- getOptions: Nt(this._options?.getOptions, s)
2131
+ getOptions: Et(this._options?.getOptions, s)
2132
2132
  }), new e(t, this._internal, this._workbook, r);
2133
2133
  }
2134
2134
  _createRange(e, t) {
2135
- const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope, St.Visibility.VeryHidden) : null;
2136
- if (i && !i.sheet.isIWorksheet) throw new ws(jr(i.name, i.sheet.getKind()));
2135
+ const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope, Ae.Visibility.VeryHidden) : null;
2136
+ if (i && !i.sheet.isIWorksheet) throw new ys(Hr(i.name, i.sheet.getKind()));
2137
2137
  if (!i) {
2138
2138
  const e = r._anchorWorksheet();
2139
- return delete s?.scope, qr(s, s ? {
2140
- scope: le,
2139
+ return delete s?.scope, Kr(s, s ? {
2140
+ scope: x,
2141
2141
  ...e.getEntireRange().getCoords()
2142
2142
  } : null);
2143
2143
  }
2144
2144
  let o = this._options;
2145
2145
  return t && (o = {
2146
2146
  ...this._options,
2147
- getOptions: Nt(this._options.getOptions, t)
2148
- }), new Xr(e, Ne(i.sheet), this._workbook, o);
2147
+ getOptions: Et(this._options.getOptions, t)
2148
+ }), new Qr(e, xe(i.sheet), this._workbook, o);
2149
2149
  }
2150
2150
  async select(e) {
2151
2151
  const t = [];
@@ -2171,15 +2171,15 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2171
2171
  }
2172
2172
  getAddress(e) {
2173
2173
  const t = this._internal.getSheet(), s = t.getEntireRange().getCoords();
2174
- return ut(this.getCoords(), {
2174
+ return P(this.getCoords(), {
2175
2175
  ...s,
2176
2176
  scope: t.getName()
2177
- }, _e, mt, e);
2177
+ }, we, Ke, e);
2178
2178
  }
2179
2179
  toString() {
2180
2180
  return this.getAddress();
2181
2181
  }
2182
- }, Xr = class e extends N {
2182
+ }, Qr = class e extends R {
2183
2183
  constructor(e, t, s, r) {
2184
2184
  super(e, t, r), this._workbook = s;
2185
2185
  }
@@ -2187,7 +2187,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2187
2187
  let s = this._options;
2188
2188
  return t && (s = {
2189
2189
  ...this._options,
2190
- getOptions: Nt(this._options?.getOptions, t)
2190
+ getOptions: Et(this._options?.getOptions, t)
2191
2191
  }), new Zr(e, this._internal, this._workbook, s);
2192
2192
  }
2193
2193
  _createRange(t, s) {
@@ -2197,7 +2197,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2197
2197
  let i = this._options;
2198
2198
  return s && (i = {
2199
2199
  ...this._options,
2200
- getOptions: Nt(this._options?.getOptions, s)
2200
+ getOptions: Et(this._options?.getOptions, s)
2201
2201
  }), new e(t, this._internal, this._workbook, i);
2202
2202
  }
2203
2203
  addListener(e, t) {
@@ -2210,7 +2210,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2210
2210
  }
2211
2211
  getAddress(e) {
2212
2212
  const t = this._internal.getSheet(), s = t?.getEntireRange().getCoords() ?? null;
2213
- return _e(this.getCoords(), {
2213
+ return we(this.getCoords(), {
2214
2214
  ...s,
2215
2215
  scope: t.getName()
2216
2216
  });
@@ -2218,15 +2218,15 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2218
2218
  toString() {
2219
2219
  return this.getAddress();
2220
2220
  }
2221
- }, Yr = (e) => !!e && "object" == typeof e && "function" == typeof e.getOrigin, Qr = class {
2221
+ }, Yr = (e) => !!e && "object" == typeof e && "function" == typeof e.getOrigin, ei = class {
2222
2222
  constructor(t) {
2223
- this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new be(() => {
2223
+ this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new se(() => {
2224
2224
  const e = [];
2225
- for (const t of this.getWorksheets().getItems({ visibility: St.Visibility.VeryHidden })) e.push(...t.getPivotTables());
2225
+ for (const t of this.getWorksheets().getItems({ visibility: Ae.Visibility.VeryHidden })) e.push(...t.getPivotTables());
2226
2226
  return e;
2227
- }, (e, t) => this.doBatch(e, t)), this._people = new pr(), this._commentCollection = new g(null, (e, t, s) => {
2227
+ }, (e, t) => this.doBatch(e, t)), this._people = new wr(), this._commentCollection = new u(null, (e, t, s) => {
2228
2228
  const r = [];
2229
- for (const i of this.getWorksheets().getItems({ visibility: St.Visibility.VeryHidden })) r.push(...i.getComments().getItems(e ? {
2229
+ for (const i of this.getWorksheets().getItems({ visibility: Ae.Visibility.VeryHidden })) r.push(...i.getComments().getItems(e ? {
2230
2230
  address: e,
2231
2231
  ignoreHidden: t,
2232
2232
  fullyContained: s
@@ -2237,25 +2237,25 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2237
2237
  return r;
2238
2238
  }, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
2239
2239
  e.onCollectionChange(this._commentCollection);
2240
- } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._hiddenPivotFieldList = !1, this._documentProperties = new Wr(() => {
2241
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2240
+ } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._hiddenPivotFieldList = !1, this._documentProperties = new Mr(() => {
2241
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2242
2242
  }), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
2243
2243
  const s = "string" == typeof t ? { origin: t } : { ...t }, r = s.origin;
2244
- this._ownOriginProvider = !Yr(r), this._originProvider = Yr(r) ? r : new Ds("string" == typeof r ? new Fs(null, { name: r }) : r ?? new Fs(null)), delete s.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2244
+ this._ownOriginProvider = !Yr(r), this._originProvider = Yr(r) ? r : new js("string" == typeof r ? new Bs(null, { name: r }) : r ?? new Bs(null)), delete s.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2245
2245
  const o = s.json;
2246
- delete s.json, this._transactions = s.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new e(this, this._transactions), this._runtime = s.runtime ?? new it("Workbook Runtime", {
2246
+ delete s.json, this._transactions = s.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new e(this, this._transactions), this._runtime = s.runtime ?? new mt("Workbook Runtime", {
2247
2247
  isDate1904: () => this._isDate1904,
2248
2248
  getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
2249
- getLocale: () => this._locale ?? Ue() ?? ft(),
2249
+ getLocale: () => this._locale ?? Oe() ?? Ge(),
2250
2250
  getLocaleOverrides: () => this._localeOverrides
2251
- }), this._listenerLanguage = ps.addChangeListener(() => {
2251
+ }), this._listenerLanguage = ws.addChangeListener(() => {
2252
2252
  this._closed || this._notifyAllChange();
2253
2253
  });
2254
- const n = this, a = this._beginCommit({ description: Os(o ? "op.openWorkbook" : "op.newWorkbook") });
2254
+ const n = this, a = this._beginCommit({ description: xs(o ? "op.openWorkbook" : "op.newWorkbook") });
2255
2255
  try {
2256
- this._strings = s.strings ?? new ie(), this._ownStrings = !s.strings, this._richValues = s.richData ?? new dt(), this._resources = s.resources ?? new k(), this._ownResources = !s.resources, this._fetch = new Rr(this._resources, s.fetcher ?? new Cr()), this._createSheetName = s.createSheetNameCallback ?? Jr;
2256
+ this._strings = s.strings ?? new b(), this._ownStrings = !s.strings, this._richValues = s.richData ?? new F(), this._resources = s.resources ?? new _(), this._ownResources = !s.resources, this._fetch = new Nr(this._resources, s.fetcher ?? new vr()), this._createSheetName = s.createSheetNameCallback ?? qr;
2257
2257
  let e = s.createWorksheetCallback;
2258
- e || (e = (e) => new se(e)), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, s, r, i, o, a, l) => {
2258
+ e || (e = (e) => new he(e)), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, s, r, i, o, a, l) => {
2259
2259
  let h = null;
2260
2260
  const c = {
2261
2261
  runtime: n._runtime,
@@ -2276,7 +2276,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2276
2276
  h = e, n._addSheetRef({
2277
2277
  name: s,
2278
2278
  id: t,
2279
- visibility: r ?? St.Visibility.Visible,
2279
+ visibility: r ?? Ae.Visibility.Visible,
2280
2280
  sheetId: o,
2281
2281
  sheet: e
2282
2282
  }, i);
@@ -2293,7 +2293,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2293
2293
  },
2294
2294
  getVisibility: () => {
2295
2295
  const e = n._getSheetRef(h);
2296
- return e ? e.visibility : St.Visibility.Visible;
2296
+ return e ? e.visibility : Ae.Visibility.Visible;
2297
2297
  },
2298
2298
  setVisibility: (e, t) => {
2299
2299
  n._setSheetVisibility(h, e, t);
@@ -2304,10 +2304,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2304
2304
  duplicate: () => n._duplicateSheet(h),
2305
2305
  getIndex: () => {
2306
2306
  const e = n._getSheetRef(h);
2307
- return e ? n._getOffsetForId(e.id, n._getSheetRefs(St.Visibility.VeryHidden)) : i;
2307
+ return e ? n._getOffsetForId(e.id, n._getSheetRefs(Ae.Visibility.VeryHidden)) : i;
2308
2308
  },
2309
2309
  setIndex: (e, t) => {
2310
- const s = n._getSheetRef(h, St.Visibility.VeryHidden);
2310
+ const s = n._getSheetRef(h, Ae.Visibility.VeryHidden);
2311
2311
  return !!s && (n._moveSheet(s, e, t), !0);
2312
2312
  },
2313
2313
  setIndexCallback: (e) => {
@@ -2317,16 +2317,16 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2317
2317
  }
2318
2318
  };
2319
2319
  return a && (c.json = a), void 0 !== l && (c.uid = () => l), h = e(c, s, i, r), h;
2320
- }, this._namedTableSource = new _({
2321
- getSheets: () => n._sheets ? n.getWorksheets().getItems({ visibility: St.Visibility.VeryHidden }) : fs.EmptyArray,
2320
+ }, this._namedTableSource = new Ot({
2321
+ getSheets: () => n._sheets ? n.getWorksheets().getItems({ visibility: Ae.Visibility.VeryHidden }) : _s.EmptyArray,
2322
2322
  addSheetsListener: (e, t) => n.addListeners({ onSheetsChange: e }, t)
2323
- }), this._names = s.names ?? new O({
2323
+ }), this._names = s.names ?? new B({
2324
2324
  addressToRanges: (e) => n.getRanges(e),
2325
2325
  getCurrentScope: () => n.getSelectedWorksheet()?.getName() ?? null,
2326
2326
  isReadOnly: () => (n._options.readonly ?? !1) || n._isStructureProtected(),
2327
2327
  transactions: n._transactions,
2328
- getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] : fs.EmptyArray
2329
- }), this._ownNames = !s.names, this._calculation = s.calculation ?? new $({
2328
+ getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] : _s.EmptyArray
2329
+ }), this._ownNames = !s.names, this._calculation = s.calculation ?? new q({
2330
2330
  runtime: n._runtime,
2331
2331
  functions: s.functions,
2332
2332
  json: o?.calc,
@@ -2345,19 +2345,19 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2345
2345
  getSheetIndex: (e) => {
2346
2346
  if (void 0 === e) {
2347
2347
  const e = n.getSelectedSheet();
2348
- return e ? this._getSheetRefs(St.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2348
+ return e ? this._getSheetRefs(Ae.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2349
2349
  }
2350
- const t = this._getSheetRefs(St.Visibility.VeryHidden);
2350
+ const t = this._getSheetRefs(Ae.Visibility.VeryHidden);
2351
2351
  e = e.toLowerCase();
2352
2352
  const s = t.length;
2353
2353
  for (let r = 0; r < s; r++) if (t[r].name.toLowerCase() === e) return r;
2354
2354
  try {
2355
- ei.address = e;
2356
- const t = this._names.getItems(ei);
2355
+ ti.address = e;
2356
+ const t = this._names.getItems(ti);
2357
2357
  if (!t || 0 === t.length) return -1;
2358
2358
  let s = (t[0].getRanges?.()?.getCoords()?.[0])?.scope;
2359
2359
  if (!s) return -1;
2360
- const r = this._getSheetRefs(St.Visibility.VeryHidden);
2360
+ const r = this._getSheetRefs(Ae.Visibility.VeryHidden);
2361
2361
  s = s.toLowerCase();
2362
2362
  const i = r.length;
2363
2363
  for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === s) return e;
@@ -2366,7 +2366,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2366
2366
  }
2367
2367
  return -1;
2368
2368
  },
2369
- getSheetCount: () => n._getSheetRefs(St.Visibility.VeryHidden).length,
2369
+ getSheetCount: () => n._getSheetRefs(Ae.Visibility.VeryHidden).length,
2370
2370
  externalBooks: o?.externalBooks,
2371
2371
  externalBookResolver: s.externalBookResolver,
2372
2372
  namedCollection: n._names,
@@ -2390,7 +2390,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2390
2390
  const s = i[t], r = new Array(a);
2391
2391
  for (let t = 0; t < a; t++) {
2392
2392
  const i = s[t];
2393
- r[t] = void 0 === i || "" === i ? null : kt(e, i).value;
2393
+ r[t] = void 0 === i || "" === i ? null : Ct(e, i).value;
2394
2394
  }
2395
2395
  l[t] = r;
2396
2396
  }
@@ -2400,9 +2400,9 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2400
2400
  transactions: n._transactions,
2401
2401
  names: o?.names
2402
2402
  }), this._ownCalculation = !s.calculation, this._scripts = this._createScripts(o?.modules), this._ownNames = !s.names, this._options = Object.freeze({ ...s });
2403
- const t = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + fs.uuidV4()), i = (e) => {
2403
+ const t = o?.sheets?.length ? o.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + _s.uuidV4()), i = (e) => {
2404
2404
  const t = o?.sheets?.[e]?.kind;
2405
- return !!t && t !== St.Kind.Worksheet;
2405
+ return !!t && t !== Ae.Kind.Worksheet;
2406
2406
  };
2407
2407
  this._calculation._setSheets(t.map((e, t) => i(t) ? [
2408
2408
  r[t],
@@ -2422,10 +2422,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2422
2422
  h = !0, this._starting = null;
2423
2423
  }
2424
2424
  })();
2425
- h || (this._starting = c), this._starting?.catch(() => {}), o ? this._fromJSON(o, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new zr((e) => n._addSheetOptions(e), (e, t) => {
2425
+ h || (this._starting = c), this._starting?.catch(() => {}), o ? this._fromJSON(o, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new Ur((e) => n._addSheetOptions(e), (e, t) => {
2426
2426
  if (e) {
2427
2427
  const s = this._getSheetRef(e, t);
2428
- return s && ti(s) ? [s.sheet] : fs.EmptyArray;
2428
+ return s && si(s) ? [s.sheet] : _s.EmptyArray;
2429
2429
  }
2430
2430
  return this._getWorksheets(t);
2431
2431
  }, (e, t) => {
@@ -2448,13 +2448,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2448
2448
  let e = this._getSheetRefs();
2449
2449
  for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
2450
2450
  const t = this._options;
2451
- this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new At().getDefaultTheme(), this._styles = t?.styles ?? new Ke(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Ar()), this._listenerProtection?.(), this._protection = new Pr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2451
+ this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new c().getDefaultTheme(), this._styles = t?.styles ?? new U(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new Tr()), this._listenerProtection?.(), this._protection = new Fr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2452
2452
  s._emitter.notify("onProtectionChange");
2453
2453
  } });
2454
2454
  const s = this;
2455
2455
  this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
2456
2456
  async onAfterStateChange(e, t, r, i, o) {
2457
- const n = s._view, a = o?.[Gr], l = r ? a?.before : a?.after, h = a?.viewId === n.getId() && null != l, c = h ? l : n.getActiveSheetId(), u = h && t.getId() === s._lastTransactionUUID ? s._getSheetRef({ id: c }) : null;
2457
+ const n = s._view, a = o?.[Xr], l = r ? a?.before : a?.after, h = a?.viewId === n.getId() && null != l, c = h ? l : n.getActiveSheetId(), u = h && t.getId() === s._lastTransactionUUID ? s._getSheetRef({ id: c }) : null;
2458
2458
  u ? await u.sheet.select() : s._resyncActiveSheet(c, e), s._lastTransactionUUID = t.getId(), (r || i) && s._emitter.notify("onSheetsChange"), s._emitter.notify("onSelectedSheetChange"), s._emitter.notify("onViewChange");
2459
2459
  },
2460
2460
  onRestoreOrRevert() {
@@ -2510,8 +2510,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2510
2510
  return this._view;
2511
2511
  }
2512
2512
  setView(e) {
2513
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2514
- if (!e) throw new ws(xs("error.sheet.emptyView"));
2513
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2514
+ if (!e) throw new ys(Es("error.sheet.emptyView"));
2515
2515
  this._listenerWorkbookView?.();
2516
2516
  const t = this;
2517
2517
  let s = -1;
@@ -2524,7 +2524,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2524
2524
  return this._runtime;
2525
2525
  }
2526
2526
  setDate1904(e) {
2527
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2527
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2528
2528
  return this._isDate1904 === e || (this._isDate1904 = e, this._emitter.notify("onRegionalChange")), this;
2529
2529
  }
2530
2530
  getLocale() {
@@ -2534,11 +2534,11 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2534
2534
  return this._locale;
2535
2535
  }
2536
2536
  setLocale(e) {
2537
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2537
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2538
2538
  if (e) try {
2539
2539
  new Intl.Locale(e);
2540
2540
  } catch {
2541
- throw new Error(xs("error.workbook.invalidLocale", { locale: e }));
2541
+ throw new Error(Es("error.workbook.invalidLocale", { locale: e }));
2542
2542
  }
2543
2543
  return this._locale === e || (this._locale = e, this._emitter.notify("onRegionalChange")), this;
2544
2544
  }
@@ -2546,7 +2546,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2546
2546
  return this._localeOverrides;
2547
2547
  }
2548
2548
  setLocaleOverrides(e) {
2549
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2549
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2550
2550
  const t = e && Object.keys(e).length > 0 ? e : null;
2551
2551
  return this._localeOverrides = t, this._emitter.notify("onRegionalChange"), this;
2552
2552
  }
@@ -2566,10 +2566,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2566
2566
  return this._transactions;
2567
2567
  }
2568
2568
  getChanges(e) {
2569
- const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility: St.Visibility.VeryHidden });
2569
+ const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility: Ae.Visibility.VeryHidden });
2570
2570
  for (let e = 0; e < o.length; e++) {
2571
2571
  const t = o[e];
2572
- t instanceof se && i.push(...t._changeEventsOf(s, r ?? null));
2572
+ t instanceof he && i.push(...t._changeEventsOf(s, r ?? null));
2573
2573
  }
2574
2574
  return i;
2575
2575
  }
@@ -2583,7 +2583,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2583
2583
  return this._updateLinks;
2584
2584
  }
2585
2585
  setUpdateLinks(e) {
2586
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2586
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2587
2587
  return this._updateLinks = e, this;
2588
2588
  }
2589
2589
  getPivotTables() {
@@ -2599,8 +2599,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2599
2599
  return this._theme;
2600
2600
  }
2601
2601
  setTheme(e) {
2602
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2603
- if (!e) throw new ws(xs("error.workbook.notSetValue"));
2602
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2603
+ if (!e) throw new ys(Es("error.workbook.notSetValue"));
2604
2604
  const t = this._theme;
2605
2605
  return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
2606
2606
  }
@@ -2613,7 +2613,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2613
2613
  }
2614
2614
  getSelectedWorksheet() {
2615
2615
  const e = this._getSheetRef(this.getSelectedSheetIndex());
2616
- return e && ti(e) ? e.sheet : null;
2616
+ return e && si(e) ? e.sheet : null;
2617
2617
  }
2618
2618
  getActiveSheet() {
2619
2619
  return this.getSelectedWorksheet();
@@ -2622,30 +2622,30 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2622
2622
  return this.getSelectedWorksheet();
2623
2623
  }
2624
2624
  getSheets(e) {
2625
- const t = this._getSheetRefs(e?.visibility ?? St.Visibility.Visible), s = new Array(t.length);
2625
+ const t = this._getSheetRefs(e?.visibility ?? Ae.Visibility.Visible), s = new Array(t.length);
2626
2626
  for (let e = 0; e < t.length; e++) s[e] = t[e].sheet;
2627
2627
  return s;
2628
2628
  }
2629
2629
  getSheet(e) {
2630
2630
  if (void 0 === e) return this.getSelectedSheet();
2631
- if (!e) throw new Error(xs("error.workbook.sheetNameNotProvided"));
2631
+ if (!e) throw new Error(Es("error.workbook.sheetNameNotProvided"));
2632
2632
  const t = this._getSheetRef(e);
2633
- if (!t) throw new vs(Dr(e));
2633
+ if (!t) throw new Is(jr(e));
2634
2634
  return t.sheet;
2635
2635
  }
2636
- getWorksheet(e, t = St.Visibility.Visible) {
2636
+ getWorksheet(e, t = Ae.Visibility.Visible) {
2637
2637
  if ("number" == typeof e) return this.getWorksheetAt(e, t);
2638
2638
  if (void 0 === e) return this._requireSelectedWorksheet();
2639
- if (!e) throw new Error(xs("error.workbook.sheetNameNotProvided"));
2639
+ if (!e) throw new Error(Es("error.workbook.sheetNameNotProvided"));
2640
2640
  const s = this._getSheetRef(e, t);
2641
- if (!s) throw new vs(Dr(e));
2642
- if (!ti(s)) throw new vs(jr(s.name, s.sheet.getKind()));
2641
+ if (!s) throw new Is(jr(e));
2642
+ if (!si(s)) throw new Is(Hr(s.name, s.sheet.getKind()));
2643
2643
  return s.sheet;
2644
2644
  }
2645
- getWorksheetAt(e, t = St.Visibility.Visible) {
2645
+ getWorksheetAt(e, t = Ae.Visibility.Visible) {
2646
2646
  const s = this._getWorksheets(t)[e];
2647
- if (!s) throw new vs(function(e) {
2648
- return xs("error.workbook.sheetIndexNotFound", { index: e });
2647
+ if (!s) throw new Is(function(e) {
2648
+ return Es("error.workbook.sheetIndexNotFound", { index: e });
2649
2649
  }(e));
2650
2650
  return s;
2651
2651
  }
@@ -2653,10 +2653,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2653
2653
  const e = this.getSelectedWorksheet();
2654
2654
  if (e) return e;
2655
2655
  const t = this.getSelectedSheet();
2656
- throw new ws(Hr(t?.getName() ?? "", t?.getKind() ?? St.Kind.Worksheet));
2656
+ throw new ys(zr(t?.getName() ?? "", t?.getKind() ?? Ae.Kind.Worksheet));
2657
2657
  }
2658
2658
  _anchorWorksheet() {
2659
- return this.getSelectedWorksheet() || (this._getWorksheets(St.Visibility.VeryHidden)[0] ?? null);
2659
+ return this.getSelectedWorksheet() || (this._getWorksheets(Ae.Visibility.VeryHidden)[0] ?? null);
2660
2660
  }
2661
2661
  getWorksheets() {
2662
2662
  return this._sheets;
@@ -2664,35 +2664,35 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2664
2664
  addWorksheet(e) {
2665
2665
  return this.getWorksheets().add(e);
2666
2666
  }
2667
- _getWorksheets(e = St.Visibility.Visible) {
2667
+ _getWorksheets(e = Ae.Visibility.Visible) {
2668
2668
  const t = this._getSheetRefs(e), s = [], r = t.length;
2669
2669
  for (let e = 0; e < r; e++) {
2670
2670
  const r = t[e];
2671
- ti(r) && s.push(r.sheet);
2671
+ si(r) && s.push(r.sheet);
2672
2672
  }
2673
2673
  return s;
2674
2674
  }
2675
- _getSheetRefs(e = St.Visibility.Visible) {
2675
+ _getSheetRefs(e = Ae.Visibility.Visible) {
2676
2676
  const t = this._getState();
2677
- return t ? e === St.Visibility.Visible ? t.sheetRefsVisible : e === St.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === St.Visibility.VeryHidden ? t.sheetRefsAll : fs.EmptyArray : [];
2677
+ return t ? e === Ae.Visibility.Visible ? t.sheetRefsVisible : e === Ae.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === Ae.Visibility.VeryHidden ? t.sheetRefsAll : _s.EmptyArray : [];
2678
2678
  }
2679
- _getSheetRef(e, t = St.Visibility.Visible) {
2679
+ _getSheetRef(e, t = Ae.Visibility.Visible) {
2680
2680
  let s = null;
2681
2681
  return "number" == typeof e ? this._getSheetRefs(t)[e] : ("string" == typeof e ? s = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? s = this._getState().refsByInstance.get(e) : void 0 !== e?.id && (s = this._getState().refsById.get(e.id)), s);
2682
2682
  }
2683
2683
  _validateNewSheetName(e, t = !0) {
2684
2684
  if (null == e) return e;
2685
- if (Kr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new ws(xs("error.workbook.nameTaken"));
2685
+ if (Gr(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new ys(Es("error.workbook.nameTaken"));
2686
2686
  return e.substring(0, 31);
2687
2687
  }
2688
2688
  findValidSheetName(e) {
2689
- e && (e = Kr(e, !0));
2689
+ e && (e = Gr(e, !0));
2690
2690
  try {
2691
2691
  return function(e, t) {
2692
2692
  try {
2693
2693
  if (t(e)) return e;
2694
2694
  } catch (e) {}
2695
- let s, r, i = Ur.exec(e);
2695
+ let s, r, i = Jr.exec(e);
2696
2696
  for (null !== i ? (s = e.substring(0, i.index), r = parseFloat(i[1])) : (s = e + " ", r = 1); r < 256;) {
2697
2697
  r++;
2698
2698
  const e = "(" + r + ")", i = s.substring(0, 31 - e.length) + e;
@@ -2713,19 +2713,19 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2713
2713
  return !this._initializing && !this.getProtection().isStructureAllowed();
2714
2714
  }
2715
2715
  _addSheetOptions(e) {
2716
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2717
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
2716
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2717
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
2718
2718
  let t, s = null;
2719
2719
  t = "string" == typeof e ? { name: e } : "number" == typeof e ? { index: e } : e, t = {
2720
2720
  ...t,
2721
- description: t?.description ?? Os("op.addSheet")
2721
+ description: t?.description ?? xs("op.addSheet")
2722
2722
  };
2723
2723
  const r = this.beginCommit(t);
2724
2724
  try {
2725
2725
  const e = t?.autoSelect ?? !1;
2726
2726
  s = this._addSheet(!0, t.name, t.index ?? null);
2727
2727
  const i = this.getView().getActiveSheetId();
2728
- if (e && this._recordActiveSheet(r, i, this._getSheetRef(s).id), r.commit({ description: xs("op.addSheetNamed", { name: s.getName() }) }), !1 !== e) {
2728
+ if (e && this._recordActiveSheet(r, i, this._getSheetRef(s).id), r.commit({ description: Es("op.addSheetNamed", { name: s.getName() }) }), !1 !== e) {
2729
2729
  const t = "boolean" == typeof e ? void 0 : e;
2730
2730
  s.select(t);
2731
2731
  }
@@ -2737,8 +2737,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2737
2737
  _nextSheetName(e = null) {
2738
2738
  let t = e ? e.toLowerCase() : null;
2739
2739
  const s = this._getState(), r = s.sheetsByLowerCaseName;
2740
- if (e && r.has(t)) throw new ws(function(e) {
2741
- return xs("error.workbook.nameDuplicate", { sheetName: e });
2740
+ if (e && r.has(t)) throw new ys(function(e) {
2741
+ return Es("error.workbook.nameDuplicate", { sheetName: e });
2742
2742
  }(e));
2743
2743
  t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
2744
2744
  let i = s.lastId + 1;
@@ -2750,16 +2750,16 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2750
2750
  }
2751
2751
  _addSheet(e, t = null, s = null, r) {
2752
2752
  t = this._nextSheetName(t);
2753
- const i = this._getState(), o = this._createSheet(i.lastId, t, St.Visibility.Visible, s, void 0, null, r);
2754
- if (!o) throw new ws(xs("error.workbook.sheetNameBlank"));
2753
+ const i = this._getState(), o = this._createSheet(i.lastId, t, Ae.Visibility.Visible, s, void 0, null, r);
2754
+ if (!o) throw new ys(Es("error.workbook.sheetNameBlank"));
2755
2755
  return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), o;
2756
2756
  }
2757
2757
  _createOpaqueSheet(e, t, s, r, i, o, n, a, l) {
2758
2758
  const h = this;
2759
2759
  let c = null;
2760
- return c = new Er({
2760
+ return c = new Lr({
2761
2761
  kind: o,
2762
- id: l ?? t + "-" + fs.uuidV4(),
2762
+ id: l ?? t + "-" + _s.uuidV4(),
2763
2763
  part: n,
2764
2764
  tabColor: a,
2765
2765
  styles: this._styles,
@@ -2770,25 +2770,25 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2770
2770
  setName: (e, t) => {
2771
2771
  h._setSheetName(c, e, t);
2772
2772
  },
2773
- getVisibility: () => h._getSheetRef(c, St.Visibility.VeryHidden)?.visibility ?? St.Visibility.Visible,
2773
+ getVisibility: () => h._getSheetRef(c, Ae.Visibility.VeryHidden)?.visibility ?? Ae.Visibility.Visible,
2774
2774
  setVisibility: (e, t) => {
2775
2775
  h._setSheetVisibility(c, e, t);
2776
2776
  },
2777
2777
  getIndex: () => {
2778
- const e = h._getSheetRef(c, St.Visibility.VeryHidden);
2779
- return e ? h._getOffsetForId(e.id, h._getSheetRefs(St.Visibility.VeryHidden)) : -1;
2778
+ const e = h._getSheetRef(c, Ae.Visibility.VeryHidden);
2779
+ return e ? h._getOffsetForId(e.id, h._getSheetRefs(Ae.Visibility.VeryHidden)) : -1;
2780
2780
  },
2781
2781
  setIndex: (e, t) => {
2782
- const s = h._getSheetRef(c, St.Visibility.VeryHidden);
2782
+ const s = h._getSheetRef(c, Ae.Visibility.VeryHidden);
2783
2783
  s && h._moveSheet(s, e, t);
2784
2784
  },
2785
2785
  requestSelect: () => h._requestSelect(c),
2786
- isAttached: () => !!h._getSheetRef(c, St.Visibility.VeryHidden)
2786
+ isAttached: () => !!h._getSheetRef(c, Ae.Visibility.VeryHidden)
2787
2787
  }
2788
2788
  }), this._sheetOnNameChange.set(e, () => c._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => c._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => c._notify("onIndexChange")), this._addSheetRef({
2789
2789
  name: t,
2790
2790
  id: e,
2791
- visibility: s ?? St.Visibility.Visible,
2791
+ visibility: s ?? Ae.Visibility.Visible,
2792
2792
  sheetId: i,
2793
2793
  sheet: c
2794
2794
  }, r), c;
@@ -2801,10 +2801,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2801
2801
  }), this.getSelectedSheet() === e;
2802
2802
  }
2803
2803
  _updateSheetRefStates(e) {
2804
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2805
- if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
2804
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2805
+ if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
2806
2806
  const t = e, s = [], r = [], i = t.length;
2807
- for (let e = 0; e < i; e++) t[e].visibility === St.Visibility.Visible ? (s.push(t[e]), r.push(t[e])) : t[e].visibility === St.Visibility.Hidden && r.push(t[e]);
2807
+ for (let e = 0; e < i; e++) t[e].visibility === Ae.Visibility.Visible ? (s.push(t[e]), r.push(t[e])) : t[e].visibility === Ae.Visibility.Hidden && r.push(t[e]);
2808
2808
  this._updateState({
2809
2809
  sheetRefsAll: t,
2810
2810
  sheetRefsVisible: s,
@@ -2814,7 +2814,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2814
2814
  _tellSheets() {
2815
2815
  if (this._isLoadingSheets) return;
2816
2816
  const e = this._getState().sheetRefsAll;
2817
- this._calculation._setSheets(e.map((e) => ti(e) ? [e.sheet.getId(), e.name] : [
2817
+ this._calculation._setSheets(e.map((e) => si(e) ? [e.sheet.getId(), e.name] : [
2818
2818
  e.sheet.getId(),
2819
2819
  e.name,
2820
2820
  !0
@@ -2846,9 +2846,9 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2846
2846
  g._validateDeleteSheet(e);
2847
2847
  },
2848
2848
  onDelete(e) {
2849
- let t = g._getSheetRef(e, St.Visibility.VeryHidden);
2849
+ let t = g._getSheetRef(e, Ae.Visibility.VeryHidden);
2850
2850
  if (!t) return;
2851
- const s = g._beginCommit({ description: xs("op.deleteSheet", { name: t.name }) });
2851
+ const s = g._beginCommit({ description: Es("op.deleteSheet", { name: t.name }) });
2852
2852
  try {
2853
2853
  const r = g._getState(), i = r.sheetRefsAll, o = g._getOffsetForId(t.id, i);
2854
2854
  let a = [...i];
@@ -2879,7 +2879,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2879
2879
  throw s.rollback(), e;
2880
2880
  }
2881
2881
  }
2882
- }, { transactional: !0 }), r = ti(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
2882
+ }, { transactional: !0 }), r = si(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
2883
2883
  g.getView().getActiveSheetId() === g._getSheetRef(e)?.id && g._emitter.notify("onSelectionChange", {
2884
2884
  source: g,
2885
2885
  params: e
@@ -2903,7 +2903,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2903
2903
  }
2904
2904
  _recordActiveSheet(e, t, s) {
2905
2905
  const r = this.getView().getId();
2906
- e.setIntent(Gr, (e) => ({
2906
+ e.setIntent(Xr, (e) => ({
2907
2907
  viewId: r,
2908
2908
  before: e?.before ?? t,
2909
2909
  after: s
@@ -2935,27 +2935,27 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2935
2935
  let s = this._view.getActiveSheetId();
2936
2936
  null == s && (this._view.setActiveSheetId(t), s = t);
2937
2937
  let r = e.refsById.get(s);
2938
- r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility === St.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(s, e.sheetRefsVisible));
2938
+ r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility === Ae.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(s, e.sheetRefsVisible));
2939
2939
  }
2940
2940
  _validateDeleteSheet(e) {
2941
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2942
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
2941
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2942
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
2943
2943
  let t = this._getSheetRef(e);
2944
- if (!t) throw new ws(function(e) {
2945
- return xs("error.workbook.deleteKey", { key: e });
2944
+ if (!t) throw new ys(function(e) {
2945
+ return Es("error.workbook.deleteKey", { key: e });
2946
2946
  }(e));
2947
2947
  const s = this._getState().sheetRefsVisible;
2948
- if (1 === s.length && s[0].id === t.id) throw new ws(xs("error.workbook.sheetOne"));
2948
+ if (1 === s.length && s[0].id === t.id) throw new ys(Es("error.workbook.sheetOne"));
2949
2949
  }
2950
2950
  _getOffsetForId(e, t) {
2951
2951
  const s = t.length;
2952
2952
  for (let r = 0; r < s; r++) if (t[r].id === e) return r;
2953
- throw new ws(xs("error.workbook.noVisibleRefs"));
2953
+ throw new ys(Es("error.workbook.noVisibleRefs"));
2954
2954
  }
2955
2955
  find(e) {
2956
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
2956
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
2957
2957
  const t = this._getWorksheets();
2958
- if (0 === t.length) return { next: () => Te };
2958
+ if (0 === t.length) return { next: () => St };
2959
2959
  if (1 === t.length) return t[0].find(e);
2960
2960
  "string" == typeof e && (e = { text: e });
2961
2961
  const s = !e?.reverse;
@@ -2974,7 +2974,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2974
2974
  rowIndex: t[0].rowStart
2975
2975
  };
2976
2976
  }
2977
- const d = _s.createCellComparator(e?.axis, e?.reverse);
2977
+ const d = ps.createCellComparator(e?.axis, e?.reverse);
2978
2978
  delete (e = { ...e }).from;
2979
2979
  const g = () => {
2980
2980
  if (!u && c.done && (a && o === i ? u = !0 : s ? (o++, o > t.length - 1 && (o = 0, a = !0)) : (o--, o < 0 && (o = t.length - 1, a = !0)), r && a && (u = !0), u || l || !a || o !== i || (u = !0), !u)) {
@@ -2984,7 +2984,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2984
2984
  }
2985
2985
  if (!u && a && o === i && (c.done || !l || !c.done && d(c.value.getCoords(), l) >= 0) && (u = !0), u) {
2986
2986
  const e = c;
2987
- return c = Te, e;
2987
+ return c = St, e;
2988
2988
  }
2989
2989
  const g = c;
2990
2990
  return c = h.next(), g;
@@ -2999,8 +2999,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
2999
2999
  let r = 0, i = null;
3000
3000
  const o = "function" == typeof t, n = s?.maxCount ?? Number.MAX_SAFE_INTEGER, a = !s?.maxCount;
3001
3001
  let l = "";
3002
- const h = "string" == typeof t ? bt(t) : null;
3003
- let c = s?.description ?? Os("op.replace");
3002
+ const h = "string" == typeof t ? Te(t) : null;
3003
+ let c = s?.description ?? xs("op.replace");
3004
3004
  const u = this._transactions.beginCommit({ description: c });
3005
3005
  try {
3006
3006
  let c = null, d = null, g = e.next();
@@ -3013,10 +3013,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3013
3013
  const l = o ? t(n) : t;
3014
3014
  void 0 !== l && l !== n && (d.push(n, l), r++, i = n), g = e.next();
3015
3015
  }
3016
- d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ? xs("op.replaceAllWith", { value: h }) : Os("op.replaceAll") : l ? null !== h ? xs("op.replaceAtWith", {
3016
+ d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ? Es("op.replaceAllWith", { value: h }) : xs("op.replaceAll") : l ? null !== h ? Es("op.replaceAtWith", {
3017
3017
  address: l,
3018
3018
  value: h
3019
- }) : xs("op.replaceAt", { address: l }) : null !== h ? xs("op.replaceWith", { value: h }) : Os("op.replace")) });
3019
+ }) : Es("op.replaceAt", { address: l }) : null !== h ? Es("op.replaceWith", { value: h }) : xs("op.replace")) });
3020
3020
  } catch (e) {
3021
3021
  throw u.rollback(), e;
3022
3022
  }
@@ -3037,36 +3037,36 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3037
3037
  const s = this._getSheetRefs(), r = s.length;
3038
3038
  for (let i = 0; i < r; i++) {
3039
3039
  const o = s[(e + i) % r];
3040
- if (!ti(o)) continue;
3040
+ if (!si(o)) continue;
3041
3041
  const n = t.indexOf(o.sheet);
3042
3042
  if (-1 !== n) return n;
3043
3043
  }
3044
3044
  return 0;
3045
3045
  }
3046
3046
  getNextSheet(e) {
3047
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3047
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3048
3048
  const t = this._getSheetRefs();
3049
3049
  return t[this._nextSheetIndex(e, t)]?.sheet ?? null;
3050
3050
  }
3051
3051
  getPreviousSheet(e) {
3052
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3052
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3053
3053
  const t = this._getSheetRefs();
3054
3054
  return t[this._prevSheetIndex(e, t)]?.sheet ?? null;
3055
3055
  }
3056
3056
  async _duplicateSheet(e) {
3057
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3058
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
3057
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3058
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
3059
3059
  const t = this._getSheetRefs(), s = this.getSelectedSheetIndex();
3060
3060
  let r = null;
3061
3061
  if (e) {
3062
- if (r = this._getSheetRef(e), !r) throw new ws(Mr(r));
3062
+ if (r = this._getSheetRef(e), !r) throw new ys(Dr(r));
3063
3063
  } else r = t[s];
3064
3064
  if (!r) return null;
3065
- if (!ti(r)) throw new ws((i = r.name, xs("error.workbook.sheetNotDuplicable", { sheetName: i })));
3065
+ if (!si(r)) throw new ys((i = r.name, Es("error.workbook.sheetNotDuplicable", { sheetName: i })));
3066
3066
  var i;
3067
3067
  const o = r.sheet, n = t.indexOf(r), a = this._strings.beginPersist(), l = this.getResources().beginPersist(), h = this.getStyles().beginPersist(), c = this._richValues.beginPersist();
3068
3068
  let u = null;
3069
- const d = this.beginCommit(xs("op.duplicateNamed", { name: o.getName() }));
3069
+ const d = this.beginCommit(Es("op.duplicateNamed", { name: o.getName() }));
3070
3070
  try {
3071
3071
  const e = this._getState().refsByInstance.get(o), s = await o.toJSON(), r = t.length + 1, i = this.findValidSheetName(e.name), a = this._createSheet(r, i, e.visibility, n, void 0, s);
3072
3072
  this._tellSheets(), this._emitter.notify("onSheetsChange"), u = a, d.commit();
@@ -3078,77 +3078,77 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3078
3078
  return u;
3079
3079
  }
3080
3080
  _createRange(e, t) {
3081
- const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope, St.Visibility.VeryHidden) : null;
3082
- if (r && !ti(r)) throw new ws(jr(r.name, r.sheet.getKind()));
3081
+ const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope, Ae.Visibility.VeryHidden) : null;
3082
+ if (r && !si(r)) throw new ys(Hr(r.name, r.sheet.getKind()));
3083
3083
  if (!r) {
3084
3084
  const e = this._anchorWorksheet();
3085
- return e ? (delete s?.scope, qr(s, s ? {
3086
- scope: le,
3085
+ return e ? (delete s?.scope, Kr(s, s ? {
3086
+ scope: x,
3087
3087
  ...e.getEntireRange().getCoords()
3088
- } : null)) : void console.warn(xs("error.workbook.noVisibleRefs"));
3088
+ } : null)) : void console.warn(Es("error.workbook.noVisibleRefs"));
3089
3089
  }
3090
3090
  const i = r.sheet;
3091
3091
  let o = null;
3092
- return t && (o = { getOptions: t }), new Xr(e, Ne(i), this, o);
3092
+ return t && (o = { getOptions: t }), new Qr(e, xe(i), this, o);
3093
3093
  }
3094
3094
  _createRanges(e, t) {
3095
3095
  const s = this._anchorWorksheet();
3096
- if (!s) throw new ws(Hr("", St.Kind.Worksheet));
3096
+ if (!s) throw new ys(zr("", Ae.Kind.Worksheet));
3097
3097
  let r = null;
3098
- return t && (r = { getOptions: t }), new Zr(e, Ne(s), this, r);
3098
+ return t && (r = { getOptions: t }), new Zr(e, xe(s), this, r);
3099
3099
  }
3100
3100
  getRange(e, t) {
3101
3101
  if (void 0 === e) return this.getSelectedRange(t);
3102
- "number" == typeof e && (e = ye(arguments), t = void 0);
3102
+ "number" == typeof e && (e = ee(arguments), t = void 0);
3103
3103
  try {
3104
3104
  const s = this._rangesAddressToCoords(e);
3105
- if (1 !== s.length) throw new ws(xs("error.address.singleRangeOnlyAlt"));
3105
+ if (1 !== s.length) throw new ys(Es("error.address.singleRangeOnlyAlt"));
3106
3106
  return this._createRange(s[0], t);
3107
3107
  } catch (t) {
3108
- if (t instanceof vs) throw new vs(t.message);
3109
- throw new ws(t.message ?? J(e));
3108
+ if (t instanceof Is) throw new Is(t.message);
3109
+ throw new ys(t.message ?? tt(e));
3110
3110
  }
3111
3111
  }
3112
3112
  getCell(e) {
3113
3113
  if (void 0 === e) return this.getSelectedCell();
3114
3114
  const t = this.getRange(e);
3115
- if (t.size > 1) throw new ws(xs("error.address.singleCellOnly"));
3115
+ if (t.size > 1) throw new ys(Es("error.address.singleCellOnly"));
3116
3116
  return t.getCell();
3117
3117
  }
3118
3118
  getRanges(e, t) {
3119
3119
  const s = this._rangesAddressToCoords(e);
3120
- if (0 === s.length) throw new ws(J(e));
3120
+ if (0 === s.length) throw new ys(tt(e));
3121
3121
  return this._createRanges(s, t);
3122
3122
  }
3123
3123
  _createGraphRanges(e, t) {
3124
3124
  const s = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
3125
3125
  for (let e = 0; e < t.length; e++) {
3126
- const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName, St.Visibility.VeryHidden) : null, n = o && ti(o) ? o.sheet : this._anchorWorksheet();
3127
- n && s.push(new G(i, r, Ne(n), null));
3126
+ const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName, Ae.Visibility.VeryHidden) : null, n = o && si(o) ? o.sheet : this._anchorWorksheet();
3127
+ n && s.push(new Y(i, r, xe(n), null));
3128
3128
  }
3129
3129
  for (let t = 0; t < e.length; t++) s.push(e[t]);
3130
3130
  const i = this._anchorWorksheet();
3131
- return 0 !== s.length && i ? new Zr(s, Ne(i), this, null) : null;
3131
+ return 0 !== s.length && i ? new Zr(s, xe(i), this, null) : null;
3132
3132
  }
3133
3133
  getAnomalies(e) {
3134
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3135
- const t = W(e), s = this._getWorksheets(St.Visibility.VeryHidden).map((e) => {
3136
- const t = Ne(e);
3134
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3135
+ const t = j(e), s = this._getWorksheets(Ae.Visibility.VeryHidden).map((e) => {
3136
+ const t = xe(e);
3137
3137
  return {
3138
3138
  bounds: t.getSheet().getEntireCoords(),
3139
3139
  internal: t,
3140
3140
  qualified: !0
3141
3141
  };
3142
3142
  });
3143
- return new T(s, () => (this.getSelectedWorksheet() ?? this._getWorksheets(St.Visibility.VeryHidden)[0]).getEntireRange(), t);
3143
+ return new T(s, () => (this.getSelectedWorksheet() ?? this._getWorksheets(Ae.Visibility.VeryHidden)[0]).getEntireRange(), t);
3144
3144
  }
3145
3145
  getStats(e) {
3146
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3147
- const t = this._getWorksheets(St.Visibility.VeryHidden), s = t.length;
3146
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3147
+ const t = this._getWorksheets(Ae.Visibility.VeryHidden), s = t.length;
3148
3148
  if (1 === s) return t[0].getStats(e);
3149
3149
  const r = new Array(s);
3150
3150
  for (let i = 0; i < s; i++) r[i] = t[i].getStats(e);
3151
- return new ur(r);
3151
+ return new dr(r);
3152
3152
  }
3153
3153
  _activeRangeCoords() {
3154
3154
  const e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), s = e.getName(), r = t.length, i = new Array(r);
@@ -3173,8 +3173,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3173
3173
  getSelectedCell() {
3174
3174
  return this._requireSelectedWorksheet().getSelectedCell();
3175
3175
  }
3176
- _rangesAddressToCoords(e, t = !0, s = St.Visibility.Hidden) {
3177
- if (!e) throw new ws(xs("error.address.noAddress"));
3176
+ _rangesAddressToCoords(e, t = !0, s = Ae.Visibility.Hidden) {
3177
+ if (!e) throw new ys(Es("error.address.noAddress"));
3178
3178
  const r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
3179
3179
  if (o && (i.scope = o), "string" == typeof e) {
3180
3180
  const t = e.trim().toLowerCase();
@@ -3183,11 +3183,11 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3183
3183
  "r" === t ? r.rowStart = r.rowEnd = s.rowIndex : r.colStart = r.colEnd = s.colIndex, e = r;
3184
3184
  }
3185
3185
  }
3186
- const n = this, a = Le(e, i, Ie, (e) => {
3186
+ const n = this, a = wt(e, i, ht, (e) => {
3187
3187
  if (!t) return null;
3188
3188
  if ("string" == typeof e) {
3189
- const t = M(e, {
3190
- getTable: (e) => Je(n.getNames().getByName(e)),
3189
+ const t = H(e, {
3190
+ getTable: (e) => Xe(n.getNames().getByName(e)),
3191
3191
  getAnchor: () => r ? {
3192
3192
  sheet: r,
3193
3193
  coords: r.getSelectedCell().getCoords()
@@ -3197,16 +3197,16 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3197
3197
  const s = n.getNames().getByName(e)?.getRanges?.();
3198
3198
  if (s) return s.getCoords();
3199
3199
  }
3200
- throw new ws(`Invalid sheet reference '${e}'.`);
3200
+ throw new ys(`Invalid sheet reference '${e}'.`);
3201
3201
  }), l = a.length;
3202
3202
  for (let e = 0; e < l; e++) this._validateCoords(a[e], s);
3203
3203
  return a;
3204
3204
  }
3205
- _validateCoords(e, t = St.Visibility.Visible, s = xs("error.sheet.oobRange")) {
3205
+ _validateCoords(e, t = Ae.Visibility.Visible, s = Es("error.sheet.oobRange")) {
3206
3206
  if (null === e) return;
3207
3207
  const r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
3208
- if (!_s.isRangeWithinRange(e, r)) throw new vs(s);
3209
- if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new ws(xs("error.address.invalidRangeInverted"));
3208
+ if (!ps.isRangeWithinRange(e, r)) throw new Is(s);
3209
+ if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new ys(Es("error.address.invalidRangeInverted"));
3210
3210
  }
3211
3211
  _updateSheetRef(e, t) {
3212
3212
  const s = this._getState();
@@ -3228,18 +3228,18 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3228
3228
  }), this._tellSheets(), t;
3229
3229
  }
3230
3230
  _setSheetName(e, t, s) {
3231
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3232
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
3231
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3232
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
3233
3233
  const r = this._getSheetRef(e);
3234
- if (!r) throw new ws(Mr(e));
3234
+ if (!r) throw new ys(Dr(e));
3235
3235
  if (t === r.name) return r.sheet;
3236
- if (null == (t = this._validateNewSheetName(t))) throw new ws(xs("error.workbook.sheetNameNotProvided"));
3236
+ if (null == (t = this._validateNewSheetName(t))) throw new ys(Es("error.workbook.sheetNameNotProvided"));
3237
3237
  const i = Object.freeze({
3238
3238
  ...r,
3239
3239
  name: t
3240
3240
  });
3241
3241
  let o = null;
3242
- const n = this.beginCommit(Os("op.renameSheet"));
3242
+ const n = this.beginCommit(xs("op.renameSheet"));
3243
3243
  try {
3244
3244
  const e = this._updateSheetRef(r, i);
3245
3245
  this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
@@ -3250,24 +3250,24 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3250
3250
  }
3251
3251
  return o;
3252
3252
  }
3253
- _setSheetVisibility(e, t = St.Visibility.Visible, s) {
3254
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3255
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
3256
- const r = this._getSheetRef(e, St.Visibility.VeryHidden);
3253
+ _setSheetVisibility(e, t = Ae.Visibility.Visible, s) {
3254
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3255
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
3256
+ const r = this._getSheetRef(e, Ae.Visibility.VeryHidden);
3257
3257
  if (!r) return null;
3258
3258
  if (t === r.visibility) return;
3259
3259
  let i = null, o = "";
3260
- t === St.Visibility.Visible ? o = Os("op.unhideSheet") : t === St.Visibility.Hidden ? o = Os("op.hideSheet") : t === St.Visibility.VeryHidden && (o = Os("op.veryHideSheet"));
3260
+ t === Ae.Visibility.Visible ? o = xs("op.unhideSheet") : t === Ae.Visibility.Hidden ? o = xs("op.hideSheet") : t === Ae.Visibility.VeryHidden && (o = xs("op.veryHideSheet"));
3261
3261
  const n = this.beginCommit(o);
3262
3262
  try {
3263
3263
  const e = this._getState().sheetRefsVisible;
3264
- if (t !== St.Visibility.Visible && 1 === e.length && e[0].id === r.id) throw new ws(xs("error.workbook.sheetOne"));
3264
+ if (t !== Ae.Visibility.Visible && 1 === e.length && e[0].id === r.id) throw new ys(Es("error.workbook.sheetOne"));
3265
3265
  const o = {
3266
3266
  ...r,
3267
3267
  visibility: t
3268
3268
  };
3269
3269
  let a = -1;
3270
- t !== St.Visibility.Visible && (a = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, o).sheet, t !== St.Visibility.Visible && this._adjustRemoveSelectionIfRequired(a, r.id), this._adjustSheetNamesIfRequired(), n.commit(s);
3270
+ t !== Ae.Visibility.Visible && (a = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, o).sheet, t !== Ae.Visibility.Visible && this._adjustRemoveSelectionIfRequired(a, r.id), this._adjustSheetNamesIfRequired(), n.commit(s);
3271
3271
  } catch (e) {
3272
3272
  throw n.rollback(), e;
3273
3273
  }
@@ -3276,13 +3276,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3276
3276
  }), this._emitter.notify("onSheetsChange"), i;
3277
3277
  }
3278
3278
  _moveSheet(e, t, s) {
3279
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3280
- if (!this.getProtection().isStructureAllowed()) throw new Rs(xs("error.workbook.protection"));
3279
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3280
+ if (!this.getProtection().isStructureAllowed()) throw new Ns(Es("error.workbook.protection"));
3281
3281
  let r = null;
3282
- const i = this.beginCommit(xs("op.moveSheetNamed", { name: e.name }));
3282
+ const i = this.beginCommit(Es("op.moveSheetNamed", { name: e.name }));
3283
3283
  try {
3284
3284
  const o = this._getState(), n = o.sheetRefsVisible;
3285
- if (t < 0 || t > n.length - 1) throw new ws(`Invalid to index: ${t}`);
3285
+ if (t < 0 || t > n.length - 1) throw new ys(`Invalid to index: ${t}`);
3286
3286
  const a = this.getView().getActiveSheetId(), l = o.sheetRefsAll, h = this._getOffsetForId(e.id, l), c = this._getOffsetForId(n[t].id, l);
3287
3287
  if (h === c) return;
3288
3288
  const u = l[h];
@@ -3296,11 +3296,11 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3296
3296
  return r;
3297
3297
  }
3298
3298
  _setSelectedSheet(e) {
3299
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3299
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3300
3300
  const t = this._getSheetRef(e);
3301
- if (!t) throw new ws(Mr(e));
3301
+ if (!t) throw new ys(Dr(e));
3302
3302
  let s = null;
3303
- return t.visibility !== St.Visibility.Visible && this._setSheetVisibility(t, St.Visibility.Visible), this._view.setActiveSheetId(t.id), s = t.sheet, s;
3303
+ return t.visibility !== Ae.Visibility.Visible && this._setSheetVisibility(t, Ae.Visibility.Visible), this._view.setActiveSheetId(t.id), s = t.sheet, s;
3304
3304
  }
3305
3305
  getProtection() {
3306
3306
  return this._protection;
@@ -3318,7 +3318,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3318
3318
  return this._calculation;
3319
3319
  }
3320
3320
  getFonts() {
3321
- return re.getShared();
3321
+ return S.getShared();
3322
3322
  }
3323
3323
  createFormula(e, t, s) {
3324
3324
  return this.getCalculation().createFormula(e, t, s);
@@ -3373,6 +3373,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3373
3373
  return e ? s(e) : null;
3374
3374
  },
3375
3375
  getPreviousAddress: () => t.getPreviousAddress(),
3376
+ getEdits: () => t.getEdits(),
3376
3377
  getTrigger: () => t.getTrigger(),
3377
3378
  isUndo: () => t.isUndo(),
3378
3379
  getCommit: () => t.getCommit(),
@@ -3385,27 +3386,27 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3385
3386
  const e = this._pivotCaches;
3386
3387
  if (0 === e.length) return;
3387
3388
  const t = (e) => {
3388
- const t = this._getSheetRef(e), s = t && ti(t) ? t.sheet : null;
3389
+ const t = this._getSheetRef(e), s = t && si(t) ? t.sheet : null;
3389
3390
  return s ? s._contentAddWatch(() => null) : null;
3390
3391
  }, s = (e) => {
3391
- for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) {
3392
- if (!ti(t)) continue;
3392
+ for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) {
3393
+ if (!si(t)) continue;
3393
3394
  const s = t.sheet;
3394
3395
  if (s.getTables().getByName(e)) return s._contentAddWatch(() => null);
3395
3396
  }
3396
3397
  return null;
3397
3398
  }, r = (e, t) => {
3398
3399
  const s = this._getSheetRef(e);
3399
- return s && ti(s) ? s.sheet.getRange(t) : null;
3400
+ return s && si(s) ? s.sheet.getRange(t) : null;
3400
3401
  }, i = (e) => {
3401
- for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) {
3402
- if (!ti(t)) continue;
3402
+ for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) {
3403
+ if (!si(t)) continue;
3403
3404
  const s = t.sheet.getTables().getByName(e);
3404
3405
  if (s) return s;
3405
3406
  }
3406
3407
  return null;
3407
3408
  }, o = (e, t) => {
3408
- const s = this._pivotSourceNamed(e, t)?.getValue(), i = "string" == typeof s ? p(s) : null;
3409
+ const s = this._pivotSourceNamed(e, t)?.getValue(), i = "string" == typeof s ? f(s) : null;
3409
3410
  return i && /^\$?[A-Za-z]+\$?\d+(?::\$?[A-Za-z]+\$?\d+)?$/.test(i.reference) ? r(i.sheet, i.reference.replaceAll("$", "")) : null;
3410
3411
  };
3411
3412
  for (let n = 0; n < e.length; n++) this._getState().pivotCacheData.has(e[n].cacheId) && (e[n]._hold(t, s), e[n]._watchSource(r, i, o));
@@ -3417,7 +3418,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3417
3418
  this._updateState((s) => ({
3418
3419
  ...s,
3419
3420
  pivotCacheData: new Map(s.pivotCacheData).set(e, t)
3420
- }), Os("op.refreshPivotTable"));
3421
+ }), xs("op.refreshPivotTable"));
3421
3422
  }
3422
3423
  };
3423
3424
  }
@@ -3428,29 +3429,29 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3428
3429
  if (e.isITable) return { name: e.getName() };
3429
3430
  let s = null;
3430
3431
  if ("string" == typeof e) {
3431
- for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) if (ti(t) && t.sheet.getTables().getByName(e)) return { name: e };
3432
+ for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) if (si(t) && t.sheet.getTables().getByName(e)) return { name: e };
3432
3433
  if (this.getNames().getByName(e)) return { name: e };
3433
3434
  if (t.getNames().getByName(e)?.getScope()) return {
3434
3435
  name: e,
3435
3436
  sheet: t.getName()
3436
3437
  };
3437
- const r = p(e), i = r ? this._getSheetRef(r.sheet) : null;
3438
- if (r && (!i || !ti(i))) return null;
3438
+ const r = f(e), i = r ? this._getSheetRef(r.sheet) : null;
3439
+ if (r && (!i || !si(i))) return null;
3439
3440
  try {
3440
3441
  s = r ? i.sheet.getRange(r.reference) : t.getRange(e);
3441
3442
  } catch (e) {
3442
- if (!(e instanceof ws)) throw e;
3443
+ if (!(e instanceof ys)) throw e;
3443
3444
  return null;
3444
3445
  }
3445
3446
  } else s = e.isICellRange ? e : t.getRange(e);
3446
3447
  if (!s || s.isInvalid()) return null;
3447
- const { rowStart: r, colStart: i, rowEnd: n, colEnd: a } = s.getCoords();
3448
+ const { rowStart: r, colStart: i, rowEnd: o, colEnd: n } = s.getCoords();
3448
3449
  return {
3449
- ref: o({
3450
+ ref: Pe({
3450
3451
  rowStart: r,
3451
3452
  colStart: i,
3452
- rowEnd: n,
3453
- colEnd: a
3453
+ rowEnd: o,
3454
+ colEnd: n
3454
3455
  }),
3455
3456
  sheet: s.getWorksheet().getName()
3456
3457
  };
@@ -3471,20 +3472,20 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3471
3472
  partFormats: null,
3472
3473
  source: null
3473
3474
  });
3474
- const r = new fr(t, s);
3475
+ const r = new _r(t, s);
3475
3476
  return this._pivotCaches.push(r), this._holdPivotCaches(), r;
3476
3477
  }
3477
3478
  async _refreshPivotCaches(e, t) {
3478
3479
  const s = [];
3479
- for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) if (ti(t)) for (const r of t.sheet.getPivotTables().getItems()) e.has(r.getCacheId()) && s.push(r);
3480
+ for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) if (si(t)) for (const r of t.sheet.getPivotTables().getItems()) e.has(r.getCacheId()) && s.push(r);
3480
3481
  for (const e of s) e._assertRefreshAllowed();
3481
3482
  for (const r of e) {
3482
3483
  const e = this._getPivotCache(r), i = e ? await this._pivotSourceRangeOf(e._getSource()) : null;
3483
- if (!e || !i) throw new ws(xs("error.pivotTable.refreshSourceUnsupported"));
3484
- if (i.getRowCount() < 2) throw new ws(xs("error.pivotTable.refreshSourceTooSmall"));
3484
+ if (!e || !i) throw new ys(Es("error.pivotTable.refreshSourceUnsupported"));
3485
+ if (i.getRowCount() < 2) throw new ys(Es("error.pivotTable.refreshSourceTooSmall"));
3485
3486
  i.getWorksheet()._cellBuffer?.release();
3486
3487
  const o = e.toJSON();
3487
- if (!o.fields) throw new ws(xs("error.pivotTable.refreshSourceUnsupported"));
3488
+ if (!o.fields) throw new ys(Es("error.pivotTable.refreshSourceUnsupported"));
3488
3489
  const { model: n, remap: a } = t.refreshPivotCache(o, t.readPivotSource(i), e._getSource() ?? void 0, this._isDate1904);
3489
3490
  e._replace(n);
3490
3491
  for (const e of s) e.getCacheId() === r && e._remapCache(a, t);
@@ -3495,13 +3496,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3495
3496
  async _refreshPivotCachesOnLoad() {
3496
3497
  const e = this._pivotCaches.filter((e) => !!e._getData().model?.refreshOnLoad);
3497
3498
  if (0 === e.length) return;
3498
- const t = await wt.load();
3499
+ const t = await at.load();
3499
3500
  for (const s of e) {
3500
3501
  if (this._closed) return;
3501
3502
  try {
3502
3503
  await this._transactions.doBatch(() => this._refreshPivotCaches(/* @__PURE__ */ new Set([s.cacheId]), t));
3503
3504
  } catch (e) {
3504
- if (!(e instanceof ws || e instanceof Rs)) throw e;
3505
+ if (!(e instanceof ys || e instanceof Ns)) throw e;
3505
3506
  }
3506
3507
  }
3507
3508
  }
@@ -3510,11 +3511,11 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3510
3511
  if (e.ref) {
3511
3512
  if (!e.sheet || e.ref.includes("#REF!")) return null;
3512
3513
  const t = this._getSheetRef(e.sheet);
3513
- return t && ti(t) ? t.sheet.getRange(e.ref) : null;
3514
+ return t && si(t) ? t.sheet.getRange(e.ref) : null;
3514
3515
  }
3515
3516
  if (!e.name) return null;
3516
- if (!e.sheet) for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) {
3517
- if (!ti(t)) continue;
3517
+ if (!e.sheet) for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) {
3518
+ if (!si(t)) continue;
3518
3519
  const s = t.sheet.getTables().getByName(e.name);
3519
3520
  if (!s || s.isDeleted()) continue;
3520
3521
  const { rowEnd: r } = s.getDataRange().getCoords();
@@ -3526,22 +3527,22 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3526
3527
  const t = await this._pivotSourceNamed(e.name, e.sheet ?? null)?.evaluate(), s = t?.isIReferenceRange ? t.getCoords() : null;
3527
3528
  if (!s?.scope) return null;
3528
3529
  const r = this._getSheetRef(s.scope);
3529
- return r && ti(r) ? r.sheet.getRange(s) : null;
3530
+ return r && si(r) ? r.sheet.getRange(s) : null;
3530
3531
  }
3531
3532
  _pivotSourceNamed(e, t) {
3532
3533
  if (!t) return this.getNames().getByName(e);
3533
3534
  const s = this._getSheetRef(t);
3534
- if (!s || !ti(s)) return null;
3535
+ if (!s || !si(s)) return null;
3535
3536
  const r = s.sheet.getNames().getByName(e);
3536
3537
  return r?.getScope() ? r : null;
3537
3538
  }
3538
3539
  _holdPivotSlicers() {
3539
3540
  const e = (e, t) => {
3540
3541
  const s = this._getSheetRef(e);
3541
- return (s && ti(s) ? s.sheet : null)?.getPivotTables().getByName(t) ?? null;
3542
+ return (s && si(s) ? s.sheet : null)?.getPivotTables().getByName(t) ?? null;
3542
3543
  };
3543
- for (const t of this._getSheetRefs(St.Visibility.VeryHidden)) {
3544
- if (!ti(t)) continue;
3544
+ for (const t of this._getSheetRefs(Ae.Visibility.VeryHidden)) {
3545
+ if (!si(t)) continue;
3545
3546
  const s = t.sheet.getMovables().getItems();
3546
3547
  for (let t = 0; t < s.length; t++) {
3547
3548
  const r = s[t].getContent();
@@ -3550,8 +3551,8 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3550
3551
  }
3551
3552
  }
3552
3553
  _fromJSON(e, t) {
3553
- if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new ws(xs("error.workbook.sheetOne"));
3554
- e.theme && (this._theme = new Y(e.theme), this._styles.setTheme(this._theme));
3554
+ if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new ys(Es("error.workbook.sheetOne"));
3555
+ e.theme && (this._theme = new Tt(e.theme), this._styles.setTheme(this._theme));
3555
3556
  const s = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), o = this._richValues.beginPersist();
3556
3557
  try {
3557
3558
  s.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), o.fromJSON(e.richData, {
@@ -3564,11 +3565,11 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3564
3565
  const e = r.fromResourceId.bind(r);
3565
3566
  for (let t = 0; t < l.length; t++) {
3566
3567
  const s = l[t];
3567
- s && "number" == typeof s.cacheId && !a.has(s.cacheId) && a.set(s.cacheId, fr.dataOf(s, e));
3568
+ s && "number" == typeof s.cacheId && !a.has(s.cacheId) && a.set(s.cacheId, _r.dataOf(s, e));
3568
3569
  }
3569
3570
  }
3570
3571
  this._updateState({ pivotCacheData: a });
3571
- for (const e of a.keys()) n.push(new fr(e, this._pivotCacheStore(e)));
3572
+ for (const e of a.keys()) n.push(new _r(e, this._pivotCacheStore(e)));
3572
3573
  this._pivotCaches = n, this._people.fromJSON(e.people);
3573
3574
  const h = e.sheets, c = h.length;
3574
3575
  let u = e.view.activeSheetId ?? null;
@@ -3576,13 +3577,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3576
3577
  let d = null, g = null;
3577
3578
  this._isLoadingSheets = !0;
3578
3579
  for (let e = 0; e < c; e++) {
3579
- const s = h[e], i = s.visibility || St.Visibility.Visible, o = e;
3580
- g = o, i === St.Visibility.Visible ? null === d && (d = o) : null !== u && u === o && (u = null);
3580
+ const s = h[e], i = s.visibility || Ae.Visibility.Visible, o = e;
3581
+ g = o, i === Ae.Visibility.Visible ? null === d && (d = o) : null !== u && u === o && (u = null);
3581
3582
  try {
3582
- const n = s.kind ?? St.Kind.Worksheet;
3583
- if (n !== St.Kind.Worksheet) {
3584
- const a = s.sheet, l = nt.fromJSON(a?.part, r.fromResourceId.bind(r));
3585
- if (!l) throw new ws(xs("error.workbook.sheetPartMissing", { sheetName: s.name }));
3583
+ const n = s.kind ?? Ae.Kind.Worksheet;
3584
+ if (n !== Ae.Kind.Worksheet) {
3585
+ const a = s.sheet, l = _t.fromJSON(a?.part, r.fromResourceId.bind(r));
3586
+ if (!l) throw new ys(Es("error.workbook.sheetPartMissing", { sheetName: s.name }));
3586
3587
  this._createOpaqueSheet(o, s.name, i, e, s.sheetId, n, l, a?.tabColor ?? null, t?.[e]);
3587
3588
  } else this._createSheet(o, s.name, i, e, s.sheetId, s.sheet, t?.[e]);
3588
3589
  } catch (e) {
@@ -3590,10 +3591,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3590
3591
  }
3591
3592
  }
3592
3593
  this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._holdPivotSlicers();
3593
- for (const e of this._getSheetRefs(St.Visibility.VeryHidden)) ti(e) && e.sheet._tellPivots();
3594
- this._updateState({ lastId: g }), e.view.activeSheetId = u ?? d, this.setView(new Ar({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3594
+ for (const e of this._getSheetRefs(Ae.Visibility.VeryHidden)) si(e) && e.sheet._tellPivots();
3595
+ this._updateState({ lastId: g }), e.view.activeSheetId = u ?? d, this.setView(new Tr({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3595
3596
  const m = this;
3596
- this._protection = new Pr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3597
+ this._protection = new Fr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3597
3598
  m._emitter.notify("onProtectionChange", { source: e });
3598
3599
  } }), this._emitter.notify("onLoad");
3599
3600
  } finally {
@@ -3602,7 +3603,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3602
3603
  }
3603
3604
  async _startFunctions() {
3604
3605
  const e = this._scripts;
3605
- if (!e) return fs.EmptyArray;
3606
+ if (!e) return _s.EmptyArray;
3606
3607
  await e._load();
3607
3608
  const t = [];
3608
3609
  for (const s of e.getModules().getItems()) this._startModules.add(s), t.push(...s.getFunctions().getItems({
@@ -3613,14 +3614,14 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3613
3614
  }
3614
3615
  _createScripts(e) {
3615
3616
  const t = this;
3616
- return new yr({
3617
+ return new Sr({
3617
3618
  transactions: this._transactions,
3618
3619
  json: e,
3619
3620
  workbook: t,
3620
3621
  getBuiltInFunctions: () => t._calculation?.getFunctions(),
3621
3622
  onAdd: (e, s) => {
3622
3623
  const r = t._calculation;
3623
- r.getStatus() !== tt.Status.Off && r.start().then(async () => {
3624
+ r.getStatus() !== Ue.Status.Off && r.start().then(async () => {
3624
3625
  if (t._startModules.has(s)) return;
3625
3626
  const e = s.getFunctions().getItems({
3626
3627
  type: "formula",
@@ -3631,7 +3632,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3631
3632
  try {
3632
3633
  await this._calculation.getFunctions().add(s);
3633
3634
  } catch (e) {
3634
- ks.error(e?.message ?? String(e), e);
3635
+ Cs.error(e?.message ?? String(e), e);
3635
3636
  }
3636
3637
  }
3637
3638
  }).catch(() => {});
@@ -3640,10 +3641,10 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3640
3641
  });
3641
3642
  }
3642
3643
  async toJSON(e) {
3643
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3644
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3644
3645
  await Promise.resolve(this._starting);
3645
3646
  const t = this.getCalculation();
3646
- t.getStatus() !== tt.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3647
+ t.getStatus() !== Ue.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3647
3648
  const s = { sheets: [] }, r = e?.ignoreStyles ?? !1;
3648
3649
  if (!r) {
3649
3650
  const e = this._theme.toJSON();
@@ -3665,19 +3666,19 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3665
3666
  const o = g[r], n = r + 1;
3666
3667
  let a;
3667
3668
  const h = m.get(o.id);
3668
- if (ti(o)) a = {
3669
+ if (si(o)) a = {
3669
3670
  name: o.name,
3670
3671
  sheet: await o.sheet.toJSON(e)
3671
3672
  };
3672
3673
  else {
3673
- const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part: nt.toJSON(e._getPart(), t) }, r = e.getTabColor();
3674
+ const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part: _t.toJSON(e._getPart(), t) }, r = e.getTabColor();
3674
3675
  r && (s.tabColor = r.toString()), a = {
3675
3676
  name: o.name,
3676
3677
  kind: e.getKind(),
3677
3678
  sheet: s
3678
3679
  };
3679
3680
  }
3680
- void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility === St.Visibility.Visible ? null === u && (u = n) : a.visibility = o.visibility, o.id === t && (i = n), s.sheets.push(a);
3681
+ void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility === Ae.Visibility.Visible ? null === u && (u = n) : a.visibility = o.visibility, o.id === t && (i = n), s.sheets.push(a);
3681
3682
  }
3682
3683
  if (!r) {
3683
3684
  const e = h.toJSON();
@@ -3701,7 +3702,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3701
3702
  if (b.length > 0) {
3702
3703
  const e = l ? l.toResourceId.bind(l) : () => null, t = /* @__PURE__ */ new Set();
3703
3704
  for (const e of this.getPivotTables()) t.add(e.getCacheId());
3704
- const r = Ce(this);
3705
+ const r = It(this);
3705
3706
  for (let e = 0; e < r.length; e++) {
3706
3707
  const s = r[e].toJSON()?.pivot?.cacheId;
3707
3708
  void 0 !== s && t.add(s);
@@ -3740,16 +3741,16 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3740
3741
  } catch (e) {
3741
3742
  console.warn("error on close", e);
3742
3743
  }
3743
- this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof Ds && this._originProvider.release(), this._closed = !0;
3744
+ this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof js && this._originProvider.release(), this._closed = !0;
3744
3745
  }
3745
3746
  beginCommit(e) {
3746
- if (this._closed) throw new Error(xs("error.workbook.modelClosed"));
3747
+ if (this._closed) throw new Error(Es("error.workbook.modelClosed"));
3747
3748
  return this._beginCommit("string" == typeof e ? { description: e } : e);
3748
3749
  }
3749
3750
  doBatch(e, t) {
3750
3751
  const r = this;
3751
3752
  t = "string" == typeof t ? { description: t } : {
3752
- description: Os("op.updateWorkbook"),
3753
+ description: xs("op.updateWorkbook"),
3753
3754
  ...t
3754
3755
  };
3755
3756
  const i = s.bind(this._transactions, this, e);
@@ -3769,7 +3770,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3769
3770
  _getState() {
3770
3771
  return this._transactions.getState(this._id);
3771
3772
  }
3772
- _updateState(e, t = Os("op.updateWorkbook"), s) {
3773
+ _updateState(e, t = xs("op.updateWorkbook"), s) {
3773
3774
  if (!e) return;
3774
3775
  const r = this._beginCommit(t);
3775
3776
  try {
@@ -3790,7 +3791,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3790
3791
  get isIWorkbook() {
3791
3792
  return !0;
3792
3793
  }
3793
- }, ei = { address: null }, ti = (e) => e.sheet.getKind() === St.Kind.Worksheet, si = class {
3794
+ }, ti = { address: null }, si = (e) => e.sheet.getKind() === Ae.Kind.Worksheet, ri = class {
3794
3795
  constructor() {
3795
3796
  this._readFormats = [], this._writeFormats = [], this._encryptions = [];
3796
3797
  }
@@ -3867,9 +3868,9 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3867
3868
  return !0;
3868
3869
  });
3869
3870
  }
3870
- }, ri = /* @__PURE__ */ new WeakMap(), ii = (e) => !!e && "object" == typeof e && "function" == typeof e.getPath && "function" == typeof e.canWrite, oi = class {
3871
+ }, ii = /* @__PURE__ */ new WeakMap(), oi = (e) => !!e && "object" == typeof e && "function" == typeof e.getPath && "function" == typeof e.canWrite, ni = class {
3871
3872
  constructor() {
3872
- this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new si(), this._defaultStore = new Hs(() => this.getWriteFormats(), () => this.getReadFormats());
3873
+ this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new ri(), this._defaultStore = new zs(() => this.getWriteFormats(), () => this.getReadFormats());
3873
3874
  }
3874
3875
  getBackingStore() {
3875
3876
  return this._backingStore ?? this._defaultStore;
@@ -3904,15 +3905,15 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3904
3905
  return this._registry.getWriteFormats(e);
3905
3906
  }
3906
3907
  getOrigin(e) {
3907
- return new Fs(e);
3908
+ return new Bs(e);
3908
3909
  }
3909
3910
  async read(e) {
3910
3911
  let t = null;
3911
3912
  if ("string" == typeof e) e = { source: e };
3912
- else if (ii(e)) {
3913
+ else if (oi(e)) {
3913
3914
  const s = e.getPath();
3914
3915
  if (!s) throw new Error("Cannot read from an unbound origin (no path).");
3915
- Ms(e) ? e = {
3916
+ Ds(e) ? e = {
3916
3917
  source: s,
3917
3918
  asCopy: !0
3918
3919
  } : (t = e, e = { source: s });
@@ -3928,21 +3929,21 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3928
3929
  const i = t.format, o = t.ext;
3929
3930
  if (!i && !o) throw new Error("Either format or file extension must be provided to determine read type.");
3930
3931
  const n = (await this._registry.getReadFormats(i ? { search: i } : { ext: o }))[0];
3931
- if (!n) throw new ws(xs("error.io.readFormatUnavailable", { format: i ?? o }));
3932
+ if (!n) throw new ys(Es("error.io.readFormatUnavailable", { format: i ?? o }));
3932
3933
  const a = s?.typedCreateWorkbookOptions, l = a ? Object.keys(a).find((e) => e.toLowerCase() === n.key.toLowerCase()) : void 0;
3933
3934
  let h = {
3934
3935
  ...s,
3935
3936
  ...void 0 !== l ? a[l] : void 0
3936
3937
  };
3937
3938
  delete h.typedCreateWorkbookOptions, delete h.source, delete h.asCopy;
3938
- const c = r ?? new Fs(t.absolutePath ?? null, {
3939
+ const c = r ?? new Bs(t.absolutePath ?? null, {
3939
3940
  name: t.name ?? null,
3940
3941
  format: n.key,
3941
3942
  size: t.size ?? null,
3942
3943
  lastModified: t.lastModified ?? null,
3943
3944
  canWrite: t.canWrite ?? !1
3944
3945
  });
3945
- r instanceof Fs && r.update({
3946
+ r instanceof Bs && r.update({
3946
3947
  format: n.key,
3947
3948
  size: t.size ?? null,
3948
3949
  lastModified: t.lastModified ?? null
@@ -3976,7 +3977,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3976
3977
  }
3977
3978
  async _decrypt(e, t, s) {
3978
3979
  const r = await this._registry.detectEncryption(e);
3979
- if (t instanceof Fs && t.update({ encryption: r ? r.key : null }), !r) return {
3980
+ if (t instanceof Bs && t.update({ encryption: r ? r.key : null }), !r) return {
3980
3981
  bytes: e,
3981
3982
  password: null
3982
3983
  };
@@ -3985,7 +3986,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3985
3986
  try {
3986
3987
  return i = await r.decode(e, t), !0;
3987
3988
  } catch (e) {
3988
- if (!(e instanceof Ss)) throw e;
3989
+ if (!(e instanceof bs)) throw e;
3989
3990
  return !1;
3990
3991
  }
3991
3992
  };
@@ -3995,7 +3996,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
3995
3996
  };
3996
3997
  if (!s?.onPassword) {
3997
3998
  const e = t.getName();
3998
- throw new Is(e ? xs("error.io.passwordRequired", { name: e }) : xs("error.io.passwordRequiredUnnamed"));
3999
+ throw new Rs(e ? Es("error.io.passwordRequired", { name: e }) : Es("error.io.passwordRequiredUnnamed"));
3999
4000
  }
4000
4001
  const n = await Promise.resolve(s.onPassword({
4001
4002
  origin: t,
@@ -4011,16 +4012,16 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4011
4012
  bytes: i,
4012
4013
  password: n
4013
4014
  };
4014
- throw new Ss(xs("error.io.passwordIncorrect"));
4015
+ throw new bs(Es("error.io.passwordIncorrect"));
4015
4016
  }
4016
4017
  async writeArrayBuffer(e, t) {
4017
4018
  if (!t?.format) throw new Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
4018
4019
  const s = (await this._registry.getWriteFormats({ search: t.format }))[0];
4019
- if (!s) throw new ws(xs("error.io.writeFormatUnavailable", { format: t.format }));
4020
+ if (!s) throw new ys(Es("error.io.writeFormatUnavailable", { format: t.format }));
4020
4021
  return this._writeArrayBuffer(e, s, t);
4021
4022
  }
4022
4023
  async write(e, t, s) {
4023
- return "string" == typeof t || ii(t) ? this._write(e, t, !1, s) : this._write(e, e?.getOrigin?.(), !0, t ?? s);
4024
+ return "string" == typeof t || oi(t) ? this._write(e, t, !1, s) : this._write(e, e?.getOrigin?.(), !0, t ?? s);
4024
4025
  }
4025
4026
  async writeAs(e, t, s) {
4026
4027
  if (!t) throw new Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
@@ -4032,13 +4033,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4032
4033
  let i = "string" == typeof t ? this.getOrigin(t) : t;
4033
4034
  const o = i.getFormat();
4034
4035
  let n;
4035
- if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new ws(xs("error.io.writeFormatUnresolved"));
4036
+ if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new ys(Es("error.io.writeFormatUnresolved"));
4036
4037
  const a = i.getExtension();
4037
4038
  if (r?.format && a && i.getPath() && i.canWrite() && !n.exts.includes(a)) {
4038
4039
  const e = (await this._registry.getWriteFormats({ ext: a }))[0];
4039
4040
  if (e && e.key !== n.key) {
4040
4041
  const e = i.getPath().split(/[/\\]/).pop();
4041
- throw new ws(xs("error.io.writeFormatMismatch", {
4042
+ throw new ys(Es("error.io.writeFormatMismatch", {
4042
4043
  format: r.format,
4043
4044
  file: e
4044
4045
  }));
@@ -4046,17 +4047,17 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4046
4047
  }
4047
4048
  if ("string" == typeof t) {
4048
4049
  const e = i.getPath();
4049
- i = new Fs(Be(e) ? e : `${e}.${n.exts[0]}`, { format: n.key });
4050
+ i = new Bs(dt(e) ? e : `${e}.${n.exts[0]}`, { format: n.key });
4050
4051
  }
4051
- const l = i.getEncryption(), h = e.getOrigin?.(), c = (i instanceof Fs ? i.getPassword() : null) ?? (h instanceof Fs ? h.getPassword() : null), u = i.isEncrypted() || (h?.isEncrypted() ?? !1), d = void 0 !== r?.password ? r.password : c ?? (u ? void 0 : null);
4052
+ const l = i.getEncryption(), h = e.getOrigin?.(), c = (i instanceof Bs ? i.getPassword() : null) ?? (h instanceof Bs ? h.getPassword() : null), u = i.isEncrypted() || (h?.isEncrypted() ?? !1), d = void 0 !== r?.password ? r.password : c ?? (u ? void 0 : null);
4052
4053
  let g = null;
4053
4054
  if (void 0 === d) {
4054
4055
  if (u) {
4055
4056
  const e = i.getName();
4056
- throw new Is(e ? xs("error.io.passwordRequiredSave", { name: e }) : xs("error.io.passwordRequiredSaveUnnamed"));
4057
+ throw new Rs(e ? Es("error.io.passwordRequiredSave", { name: e }) : Es("error.io.passwordRequiredSaveUnnamed"));
4057
4058
  }
4058
- } else if (null !== d && (g = await this._registry.getEncryption(l), !g)) throw new ws(xs("error.io.encryptionUnavailable"));
4059
- const m = `${i.getName() ?? xs("workbook.defaultName")}.${n.exts[0]}`, f = r?.progress, _ = !i.getPath() || !i.canWrite() || !!r?.prompt;
4059
+ } else if (null !== d && (g = await this._registry.getEncryption(l), !g)) throw new ys(Es("error.io.encryptionUnavailable"));
4060
+ const m = `${i.getName() ?? Es("workbook.defaultName")}.${n.exts[0]}`, f = r?.progress, _ = !i.getPath() || !i.canWrite() || !!r?.prompt;
4060
4061
  let p = !1;
4061
4062
  const w = this;
4062
4063
  let y = null, S = [];
@@ -4085,7 +4086,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4085
4086
  }))(f, h), u = await w._writeArrayBuffer(e, l, {
4086
4087
  ...r,
4087
4088
  progress: c
4088
- }), m = ri.get(a);
4089
+ }), m = ii.get(a);
4089
4090
  if (h.some((e) => !m?.has(e.message)) && r?.onWarnings) {
4090
4091
  const t = await Promise.resolve(r.onWarnings({
4091
4092
  workbook: e,
@@ -4104,12 +4105,12 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4104
4105
  const t = this.getBackingStore();
4105
4106
  if (!t.write) throw new Error("The active backing store is read-only (no write implementation).");
4106
4107
  if (k = await t.write(b), k) {
4107
- if (void 0 !== d && k instanceof Fs && (k.setPassword(d), k.update({ encryption: g ? g.key : null })), S.length) {
4108
- const e = ri.get(k) ?? /* @__PURE__ */ new Set();
4108
+ if (void 0 !== d && k instanceof Bs && (k.setPassword(d), k.update({ encryption: g ? g.key : null })), S.length) {
4109
+ const e = ii.get(k) ?? /* @__PURE__ */ new Set();
4109
4110
  for (const t of S) e.add(t.message);
4110
- ri.set(k, e);
4111
+ ii.set(k, e);
4111
4112
  }
4112
- s && k !== e.getOrigin() && Ms(e.getOrigin())?.setOrigin(k);
4113
+ s && k !== e.getOrigin() && Ds(e.getOrigin())?.setOrigin(k);
4113
4114
  const t = y ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
4114
4115
  this._emitter.notify("onWrite", {
4115
4116
  params: {
@@ -4124,13 +4125,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4124
4125
  f?.onComplete && await Promise.resolve(f.onComplete(k));
4125
4126
  } catch (e) {
4126
4127
  const t = e instanceof Error ? e : new Error(String(e));
4127
- if (f?.onError && await Promise.resolve(f.onError(t)), f?.onComplete && await Promise.resolve(f.onComplete(null)), t instanceof ws) throw t;
4128
- throw new Error(xs("error.io.writeFailed", { reason: t.message }), { cause: e });
4128
+ if (f?.onError && await Promise.resolve(f.onError(t)), f?.onComplete && await Promise.resolve(f.onComplete(null)), t instanceof ys) throw t;
4129
+ throw new Error(Es("error.io.writeFailed", { reason: t.message }), { cause: e });
4129
4130
  }
4130
4131
  return k;
4131
4132
  }
4132
4133
  _stripExtension(e) {
4133
- const t = Be(e);
4134
+ const t = dt(e);
4134
4135
  return t ? e.slice(0, e.length - t.length - 1) : e;
4135
4136
  }
4136
4137
  _baseName(e) {
@@ -4142,7 +4143,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4142
4143
  if (!t) throw new Error("A write format must be provided.");
4143
4144
  const r = t.handler;
4144
4145
  if (!r) throw new Error(`Unable to resolve a write handler for '${t.key}'.`);
4145
- return at(t.key) || await Re.assertUsable("exports", 0), r(e, {
4146
+ return pt(t.key) || await ct.assertUsable("exports", 0), r(e, {
4146
4147
  ...s,
4147
4148
  format: t.key
4148
4149
  });
@@ -4150,25 +4151,25 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4150
4151
  async _readArrayBuffer(e, t, s) {
4151
4152
  if (!e) throw new Error("ArrayBuffer must be specified.");
4152
4153
  if (!t) throw new Error("format must be specified.");
4153
- if (0 === e.byteLength) return new Qr(s?.createWorkbookOptions);
4154
+ if (0 === e.byteLength) return new ei(s?.createWorkbookOptions);
4154
4155
  const r = t.handler;
4155
4156
  if (!r) throw new Error(`Unable to resolve a read handler for '${t.key}'.`);
4156
4157
  let i;
4157
4158
  try {
4158
4159
  i = await r(e, s);
4159
4160
  } catch (e) {
4160
- if (e instanceof ws) throw e;
4161
- throw new ws(xs("error.io.readFailed", {
4161
+ if (e instanceof ys) throw e;
4162
+ throw new ys(Es("error.io.readFailed", {
4162
4163
  format: t.description ?? t.key,
4163
4164
  reason: e?.message ?? String(e)
4164
4165
  }), { cause: e });
4165
4166
  }
4166
- return await pe(), i;
4167
+ return await ye(), i;
4167
4168
  }
4168
4169
  get isIWorkbookIO() {
4169
4170
  return !0;
4170
4171
  }
4171
- }, ni = new oi(), ai = class {
4172
+ }, ai = new ni(), li = class {
4172
4173
  constructor() {
4173
4174
  this._buffer = null, this._formatKey = null;
4174
4175
  }
@@ -4182,7 +4183,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4182
4183
  async read(e) {
4183
4184
  return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
4184
4185
  }
4185
- }, li = "locales", hi = "fonts", ci = {
4186
+ }, hi = "locales", ci = "fonts", ui = {
4186
4187
  suffix: ".msg.json",
4187
4188
  async extract(e) {
4188
4189
  const t = e.relPath.split("/");
@@ -4192,7 +4193,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4192
4193
  } : null;
4193
4194
  },
4194
4195
  place: (e, t) => t ? `${t}/${e}` : null
4195
- }, ui = [
4196
+ }, di = [
4196
4197
  ".woff2",
4197
4198
  ".woff",
4198
4199
  ".ttf",
@@ -4202,7 +4203,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4202
4203
  ].map((e) => ({
4203
4204
  suffix: e,
4204
4205
  place: (e, t) => t ? `${t}/${e}` : e
4205
- })), di = {
4206
+ })), gi = {
4206
4207
  suffix: ".metrics.json",
4207
4208
  async extract(e) {
4208
4209
  const t = await e.readJson();
@@ -4213,13 +4214,13 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4213
4214
  } : null;
4214
4215
  },
4215
4216
  place: (e, t) => t ? `${t}/${e}` : e
4216
- }, gi = [{
4217
- kind: li,
4218
- files: [ci]
4219
- }, {
4217
+ }, mi = [{
4220
4218
  kind: hi,
4219
+ files: [ui]
4220
+ }, {
4221
+ kind: ci,
4221
4222
  files: [
4222
- di,
4223
+ gi,
4223
4224
  {
4224
4225
  suffix: ".hinted.json",
4225
4226
  async extract(e) {
@@ -4231,7 +4232,7 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4231
4232
  hinted: !0
4232
4233
  } : null;
4233
4234
  },
4234
- place: di.place
4235
+ place: gi.place
4235
4236
  },
4236
4237
  {
4237
4238
  suffix: ".rows.json",
@@ -4244,25 +4245,25 @@ var Gr = "workbook.activeSheet", Zr = class e extends vt {
4244
4245
  rows: !0
4245
4246
  } : null;
4246
4247
  },
4247
- place: di.place
4248
+ place: gi.place
4248
4249
  },
4249
- ...ui
4250
+ ...di
4250
4251
  ]
4251
4252
  }];
4252
- async function mi(e, t) {
4253
- const { Chart: s } = await import("./fwfAgq8qIADcHmY4.mjs");
4253
+ async function fi(e, t) {
4254
+ const { Chart: s } = await import("./fMFapG4AGMQKX8c5.mjs");
4254
4255
  return new s({
4255
4256
  json: e,
4256
4257
  getStyles: t?.getStyles
4257
4258
  });
4258
4259
  }
4259
- var fi, _i = {
4260
+ var _i, pi = {
4260
4261
  showRowHeaders: !0,
4261
4262
  showColumnHeaders: !0,
4262
4263
  showRowStripes: !1,
4263
4264
  showColumnStripes: !1,
4264
4265
  showLastColumn: !0
4265
- }, pi = class extends _t {
4266
+ }, wi = class extends Le {
4266
4267
  constructor(e, t, s, r) {
4267
4268
  super(e, t?.getProperties() ?? { name: "" }, {
4268
4269
  rowStart: 0,
@@ -4282,12 +4283,12 @@ var fi, _i = {
4282
4283
  _bandOf(e, t, s) {
4283
4284
  return "firstRowSubheading" === s ? `${e}` : "";
4284
4285
  }
4285
- }, wi = (e, t, s, r = 5) => {
4286
- const i = Math.max(3, Math.floor(r)), o = new pi(e, t, s ?? _i, i);
4286
+ }, yi = (e, t, s, r = 5) => {
4287
+ const i = Math.max(3, Math.floor(r)), o = new wi(e, t, s ?? pi, i);
4287
4288
  return {
4288
4289
  rows: i,
4289
4290
  columns: 5,
4290
- getStyleAt: (t, s) => c(void 0, e, o, {
4291
+ getStyleAt: (t, s) => Qe(void 0, e, o, {
4291
4292
  rowStart: t,
4292
4293
  colStart: s,
4293
4294
  rowEnd: t,
@@ -4295,28 +4296,28 @@ var fi, _i = {
4295
4296
  })
4296
4297
  };
4297
4298
  };
4298
- fi || (fi = {});
4299
- var yi = null;
4300
- function Si() {
4301
- if (!yi) {
4302
- const e = import("./CIxb44vA81H9lRip.mjs").then((e) => e.loadScriptingDeclarations());
4299
+ _i || (_i = {});
4300
+ var Si = null;
4301
+ function bi() {
4302
+ if (!Si) {
4303
+ const e = import("./BBC5dL9bXzOrQDGY.mjs").then((e) => e.loadScriptingDeclarations());
4303
4304
  e.catch(() => {
4304
- yi = null;
4305
- }), yi = e;
4305
+ Si = null;
4306
+ }), Si = e;
4306
4307
  }
4307
- return yi;
4308
+ return Si;
4308
4309
  }
4309
- var bi, ki, Ci, vi = null;
4310
- function Ii() {
4311
- if (!vi) {
4312
- const e = import("./CIxb44vA81H9lRip.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
4310
+ var ki, Ci, vi, Ii = null;
4311
+ function Ri() {
4312
+ if (!Ii) {
4313
+ const e = import("./BBC5dL9bXzOrQDGY.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
4313
4314
  e.catch(() => {
4314
- vi = null;
4315
- }), vi = e;
4315
+ Ii = null;
4316
+ }), Ii = e;
4316
4317
  }
4317
- return vi;
4318
+ return Ii;
4318
4319
  }
4319
- bi || (bi = {}), (ki || (ki = {})).Type = {
4320
+ ki || (ki = {}), (Ci || (Ci = {})).Type = {
4320
4321
  Button: "button",
4321
4322
  CheckBox: "checkBox",
4322
4323
  OptionButton: "optionButton",
@@ -4329,12 +4330,12 @@ bi || (bi = {}), (ki || (ki = {})).Type = {
4329
4330
  EditBox: "editBox",
4330
4331
  Dialog: "dialog",
4331
4332
  Unknown: "formControl"
4332
- }, (Ci || (Ci = {})).DropStyle = {
4333
+ }, (vi || (vi = {})).DropStyle = {
4333
4334
  Combo: "combo",
4334
4335
  ComboEdit: "comboEdit",
4335
4336
  Simple: "simple"
4336
4337
  };
4337
- var Ri = class extends rt {
4338
+ var Ni = class extends Je {
4338
4339
  constructor(e) {
4339
4340
  super(e);
4340
4341
  }
@@ -4347,8 +4348,8 @@ var Ri = class extends rt {
4347
4348
  colEnd: (e?.size?.width ?? 5) - 1,
4348
4349
  rowEnd: (e?.size?.height ?? 5) - 1
4349
4350
  },
4350
- getRanges: (e) => new m(null)
4351
+ getRanges: (e) => new d(null)
4351
4352
  }, super._initializeOptions(e);
4352
4353
  }
4353
- }, Ni = "0.8.0-beta.17", Oi = "2026-11-05T20:39:45.590Z";
4354
- export { He as AbstractCollection, r as AbstractMovableContent, x as AddressUtils, ai as ArrayBackingStore, I as AutoFill, Oi as BUILD_DATE, ce as CellControlRegistry, ke as CellImage, Ct as CellImageKind, l as ChartElementSelection, us as ChartKinds, V as CheckboxKind, Qt as Color, Et as Condition, Ee as DateUtils, oi as DefaultWorkbookIO, Rt as EXTERNAL_LINK_PATH_REL_TYPE, xr as ExternalRangeClipboardItem, hi as FONTS_KIND, Cr as Fetcher, Gt as FontUtils, oe as FormulaText, or as FunctionDeclarations, X as GeomUtils, Lt as Hyperlink, Oe as HyperlinkKind, It as IAnchored, Kt as IBorders, tt as ICalculation, me as ICell, sr as ICellHeaderRange, te as ICellRange, tr as ICellRanges, as as ICellStyle, os as IColor, xt as ICondition, de as IConditionalFormat, Vr as ICustomProperty, ae as IDataValidation, Ci as IDropDown, Yt as IEffect, ls as IFill, Pt as IFont, re as IFontCollection, zt as IFontStyle, ki as IFormControl, Ft as IGeometry, bi as IMovable, Ge as IPageLayout, fi as IPicture, he as IPivotTable, er as IResource, f as IRichDataKind, Pe as IScript, ts as IShape, St as ISheet, j as ISlicerStyle, Ps as ISort, ss as IStroke, B as ITable, A as ITableStyle, ht as IText, ns as ITextFrame, Qs as ITheme, d as IThemeCollection, Es as IWorkbookIO, mr as IWorkbookView, Tt as IWorksheetView, li as LOCALES_KIND, Re as LicenseManager, ge as MovableContentRegistry, R as NamedStyleCollection, rs as NumberFormat, cs as PaintUtils, pr as PersonCollection, Or as RangeClipboardItem, zs as RectAlignment, st as Registry, y as Resource, k as ResourceCollection, De as RichArray, We as RichArrayKind, dt as RichDataCollection, lt as RichDataRegistry, et as RichRecord, Ot as RichText, ee as RichTextKind, gi as SHEETXL_RESOURCE_KINDS, es as SYSTEM_COLOR_CSS_PREFIX, Ht as ShapeStyleUtils, w as SimpleFontFace, z as SlicerStyleCollection, Fe as Sort, ie as StringCollection, Ke as StyleCollection, Ri as Table, K as TableStyleCollection, xe as TextRotation, pt as TextStacked, Qe as TextUtils, Y as Theme, At as ThemeCollection, t as TransactionConflictError, Ts as TransactionSaveStateManager, i as TransactionStore, Vs as TransactionUndoManager, fe as Tuple, Ni as VERSION, Qr as Workbook, ni as WorkbookIO, Fs as WorkbookOrigin, Ar as WorkbookView, se as Worksheet, Ys as builtInStyleNameDisplay, b as createCellRangeCounts, mi as createChart, ne as externalBookClosedName, v as externalBookFileName, S as externalBookLocation, q as externalBookOpenName, P as findLabel, ar as getBuiltInFunctionNames, Ze as getLanguagePack, Zt as getLocaleProfile, yt as getScriptRuntime, Ii as getScriptingApi, Si as getScriptingDeclarations, h as localizeBoolean, qe as localizeErrorLabel, is as makeLocaleProfile, we as normalizeLabel, D as parseBooleanLocal, H as parseErrorLocal, Ye as parseExternalScope, lr as parseFormulaLiteral, Z as pivotBoxOf, a as pivotCellFormatsOf, Ae as pivotControlsIn, wi as pivotStylePreviewOf, U as registerSdkLocales, u as sourceEntryFromPath, ot as withScriptRuntime };
4354
+ }, Oi = "0.8.0-beta.18", xi = "2026-11-07T22:09:02.533Z";
4355
+ export { He as AbstractCollection, r as AbstractMovableContent, W as AddressUtils, li as ArrayBackingStore, v as AutoFill, xi as BUILD_DATE, L as CellControlRegistry, vt as CellImage, At as CellImageKind, n as ChartElementSelection, ds as ChartKinds, ge as CheckboxKind, es as Color, le as Condition, We as DateUtils, ni as DefaultWorkbookIO, xt as EXTERNAL_LINK_PATH_REL_TYPE, Er as ExternalRangeClipboardItem, ci as FONTS_KIND, vr as Fetcher, Xt as FontUtils, k as FormulaText, nr as FunctionDeclarations, re as GeomUtils, Ee as Hyperlink, Lt as HyperlinkKind, ce as IAnchored, Gt as IBorders, Ue as ICalculation, Ce as ICell, rr as ICellHeaderRange, m as ICellRange, sr as ICellRanges, ls as ICellStyle, ns as IColor, ae as ICondition, O as IConditionalFormat, Vr as ICustomProperty, _e as IDataValidation, vi as IDropDown, Yt as IEffect, hs as IFill, Ft as IFont, S as IFontCollection, Ut as IFontStyle, Ci as IFormControl, Bt as IGeometry, ki as IMovable, Ye as IPageLayout, _i as IPicture, E as IPivotTable, tr as IResource, Nt as IRichDataKind, bt as IScript, ss as IShape, Ae as ISheet, J as ISlicerStyle, Fs as ISort, fe as ISparklineGroup, rs as IStroke, ie as ITable, D as ITableStyle, ot as IText, as as ITextFrame, er as ITheme, me as IThemeCollection, Ls as IWorkbookIO, fr as IWorkbookView, Pt as IWorksheetView, hi as LOCALES_KIND, ct as LicenseManager, ke as MovableContentRegistry, A as NamedStyleCollection, is as NumberFormat, us as PaintUtils, wr as PersonCollection, xr as RangeClipboardItem, Us as RectAlignment, $e as Registry, G as Resource, _ as ResourceCollection, De as RichArray, ve as RichArrayKind, F as RichDataCollection, it as RichDataRegistry, ze as RichRecord, ne as RichText, g as RichTextKind, mi as SHEETXL_RESOURCE_KINDS, ts as SYSTEM_COLOR_CSS_PREFIX, zt as ShapeStyleUtils, K as SimpleFontFace, Q as SlicerStyleCollection, ut as Sort, b as StringCollection, U as StyleCollection, Ni as Table, I as TableStyleCollection, rt as TextRotation, Ve as TextStacked, kt as TextUtils, Tt as Theme, c as ThemeCollection, t as TransactionConflictError, Ps as TransactionSaveStateManager, i as TransactionStore, Vs as TransactionUndoManager, pe as Tuple, Oi as VERSION, ei as Workbook, ai as WorkbookIO, Bs as WorkbookOrigin, Tr as WorkbookView, he as Worksheet, Ys as builtInStyleNameDisplay, y as createCellRangeCounts, fi as createChart, ue as externalBookClosedName, C as externalBookFileName, w as externalBookLocation, X as externalBookOpenName, be as findLabel, lr as getBuiltInFunctionNames, a as getLanguagePack, Zt as getLocaleProfile, lt as getScriptRuntime, Ri as getScriptingApi, bi as getScriptingDeclarations, Ze as localizeBoolean, z as localizeErrorLabel, os as makeLocaleProfile, Se as normalizeLabel, $ as parseBooleanLocal, Z as parseErrorLocal, st as parseExternalScope, hr as parseFormulaLiteral, o as pivotBoxOf, Fe as pivotCellFormatsOf, yt as pivotControlsIn, yi as pivotStylePreviewOf, et as registerSdkLocales, h as sourceEntryFromPath, ft as withScriptRuntime };