@sheetxl/io-xlsx 0.7.28-beta.3 → 0.7.28-beta.4

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 (38) hide show
  1. package/browser/cjs/Bhq8KfEhCnRykWeS.cjs +1 -0
  2. package/browser/cjs/BmG0GOcbuYvt3-R2.cjs +1 -0
  3. package/browser/cjs/{BZsKjlEe8ttWIao7.cjs → D3YH3tTndeltJsh5.cjs} +1 -1
  4. package/browser/cjs/DK9GutW2zPbyNlfU.cjs +2 -0
  5. package/browser/cjs/Dmi-Tsz618B6vKpZ.cjs +5 -0
  6. package/browser/cjs/index.cjs +1 -1
  7. package/browser/esm/{C0ftqc3PDJkuDjFG.mjs → BXCOn1XvLvYSfpzi.mjs} +2 -2
  8. package/browser/esm/{BwSyMclyk-t3Qsxs.mjs → BcnofzmeeuCVzr_M.mjs} +5 -5
  9. package/browser/esm/{DmzsYgxDBYYWxQWu.mjs → BhohPLTubb_9rfrh.mjs} +2 -2
  10. package/browser/esm/{uIgz_sO2ZTlIJryO.mjs → BknJ4AeVeFJploh9.mjs} +2 -2
  11. package/browser/esm/{DatxS1drpnPiN0bA.mjs → C3sYFBc7Tym8l12A.mjs} +1 -1
  12. package/browser/esm/{9k07cBjQx8ZMNU1r.mjs → C7R1lFA0iv-1bZ9i.mjs} +2 -2
  13. package/browser/esm/{BjKFtNZckTyELfHX.mjs → CV_L3E5OoPstI9lx.mjs} +260 -242
  14. package/browser/esm/{Wg4pN30I3RZmpjIf.mjs → D8qZcXzj_fdusd0Y.mjs} +1460 -1387
  15. package/browser/esm/{DofvhgOWFHBSl9vH.mjs → DLEtaZiz_1cZH0dA.mjs} +743 -681
  16. package/browser/esm/{Da4uZFnis4q5dMxA.mjs → DlBlJGlFQJrKovwJ.mjs} +923 -889
  17. package/browser/esm/index.mjs +2 -2
  18. package/browser/esm/{B1HdC5n0VHTzJXno.mjs → saBnxecsRUpY6fGv.mjs} +1 -1
  19. package/node/esm/{DYH_lfcyj9wTL8Er.mjs → B6lQXVQjFT_OE3IA.mjs} +2 -2
  20. package/node/esm/{CUQy4BVE8DwTALUu.mjs → B9CUp-rqol5K1r1c.mjs} +1 -1
  21. package/node/esm/{f9-SN-lQDdZGt0vO.mjs → BSrW-J3BEH4Tza_S.mjs} +645 -572
  22. package/node/esm/{DWNfn3shRCVhbEOV.mjs → BYCpXFieBgL_cwTO.mjs} +197 -179
  23. package/node/esm/{zldOc2ba5Vlg1s2E.mjs → Bqi4c7-14v0oNgFN.mjs} +1 -1
  24. package/node/esm/{C9wIBQW-fwqlpFJm.mjs → CfIzBnObj09fDuUX.mjs} +2 -2
  25. package/node/esm/{BOF2zpi3fMaBFMe7.mjs → D0frS50CfyeuXcuz.mjs} +741 -677
  26. package/node/esm/{BTiGUmPt1-zNmYTg.mjs → DsZ19z4oXoL-d0Lk.mjs} +989 -949
  27. package/node/esm/index.mjs +5 -5
  28. package/package.json +3 -3
  29. package/types/src/AutoFilterRules.d.ts +62 -0
  30. package/types/src/reader/dom/DOMTransformer.d.ts +10 -0
  31. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +1 -1
  32. package/types/src/reader/sax/SaxVisitor.d.ts +14 -0
  33. package/types/src/writer/emitters/StylesEmitter.d.ts +13 -2
  34. package/types/src/writer/utils/AutoFilter.d.ts +3 -2
  35. package/browser/cjs/5QaWZ2tRVhz1rf3W.cjs +0 -1
  36. package/browser/cjs/Bi-WvoygX7yZzlxU.cjs +0 -5
  37. package/browser/cjs/D-8WoJkvdPf-79sB.cjs +0 -2
  38. package/browser/cjs/sEmMmxaNBSY_o-Zb.cjs +0 -1
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.3
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.4
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
7
  import "./index.mjs";
8
- import { E as e, F as r, I as o, L as n, N as s, T as a, c as l, d as i, g as c, i as d, k as p, m, n as f, s as u, t as h, v as g, w as y, x, y as v } from "./f9-SN-lQDdZGt0vO.mjs";
9
- import { AddressUtils as w, BufferUtils as S, Color as b, CommonUtils as C, CoordUtils as T, FormulaError as k, IColor as M, ICondition as R, IConditionalFormat as I, IEffect as F, IFill as L, ISheet as A, IStroke as P, IStyle as _, ITextFrame as E, LicenseManager as N, NumberFormat as D, ScalarType as O } from "@sheetxl/sdk";
10
- import { BlobWriter as B, TextReader as V, Uint8ArrayReader as $, Uint8ArrayWriter as W, ZipWriter as z } from "@zip.js/zip.js";
11
- var j = class {
8
+ import { A as e, D as r, E as o, F as n, I as s, M as a, O as l, _ as i, a as c, b as d, f as p, g as m, h as f, i as u, k as h, l as g, n as y, s as x, u as v, w as S, z as w } from "./BSrW-J3BEH4Tza_S.mjs";
9
+ import { AddressUtils as b, BufferUtils as C, Color as T, CommonUtils as k, CoordUtils as M, FormulaError as R, IColor as I, ICondition as F, IConditionalFormat as A, IEffect as P, IFill as L, ISheet as _, IStroke as D, IStyle as E, ITextFrame as N, LicenseManager as O, NumberFormat as B, ScalarType as V } from "@sheetxl/sdk";
10
+ import { BlobWriter as $, TextReader as W, Uint8ArrayReader as z, Uint8ArrayWriter as j, ZipWriter as X } from "@zip.js/zip.js";
11
+ var U = class {
12
12
  constructor(t) {
13
13
  this._kind = t.kind, this._contentType = t.contentType, this._relTypeUri = t.relTypeUri, this._path = t.path;
14
14
  }
@@ -24,20 +24,20 @@ var j = class {
24
24
  getPath(t) {
25
25
  return "function" == typeof this._path ? this._path(t) : this._path;
26
26
  }
27
- }, X = class t {
27
+ }, H = class t {
28
28
  constructor(t, e, r) {
29
29
  this.zipWriter = t, this.outputKind = e, this.outWritable = r;
30
30
  }
31
31
  static createUint8Array(e) {
32
- const r = new z(new W(), e);
32
+ const r = new X(new j(), e);
33
33
  return new t(r, "uint8array");
34
34
  }
35
35
  static createBlob(e) {
36
- const r = new z(new B("application/zip"), e);
36
+ const r = new X(new $("application/zip"), e);
37
37
  return new t(r, "blob");
38
38
  }
39
39
  static createWritableStream(e, r) {
40
- const o = new z(e, r);
40
+ const o = new X(e, r);
41
41
  return new t(o, "writable", e);
42
42
  }
43
43
  async add(t, e, r) {
@@ -58,10 +58,10 @@ var j = class {
58
58
  compressionMethod: r?.compressionMethod,
59
59
  signature: r?.signature
60
60
  };
61
- if ("string" == typeof e) return void await this.zipWriter.add(o, new V(e), n);
61
+ if ("string" == typeof e) return void await this.zipWriter.add(o, new W(e), n);
62
62
  if (e instanceof Uint8Array || ArrayBuffer.isView(e) || e && "number" == typeof e.byteLength && "number" == typeof e.byteOffset) {
63
63
  try {
64
- await this.zipWriter.add(o, new $(e), n);
64
+ await this.zipWriter.add(o, new z(e), n);
65
65
  } catch (t) {
66
66
  throw console.log("Error adding Uint8Array source to zip:", o, n), t;
67
67
  }
@@ -89,7 +89,7 @@ var j = class {
89
89
  return "writable" === this.outputKind ? this.outWritable ?? r : r;
90
90
  }
91
91
  };
92
- function U(t) {
92
+ function q(t) {
93
93
  const e = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), r = (t) => e(t).replace(/"/g, "&quot;"), o = (t) => {
94
94
  if (!t) return "";
95
95
  let e = "";
@@ -153,13 +153,13 @@ function U(t) {
153
153
  }
154
154
  };
155
155
  }
156
- function q(t) {
156
+ function G(t) {
157
157
  switch (t.kind) {
158
158
  case "bytes": return t.bytes;
159
159
  case "text": return t.text;
160
160
  case "stream": return t.stream;
161
161
  case "xmlStream": {
162
- const e = [], r = U({ write: (t) => e.push(t) });
162
+ const e = [], r = q({ write: (t) => e.push(t) });
163
163
  return t.writeXml(r), r.close(), function(t) {
164
164
  let e = 0;
165
165
  for (const r of t) e += r.byteLength;
@@ -172,32 +172,32 @@ function q(t) {
172
172
  case "xmlStreamed": return t.write();
173
173
  }
174
174
  }
175
- function H(t) {
176
- const e = G(t);
175
+ function J(t) {
176
+ const e = K(t);
177
177
  if (!e) return "_rels/.rels";
178
178
  const r = e.lastIndexOf("/"), o = r >= 0 ? e.slice(0, r) : "";
179
179
  return `${o ? `${o}/_rels` : "_rels"}/${r >= 0 ? e.slice(r + 1) : e}.rels`;
180
180
  }
181
- function G(t) {
181
+ function K(t) {
182
182
  let e = (t ?? "").replace(/\\/g, "/").trim();
183
183
  for (; e.startsWith("/");) e = e.slice(1);
184
184
  return e;
185
185
  }
186
- function J(t) {
186
+ function Y(t) {
187
187
  const e = /^rId(\d+)$/.exec(t);
188
188
  return e ? parseInt(e[1], 10) : Number.MAX_SAFE_INTEGER;
189
189
  }
190
- function K(t) {
190
+ function Z(t) {
191
191
  return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;").replace(/>/g, "&gt;");
192
192
  }
193
- function Y(t, e, r, o = !1) {
193
+ function Q(t, e, r, o = !1) {
194
194
  let n = e;
195
195
  if (e.startsWith("/")) n = e.slice(1);
196
196
  else {
197
197
  if (!t) throw new Error(`Relative path "${e}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);
198
198
  n = (t.includes("/") ? t.slice(0, t.lastIndexOf("/") + 1) : "") + e;
199
199
  }
200
- if (n = Z(n), !n.includes("{n}")) {
200
+ if (n = tt(n), !n.includes("{n}")) {
201
201
  if (!o && r.has(n)) throw new Error(`Path already existing path: ${n}`);
202
202
  return n;
203
203
  }
@@ -207,7 +207,7 @@ function Y(t, e, r, o = !1) {
207
207
  while (r.has(s));
208
208
  return s;
209
209
  }
210
- function Z(t) {
210
+ function tt(t) {
211
211
  const e = t.split("/"), r = [];
212
212
  for (const o of e) {
213
213
  if ("" === o || "." === o) continue;
@@ -218,7 +218,7 @@ function Z(t) {
218
218
  }
219
219
  return r.join("/");
220
220
  }
221
- function Q(t, e) {
221
+ function et(t, e) {
222
222
  if (!t) return e;
223
223
  const r = t.includes("/") ? t.slice(0, t.lastIndexOf("/")) : "", o = r ? r.split("/") : [], n = e.split("/");
224
224
  let s = 0;
@@ -227,10 +227,10 @@ function Q(t, e) {
227
227
  const l = o.length - s;
228
228
  return "../".repeat(l) + n.slice(s).join("/");
229
229
  }
230
- function tt(t) {
230
+ function rt(t) {
231
231
  return new TextEncoder().encode(t);
232
232
  }
233
- function et(t, e) {
233
+ function ot(t, e) {
234
234
  return function(t, e = " ") {
235
235
  let r = "", o = 0;
236
236
  const n = t.split(/(<[^>]+>)/g).filter(Boolean);
@@ -248,8 +248,8 @@ function et(t, e) {
248
248
  return new TextDecoder("utf-8").decode(t);
249
249
  }(t), e);
250
250
  }
251
- var rt = /&(amp|lt|gt|quot|apos|#x[0-9a-fA-F]+|#[0-9]+);/g;
252
- function ot(t, e) {
251
+ var nt = /&(amp|lt|gt|quot|apos|#x[0-9a-fA-F]+|#[0-9]+);/g;
252
+ function st(t, e) {
253
253
  switch (e) {
254
254
  case "amp": return "&";
255
255
  case "lt": return "<";
@@ -259,31 +259,31 @@ function ot(t, e) {
259
259
  default: return e.startsWith("#x") ? String.fromCodePoint(parseInt(e.slice(2), 16)) : e.startsWith("#") ? String.fromCodePoint(parseInt(e.slice(1), 10)) : t;
260
260
  }
261
261
  }
262
- function nt(t) {
263
- return t.replace(rt, ot);
262
+ function at(t) {
263
+ return t.replace(nt, st);
264
264
  }
265
- function st(t) {
265
+ function lt(t) {
266
266
  const e = {}, r = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*"([^"]*)"/g;
267
267
  let o;
268
- for (; o = r.exec(t);) e[o[1]] = nt(o[2]);
268
+ for (; o = r.exec(t);) e[o[1]] = at(o[2]);
269
269
  return e;
270
270
  }
271
- function at(t, e) {
271
+ function it(t, e) {
272
272
  const r = [], o = new RegExp(`<${e}\\b([^>]*)/?>`, "g");
273
273
  let n;
274
- for (; n = o.exec(t);) r.push(st(n[1]));
274
+ for (; n = o.exec(t);) r.push(lt(n[1]));
275
275
  return r;
276
276
  }
277
- function lt(t) {
278
- return at(new TextDecoder("utf-8").decode(t), "Relationship").filter((t) => t.Type && t.Target).map((t) => ({
277
+ function ct(t) {
278
+ return it(new TextDecoder("utf-8").decode(t), "Relationship").filter((t) => t.Type && t.Target).map((t) => ({
279
279
  type: t.Type,
280
280
  target: t.Target,
281
281
  external: "External" === t.TargetMode
282
282
  }));
283
283
  }
284
- var it = class {
284
+ var dt = class {
285
285
  constructor(t) {
286
- this.rels = [], this.usedIds = /* @__PURE__ */ new Set(), this.nextId = 1, this.sourcePart = G(t);
286
+ this.rels = [], this.usedIds = /* @__PURE__ */ new Set(), this.nextId = 1, this.sourcePart = K(t);
287
287
  }
288
288
  add(t, e, r) {
289
289
  let o = r?.idHint && !this.usedIds.has(r.idHint) ? r.idHint : void 0;
@@ -302,19 +302,19 @@ var it = class {
302
302
  return this.rels;
303
303
  }
304
304
  toXmlBytes() {
305
- const t = [...this.rels].sort((t, e) => J(e.id) - J(t.id) || t.id.localeCompare(e.id)), e = [];
306
- e.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), e.push(`<Relationships xmlns="${ct}">`);
305
+ const t = [...this.rels].sort((t, e) => Y(e.id) - Y(t.id) || t.id.localeCompare(e.id)), e = [];
306
+ e.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), e.push(`<Relationships xmlns="${pt}">`);
307
307
  for (const r of t) {
308
308
  const t = [
309
- `Id="${K(r.id)}"`,
310
- `Type="${K(r.type)}"`,
311
- `Target="${K(r.target)}"`
309
+ `Id="${Z(r.id)}"`,
310
+ `Type="${Z(r.type)}"`,
311
+ `Target="${Z(r.target)}"`
312
312
  ];
313
313
  "External" === r.targetMode && t.push("TargetMode=\"External\""), e.push(`<Relationship ${t.join(" ")}/>`);
314
314
  }
315
- return e.push("</Relationships>"), tt(e.join(""));
315
+ return e.push("</Relationships>"), rt(e.join(""));
316
316
  }
317
- }, ct = "http://schemas.openxmlformats.org/package/2006/relationships", dt = class {
317
+ }, pt = "http://schemas.openxmlformats.org/package/2006/relationships", mt = class {
318
318
  constructor() {
319
319
  this._defaultsSet = /* @__PURE__ */ new Set(), this._overridesSet = /* @__PURE__ */ new Set(), this._defaults = [], this._overrides = [];
320
320
  }
@@ -340,27 +340,27 @@ var it = class {
340
340
  }
341
341
  toXmlBytes() {
342
342
  const t = [];
343
- t.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), t.push(`<Types xmlns="${pt}">`);
343
+ t.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), t.push(`<Types xmlns="${ft}">`);
344
344
  const e = this._defaults.reverse();
345
345
  this.addDefault("rels", "application/vnd.openxmlformats-package.relationships+xml"), this.addDefault("xml", "application/xml");
346
- for (const { key: r, content: o } of e) t.push(`<Default Extension="${K(r)}" ContentType="${K(o)}"/>`);
346
+ for (const { key: r, content: o } of e) t.push(`<Default Extension="${Z(r)}" ContentType="${Z(o)}"/>`);
347
347
  const r = this._overrides;
348
- for (const { key: e, content: o } of r) t.push(`<Override PartName="${K(e)}" ContentType="${K(o)}"/>`);
349
- return t.push("</Types>"), tt(t.join(""));
348
+ for (const { key: e, content: o } of r) t.push(`<Override PartName="${Z(e)}" ContentType="${Z(o)}"/>`);
349
+ return t.push("</Types>"), rt(t.join(""));
350
350
  }
351
- }, pt = "http://schemas.openxmlformats.org/package/2006/content-types", mt = class {
351
+ }, ft = "http://schemas.openxmlformats.org/package/2006/content-types", ut = class {
352
352
  constructor(t) {
353
- this.parts = [], this.relsRoot = new it(""), this.relsByPart = /* @__PURE__ */ new Map(), this.contentTypes = new dt(), this.zip = t;
353
+ this.parts = [], this.relsRoot = new dt(""), this.relsByPart = /* @__PURE__ */ new Map(), this.contentTypes = new mt(), this.zip = t;
354
354
  }
355
355
  addContentType(t, e) {
356
- const r = G(t);
356
+ const r = K(t);
357
357
  this.contentTypes.addOverride("/" + r, e);
358
358
  }
359
359
  addDefaultType(t, e) {
360
360
  this.contentTypes.addDefault(t, e);
361
361
  }
362
362
  addPart(t, e, r, o) {
363
- const n = G(t);
363
+ const n = K(t);
364
364
  this.parts.push({
365
365
  path: n,
366
366
  body: e,
@@ -368,22 +368,22 @@ var it = class {
368
368
  }), r && this.contentTypes.addOverride("/" + n, r);
369
369
  }
370
370
  rels(t) {
371
- const e = G(t || "");
371
+ const e = K(t || "");
372
372
  if (!e) return this.relsRoot;
373
373
  let r = this.relsByPart.get(e);
374
- return r || (r = new it(e), this.relsByPart.set(e, r)), r;
374
+ return r || (r = new dt(e), this.relsByPart.set(e, r)), r;
375
375
  }
376
376
  async emit() {
377
377
  const t = [...this.parts].sort((t, e) => t.path.localeCompare(e.path));
378
378
  for (const e of t) {
379
- const t = q(e.body);
379
+ const t = G(e.body);
380
380
  await this.zip.add(e.path, t, e.optionsZip);
381
381
  }
382
382
  const e = this.relsRoot.toXmlBytes();
383
383
  await this.zip.add("_rels/.rels", e, {});
384
384
  const r = [...this.relsByPart.values()].sort((t, e) => t.sourcePart.localeCompare(e.sourcePart));
385
385
  for (const t of r) {
386
- const e = H(t.sourcePart), r = t.toXmlBytes();
386
+ const e = J(t.sourcePart), r = t.toXmlBytes();
387
387
  await this.zip.add(e, r, {});
388
388
  }
389
389
  const o = this.contentTypes.toXmlBytes();
@@ -392,7 +392,7 @@ var it = class {
392
392
  async build(t) {
393
393
  return await this.emit(), await this.zip.close(t);
394
394
  }
395
- }, ft = /* @__PURE__ */ new Set(["xl/calcChain.xml"]), ut = [
395
+ }, ht = /* @__PURE__ */ new Set(["xl/calcChain.xml"]), gt = [
396
396
  /^xl\/drawings\/vmlDrawing\d+\.vml$/i,
397
397
  /^xl\/ctrlProps\//i,
398
398
  /^xl\/slicers\//i,
@@ -400,23 +400,23 @@ var it = class {
400
400
  /^xl\/pivotCache\//i,
401
401
  /^xl\/pivotTables\//i
402
402
  ];
403
- function ht(t) {
404
- return ut.some((e) => e.test(t));
403
+ function yt(t) {
404
+ return gt.some((e) => e.test(t));
405
405
  }
406
- function gt(t) {
407
- return "[Content_Types].xml" === t || yt.test(t);
408
- }
409
- var yt = /^(?:(.*)\/)?_rels\/(.*)\.rels$/;
410
406
  function xt(t) {
407
+ return "[Content_Types].xml" === t || vt.test(t);
408
+ }
409
+ var vt = /^(?:(.*)\/)?_rels\/(.*)\.rels$/;
410
+ function St(t) {
411
411
  if ("_rels/.rels" === t) return "";
412
- const e = yt.exec(t);
412
+ const e = vt.exec(t);
413
413
  if (!e) return null;
414
414
  const r = e[1] ?? "", o = e[2];
415
415
  return r ? `${r}/${o}` : o;
416
416
  }
417
- var vt = class {
417
+ var wt = class {
418
418
  constructor(t, e, r) {
419
- this._queue = [], this._scheduledByNodeKey = /* @__PURE__ */ new Map(), this._nodesByPath = /* @__PURE__ */ new Map(), this._writtenPaths = /* @__PURE__ */ new Set(), this._explicitRelTargets = /* @__PURE__ */ new Set(), this._partWriter = new mt(t), this._registry = e, this._options = r ?? {}, this._mapState = this._options.mapState ?? /* @__PURE__ */ new Map(), this._sourcePackage = this._options.sourcePackage ?? null;
419
+ this._queue = [], this._scheduledByNodeKey = /* @__PURE__ */ new Map(), this._nodesByPath = /* @__PURE__ */ new Map(), this._writtenPaths = /* @__PURE__ */ new Set(), this._explicitRelTargets = /* @__PURE__ */ new Set(), this._partWriter = new ut(t), this._registry = e, this._options = r ?? {}, this._mapState = this._options.mapState ?? /* @__PURE__ */ new Map(), this._sourcePackage = this._options.sourcePackage ?? null;
420
420
  }
421
421
  async waitEmit() {
422
422
  const t = this._queue;
@@ -432,15 +432,15 @@ var vt = class {
432
432
  const t = this._sourcePackage;
433
433
  if (!t) return;
434
434
  const e = new Set(this._writtenPaths), r = t.hasStructuralChange(), o = [];
435
- for (const n of t.getNames()) e.has(n) || ft.has(n) || gt(n) || r && ht(n) || o.push(n);
435
+ for (const n of t.getNames()) e.has(n) || ht.has(n) || xt(n) || r && yt(n) || o.push(n);
436
436
  const n = new Set(e);
437
437
  for (const t of o) n.add(t);
438
438
  const s = t.getPart("[Content_Types].xml"), a = s ? function(t) {
439
- const e = new TextDecoder("utf-8").decode(t), r = at(e, "Default").map((t) => ({
439
+ const e = new TextDecoder("utf-8").decode(t), r = it(e, "Default").map((t) => ({
440
440
  ext: (t.Extension ?? "").toLowerCase(),
441
441
  contentType: t.ContentType ?? ""
442
442
  })).filter((t) => t.ext && t.contentType), o = /* @__PURE__ */ new Map();
443
- for (const t of at(e, "Override")) t.PartName && t.ContentType && o.set(t.PartName, t.ContentType);
443
+ for (const t of it(e, "Override")) t.PartName && t.ContentType && o.set(t.PartName, t.ContentType);
444
444
  return {
445
445
  defaults: r,
446
446
  overrides: o
@@ -463,19 +463,19 @@ var vt = class {
463
463
  }, o), this._writtenPaths.add(e);
464
464
  }
465
465
  for (const r of t.getNames()) {
466
- if ("[Content_Types].xml" === r || !gt(r)) continue;
467
- const o = xt(r);
466
+ if ("[Content_Types].xml" === r || !xt(r)) continue;
467
+ const o = St(r);
468
468
  null !== o && ("" === o || n.has(o)) && this._mergeSourceRelsInto(o, t.getPart(r).data, e, n);
469
469
  }
470
470
  }
471
471
  _mergeSourceRelsInto(t, e, r, o) {
472
472
  const n = this._partWriter.rels(t), s = t.includes("/") ? t.slice(0, t.lastIndexOf("/")) : "";
473
- for (const a of lt(e)) {
473
+ for (const a of ct(e)) {
474
474
  if (a.external) {
475
475
  n.add(a.type, a.target, { external: !0 });
476
476
  continue;
477
477
  }
478
- const e = Z((s ? s + "/" : "") + a.target);
478
+ const e = tt((s ? s + "/" : "") + a.target);
479
479
  r.has(e) || this._explicitRelTargets.has(`${t}::${e}`) || (o.has(e) ? n.add(a.type, a.target) : console.warn(`Dropping preserved relationship to missing part '${e}'`, t || "(root)"));
480
480
  }
481
481
  }
@@ -487,7 +487,7 @@ var vt = class {
487
487
  if (!n) throw new Error(`No emitter registered for kind '${e}'.`);
488
488
  const s = o ?? n.getPath?.(r);
489
489
  if (!s) throw new Error("No path provided in either argument or emitter.");
490
- const a = this._writtenPaths, l = Y(t, s, a), i = `${e}:${l}`;
490
+ const a = this._writtenPaths, l = Q(t, s, a), i = `${e}:${l}`;
491
491
  let c = this._scheduledByNodeKey.get(i);
492
492
  if (!c) {
493
493
  let t;
@@ -508,7 +508,7 @@ var vt = class {
508
508
  d || (d = /* @__PURE__ */ new Set(), this._nodesByPath.set(t, d)), d.add(i), !n.contentType || n.relTypeUri || t || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", l);
509
509
  let p = null;
510
510
  if (n.relTypeUri) {
511
- const e = Q(t, c.path);
511
+ const e = et(t, c.path);
512
512
  p = this._partWriter.rels(t).add(n.relTypeUri, e);
513
513
  }
514
514
  return a.add(l), {
@@ -523,10 +523,10 @@ var vt = class {
523
523
  _addBinaryInternal(t, e, r, o, n, s = !1) {
524
524
  if (!n) throw new Error("No path provided for binary.");
525
525
  if (!r) throw new Error("No content type provided for binary.");
526
- const a = this._writtenPaths, l = Y(t, n, a, s);
526
+ const a = this._writtenPaths, l = Q(t, n, a, s);
527
527
  let i = null;
528
528
  if (o) {
529
- const e = Q(t, l);
529
+ const e = et(t, l);
530
530
  i = this._partWriter.rels(t).add(o, e);
531
531
  }
532
532
  if (t || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", l), !a.has(l)) {
@@ -553,10 +553,10 @@ var vt = class {
553
553
  if (!a) return null;
554
554
  const l = new Set(this._writtenPaths);
555
555
  for (const t of s.getNames()) l.add(t);
556
- const i = Y(t, n, l), c = this._addBinaryInternal(t, a.data, r, o, "/" + i), d = s.getPart(H(e));
556
+ const i = Q(t, n, l), c = this._addBinaryInternal(t, a.data, r, o, "/" + i), d = s.getPart(J(e));
557
557
  if (d) {
558
558
  const t = this._partWriter.rels(c.path);
559
- for (const e of lt(d.data)) t.add(e.type, e.target, e.external ? { external: !0 } : void 0);
559
+ for (const e of ct(d.data)) t.add(e.type, e.target, e.external ? { external: !0 } : void 0);
560
560
  }
561
561
  return c;
562
562
  }
@@ -584,7 +584,7 @@ var vt = class {
584
584
  } };
585
585
  let s;
586
586
  await e.emit(t.payload, {
587
- getXMLWriter: () => s || (s = U(n), s),
587
+ getXMLWriter: () => s || (s = q(n), s),
588
588
  addPart: (t, e, o) => this._addPartInternal(r, t, e, o),
589
589
  addBinary: (t, e, o, n, s = !1) => this._addBinaryInternal(r, t, e, o, n, s),
590
590
  addExternal: (t, e) => ({
@@ -593,7 +593,7 @@ var vt = class {
593
593
  relId: this._partWriter.rels(r).add(t, e, { external: !0 })
594
594
  }),
595
595
  addPreservedRelationship: (t, e, o) => {
596
- const n = Q(r, e), s = this._partWriter.rels(r).add(t, n, { idHint: o });
596
+ const n = et(r, e), s = this._partWriter.rels(r).add(t, n, { idHint: o });
597
597
  return this._explicitRelTargets.add(`${r}::${e}`), s;
598
598
  },
599
599
  forkPreservedPart: (t, e, o, n) => this._forkPreservedPart(r, t, e, o, n),
@@ -612,7 +612,7 @@ var vt = class {
612
612
  for (const e of t) r.set(e, o), o += e.byteLength;
613
613
  return r;
614
614
  }(o), l = this._options.onPartEmitted;
615
- l && await l(t.kind, t.path, a), wt && (console.log(`\n=== ${t.path} ===`), console.log(et(a))), this._partWriter.addPart(t.path, {
615
+ l && await l(t.kind, t.path, a), bt && (console.log(`\n=== ${t.path} ===`), console.log(ot(a))), this._partWriter.addPart(t.path, {
616
616
  kind: "bytes",
617
617
  bytes: a
618
618
  }, t.contentType);
@@ -622,7 +622,7 @@ var vt = class {
622
622
  this._nodesByPath.delete(t.path), this._scheduledByNodeKey.delete(t.key), t.resolve();
623
623
  }
624
624
  }
625
- }, wt = !1, St = class {
625
+ }, bt = !1, Ct = class {
626
626
  constructor() {
627
627
  this.map = /* @__PURE__ */ new Map();
628
628
  }
@@ -639,10 +639,10 @@ var vt = class {
639
639
  return this.map.has(t);
640
640
  }
641
641
  };
642
- function bt(t, e, r) {
642
+ function Tt(t, e, r) {
643
643
  t && (t.algorithm && (e[r ? `${r}AlgorithmName` : "algorithmName"] = t.algorithm), t.hash && (e[r ? `${r}HashValue` : "hashValue"] = t.hash), t.salt && (e[r ? `${r}SaltValue` : "saltValue"] = t.salt), void 0 !== t.spinCount && (e[r ? `${r}SpinCount` : "spinCount"] = t.spinCount));
644
644
  }
645
- var Ct = class {
645
+ var kt = class {
646
646
  constructor() {
647
647
  this._daprFMBks = [], this._daprFMBkMap = /* @__PURE__ */ new Map(), this._rvFMBks = [], this._rvFMBkMap = /* @__PURE__ */ new Map(), this._valueMeta = [];
648
648
  }
@@ -678,20 +678,20 @@ var Ct = class {
678
678
  getValueMeta() {
679
679
  return this._valueMeta;
680
680
  }
681
- }, Tt = class {
681
+ }, Mt = class {
682
682
  constructor(t, e = console.warn) {
683
683
  this._entries = [], this._keyMap = /* @__PURE__ */ new Map(), this._metaCollector = t, this._onWarn = e;
684
684
  }
685
685
  add(t) {
686
686
  if (null == t) return this._onWarn?.("RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!"), this._registerFallback();
687
- if (k.isError(t)) {
688
- const e = t.getCode(), r = this._register(`_error:${e}`, { errorType: "" + (e - 1) }, kt);
687
+ if (R.isError(t)) {
688
+ const e = t.getCode(), r = this._register(`_error:${e}`, { errorType: "" + (e - 1) }, Rt);
689
689
  return this._metaCollector.registerRichValueCell(r);
690
690
  }
691
691
  return t.isIRichData && t.getType(), this._onWarn?.("RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!", t), this._registerFallback();
692
692
  }
693
693
  _registerFallback() {
694
- const t = this._register("_error:fallback", { errorType: k.Code.Unknown - 1 }, kt);
694
+ const t = this._register("_error:fallback", { errorType: R.Code.Unknown - 1 }, Rt);
695
695
  return this._metaCollector.registerRichValueCell(t);
696
696
  }
697
697
  _register(t, e, r) {
@@ -724,7 +724,7 @@ var Ct = class {
724
724
  }
725
725
  return -1;
726
726
  }
727
- }, kt = new class {
727
+ }, Rt = new class {
728
728
  constructor(t, e) {
729
729
  this.type = t, this.props = e;
730
730
  }
@@ -743,53 +743,58 @@ var Ct = class {
743
743
  "i",
744
744
  "0"
745
745
  ]]);
746
- function Mt(t, e, r, o) {
746
+ var It = {
747
+ auto: "auto",
748
+ automaticExceptTables: "autoNoTable",
749
+ manual: "manual"
750
+ };
751
+ function Ft(t, e, r, o) {
747
752
  if (!r) return;
748
753
  const n = "string" == typeof r ? e.parseColor(r) : r;
749
754
  o && t.start(o);
750
755
  const s = n.getType(), a = n.getVal(), l = n.getAdjustments(), i = l && l.length > 0;
751
756
  switch (s) {
752
757
  case "scheme":
753
- i ? (t.start("schemeClr", { val: a }), Rt(t, l), t.end("schemeClr")) : t.empty("schemeClr", { val: a });
758
+ i ? (t.start("schemeClr", { val: a }), At(t, l), t.end("schemeClr")) : t.empty("schemeClr", { val: a });
754
759
  break;
755
760
  case "named":
756
- if (b.isSystem(a)) {
761
+ if (T.isSystem(a)) {
757
762
  const e = n.getLastColor() ?? n.getBaseColor().toHex().toString(!1).replace("#", "");
758
763
  i ? (t.start("sysClr", {
759
764
  val: a,
760
765
  lastClr: e
761
- }), Rt(t, l), t.end("sysClr")) : t.empty("sysClr", {
766
+ }), At(t, l), t.end("sysClr")) : t.empty("sysClr", {
762
767
  val: a,
763
768
  lastClr: e
764
769
  });
765
- } else i ? (t.start("prstClr", { val: a }), Rt(t, l), t.end("prstClr")) : t.empty("prstClr", { val: a });
770
+ } else i ? (t.start("prstClr", { val: a }), At(t, l), t.end("prstClr")) : t.empty("prstClr", { val: a });
766
771
  break;
767
772
  case "auto": {
768
773
  const e = n.getLastColor() ?? n.getBaseColor().toHex().toString(!1).replace("#", "");
769
774
  i ? (t.start("sysClr", {
770
775
  val: "windowText",
771
776
  lastClr: e
772
- }), Rt(t, l), t.end("sysClr")) : t.empty("sysClr", {
777
+ }), At(t, l), t.end("sysClr")) : t.empty("sysClr", {
773
778
  val: "windowText",
774
779
  lastClr: e
775
780
  });
776
781
  break;
777
782
  }
778
783
  case "index":
779
- i ? (t.start("srgbClr", { val: a }), Rt(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: a });
784
+ i ? (t.start("srgbClr", { val: a }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: a });
780
785
  break;
781
786
  case "hsl":
782
787
  const e = n.toHex().toString();
783
- i ? (t.start("srgbClr", { val: e }), Rt(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: e });
788
+ i ? (t.start("srgbClr", { val: e }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: e });
784
789
  break;
785
790
  case "rgb":
786
791
  case "lrgb":
787
792
  const r = n.toHex().toString();
788
- i ? (t.start("srgbClr", { val: r }), Rt(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: r });
793
+ i ? (t.start("srgbClr", { val: r }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: r });
789
794
  break;
790
795
  case "hex":
791
796
  const o = a.replace("#", "").toUpperCase();
792
- i ? (t.start("srgbClr", { val: o }), Rt(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: o });
797
+ i ? (t.start("srgbClr", { val: o }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: o });
793
798
  break;
794
799
  default:
795
800
  const s = a.replace("#", "").toUpperCase();
@@ -797,7 +802,7 @@ function Mt(t, e, r, o) {
797
802
  }
798
803
  o && t.end(o);
799
804
  }
800
- function Rt(t, e) {
805
+ function At(t, e) {
801
806
  if (e && 0 !== e.length) for (const r of e) for (const [e, o] of Object.entries(r)) {
802
807
  if (null == o) continue;
803
808
  const r = e;
@@ -820,49 +825,49 @@ function Rt(t, e) {
820
825
  }
821
826
  }
822
827
  }
823
- function It(t, e, r, o, n = !1, s = !1) {
828
+ function Pt(t, e, r, o, n = !1, s = !1) {
824
829
  if (!r) return;
825
830
  const a = "string" == typeof r ? e.parseColor(r) : r, l = () => {
826
- t.empty(o, { rgb: Dt(a.toHex().toString(!0)) });
831
+ t.empty(o, { rgb: Vt(a.toHex().toString(!0)) });
827
832
  }, i = a.getAdjustments(), c = i && i.length > 0, d = a.getType();
828
- if (d !== M.Type.Auto) {
829
- if (d === M.Type.Scheme) {
830
- const e = a.getVal(), r = Ft[e] ?? e, n = Pt.get(r);
833
+ if (d !== I.Type.Auto) {
834
+ if (d === I.Type.Scheme) {
835
+ const e = a.getVal(), r = Lt[e] ?? e, n = Et.get(r);
831
836
  if (void 0 === n && "phClr" !== r) return console.warn(`Color scheme not in theme. schemeVal=${e} themeKey=${r}`), l();
832
837
  const s = {};
833
838
  if (s.theme = n, c) {
834
839
  if (!function(t) {
835
840
  for (const e of t) switch (Object.keys(e)[0]) {
836
- case M.AdjustmentType.Tint:
837
- case M.AdjustmentType.ETint:
838
- case M.AdjustmentType.Shade:
839
- case M.AdjustmentType.Lum:
840
- case M.AdjustmentType.LumOff:
841
- case M.AdjustmentType.LumMod:
842
- case M.AdjustmentType.Alpha:
843
- case M.AdjustmentType.AlphaOff:
844
- case M.AdjustmentType.AlphaMod: continue;
841
+ case I.AdjustmentType.Tint:
842
+ case I.AdjustmentType.ETint:
843
+ case I.AdjustmentType.Shade:
844
+ case I.AdjustmentType.Lum:
845
+ case I.AdjustmentType.LumOff:
846
+ case I.AdjustmentType.LumMod:
847
+ case I.AdjustmentType.Alpha:
848
+ case I.AdjustmentType.AlphaOff:
849
+ case I.AdjustmentType.AlphaMod: continue;
845
850
  default: return !1;
846
851
  }
847
852
  return !0;
848
853
  }(i)) return l();
849
- const t = 1 === i.length ? i[0][M.AdjustmentType.ETint] : void 0;
854
+ const t = 1 === i.length ? i[0][I.AdjustmentType.ETint] : void 0;
850
855
  let e;
851
- if (void 0 !== t) e = Et(t);
856
+ if (void 0 !== t) e = Ot(t);
852
857
  else {
853
858
  const t = a.getBaseColor().toHex().toString(!0), r = a.toHex().toString(!0);
854
- e = Et(function(t, e) {
855
- const r = _t(t, 0, 255), o = _t(e, 0, 255);
859
+ e = Ot(function(t, e) {
860
+ const r = Nt(t, 0, 255), o = Nt(e, 0, 255);
856
861
  if (Math.abs(o - r) < 1e-9) return 0;
857
- return o < r ? r <= 1e-9 ? -1 : _t(o / r - 1, -1, 0) : 255 - r <= 1e-9 ? 0 : _t((o - r) / (255 - r), 0, 1);
858
- }(Nt(t), Nt(r)));
862
+ return o < r ? r <= 1e-9 ? -1 : Nt(o / r - 1, -1, 0) : 255 - r <= 1e-9 ? 0 : Nt((o - r) / (255 - r), 0, 1);
863
+ }(Bt(t), Bt(r)));
859
864
  }
860
865
  0 !== e && (s.tint = e);
861
866
  }
862
867
  t.empty(o, s);
863
868
  return;
864
869
  }
865
- if (d === M.Type.Index) {
870
+ if (d === I.Type.Index) {
866
871
  const e = a.getVal(), r = e.substring(5, e.length);
867
872
  t.empty(o, { indexed: Number(r) });
868
873
  return;
@@ -871,7 +876,7 @@ function It(t, e, r, o, n = !1, s = !1) {
871
876
  }
872
877
  t.empty(o, { auto: 1 });
873
878
  }
874
- var Ft = {
879
+ var Lt = {
875
880
  bg1: "lt1",
876
881
  tx1: "dk1",
877
882
  bg2: "lt2",
@@ -884,7 +889,7 @@ var Ft = {
884
889
  accent6: "accent6",
885
890
  hlink: "hlink",
886
891
  folHlink: "folHlink"
887
- }, Lt = Object.freeze([
892
+ }, _t = Object.freeze([
888
893
  "lt1",
889
894
  "dk1",
890
895
  "lt2",
@@ -897,7 +902,7 @@ var Ft = {
897
902
  "accent6",
898
903
  "hlink",
899
904
  "folHlink"
900
- ]), At = Object.freeze([
905
+ ]), Dt = Object.freeze([
901
906
  "dk1",
902
907
  "lt1",
903
908
  "dk2",
@@ -910,15 +915,15 @@ var Ft = {
910
915
  "accent6",
911
916
  "hlink",
912
917
  "folHlink"
913
- ]), Pt = new Map(Lt.map((t, e) => [t, e]));
914
- function _t(t, e, r) {
918
+ ]), Et = new Map(_t.map((t, e) => [t, e]));
919
+ function Nt(t, e, r) {
915
920
  return Math.max(e, Math.min(r, t));
916
921
  }
917
- function Et(t) {
918
- const e = _t(t, -1, 1);
922
+ function Ot(t) {
923
+ const e = Nt(t, -1, 1);
919
924
  return Math.abs(e) < 1e-12 ? 0 : e;
920
925
  }
921
- function Nt(t) {
926
+ function Bt(t) {
922
927
  const e = function(t) {
923
928
  const e = t.replace(/^#/, "").toUpperCase();
924
929
  if (8 === e.length) return e.slice(2);
@@ -927,355 +932,17 @@ function Nt(t) {
927
932
  }(t), r = parseInt(e.slice(0, 2), 16) / 255, o = parseInt(e.slice(2, 4), 16) / 255, n = parseInt(e.slice(4, 6), 16) / 255;
928
933
  return (Math.max(r, o, n) + Math.min(r, o, n)) / 2 * 255;
929
934
  }
930
- function Dt(t) {
935
+ function Vt(t) {
931
936
  const e = t.replace(/^#/, "").toUpperCase();
932
937
  if (8 === e.length) return e;
933
938
  if (6 === e.length) return "FF" + e;
934
939
  throw new Error(`Invalid hex: ${t}`);
935
940
  }
936
- function Ot(t, e = !1) {
941
+ function $t(t, e = !1) {
937
942
  let r = t;
938
943
  return 8 === r.length && (r = r.substring(2, 8)), 6 === r.length && (r = (e ? "00" : "FF") + r), r.toUpperCase();
939
944
  }
940
- var Bt = (t, e, r, o, n, s) => {
941
- const a = o.sorts, l = a ? a.length : 0;
942
- if (0 === l) return;
943
- const i = {};
944
- if (l > 0) {
945
- const t = a[0].criteria?.collatorOptions;
946
- t && (i.caseSensitive = "object" != typeof t || Array.isArray(t) || "case" !== t.sensitivity && "variant" !== t.sensitivity ? "0" : "1");
947
- }
948
- i.ref = r.getRange().toString(), i["xmlns:xlrd2"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2", e.start("sortState", i);
949
- for (let t = 0; t < l; t++) {
950
- const r = a[t], o = r.criteria ?? {}, l = r.index + s.colStart, i = {};
951
- o.reverse && (i.descending = "1"), i.ref = n.getIntersect({
952
- colStart: l,
953
- rowStart: s.rowStart,
954
- colEnd: l,
955
- rowEnd: s.rowEnd
956
- }).toString(), o.sortOn && (i.sortBy = o.sortOn), void 0 !== o.dxfId && (i.dxfId = o.dxfId), void 0 !== o.iconSet && (i.iconSet = o.iconSet), void 0 !== o.customList && (i.customList = o.customList), e.empty("sortCondition", i);
957
- }
958
- e.end("sortState");
959
- }, Vt = (t, e, r, o, n = !1) => {
960
- let s = r.getRange();
961
- r.isShowTotals() && (s = s.getResizeBy(-1, 0));
962
- const a = s.getCoords(), l = o.sort, i = o.filter, c = i ? i.conditions : void 0, d = c ? c.length : 0, p = o.hiddenButtons, m = {};
963
- m.ref = s.toString();
964
- let f, u = [];
965
- for (let t = 0; t < d; t++) {
966
- const e = c[t];
967
- u[e.index] = { ...e };
968
- }
969
- if (Array.isArray(p) && p.length > 0) {
970
- const t = p.length;
971
- f = new Array(p[t - 1]);
972
- for (let e = 0; e < t; e++) f[p[e]] = !0;
973
- }
974
- if (u || p || f || n) {
975
- let i = 0;
976
- o.columns ? i = o.columns.length : n && (i = s.getColumnCount()), e.start("autoFilter", m);
977
- for (let r = 0; r < i; r++) {
978
- const o = !0 === p || !0 === f?.[r], n = u[r];
979
- (n || o) && Wt(t, e, r, n, o);
980
- }
981
- l && n && Bt(0, e, r, l, s, a), e.end("autoFilter");
982
- } else e.empty("autoFilter", m);
983
- l && !n && Bt(0, e, r, l, s, a);
984
- }, $t = (t, e, r, o) => {
985
- const n = {};
986
- switch (r) {
987
- case jt.Equal:
988
- n.operator = "equal";
989
- break;
990
- case jt.GreaterThan:
991
- n.operator = "greaterThan";
992
- break;
993
- case jt.GreaterThanOrEqual:
994
- n.operator = "greaterThanOrEqual";
995
- break;
996
- case jt.LessThan:
997
- n.operator = "lessThan";
998
- break;
999
- case jt.LessThanOrEqual:
1000
- n.operator = "lessThanOrEqual";
1001
- break;
1002
- case jt.NotEqual: n.operator = "notEqual";
1003
- }
1004
- n.val = "" + o, e.empty("customFilter", n);
1005
- }, Wt = (t, e, r, o, n) => {
1006
- const s = {};
1007
- s.colId = "" + r, n && (s.hiddenButton = "1"), o ? (e.start("filterColumn", s), ((t, e, r) => {
1008
- const o = r.operator;
1009
- if (o !== R.BuiltInOperatorNames.Expression) if (o !== R.BuiltInOperatorNames.Unique) {
1010
- if (o === R.BuiltInOperatorNames.Color) {
1011
- const t = r.param, o = {};
1012
- void 0 !== t.cellColor && (o.cellColor = t.cellColor ? "1" : "0"), void 0 !== t.styleId && (o.dxfId = t.styleId), e.empty("colorFilter", o);
1013
- }
1014
- if (zt(o)) if ("between" === o) {
1015
- const t = r.param;
1016
- e.start("customFilters", { and: "1" }), $t(0, e, jt.GreaterThanOrEqual, t.from), $t(0, e, jt.LessThanOrEqual, t.to), e.end("customFilters");
1017
- } else if (o === R.BuiltInOperatorNames.Not) {
1018
- const e = r.param;
1019
- zt(e.operator) || t.warn("Not rule with non-comparison criteria not supported in OOXML", e);
1020
- } else if (o === R.BuiltInOperatorNames.And || o === R.BuiltInOperatorNames.Or) {
1021
- const n = r.param, s = n.length;
1022
- if (s > 0) {
1023
- const r = {};
1024
- o === R.BuiltInOperatorNames.And && s > 1 && (r.and = "1"), e.start("customFilters", r);
1025
- for (let e = 0; e < s; e++) {
1026
- const r = n[e];
1027
- zt(r.operator) || t.warn("Only Comparison criteria supported in Union conditions for Table AutoFilters", r);
1028
- }
1029
- e.end("customFilters");
1030
- }
1031
- } else zt(o) && (e.start("customFilters"), $t(0, e, r.operator, r.param), e.end("customFilters"));
1032
- if (o === R.BuiltInOperatorNames.TimePeriod) {
1033
- const t = r.param, o = {};
1034
- t.type && (o.type = t.type), void 0 !== t.anchorDate && (o.val = "" + t.anchorDate), void 0 !== t.maxVal && (o.maxVal = "" + t.maxVal), e.empty("dynamicFilter", o);
1035
- }
1036
- if (o === R.BuiltInOperatorNames.Average) {
1037
- const t = r.param, o = {};
1038
- let n = t.type;
1039
- n && (n === R.AverageType.Above ? o.type = "aboveAverage" : n === R.AverageType.Below && (o.type = "belowAverage")), void 0 !== t.stdDevs && (o.val = "" + t.stdDevs), e.empty("dynamicFilter", o);
1040
- }
1041
- if (o === R.BuiltInOperatorNames.InSet) {
1042
- const t = r.param;
1043
- if (t.dateGroups) {
1044
- const r = t.dateGroups, o = r.length;
1045
- e.start("dateGroupItem");
1046
- for (let t = 0; t < o; t++) {
1047
- const o = r[t], n = {};
1048
- void 0 !== o.day && (n.day = "" + o.day), void 0 !== o.hour && (n.hour = "" + o.hour), void 0 !== o.minute && (n.minute = "" + o.minute), void 0 !== o.second && (n.second = "" + o.second), void 0 !== o.year && (n.year = "" + o.year), void 0 !== o.month && (n.month = "" + o.month), n.dateTimeGrouping = o.group, e.empty("dateGroupItem", n);
1049
- }
1050
- e.end("dateGroupItem");
1051
- }
1052
- if (t.items) {
1053
- const r = t.items, o = r.length;
1054
- e.start("filters");
1055
- for (let t = 0; t < o; t++) {
1056
- const o = r[t];
1057
- e.empty("filter", { val: "" + o });
1058
- }
1059
- e.end("filters");
1060
- }
1061
- }
1062
- if (o === R.BuiltInOperatorNames.Icon) {
1063
- const t = r.param, o = {};
1064
- void 0 !== t.iconSet && (o.iconSet = t.iconSet), void 0 !== t.iconId && (o.iconId = "" + t.iconId), e.empty("iconFilter", o);
1065
- }
1066
- if (o === R.BuiltInOperatorNames.TopN) {
1067
- const t = r.param, o = {};
1068
- t.percent && (o.percent = "1"), void 0 !== t.top && (o.top = t.top ? "1" : "0"), void 0 !== t.limit && (o.val = "" + t.limit), void 0 !== t.filterVal && (o.filterVal = "" + t.filterVal), e.empty("top10", o);
1069
- }
1070
- } else t.warn("Unique conditions not supported in Table AutoFilters", r);
1071
- else t.warn("Expression conditions not supported in Table AutoFilters", r);
1072
- })(t, e, o), e.end("filterColumn")) : e.empty("filterColumn", s);
1073
- }, zt = (t) => t === R.BuiltInOperatorNames.GreaterThan || t === R.BuiltInOperatorNames.GreaterThanEqualTo || t === R.BuiltInOperatorNames.LessThan || t === R.BuiltInOperatorNames.LessThanEqualTo || t === R.BuiltInOperatorNames.EqualTo || t === R.BuiltInOperatorNames.And || t === R.BuiltInOperatorNames.Or || t === R.BuiltInOperatorNames.Not || "between" === t, jt = {
1074
- Equal: "equal",
1075
- GreaterThan: "greaterThan",
1076
- GreaterThanOrEqual: "greaterThanOrEqual",
1077
- LessThan: "lessThan",
1078
- LessThanOrEqual: "lessThanOrEqual",
1079
- NotEqual: "notEqual"
1080
- }, Xt = "16.0000", Ut = 1048575, qt = 16383;
1081
- var Ht = class {
1082
- constructor() {
1083
- this._dxfs = [], this._byKey = /* @__PURE__ */ new Map();
1084
- }
1085
- add(t) {
1086
- const e = JSON.stringify(t);
1087
- let r = this._byKey.get(e);
1088
- return void 0 === r && (r = this._dxfs.length, this._dxfs.push(t), this._byKey.set(e, r)), r;
1089
- }
1090
- getDxfs() {
1091
- return this._dxfs;
1092
- }
1093
- getCount() {
1094
- return this._dxfs.length;
1095
- }
1096
- }, Gt = "cfDxfs", Jt = {
1097
- names: /* @__PURE__ */ new Set(),
1098
- perFormula: [],
1099
- affects: () => !1
1100
- };
1101
- var Kt = 1048576, Yt = (t, e, r) => {
1102
- if (!r) return [];
1103
- let o = 0;
1104
- for (let n = 0; n < r.length; n++) {
1105
- const s = r[n][0], a = e.getRange(s).getCoords();
1106
- if (o += (a.rowEnd - a.rowStart + 1) * (a.colEnd - a.colStart + 1), o > Kt) return t.warn(`Direct styles cover more than ${Kt} cells; not writing the styles from '${s}' on. A range that size belongs in a column or row style.`), r.slice(0, n);
1107
- }
1108
- return r;
1109
- };
1110
- function Zt(t, e) {
1111
- let r = e.type;
1112
- r === I.ColorStopType.AutoMin ? r = I.ColorStopType.Min : r === I.ColorStopType.AutoMax && (r = I.ColorStopType.Max), t.empty("cfvo", {
1113
- type: r,
1114
- val: e.value,
1115
- gte: e.exclusive ? "0" : void 0
1116
- });
1117
- }
1118
- function Qt(t, e) {
1119
- const r = {
1120
- type: e.type,
1121
- gte: e.exclusive ? "0" : void 0
1122
- };
1123
- void 0 !== e.value ? (t.start("x14:cfvo", r), t.start("xm:f"), t.text(e.value), t.end("xm:f"), t.end("x14:cfvo")) : t.empty("x14:cfvo", r);
1124
- }
1125
- var te = /* @__PURE__ */ new Set([
1126
- _.IconSet.Arrows3,
1127
- _.IconSet.ArrowsGray3,
1128
- _.IconSet.Flags3,
1129
- _.IconSet.Signs3,
1130
- _.IconSet.Symbols3,
1131
- _.IconSet.Symbols3_2,
1132
- _.IconSet.TrafficLights3,
1133
- _.IconSet.TrafficLights3_2,
1134
- _.IconSet.Arrows4,
1135
- _.IconSet.ArrowsGray4,
1136
- _.IconSet.Rating4,
1137
- _.IconSet.RedToBlack4,
1138
- _.IconSet.TrafficLights4,
1139
- _.IconSet.Arrows5,
1140
- _.IconSet.ArrowsGray5,
1141
- _.IconSet.Quarters5,
1142
- _.IconSet.Rating5
1143
- ]);
1144
- function ee(t) {
1145
- return (t.icon?.length ?? 0) > 0 || void 0 !== t.iconSet && !te.has(t.iconSet);
1146
- }
1147
- function re(t, e, r, o, n, s, a, l, d) {
1148
- const p = o.scale, m = p ? { type: p.type } : c(o.condition, n, (e) => t.warn(e));
1149
- if (!m) return o.condition || t.warn("Skipping conditional format with neither a condition nor a scale."), !1;
1150
- o.ext && t.warn("Conditional format extension payload is not written to xlsx; it will be lost.");
1151
- const f = {
1152
- type: m.type,
1153
- dxfId: o.style && Object.keys(o.style).length > 0 ? l.add(o.style) : void 0,
1154
- priority: a,
1155
- stopIfTrue: se(o.stopIfTrue),
1156
- aboveAverage: se(m.aboveAverage),
1157
- equalAverage: se(m.equalAverage),
1158
- stdDev: m.stdDev,
1159
- bottom: se(m.bottom),
1160
- percent: se(m.percent),
1161
- rank: m.rank,
1162
- operator: m.operator,
1163
- text: m.text,
1164
- timePeriod: m.timePeriod
1165
- };
1166
- let g;
1167
- p?.type === I.ScaleType.DataBar && function(t) {
1168
- if (t.gradient || t.borderColor || t.negativeFillColor || t.negativeBorderColor || t.axisColor || t.axisPosition || t.direction) return !0;
1169
- const e = t.stops, r = e ? e.length : 0;
1170
- for (let t = 0; t < r; t++) {
1171
- const r = e[t].type;
1172
- if (r === I.ColorStopType.AutoMin || r === I.ColorStopType.AutoMax) return !0;
1173
- }
1174
- return !1;
1175
- }(p) && (g = i(C.uuidV4), d.push({
1176
- guid: g,
1177
- sqref: s,
1178
- priority: a,
1179
- scale: p
1180
- }));
1181
- const y = m.formulas, x = y ? y.length : 0;
1182
- if (0 === x && !p) return e.empty("cfRule", f), !0;
1183
- e.start("cfRule", f);
1184
- for (let t = 0; t < x; t++) e.start("formula"), e.text(y[t]), e.end("formula");
1185
- if (p?.type === I.ScaleType.ColorScale) {
1186
- const t = p.stops ?? [];
1187
- e.start("colorScale");
1188
- for (let r = 0; r < t.length; r++) Zt(e, t[r]);
1189
- for (let o = 0; o < t.length; o++) It(e, r, t[o].color, "color");
1190
- e.end("colorScale");
1191
- } else if (p?.type === I.ScaleType.DataBar) {
1192
- const t = p.stops ?? [];
1193
- e.start("dataBar", {
1194
- minLength: p.minLength,
1195
- maxLength: p.maxLength,
1196
- showValue: se(p.showValue)
1197
- });
1198
- for (let r = 0; r < t.length; r++) Zt(e, t[r]);
1199
- p.color && It(e, r, p.color, "color"), e.end("dataBar");
1200
- } else if (p?.type === I.ScaleType.IconSet) {
1201
- const t = p.stops ?? [];
1202
- e.start("iconSet", {
1203
- iconSet: p.iconSet,
1204
- reverse: se(p.reverse),
1205
- showValue: se(p.showValue)
1206
- });
1207
- for (let r = 0; r < t.length; r++) Zt(e, t[r]);
1208
- e.end("iconSet");
1209
- }
1210
- return g && (e.start("extLst"), e.start("ext", {
1211
- uri: h,
1212
- "xmlns:x14": u
1213
- }), e.start("x14:id"), e.text(g), e.end("x14:id"), e.end("ext"), e.end("extLst")), e.end("cfRule"), !0;
1214
- }
1215
- function oe(t) {
1216
- return t.split(" ")[0].split(":")[0];
1217
- }
1218
- function ne(t) {
1219
- if ("string" == typeof t) return t.split(",").join(" ");
1220
- if (Array.isArray(t)) {
1221
- const e = [];
1222
- for (let r = 0; r < t.length; r++) {
1223
- const o = w.rangeToString(t[r]);
1224
- o && e.push(o);
1225
- }
1226
- return e.length > 0 ? e.join(" ") : null;
1227
- }
1228
- return w.rangeToString(t);
1229
- }
1230
- function se(t) {
1231
- if (void 0 !== t) return t ? "1" : "0";
1232
- }
1233
- function ae(t) {
1234
- if ("string" != typeof t) return !1;
1235
- let e = !1;
1236
- for (let r = 0; r < t.length; r++) {
1237
- const o = t[r];
1238
- if ("\"" === o) e = !e;
1239
- else if ("!" === o && !e) return !0;
1240
- }
1241
- return !1;
1242
- }
1243
- var le = {
1244
- r: void 0,
1245
- s: void 0,
1246
- t: void 0,
1247
- cm: void 0,
1248
- vm: void 0
1249
- }, ie = {
1250
- r: void 0,
1251
- s: void 0,
1252
- customFormat: void 0,
1253
- hidden: void 0,
1254
- ht: void 0,
1255
- customHeight: void 0,
1256
- "x14ac:dyDescent": "0.25",
1257
- outlineLevel: void 0,
1258
- collapsed: void 0
1259
- }, ce = {
1260
- t: void 0,
1261
- aca: void 0,
1262
- ref: void 0,
1263
- ca: void 0,
1264
- si: void 0
1265
- }, de = {
1266
- t: "shared",
1267
- aca: void 0,
1268
- ref: void 0,
1269
- ca: void 0,
1270
- si: void 0
1271
- }, pe = {
1272
- t: "array",
1273
- aca: void 0,
1274
- ref: void 0,
1275
- ca: void 0,
1276
- si: void 0
1277
- };
1278
- function me(t, e, r, o, n = !1, s = !1) {
945
+ function Wt(t, e, r, o, n = !1, s = !1) {
1279
946
  const a = o.getTheme();
1280
947
  if (n && e.start("fill"), "string" == typeof r && (r = {
1281
948
  type: L.Type.Solid,
@@ -1283,10 +950,10 @@ function me(t, e, r, o, n = !1, s = !1) {
1283
950
  }), r.type === L.Type.None) n ? e.empty("patternFill", { patternType: "none" }) : e.empty("noFill");
1284
951
  else if (r.type === L.Type.Solid) {
1285
952
  const t = r;
1286
- n ? e.start("patternFill", { patternType: "solid" }) : e.start("solidFill"), t.color && (n ? It(e, a, t.color, "fgColor") : Mt(e, a, t.color)), n ? e.end("patternFill") : e.end("solidFill");
953
+ n ? e.start("patternFill", { patternType: "solid" }) : e.start("solidFill"), t.color && (n ? Pt(e, a, t.color, "fgColor") : Ft(e, a, t.color)), n ? e.end("patternFill") : e.end("solidFill");
1287
954
  } else if (r.type === L.Type.Pattern) {
1288
955
  const t = r, o = t.patternType || "solid";
1289
- e.start("patternFill", { patternType: o }), t.foreground && (n ? It(e, a, s ? t.background : t.foreground, "fgColor") : Mt(e, a, s ? t.background : t.foreground)), t.background && (n ? It(e, a, s ? t.foreground : t.background, "bgColor") : Mt(e, a, s ? t.foreground : t.background)), e.end("patternFill");
956
+ e.start("patternFill", { patternType: o }), t.foreground && (n ? Pt(e, a, s ? t.background : t.foreground, "fgColor") : Ft(e, a, s ? t.background : t.foreground)), t.background && (n ? Pt(e, a, s ? t.foreground : t.background, "bgColor") : Ft(e, a, s ? t.foreground : t.background)), e.end("patternFill");
1290
957
  } else if (r.type === L.Type.Gradient && n) {
1291
958
  const t = r, o = {}, n = t.gradientType;
1292
959
  if (n !== L.GradientType.Path && n !== L.GradientType.Linear || (o.type = n), void 0 !== t.angle) {
@@ -1303,7 +970,7 @@ function me(t, e, r, o, n = !1, s = !1) {
1303
970
  const e = t;
1304
971
  o = e.offset || 0, r = e.color;
1305
972
  }
1306
- e.start("stop", { position: String(o) }), r && It(e, a, r, "color"), e.end("stop");
973
+ e.start("stop", { position: String(o) }), r && Pt(e, a, r, "color"), e.end("stop");
1307
974
  }
1308
975
  e.end("gradientFill");
1309
976
  } else if (r.type === L.Type.Gradient) {
@@ -1317,7 +984,7 @@ function me(t, e, r, o, n = !1, s = !1) {
1317
984
  const e = t;
1318
985
  o = e.offset || 0, r = e.color;
1319
986
  }
1320
- e.start("gs", { pos: String(C.roundAccurately(1e3 * o, 0)) }), r && Mt(e, a, r), e.end("gs");
987
+ e.start("gs", { pos: String(k.roundAccurately(1e3 * o, 0)) }), r && Ft(e, a, r), e.end("gs");
1321
988
  }
1322
989
  e.end("gsLst");
1323
990
  const s = t.gradientType;
@@ -1327,12 +994,12 @@ function me(t, e, r, o, n = !1, s = !1) {
1327
994
  const o = t.focus;
1328
995
  if (o) {
1329
996
  const t = {};
1330
- void 0 !== o.t && (t.t = String(C.roundAccurately(1e3 * o.t, 0))), void 0 !== o.l && (t.l = String(C.roundAccurately(1e3 * o.l, 0))), void 0 !== o.b && (t.b = String(C.roundAccurately(1e3 * o.b, 0))), void 0 !== o.r && (t.r = String(C.roundAccurately(1e3 * o.r, 0))), e.empty("fillToRect", t);
997
+ void 0 !== o.t && (t.t = String(k.roundAccurately(1e3 * o.t, 0))), void 0 !== o.l && (t.l = String(k.roundAccurately(1e3 * o.l, 0))), void 0 !== o.b && (t.b = String(k.roundAccurately(1e3 * o.b, 0))), void 0 !== o.r && (t.r = String(k.roundAccurately(1e3 * o.r, 0))), e.empty("fillToRect", t);
1331
998
  }
1332
999
  e.end("path");
1333
1000
  } else {
1334
1001
  const r = {};
1335
- void 0 !== t.angle && (r.ang = String(C.roundAccurately(6e4 * t.angle, 0)));
1002
+ void 0 !== t.angle && (r.ang = String(k.roundAccurately(6e4 * t.angle, 0)));
1336
1003
  const o = t.scaled;
1337
1004
  void 0 !== o && (r.scaled = o ? "1" : "0"), e.empty("lin", r);
1338
1005
  }
@@ -1340,132 +1007,143 @@ function me(t, e, r, o, n = !1, s = !1) {
1340
1007
  } else n ? e.empty("patternFill", { patternType: "none" }) : e.empty("noFill");
1341
1008
  n && e.end("fill");
1342
1009
  }
1343
- var fe = (t, e, r, o) => {
1010
+ var zt = (t, e, r, o) => {
1344
1011
  if (!r) return e.start("ln"), e.empty("noFill"), void e.end("ln");
1345
1012
  "string" == typeof r && (r = { fill: r });
1346
1013
  const n = r, s = {};
1347
- if (void 0 !== n.width && (s.w = String(Se(n.width))), void 0 !== n.lineCap && (s.cap = ue(n.lineCap)), void 0 !== n.compound && (s.cmpd = n.compound), void 0 !== n.align && (s.algn = n.align), e.start("ln", s), me(0, e, n.fill ?? xe, o), Array.isArray(n.dash)) {
1014
+ if (void 0 !== n.width && (s.w = String(Kt(n.width))), void 0 !== n.lineCap && (s.cap = jt(n.lineCap)), void 0 !== n.compound && (s.cmpd = n.compound), void 0 !== n.align && (s.algn = n.align), e.start("ln", s), Wt(0, e, n.fill ?? qt, o), Array.isArray(n.dash)) {
1348
1015
  e.start("custDash");
1349
1016
  for (let t = 0; t < n.dash.length; t += 2) e.empty("ds", {
1350
- d: String(C.roundAccurately(1e3 * n.dash[t], 0)),
1351
- sp: String(C.roundAccurately(1e3 * (n.dash[t + 1] ?? 0), 0))
1017
+ d: String(k.roundAccurately(1e3 * n.dash[t], 0)),
1018
+ sp: String(k.roundAccurately(1e3 * (n.dash[t + 1] ?? 0), 0))
1352
1019
  });
1353
1020
  e.end("custDash");
1354
1021
  } else "string" == typeof n.dash && e.empty("prstDash", { val: n.dash });
1355
- if (n.lineJoin === P.LineJoin.Round) e.empty("round");
1356
- else if (n.lineJoin === P.LineJoin.Bevel) e.empty("bevel");
1357
- else if (n.lineJoin === P.LineJoin.Miter) {
1022
+ if (n.lineJoin === D.LineJoin.Round) e.empty("round");
1023
+ else if (n.lineJoin === D.LineJoin.Bevel) e.empty("bevel");
1024
+ else if (n.lineJoin === D.LineJoin.Miter) {
1358
1025
  const t = {};
1359
- void 0 !== n.miterLimit && (t.lim = String(C.roundAccurately(1e5 * n.miterLimit, 0))), e.empty("miter", t);
1026
+ void 0 !== n.miterLimit && (t.lim = String(k.roundAccurately(1e5 * n.miterLimit, 0))), e.empty("miter", t);
1360
1027
  }
1361
1028
  e.end("ln");
1362
- }, ue = (t) => "round" === t ? "rnd" : "butt" === t ? "flat" : "square" === t ? "sq" : t, he = (t, e, r, o = void 0, n = !1) => {
1029
+ }, jt = (t) => "round" === t ? "rnd" : "butt" === t ? "flat" : "square" === t ? "sq" : t, Xt = (t, e, r, o = void 0, n = !1) => {
1363
1030
  if (!r) return;
1364
1031
  if (!(r.fill || r.stroke || r.effects?.length || n)) return;
1365
1032
  const s = t.getXMLWriter();
1366
- o && s.start(o), s.pushDefaultNamespace("a"), r.fill && me(0, s, r.fill, e), r.stroke && fe(0, s, r.stroke, e), r.effects?.length ? ge(t, s, e.getTheme(), r.effects) : n && s.empty("effectLst"), s.popDefaultNamespace(), o && s.end(o);
1367
- }, ge = (t, e, r, o) => {
1033
+ o && s.start(o), s.pushDefaultNamespace("a"), r.fill && Wt(0, s, r.fill, e), r.stroke && zt(0, s, r.stroke, e), r.effects?.length ? Ut(t, s, e.getTheme(), r.effects) : n && s.empty("effectLst"), s.popDefaultNamespace(), o && s.end(o);
1034
+ }, Ut = (t, e, r, o) => {
1368
1035
  e.start("effectLst");
1369
- for (const t of o) ye(e, r, t);
1036
+ for (const t of o) Ht(e, r, t);
1370
1037
  e.end("effectLst");
1371
- }, ye = (t, e, r) => {
1038
+ }, Ht = (t, e, r) => {
1372
1039
  switch (r.type) {
1373
- case F.Type.OuterShadow: {
1040
+ case P.Type.OuterShadow: {
1374
1041
  const o = r, n = {};
1375
- void 0 !== o.blur && (n.blurRad = String(Se(o.blur))), void 0 !== o.distance && (n.dist = String(Se(o.distance))), void 0 !== o.angle && (n.dir = String(Ce(o.angle))), void 0 !== o.alignment && (n.algn = o.alignment), void 0 !== o.isRotatedWithShape && (n.rotWithShape = o.isRotatedWithShape ? "1" : "0"), void 0 !== o.scaleX && (n.sx = String(C.roundAccurately(1e3 * o.scaleX, 0))), void 0 !== o.scaleY && (n.sy = String(C.roundAccurately(1e3 * o.scaleY, 0))), void 0 !== o.skewX && (n.kx = String(Ce(o.skewX))), void 0 !== o.skewY && (n.ky = String(Ce(o.skewY))), t.start("outerShdw", n), Mt(t, e, o.color), t.end("outerShdw");
1042
+ void 0 !== o.blur && (n.blurRad = String(Kt(o.blur))), void 0 !== o.distance && (n.dist = String(Kt(o.distance))), void 0 !== o.angle && (n.dir = String(Zt(o.angle))), void 0 !== o.alignment && (n.algn = o.alignment), void 0 !== o.isRotatedWithShape && (n.rotWithShape = o.isRotatedWithShape ? "1" : "0"), void 0 !== o.scaleX && (n.sx = String(k.roundAccurately(1e3 * o.scaleX, 0))), void 0 !== o.scaleY && (n.sy = String(k.roundAccurately(1e3 * o.scaleY, 0))), void 0 !== o.skewX && (n.kx = String(Zt(o.skewX))), void 0 !== o.skewY && (n.ky = String(Zt(o.skewY))), t.start("outerShdw", n), Ft(t, e, o.color), t.end("outerShdw");
1376
1043
  break;
1377
1044
  }
1378
- case F.Type.InnerShadow: {
1045
+ case P.Type.InnerShadow: {
1379
1046
  const o = r, n = {};
1380
- void 0 !== o.blur && (n.blurRad = String(Se(o.blur))), void 0 !== o.distance && (n.dist = String(Se(o.distance))), void 0 !== o.angle && (n.dir = String(Ce(o.angle))), t.start("innerShdw", n), Mt(t, e, o.color), t.end("innerShdw");
1047
+ void 0 !== o.blur && (n.blurRad = String(Kt(o.blur))), void 0 !== o.distance && (n.dist = String(Kt(o.distance))), void 0 !== o.angle && (n.dir = String(Zt(o.angle))), t.start("innerShdw", n), Ft(t, e, o.color), t.end("innerShdw");
1381
1048
  break;
1382
1049
  }
1383
- case F.Type.PresetShadow: {
1050
+ case P.Type.PresetShadow: {
1384
1051
  const o = r, n = { prst: o.preset };
1385
- void 0 !== o.distance && (n.dist = String(Se(o.distance))), void 0 !== o.angle && (n.dir = String(Ce(o.angle))), t.start("prstShdw", n), Mt(t, e, o.color), t.end("prstShdw");
1052
+ void 0 !== o.distance && (n.dist = String(Kt(o.distance))), void 0 !== o.angle && (n.dir = String(Zt(o.angle))), t.start("prstShdw", n), Ft(t, e, o.color), t.end("prstShdw");
1386
1053
  break;
1387
1054
  }
1388
- case F.Type.Glow: {
1055
+ case P.Type.Glow: {
1389
1056
  const o = r, n = {};
1390
- void 0 !== o.radius && (n.rad = String(Se(o.radius))), t.start("glow", n), Mt(t, e, o.color), t.end("glow");
1057
+ void 0 !== o.radius && (n.rad = String(Kt(o.radius))), t.start("glow", n), Ft(t, e, o.color), t.end("glow");
1391
1058
  break;
1392
1059
  }
1393
- case F.Type.SoftEdge: {
1060
+ case P.Type.SoftEdge: {
1394
1061
  const e = r, o = {};
1395
- void 0 !== e.radius && (o.rad = String(Se(e.radius))), t.empty("softEdge", o);
1062
+ void 0 !== e.radius && (o.rad = String(Kt(e.radius))), t.empty("softEdge", o);
1396
1063
  break;
1397
1064
  }
1398
- case F.Type.Reflection: {
1065
+ case P.Type.Reflection: {
1399
1066
  const e = r, o = {};
1400
- void 0 !== e.blur && (o.blurRad = String(Se(e.blur))), void 0 !== e.distance && (o.dist = String(Se(e.distance))), void 0 !== e.angle && (o.dir = String(Ce(e.angle))), void 0 !== e.fadeAngle && (o.fadeDir = String(Ce(e.fadeAngle))), void 0 !== e.startAlpha && (o.stA = String(C.roundAccurately(1e3 * e.startAlpha, 0))), void 0 !== e.startPosition && (o.stPos = String(C.roundAccurately(1e3 * e.startPosition, 0))), void 0 !== e.endAlpha && (o.endA = String(C.roundAccurately(1e3 * e.endAlpha, 0))), void 0 !== e.endPosition && (o.endPos = String(C.roundAccurately(1e3 * e.endPosition, 0))), void 0 !== e.scaleX && (o.sx = String(C.roundAccurately(1e3 * e.scaleX, 0))), void 0 !== e.scaleY && (o.sy = String(C.roundAccurately(1e3 * e.scaleY, 0))), void 0 !== e.skewX && (o.kx = String(Ce(e.skewX))), void 0 !== e.skewY && (o.ky = String(Ce(e.skewY))), void 0 !== e.alignment && (o.algn = e.alignment), void 0 !== e.isRotatedWithShape && (o.rotWithShape = e.isRotatedWithShape ? "1" : "0"), t.empty("reflection", o);
1067
+ void 0 !== e.blur && (o.blurRad = String(Kt(e.blur))), void 0 !== e.distance && (o.dist = String(Kt(e.distance))), void 0 !== e.angle && (o.dir = String(Zt(e.angle))), void 0 !== e.fadeAngle && (o.fadeDir = String(Zt(e.fadeAngle))), void 0 !== e.startAlpha && (o.stA = String(k.roundAccurately(1e3 * e.startAlpha, 0))), void 0 !== e.startPosition && (o.stPos = String(k.roundAccurately(1e3 * e.startPosition, 0))), void 0 !== e.endAlpha && (o.endA = String(k.roundAccurately(1e3 * e.endAlpha, 0))), void 0 !== e.endPosition && (o.endPos = String(k.roundAccurately(1e3 * e.endPosition, 0))), void 0 !== e.scaleX && (o.sx = String(k.roundAccurately(1e3 * e.scaleX, 0))), void 0 !== e.scaleY && (o.sy = String(k.roundAccurately(1e3 * e.scaleY, 0))), void 0 !== e.skewX && (o.kx = String(Zt(e.skewX))), void 0 !== e.skewY && (o.ky = String(Zt(e.skewY))), void 0 !== e.alignment && (o.algn = e.alignment), void 0 !== e.isRotatedWithShape && (o.rotWithShape = e.isRotatedWithShape ? "1" : "0"), t.empty("reflection", o);
1401
1068
  break;
1402
1069
  }
1403
1070
  }
1404
- }, xe = { type: "none" }, ve = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", we = {
1071
+ }, qt = { type: "none" }, Gt = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", Jt = {
1405
1072
  mime: "image/png",
1406
1073
  ext: "png"
1407
- }, Se = (t = 0) => C.roundAccurately(12700 * t, 0), be = (t = 0) => C.roundAccurately(9525 * t, 0), Ce = (t) => 6e4 * t, Te = (t = 0) => C.roundAccurately(100 * t, 2);
1408
- function ke(t, e, r, o) {
1409
- r && (e.start(o), e.empty("latin", { typeface: r }), e.empty("ea", { typeface: "" }), e.empty("cs", { typeface: "" }), e.end(o));
1410
- }
1411
- var Me = [
1074
+ }, Kt = (t = 0) => k.roundAccurately(12700 * t, 0), Yt = (t = 0) => k.roundAccurately(9525 * t, 0), Zt = (t) => 6e4 * t, Qt = (t = 0) => k.roundAccurately(100 * t, 2), te = class {
1075
+ constructor() {
1076
+ this._dxfs = [], this._byKey = /* @__PURE__ */ new Map();
1077
+ }
1078
+ add(t) {
1079
+ const e = JSON.stringify(t);
1080
+ let r = this._byKey.get(e);
1081
+ return void 0 === r && (r = this._dxfs.length, this._dxfs.push(t), this._byKey.set(e, r)), r;
1082
+ }
1083
+ getDxfs() {
1084
+ return this._dxfs;
1085
+ }
1086
+ getCount() {
1087
+ return this._dxfs.length;
1088
+ }
1089
+ }, ee = "cfDxfs", re = [
1412
1090
  "font",
1413
1091
  "fill",
1414
1092
  "border",
1415
1093
  "numberFormat",
1416
1094
  "alignment"
1417
1095
  ];
1418
- function Re(t, e, r) {
1096
+ function oe(t, e, r) {
1419
1097
  if (e) {
1420
1098
  if (e.named) {
1421
1099
  const o = e.named, n = o.toLowerCase(), s = r.namedStyleMap;
1422
1100
  if (!s.has(n)) {
1423
1101
  s.set(n, "" + s.size);
1424
1102
  const e = t.getNamed(o).toJSON();
1425
- Re(t, e.style ?? C.EmptyObject, r), r.namedStyles.push(e);
1103
+ oe(t, e.style ?? k.EmptyObject, r), r.namedStyles.push(e);
1426
1104
  }
1427
1105
  }
1428
1106
  e.font && function(t, e, r) {
1429
1107
  if (!e) return;
1430
- const o = S.JSONStableStringify(e), n = r.fontMap;
1108
+ const o = C.JSONStableStringify(e), n = r.fontMap;
1431
1109
  if (!n.has(o)) {
1432
1110
  const t = n.size;
1433
1111
  n.set(o, "" + t), r.fonts.push(e);
1434
1112
  }
1435
1113
  }(0, e.font, r), e.fill && function(t, e, r) {
1436
1114
  if (!e) return;
1437
- const o = S.JSONStableStringify(e), n = r.fillMap;
1115
+ const o = C.JSONStableStringify(e), n = r.fillMap;
1438
1116
  if (!n.has(o) && "object" == typeof e && e.type) {
1439
1117
  const t = n.size;
1440
1118
  n.set(o, "" + t), r.fills.push(e);
1441
1119
  }
1442
1120
  }(0, e.fill, r), e.border && function(t, e, r) {
1443
1121
  if (!e) return;
1444
- const o = S.JSONStableStringify(e), n = r.borderMap;
1122
+ const o = C.JSONStableStringify(e), n = r.borderMap;
1445
1123
  if (!n.has(o)) {
1446
1124
  const t = n.size;
1447
1125
  n.set(o, "" + t), r.borders.push(e);
1448
1126
  }
1449
1127
  }(0, e.border, r), void 0 !== e.numberFormat && function(t, e, r) {
1450
1128
  if (!e) return;
1451
- const o = D.toBuiltInID(e), n = r.numFmtMap;
1129
+ const o = B.toBuiltInID(e), n = r.numFmtMap;
1452
1130
  if (!n.has(o)) {
1453
1131
  let t = 0;
1454
- "number" == typeof o ? t = o : (t = r.numFmtsCustom.length + Ee, r.numFmtsCustom.push(o)), n.set(e, "" + t);
1132
+ "number" == typeof o ? t = o : (t = r.numFmtsCustom.length + pe, r.numFmtsCustom.push(o)), n.set(e, "" + t);
1455
1133
  }
1456
1134
  }(0, e.numberFormat, r);
1457
1135
  }
1458
1136
  }
1459
- function Ie(t, e, r) {
1137
+ function ne(t, e, r) {
1460
1138
  if (!e) return;
1461
1139
  const o = e.name.toLowerCase();
1462
- r.namedStyleMap.has(o) || (r.namedStyleMap.set(o, "" + r.namedStyleMap.size), r.namedStyles.push(e), Re(t, e.style, r));
1140
+ r.namedStyleMap.has(o) || (r.namedStyleMap.set(o, "" + r.namedStyleMap.size), r.namedStyles.push(e), oe(t, e.style, r));
1463
1141
  }
1464
- function Fe(t, e, r, o, n = !1) {
1142
+ function se(t, e, r, o, n = !1) {
1465
1143
  const s = o.getDefaultFontSize(), a = o.getTheme().getFontScheme().getMinorFont() ?? "Calibri", l = o.getNormal().getFont().getColor();
1466
1144
  e.start("font"), r.weight && r.weight >= 700 && e.empty("b"), r.style && "normal" !== r.style && e.empty("i"), r.strike && e.empty("strike"), r.underline && e.empty("u", { val: r.underline }), r.outline && e.empty("outline"), r.shadow && e.empty("shadow"), r.extend && e.empty("extend");
1467
1145
  let i = r.verticalAlign;
1468
- i && ("super" === i && (i = "superscript"), "sub" === i && (i = "subscript"), e.empty("vertAlign", { val: i })), n ? void 0 !== r.size && e.empty("sz", { val: String(r.size) }) : e.empty("sz", { val: String(r.size ?? s) }), It(e, o.getTheme(), r.color ?? l, "color", !n);
1146
+ i && ("super" === i && (i = "superscript"), "sub" === i && (i = "subscript"), e.empty("vertAlign", { val: i })), n ? void 0 !== r.size && e.empty("sz", { val: String(r.size) }) : e.empty("sz", { val: String(r.size ?? s) }), Pt(e, o.getTheme(), r.color ?? l, "color", !n);
1469
1147
  const c = !n || r.family && r.family !== a;
1470
1148
  if (c && (e.empty("name", { val: r.family ?? a }), r.fallbacks && r.fallbacks.length > 0)) {
1471
1149
  const t = r.fallbacks;
@@ -1475,45 +1153,59 @@ function Fe(t, e, r, o, n = !1) {
1475
1153
  const d = r.scheme ?? (void 0 === r.family ? "minor" : void 0);
1476
1154
  c && void 0 !== d && "none" !== d && e.empty("scheme", { val: d }), e.end("font");
1477
1155
  }
1478
- function Le(t, e, r, o, n, s = !1) {
1156
+ function ae(t, e, r, o, n, s = !1) {
1479
1157
  if (!n || "none" === n.style || !n.style) return void (s && !n || e.empty(o));
1480
1158
  e.start(o, { style: n.style });
1481
1159
  let a = n.color;
1482
- a && It(e, r, a, "color", !s, s), e.end(o);
1160
+ a && Pt(e, r, a, "color", !s, s), e.end(o);
1483
1161
  }
1484
- function Ae(t, e, r, o, n = !1) {
1162
+ function le(t, e, r, o, n = !1) {
1485
1163
  const s = {};
1486
- n ? (s.diagonalUp = "0", s.diagonalDown = "0") : (r.diagonalUp && (s.diagonalUp = "1"), r.diagonalDown && (s.diagonalDown = "1")), e.start("border", s), Le(0, e, o, "left", r.left, n), Le(0, e, o, "right", r.right, n), Le(0, e, o, "top", r.top, n), Le(0, e, o, "bottom", r.bottom, n), n ? (Le(0, e, o, "vertical", r.vertical, n), Le(0, e, o, "horizontal", r.horizontal, n)) : Le(0, e, o, "diagonal", r.diagonalUp ?? r.diagonalDown, n), e.end("border");
1164
+ n ? (s.diagonalUp = "0", s.diagonalDown = "0") : (r.diagonalUp && (s.diagonalUp = "1"), r.diagonalDown && (s.diagonalDown = "1")), e.start("border", s), ae(0, e, o, "left", r.left, n), ae(0, e, o, "right", r.right, n), ae(0, e, o, "top", r.top, n), ae(0, e, o, "bottom", r.bottom, n), n ? (ae(0, e, o, "vertical", r.vertical, n), ae(0, e, o, "horizontal", r.horizontal, n)) : ae(0, e, o, "diagonal", r.diagonalUp ?? r.diagonalDown, n), e.end("border");
1487
1165
  }
1488
- function Pe(t, e, r, o = !1) {
1166
+ function ie(t, e, r, o = !1) {
1489
1167
  const n = {};
1490
- r.horizontal && r.horizontal !== E.HorizontalAlignment.General && (n.horizontal = r.horizontal), r.vertical && r.vertical !== E.VerticalAlignment.Bottom && (n.vertical = r.vertical);
1168
+ r.horizontal && r.horizontal !== N.HorizontalAlignment.General && (n.horizontal = r.horizontal), r.vertical && r.vertical !== N.VerticalAlignment.Bottom && (n.vertical = r.vertical);
1491
1169
  let s = r.rotation;
1492
1170
  r.stacked && (n.textRotation = "255", s = 0), s && (s >= 270 && s < 360 ? s = 360 - s : s > 0 && s <= 90 && (s += 90), n.textRotation = String(s));
1493
1171
  const a = r.overflow;
1494
- switch (a === E.Overflow.Wrap && (n.wrapText = "1"), r.indent && (n.indent = "" + r.indent), r.relativeIndent && (n.relativeIndent = "" + r.relativeIndent), r.justifyLastLine && (n.justifyLastLine = "1"), a === E.Overflow.Shrink && (n.shrinkToFit = "1"), r.readingDirection) {
1495
- case E.ReadingDirection.Auto: break;
1496
- case E.ReadingDirection.LeftToRight:
1172
+ switch (a === N.Overflow.Wrap && (n.wrapText = "1"), r.indent && (n.indent = "" + r.indent), r.relativeIndent && (n.relativeIndent = "" + r.relativeIndent), r.justifyLastLine && (n.justifyLastLine = "1"), a === N.Overflow.Shrink && (n.shrinkToFit = "1"), r.readingDirection) {
1173
+ case N.ReadingDirection.Auto: break;
1174
+ case N.ReadingDirection.LeftToRight:
1497
1175
  n.readingOrder = "1";
1498
1176
  break;
1499
- case E.ReadingDirection.RightToLeft: n.readingOrder = "2";
1177
+ case N.ReadingDirection.RightToLeft: n.readingOrder = "2";
1500
1178
  }
1501
1179
  return Object.keys(n).length > 0 ? n : null;
1502
1180
  }
1503
- function _e(t, e, r, o, n, s) {
1181
+ function ce(t, e, r, o, n, s) {
1504
1182
  const a = {};
1505
1183
  let l = null, i = o.named;
1506
1184
  i && (l = r.getNamed(i).toJSON().style);
1507
- const c = o.font ?? l?.font, d = c ? n.fontMap.get(S.JSONStableStringify(c)) ?? 0 : 0, p = o.fill ?? l?.fill, m = p ? n.fillMap.get(S.JSONStableStringify(p)) ?? 0 : 0, f = o.border ?? l?.border, u = f ? n.borderMap.get(S.JSONStableStringify(f)) ?? 0 : 0, h = o.numberFormat ?? l?.numberFormat;
1185
+ const c = o.font ?? l?.font, d = c ? n.fontMap.get(C.JSONStableStringify(c)) ?? 0 : 0, p = o.fill ?? l?.fill, m = p ? n.fillMap.get(C.JSONStableStringify(p)) ?? 0 : 0, f = o.border ?? l?.border, u = f ? n.borderMap.get(C.JSONStableStringify(f)) ?? 0 : 0, h = o.numberFormat ?? l?.numberFormat;
1508
1186
  if (a.numFmtId = (void 0 !== h ? n.numFmtMap.get(h) : void 0) ?? "0", a.fontId = String(d), a.fillId = String(m), a.borderId = String(u), s) {
1509
- const t = o.named ?? _.BuiltInName.Normal;
1187
+ const t = o.named ?? E.BuiltInName.Normal;
1510
1188
  a.xfId = n.namedStyleMap.get(t.toLowerCase());
1511
1189
  }
1512
1190
  let g = null;
1513
1191
  const y = o.alignment ?? l?.alignment;
1514
- y && (g = Pe(0, 0, y)), o.font && (a.applyFont = "1"), o.fill && (a.applyFill = "1"), o.numberFormat && (a.applyNumberFormat = "1"), o.border && (a.applyBorder = "1"), g && (a.applyAlignment = "1"), o.quotePrefix && (a.quotePrefix = "1"), g ? (e.start("xf", a), g && e.empty("alignment", g), e.end("xf")) : e.empty("xf", a);
1192
+ y && (g = ie(0, 0, y)), o.font && (a.applyFont = "1"), o.fill && (a.applyFill = "1"), o.numberFormat && (a.applyNumberFormat = "1"), o.border && (a.applyBorder = "1"), g && (a.applyAlignment = "1"), o.quotePrefix && (a.quotePrefix = "1"), g ? (e.start("xf", a), g && e.empty("alignment", g), e.end("xf")) : e.empty("xf", a);
1515
1193
  }
1516
- var Ee = 164, Ne = Object.freeze([
1194
+ function de(t, e, r, o, n, s = "dxf", a = pe) {
1195
+ if (e.start(s), r.font && se(0, e, r.font, o, !0), void 0 !== r.numberFormat && null !== r.numberFormat) {
1196
+ const t = B.toBuiltInID(r.numberFormat), o = "number" == typeof t, n = o ? B.builtInFormat(t) : String(t);
1197
+ n && e.empty("numFmt", {
1198
+ numFmtId: String(o ? t : a++),
1199
+ formatCode: n
1200
+ });
1201
+ }
1202
+ if (r.fill && Wt(0, e, r.fill, o, !0, !0), r.alignment) {
1203
+ const t = ie(0, 0, r.alignment, !0);
1204
+ t && e.empty("alignment", t);
1205
+ }
1206
+ return r.border && le(0, e, r.border, n, !0), e.end(s), a;
1207
+ }
1208
+ var pe = 164, me = Object.freeze([
1517
1209
  "wholeTable",
1518
1210
  "headerRow",
1519
1211
  "totalRow",
@@ -1527,7 +1219,321 @@ var Ee = 164, Ne = Object.freeze([
1527
1219
  "lastHeaderCell",
1528
1220
  "firstTotalCell",
1529
1221
  "lastTotalCell"
1530
- ]), De = (t) => t.toISOString().split(".")[0] + "Z", Oe = (t, e, r) => {
1222
+ ]), fe = F.BuiltInOperatorNames, ue = (t, e, r, o, n, s) => {
1223
+ const a = o.sorts, l = a ? a.length : 0;
1224
+ if (0 === l) return;
1225
+ const i = {};
1226
+ if (l > 0) {
1227
+ const t = a[0].criteria?.collatorOptions;
1228
+ t && (i.caseSensitive = "object" != typeof t || Array.isArray(t) || "case" !== t.sensitivity && "variant" !== t.sensitivity ? "0" : "1");
1229
+ }
1230
+ i.ref = r.getRange().toString(), i["xmlns:xlrd2"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2", e.start("sortState", i);
1231
+ for (let t = 0; t < l; t++) {
1232
+ const r = a[t], o = r.criteria ?? {}, l = r.index + s.colStart, i = {};
1233
+ o.reverse && (i.descending = "1"), i.ref = n.getIntersect({
1234
+ colStart: l,
1235
+ rowStart: s.rowStart,
1236
+ colEnd: l,
1237
+ rowEnd: s.rowEnd
1238
+ }).toString(), o.sortOn && (i.sortBy = o.sortOn), void 0 !== o.dxfId && (i.dxfId = o.dxfId), void 0 !== o.iconSet && (i.iconSet = o.iconSet), void 0 !== o.customList && (i.customList = o.customList), e.empty("sortCondition", i);
1239
+ }
1240
+ e.end("sortState");
1241
+ }, he = (t, e, r, o, n = !1) => {
1242
+ let s = r.getRange();
1243
+ r.isShowTotals() && (s = s.getResizeBy(-1, 0));
1244
+ const a = s.getCoords(), l = o.sort, i = o.filter, c = i ? i.conditions : void 0, d = c ? c.length : 0, p = o.hiddenButtons, m = {};
1245
+ m.ref = s.toString();
1246
+ let f, u = [];
1247
+ for (let t = 0; t < d; t++) {
1248
+ const e = c[t];
1249
+ u[e.index] = { ...e };
1250
+ }
1251
+ if (Array.isArray(p) && p.length > 0) {
1252
+ const t = p.length;
1253
+ f = new Array(p[t - 1]);
1254
+ for (let e = 0; e < t; e++) f[p[e]] = !0;
1255
+ }
1256
+ if (u || p || f || n) {
1257
+ let i = 0;
1258
+ o.columns ? i = o.columns.length : n && (i = s.getColumnCount()), e.start("autoFilter", m);
1259
+ for (let r = 0; r < i; r++) {
1260
+ const o = !0 === p || !0 === f?.[r], n = u[r];
1261
+ (n || o) && ye(t, e, r, n, o);
1262
+ }
1263
+ l && n && ue(0, e, r, l, s, a), e.end("autoFilter");
1264
+ } else e.empty("autoFilter", m);
1265
+ l && !n && ue(0, e, r, l, s, a);
1266
+ }, ge = (t, e, r) => {
1267
+ const o = u(r, (e) => t.warn(e, r));
1268
+ if (!o) return;
1269
+ const n = { operator: o.operator };
1270
+ void 0 !== o.val && (n.val = o.val), e.empty("customFilter", n);
1271
+ }, ye = (t, e, r, o, n) => {
1272
+ const s = {};
1273
+ s.colId = "" + r, n && (s.hiddenButton = "1"), o ? (e.start("filterColumn", s), ((t, e, r) => {
1274
+ const o = r.operator;
1275
+ if (o !== F.BuiltInOperatorNames.Expression) if (o !== F.BuiltInOperatorNames.Unique) {
1276
+ if (o === F.BuiltInOperatorNames.Color) {
1277
+ const t = r.param, o = {};
1278
+ void 0 !== t.cellColor && (o.cellColor = t.cellColor ? "1" : "0"), void 0 !== t.styleId && (o.dxfId = t.styleId), e.empty("colorFilter", o);
1279
+ }
1280
+ if (xe(o)) if ("between" === o) {
1281
+ const o = r.param;
1282
+ e.start("customFilters", { and: "1" }), ge(t, e, {
1283
+ operator: fe.GreaterThanEqualTo,
1284
+ param: o.from
1285
+ }), ge(t, e, {
1286
+ operator: fe.LessThanEqualTo,
1287
+ param: o.to
1288
+ }), e.end("customFilters");
1289
+ } else if (o === F.BuiltInOperatorNames.Not) {
1290
+ const o = r.param;
1291
+ c(o?.operator) ? (e.start("customFilters"), ge(t, e, r), e.end("customFilters")) : t.warn("Not rule with non-comparison criteria not supported in OOXML", o);
1292
+ } else if (o === F.BuiltInOperatorNames.And || o === F.BuiltInOperatorNames.Or) {
1293
+ const n = r.param, s = n.length;
1294
+ if (s > 0) {
1295
+ const r = {};
1296
+ o === F.BuiltInOperatorNames.And && s > 1 && (r.and = "1"), e.start("customFilters", r);
1297
+ for (let r = 0; r < s; r++) {
1298
+ const o = n[r], s = o.operator === fe.Not && c(o.param?.operator);
1299
+ c(o.operator) || s ? ge(t, e, o) : t.warn("Only Comparison criteria supported in Union conditions for Table AutoFilters", o);
1300
+ }
1301
+ e.end("customFilters");
1302
+ }
1303
+ } else c(o) && (e.start("customFilters"), ge(t, e, r), e.end("customFilters"));
1304
+ if (o === F.BuiltInOperatorNames.TimePeriod) {
1305
+ const t = r.param, o = {};
1306
+ t.type && (o.type = t.type), void 0 !== t.anchorDate && (o.val = "" + t.anchorDate), void 0 !== t.maxVal && (o.maxVal = "" + t.maxVal), e.empty("dynamicFilter", o);
1307
+ }
1308
+ if (o === F.BuiltInOperatorNames.Average) {
1309
+ const t = r.param, o = {};
1310
+ let n = t.type;
1311
+ n && (n === F.AverageType.Above ? o.type = "aboveAverage" : n === F.AverageType.Below && (o.type = "belowAverage")), void 0 !== t.stdDevs && (o.val = "" + t.stdDevs), e.empty("dynamicFilter", o);
1312
+ }
1313
+ if (o === F.BuiltInOperatorNames.InSet) {
1314
+ const t = r.param;
1315
+ if (t.dateGroups) {
1316
+ const r = t.dateGroups, o = r.length;
1317
+ e.start("dateGroupItem");
1318
+ for (let t = 0; t < o; t++) {
1319
+ const o = r[t], n = {};
1320
+ void 0 !== o.day && (n.day = "" + o.day), void 0 !== o.hour && (n.hour = "" + o.hour), void 0 !== o.minute && (n.minute = "" + o.minute), void 0 !== o.second && (n.second = "" + o.second), void 0 !== o.year && (n.year = "" + o.year), void 0 !== o.month && (n.month = "" + o.month), n.dateTimeGrouping = o.group, e.empty("dateGroupItem", n);
1321
+ }
1322
+ e.end("dateGroupItem");
1323
+ }
1324
+ if (t.items) {
1325
+ const r = t.items, o = r.length;
1326
+ e.start("filters");
1327
+ for (let t = 0; t < o; t++) {
1328
+ const o = r[t];
1329
+ e.empty("filter", { val: "" + o });
1330
+ }
1331
+ e.end("filters");
1332
+ }
1333
+ }
1334
+ if (o === F.BuiltInOperatorNames.Icon) {
1335
+ const t = r.param, o = {};
1336
+ void 0 !== t.iconSet && (o.iconSet = t.iconSet), void 0 !== t.iconId && (o.iconId = "" + t.iconId), e.empty("iconFilter", o);
1337
+ }
1338
+ if (o === F.BuiltInOperatorNames.TopN) {
1339
+ const t = r.param, o = {};
1340
+ t.percent && (o.percent = "1"), void 0 !== t.top && (o.top = t.top ? "1" : "0"), void 0 !== t.limit && (o.val = "" + t.limit), void 0 !== t.filterVal && (o.filterVal = "" + t.filterVal), e.empty("top10", o);
1341
+ }
1342
+ } else t.warn("Unique conditions not supported in Table AutoFilters", r);
1343
+ else t.warn("Expression conditions not supported in Table AutoFilters", r);
1344
+ })(t, e, o), e.end("filterColumn")) : e.empty("filterColumn", s);
1345
+ }, xe = (t) => t === F.BuiltInOperatorNames.GreaterThan || t === F.BuiltInOperatorNames.GreaterThanEqualTo || t === F.BuiltInOperatorNames.LessThan || t === F.BuiltInOperatorNames.LessThanEqualTo || t === F.BuiltInOperatorNames.EqualTo || t === F.BuiltInOperatorNames.And || t === F.BuiltInOperatorNames.Or || t === F.BuiltInOperatorNames.Not || "between" === t, ve = "16.0000", Se = 1048575, we = 16383;
1346
+ var be = {
1347
+ names: /* @__PURE__ */ new Set(),
1348
+ perFormula: [],
1349
+ affects: () => !1
1350
+ };
1351
+ var Ce = 1048576, Te = (t, e, r) => {
1352
+ if (!r) return [];
1353
+ let o = 0;
1354
+ for (let n = 0; n < r.length; n++) {
1355
+ const s = r[n][0], a = e.getRange(s).getCoords();
1356
+ if (o += (a.rowEnd - a.rowStart + 1) * (a.colEnd - a.colStart + 1), o > Ce) return t.warn(`Direct styles cover more than ${Ce} cells; not writing the styles from '${s}' on. A range that size belongs in a column or row style.`), r.slice(0, n);
1357
+ }
1358
+ return r;
1359
+ };
1360
+ function ke(t, e) {
1361
+ let r = e.type;
1362
+ r === A.ColorStopType.AutoMin ? r = A.ColorStopType.Min : r === A.ColorStopType.AutoMax && (r = A.ColorStopType.Max), t.empty("cfvo", {
1363
+ type: r,
1364
+ val: e.value,
1365
+ gte: e.exclusive ? "0" : void 0
1366
+ });
1367
+ }
1368
+ function Me(t, e) {
1369
+ const r = {
1370
+ type: e.type,
1371
+ gte: e.exclusive ? "0" : void 0
1372
+ };
1373
+ void 0 !== e.value ? (t.start("x14:cfvo", r), t.start("xm:f"), t.text(e.value), t.end("xm:f"), t.end("x14:cfvo")) : t.empty("x14:cfvo", r);
1374
+ }
1375
+ var Re = /* @__PURE__ */ new Set([
1376
+ E.IconSet.Arrows3,
1377
+ E.IconSet.ArrowsGray3,
1378
+ E.IconSet.Flags3,
1379
+ E.IconSet.Signs3,
1380
+ E.IconSet.Symbols3,
1381
+ E.IconSet.Symbols3_2,
1382
+ E.IconSet.TrafficLights3,
1383
+ E.IconSet.TrafficLights3_2,
1384
+ E.IconSet.Arrows4,
1385
+ E.IconSet.ArrowsGray4,
1386
+ E.IconSet.Rating4,
1387
+ E.IconSet.RedToBlack4,
1388
+ E.IconSet.TrafficLights4,
1389
+ E.IconSet.Arrows5,
1390
+ E.IconSet.ArrowsGray5,
1391
+ E.IconSet.Quarters5,
1392
+ E.IconSet.Rating5
1393
+ ]);
1394
+ function Ie(t) {
1395
+ return (t.icon?.length ?? 0) > 0 || void 0 !== t.iconSet && !Re.has(t.iconSet);
1396
+ }
1397
+ function Fe(t, e, r, o, s, a, l, i, c) {
1398
+ const d = o.scale;
1399
+ o.ext && t.warn("Conditional format extension payload is not written to xlsx; it will be lost.");
1400
+ const p = {
1401
+ type: s.type,
1402
+ dxfId: o.style && Object.keys(o.style).length > 0 ? i.add(o.style) : void 0,
1403
+ priority: l,
1404
+ stopIfTrue: Le(o.stopIfTrue),
1405
+ aboveAverage: Le(s.aboveAverage),
1406
+ equalAverage: Le(s.equalAverage),
1407
+ stdDev: s.stdDev,
1408
+ bottom: Le(s.bottom),
1409
+ percent: Le(s.percent),
1410
+ rank: s.rank,
1411
+ operator: s.operator,
1412
+ text: s.text,
1413
+ timePeriod: s.timePeriod
1414
+ };
1415
+ let m;
1416
+ d?.type === A.ScaleType.DataBar && function(t) {
1417
+ if (t.gradient || t.borderColor || t.negativeFillColor || t.negativeBorderColor || t.axisColor || t.axisPosition || t.direction) return !0;
1418
+ const e = t.stops, r = e ? e.length : 0;
1419
+ for (let t = 0; t < r; t++) {
1420
+ const r = e[t].type;
1421
+ if (r === A.ColorStopType.AutoMin || r === A.ColorStopType.AutoMax) return !0;
1422
+ }
1423
+ return !1;
1424
+ }(d) && (m = w(k.uuidV4), c.push({
1425
+ guid: m,
1426
+ sqref: a,
1427
+ priority: l,
1428
+ scale: d
1429
+ }));
1430
+ const f = s.formulas, u = f ? f.length : 0;
1431
+ if (0 !== u || d) {
1432
+ e.start("cfRule", p);
1433
+ for (let t = 0; t < u; t++) e.start("formula"), e.text(f[t]), e.end("formula");
1434
+ if (d?.type === A.ScaleType.ColorScale) {
1435
+ const t = d.stops ?? [];
1436
+ e.start("colorScale");
1437
+ for (let r = 0; r < t.length; r++) ke(e, t[r]);
1438
+ for (let o = 0; o < t.length; o++) Pt(e, r, t[o].color, "color");
1439
+ e.end("colorScale");
1440
+ } else if (d?.type === A.ScaleType.DataBar) {
1441
+ const t = d.stops ?? [];
1442
+ e.start("dataBar", {
1443
+ minLength: d.minLength,
1444
+ maxLength: d.maxLength,
1445
+ showValue: Le(d.showValue)
1446
+ });
1447
+ for (let r = 0; r < t.length; r++) ke(e, t[r]);
1448
+ d.color && Pt(e, r, d.color, "color"), e.end("dataBar");
1449
+ } else if (d?.type === A.ScaleType.IconSet) {
1450
+ const t = d.stops ?? [];
1451
+ e.start("iconSet", {
1452
+ iconSet: d.iconSet,
1453
+ reverse: Le(d.reverse),
1454
+ showValue: Le(d.showValue)
1455
+ });
1456
+ for (let r = 0; r < t.length; r++) ke(e, t[r]);
1457
+ e.end("iconSet");
1458
+ }
1459
+ m && (e.start("extLst"), e.start("ext", {
1460
+ uri: h,
1461
+ "xmlns:x14": n
1462
+ }), e.start("x14:id"), e.text(m), e.end("x14:id"), e.end("ext"), e.end("extLst")), e.end("cfRule");
1463
+ } else e.empty("cfRule", p);
1464
+ }
1465
+ function Ae(t) {
1466
+ return t.split(" ")[0].split(":")[0];
1467
+ }
1468
+ function Pe(t) {
1469
+ if ("string" == typeof t) return t.split(",").join(" ");
1470
+ if (Array.isArray(t)) {
1471
+ const e = [];
1472
+ for (let r = 0; r < t.length; r++) {
1473
+ const o = b.rangeToString(t[r]);
1474
+ o && e.push(o);
1475
+ }
1476
+ return e.length > 0 ? e.join(" ") : null;
1477
+ }
1478
+ return b.rangeToString(t);
1479
+ }
1480
+ function Le(t) {
1481
+ if (void 0 !== t) return t ? "1" : "0";
1482
+ }
1483
+ function _e(t) {
1484
+ if ("string" != typeof t) return !1;
1485
+ let e = !1;
1486
+ for (let r = 0; r < t.length; r++) {
1487
+ const o = t[r];
1488
+ if ("\"" === o) e = !e;
1489
+ else if ("!" === o && !e) return !0;
1490
+ }
1491
+ return !1;
1492
+ }
1493
+ function De(t) {
1494
+ const e = t.formulas, r = e ? e.length : 0;
1495
+ for (let t = 0; t < r; t++) if (_e(e[t])) return !0;
1496
+ return !1;
1497
+ }
1498
+ var Ee = {
1499
+ r: void 0,
1500
+ s: void 0,
1501
+ t: void 0,
1502
+ cm: void 0,
1503
+ vm: void 0
1504
+ }, Ne = {
1505
+ r: void 0,
1506
+ s: void 0,
1507
+ customFormat: void 0,
1508
+ hidden: void 0,
1509
+ ht: void 0,
1510
+ customHeight: void 0,
1511
+ "x14ac:dyDescent": "0.25",
1512
+ outlineLevel: void 0,
1513
+ collapsed: void 0
1514
+ }, Oe = {
1515
+ t: void 0,
1516
+ aca: void 0,
1517
+ ref: void 0,
1518
+ ca: void 0,
1519
+ si: void 0
1520
+ }, Be = {
1521
+ t: "shared",
1522
+ aca: void 0,
1523
+ ref: void 0,
1524
+ ca: void 0,
1525
+ si: void 0
1526
+ }, Ve = {
1527
+ t: "array",
1528
+ aca: void 0,
1529
+ ref: void 0,
1530
+ ca: void 0,
1531
+ si: void 0
1532
+ };
1533
+ function $e(t, e, r, o) {
1534
+ r && (e.start(o), e.empty("latin", { typeface: r }), e.empty("ea", { typeface: "" }), e.empty("cs", { typeface: "" }), e.end(o));
1535
+ }
1536
+ var We = (t) => t.toISOString().split(".")[0] + "Z", ze = (t, e, r) => {
1531
1537
  switch (e) {
1532
1538
  case "creator":
1533
1539
  t.start("dc:creator"), t.text(r), t.end("dc:creator");
@@ -1540,10 +1546,10 @@ var Ee = 164, Ne = Object.freeze([
1540
1546
  break;
1541
1547
  case "modified": t.start("dcterms:modified", { "xsi:type": "dcterms:W3CDTF" }), t.text(r), t.end("dcterms:modified");
1542
1548
  }
1543
- }, Be = (t, e, r, o) => {
1549
+ }, je = (t, e, r, o) => {
1544
1550
  e.start(r), e.text(o), e.end(r);
1545
- }, Ve = (t, e, r) => {
1546
- const o = r.getSheets().getItems({ visibility: A.Visibility.Hidden }).map((t) => t.getName()), n = r.getNames().getItems({ type: "formula" }).filter((t) => !!t.getRanges?.()).map((t) => t.getName());
1551
+ }, Xe = (t, e, r) => {
1552
+ const o = r.getSheets().getItems({ visibility: _.Visibility.Hidden }).map((t) => t.getName()), n = r.getNames().getItems({ type: "formula" }).filter((t) => !!t.getRanges?.()).map((t) => t.getName());
1547
1553
  e.start("HeadingPairs"), e.start("vt:vector", {
1548
1554
  size: n.length > 0 ? "4" : "2",
1549
1555
  baseType: "variant"
@@ -1554,7 +1560,7 @@ var Ee = 164, Ne = Object.freeze([
1554
1560
  for (const t of o) e.start("vt:lpstr"), e.text(t), e.end("vt:lpstr");
1555
1561
  for (const t of n) e.start("vt:lpstr"), e.text(t), e.end("vt:lpstr");
1556
1562
  e.end("vt:vector"), e.end("TitlesOfParts");
1557
- }, $e = {
1563
+ }, Ue = {
1558
1564
  minSupportedVersion: "120000",
1559
1565
  copy: "1",
1560
1566
  pasteAll: "1",
@@ -1566,18 +1572,18 @@ var Ee = 164, Ne = Object.freeze([
1566
1572
  clearComments: "1",
1567
1573
  assign: "1",
1568
1574
  coerce: "1"
1569
- }, We = (t, e, r = C.EmptyArray) => {
1575
+ }, He = (t, e, r = k.EmptyArray) => {
1570
1576
  if (!e) return { ...r };
1571
1577
  const { text: o, runs: n, color: s, size: a, kern: l, weight: i, style: c, b: d, i: p, spc: m, baseline: f, ...u } = e, h = {
1572
1578
  ...r,
1573
1579
  ...u
1574
1580
  };
1575
- return void 0 !== a && (h.sz = "" + Te(a)), void 0 !== d && (h.b = d ? "1" : "0"), void 0 !== i && (h.b = i > 500 ? "1" : "0"), void 0 !== p && (h.i = p ? "1" : "0"), void 0 !== c && (h.i = "italic" === c ? "1" : "0"), void 0 !== l && (h.kern = "" + Te(l)), void 0 !== m && (h.spc = "" + Te(m)), void 0 !== f && (h.baseline = "" + Te(f)), h;
1576
- }, ze = (t, e, r) => {
1581
+ return void 0 !== a && (h.sz = "" + Qt(a)), void 0 !== d && (h.b = d ? "1" : "0"), void 0 !== i && (h.b = i > 500 ? "1" : "0"), void 0 !== p && (h.i = p ? "1" : "0"), void 0 !== c && (h.i = "italic" === c ? "1" : "0"), void 0 !== l && (h.kern = "" + Qt(l)), void 0 !== m && (h.spc = "" + Qt(m)), void 0 !== f && (h.baseline = "" + Qt(f)), h;
1582
+ }, qe = (t, e, r) => {
1577
1583
  if (!r) return;
1578
1584
  const o = t.getXMLWriter();
1579
1585
  o.start("txBody"), o.pushDefaultNamespace("a");
1580
- Xe(t, e, {
1586
+ Je(t, e, {
1581
1587
  vertOverflow: "clip",
1582
1588
  horzOverflow: "clip",
1583
1589
  rtlCol: "0",
@@ -1587,28 +1593,28 @@ var Ee = 164, Ne = Object.freeze([
1587
1593
  const o = t.getXMLWriter();
1588
1594
  o.pushDefaultNamespace("a"), "string" == typeof r && (r = { runs: [{ text: r }] }), o.start("p");
1589
1595
  o.empty("pPr", { algn: "ctr" });
1590
- const s = We(0, r, {
1591
- ...Ue,
1596
+ const s = He(0, r, {
1597
+ ...Ke,
1592
1598
  size: e.getDefaultFontSize()
1593
1599
  }), a = r?.runs, l = a ? a.length : 0;
1594
1600
  if (l > 0) for (let t = 0; t < l; t++) {
1595
1601
  const r = a[t];
1596
1602
  o.start("r", {});
1597
- const n = We(0, r, Ue), s = r.color;
1598
- s ? (o.start("rPr", n), me(0, o, s, e), o.end("rPr")) : o.empty("rPr", n), o.start("t"), o.text(r?.text ?? ""), o.end("t"), o.end("r");
1603
+ const n = He(0, r, Ke), s = r.color;
1604
+ s ? (o.start("rPr", n), Wt(0, o, s, e), o.end("rPr")) : o.empty("rPr", n), o.start("t"), o.text(r?.text ?? ""), o.end("t"), o.end("r");
1599
1605
  }
1600
1606
  else o.empty("endParaRPr", s);
1601
1607
  o.end("p"), o.popDefaultNamespace();
1602
1608
  })(t, e, r), o.popDefaultNamespace(), o.end("txBody");
1603
- }, je = (t, e, r) => {
1609
+ }, Ge = (t, e, r) => {
1604
1610
  if (!r) return;
1605
- const o = t.getXMLWriter(), n = We(0, r);
1611
+ const o = t.getXMLWriter(), n = He(0, r);
1606
1612
  o.empty("defRPr", n);
1607
- }, Xe = (t, e, r) => {
1613
+ }, Je = (t, e, r) => {
1608
1614
  if (!r) return;
1609
1615
  const o = t.getXMLWriter(), { spAutoFit: n, ...s } = r;
1610
1616
  n ? (o.start("bodyPr", s), o.empty("spAutoFit"), o.end("bodyPr")) : o.empty("bodyPr", s);
1611
- }, Ue = Object.freeze({ lang: "en-US" }), qe = (t, e) => {
1617
+ }, Ke = Object.freeze({ lang: "en-US" }), Ye = (t, e) => {
1612
1618
  if (0 !== e.length) {
1613
1619
  t.start("a:extLst");
1614
1620
  for (const r of e) {
@@ -1617,10 +1623,10 @@ var Ee = 164, Ne = Object.freeze([
1617
1623
  }
1618
1624
  t.end("a:extLst");
1619
1625
  }
1620
- }, He = async (t, e, r, o, n) => {
1626
+ }, Ze = async (t, e, r, o, n) => {
1621
1627
  const s = t.getSharedStates(), a = o.getContent().getResource(), l = await a.getExternalURI();
1622
1628
  let i;
1623
- if (l) i = t.addExternal(ve, l);
1629
+ if (l) i = t.addExternal(Gt, l);
1624
1630
  else if (i = r.get(a), !i) {
1625
1631
  let e = s.get("imagesWritten");
1626
1632
  e || (e = /* @__PURE__ */ new Map(), s.set("imagesWritten", e));
@@ -1629,11 +1635,11 @@ var Ee = 164, Ne = Object.freeze([
1629
1635
  const t = await a.toBuffer();
1630
1636
  o = {
1631
1637
  bytes: new Uint8Array(t),
1632
- type: await a.getType() ?? we,
1638
+ type: await a.getType() ?? Jt,
1633
1639
  index: e.size + 1
1634
1640
  }, e.set(a, o);
1635
1641
  }
1636
- i = t.addBinary(o.bytes, o.type.mime, ve, `../media/image${o.index}.${o.type.ext}`, !0), r.set(a, i);
1642
+ i = t.addBinary(o.bytes, o.type.mime, Gt, `../media/image${o.index}.${o.type.ext}`, !0), r.set(a, i);
1637
1643
  }
1638
1644
  const c = { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships" };
1639
1645
  l ? c["r:link"] = i.relId : c["r:embed"] = i.relId;
@@ -1647,31 +1653,31 @@ var Ee = 164, Ne = Object.freeze([
1647
1653
  }
1648
1654
  ]);
1649
1655
  const p = t.getXMLWriter();
1650
- p.start("pic"), p.start("nvPicPr"), or(t, p, o, n, e), sr(t, p, o, n), p.end("nvPicPr"), p.start("blipFill"), p.start("a:blip", c), qe(p, d), p.end("a:blip"), p.start("a:stretch"), p.empty("a:fillRect"), p.end("a:stretch"), p.end("blipFill"), er(t, e, r, o, n), p.end("pic");
1651
- }, Ge = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", Je = async (t, e, r, o, n, s) => {
1656
+ p.start("pic"), p.start("nvPicPr"), ir(t, p, o, n, e), dr(t, p, o, n), p.end("nvPicPr"), p.start("blipFill"), p.start("a:blip", c), Ye(p, d), p.end("a:blip"), p.start("a:stretch"), p.empty("a:fillRect"), p.end("a:stretch"), p.end("blipFill"), ar(t, e, r, o, n), p.end("pic");
1657
+ }, Qe = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", tr = async (t, e, r, o, n, s) => {
1652
1658
  const a = n.content?.json, l = a?.xml, i = a?.chartRelId, c = a?.chartTargetPath;
1653
- if (!l || !i || !c) return tr(t, e, r, o, n);
1659
+ if (!l || !i || !c) return sr(t, e, r, o, n);
1654
1660
  const d = t.getSharedStates();
1655
1661
  let p, m = d.get("claimedChartTargets");
1656
1662
  if (m || (m = /* @__PURE__ */ new Set(), d.set("claimedChartTargets", m)), m.has(c)) {
1657
- const s = t.forkPreservedPart(c, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", Ge, "../charts/chart{n}.xml");
1658
- if (!s?.relId) return tr(t, e, r, o, n);
1663
+ const s = t.forkPreservedPart(c, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", Qe, "../charts/chart{n}.xml");
1664
+ if (!s?.relId) return sr(t, e, r, o, n);
1659
1665
  p = s.relId;
1660
- } else m.add(c), p = t.addPreservedRelationship(Ge, c, i);
1666
+ } else m.add(c), p = t.addPreservedRelationship(Qe, c, i);
1661
1667
  let f = p === i ? l : l.replace(`r:id="${i}"`, `r:id="${p}"`);
1662
1668
  void 0 !== s && "number" == typeof a?.sourceId && (f = f.replace(`cNvPr id="${a.sourceId}"`, `cNvPr id="${s}"`)), t.getXMLWriter().raw(f);
1663
- }, Ke = async (t, e, r, o, n) => tr(t, e, r, o, n), Ye = async (t, e, r, o, n) => tr(t, e, r, o, n), Ze = async (t, e, r, o, n) => tr(t, e, r, o, n), Qe = async (t, e, r, o, n, s) => {
1669
+ }, er = async (t, e, r, o, n) => sr(t, e, r, o, n), rr = async (t, e, r, o, n) => sr(t, e, r, o, n), or = async (t, e, r, o, n) => sr(t, e, r, o, n), nr = async (t, e, r, o, n, s) => {
1664
1670
  const a = n.content?.json, l = a?.xml;
1665
- if (!l) return tr(t, e, r, o, n);
1671
+ if (!l) return sr(t, e, r, o, n);
1666
1672
  const i = void 0 !== s && "number" == typeof a?.sourceId ? l.replace(`cNvPr id="${a.sourceId}"`, `cNvPr id="${s}"`) : l;
1667
1673
  t.getXMLWriter().raw(i);
1668
- }, tr = async (t, e, r, o, n) => {
1674
+ }, sr = async (t, e, r, o, n) => {
1669
1675
  (async (t, e, r, o, n) => {
1670
1676
  const s = t.getXMLWriter(), a = {}, l = n.content?.json, i = l?.type ?? "sp", c = e.getStyles();
1671
- "cxnSp" === i ? (a.macro = "", s.start("cxnSp", a), s.start("nvCxnSpPr"), or(t, s, o, n, e), nr(t, s, o, n, e), s.start("cNvCxnSpPr"), s.empty("a:stCnx", {
1677
+ "cxnSp" === i ? (a.macro = "", s.start("cxnSp", a), s.start("nvCxnSpPr"), ir(t, s, o, n, e), cr(t, s, o, n, e), s.start("cNvCxnSpPr"), s.empty("a:stCnx", {
1672
1678
  id: "0",
1673
1679
  idx: "0"
1674
- }), s.end("cNvCxnSpPr"), s.end("nvCxnSpPr"), er(t, e, r, o, n), rr(t, e, r, o, n), ze(t, c, l?.text), s.end("cxnSp")) : "grpSp" === i || (a.macro = "", a.textlink = "", s.start("sp", a), s.start("nvSpPr"), or(t, s, o, n, e), nr(t, s, o, n, e), s.end("nvSpPr"), er(t, e, r, o, n), rr(t, e, r, o, n), ze(t, c, l?.text), s.end("sp"));
1680
+ }), s.end("cNvCxnSpPr"), s.end("nvCxnSpPr"), ar(t, e, r, o, n), lr(t, e, r, o, n), qe(t, c, l?.text), s.end("cxnSp")) : "grpSp" === i || (a.macro = "", a.textlink = "", s.start("sp", a), s.start("nvSpPr"), ir(t, s, o, n, e), cr(t, s, o, n, e), s.end("nvSpPr"), ar(t, e, r, o, n), lr(t, e, r, o, n), qe(t, c, l?.text), s.end("sp"));
1675
1681
  })(t, e, r, o, {
1676
1682
  ...n,
1677
1683
  content: {
@@ -1689,13 +1695,13 @@ var Ee = 164, Ne = Object.freeze([
1689
1695
  }
1690
1696
  }
1691
1697
  });
1692
- }, er = (t, e, r, o, n) => {
1698
+ }, ar = (t, e, r, o, n) => {
1693
1699
  const s = t.getXMLWriter(), a = n.content?.json, l = a?.geometry ?? "rect", i = e.getStyles();
1694
- s.start("spPr"), s.pushDefaultNamespace("a"), ar(s, o, n), s.start("prstGeom", { prst: l }), s.empty("avLst"), s.end("prstGeom"), he(t, i, a), s.popDefaultNamespace(), s.end("spPr");
1695
- }, rr = (t, e, r, o, n) => {
1700
+ s.start("spPr"), s.pushDefaultNamespace("a"), pr(s, o, n), s.start("prstGeom", { prst: l }), s.empty("avLst"), s.end("prstGeom"), Xt(t, i, a), s.popDefaultNamespace(), s.end("spPr");
1701
+ }, lr = (t, e, r, o, n) => {
1696
1702
  const s = t.getXMLWriter();
1697
1703
  s.start("style"), s.pushDefaultNamespace("a"), s.start("lnRef", { idx: "1" }), s.start("schemeClr", { val: "accent1" }), s.empty("shade", { val: "15000" }), s.end("schemeClr"), s.end("lnRef"), s.start("fillRef", { idx: "1" }), s.empty("schemeClr", { val: "accent1" }), s.end("fillRef"), s.start("effectRef", { idx: "0" }), s.empty("schemeClr", { val: "accent1" }), s.end("effectRef"), s.start("fontRef", { idx: "minor" }), s.empty("schemeClr", { val: "lt1" }), s.end("fontRef"), s.popDefaultNamespace(), s.end("style");
1698
- }, or = (t, e, r, o, n) => {
1704
+ }, ir = (t, e, r, o, n) => {
1699
1705
  const s = t.getSharedStates();
1700
1706
  let a = s.get("uniqueIdCounter");
1701
1707
  a || (a = /* @__PURE__ */ new Map(), s.set("uniqueIdCounter", a));
@@ -1712,27 +1718,27 @@ var Ee = 164, Ne = Object.freeze([
1712
1718
  "a16:creationId",
1713
1719
  {
1714
1720
  "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main",
1715
- id: `{${C.uuidV4().toUpperCase()}}`
1721
+ id: `{${k.uuidV4().toUpperCase()}}`
1716
1722
  }
1717
- ]), e.start("cNvPr", i), qe(e, c), e.end("cNvPr");
1718
- }, nr = (t, e, r, o, n) => {
1723
+ ]), e.start("cNvPr", i), Ye(e, c), e.end("cNvPr");
1724
+ }, cr = (t, e, r, o, n) => {
1719
1725
  e.empty("cNvSpPr");
1720
- }, sr = (t, e, r, o) => {
1726
+ }, dr = (t, e, r, o) => {
1721
1727
  const n = {};
1722
1728
  if (o.lockAspect && (n.noChangeAspect = "1"), o.locks) for (const t of Object.keys(o.locks)) !0 === o.locks[t] && (n[t] = "1");
1723
1729
  e.start("cNvPicPr", {}), e.empty("a:picLocks", n), e.end("cNvPicPr");
1724
- }, ar = (t, e, r) => {
1730
+ }, pr = (t, e, r) => {
1725
1731
  const o = e.getBounds(), n = {}, s = r.rotation;
1726
- void 0 !== s && 0 !== s && (n.rot = "" + Ce(s)), t.start("xfrm", n), t.start("off", {
1727
- x: be(o.x),
1728
- y: be(o.y)
1732
+ void 0 !== s && 0 !== s && (n.rot = "" + Zt(s)), t.start("xfrm", n), t.start("off", {
1733
+ x: Yt(o.x),
1734
+ y: Yt(o.y)
1729
1735
  }), t.end("off"), t.start("ext", {
1730
- cx: be(o.width),
1731
- cy: be(o.height)
1736
+ cx: Yt(o.width),
1737
+ cy: Yt(o.height)
1732
1738
  }), t.end("ext"), t.end("xfrm");
1733
- }, lr = (t, e, r) => {
1734
- t.start(e), t.start("col"), t.text(r.c ?? 0), t.end("col"), t.start("colOff"), t.text(be(r.x)), t.end("colOff"), t.start("row"), t.text(r.r ?? 0), t.end("row"), t.start("rowOff"), t.text(be(r.y)), t.end("rowOff"), t.end(e);
1735
- }, ir = 0, cr = (t, e, r, o) => {
1739
+ }, mr = (t, e, r) => {
1740
+ t.start(e), t.start("col"), t.text(r.c ?? 0), t.end("col"), t.start("colOff"), t.text(Yt(r.x)), t.end("colOff"), t.start("row"), t.text(r.r ?? 0), t.end("row"), t.start("rowOff"), t.text(Yt(r.y)), t.end("rowOff"), t.end(e);
1741
+ }, fr = 0, ur = (t, e, r, o) => {
1736
1742
  const n = o.columns, s = n ? n.length : 0;
1737
1743
  if (0 !== s) {
1738
1744
  e.start("tableColumns", { count: s });
@@ -1742,11 +1748,11 @@ var Ee = 164, Ne = Object.freeze([
1742
1748
  const o = {};
1743
1749
  o.id = t + 1, o.name = r.name ?? `Column${t + 1}`;
1744
1750
  let s = null, a = r.totalsRowFormula;
1745
- a && ("number" == typeof a && (a = mr.get(a)), a && !pr.has(a.toLowerCase()) && (s = a, a = "custom"), a && (o.totalsRowFunction = a)), r.totalsRowLabel && (o.totalsRowLabel = r.totalsRowLabel), s ? (e.start("tableColumn", o), e.start("totalsRowFormula"), e.text(s), e.end("totalsRowFormula"), e.end("tableColumn")) : e.empty("tableColumn", o);
1751
+ a && ("number" == typeof a && (a = yr.get(a)), a && !gr.has(a.toLowerCase()) && (s = a, a = "custom"), a && (o.totalsRowFunction = a)), r.totalsRowLabel && (o.totalsRowLabel = r.totalsRowLabel), s ? (e.start("tableColumn", o), e.start("totalsRowFormula"), e.text(s), e.end("totalsRowFormula"), e.end("tableColumn")) : e.empty("tableColumn", o);
1746
1752
  }
1747
1753
  e.end("tableColumns");
1748
1754
  }
1749
- }, dr = (t, e, r, o) => {
1755
+ }, hr = (t, e, r, o) => {
1750
1756
  const n = {
1751
1757
  name: r.getStyle().getName(),
1752
1758
  showFirstColumn: r.isShowHighlightFirstColumn() ? "1" : "0",
@@ -1755,7 +1761,7 @@ var Ee = 164, Ne = Object.freeze([
1755
1761
  showColumnStripes: r.isShowBandedColumns() ? "1" : "0"
1756
1762
  };
1757
1763
  e.empty("tableStyleInfo", n);
1758
- }, pr = /* @__PURE__ */ new Map([
1764
+ }, gr = /* @__PURE__ */ new Map([
1759
1765
  ["average", 101],
1760
1766
  ["countnums", 102],
1761
1767
  ["count", 103],
@@ -1766,22 +1772,22 @@ var Ee = 164, Ne = Object.freeze([
1766
1772
  ["stddevp", 108],
1767
1773
  ["sum", 109],
1768
1774
  ["var", 110]
1769
- ]), mr = /* @__PURE__ */ new Map();
1770
- pr.forEach((t, e) => {
1771
- mr.set(t, e);
1775
+ ]), yr = /* @__PURE__ */ new Map();
1776
+ gr.forEach((t, e) => {
1777
+ yr.set(t, e);
1772
1778
  });
1773
- var fr = (t, e, r, o) => {
1779
+ var xr = (t, e, r, o) => {
1774
1780
  e.start("mc:AlternateContent", { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }), e.start("mc:Choice", {
1775
1781
  Requires: "c14",
1776
1782
  "xmlns:c14": "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"
1777
1783
  }), e.empty("c14:style", { val: "102" }), e.end("mc:Choice"), e.start("mc:Fallback"), e.empty("c:style", { val: "2" }), e.end("mc:Fallback"), e.end("mc:AlternateContent");
1778
- }, ur = (t, e, r, o, n) => {
1784
+ }, vr = (t, e, r, o, n) => {
1779
1785
  e.start("chart"), ((t, e, r, o, n) => {
1780
- e.start("title"), e.empty("overlay", { val: "0" }), he(t, r, n, "spPr", !0), e.end("title"), e.empty("autoTitleDeleted", { val: "0" });
1786
+ e.start("title"), e.empty("overlay", { val: "0" }), Xt(t, r, n, "spPr", !0), e.end("title"), e.empty("autoTitleDeleted", { val: "0" });
1781
1787
  })(t, e, r, 0, n), ((t, e, r, o, n) => {
1782
- e.start("plotArea"), e.empty("layout"), he(t, r, n, "spPr", !0), e.end("plotArea");
1788
+ e.start("plotArea"), e.empty("layout"), Xt(t, r, n, "spPr", !0), e.end("plotArea");
1783
1789
  })(t, e, r, 0, n), e.empty("plotVisOnly", { val: "1" }), e.empty("dispBlanksAs", { val: "gap" }), e.empty("showDLblsOverMax", { val: "0" }), e.end("chart");
1784
- }, hr = (t, e, r, o) => {
1790
+ }, Sr = (t, e, r, o) => {
1785
1791
  e.start("printSettings"), e.empty("headerFooter"), e.empty("pageMargins", {
1786
1792
  b: "0.75",
1787
1793
  l: "0.7",
@@ -1790,16 +1796,16 @@ var fr = (t, e, r, o) => {
1790
1796
  header: "0.3",
1791
1797
  footer: "0.3"
1792
1798
  }), e.empty("pageSetup"), e.end("printSettings");
1793
- }, gr = (t, e, r, o, n, s = "0") => {
1799
+ }, wr = (t, e, r, o, n, s = "0") => {
1794
1800
  const a = n?.color, l = { idx: n?.idx ?? s };
1795
- void 0 !== a ? (e.start(o, l), "auto" === a ? e.empty("styleClr", { val: "auto" }) : (e.pushDefaultNamespace("a"), Mt(e, r.getTheme(), a), e.popDefaultNamespace()), e.end(o)) : e.empty(o, l);
1796
- }, yr = (t, e, r, o) => {
1801
+ void 0 !== a ? (e.start(o, l), "auto" === a ? e.empty("styleClr", { val: "auto" }) : (e.pushDefaultNamespace("a"), Ft(e, r.getTheme(), a), e.popDefaultNamespace()), e.end(o)) : e.empty(o, l);
1802
+ }, br = (t, e, r, o) => {
1797
1803
  const n = r.length;
1798
1804
  for (let s = 0; s < n; s++) {
1799
1805
  const n = r[s];
1800
- n.empty ? e.empty(n.type, n.mods) : (e.start(n.type, n.mods), gr(0, e, o, "lnRef", n.lineRef, "0"), gr(0, e, o, "fillRef", n.fillRef, "0"), gr(0, e, o, "effectRef", n.effectRef, "0"), gr(0, e, o, "fontRef", n.fontRef, "minor"), he(t, o, n, "spPr"), je(t, 0, n.defRPr), Xe(t, o, n.bodyPr), e.end(n.type));
1806
+ n.empty ? e.empty(n.type, n.mods) : (e.start(n.type, n.mods), wr(0, e, o, "lnRef", n.lineRef, "0"), wr(0, e, o, "fillRef", n.fillRef, "0"), wr(0, e, o, "effectRef", n.effectRef, "0"), wr(0, e, o, "fontRef", n.fontRef, "minor"), Xt(t, o, n, "spPr"), Ge(t, 0, n.defRPr), Je(t, o, n.bodyPr), e.end(n.type));
1801
1807
  }
1802
- }, Jr = Object.freeze([
1808
+ }, to = Object.freeze([
1803
1809
  {
1804
1810
  type: "axisTitle",
1805
1811
  fontRef: { color: "tx1 lumMod 65 lumOff 35" },
@@ -2151,13 +2157,13 @@ var fr = (t, e, r, o) => {
2151
2157
  fill: { type: "none" },
2152
2158
  stroke: {}
2153
2159
  }
2154
- ]), Kr = (t, e, r) => {
2160
+ ]), eo = (t, e, r) => {
2155
2161
  const o = r.length;
2156
2162
  for (let t = 0; t < o; t++) {
2157
2163
  const o = r[t], n = {}, s = o[0], a = o[1];
2158
2164
  s || a ? (e.start("variation", n), s && e.empty("a:lumMod", { val: s }), a && e.empty("a:lumOff", { val: a }), e.end("variation")) : e.empty("variation", n);
2159
2165
  }
2160
- }, Yr = Object.freeze([
2166
+ }, ro = Object.freeze([
2161
2167
  [0, 0],
2162
2168
  [6e4, 0],
2163
2169
  [8e4, 2e4],
@@ -2167,8 +2173,8 @@ var fr = (t, e, r, o) => {
2167
2173
  [7e4, 3e4],
2168
2174
  [7e4, 0],
2169
2175
  [5e4, 5e4]
2170
- ]), Zr = [
2171
- new class extends j {
2176
+ ]), oo = [
2177
+ new class extends U {
2172
2178
  constructor() {
2173
2179
  super({
2174
2180
  kind: "workbook",
@@ -2190,13 +2196,13 @@ var fr = (t, e, r, o) => {
2190
2196
  "xmlns:xr10": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision10",
2191
2197
  "xmlns:xr2": "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"
2192
2198
  });
2193
- const o = /* @__PURE__ */ new Set(), s = t.getCalculation().getNamedFormulas().getItems();
2194
- for (let t = 0; t < s.length; t++) o.add(s[t].getName().toUpperCase());
2195
- const a = n(o), l = await t.toJSON({
2199
+ const o = /* @__PURE__ */ new Set(), n = t.getCalculation().getNamedFormulas().getItems();
2200
+ for (let t = 0; t < n.length; t++) o.add(n[t].getName().toUpperCase());
2201
+ const s = l(o), a = await t.toJSON({
2196
2202
  ignoreData: !0,
2197
2203
  ignoreResources: !0,
2198
2204
  includeHeaderStyles: !0,
2199
- formulaTransform: a,
2205
+ formulaTransform: s,
2200
2206
  splitDirectBorders: !0
2201
2207
  });
2202
2208
  (function(t, e, r) {
@@ -2207,11 +2213,11 @@ var fr = (t, e, r, o) => {
2207
2213
  const n = o.protection;
2208
2214
  if (!n) return;
2209
2215
  const s = {};
2210
- bt(n.password ?? {}, s, "workbook"), bt(n.revisionsPassword ?? {}, s, "revisions"), n.structure && (s.lockStructure = "1");
2216
+ Tt(n.password ?? {}, s, "workbook"), Tt(n.revisionsPassword ?? {}, s, "revisions"), n.structure && (s.lockStructure = "1");
2211
2217
  n.windows && (s.lockWindows = "1");
2212
2218
  n.revision && (s.lockRevision = "1");
2213
2219
  e.empty("workbookProtection", s);
2214
- }(0, r, 0, l), function(t, e, r) {
2220
+ }(0, r, 0, a), function(t, e, r) {
2215
2221
  e.start("bookViews");
2216
2222
  const o = r.getView(), n = {};
2217
2223
  o.isShowHorizontalScrollbar() || (n.showHorizontalScroll = "0");
@@ -2222,18 +2228,18 @@ var fr = (t, e, r, o) => {
2222
2228
  const a = r.getSelectedSheet().getIndex();
2223
2229
  0 !== a && (n.activeTab = "" + a);
2224
2230
  e.empty("workbookView", n), e.end("bookViews");
2225
- }(0, r, t, l.view), r.start("sheets");
2231
+ }(0, r, t, a.view), r.start("sheets");
2226
2232
  const i = e.getSharedStates();
2227
- i.set("formulaTransform", a);
2233
+ i.set("formulaTransform", s);
2228
2234
  const c = t.getStrings().beginPersist();
2229
2235
  i.set("persistStrings", c);
2230
- const d = new Ct();
2236
+ const d = new kt();
2231
2237
  i.set("metaCollector", d);
2232
- const p = new Tt(d, e.warn.bind(e));
2238
+ const p = new Mt(d, e.warn.bind(e));
2233
2239
  i.set("persistRichTypes", p);
2234
2240
  try {
2235
- const o = t.getSheets().getItems({ visibility: A.Visibility.VeryHidden }), n = l.sheets, s = t.getSelectedSheet(), a = o.length;
2236
- for (let t = 0; t < a; t++) {
2241
+ const o = t.getSheets().getItems({ visibility: _.Visibility.VeryHidden }), n = a.sheets, s = t.getSelectedSheet(), l = o.length;
2242
+ for (let t = 0; t < l; t++) {
2237
2243
  const a = o[t], l = "" + (a.getIndex() + 1), i = {
2238
2244
  name: a.getName(),
2239
2245
  sheetId: l
@@ -2251,11 +2257,11 @@ var fr = (t, e, r, o) => {
2251
2257
  const d = t.getTheme();
2252
2258
  e.addPart("theme", {
2253
2259
  model: d,
2254
- json: l.theme
2260
+ json: a.theme
2255
2261
  }), await e.waitEmit(), e.addPart("styles", {
2256
2262
  styles: t.getStyles(),
2257
2263
  theme: t.getTheme(),
2258
- json: l.styles
2264
+ json: a.styles
2259
2265
  }), await e.waitEmit();
2260
2266
  const p = await c.toJSONAsync();
2261
2267
  p && p.length > 0 && (e.addPart("sharedStrings", {
@@ -2274,7 +2280,7 @@ var fr = (t, e, r, o) => {
2274
2280
  r.end("sheets"), function(t, e, r, o, n) {
2275
2281
  const s = o.names, a = s ? s.length : 0;
2276
2282
  if (0 === a) return;
2277
- const l = r.getCalculation().getNamedFormulas(), i = /* @__PURE__ */ new Map(), c = r.getSheets().getItems({ visibility: A.Visibility.VeryHidden });
2283
+ const l = r.getCalculation().getNamedFormulas(), i = /* @__PURE__ */ new Map(), c = r.getSheets().getItems({ visibility: _.Visibility.VeryHidden });
2278
2284
  for (let t = 0; t < c.length; t++) i.set(c[t].getName().toLowerCase(), t);
2279
2285
  e.start("definedNames");
2280
2286
  for (let r = 0; r < a; r++) {
@@ -2292,10 +2298,25 @@ var fr = (t, e, r, o) => {
2292
2298
  d && (c = d.getExpression({ formulaTransform: n })), e.start("definedName", a), e.text(c), e.end("definedName");
2293
2299
  }
2294
2300
  e.end("definedNames");
2295
- }(e, r, t, l, a), r.end("workbook"), r.close();
2301
+ }(e, r, t, a, s), function(t, e, r) {
2302
+ const o = r.getCalculation().toJSON(), n = {}, s = (t, e) => {
2303
+ const r = o[t];
2304
+ "boolean" == typeof r && (n[e] = r ? "1" : "0");
2305
+ };
2306
+ if (o.calcMode) {
2307
+ const t = It[o.calcMode];
2308
+ t && "auto" !== t && (n.calcMode = t);
2309
+ }
2310
+ s("fullCalcOnLoad", "fullCalcOnLoad"), s("calcOnSave", "calcOnSave"), s("calcCompleted", "calcCompleted"), s("fullPrecision", "fullPrecision"), s("forceFullCalc", "forceFullCalc"), s("concurrentCalc", "concurrentCalc"), o.refMode && (n.refMode = o.refMode);
2311
+ o.iterate && (n.iterate = "1");
2312
+ void 0 !== o.maxIterations && (n.iterateCount = String(o.maxIterations));
2313
+ void 0 !== o.maxIterateChange && (n.iterateDelta = String(o.maxIterateChange));
2314
+ if (0 === Object.keys(n).length) return;
2315
+ e.empty("calcPr", n);
2316
+ }(0, r, t), r.end("workbook"), r.close();
2296
2317
  }
2297
2318
  }(),
2298
- new class extends j {
2319
+ new class extends U {
2299
2320
  constructor() {
2300
2321
  super({
2301
2322
  kind: "worksheet",
@@ -2304,8 +2325,8 @@ var fr = (t, e, r, o) => {
2304
2325
  path: () => "/xl/worksheets/sheet{n}.xml"
2305
2326
  });
2306
2327
  }
2307
- async emit(t, n) {
2308
- const c = n.getXMLWriter(), p = t.model, h = t.json;
2328
+ async emit(t, l) {
2329
+ const c = l.getXMLWriter(), d = t.model, u = t.json;
2309
2330
  c.decl(), c.start("worksheet", {
2310
2331
  xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2311
2332
  "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
@@ -2314,10 +2335,10 @@ var fr = (t, e, r, o) => {
2314
2335
  "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
2315
2336
  }), function(t, e, r) {
2316
2337
  const o = r.getTabColor();
2317
- o && (e.start("sheetPr"), o && It(e, r.getStyles().getTheme(), o, "tabColor", !1), e.end("sheetPr"));
2318
- }(0, c, p), function(t, e, r, o) {
2338
+ o && (e.start("sheetPr"), o && Pt(e, r.getStyles().getTheme(), o, "tabColor", !1), e.end("sheetPr"));
2339
+ }(0, c, d), function(t, e, r, o) {
2319
2340
  let n = r.getUsedRange({ features: [] }), s = n ? n.getCoords() : null;
2320
- const a = Ut, l = qt, i = o.directStyles, c = i ? i.length : 0;
2341
+ const a = Se, l = we, i = o.directStyles, c = i ? i.length : 0;
2321
2342
  for (let t = 0; t < c; t++) {
2322
2343
  let e = r.getRange(i[t][0]).getCoords();
2323
2344
  if (e.colEnd === l) {
@@ -2336,12 +2357,12 @@ var fr = (t, e, r, o) => {
2336
2357
  rowEnd: t
2337
2358
  };
2338
2359
  }
2339
- s = T.unionRanges(s, e);
2360
+ s = M.unionRanges(s, e);
2340
2361
  }
2341
2362
  const d = o.merges, p = d ? d.length : 0;
2342
2363
  for (let t = 0; t < p; t++) {
2343
2364
  let e = r.getRange(d[t]).getCoords();
2344
- e.colEnd === l && (e = { ...s }, e.colStart = s?.colStart ?? 0, e.colEnd = e.colStart), e.rowEnd === a && (e = { ...e }, e.rowStart = s?.rowStart ?? 0, e.rowEnd = e.rowStart), s = T.unionRanges(s, e);
2365
+ e.colEnd === l && (e = { ...s }, e.colStart = s?.colStart ?? 0, e.colEnd = e.colStart), e.rowEnd === a && (e = { ...e }, e.rowStart = s?.rowStart ?? 0, e.rowEnd = e.rowStart), s = M.unionRanges(s, e);
2345
2366
  }
2346
2367
  let m = "A1";
2347
2368
  s && (n = r.getRange(s), m = s.colStart === s.colEnd && s.rowStart === s.rowEnd ? n.getAddress() : `${n.getIntersect({
@@ -2356,8 +2377,8 @@ var fr = (t, e, r, o) => {
2356
2377
  rowEnd: s.rowEnd
2357
2378
  }).getAddress()}`);
2358
2379
  e.empty("dimension", { ref: m });
2359
- }(0, c, p, h), function(t, e, r, o, n) {
2360
- const s = r.getView(), a = s.getTopLeft(), l = r.getRowHeaders().getIndex(a.top), i = r.getColumnHeaders().getIndex(a.left), c = w.cellToString({
2380
+ }(0, c, d, u), function(t, e, r, o, n) {
2381
+ const s = r.getView(), a = s.getTopLeft(), l = r.getRowHeaders().getIndex(a.top), i = r.getColumnHeaders().getIndex(a.left), c = b.cellToString({
2361
2382
  colIndex: i,
2362
2383
  rowIndex: l
2363
2384
  });
@@ -2384,22 +2405,22 @@ var fr = (t, e, r, o) => {
2384
2405
  d.colorId = "" + l;
2385
2406
  }
2386
2407
  d.workbookViewId = "0";
2387
- const f = r.getSelection().getCoords(), u = w.cellToString(f.cell);
2408
+ const f = r.getSelection().getCoords(), u = b.cellToString(f.cell);
2388
2409
  let h = {};
2389
2410
  const g = s.getFreezePanes(), y = g.coords ?? {}, x = y.colIndex ?? 0, v = y.rowIndex ?? 0;
2390
2411
  if (x > 0 || v > 0) {
2391
- const t = g.topLeft ?? {}, o = t.top ?? 0, n = t.left ?? 0, s = r.getRowHeaders().getIndex(o), l = r.getColumnHeaders().getIndex(n), i = x - l, c = v - s, p = Math.max(x, r.getColumnHeaders().getIndex(a.left + r.getColumnHeaders().getOffset(x) - n)), m = Math.max(v, r.getRowHeaders().getIndex(a.top + r.getRowHeaders().getOffset(v) - o)), f = w.cellToString({
2412
+ const t = g.topLeft ?? {}, o = t.top ?? 0, n = t.left ?? 0, s = r.getRowHeaders().getIndex(o), l = r.getColumnHeaders().getIndex(n), i = x - l, c = v - s, p = Math.max(x, r.getColumnHeaders().getIndex(a.left + r.getColumnHeaders().getOffset(x) - n)), m = Math.max(v, r.getRowHeaders().getIndex(a.top + r.getRowHeaders().getOffset(v) - o)), f = b.cellToString({
2392
2413
  colIndex: l,
2393
2414
  rowIndex: s
2394
2415
  });
2395
2416
  "A1" !== f ? d.topLeftCell = f : delete d.topLeftCell, e.start("sheetView", d);
2396
2417
  const u = {};
2397
- if (i > 0 && (u.xSplit = i), c > 0 && (u.ySplit = c), u.topLeftCell = w.cellToString({
2418
+ if (i > 0 && (u.xSplit = i), c > 0 && (u.ySplit = c), u.topLeftCell = b.cellToString({
2398
2419
  colIndex: p,
2399
2420
  rowIndex: m
2400
2421
  }), u.state = "frozen", 0 === x) {
2401
2422
  u.activePane = "bottomLeft", e.empty("pane", u);
2402
- const t = w.cellToString({
2423
+ const t = b.cellToString({
2403
2424
  colIndex: p,
2404
2425
  rowIndex: s
2405
2426
  });
@@ -2409,7 +2430,7 @@ var fr = (t, e, r, o) => {
2409
2430
  }), h.pane = "bottomLeft";
2410
2431
  } else if (0 === v) {
2411
2432
  u.activePane = "topRight", e.empty("pane", u);
2412
- const t = w.cellToString({
2433
+ const t = b.cellToString({
2413
2434
  colIndex: l,
2414
2435
  rowIndex: m
2415
2436
  });
@@ -2422,7 +2443,7 @@ var fr = (t, e, r, o) => {
2422
2443
  activeCell: f,
2423
2444
  sqref: f
2424
2445
  });
2425
- const t = w.cellToString({
2446
+ const t = b.cellToString({
2426
2447
  colIndex: p,
2427
2448
  rowIndex: s
2428
2449
  });
@@ -2431,7 +2452,7 @@ var fr = (t, e, r, o) => {
2431
2452
  activeCell: t,
2432
2453
  sqref: t
2433
2454
  });
2434
- const r = w.cellToString({
2455
+ const r = b.cellToString({
2435
2456
  colIndex: l,
2436
2457
  rowIndex: m
2437
2458
  });
@@ -2443,24 +2464,24 @@ var fr = (t, e, r, o) => {
2443
2464
  }
2444
2465
  } else e.start("sheetView", d);
2445
2466
  h.activeCell = u;
2446
- const S = f.ranges, b = S ? S.length : 0;
2447
- if (b > 0) {
2467
+ const S = f.ranges, w = S ? S.length : 0;
2468
+ if (w > 0) {
2448
2469
  let t = "";
2449
- for (let e = 0; e < b; e++) {
2470
+ for (let e = 0; e < w; e++) {
2450
2471
  const r = S[e];
2451
- e > 0 && (t += " "), t += w.rangeToString(r);
2472
+ e > 0 && (t += " "), t += b.rangeToString(r);
2452
2473
  }
2453
2474
  h.sqref = t, (f.rangeIndex ?? 0) > 0 && (h.activeCellId = "" + f.rangeIndex);
2454
2475
  } else "A1" === u ? h = null : h.sqref = u;
2455
2476
  h && e.empty("selection", h);
2456
2477
  e.end("sheetView"), e.end("sheetViews");
2457
- }(0, c, p, 0, t.isSelected), function(t, e, r, o) {
2478
+ }(0, c, d, 0, t.isSelected), function(t, e, r, o) {
2458
2479
  const n = o.defaultColSize, s = o.defaultRowSize, a = {};
2459
2480
  void 0 !== n && (a.defaultColWidth = n);
2460
2481
  a.defaultRowHeight = s ?? .75 * r.getRowHeaders().getDefaultSize(), void 0 !== s && (a.customHeight = "1");
2461
2482
  a["x14ac:dyDescent"] = "0.25", e.empty("sheetFormatPr", a);
2462
- }(0, c, p, h), function(t, e, r, o) {
2463
- const n = o.cols ? w.refsToRuns(o.cols, !0) : null, s = n ? n.length : 0;
2483
+ }(0, c, d, u), function(t, e, r, o) {
2484
+ const n = o.cols ? b.refsToRuns(o.cols, !0) : null, s = n ? n.length : 0;
2464
2485
  r.getEntireRange().getColumnEnd();
2465
2486
  const a = r.getColumnHeaders().getDefaultSizeNative();
2466
2487
  if (s > 0) {
@@ -2476,111 +2497,111 @@ var fr = (t, e, r, o) => {
2476
2497
  }
2477
2498
  e.end("cols");
2478
2499
  }
2479
- }(0, c, p, h), function(t, n, l, i, c) {
2480
- const d = t.getSharedStates(), p = d.get("persistStrings"), m = d.get("metaCollector"), f = d.get("persistRichTypes"), u = d.get("formulaTransform");
2500
+ }(0, c, d, u), function(t, e, n, s, a) {
2501
+ const l = t.getSharedStates(), c = l.get("persistStrings"), d = l.get("metaCollector"), f = l.get("persistRichTypes"), u = l.get("formulaTransform");
2481
2502
  let h = 0, y = 0;
2482
- const S = l.getUsedRange();
2483
- let b = 0;
2484
- const C = i.rows ? w.refsToRuns(i.rows, !1) : null, T = C ? C.length : 0, M = C?.[T - 1]?.max ?? -1, R = i.cols ? w.refsToRuns(i.cols, !0) : null, I = R ? R.length : 0, F = R?.[I - 1]?.max ?? -1;
2485
- if (S || T > 0) {
2486
- const d = .75, S = i.defaultRowSize ?? l.getRowHeaders().getDefaultSize() * d, T = l.getStyles().getNormal().getBestFit().height * d, I = (t, e) => {
2487
- const r = ie;
2503
+ const x = n.getUsedRange();
2504
+ let w = 0;
2505
+ const C = s.rows ? b.refsToRuns(s.rows, !1) : null, T = C ? C.length : 0, k = C?.[T - 1]?.max ?? -1, M = s.cols ? b.refsToRuns(s.cols, !0) : null, I = M ? M.length : 0, F = M?.[I - 1]?.max ?? -1;
2506
+ if (x || T > 0) {
2507
+ const l = .75, x = s.defaultRowSize ?? n.getRowHeaders().getDefaultSize() * l, T = n.getStyles().getNormal().getBestFit().height * l, I = (t, e) => {
2508
+ const r = Ne;
2488
2509
  if (r.r = "" + (t + 1), r.s = void 0, r.customFormat = void 0, r.hidden = void 0, r.ht = void 0, r.customHeight = void 0, r.outlineLevel = void 0, r.collapsed = void 0, !e) return r;
2489
2510
  const o = e.value;
2490
2511
  void 0 !== o.s && (r.s = "" + o.s, r.customFormat = "1"), o.h && (r.hidden = "1");
2491
- const n = o.csz ?? !1, s = o.sz ?? S;
2512
+ const n = o.csz ?? !1, s = o.sz ?? x;
2492
2513
  return (s !== T || n) && (r.ht = "" + s), n && (r.customHeight = "1"), void 0 !== o.l && (r.outlineLevel = "" + o.l), void 0 !== o.cl && (r.collapsed = "" + o.cl), r;
2493
2514
  };
2494
- let L = 0, A = C?.[L] ?? null, P = A?.min ?? Number.MAX_SAFE_INTEGER, _ = A?.max ?? Number.MAX_SAFE_INTEGER, E = A?.value?.s, N = -1, D = 0, B = R?.[D] ?? null, V = B?.min ?? Number.MAX_SAFE_INTEGER, $ = B?.max ?? Number.MAX_SAFE_INTEGER, W = B?.value?.s;
2495
- const z = (t, e = !1) => {
2496
- if (N !== t) {
2497
- for (-1 !== N && (n.end("row"), 0 !== D && (D = 0, B = R?.[D] ?? null, V = B?.min ?? Number.MAX_SAFE_INTEGER, $ = B?.max ?? Number.MAX_SAFE_INTEGER, W = B?.value?.s)); N + 1 <= t;) {
2498
- N++, A && N > _ && (A = C[++L] ?? null, A ? (P = A.min, _ = A.max, E = A.value?.s) : (P = Number.MAX_SAFE_INTEGER, _ = Number.MAX_SAFE_INTEGER, E = void 0)), N < P && N < t && (N = A ? Math.min(P, t) : t);
2499
- const r = N < t || e && N === t, o = I(N, A && N >= P && N <= _ ? A : null);
2500
- r ? n.empty("row", o) : n.start("row", o);
2515
+ let A = 0, P = C?.[A] ?? null, L = P?.min ?? Number.MAX_SAFE_INTEGER, _ = P?.max ?? Number.MAX_SAFE_INTEGER, D = P?.value?.s, E = -1, N = 0, O = M?.[N] ?? null, B = O?.min ?? Number.MAX_SAFE_INTEGER, $ = O?.max ?? Number.MAX_SAFE_INTEGER, W = O?.value?.s;
2516
+ const z = (t, r = !1) => {
2517
+ if (E !== t) {
2518
+ for (-1 !== E && (e.end("row"), 0 !== N && (N = 0, O = M?.[N] ?? null, B = O?.min ?? Number.MAX_SAFE_INTEGER, $ = O?.max ?? Number.MAX_SAFE_INTEGER, W = O?.value?.s)); E + 1 <= t;) {
2519
+ E++, P && E > _ && (P = C[++A] ?? null, P ? (L = P.min, _ = P.max, D = P.value?.s) : (L = Number.MAX_SAFE_INTEGER, _ = Number.MAX_SAFE_INTEGER, D = void 0)), E < L && E < t && (E = P ? Math.min(L, t) : t);
2520
+ const o = E < t || r && E === t, n = I(E, P && E >= L && E <= _ ? P : null);
2521
+ o ? e.empty("row", n) : e.start("row", n);
2501
2522
  }
2502
- if (t < N) {
2503
- const e = I(t, null);
2504
- n.start("row", e);
2523
+ if (t < E) {
2524
+ const r = I(t, null);
2525
+ e.start("row", r);
2505
2526
  }
2506
2527
  }
2507
2528
  };
2508
- n.setValidationDisabled(!0), n.start("sheetData");
2529
+ e.setValidationDisabled(!0), e.start("sheetData");
2509
2530
  const j = [];
2510
- j.push(Yt(t, l, i.directStyles));
2511
- const X = i.formulas, U = X ? X.length : 0;
2531
+ j.push(Te(t, n, s.directStyles));
2532
+ const X = s.formulas, U = X ? X.length : 0;
2512
2533
  if (U > 0) {
2513
2534
  const t = /* @__PURE__ */ new Map();
2514
- if (c.names.size > 0 && i.formulaArray) for (const e of i.formulaArray) try {
2515
- const r = l.getRange(e[0]).getCoords();
2535
+ if (a.names.size > 0 && s.formulaArray) for (const e of s.formulaArray) try {
2536
+ const r = n.getRange(e[0]).getCoords();
2516
2537
  t.set(`${r.rowStart},${r.colStart}`, r);
2517
2538
  } catch {}
2518
- const n = [];
2519
- if (i.formulaArray) for (const t of i.formulaArray) try {
2520
- n.push(l.getRange(t[0]).getCoords());
2539
+ const e = [];
2540
+ if (s.formulaArray) for (const t of s.formulaArray) try {
2541
+ e.push(n.getRange(t[0]).getCoords());
2521
2542
  } catch {}
2522
- const d = (t) => {
2523
- for (let e = 0; e < n.length; e++) {
2524
- const r = n[e];
2525
- if (r.rowStart <= t.rowEnd && r.rowEnd >= t.rowStart && r.colStart <= t.colEnd && r.colEnd >= t.colStart) return !0;
2543
+ const l = (t) => {
2544
+ for (let r = 0; r < e.length; r++) {
2545
+ const o = e[r];
2546
+ if (o.rowStart <= t.rowEnd && o.rowEnd >= t.rowStart && o.colStart <= t.colEnd && o.colEnd >= t.colStart) return !0;
2526
2547
  }
2527
2548
  return !1;
2528
- }, p = s(() => l.getCalculation()), m = (t) => {
2549
+ }, c = S(() => n.getCalculation()), d = (t) => {
2529
2550
  if (!t) return;
2530
2551
  let e;
2531
2552
  return t.getExpression({ formulaTransform: (t, r) => {
2532
2553
  void 0 === r && (e = t);
2533
2554
  } }), e;
2534
- }, f = [];
2535
- for (let n = 0; n < U; n++) {
2536
- const s = X[n];
2555
+ }, p = [];
2556
+ for (let e = 0; e < U; e++) {
2557
+ const s = X[e];
2537
2558
  try {
2538
- const i = s[0], h = l.getRange(i), g = h.getCoords();
2559
+ const f = s[0], h = n.getRange(f), g = h.getCoords();
2539
2560
  let y = s[1], x = null;
2540
- const v = m(h.getCell().getFormula());
2541
- let S = !!v && r(v, p);
2542
- const C = o(v);
2543
- if (c.affects(n)) {
2561
+ const v = d(h.getCell().getFormula());
2562
+ let S = !!v && o(v, c);
2563
+ const C = r(v);
2564
+ if (a.affects(e)) {
2544
2565
  x = null, S = !1;
2545
- const r = (t, e, r) => {
2566
+ const e = (t, e, r) => {
2546
2567
  const o = {
2547
2568
  rowStart: t,
2548
2569
  colStart: e,
2549
2570
  rowEnd: t,
2550
2571
  colEnd: e
2551
2572
  };
2552
- f.push([o, {
2573
+ p.push([o, {
2553
2574
  coords: o,
2554
2575
  formula: r,
2555
2576
  sharedId: null,
2556
- ref: w.rangeToString(o),
2577
+ ref: b.rangeToString(o),
2557
2578
  isDynamicRange: !1,
2558
2579
  isWrapped: !0
2559
2580
  }]);
2560
- }, o = t.get(`${g.rowStart},${g.colStart}`), n = void 0 !== o && (o.rowEnd > o.rowStart || o.colEnd > o.colStart);
2581
+ }, r = t.get(`${g.rowStart},${g.colStart}`), o = void 0 !== r && (r.rowEnd > r.rowStart || r.colEnd > r.colStart);
2561
2582
  let s = !1;
2562
- if (n) {
2563
- const t = a(y, h.getCell().getValue());
2564
- if (null !== t) for (let n = o.rowStart; n <= o.rowEnd; n++) for (let a = o.colStart; a <= o.colEnd; a++) {
2565
- if (n === o.rowStart && a === o.colStart) {
2566
- r(n, a, t), s = !0;
2583
+ if (o) {
2584
+ const t = m(y, h.getCell().getValue());
2585
+ if (null !== t) for (let o = r.rowStart; o <= r.rowEnd; o++) for (let a = r.colStart; a <= r.colEnd; a++) {
2586
+ if (o === r.rowStart && a === r.colStart) {
2587
+ e(o, a, t), s = !0;
2567
2588
  continue;
2568
2589
  }
2569
- const i = e(l.getRange(w.rangeToString({
2570
- rowStart: n,
2590
+ const l = i(n.getRange(b.rangeToString({
2591
+ rowStart: o,
2571
2592
  colStart: a,
2572
- rowEnd: n,
2593
+ rowEnd: o,
2573
2594
  colEnd: a
2574
2595
  })).getCell().getValue());
2575
- null !== i && r(n, a, i);
2596
+ null !== l && e(o, a, l);
2576
2597
  }
2577
2598
  } else {
2578
2599
  const t = h.getCells();
2579
- for (let e = 0; e < t.length; e++) {
2580
- const o = t[e];
2600
+ for (let r = 0; r < t.length; r++) {
2601
+ const o = t[r];
2581
2602
  for (let t = 0; t < o.length; t++) {
2582
- const n = o[t], l = a(n.getFormula()?.getExpression() ?? y, n.getValue());
2583
- null !== l && (r(g.rowStart + e, g.colStart + t, l), s = !0);
2603
+ const n = o[t], a = m(n.getFormula()?.getExpression() ?? y, n.getValue());
2604
+ null !== a && (e(g.rowStart + r, g.colStart + t, a), s = !0);
2584
2605
  }
2585
2606
  }
2586
2607
  }
@@ -2588,7 +2609,7 @@ var fr = (t, e, r, o) => {
2588
2609
  }
2589
2610
  const T = -1 !== y.indexOf("!") || -1 !== y.indexOf("[");
2590
2611
  let k;
2591
- if (S || h.isSingleCell() || T || d(g) || (x = "" + b++), null === x && !h.isSingleCell()) {
2612
+ if (S || h.isSingleCell() || T || l(g) || (x = "" + w++), null === x && !h.isSingleCell()) {
2592
2613
  k = [];
2593
2614
  const t = h.getCells();
2594
2615
  for (let e = 0; e < t.length; e++) {
@@ -2601,26 +2622,26 @@ var fr = (t, e, r, o) => {
2601
2622
  coords: g,
2602
2623
  formula: y,
2603
2624
  sharedId: x,
2604
- ref: i,
2625
+ ref: f,
2605
2626
  isDynamicRange: S,
2606
2627
  isExcelVolatile: C,
2607
2628
  memberTexts: k
2608
2629
  }];
2609
- f.push(M);
2630
+ p.push(M);
2610
2631
  } catch (t) {
2611
2632
  console.warn(`Failed to parse formula: ${s[1]}`, t);
2612
2633
  continue;
2613
2634
  }
2614
2635
  }
2615
- j.push(f);
2636
+ j.push(p);
2616
2637
  } else j.push([]);
2617
- const q = i.volatile, H = q ? q.length : 0;
2618
- if (H > 0) {
2619
- const t = new Array(H);
2620
- for (let e = 0; e < H; e++) {
2621
- const r = q[e];
2638
+ const H = s.volatile, q = H ? H.length : 0;
2639
+ if (q > 0) {
2640
+ const t = new Array(q);
2641
+ for (let e = 0; e < q; e++) {
2642
+ const r = H[e];
2622
2643
  try {
2623
- t[e] = [l.getRange(r).getCoords(), !0];
2644
+ t[e] = [n.getRange(r).getCoords(), !0];
2624
2645
  } catch (t) {
2625
2646
  console.warn(`Failed to parse volatile: ${r}`, t);
2626
2647
  continue;
@@ -2628,14 +2649,14 @@ var fr = (t, e, r, o) => {
2628
2649
  }
2629
2650
  j.push(t);
2630
2651
  } else j.push([]);
2631
- const G = i.formulaArray, J = G ? G.length : 0;
2652
+ const G = s.formulaArray, J = G ? G.length : 0;
2632
2653
  if (J > 0) {
2633
2654
  const t = new Array(J);
2634
2655
  for (let e = 0; e < J; e++) {
2635
2656
  const r = G[e];
2636
2657
  try {
2637
2658
  const o = r[0];
2638
- t[e] = [l.getRange(o).getCoords(), {
2659
+ t[e] = [n.getRange(o).getCoords(), {
2639
2660
  ref: o,
2640
2661
  kind: r[1] ?? "dynamic"
2641
2662
  }];
@@ -2646,72 +2667,72 @@ var fr = (t, e, r, o) => {
2646
2667
  }
2647
2668
  j.push(t);
2648
2669
  } else j.push([]);
2649
- l.getEntireRange().forEach((e, r) => {
2650
- const o = r.getCoords(), s = o.rowIndex, a = o.colIndex;
2651
- N !== s && z(s);
2652
- let l = r.getInjectedReference(0);
2653
- if (void 0 === l && void 0 !== E && s >= P && s <= _ && (l = E), void 0 === l) {
2654
- for (; a <= F && a > $;) D++, B = R?.[D] ?? null, V = B?.min ?? Number.MAX_SAFE_INTEGER, $ = B?.max ?? Number.MAX_SAFE_INTEGER, W = B?.value?.s;
2655
- void 0 !== W && a >= V && a <= $ && (l = W);
2670
+ n.getEntireRange().forEach((r, o) => {
2671
+ const n = o.getCoords(), s = n.rowIndex, a = n.colIndex;
2672
+ E !== s && z(s);
2673
+ let l = o.getInjectedReference(0);
2674
+ if (void 0 === l && void 0 !== D && s >= L && s <= _ && (l = D), void 0 === l) {
2675
+ for (; a <= F && a > $;) N++, O = M?.[N] ?? null, B = O?.min ?? Number.MAX_SAFE_INTEGER, $ = O?.max ?? Number.MAX_SAFE_INTEGER, W = O?.value?.s;
2676
+ void 0 !== W && a >= B && a <= $ && (l = W);
2656
2677
  }
2657
- const i = r.getType();
2658
- let c = null;
2659
- U > 0 && (c = r.getInjectedReference(1) ?? null);
2660
- let d = !1;
2661
- H > 0 && (d = r.getInjectedReference(2) ?? !1);
2662
- let u = null;
2663
- J > 0 && (u = r.getInjectedReference(3) ?? null);
2664
- const w = "dynamicSpillError" === u?.kind, S = "static" === u?.kind, b = le;
2665
- b.r = r.getAddress(), b.s = void 0, b.t = void 0, b.cm = void 0, b.vm = void 0, void 0 !== l && 0 !== l && (b.s = "" + l);
2678
+ const i = o.getType();
2679
+ let m = null;
2680
+ U > 0 && (m = o.getInjectedReference(1) ?? null);
2681
+ let u = !1;
2682
+ q > 0 && (u = o.getInjectedReference(2) ?? !1);
2683
+ let x = null;
2684
+ J > 0 && (x = o.getInjectedReference(3) ?? null);
2685
+ const S = "dynamicSpillError" === x?.kind, w = "static" === x?.kind, b = Ee;
2686
+ b.r = o.getAddress(), b.s = void 0, b.t = void 0, b.cm = void 0, b.vm = void 0, void 0 !== l && 0 !== l && (b.s = "" + l);
2666
2687
  let C = null, T = null;
2667
2688
  switch (i) {
2668
- case O.Boolean:
2669
- C = e ? "1" : "0", T = "b";
2689
+ case V.Boolean:
2690
+ C = r ? "1" : "0", T = "b";
2670
2691
  break;
2671
- case O.Error:
2672
- const t = e.getCode();
2673
- if (T = "e", t > 7) C = k.BuiltIn.Value.getLabel(), b.vm = "" + f.add(e);
2692
+ case V.Error:
2693
+ const t = r.getCode();
2694
+ if (T = "e", t > 7) C = R.BuiltIn.Value.getLabel(), b.vm = "" + f.add(r);
2674
2695
  else if (t < 1) {
2675
2696
  let t;
2676
- T = "s", c ? (t = "=" + c.formula, c = null) : t = "" + e.getLabel(), C = "" + p.add(t), h++;
2677
- } else C = "" + e.getLabel();
2697
+ T = "s", m ? (t = "=" + m.formula, m = null) : t = "" + r.getLabel(), C = "" + c.add(t), h++;
2698
+ } else C = "" + r.getLabel();
2678
2699
  break;
2679
- case O.Number:
2680
- C = "" + e, T = null;
2700
+ case V.Number:
2701
+ C = "" + r, T = null;
2681
2702
  break;
2682
- case O.String:
2683
- C = e, c ? (T = "str", C = e) : (T = "s", C = "" + p.add(C), h++);
2703
+ case V.String:
2704
+ C = r, m ? (T = "str", C = r) : (T = "s", C = "" + c.add(C), h++);
2684
2705
  break;
2685
- case O.RichData: T = "e", C = k.BuiltIn.Value.getLabel(), b.vm = "" + f.add(e);
2706
+ case V.RichData: T = "e", C = R.BuiltIn.Value.getLabel(), b.vm = "" + f.add(r);
2686
2707
  }
2687
2708
  T && (b.t = T);
2688
- const M = !c?.isWrapped && (null !== u || (c?.isDynamicRange ?? !1));
2689
- if (null !== c || null !== C) {
2690
- if (M && null !== c && !S && (b.cm = "" + m.registerArrayCell(w)), n.start("c", b), c) {
2691
- const t = c.memberTexts?.[s - c.coords.rowStart]?.[a - c.coords.colStart] ?? c.formula;
2692
- let e, r = null;
2693
- const o = c.sharedId;
2694
- if (o) {
2695
- e = de;
2696
- const t = c.coords;
2697
- t.colStart === a && t.rowStart === s ? (e.ref = c.ref, e.si = o, r = c.formula) : (e.ref = void 0, e.si = o);
2698
- } else M ? (e = pe, e.aca = w ? "1" : void 0, e.ref = w ? b.r : u?.ref ?? b.r, r = t) : (e = ce, r = t);
2699
- e.ca = d || w || c.isExcelVolatile ? "1" : void 0, r ? (n.start("f", e), n.text(r), n.end("f")) : n.empty("f", e);
2709
+ const k = !m?.isWrapped && (null !== x || (m?.isDynamicRange ?? !1));
2710
+ if (null !== m || null !== C) {
2711
+ if (k && null !== m && !w && (b.cm = "" + d.registerArrayCell(S)), e.start("c", b), m) {
2712
+ const t = m.memberTexts?.[s - m.coords.rowStart]?.[a - m.coords.colStart] ?? m.formula;
2713
+ let r, o = null;
2714
+ const n = m.sharedId;
2715
+ if (n) {
2716
+ r = Be;
2717
+ const t = m.coords;
2718
+ t.colStart === a && t.rowStart === s ? (r.ref = m.ref, r.si = n, o = m.formula) : (r.ref = void 0, r.si = n);
2719
+ } else k ? (r = Ve, r.aca = S ? "1" : void 0, r.ref = S ? b.r : x?.ref ?? b.r, o = t) : (r = Oe, o = t);
2720
+ r.ca = u || S || m.isExcelVolatile ? "1" : void 0, o ? (e.start("f", r), e.text(o), e.end("f")) : e.empty("f", r);
2700
2721
  }
2701
- null !== C && ("str" === T && C ? (n.start("v", v.test(C) ? g : void 0), n.text(x(C))) : (n.start("v"), C && n.text(C)), n.end("v")), n.end("c");
2702
- } else y++ < Kt ? n.empty("c", b) : 1048577 === y && t.warn(`Reached ${Kt} style-only cells at '${b.r}'; not writing the rest.`);
2722
+ null !== C && ("str" === T && C ? (e.start("v", v.test(C) ? g : void 0), e.text(p(C))) : (e.start("v"), C && e.text(C)), e.end("v")), e.end("c");
2723
+ } else y++ < Ce ? e.empty("c", b) : 1048577 === y && t.warn(`Reached ${Ce} style-only cells at '${b.r}'; not writing the rest.`);
2703
2724
  }, {
2704
2725
  injectReferences: j,
2705
2726
  features: []
2706
- }), -1 !== N && N >= M ? n.end("row") : z(M, !0), n.end("sheetData"), n.setValidationDisabled(!1);
2707
- } else n.empty("sheetData");
2727
+ }), -1 !== E && E >= k ? e.end("row") : z(k, !0), e.end("sheetData"), e.setValidationDisabled(!1);
2728
+ } else e.empty("sheetData");
2708
2729
  if (h > 0) {
2709
- const t = d.get("stringsCount") ?? 0;
2710
- d.set("stringsCount", t + h);
2730
+ const t = l.get("stringsCount") ?? 0;
2731
+ l.set("stringsCount", t + h);
2711
2732
  }
2712
- }(n, c, p, h, await (async (t, e) => {
2733
+ }(l, c, d, u, await (async (t, e) => {
2713
2734
  const r = e ? e.length : 0;
2714
- if (0 === r) return Jt;
2735
+ if (0 === r) return be;
2715
2736
  const o = /* @__PURE__ */ new Set(), n = new Array(r);
2716
2737
  for (let s = 0; s < r; s++) {
2717
2738
  n[s] = null;
@@ -2728,9 +2749,9 @@ var fr = (t, e, r, o) => {
2728
2749
  } catch {}
2729
2750
  }
2730
2751
  const s = t.getWorkbook();
2731
- if (!s) return Jt;
2732
- const a = await y(s, o);
2733
- return 0 === a.size ? Jt : {
2752
+ if (!s) return be;
2753
+ const a = await f(s, o);
2754
+ return 0 === a.size ? be : {
2734
2755
  names: a,
2735
2756
  perFormula: n,
2736
2757
  affects: (t) => {
@@ -2740,17 +2761,17 @@ var fr = (t, e, r, o) => {
2740
2761
  return !1;
2741
2762
  }
2742
2763
  };
2743
- })(p, h.formulas)), function(t, e, r, o) {
2764
+ })(d, u.formulas)), function(t, e, r, o) {
2744
2765
  const n = o.protection;
2745
2766
  if (!n) return;
2746
2767
  const s = {};
2747
- bt(n.password ?? {}, s), s.sheet = "1";
2768
+ Tt(n.password ?? {}, s), s.sheet = "1";
2748
2769
  const a = (t, e, r) => {
2749
2770
  const o = n[t];
2750
2771
  void 0 !== o && o !== e && (s[r ?? t] = o ? "1" : "0");
2751
2772
  };
2752
2773
  a("objects", "0"), a("scenarios", "0"), a("formatCells", "0"), a("formatColumns", "0"), a("formatRows", "0"), a("insertColumns", "0"), a("insertRows", "0"), a("insertHyperlinks", "0"), a("deleteColumns", "0"), a("deleteRows", "0"), a("selectLockedCells", "1"), a("sort", "0"), a("autoTable", "0", "autoFilter"), a("pivotTables", "0"), a("selectUnlockedCells", "1"), e.empty("sheetProtection", s);
2753
- }(0, c, 0, h), function(t, e, r, o) {
2774
+ }(0, c, 0, u), function(t, e, r, o) {
2754
2775
  const n = o.protectedRanges, s = n ? n.length : 0;
2755
2776
  if (0 === s) return;
2756
2777
  const a = [];
@@ -2758,7 +2779,7 @@ var fr = (t, e, r, o) => {
2758
2779
  const r = n[e];
2759
2780
  let o, s;
2760
2781
  Array.isArray(r) ? (o = r[0], s = r[1]) : (o = r.r, s = r.v);
2761
- const l = ne(o);
2782
+ const l = Pe(o);
2762
2783
  if (!l || !s) {
2763
2784
  t.warn("Skipping protectedRange with no range.");
2764
2785
  continue;
@@ -2768,56 +2789,68 @@ var fr = (t, e, r, o) => {
2768
2789
  continue;
2769
2790
  }
2770
2791
  const i = {};
2771
- bt(s.password ?? {}, i), i.sqref = l, i.name = s.name, s.securityDescriptor && (i.securityDescriptor = s.securityDescriptor), a.push(i);
2792
+ Tt(s.password ?? {}, i), i.sqref = l, i.name = s.name, s.securityDescriptor && (i.securityDescriptor = s.securityDescriptor), a.push(i);
2772
2793
  }
2773
2794
  if (0 === a.length) return;
2774
2795
  e.start("protectedRanges");
2775
2796
  for (let t = 0; t < a.length; t++) e.empty("protectedRange", a[t]);
2776
2797
  e.end("protectedRanges");
2777
- }(n, c, 0, h);
2778
- const S = h.autoTable;
2779
- if (S) {
2798
+ }(l, c, 0, u);
2799
+ const h = u.autoTable;
2800
+ if (h) {
2780
2801
  let t;
2781
- const e = S;
2782
- t = Array.isArray(e) ? e[1] : e.v, Vt(n, c, p.getAutoTable(), t, !0);
2802
+ const e = h;
2803
+ t = Array.isArray(e) ? e[1] : e.v, he(l, c, d.getAutoTable(), t, !0);
2783
2804
  }
2784
2805
  (function(t, e, r, o) {
2785
2806
  const n = o.merges ? o.merges.length : 0;
2786
2807
  if (n > 0) {
2787
2808
  e.start("mergeCells", { count: n });
2788
2809
  for (let t = 0; t < n; t++) {
2789
- const r = o.merges[t], n = "string" == typeof r ? r : w.rangeToString(r);
2810
+ const r = o.merges[t], n = "string" == typeof r ? r : b.rangeToString(r);
2790
2811
  e.empty("mergeCell", { ref: n });
2791
2812
  }
2792
2813
  e.end("mergeCells");
2793
2814
  }
2794
- })(0, c, 0, h);
2795
- const b = function(t, e, r, o) {
2815
+ })(0, c, 0, u);
2816
+ const C = function(t, e, r, o) {
2796
2817
  const n = [], s = o.conditionals, a = s ? s.length : 0;
2797
2818
  if (0 === a) return n;
2798
2819
  const l = t.getSharedStates();
2799
- let c = l.get(Gt);
2800
- c || (c = new Ht(), l.set(Gt, c));
2801
- const d = r.getStyles().getTheme();
2802
- let p = null, m = 0;
2820
+ let i = l.get(ee);
2821
+ i || (i = new te(), l.set(ee, i));
2822
+ const c = r.getStyles().getTheme();
2823
+ let d = null, p = 0;
2803
2824
  for (let r = 0; r < a; r++) {
2804
2825
  const o = s[r];
2805
2826
  let a, l;
2806
2827
  Array.isArray(o) ? (a = o[0], l = o[1]) : (a = o.r, l = o.v);
2807
- const f = ne(a);
2808
- f && l ? l.scale?.type === I.ScaleType.IconSet && ee(l.scale) ? (m++, n.push({
2809
- guid: i(C.uuidV4),
2810
- sqref: f,
2811
- priority: m,
2812
- scale: l.scale
2813
- })) : (f !== p && (null !== p && e.end("conditionalFormatting"), e.start("conditionalFormatting", {
2814
- sqref: f,
2828
+ const m = Pe(a);
2829
+ if (!m || !l) {
2830
+ t.warn("Skipping conditionalFormatting with no range.");
2831
+ continue;
2832
+ }
2833
+ const f = l.scale, u = f ? { type: f.type } : x(l.condition, Ae(m), (e) => t.warn(e));
2834
+ u ? f?.type === A.ScaleType.IconSet && Ie(f) ? (p++, n.push({
2835
+ guid: w(k.uuidV4),
2836
+ sqref: m,
2837
+ priority: p,
2838
+ scale: f
2839
+ })) : f || !De(u) ? (m !== d && (null !== d && e.end("conditionalFormatting"), e.start("conditionalFormatting", {
2840
+ sqref: m,
2815
2841
  pivot: l.pivot ? "1" : void 0
2816
- }), p = f), re(t, e, d, l, oe(f), f, m + 1, c, n) && m++) : t.warn("Skipping conditionalFormatting with no range.");
2842
+ }), d = m), p++, Fe(t, e, c, l, u, m, p, i, n)) : (p++, n.push({
2843
+ guid: w(k.uuidV4),
2844
+ sqref: m,
2845
+ priority: p,
2846
+ rule: u,
2847
+ style: l.style,
2848
+ stopIfTrue: l.stopIfTrue
2849
+ })) : l.condition || t.warn("Skipping conditional format with neither a condition nor a scale.");
2817
2850
  }
2818
- null !== p && e.end("conditionalFormatting");
2851
+ null !== d && e.end("conditionalFormatting");
2819
2852
  return n;
2820
- }(n, c, p, h), M = function(t, e, r, o) {
2853
+ }(l, c, d, u), T = function(t, e, r, o) {
2821
2854
  const n = [], s = o.validations, a = s ? s.length : 0;
2822
2855
  if (0 === a) return n;
2823
2856
  const l = [];
@@ -2825,19 +2858,19 @@ var fr = (t, e, r, o) => {
2825
2858
  const r = s[e];
2826
2859
  let o, a;
2827
2860
  Array.isArray(r) ? (o = r[0], a = r[1]) : (o = r.r, a = r.v);
2828
- const i = ne(o);
2861
+ const i = Pe(o);
2829
2862
  if (!i || !a) {
2830
2863
  t.warn?.("Skipping dataValidation with no range.");
2831
2864
  continue;
2832
2865
  }
2833
2866
  a.ext && t.warn("DataValidation extension payload is not written to xlsx; it will be lost.");
2834
- const { type: c, operator: d, formula1: p, formula2: f } = m(a.condition, (e) => t.warn(e)) ?? {}, u = {
2867
+ const { type: c, operator: d, formula1: p, formula2: m } = y(a.condition, (e) => t.warn(e)) ?? {}, f = {
2835
2868
  type: c,
2836
2869
  operator: d,
2837
- allowBlank: se(a.condition?.includeBlanks ?? !1),
2870
+ allowBlank: Le(a.condition?.includeBlanks ?? !1),
2838
2871
  showDropDown: a.hideDropdown ? "1" : void 0,
2839
- showInputMessage: se(a.showPromptMessage),
2840
- showErrorMessage: se(a.showAlertMessage),
2872
+ showInputMessage: Le(a.showPromptMessage),
2873
+ showErrorMessage: Le(a.showAlertMessage),
2841
2874
  errorStyle: a.alertStyle ?? "information",
2842
2875
  errorTitle: a.alertTitle,
2843
2876
  error: a.alert,
@@ -2845,15 +2878,15 @@ var fr = (t, e, r, o) => {
2845
2878
  prompt: a.prompt,
2846
2879
  imeMode: a.imeMode
2847
2880
  };
2848
- ae(p) || ae(f) ? n.push({
2849
- attrs: u,
2881
+ _e(p) || _e(m) ? n.push({
2882
+ attrs: f,
2850
2883
  formula1: p,
2851
- formula2: f,
2884
+ formula2: m,
2852
2885
  sqref: i
2853
- }) : (u.sqref = i, l.push({
2854
- attrs: u,
2886
+ }) : (f.sqref = i, l.push({
2887
+ attrs: f,
2855
2888
  formula1: p,
2856
- formula2: f
2889
+ formula2: m
2857
2890
  }));
2858
2891
  }
2859
2892
  if (0 === l.length) return n;
@@ -2863,7 +2896,7 @@ var fr = (t, e, r, o) => {
2863
2896
  void 0 !== o || void 0 !== n ? (e.start("dataValidation", r), void 0 !== o && (e.start("formula1"), e.text(o), e.end("formula1")), void 0 !== n && (e.start("formula2"), e.text(n), e.end("formula2")), e.end("dataValidation")) : e.empty("dataValidation", r);
2864
2897
  }
2865
2898
  return e.end("dataValidations"), n;
2866
- }(n, c, 0, h);
2899
+ }(l, c, 0, u);
2867
2900
  (function(t, e, r, o) {
2868
2901
  const n = o.hyperlinks, s = n ? n.length : 0;
2869
2902
  if (0 === s) return;
@@ -2876,7 +2909,7 @@ var fr = (t, e, r, o) => {
2876
2909
  p.ref = s, c && (p["r:id"] = t.addExternal("http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", c).relId), d && (p.location = d), o.screenTip && (p.tooltip = o.screenTip), e.empty("hyperlink", p);
2877
2910
  }
2878
2911
  e.end("hyperlinks");
2879
- })(n, c, 0, h), function(t, e, r, o) {
2912
+ })(l, c, 0, u), function(t, e, r, o) {
2880
2913
  const n = o.pageMargins;
2881
2914
  e.empty("pageMargins", {
2882
2915
  left: n?.left ?? .7,
@@ -2886,7 +2919,7 @@ var fr = (t, e, r, o) => {
2886
2919
  header: n?.header ?? .3,
2887
2920
  footer: n?.footer ?? .3
2888
2921
  });
2889
- }(0, c, 0, h), function(t, e, r, o) {
2922
+ }(0, c, 0, u), function(t, e, r, o) {
2890
2923
  const n = o.movables;
2891
2924
  if (0 === (n ? n.length : 0)) return;
2892
2925
  const s = (t) => {
@@ -2906,7 +2939,7 @@ var fr = (t, e, r, o) => {
2906
2939
  resources: r.getResources()
2907
2940
  });
2908
2941
  e.empty("drawing", { "r:id": l.relId });
2909
- }(n, c, p, h), function(t, e, r, o) {
2942
+ }(l, c, d, u), function(t, e, r, o) {
2910
2943
  const n = o.tables, s = n ? n.length : 0;
2911
2944
  if (0 === s) return;
2912
2945
  const a = r.getTables().getItems();
@@ -2923,77 +2956,97 @@ var fr = (t, e, r, o) => {
2923
2956
  c["r:id"] = i.relId, e.empty("tablePart", c);
2924
2957
  }
2925
2958
  e.end("tableParts");
2926
- }(n, c, p, h), function(t, e, r, o, n) {
2927
- if (0 === o.length && 0 === n.length) return;
2928
- const s = r.getStyles().getTheme();
2929
- if (e.start("extLst"), o.length > 0) {
2930
- e.start("ext", {
2931
- uri: f,
2932
- "xmlns:x14": u
2933
- }), e.start("x14:conditionalFormattings");
2934
- for (let t = 0; t < o.length; t++) {
2935
- const { guid: r, sqref: n, priority: a, scale: i } = o[t];
2936
- if (e.start("x14:conditionalFormatting", { "xmlns:xm": l }), i.type === I.ScaleType.DataBar) {
2937
- e.start("x14:cfRule", {
2959
+ }(l, c, d, u), function(t, r, o, l, i) {
2960
+ if (0 === l.length && 0 === i.length) return;
2961
+ const c = o.getStyles(), d = c.getTheme();
2962
+ if (r.start("extLst"), l.length > 0) {
2963
+ r.start("ext", {
2964
+ uri: e,
2965
+ "xmlns:x14": n
2966
+ }), r.start("x14:conditionalFormattings");
2967
+ for (let t = 0; t < l.length; t++) {
2968
+ const { guid: e, sqref: o, priority: n, scale: a, rule: i, style: p, stopIfTrue: m } = l[t];
2969
+ if (r.start("x14:conditionalFormatting", { "xmlns:xm": s }), a) if (a.type === A.ScaleType.DataBar) {
2970
+ r.start("x14:cfRule", {
2938
2971
  type: "dataBar",
2939
- id: r
2940
- }), e.start("x14:dataBar", {
2941
- minLength: i.minLength,
2942
- maxLength: i.maxLength,
2943
- gradient: i.gradient ? void 0 : "0",
2944
- border: i.borderColor ? "1" : void 0,
2945
- direction: i.direction,
2946
- negativeBarColorSameAsPositive: i.negativeFillColor ? "0" : "1",
2947
- negativeBarBorderColorSameAsPositive: i.negativeBorderColor ? "0" : void 0,
2948
- axisPosition: i.axisPosition
2972
+ id: e
2973
+ }), r.start("x14:dataBar", {
2974
+ minLength: a.minLength,
2975
+ maxLength: a.maxLength,
2976
+ gradient: a.gradient ? void 0 : "0",
2977
+ border: a.borderColor ? "1" : void 0,
2978
+ direction: a.direction,
2979
+ negativeBarColorSameAsPositive: a.negativeFillColor ? "0" : "1",
2980
+ negativeBarBorderColorSameAsPositive: a.negativeBorderColor ? "0" : void 0,
2981
+ axisPosition: a.axisPosition
2949
2982
  });
2950
- const t = i.stops ?? [];
2951
- if (0 === t.length) Qt(e, { type: I.ColorStopType.AutoMin }), Qt(e, { type: I.ColorStopType.AutoMax });
2952
- else for (let r = 0; r < t.length; r++) Qt(e, t[r]);
2953
- i.borderColor && It(e, s, i.borderColor, "x14:borderColor"), i.negativeFillColor && It(e, s, i.negativeFillColor, "x14:negativeFillColor"), i.negativeBorderColor && It(e, s, i.negativeBorderColor, "x14:negativeBorderColor"), i.axisColor && It(e, s, i.axisColor, "x14:axisColor"), e.end("x14:dataBar"), e.end("x14:cfRule");
2983
+ const t = a.stops ?? [];
2984
+ if (0 === t.length) Me(r, { type: A.ColorStopType.AutoMin }), Me(r, { type: A.ColorStopType.AutoMax });
2985
+ else for (let e = 0; e < t.length; e++) Me(r, t[e]);
2986
+ a.borderColor && Pt(r, d, a.borderColor, "x14:borderColor"), a.negativeFillColor && Pt(r, d, a.negativeFillColor, "x14:negativeFillColor"), a.negativeBorderColor && Pt(r, d, a.negativeBorderColor, "x14:negativeBorderColor"), a.axisColor && Pt(r, d, a.axisColor, "x14:axisColor"), r.end("x14:dataBar"), r.end("x14:cfRule");
2954
2987
  } else {
2955
- e.start("x14:cfRule", {
2988
+ r.start("x14:cfRule", {
2956
2989
  type: "iconSet",
2957
- priority: a,
2958
- id: r
2959
- }), e.start("x14:iconSet", {
2960
- iconSet: i.iconSet,
2961
- reverse: se(i.reverse),
2962
- showValue: se(i.showValue),
2963
- custom: (i.icon?.length ?? 0) > 0 ? "1" : void 0
2990
+ priority: n,
2991
+ id: e
2992
+ }), r.start("x14:iconSet", {
2993
+ iconSet: a.iconSet,
2994
+ reverse: Le(a.reverse),
2995
+ showValue: Le(a.showValue),
2996
+ custom: (a.icon?.length ?? 0) > 0 ? "1" : void 0
2964
2997
  });
2965
- const t = i.stops ?? [];
2966
- for (let r = 0; r < t.length; r++) Qt(e, t[r]);
2967
- const o = i.icon ?? [];
2968
- for (let t = 0; t < o.length; t++) e.empty("x14:cfIcon", {
2998
+ const t = a.stops ?? [];
2999
+ for (let e = 0; e < t.length; e++) Me(r, t[e]);
3000
+ const o = a.icon ?? [];
3001
+ for (let t = 0; t < o.length; t++) r.empty("x14:cfIcon", {
2969
3002
  iconSet: o[t].set,
2970
3003
  iconId: o[t].id
2971
3004
  });
2972
- e.end("x14:iconSet"), e.end("x14:cfRule");
3005
+ r.end("x14:iconSet"), r.end("x14:cfRule");
3006
+ }
3007
+ else {
3008
+ r.start("x14:cfRule", {
3009
+ type: i.type,
3010
+ priority: n,
3011
+ stopIfTrue: Le(m),
3012
+ aboveAverage: Le(i.aboveAverage),
3013
+ equalAverage: Le(i.equalAverage),
3014
+ stdDev: i.stdDev,
3015
+ bottom: Le(i.bottom),
3016
+ percent: Le(i.percent),
3017
+ rank: i.rank,
3018
+ operator: i.operator,
3019
+ text: i.text,
3020
+ timePeriod: i.timePeriod,
3021
+ id: e
3022
+ });
3023
+ const t = i.formulas ?? [];
3024
+ for (let e = 0; e < t.length; e++) r.start("xm:f"), r.text(t[e]), r.end("xm:f");
3025
+ p && Object.keys(p).length > 0 && de(0, r, p, c, d, "x14:dxf"), r.end("x14:cfRule");
2973
3026
  }
2974
- e.start("xm:sqref"), e.text(n), e.end("xm:sqref"), e.end("x14:conditionalFormatting");
3027
+ r.start("xm:sqref"), r.text(o), r.end("xm:sqref"), r.end("x14:conditionalFormatting");
2975
3028
  }
2976
- e.end("x14:conditionalFormattings"), e.end("ext");
3029
+ r.end("x14:conditionalFormattings"), r.end("ext");
2977
3030
  }
2978
- if (n.length > 0) {
2979
- e.start("ext", {
2980
- uri: d,
2981
- "xmlns:x14": u
2982
- }), e.start("x14:dataValidations", {
2983
- "xmlns:xm": l,
2984
- count: n.length
3031
+ if (i.length > 0) {
3032
+ r.start("ext", {
3033
+ uri: a,
3034
+ "xmlns:x14": n
3035
+ }), r.start("x14:dataValidations", {
3036
+ "xmlns:xm": s,
3037
+ count: i.length
2985
3038
  });
2986
- for (let t = 0; t < n.length; t++) {
2987
- const { attrs: r, formula1: o, formula2: s, sqref: a } = n[t];
2988
- e.start("x14:dataValidation", r), void 0 !== o && (e.start("x14:formula1"), e.start("xm:f"), e.text(o), e.end("xm:f"), e.end("x14:formula1")), void 0 !== s && (e.start("x14:formula2"), e.start("xm:f"), e.text(s), e.end("xm:f"), e.end("x14:formula2")), e.start("xm:sqref"), e.text(a), e.end("xm:sqref"), e.end("x14:dataValidation");
3039
+ for (let t = 0; t < i.length; t++) {
3040
+ const { attrs: e, formula1: o, formula2: n, sqref: s } = i[t];
3041
+ r.start("x14:dataValidation", e), void 0 !== o && (r.start("x14:formula1"), r.start("xm:f"), r.text(o), r.end("xm:f"), r.end("x14:formula1")), void 0 !== n && (r.start("x14:formula2"), r.start("xm:f"), r.text(n), r.end("xm:f"), r.end("x14:formula2")), r.start("xm:sqref"), r.text(s), r.end("xm:sqref"), r.end("x14:dataValidation");
2989
3042
  }
2990
- e.end("x14:dataValidations"), e.end("ext");
3043
+ r.end("x14:dataValidations"), r.end("ext");
2991
3044
  }
2992
- e.end("extLst");
2993
- }(0, c, p, b, M), c.end("worksheet"), c.close();
3045
+ r.end("extLst");
3046
+ }(0, c, d, C, T), c.end("worksheet"), c.close();
2994
3047
  }
2995
3048
  }(),
2996
- new class extends j {
3049
+ new class extends U {
2997
3050
  constructor() {
2998
3051
  super({
2999
3052
  kind: "sharedStrings",
@@ -3013,12 +3066,12 @@ var fr = (t, e, r, o) => {
3013
3066
  const e = o[t];
3014
3067
  r.start("si");
3015
3068
  const n = v.test(e) ? g : void 0;
3016
- r.start("t", n), r.text(x(e)), r.end("t"), r.end("si");
3069
+ r.start("t", n), r.text(p(e)), r.end("t"), r.end("si");
3017
3070
  }
3018
3071
  r.end("sst"), r.close();
3019
3072
  }
3020
3073
  }(),
3021
- new class extends j {
3074
+ new class extends U {
3022
3075
  constructor() {
3023
3076
  super({
3024
3077
  kind: "theme",
@@ -3036,22 +3089,22 @@ var fr = (t, e, r, o) => {
3036
3089
  const n = r?.getColorScheme();
3037
3090
  if (!n) return;
3038
3091
  e.start(o, { name: n.getName() || "Office" });
3039
- for (const t of At) e.start(t), Mt(e, r, n["get" + t.charAt(0).toUpperCase() + t.slice(1)]()), e.end(t);
3092
+ for (const t of Dt) e.start(t), Ft(e, r, n["get" + t.charAt(0).toUpperCase() + t.slice(1)]()), e.end(t);
3040
3093
  e.end(o);
3041
3094
  }(0, r, o, "clrScheme"), function(t, e, r, o) {
3042
3095
  if (!r) return;
3043
- e.start(o, { name: r.getName() || "Office" }), ke(t, e, r.getMajorFont() || "Calibri Light", "majorFont"), ke(t, e, r.getMinorFont() || "Calibri", "minorFont"), e.end(o);
3096
+ e.start(o, { name: r.getName() || "Office" }), $e(t, e, r.getMajorFont() || "Calibri Light", "majorFont"), $e(t, e, r.getMinorFont() || "Calibri", "minorFont"), e.end(o);
3044
3097
  }(e, r, o.getFontScheme(), "fontScheme"), function(t, e, r, o, n) {
3045
3098
  if (n?.fillStyleLst && n?.lnStyleLst && n?.effectStyleLst && n?.bgFillStyleLst) return void function(t, e, r, o, n) {
3046
3099
  const s = { getTheme: () => o };
3047
3100
  e.start(r, { name: "Office" }), e.start("fillStyleLst");
3048
- for (const t of n.fillStyleLst) me(0, e, t, s);
3101
+ for (const t of n.fillStyleLst) Wt(0, e, t, s);
3049
3102
  e.end("fillStyleLst"), e.start("lnStyleLst");
3050
- for (const t of n.lnStyleLst) fe(0, e, t, s);
3103
+ for (const t of n.lnStyleLst) zt(0, e, t, s);
3051
3104
  e.end("lnStyleLst"), e.start("effectStyleLst");
3052
- for (const r of n.effectStyleLst) e.start("effectStyle"), r.length > 0 ? ge(t, e, o, r) : e.empty("effectLst"), e.end("effectStyle");
3105
+ for (const r of n.effectStyleLst) e.start("effectStyle"), r.length > 0 ? Ut(t, e, o, r) : e.empty("effectLst"), e.end("effectStyle");
3053
3106
  e.end("effectStyleLst"), e.start("bgFillStyleLst");
3054
- for (const t of n.bgFillStyleLst) me(0, e, t, s);
3107
+ for (const t of n.bgFillStyleLst) Wt(0, e, t, s);
3055
3108
  e.end("bgFillStyleLst"), e.end(r);
3056
3109
  }(t, e, r, o, n);
3057
3110
  if (n?.formatSchemeXml) return void e.raw(n.formatSchemeXml);
@@ -3102,7 +3155,7 @@ var fr = (t, e, r, o) => {
3102
3155
  }(e, r, "fmtScheme", o, n), r.end("themeElements"), r.start("objectDefaults"), r.end("objectDefaults"), r.start("extraClrSchemeLst"), r.end("extraClrSchemeLst"), r.end("theme"), r.close();
3103
3156
  }
3104
3157
  }(),
3105
- new class extends j {
3158
+ new class extends U {
3106
3159
  constructor() {
3107
3160
  super({
3108
3161
  kind: "styles",
@@ -3128,11 +3181,11 @@ var fr = (t, e, r, o) => {
3128
3181
  for (let e = 0; e < o; e++) {
3129
3182
  const o = 0 === e ? {
3130
3183
  ...r[e],
3131
- named: _.BuiltInName.Normal
3184
+ named: E.BuiltInName.Normal
3132
3185
  } : r[e], s = t.resolve(o), a = {};
3133
3186
  void 0 !== o.named && (a.named = o.named), void 0 !== o.quotePrefix && (a.quotePrefix = o.quotePrefix);
3134
- for (let t = 0; t < Me.length; t++) {
3135
- const e = Me[t];
3187
+ for (let t = 0; t < re.length; t++) {
3188
+ const e = re[t];
3136
3189
  if (void 0 === o[e] && "alignment" !== e) continue;
3137
3190
  const r = s?.[e] ?? o[e];
3138
3191
  void 0 !== r && (a[e] = r);
@@ -3154,16 +3207,16 @@ var fr = (t, e, r, o) => {
3154
3207
  namedStyles: []
3155
3208
  };
3156
3209
  (function(t, e) {
3157
- const r = (t.getNamed(_.BuiltInName.Normal).toJSON().style ?? {}).font ?? {};
3158
- e.fontMap.set(S.JSONStableStringify(r), "0"), e.fonts.push(r);
3210
+ const r = (t.getNamed(E.BuiltInName.Normal).toJSON().style ?? {}).font ?? {};
3211
+ e.fontMap.set(C.JSONStableStringify(r), "0"), e.fonts.push(r);
3159
3212
  })(t, o), function(t) {
3160
3213
  const e = { type: "none" };
3161
- t.fillMap.set(S.JSONStableStringify(e), "0"), t.fills.push(e);
3214
+ t.fillMap.set(C.JSONStableStringify(e), "0"), t.fills.push(e);
3162
3215
  const r = {
3163
3216
  type: "pattern",
3164
3217
  patternType: "gray125"
3165
3218
  };
3166
- t.fillMap.set(S.JSONStableStringify(r), "1"), t.fills.push(r);
3219
+ t.fillMap.set(C.JSONStableStringify(r), "1"), t.fills.push(r);
3167
3220
  }(o), function(t) {
3168
3221
  const e = {
3169
3222
  bottom: { style: "none" },
@@ -3171,20 +3224,20 @@ var fr = (t, e, r, o) => {
3171
3224
  right: { style: "none" },
3172
3225
  top: { style: "none" }
3173
3226
  };
3174
- t.borderMap.set(S.JSONStableStringify(e), "0"), t.borders.push(e);
3227
+ t.borderMap.set(C.JSONStableStringify(e), "0"), t.borders.push(e);
3175
3228
  }(o), function(t, e) {
3176
- Ie(t, t.getNamed(_.BuiltInName.Normal).toJSON(), e);
3229
+ ne(t, t.getNamed(E.BuiltInName.Normal).toJSON(), e);
3177
3230
  }(t, o);
3178
- const n = e?.named ?? C.EmptyArray;
3179
- for (const e of n) Ie(t, e, o);
3180
- for (const e of r) Re(t, e, o);
3231
+ const n = e?.named ?? k.EmptyArray;
3232
+ for (const e of n) ne(t, e, o);
3233
+ for (const e of r) oe(t, e, o);
3181
3234
  return o;
3182
- }(n, o, s), l = e.getSharedStates().get(Gt), i = function(t, e = 0) {
3235
+ }(n, o, s), l = e.getSharedStates().get(ee), i = function(t, e = 0) {
3183
3236
  const r = t?.tables;
3184
3237
  if (!r) return null;
3185
3238
  const o = r.styles;
3186
3239
  if (!o) return null;
3187
- const n = [], s = /* @__PURE__ */ new Map(), a = Object.keys(o), l = [...Ne].reverse();
3240
+ const n = [], s = /* @__PURE__ */ new Map(), a = Object.keys(o), l = [...me].reverse();
3188
3241
  for (const t of a) {
3189
3242
  const r = o[t];
3190
3243
  for (const o of l) {
@@ -3210,7 +3263,7 @@ var fr = (t, e, r, o) => {
3210
3263
  for (let t = 0; t < n; t++) {
3211
3264
  const r = o[t];
3212
3265
  e.empty("numFmt", {
3213
- numFmtId: String(t + Ee),
3266
+ numFmtId: String(t + pe),
3214
3267
  formatCode: r
3215
3268
  });
3216
3269
  }
@@ -3221,28 +3274,28 @@ var fr = (t, e, r, o) => {
3221
3274
  count: String(s),
3222
3275
  "x14ac:knownFonts": "1"
3223
3276
  });
3224
- for (const o of n) Fe(t, e, o, r);
3277
+ for (const o of n) se(t, e, o, r);
3225
3278
  e.end("fonts");
3226
3279
  }(e, r, n, a), function(t, e, r, o) {
3227
3280
  const n = o.fills, s = n.length;
3228
3281
  e.start("fills", { count: String(s) });
3229
- for (const t of n) me(0, e, t, r, !0);
3282
+ for (const t of n) Wt(0, e, t, r, !0);
3230
3283
  e.end("fills");
3231
3284
  }(0, r, n, a), function(t, e, r, o) {
3232
3285
  const n = o.borders, s = n.length;
3233
3286
  e.start("borders", { count: String(s) });
3234
3287
  const a = r.getTheme();
3235
- for (const r of n) Ae(t, e, r, a, !1);
3288
+ for (const r of n) le(t, e, r, a, !1);
3236
3289
  e.end("borders");
3237
3290
  }(e, r, n, a), function(t, e, r, o, n) {
3238
3291
  const s = n.namedStyles, a = s.length;
3239
3292
  e.start("cellStyleXfs", { count: String(a) });
3240
- for (const o of s) _e(t, e, r, o.style ?? C.EmptyObject, n, !1);
3293
+ for (const o of s) ce(t, e, r, o.style ?? k.EmptyObject, n, !1);
3241
3294
  e.end("cellStyleXfs");
3242
3295
  }(e, r, n, 0, a), function(t, e, r, o, n) {
3243
3296
  const s = o.length;
3244
3297
  e.start("cellXfs", { count: String(s) });
3245
- for (let a = 0; a < s; a++) _e(t, e, r, o[a], n, !0);
3298
+ for (let a = 0; a < s; a++) ce(t, e, r, o[a], n, !0);
3246
3299
  e.end("cellXfs");
3247
3300
  }(e, r, n, s, a), function(t, e, r, o, n) {
3248
3301
  const s = n.namedStyles, a = s.length;
@@ -3255,7 +3308,7 @@ var fr = (t, e, r, o) => {
3255
3308
  };
3256
3309
  o.hidden && (i.hidden = "1"), o.iLevel && (i.iLevel = String(o.iLevel));
3257
3310
  let c = null;
3258
- c = a === _.BuiltInName.Normal.toLowerCase() ? 0 : r.getNamed(n).getBuiltInID(), null !== c && (i.builtinId = String(c), i.customBuiltin = "1"), e.empty("cellStyle", i);
3311
+ c = a === E.BuiltInName.Normal.toLowerCase() ? 0 : r.getNamed(n).getBuiltInID(), null !== c && (i.builtinId = String(c), i.customBuiltin = "1"), e.empty("cellStyle", i);
3259
3312
  }
3260
3313
  e.end("cellStyles");
3261
3314
  }(0, r, n, 0, a), function(t, e, r, o, n) {
@@ -3263,21 +3316,8 @@ var fr = (t, e, r, o) => {
3263
3316
  if (0 === s.length) return void e.empty("dxfs", { count: "0" });
3264
3317
  const a = r.getTheme();
3265
3318
  e.start("dxfs", { count: String(s.length) });
3266
- let l = Ee;
3267
- for (const o of s) {
3268
- if (e.start("dxf"), o.font && Fe(t, e, o.font, r, !0), void 0 !== o.numberFormat && null !== o.numberFormat) {
3269
- const t = D.toBuiltInID(o.numberFormat), r = "number" == typeof t, n = r ? D.builtInFormat(t) : String(t);
3270
- n && e.empty("numFmt", {
3271
- numFmtId: String(r ? t : l++),
3272
- formatCode: n
3273
- });
3274
- }
3275
- if (o.fill && me(0, e, o.fill, r, !0, !0), o.alignment) {
3276
- const r = Pe(t, e, o.alignment, !0);
3277
- r && e.empty("alignment", r);
3278
- }
3279
- o.border && Ae(t, e, o.border, a, !0), e.end("dxf");
3280
- }
3319
+ let l = pe;
3320
+ for (const o of s) l = de(t, e, o, r, a, "dxf", l);
3281
3321
  e.end("dxfs");
3282
3322
  }(e, r, n, i, l), function(t, e, r, o, n) {
3283
3323
  const s = o?.tables, a = s?.styles ?? null, l = a ? Object.keys(a) : null, i = l ? l.length : 0, c = {
@@ -3289,7 +3329,7 @@ var fr = (t, e, r, o) => {
3289
3329
  e.start("tableStyles", c);
3290
3330
  for (const t of l) {
3291
3331
  const r = a[t], o = [];
3292
- for (const t of Ne) {
3332
+ for (const t of me) {
3293
3333
  const e = r[t];
3294
3334
  e && o.push([t, e]);
3295
3335
  }
@@ -3312,7 +3352,7 @@ var fr = (t, e, r, o) => {
3312
3352
  if (e.start("colors"), n) {
3313
3353
  e.start("indexedColors");
3314
3354
  for (const t of o.indexedColors) {
3315
- const r = Ot(t, !0);
3355
+ const r = $t(t, !0);
3316
3356
  e.empty("rgbColor", { rgb: r });
3317
3357
  }
3318
3358
  e.end("indexedColors");
@@ -3320,7 +3360,7 @@ var fr = (t, e, r, o) => {
3320
3360
  if (s) {
3321
3361
  e.start("mruColors");
3322
3362
  for (const t of o.mruColors) {
3323
- const r = Ot(t);
3363
+ const r = $t(t);
3324
3364
  e.empty("color", { rgb: r });
3325
3365
  }
3326
3366
  e.end("mruColors");
@@ -3337,7 +3377,7 @@ var fr = (t, e, r, o) => {
3337
3377
  }(0, r), r.end("styleSheet"), r.close();
3338
3378
  }
3339
3379
  }(),
3340
- new class extends j {
3380
+ new class extends U {
3341
3381
  constructor() {
3342
3382
  super({
3343
3383
  kind: "propsCore",
@@ -3358,14 +3398,14 @@ var fr = (t, e, r, o) => {
3358
3398
  const o = /* @__PURE__ */ new Date(), n = [
3359
3399
  ["creator", "SheetXL"],
3360
3400
  ["lastModifiedBy", "SheetXL"],
3361
- ["created", De(o)],
3362
- ["modified", De(o)]
3401
+ ["created", We(o)],
3402
+ ["modified", We(o)]
3363
3403
  ];
3364
- for (const t of n) Oe(r, t[0], t[1]);
3404
+ for (const t of n) ze(r, t[0], t[1]);
3365
3405
  r.end("cp:coreProperties"), r.close();
3366
3406
  }
3367
3407
  }(),
3368
- new class extends j {
3408
+ new class extends U {
3369
3409
  constructor() {
3370
3410
  super({
3371
3411
  kind: "propsApp",
@@ -3375,21 +3415,21 @@ var fr = (t, e, r, o) => {
3375
3415
  });
3376
3416
  }
3377
3417
  async emit(t, e) {
3378
- const r = e.getXMLWriter(), o = t.model, n = await N.getDetails(), s = function(t) {
3379
- if (!t || "string" != typeof t) return Xt;
3418
+ const r = e.getXMLWriter(), o = t.model, n = await O.getDetails(), s = function(t) {
3419
+ if (!t || "string" != typeof t) return ve;
3380
3420
  if ("local" === t || "dev" === t || "development" === t) return "00.0000";
3381
3421
  const e = t.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
3382
- if (!e) return Xt;
3422
+ if (!e) return ve;
3383
3423
  const r = parseInt(e[1], 10), o = parseInt(e[2] || "0", 10);
3384
- return r > 99 || o > 9999 ? Xt : `${r.toString()}.${o.toString().padStart(4, "0")}`;
3424
+ return r > 99 || o > 9999 ? ve : `${r.toString()}.${o.toString().padStart(4, "0")}`;
3385
3425
  }(n.getBuildVersion()), a = n.getLicensee() || "";
3386
3426
  r.setValidationDisabled(!0), r.decl(), r.start("Properties", {
3387
3427
  xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
3388
3428
  "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
3389
- }), Be(e, r, "Application", "SheetXL"), Be(e, r, "DocSecurity", "0"), Be(e, r, "ScaleCrop", "false"), Ve(e, r, o), Be(e, r, "Company", a), Be(e, r, "LinksUpToDate", "false"), Be(e, r, "SharedDoc", "false"), Be(e, r, "HyperlinksChanged", "false"), Be(e, r, "AppVersion", s), r.end("Properties"), r.close();
3429
+ }), je(e, r, "Application", "SheetXL"), je(e, r, "DocSecurity", "0"), je(e, r, "ScaleCrop", "false"), Xe(e, r, o), je(e, r, "Company", a), je(e, r, "LinksUpToDate", "false"), je(e, r, "SharedDoc", "false"), je(e, r, "HyperlinksChanged", "false"), je(e, r, "AppVersion", s), r.end("Properties"), r.close();
3390
3430
  }
3391
3431
  }(),
3392
- new class extends j {
3432
+ new class extends U {
3393
3433
  constructor() {
3394
3434
  super({
3395
3435
  kind: "metadata",
@@ -3405,11 +3445,11 @@ var fr = (t, e, r, o) => {
3405
3445
  const p = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" };
3406
3446
  if (o && (p["xmlns:xda"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"), n && (p["xmlns:xlrd"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata"), r.decl(), r.start("metadata", p), r.start("metadataTypes", { count: d }), o && r.empty("metadataType", {
3407
3447
  name: "XLDAPR",
3408
- ...$e,
3448
+ ...Ue,
3409
3449
  cellMeta: "1"
3410
3450
  }), n && r.empty("metadataType", {
3411
3451
  name: "XLRICHVALUE",
3412
- ...$e
3452
+ ...Ue
3413
3453
  }), r.end("metadataTypes"), o) {
3414
3454
  r.start("futureMetadata", {
3415
3455
  name: "XLDAPR",
@@ -3448,7 +3488,7 @@ var fr = (t, e, r, o) => {
3448
3488
  r.end("metadata"), r.close();
3449
3489
  }
3450
3490
  }(),
3451
- new class extends j {
3491
+ new class extends U {
3452
3492
  constructor() {
3453
3493
  super({
3454
3494
  kind: "richValue",
@@ -3473,7 +3513,7 @@ var fr = (t, e, r, o) => {
3473
3513
  r.end("rvData"), r.close();
3474
3514
  }
3475
3515
  }(),
3476
- new class extends j {
3516
+ new class extends U {
3477
3517
  constructor() {
3478
3518
  super({
3479
3519
  kind: "richValueStructure",
@@ -3499,7 +3539,7 @@ var fr = (t, e, r, o) => {
3499
3539
  r.end("rvStructures"), r.close();
3500
3540
  }
3501
3541
  }(),
3502
- new class extends j {
3542
+ new class extends U {
3503
3543
  constructor() {
3504
3544
  super({
3505
3545
  kind: "richValueTypes",
@@ -3540,7 +3580,7 @@ var fr = (t, e, r, o) => {
3540
3580
  r.end("keyFlags"), r.end("global"), r.end("rvTypesInfo"), r.close();
3541
3581
  }
3542
3582
  }(),
3543
- new class extends j {
3583
+ new class extends U {
3544
3584
  constructor() {
3545
3585
  super({
3546
3586
  kind: "drawing",
@@ -3577,33 +3617,33 @@ var fr = (t, e, r, o) => {
3577
3617
  }
3578
3618
  for (let t = 0; t < l; t++) {
3579
3619
  const l = a[t], i = s[t], d = l.content?.type;
3580
- switch (r.start("twoCellAnchor", { editAs: l.anchorType || "twoCell" }), lr(r, "from", l.anchor.tl), lr(r, "to", l.anchor.br), d) {
3620
+ switch (r.start("twoCellAnchor", { editAs: l.anchorType || "twoCell" }), mr(r, "from", l.anchor.tl), mr(r, "to", l.anchor.br), d) {
3581
3621
  case "picture":
3582
- await He(e, n, o, i, l);
3622
+ await Ze(e, n, o, i, l);
3583
3623
  break;
3584
3624
  case "chart":
3585
- await Je(e, n, o, i, l, c.get(l));
3625
+ await tr(e, n, o, i, l, c.get(l));
3586
3626
  break;
3587
3627
  case "shape":
3588
- await Qe(e, n, o, i, l, c.get(l));
3628
+ await nr(e, n, o, i, l, c.get(l));
3589
3629
  break;
3590
3630
  case "smartArt":
3591
- await Ke(e, n, o, i, l);
3631
+ await er(e, n, o, i, l);
3592
3632
  break;
3593
3633
  case "slicer":
3594
- await Ye(e, n, o, i, l);
3634
+ await rr(e, n, o, i, l);
3595
3635
  break;
3596
3636
  case "graphicFrame":
3597
- await Ze(e, n, o, i, l);
3637
+ await or(e, n, o, i, l);
3598
3638
  break;
3599
- default: await tr(e, n, o, i, l);
3639
+ default: await sr(e, n, o, i, l);
3600
3640
  }
3601
3641
  r.empty("clientData"), r.end("twoCellAnchor");
3602
3642
  }
3603
3643
  r.end("wsDr"), r.close();
3604
3644
  }
3605
3645
  }(),
3606
- new class extends j {
3646
+ new class extends U {
3607
3647
  constructor() {
3608
3648
  super({
3609
3649
  kind: "table",
@@ -3622,10 +3662,10 @@ var fr = (t, e, r, o) => {
3622
3662
  "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
3623
3663
  "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"
3624
3664
  }, n = t.json, s = t.model;
3625
- s.isShowHeaders(), o.id = ++ir, o.name = n.name?.trim(), o.displayName = n.description ?? n.name, o.ref = t.ref, 1 !== n.headerRowCount && (o.headerRowCount = n.headerRowCount), 0 !== n.totalsRowCount && (o.totalsRowCount = n.totalsRowCount), s.isShowTotals() || (o.totalsRowShown = "0"), r.start("table", o), s.isShowHeaders() && Vt(e, r, s, n), cr(e, r, s, n), dr(e, r, s, n), r.end("table"), r.close();
3665
+ s.isShowHeaders(), o.id = ++fr, o.name = n.name?.trim(), o.displayName = n.description ?? n.name, o.ref = t.ref, 1 !== n.headerRowCount && (o.headerRowCount = n.headerRowCount), 0 !== n.totalsRowCount && (o.totalsRowCount = n.totalsRowCount), s.isShowTotals() || (o.totalsRowShown = "0"), r.start("table", o), s.isShowHeaders() && he(e, r, s, n), ur(e, r, s, n), hr(e, r, s, n), r.end("table"), r.close();
3626
3666
  }
3627
3667
  }(),
3628
- new class extends j {
3668
+ new class extends U {
3629
3669
  constructor() {
3630
3670
  super({
3631
3671
  kind: "chart",
@@ -3641,10 +3681,10 @@ var fr = (t, e, r, o) => {
3641
3681
  "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3642
3682
  "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
3643
3683
  "xmlns:c16r2": "http://schemas.microsoft.com/office/drawing/2015/06/chart"
3644
- }), r.empty("date1904", { val: "0" }), r.empty("lang", { val: "en-US" }), r.empty("roundedCorners", { val: "0" }), fr(e, r, t.model, t.json), ur(e, r, t.styles, t.model, t.json), hr(e, r, t.model, t.json), r.end("chartSpace"), r.popDefaultNamespace(), r.close(), e.addPart("chartStyle", { styles: t.styles }), e.addPart("chartColors", { styles: t.styles });
3684
+ }), r.empty("date1904", { val: "0" }), r.empty("lang", { val: "en-US" }), r.empty("roundedCorners", { val: "0" }), xr(e, r, t.model, t.json), vr(e, r, t.styles, t.model, t.json), Sr(e, r, t.model, t.json), r.end("chartSpace"), r.popDefaultNamespace(), r.close(), e.addPart("chartStyle", { styles: t.styles }), e.addPart("chartColors", { styles: t.styles });
3645
3685
  }
3646
3686
  }(),
3647
- new class extends j {
3687
+ new class extends U {
3648
3688
  constructor() {
3649
3689
  super({
3650
3690
  kind: "chartStyle",
@@ -3659,10 +3699,10 @@ var fr = (t, e, r, o) => {
3659
3699
  "xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
3660
3700
  "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3661
3701
  id: "297"
3662
- }), yr(e, r, Jr, t.styles), r.end("chartStyle"), r.close();
3702
+ }), br(e, r, to, t.styles), r.end("chartStyle"), r.close();
3663
3703
  }
3664
3704
  }(),
3665
- new class extends j {
3705
+ new class extends U {
3666
3706
  constructor() {
3667
3707
  super({
3668
3708
  kind: "chartColors",
@@ -3678,16 +3718,16 @@ var fr = (t, e, r, o) => {
3678
3718
  "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3679
3719
  meth: "cycle",
3680
3720
  id: "10"
3681
- }), r.empty("a:schemeClr", { val: "accent1" }), r.empty("a:schemeClr", { val: "accent2" }), r.empty("a:schemeClr", { val: "accent3" }), r.empty("a:schemeClr", { val: "accent4" }), r.empty("a:schemeClr", { val: "accent5" }), r.empty("a:schemeClr", { val: "accent6" }), Kr(e, r, Yr), r.end("cs:colorStyle"), r.close();
3721
+ }), r.empty("a:schemeClr", { val: "accent1" }), r.empty("a:schemeClr", { val: "accent2" }), r.empty("a:schemeClr", { val: "accent3" }), r.empty("a:schemeClr", { val: "accent4" }), r.empty("a:schemeClr", { val: "accent5" }), r.empty("a:schemeClr", { val: "accent6" }), eo(e, r, ro), r.end("cs:colorStyle"), r.close();
3682
3722
  }
3683
3723
  }()
3684
- ], Qr = async (t, e) => {
3685
- const r = new St();
3686
- for (const t of Zr) r.register(t);
3687
- const o = to, n = X.createUint8Array({
3724
+ ], no = async (t, e) => {
3725
+ const r = new Ct();
3726
+ for (const t of oo) r.register(t);
3727
+ const o = so, n = H.createUint8Array({
3688
3728
  lastModDate: new Date(1899, 11, 29, 19, 0, 0),
3689
3729
  level: o
3690
- }), s = t.getOrigin(), a = "Excel" === e?.format ? p(s) : null, l = /* @__PURE__ */ new Map(), i = new vt(n, r, {
3730
+ }), s = t.getOrigin(), a = "Excel" === e?.format ? d(s) : null, l = /* @__PURE__ */ new Map(), i = new wt(n, r, {
3691
3731
  strictDuplicateChildren: !0,
3692
3732
  onPartEmitted: e?.onPartEmitted,
3693
3733
  mapState: l,
@@ -3696,5 +3736,5 @@ var fr = (t, e, r, o) => {
3696
3736
  i.addPart("workbook", t, "/xl/workbook.xml"), await i.waitEmit(), i.addPart("propsCore", {}), i.addPart("propsApp", { model: t });
3697
3737
  const c = await i.build();
3698
3738
  return 0 === c.byteOffset && c.byteLength === c.buffer.byteLength ? c.buffer : c.slice().buffer;
3699
- }, to = 1;
3700
- export { Qr as writeXLSX };
3739
+ }, so = 1;
3740
+ export { no as writeXLSX };