@sheetxl/io-xlsx 0.7.28-beta.3 → 0.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/BAtEL-5TLyoaPFDP.cjs +2 -0
- package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +1 -0
- package/browser/cjs/CK5FFUvet6FnIYO_.cjs +5 -0
- package/browser/cjs/{BZsKjlEe8ttWIao7.cjs → DV6LeTEiiFUrZoxj.cjs} +1 -1
- package/browser/cjs/Db8YjGM6TG34c8aT.cjs +1 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{Da4uZFnis4q5dMxA.mjs → 4BWLu134ABlCQEtM.mjs} +928 -890
- package/browser/esm/{uIgz_sO2ZTlIJryO.mjs → BkNXyG6NC-w5Xo92.mjs} +2 -2
- package/browser/esm/{9k07cBjQx8ZMNU1r.mjs → BzQ_lPzc8C4OTIGZ.mjs} +2 -2
- package/browser/esm/{BwSyMclyk-t3Qsxs.mjs → CJknI8BYGSZr-4zS.mjs} +5 -5
- package/browser/esm/{DmzsYgxDBYYWxQWu.mjs → CLWzJJyoSrykkVLX.mjs} +2 -2
- package/browser/esm/{BjKFtNZckTyELfHX.mjs → Cok_fBIUCHDSrKw0.mjs} +260 -242
- package/browser/esm/{C0ftqc3PDJkuDjFG.mjs → Ctqql4O-3xj2K8vv.mjs} +2 -2
- package/browser/esm/{DofvhgOWFHBSl9vH.mjs → D-m_kQLaewdwuXaF.mjs} +743 -681
- package/browser/esm/{Wg4pN30I3RZmpjIf.mjs → Dj7D2nVdAZ3TiUks.mjs} +1460 -1392
- package/browser/esm/{DatxS1drpnPiN0bA.mjs → Dz1Dp8DDJvhd09RR.mjs} +1 -1
- package/browser/esm/{B1HdC5n0VHTzJXno.mjs → ijQzHH-bvDfUHIi1.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{C9wIBQW-fwqlpFJm.mjs → CEAmv36xpTNgFwl_.mjs} +2 -2
- package/node/esm/{CUQy4BVE8DwTALUu.mjs → CEV7nKotMpeRRnQC.mjs} +1 -1
- package/node/esm/{BTiGUmPt1-zNmYTg.mjs → CF1R5ovFsRNu--Rw.mjs} +994 -950
- package/node/esm/{DWNfn3shRCVhbEOV.mjs → Ctcl4jN52INWpKWC.mjs} +197 -179
- package/node/esm/{BOF2zpi3fMaBFMe7.mjs → CvnRSooxEQdlJgMn.mjs} +741 -677
- package/node/esm/{zldOc2ba5Vlg1s2E.mjs → DQd0vxzTaPt2qSL-.mjs} +1 -1
- package/node/esm/{DYH_lfcyj9wTL8Er.mjs → fOnuUjpPCAzmuIXN.mjs} +2 -2
- package/node/esm/index.mjs +5 -5
- package/node/esm/{f9-SN-lQDdZGt0vO.mjs → ssSlRCbCqxvZ9IX8.mjs} +613 -545
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +62 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +10 -0
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +1 -1
- package/types/src/reader/sax/SaxVisitor.d.ts +14 -0
- package/types/src/writer/builder/EmitterRegistry.d.ts +7 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +13 -2
- package/types/src/writer/utils/AutoFilter.d.ts +3 -2
- package/browser/cjs/5QaWZ2tRVhz1rf3W.cjs +0 -1
- package/browser/cjs/Bi-WvoygX7yZzlxU.cjs +0 -5
- package/browser/cjs/D-8WoJkvdPf-79sB.cjs +0 -2
- 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.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
|
|
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 {
|
|
9
|
-
import { AddressUtils as
|
|
10
|
-
import { BlobWriter as
|
|
11
|
-
var
|
|
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 "./ssSlRCbCqxvZ9IX8.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
|
-
},
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
92
|
+
function q(t) {
|
|
93
93
|
const e = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), r = (t) => e(t).replace(/"/g, """), 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
|
|
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 =
|
|
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
|
|
176
|
-
const e =
|
|
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
|
|
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
|
|
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
|
|
190
|
+
function Z(t) {
|
|
191
191
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """).replace(/>/g, ">");
|
|
192
192
|
}
|
|
193
|
-
function
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
230
|
+
function rt(t) {
|
|
231
231
|
return new TextEncoder().encode(t);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
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
|
|
252
|
-
function
|
|
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
|
|
263
|
-
return t.replace(
|
|
262
|
+
function at(t) {
|
|
263
|
+
return t.replace(nt, st);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
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]] =
|
|
268
|
+
for (; o = r.exec(t);) e[o[1]] = at(o[2]);
|
|
269
269
|
return e;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
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(
|
|
274
|
+
for (; n = o.exec(t);) r.push(lt(n[1]));
|
|
275
275
|
return r;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
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
|
|
284
|
+
var dt = class {
|
|
285
285
|
constructor(t) {
|
|
286
|
-
this.rels = [], this.usedIds = /* @__PURE__ */ new Set(), this.nextId = 1, this.sourcePart =
|
|
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) =>
|
|
306
|
-
e.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), e.push(`<Relationships xmlns="${
|
|
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="${
|
|
310
|
-
`Type="${
|
|
311
|
-
`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>"),
|
|
315
|
+
return e.push("</Relationships>"), rt(e.join(""));
|
|
316
316
|
}
|
|
317
|
-
},
|
|
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="${
|
|
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="${
|
|
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="${
|
|
349
|
-
return t.push("</Types>"),
|
|
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
|
-
},
|
|
351
|
+
}, ft = "http://schemas.openxmlformats.org/package/2006/content-types", ut = class {
|
|
352
352
|
constructor(t) {
|
|
353
|
-
this.parts = [], this.relsRoot = new
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
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
|
-
},
|
|
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
|
|
404
|
-
return
|
|
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 =
|
|
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
|
|
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
|
|
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) ||
|
|
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 =
|
|
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
|
|
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,20 +463,20 @@ 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 || !
|
|
467
|
-
const o =
|
|
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
|
|
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 =
|
|
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)"));
|
|
478
|
+
const e = tt((s ? s + "/" : "") + a.target);
|
|
479
|
+
r.has(e) || this._explicitRelTargets.has(`${t}::${e}`) || (o.has(e) ? n.add(a.type, a.target) : this._registry.ownsRelType(a.type) || console.warn(`Dropping preserved relationship to missing part '${e}'`, t || "(root)"));
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
addPart(t, e, r) {
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
526
|
+
const a = this._writtenPaths, l = Q(t, n, a, s);
|
|
527
527
|
let i = null;
|
|
528
528
|
if (o) {
|
|
529
|
-
const e =
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
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),
|
|
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
|
-
},
|
|
625
|
+
}, bt = !1, Ct = class {
|
|
626
626
|
constructor() {
|
|
627
627
|
this.map = /* @__PURE__ */ new Map();
|
|
628
628
|
}
|
|
@@ -638,11 +638,15 @@ var vt = class {
|
|
|
638
638
|
has(t) {
|
|
639
639
|
return this.map.has(t);
|
|
640
640
|
}
|
|
641
|
+
ownsRelType(t) {
|
|
642
|
+
for (const e of this.map.values()) if (e.relTypeUri === t) return !0;
|
|
643
|
+
return !1;
|
|
644
|
+
}
|
|
641
645
|
};
|
|
642
|
-
function
|
|
646
|
+
function Tt(t, e, r) {
|
|
643
647
|
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
648
|
}
|
|
645
|
-
var
|
|
649
|
+
var kt = class {
|
|
646
650
|
constructor() {
|
|
647
651
|
this._daprFMBks = [], this._daprFMBkMap = /* @__PURE__ */ new Map(), this._rvFMBks = [], this._rvFMBkMap = /* @__PURE__ */ new Map(), this._valueMeta = [];
|
|
648
652
|
}
|
|
@@ -678,20 +682,20 @@ var Ct = class {
|
|
|
678
682
|
getValueMeta() {
|
|
679
683
|
return this._valueMeta;
|
|
680
684
|
}
|
|
681
|
-
},
|
|
685
|
+
}, Mt = class {
|
|
682
686
|
constructor(t, e = console.warn) {
|
|
683
687
|
this._entries = [], this._keyMap = /* @__PURE__ */ new Map(), this._metaCollector = t, this._onWarn = e;
|
|
684
688
|
}
|
|
685
689
|
add(t) {
|
|
686
690
|
if (null == t) return this._onWarn?.("RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!"), this._registerFallback();
|
|
687
|
-
if (
|
|
688
|
-
const e = t.getCode(), r = this._register(`_error:${e}`, { errorType: "" + (e - 1) },
|
|
691
|
+
if (R.isError(t)) {
|
|
692
|
+
const e = t.getCode(), r = this._register(`_error:${e}`, { errorType: "" + (e - 1) }, Rt);
|
|
689
693
|
return this._metaCollector.registerRichValueCell(r);
|
|
690
694
|
}
|
|
691
695
|
return t.isIRichData && t.getType(), this._onWarn?.("RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!", t), this._registerFallback();
|
|
692
696
|
}
|
|
693
697
|
_registerFallback() {
|
|
694
|
-
const t = this._register("_error:fallback", { errorType:
|
|
698
|
+
const t = this._register("_error:fallback", { errorType: R.Code.Unknown - 1 }, Rt);
|
|
695
699
|
return this._metaCollector.registerRichValueCell(t);
|
|
696
700
|
}
|
|
697
701
|
_register(t, e, r) {
|
|
@@ -724,7 +728,7 @@ var Ct = class {
|
|
|
724
728
|
}
|
|
725
729
|
return -1;
|
|
726
730
|
}
|
|
727
|
-
},
|
|
731
|
+
}, Rt = new class {
|
|
728
732
|
constructor(t, e) {
|
|
729
733
|
this.type = t, this.props = e;
|
|
730
734
|
}
|
|
@@ -743,53 +747,58 @@ var Ct = class {
|
|
|
743
747
|
"i",
|
|
744
748
|
"0"
|
|
745
749
|
]]);
|
|
746
|
-
|
|
750
|
+
var It = {
|
|
751
|
+
auto: "auto",
|
|
752
|
+
automaticExceptTables: "autoNoTable",
|
|
753
|
+
manual: "manual"
|
|
754
|
+
};
|
|
755
|
+
function Ft(t, e, r, o) {
|
|
747
756
|
if (!r) return;
|
|
748
757
|
const n = "string" == typeof r ? e.parseColor(r) : r;
|
|
749
758
|
o && t.start(o);
|
|
750
759
|
const s = n.getType(), a = n.getVal(), l = n.getAdjustments(), i = l && l.length > 0;
|
|
751
760
|
switch (s) {
|
|
752
761
|
case "scheme":
|
|
753
|
-
i ? (t.start("schemeClr", { val: a }),
|
|
762
|
+
i ? (t.start("schemeClr", { val: a }), At(t, l), t.end("schemeClr")) : t.empty("schemeClr", { val: a });
|
|
754
763
|
break;
|
|
755
764
|
case "named":
|
|
756
|
-
if (
|
|
765
|
+
if (T.isSystem(a)) {
|
|
757
766
|
const e = n.getLastColor() ?? n.getBaseColor().toHex().toString(!1).replace("#", "");
|
|
758
767
|
i ? (t.start("sysClr", {
|
|
759
768
|
val: a,
|
|
760
769
|
lastClr: e
|
|
761
|
-
}),
|
|
770
|
+
}), At(t, l), t.end("sysClr")) : t.empty("sysClr", {
|
|
762
771
|
val: a,
|
|
763
772
|
lastClr: e
|
|
764
773
|
});
|
|
765
|
-
} else i ? (t.start("prstClr", { val: a }),
|
|
774
|
+
} else i ? (t.start("prstClr", { val: a }), At(t, l), t.end("prstClr")) : t.empty("prstClr", { val: a });
|
|
766
775
|
break;
|
|
767
776
|
case "auto": {
|
|
768
777
|
const e = n.getLastColor() ?? n.getBaseColor().toHex().toString(!1).replace("#", "");
|
|
769
778
|
i ? (t.start("sysClr", {
|
|
770
779
|
val: "windowText",
|
|
771
780
|
lastClr: e
|
|
772
|
-
}),
|
|
781
|
+
}), At(t, l), t.end("sysClr")) : t.empty("sysClr", {
|
|
773
782
|
val: "windowText",
|
|
774
783
|
lastClr: e
|
|
775
784
|
});
|
|
776
785
|
break;
|
|
777
786
|
}
|
|
778
787
|
case "index":
|
|
779
|
-
i ? (t.start("srgbClr", { val: a }),
|
|
788
|
+
i ? (t.start("srgbClr", { val: a }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: a });
|
|
780
789
|
break;
|
|
781
790
|
case "hsl":
|
|
782
791
|
const e = n.toHex().toString();
|
|
783
|
-
i ? (t.start("srgbClr", { val: e }),
|
|
792
|
+
i ? (t.start("srgbClr", { val: e }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: e });
|
|
784
793
|
break;
|
|
785
794
|
case "rgb":
|
|
786
795
|
case "lrgb":
|
|
787
796
|
const r = n.toHex().toString();
|
|
788
|
-
i ? (t.start("srgbClr", { val: r }),
|
|
797
|
+
i ? (t.start("srgbClr", { val: r }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: r });
|
|
789
798
|
break;
|
|
790
799
|
case "hex":
|
|
791
800
|
const o = a.replace("#", "").toUpperCase();
|
|
792
|
-
i ? (t.start("srgbClr", { val: o }),
|
|
801
|
+
i ? (t.start("srgbClr", { val: o }), At(t, l), t.end("srgbClr")) : t.empty("srgbClr", { val: o });
|
|
793
802
|
break;
|
|
794
803
|
default:
|
|
795
804
|
const s = a.replace("#", "").toUpperCase();
|
|
@@ -797,7 +806,7 @@ function Mt(t, e, r, o) {
|
|
|
797
806
|
}
|
|
798
807
|
o && t.end(o);
|
|
799
808
|
}
|
|
800
|
-
function
|
|
809
|
+
function At(t, e) {
|
|
801
810
|
if (e && 0 !== e.length) for (const r of e) for (const [e, o] of Object.entries(r)) {
|
|
802
811
|
if (null == o) continue;
|
|
803
812
|
const r = e;
|
|
@@ -820,49 +829,49 @@ function Rt(t, e) {
|
|
|
820
829
|
}
|
|
821
830
|
}
|
|
822
831
|
}
|
|
823
|
-
function
|
|
832
|
+
function Pt(t, e, r, o, n = !1, s = !1) {
|
|
824
833
|
if (!r) return;
|
|
825
834
|
const a = "string" == typeof r ? e.parseColor(r) : r, l = () => {
|
|
826
|
-
t.empty(o, { rgb:
|
|
835
|
+
t.empty(o, { rgb: Vt(a.toHex().toString(!0)) });
|
|
827
836
|
}, i = a.getAdjustments(), c = i && i.length > 0, d = a.getType();
|
|
828
|
-
if (d !==
|
|
829
|
-
if (d ===
|
|
830
|
-
const e = a.getVal(), r =
|
|
837
|
+
if (d !== I.Type.Auto) {
|
|
838
|
+
if (d === I.Type.Scheme) {
|
|
839
|
+
const e = a.getVal(), r = Lt[e] ?? e, n = Et.get(r);
|
|
831
840
|
if (void 0 === n && "phClr" !== r) return console.warn(`Color scheme not in theme. schemeVal=${e} themeKey=${r}`), l();
|
|
832
841
|
const s = {};
|
|
833
842
|
if (s.theme = n, c) {
|
|
834
843
|
if (!function(t) {
|
|
835
844
|
for (const e of t) switch (Object.keys(e)[0]) {
|
|
836
|
-
case
|
|
837
|
-
case
|
|
838
|
-
case
|
|
839
|
-
case
|
|
840
|
-
case
|
|
841
|
-
case
|
|
842
|
-
case
|
|
843
|
-
case
|
|
844
|
-
case
|
|
845
|
+
case I.AdjustmentType.Tint:
|
|
846
|
+
case I.AdjustmentType.ETint:
|
|
847
|
+
case I.AdjustmentType.Shade:
|
|
848
|
+
case I.AdjustmentType.Lum:
|
|
849
|
+
case I.AdjustmentType.LumOff:
|
|
850
|
+
case I.AdjustmentType.LumMod:
|
|
851
|
+
case I.AdjustmentType.Alpha:
|
|
852
|
+
case I.AdjustmentType.AlphaOff:
|
|
853
|
+
case I.AdjustmentType.AlphaMod: continue;
|
|
845
854
|
default: return !1;
|
|
846
855
|
}
|
|
847
856
|
return !0;
|
|
848
857
|
}(i)) return l();
|
|
849
|
-
const t = 1 === i.length ? i[0][
|
|
858
|
+
const t = 1 === i.length ? i[0][I.AdjustmentType.ETint] : void 0;
|
|
850
859
|
let e;
|
|
851
|
-
if (void 0 !== t) e =
|
|
860
|
+
if (void 0 !== t) e = Ot(t);
|
|
852
861
|
else {
|
|
853
862
|
const t = a.getBaseColor().toHex().toString(!0), r = a.toHex().toString(!0);
|
|
854
|
-
e =
|
|
855
|
-
const r =
|
|
863
|
+
e = Ot(function(t, e) {
|
|
864
|
+
const r = Nt(t, 0, 255), o = Nt(e, 0, 255);
|
|
856
865
|
if (Math.abs(o - r) < 1e-9) return 0;
|
|
857
|
-
return o < r ? r <= 1e-9 ? -1 :
|
|
858
|
-
}(
|
|
866
|
+
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);
|
|
867
|
+
}(Bt(t), Bt(r)));
|
|
859
868
|
}
|
|
860
869
|
0 !== e && (s.tint = e);
|
|
861
870
|
}
|
|
862
871
|
t.empty(o, s);
|
|
863
872
|
return;
|
|
864
873
|
}
|
|
865
|
-
if (d ===
|
|
874
|
+
if (d === I.Type.Index) {
|
|
866
875
|
const e = a.getVal(), r = e.substring(5, e.length);
|
|
867
876
|
t.empty(o, { indexed: Number(r) });
|
|
868
877
|
return;
|
|
@@ -871,7 +880,7 @@ function It(t, e, r, o, n = !1, s = !1) {
|
|
|
871
880
|
}
|
|
872
881
|
t.empty(o, { auto: 1 });
|
|
873
882
|
}
|
|
874
|
-
var
|
|
883
|
+
var Lt = {
|
|
875
884
|
bg1: "lt1",
|
|
876
885
|
tx1: "dk1",
|
|
877
886
|
bg2: "lt2",
|
|
@@ -884,7 +893,7 @@ var Ft = {
|
|
|
884
893
|
accent6: "accent6",
|
|
885
894
|
hlink: "hlink",
|
|
886
895
|
folHlink: "folHlink"
|
|
887
|
-
},
|
|
896
|
+
}, _t = Object.freeze([
|
|
888
897
|
"lt1",
|
|
889
898
|
"dk1",
|
|
890
899
|
"lt2",
|
|
@@ -897,7 +906,7 @@ var Ft = {
|
|
|
897
906
|
"accent6",
|
|
898
907
|
"hlink",
|
|
899
908
|
"folHlink"
|
|
900
|
-
]),
|
|
909
|
+
]), Dt = Object.freeze([
|
|
901
910
|
"dk1",
|
|
902
911
|
"lt1",
|
|
903
912
|
"dk2",
|
|
@@ -910,15 +919,15 @@ var Ft = {
|
|
|
910
919
|
"accent6",
|
|
911
920
|
"hlink",
|
|
912
921
|
"folHlink"
|
|
913
|
-
]),
|
|
914
|
-
function
|
|
922
|
+
]), Et = new Map(_t.map((t, e) => [t, e]));
|
|
923
|
+
function Nt(t, e, r) {
|
|
915
924
|
return Math.max(e, Math.min(r, t));
|
|
916
925
|
}
|
|
917
|
-
function
|
|
918
|
-
const e =
|
|
926
|
+
function Ot(t) {
|
|
927
|
+
const e = Nt(t, -1, 1);
|
|
919
928
|
return Math.abs(e) < 1e-12 ? 0 : e;
|
|
920
929
|
}
|
|
921
|
-
function
|
|
930
|
+
function Bt(t) {
|
|
922
931
|
const e = function(t) {
|
|
923
932
|
const e = t.replace(/^#/, "").toUpperCase();
|
|
924
933
|
if (8 === e.length) return e.slice(2);
|
|
@@ -927,355 +936,17 @@ function Nt(t) {
|
|
|
927
936
|
}(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
937
|
return (Math.max(r, o, n) + Math.min(r, o, n)) / 2 * 255;
|
|
929
938
|
}
|
|
930
|
-
function
|
|
939
|
+
function Vt(t) {
|
|
931
940
|
const e = t.replace(/^#/, "").toUpperCase();
|
|
932
941
|
if (8 === e.length) return e;
|
|
933
942
|
if (6 === e.length) return "FF" + e;
|
|
934
943
|
throw new Error(`Invalid hex: ${t}`);
|
|
935
944
|
}
|
|
936
|
-
function
|
|
945
|
+
function $t(t, e = !1) {
|
|
937
946
|
let r = t;
|
|
938
947
|
return 8 === r.length && (r = r.substring(2, 8)), 6 === r.length && (r = (e ? "00" : "FF") + r), r.toUpperCase();
|
|
939
948
|
}
|
|
940
|
-
|
|
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) {
|
|
949
|
+
function Wt(t, e, r, o, n = !1, s = !1) {
|
|
1279
950
|
const a = o.getTheme();
|
|
1280
951
|
if (n && e.start("fill"), "string" == typeof r && (r = {
|
|
1281
952
|
type: L.Type.Solid,
|
|
@@ -1283,10 +954,10 @@ function me(t, e, r, o, n = !1, s = !1) {
|
|
|
1283
954
|
}), r.type === L.Type.None) n ? e.empty("patternFill", { patternType: "none" }) : e.empty("noFill");
|
|
1284
955
|
else if (r.type === L.Type.Solid) {
|
|
1285
956
|
const t = r;
|
|
1286
|
-
n ? e.start("patternFill", { patternType: "solid" }) : e.start("solidFill"), t.color && (n ?
|
|
957
|
+
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
958
|
} else if (r.type === L.Type.Pattern) {
|
|
1288
959
|
const t = r, o = t.patternType || "solid";
|
|
1289
|
-
e.start("patternFill", { patternType: o }), t.foreground && (n ?
|
|
960
|
+
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
961
|
} else if (r.type === L.Type.Gradient && n) {
|
|
1291
962
|
const t = r, o = {}, n = t.gradientType;
|
|
1292
963
|
if (n !== L.GradientType.Path && n !== L.GradientType.Linear || (o.type = n), void 0 !== t.angle) {
|
|
@@ -1303,7 +974,7 @@ function me(t, e, r, o, n = !1, s = !1) {
|
|
|
1303
974
|
const e = t;
|
|
1304
975
|
o = e.offset || 0, r = e.color;
|
|
1305
976
|
}
|
|
1306
|
-
e.start("stop", { position: String(o) }), r &&
|
|
977
|
+
e.start("stop", { position: String(o) }), r && Pt(e, a, r, "color"), e.end("stop");
|
|
1307
978
|
}
|
|
1308
979
|
e.end("gradientFill");
|
|
1309
980
|
} else if (r.type === L.Type.Gradient) {
|
|
@@ -1317,7 +988,7 @@ function me(t, e, r, o, n = !1, s = !1) {
|
|
|
1317
988
|
const e = t;
|
|
1318
989
|
o = e.offset || 0, r = e.color;
|
|
1319
990
|
}
|
|
1320
|
-
e.start("gs", { pos: String(
|
|
991
|
+
e.start("gs", { pos: String(k.roundAccurately(1e3 * o, 0)) }), r && Ft(e, a, r), e.end("gs");
|
|
1321
992
|
}
|
|
1322
993
|
e.end("gsLst");
|
|
1323
994
|
const s = t.gradientType;
|
|
@@ -1327,12 +998,12 @@ function me(t, e, r, o, n = !1, s = !1) {
|
|
|
1327
998
|
const o = t.focus;
|
|
1328
999
|
if (o) {
|
|
1329
1000
|
const t = {};
|
|
1330
|
-
void 0 !== o.t && (t.t = String(
|
|
1001
|
+
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
1002
|
}
|
|
1332
1003
|
e.end("path");
|
|
1333
1004
|
} else {
|
|
1334
1005
|
const r = {};
|
|
1335
|
-
void 0 !== t.angle && (r.ang = String(
|
|
1006
|
+
void 0 !== t.angle && (r.ang = String(k.roundAccurately(6e4 * t.angle, 0)));
|
|
1336
1007
|
const o = t.scaled;
|
|
1337
1008
|
void 0 !== o && (r.scaled = o ? "1" : "0"), e.empty("lin", r);
|
|
1338
1009
|
}
|
|
@@ -1340,132 +1011,143 @@ function me(t, e, r, o, n = !1, s = !1) {
|
|
|
1340
1011
|
} else n ? e.empty("patternFill", { patternType: "none" }) : e.empty("noFill");
|
|
1341
1012
|
n && e.end("fill");
|
|
1342
1013
|
}
|
|
1343
|
-
var
|
|
1014
|
+
var zt = (t, e, r, o) => {
|
|
1344
1015
|
if (!r) return e.start("ln"), e.empty("noFill"), void e.end("ln");
|
|
1345
1016
|
"string" == typeof r && (r = { fill: r });
|
|
1346
1017
|
const n = r, s = {};
|
|
1347
|
-
if (void 0 !== n.width && (s.w = String(
|
|
1018
|
+
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
1019
|
e.start("custDash");
|
|
1349
1020
|
for (let t = 0; t < n.dash.length; t += 2) e.empty("ds", {
|
|
1350
|
-
d: String(
|
|
1351
|
-
sp: String(
|
|
1021
|
+
d: String(k.roundAccurately(1e3 * n.dash[t], 0)),
|
|
1022
|
+
sp: String(k.roundAccurately(1e3 * (n.dash[t + 1] ?? 0), 0))
|
|
1352
1023
|
});
|
|
1353
1024
|
e.end("custDash");
|
|
1354
1025
|
} else "string" == typeof n.dash && e.empty("prstDash", { val: n.dash });
|
|
1355
|
-
if (n.lineJoin ===
|
|
1356
|
-
else if (n.lineJoin ===
|
|
1357
|
-
else if (n.lineJoin ===
|
|
1026
|
+
if (n.lineJoin === D.LineJoin.Round) e.empty("round");
|
|
1027
|
+
else if (n.lineJoin === D.LineJoin.Bevel) e.empty("bevel");
|
|
1028
|
+
else if (n.lineJoin === D.LineJoin.Miter) {
|
|
1358
1029
|
const t = {};
|
|
1359
|
-
void 0 !== n.miterLimit && (t.lim = String(
|
|
1030
|
+
void 0 !== n.miterLimit && (t.lim = String(k.roundAccurately(1e5 * n.miterLimit, 0))), e.empty("miter", t);
|
|
1360
1031
|
}
|
|
1361
1032
|
e.end("ln");
|
|
1362
|
-
},
|
|
1033
|
+
}, jt = (t) => "round" === t ? "rnd" : "butt" === t ? "flat" : "square" === t ? "sq" : t, Xt = (t, e, r, o = void 0, n = !1) => {
|
|
1363
1034
|
if (!r) return;
|
|
1364
1035
|
if (!(r.fill || r.stroke || r.effects?.length || n)) return;
|
|
1365
1036
|
const s = t.getXMLWriter();
|
|
1366
|
-
o && s.start(o), s.pushDefaultNamespace("a"), r.fill &&
|
|
1367
|
-
},
|
|
1037
|
+
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);
|
|
1038
|
+
}, Ut = (t, e, r, o) => {
|
|
1368
1039
|
e.start("effectLst");
|
|
1369
|
-
for (const t of o)
|
|
1040
|
+
for (const t of o) Ht(e, r, t);
|
|
1370
1041
|
e.end("effectLst");
|
|
1371
|
-
},
|
|
1042
|
+
}, Ht = (t, e, r) => {
|
|
1372
1043
|
switch (r.type) {
|
|
1373
|
-
case
|
|
1044
|
+
case P.Type.OuterShadow: {
|
|
1374
1045
|
const o = r, n = {};
|
|
1375
|
-
void 0 !== o.blur && (n.blurRad = String(
|
|
1046
|
+
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
1047
|
break;
|
|
1377
1048
|
}
|
|
1378
|
-
case
|
|
1049
|
+
case P.Type.InnerShadow: {
|
|
1379
1050
|
const o = r, n = {};
|
|
1380
|
-
void 0 !== o.blur && (n.blurRad = String(
|
|
1051
|
+
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
1052
|
break;
|
|
1382
1053
|
}
|
|
1383
|
-
case
|
|
1054
|
+
case P.Type.PresetShadow: {
|
|
1384
1055
|
const o = r, n = { prst: o.preset };
|
|
1385
|
-
void 0 !== o.distance && (n.dist = String(
|
|
1056
|
+
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
1057
|
break;
|
|
1387
1058
|
}
|
|
1388
|
-
case
|
|
1059
|
+
case P.Type.Glow: {
|
|
1389
1060
|
const o = r, n = {};
|
|
1390
|
-
void 0 !== o.radius && (n.rad = String(
|
|
1061
|
+
void 0 !== o.radius && (n.rad = String(Kt(o.radius))), t.start("glow", n), Ft(t, e, o.color), t.end("glow");
|
|
1391
1062
|
break;
|
|
1392
1063
|
}
|
|
1393
|
-
case
|
|
1064
|
+
case P.Type.SoftEdge: {
|
|
1394
1065
|
const e = r, o = {};
|
|
1395
|
-
void 0 !== e.radius && (o.rad = String(
|
|
1066
|
+
void 0 !== e.radius && (o.rad = String(Kt(e.radius))), t.empty("softEdge", o);
|
|
1396
1067
|
break;
|
|
1397
1068
|
}
|
|
1398
|
-
case
|
|
1069
|
+
case P.Type.Reflection: {
|
|
1399
1070
|
const e = r, o = {};
|
|
1400
|
-
void 0 !== e.blur && (o.blurRad = String(
|
|
1071
|
+
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
1072
|
break;
|
|
1402
1073
|
}
|
|
1403
1074
|
}
|
|
1404
|
-
},
|
|
1075
|
+
}, qt = { type: "none" }, Gt = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", Jt = {
|
|
1405
1076
|
mime: "image/png",
|
|
1406
1077
|
ext: "png"
|
|
1407
|
-
},
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1078
|
+
}, 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 {
|
|
1079
|
+
constructor() {
|
|
1080
|
+
this._dxfs = [], this._byKey = /* @__PURE__ */ new Map();
|
|
1081
|
+
}
|
|
1082
|
+
add(t) {
|
|
1083
|
+
const e = JSON.stringify(t);
|
|
1084
|
+
let r = this._byKey.get(e);
|
|
1085
|
+
return void 0 === r && (r = this._dxfs.length, this._dxfs.push(t), this._byKey.set(e, r)), r;
|
|
1086
|
+
}
|
|
1087
|
+
getDxfs() {
|
|
1088
|
+
return this._dxfs;
|
|
1089
|
+
}
|
|
1090
|
+
getCount() {
|
|
1091
|
+
return this._dxfs.length;
|
|
1092
|
+
}
|
|
1093
|
+
}, ee = "cfDxfs", re = [
|
|
1412
1094
|
"font",
|
|
1413
1095
|
"fill",
|
|
1414
1096
|
"border",
|
|
1415
1097
|
"numberFormat",
|
|
1416
1098
|
"alignment"
|
|
1417
1099
|
];
|
|
1418
|
-
function
|
|
1100
|
+
function oe(t, e, r) {
|
|
1419
1101
|
if (e) {
|
|
1420
1102
|
if (e.named) {
|
|
1421
1103
|
const o = e.named, n = o.toLowerCase(), s = r.namedStyleMap;
|
|
1422
1104
|
if (!s.has(n)) {
|
|
1423
1105
|
s.set(n, "" + s.size);
|
|
1424
1106
|
const e = t.getNamed(o).toJSON();
|
|
1425
|
-
|
|
1107
|
+
oe(t, e.style ?? k.EmptyObject, r), r.namedStyles.push(e);
|
|
1426
1108
|
}
|
|
1427
1109
|
}
|
|
1428
1110
|
e.font && function(t, e, r) {
|
|
1429
1111
|
if (!e) return;
|
|
1430
|
-
const o =
|
|
1112
|
+
const o = C.JSONStableStringify(e), n = r.fontMap;
|
|
1431
1113
|
if (!n.has(o)) {
|
|
1432
1114
|
const t = n.size;
|
|
1433
1115
|
n.set(o, "" + t), r.fonts.push(e);
|
|
1434
1116
|
}
|
|
1435
1117
|
}(0, e.font, r), e.fill && function(t, e, r) {
|
|
1436
1118
|
if (!e) return;
|
|
1437
|
-
const o =
|
|
1119
|
+
const o = C.JSONStableStringify(e), n = r.fillMap;
|
|
1438
1120
|
if (!n.has(o) && "object" == typeof e && e.type) {
|
|
1439
1121
|
const t = n.size;
|
|
1440
1122
|
n.set(o, "" + t), r.fills.push(e);
|
|
1441
1123
|
}
|
|
1442
1124
|
}(0, e.fill, r), e.border && function(t, e, r) {
|
|
1443
1125
|
if (!e) return;
|
|
1444
|
-
const o =
|
|
1126
|
+
const o = C.JSONStableStringify(e), n = r.borderMap;
|
|
1445
1127
|
if (!n.has(o)) {
|
|
1446
1128
|
const t = n.size;
|
|
1447
1129
|
n.set(o, "" + t), r.borders.push(e);
|
|
1448
1130
|
}
|
|
1449
1131
|
}(0, e.border, r), void 0 !== e.numberFormat && function(t, e, r) {
|
|
1450
1132
|
if (!e) return;
|
|
1451
|
-
const o =
|
|
1133
|
+
const o = B.toBuiltInID(e), n = r.numFmtMap;
|
|
1452
1134
|
if (!n.has(o)) {
|
|
1453
1135
|
let t = 0;
|
|
1454
|
-
"number" == typeof o ? t = o : (t = r.numFmtsCustom.length +
|
|
1136
|
+
"number" == typeof o ? t = o : (t = r.numFmtsCustom.length + pe, r.numFmtsCustom.push(o)), n.set(e, "" + t);
|
|
1455
1137
|
}
|
|
1456
1138
|
}(0, e.numberFormat, r);
|
|
1457
1139
|
}
|
|
1458
1140
|
}
|
|
1459
|
-
function
|
|
1141
|
+
function ne(t, e, r) {
|
|
1460
1142
|
if (!e) return;
|
|
1461
1143
|
const o = e.name.toLowerCase();
|
|
1462
|
-
r.namedStyleMap.has(o) || (r.namedStyleMap.set(o, "" + r.namedStyleMap.size), r.namedStyles.push(e),
|
|
1144
|
+
r.namedStyleMap.has(o) || (r.namedStyleMap.set(o, "" + r.namedStyleMap.size), r.namedStyles.push(e), oe(t, e.style, r));
|
|
1463
1145
|
}
|
|
1464
|
-
function
|
|
1146
|
+
function se(t, e, r, o, n = !1) {
|
|
1465
1147
|
const s = o.getDefaultFontSize(), a = o.getTheme().getFontScheme().getMinorFont() ?? "Calibri", l = o.getNormal().getFont().getColor();
|
|
1466
1148
|
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
1149
|
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) }),
|
|
1150
|
+
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
1151
|
const c = !n || r.family && r.family !== a;
|
|
1470
1152
|
if (c && (e.empty("name", { val: r.family ?? a }), r.fallbacks && r.fallbacks.length > 0)) {
|
|
1471
1153
|
const t = r.fallbacks;
|
|
@@ -1475,45 +1157,59 @@ function Fe(t, e, r, o, n = !1) {
|
|
|
1475
1157
|
const d = r.scheme ?? (void 0 === r.family ? "minor" : void 0);
|
|
1476
1158
|
c && void 0 !== d && "none" !== d && e.empty("scheme", { val: d }), e.end("font");
|
|
1477
1159
|
}
|
|
1478
|
-
function
|
|
1160
|
+
function ae(t, e, r, o, n, s = !1) {
|
|
1479
1161
|
if (!n || "none" === n.style || !n.style) return void (s && !n || e.empty(o));
|
|
1480
1162
|
e.start(o, { style: n.style });
|
|
1481
1163
|
let a = n.color;
|
|
1482
|
-
a &&
|
|
1164
|
+
a && Pt(e, r, a, "color", !s, s), e.end(o);
|
|
1483
1165
|
}
|
|
1484
|
-
function
|
|
1166
|
+
function le(t, e, r, o, n = !1) {
|
|
1485
1167
|
const s = {};
|
|
1486
|
-
n ? (s.diagonalUp = "0", s.diagonalDown = "0") : (r.diagonalUp && (s.diagonalUp = "1"), r.diagonalDown && (s.diagonalDown = "1")), e.start("border", s),
|
|
1168
|
+
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
1169
|
}
|
|
1488
|
-
function
|
|
1170
|
+
function ie(t, e, r, o = !1) {
|
|
1489
1171
|
const n = {};
|
|
1490
|
-
r.horizontal && r.horizontal !==
|
|
1172
|
+
r.horizontal && r.horizontal !== N.HorizontalAlignment.General && (n.horizontal = r.horizontal), r.vertical && r.vertical !== N.VerticalAlignment.Bottom && (n.vertical = r.vertical);
|
|
1491
1173
|
let s = r.rotation;
|
|
1492
1174
|
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
1175
|
const a = r.overflow;
|
|
1494
|
-
switch (a ===
|
|
1495
|
-
case
|
|
1496
|
-
case
|
|
1176
|
+
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) {
|
|
1177
|
+
case N.ReadingDirection.Auto: break;
|
|
1178
|
+
case N.ReadingDirection.LeftToRight:
|
|
1497
1179
|
n.readingOrder = "1";
|
|
1498
1180
|
break;
|
|
1499
|
-
case
|
|
1181
|
+
case N.ReadingDirection.RightToLeft: n.readingOrder = "2";
|
|
1500
1182
|
}
|
|
1501
1183
|
return Object.keys(n).length > 0 ? n : null;
|
|
1502
1184
|
}
|
|
1503
|
-
function
|
|
1185
|
+
function ce(t, e, r, o, n, s) {
|
|
1504
1186
|
const a = {};
|
|
1505
1187
|
let l = null, i = o.named;
|
|
1506
1188
|
i && (l = r.getNamed(i).toJSON().style);
|
|
1507
|
-
const c = o.font ?? l?.font, d = c ? n.fontMap.get(
|
|
1189
|
+
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
1190
|
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 ??
|
|
1191
|
+
const t = o.named ?? E.BuiltInName.Normal;
|
|
1510
1192
|
a.xfId = n.namedStyleMap.get(t.toLowerCase());
|
|
1511
1193
|
}
|
|
1512
1194
|
let g = null;
|
|
1513
1195
|
const y = o.alignment ?? l?.alignment;
|
|
1514
|
-
y && (g =
|
|
1196
|
+
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
1197
|
}
|
|
1516
|
-
|
|
1198
|
+
function de(t, e, r, o, n, s = "dxf", a = pe) {
|
|
1199
|
+
if (e.start(s), r.font && se(0, e, r.font, o, !0), void 0 !== r.numberFormat && null !== r.numberFormat) {
|
|
1200
|
+
const t = B.toBuiltInID(r.numberFormat), o = "number" == typeof t, n = o ? B.builtInFormat(t) : String(t);
|
|
1201
|
+
n && e.empty("numFmt", {
|
|
1202
|
+
numFmtId: String(o ? t : a++),
|
|
1203
|
+
formatCode: n
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
if (r.fill && Wt(0, e, r.fill, o, !0, !0), r.alignment) {
|
|
1207
|
+
const t = ie(0, 0, r.alignment, !0);
|
|
1208
|
+
t && e.empty("alignment", t);
|
|
1209
|
+
}
|
|
1210
|
+
return r.border && le(0, e, r.border, n, !0), e.end(s), a;
|
|
1211
|
+
}
|
|
1212
|
+
var pe = 164, me = Object.freeze([
|
|
1517
1213
|
"wholeTable",
|
|
1518
1214
|
"headerRow",
|
|
1519
1215
|
"totalRow",
|
|
@@ -1527,7 +1223,321 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1527
1223
|
"lastHeaderCell",
|
|
1528
1224
|
"firstTotalCell",
|
|
1529
1225
|
"lastTotalCell"
|
|
1530
|
-
]),
|
|
1226
|
+
]), fe = F.BuiltInOperatorNames, ue = (t, e, r, o, n, s) => {
|
|
1227
|
+
const a = o.sorts, l = a ? a.length : 0;
|
|
1228
|
+
if (0 === l) return;
|
|
1229
|
+
const i = {};
|
|
1230
|
+
if (l > 0) {
|
|
1231
|
+
const t = a[0].criteria?.collatorOptions;
|
|
1232
|
+
t && (i.caseSensitive = "object" != typeof t || Array.isArray(t) || "case" !== t.sensitivity && "variant" !== t.sensitivity ? "0" : "1");
|
|
1233
|
+
}
|
|
1234
|
+
i.ref = r.getRange().toString(), i["xmlns:xlrd2"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2", e.start("sortState", i);
|
|
1235
|
+
for (let t = 0; t < l; t++) {
|
|
1236
|
+
const r = a[t], o = r.criteria ?? {}, l = r.index + s.colStart, i = {};
|
|
1237
|
+
o.reverse && (i.descending = "1"), i.ref = n.getIntersect({
|
|
1238
|
+
colStart: l,
|
|
1239
|
+
rowStart: s.rowStart,
|
|
1240
|
+
colEnd: l,
|
|
1241
|
+
rowEnd: s.rowEnd
|
|
1242
|
+
}).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);
|
|
1243
|
+
}
|
|
1244
|
+
e.end("sortState");
|
|
1245
|
+
}, he = (t, e, r, o, n = !1) => {
|
|
1246
|
+
let s = r.getRange();
|
|
1247
|
+
r.isShowTotals() && (s = s.getResizeBy(-1, 0));
|
|
1248
|
+
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 = {};
|
|
1249
|
+
m.ref = s.toString();
|
|
1250
|
+
let f, u = [];
|
|
1251
|
+
for (let t = 0; t < d; t++) {
|
|
1252
|
+
const e = c[t];
|
|
1253
|
+
u[e.index] = { ...e };
|
|
1254
|
+
}
|
|
1255
|
+
if (Array.isArray(p) && p.length > 0) {
|
|
1256
|
+
const t = p.length;
|
|
1257
|
+
f = new Array(p[t - 1]);
|
|
1258
|
+
for (let e = 0; e < t; e++) f[p[e]] = !0;
|
|
1259
|
+
}
|
|
1260
|
+
if (u || p || f || n) {
|
|
1261
|
+
let i = 0;
|
|
1262
|
+
o.columns ? i = o.columns.length : n && (i = s.getColumnCount()), e.start("autoFilter", m);
|
|
1263
|
+
for (let r = 0; r < i; r++) {
|
|
1264
|
+
const o = !0 === p || !0 === f?.[r], n = u[r];
|
|
1265
|
+
(n || o) && ye(t, e, r, n, o);
|
|
1266
|
+
}
|
|
1267
|
+
l && n && ue(0, e, r, l, s, a), e.end("autoFilter");
|
|
1268
|
+
} else e.empty("autoFilter", m);
|
|
1269
|
+
l && !n && ue(0, e, r, l, s, a);
|
|
1270
|
+
}, ge = (t, e, r) => {
|
|
1271
|
+
const o = u(r, (e) => t.warn(e, r));
|
|
1272
|
+
if (!o) return;
|
|
1273
|
+
const n = { operator: o.operator };
|
|
1274
|
+
void 0 !== o.val && (n.val = o.val), e.empty("customFilter", n);
|
|
1275
|
+
}, ye = (t, e, r, o, n) => {
|
|
1276
|
+
const s = {};
|
|
1277
|
+
s.colId = "" + r, n && (s.hiddenButton = "1"), o ? (e.start("filterColumn", s), ((t, e, r) => {
|
|
1278
|
+
const o = r.operator;
|
|
1279
|
+
if (o !== F.BuiltInOperatorNames.Expression) if (o !== F.BuiltInOperatorNames.Unique) {
|
|
1280
|
+
if (o === F.BuiltInOperatorNames.Color) {
|
|
1281
|
+
const t = r.param, o = {};
|
|
1282
|
+
void 0 !== t.cellColor && (o.cellColor = t.cellColor ? "1" : "0"), void 0 !== t.styleId && (o.dxfId = t.styleId), e.empty("colorFilter", o);
|
|
1283
|
+
}
|
|
1284
|
+
if (xe(o)) if ("between" === o) {
|
|
1285
|
+
const o = r.param;
|
|
1286
|
+
e.start("customFilters", { and: "1" }), ge(t, e, {
|
|
1287
|
+
operator: fe.GreaterThanEqualTo,
|
|
1288
|
+
param: o.from
|
|
1289
|
+
}), ge(t, e, {
|
|
1290
|
+
operator: fe.LessThanEqualTo,
|
|
1291
|
+
param: o.to
|
|
1292
|
+
}), e.end("customFilters");
|
|
1293
|
+
} else if (o === F.BuiltInOperatorNames.Not) {
|
|
1294
|
+
const o = r.param;
|
|
1295
|
+
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);
|
|
1296
|
+
} else if (o === F.BuiltInOperatorNames.And || o === F.BuiltInOperatorNames.Or) {
|
|
1297
|
+
const n = r.param, s = n.length;
|
|
1298
|
+
if (s > 0) {
|
|
1299
|
+
const r = {};
|
|
1300
|
+
o === F.BuiltInOperatorNames.And && s > 1 && (r.and = "1"), e.start("customFilters", r);
|
|
1301
|
+
for (let r = 0; r < s; r++) {
|
|
1302
|
+
const o = n[r], s = o.operator === fe.Not && c(o.param?.operator);
|
|
1303
|
+
c(o.operator) || s ? ge(t, e, o) : t.warn("Only Comparison criteria supported in Union conditions for Table AutoFilters", o);
|
|
1304
|
+
}
|
|
1305
|
+
e.end("customFilters");
|
|
1306
|
+
}
|
|
1307
|
+
} else c(o) && (e.start("customFilters"), ge(t, e, r), e.end("customFilters"));
|
|
1308
|
+
if (o === F.BuiltInOperatorNames.TimePeriod) {
|
|
1309
|
+
const t = r.param, o = {};
|
|
1310
|
+
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);
|
|
1311
|
+
}
|
|
1312
|
+
if (o === F.BuiltInOperatorNames.Average) {
|
|
1313
|
+
const t = r.param, o = {};
|
|
1314
|
+
let n = t.type;
|
|
1315
|
+
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);
|
|
1316
|
+
}
|
|
1317
|
+
if (o === F.BuiltInOperatorNames.InSet) {
|
|
1318
|
+
const t = r.param;
|
|
1319
|
+
if (t.dateGroups) {
|
|
1320
|
+
const r = t.dateGroups, o = r.length;
|
|
1321
|
+
e.start("dateGroupItem");
|
|
1322
|
+
for (let t = 0; t < o; t++) {
|
|
1323
|
+
const o = r[t], n = {};
|
|
1324
|
+
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);
|
|
1325
|
+
}
|
|
1326
|
+
e.end("dateGroupItem");
|
|
1327
|
+
}
|
|
1328
|
+
if (t.items) {
|
|
1329
|
+
const r = t.items, o = r.length;
|
|
1330
|
+
e.start("filters");
|
|
1331
|
+
for (let t = 0; t < o; t++) {
|
|
1332
|
+
const o = r[t];
|
|
1333
|
+
e.empty("filter", { val: "" + o });
|
|
1334
|
+
}
|
|
1335
|
+
e.end("filters");
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
if (o === F.BuiltInOperatorNames.Icon) {
|
|
1339
|
+
const t = r.param, o = {};
|
|
1340
|
+
void 0 !== t.iconSet && (o.iconSet = t.iconSet), void 0 !== t.iconId && (o.iconId = "" + t.iconId), e.empty("iconFilter", o);
|
|
1341
|
+
}
|
|
1342
|
+
if (o === F.BuiltInOperatorNames.TopN) {
|
|
1343
|
+
const t = r.param, o = {};
|
|
1344
|
+
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);
|
|
1345
|
+
}
|
|
1346
|
+
} else t.warn("Unique conditions not supported in Table AutoFilters", r);
|
|
1347
|
+
else t.warn("Expression conditions not supported in Table AutoFilters", r);
|
|
1348
|
+
})(t, e, o), e.end("filterColumn")) : e.empty("filterColumn", s);
|
|
1349
|
+
}, 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;
|
|
1350
|
+
var be = {
|
|
1351
|
+
names: /* @__PURE__ */ new Set(),
|
|
1352
|
+
perFormula: [],
|
|
1353
|
+
affects: () => !1
|
|
1354
|
+
};
|
|
1355
|
+
var Ce = 1048576, Te = (t, e, r) => {
|
|
1356
|
+
if (!r) return [];
|
|
1357
|
+
let o = 0;
|
|
1358
|
+
for (let n = 0; n < r.length; n++) {
|
|
1359
|
+
const s = r[n][0], a = e.getRange(s).getCoords();
|
|
1360
|
+
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);
|
|
1361
|
+
}
|
|
1362
|
+
return r;
|
|
1363
|
+
};
|
|
1364
|
+
function ke(t, e) {
|
|
1365
|
+
let r = e.type;
|
|
1366
|
+
r === A.ColorStopType.AutoMin ? r = A.ColorStopType.Min : r === A.ColorStopType.AutoMax && (r = A.ColorStopType.Max), t.empty("cfvo", {
|
|
1367
|
+
type: r,
|
|
1368
|
+
val: e.value,
|
|
1369
|
+
gte: e.exclusive ? "0" : void 0
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
function Me(t, e) {
|
|
1373
|
+
const r = {
|
|
1374
|
+
type: e.type,
|
|
1375
|
+
gte: e.exclusive ? "0" : void 0
|
|
1376
|
+
};
|
|
1377
|
+
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);
|
|
1378
|
+
}
|
|
1379
|
+
var Re = /* @__PURE__ */ new Set([
|
|
1380
|
+
E.IconSet.Arrows3,
|
|
1381
|
+
E.IconSet.ArrowsGray3,
|
|
1382
|
+
E.IconSet.Flags3,
|
|
1383
|
+
E.IconSet.Signs3,
|
|
1384
|
+
E.IconSet.Symbols3,
|
|
1385
|
+
E.IconSet.Symbols3_2,
|
|
1386
|
+
E.IconSet.TrafficLights3,
|
|
1387
|
+
E.IconSet.TrafficLights3_2,
|
|
1388
|
+
E.IconSet.Arrows4,
|
|
1389
|
+
E.IconSet.ArrowsGray4,
|
|
1390
|
+
E.IconSet.Rating4,
|
|
1391
|
+
E.IconSet.RedToBlack4,
|
|
1392
|
+
E.IconSet.TrafficLights4,
|
|
1393
|
+
E.IconSet.Arrows5,
|
|
1394
|
+
E.IconSet.ArrowsGray5,
|
|
1395
|
+
E.IconSet.Quarters5,
|
|
1396
|
+
E.IconSet.Rating5
|
|
1397
|
+
]);
|
|
1398
|
+
function Ie(t) {
|
|
1399
|
+
return (t.icon?.length ?? 0) > 0 || void 0 !== t.iconSet && !Re.has(t.iconSet);
|
|
1400
|
+
}
|
|
1401
|
+
function Fe(t, e, r, o, s, a, l, i, c) {
|
|
1402
|
+
const d = o.scale;
|
|
1403
|
+
o.ext && t.warn("Conditional format extension payload is not written to xlsx; it will be lost.");
|
|
1404
|
+
const p = {
|
|
1405
|
+
type: s.type,
|
|
1406
|
+
dxfId: o.style && Object.keys(o.style).length > 0 ? i.add(o.style) : void 0,
|
|
1407
|
+
priority: l,
|
|
1408
|
+
stopIfTrue: Le(o.stopIfTrue),
|
|
1409
|
+
aboveAverage: Le(s.aboveAverage),
|
|
1410
|
+
equalAverage: Le(s.equalAverage),
|
|
1411
|
+
stdDev: s.stdDev,
|
|
1412
|
+
bottom: Le(s.bottom),
|
|
1413
|
+
percent: Le(s.percent),
|
|
1414
|
+
rank: s.rank,
|
|
1415
|
+
operator: s.operator,
|
|
1416
|
+
text: s.text,
|
|
1417
|
+
timePeriod: s.timePeriod
|
|
1418
|
+
};
|
|
1419
|
+
let m;
|
|
1420
|
+
d?.type === A.ScaleType.DataBar && function(t) {
|
|
1421
|
+
if (t.gradient || t.borderColor || t.negativeFillColor || t.negativeBorderColor || t.axisColor || t.axisPosition || t.direction) return !0;
|
|
1422
|
+
const e = t.stops, r = e ? e.length : 0;
|
|
1423
|
+
for (let t = 0; t < r; t++) {
|
|
1424
|
+
const r = e[t].type;
|
|
1425
|
+
if (r === A.ColorStopType.AutoMin || r === A.ColorStopType.AutoMax) return !0;
|
|
1426
|
+
}
|
|
1427
|
+
return !1;
|
|
1428
|
+
}(d) && (m = w(k.uuidV4), c.push({
|
|
1429
|
+
guid: m,
|
|
1430
|
+
sqref: a,
|
|
1431
|
+
priority: l,
|
|
1432
|
+
scale: d
|
|
1433
|
+
}));
|
|
1434
|
+
const f = s.formulas, u = f ? f.length : 0;
|
|
1435
|
+
if (0 !== u || d) {
|
|
1436
|
+
e.start("cfRule", p);
|
|
1437
|
+
for (let t = 0; t < u; t++) e.start("formula"), e.text(f[t]), e.end("formula");
|
|
1438
|
+
if (d?.type === A.ScaleType.ColorScale) {
|
|
1439
|
+
const t = d.stops ?? [];
|
|
1440
|
+
e.start("colorScale");
|
|
1441
|
+
for (let r = 0; r < t.length; r++) ke(e, t[r]);
|
|
1442
|
+
for (let o = 0; o < t.length; o++) Pt(e, r, t[o].color, "color");
|
|
1443
|
+
e.end("colorScale");
|
|
1444
|
+
} else if (d?.type === A.ScaleType.DataBar) {
|
|
1445
|
+
const t = d.stops ?? [];
|
|
1446
|
+
e.start("dataBar", {
|
|
1447
|
+
minLength: d.minLength,
|
|
1448
|
+
maxLength: d.maxLength,
|
|
1449
|
+
showValue: Le(d.showValue)
|
|
1450
|
+
});
|
|
1451
|
+
for (let r = 0; r < t.length; r++) ke(e, t[r]);
|
|
1452
|
+
d.color && Pt(e, r, d.color, "color"), e.end("dataBar");
|
|
1453
|
+
} else if (d?.type === A.ScaleType.IconSet) {
|
|
1454
|
+
const t = d.stops ?? [];
|
|
1455
|
+
e.start("iconSet", {
|
|
1456
|
+
iconSet: d.iconSet,
|
|
1457
|
+
reverse: Le(d.reverse),
|
|
1458
|
+
showValue: Le(d.showValue)
|
|
1459
|
+
});
|
|
1460
|
+
for (let r = 0; r < t.length; r++) ke(e, t[r]);
|
|
1461
|
+
e.end("iconSet");
|
|
1462
|
+
}
|
|
1463
|
+
m && (e.start("extLst"), e.start("ext", {
|
|
1464
|
+
uri: h,
|
|
1465
|
+
"xmlns:x14": n
|
|
1466
|
+
}), e.start("x14:id"), e.text(m), e.end("x14:id"), e.end("ext"), e.end("extLst")), e.end("cfRule");
|
|
1467
|
+
} else e.empty("cfRule", p);
|
|
1468
|
+
}
|
|
1469
|
+
function Ae(t) {
|
|
1470
|
+
return t.split(" ")[0].split(":")[0];
|
|
1471
|
+
}
|
|
1472
|
+
function Pe(t) {
|
|
1473
|
+
if ("string" == typeof t) return t.split(",").join(" ");
|
|
1474
|
+
if (Array.isArray(t)) {
|
|
1475
|
+
const e = [];
|
|
1476
|
+
for (let r = 0; r < t.length; r++) {
|
|
1477
|
+
const o = b.rangeToString(t[r]);
|
|
1478
|
+
o && e.push(o);
|
|
1479
|
+
}
|
|
1480
|
+
return e.length > 0 ? e.join(" ") : null;
|
|
1481
|
+
}
|
|
1482
|
+
return b.rangeToString(t);
|
|
1483
|
+
}
|
|
1484
|
+
function Le(t) {
|
|
1485
|
+
if (void 0 !== t) return t ? "1" : "0";
|
|
1486
|
+
}
|
|
1487
|
+
function _e(t) {
|
|
1488
|
+
if ("string" != typeof t) return !1;
|
|
1489
|
+
let e = !1;
|
|
1490
|
+
for (let r = 0; r < t.length; r++) {
|
|
1491
|
+
const o = t[r];
|
|
1492
|
+
if ("\"" === o) e = !e;
|
|
1493
|
+
else if ("!" === o && !e) return !0;
|
|
1494
|
+
}
|
|
1495
|
+
return !1;
|
|
1496
|
+
}
|
|
1497
|
+
function De(t) {
|
|
1498
|
+
const e = t.formulas, r = e ? e.length : 0;
|
|
1499
|
+
for (let t = 0; t < r; t++) if (_e(e[t])) return !0;
|
|
1500
|
+
return !1;
|
|
1501
|
+
}
|
|
1502
|
+
var Ee = {
|
|
1503
|
+
r: void 0,
|
|
1504
|
+
s: void 0,
|
|
1505
|
+
t: void 0,
|
|
1506
|
+
cm: void 0,
|
|
1507
|
+
vm: void 0
|
|
1508
|
+
}, Ne = {
|
|
1509
|
+
r: void 0,
|
|
1510
|
+
s: void 0,
|
|
1511
|
+
customFormat: void 0,
|
|
1512
|
+
hidden: void 0,
|
|
1513
|
+
ht: void 0,
|
|
1514
|
+
customHeight: void 0,
|
|
1515
|
+
"x14ac:dyDescent": "0.25",
|
|
1516
|
+
outlineLevel: void 0,
|
|
1517
|
+
collapsed: void 0
|
|
1518
|
+
}, Oe = {
|
|
1519
|
+
t: void 0,
|
|
1520
|
+
aca: void 0,
|
|
1521
|
+
ref: void 0,
|
|
1522
|
+
ca: void 0,
|
|
1523
|
+
si: void 0
|
|
1524
|
+
}, Be = {
|
|
1525
|
+
t: "shared",
|
|
1526
|
+
aca: void 0,
|
|
1527
|
+
ref: void 0,
|
|
1528
|
+
ca: void 0,
|
|
1529
|
+
si: void 0
|
|
1530
|
+
}, Ve = {
|
|
1531
|
+
t: "array",
|
|
1532
|
+
aca: void 0,
|
|
1533
|
+
ref: void 0,
|
|
1534
|
+
ca: void 0,
|
|
1535
|
+
si: void 0
|
|
1536
|
+
};
|
|
1537
|
+
function $e(t, e, r, o) {
|
|
1538
|
+
r && (e.start(o), e.empty("latin", { typeface: r }), e.empty("ea", { typeface: "" }), e.empty("cs", { typeface: "" }), e.end(o));
|
|
1539
|
+
}
|
|
1540
|
+
var We = (t) => t.toISOString().split(".")[0] + "Z", ze = (t, e, r) => {
|
|
1531
1541
|
switch (e) {
|
|
1532
1542
|
case "creator":
|
|
1533
1543
|
t.start("dc:creator"), t.text(r), t.end("dc:creator");
|
|
@@ -1540,10 +1550,10 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1540
1550
|
break;
|
|
1541
1551
|
case "modified": t.start("dcterms:modified", { "xsi:type": "dcterms:W3CDTF" }), t.text(r), t.end("dcterms:modified");
|
|
1542
1552
|
}
|
|
1543
|
-
},
|
|
1553
|
+
}, je = (t, e, r, o) => {
|
|
1544
1554
|
e.start(r), e.text(o), e.end(r);
|
|
1545
|
-
},
|
|
1546
|
-
const o = r.getSheets().getItems({ visibility:
|
|
1555
|
+
}, Xe = (t, e, r) => {
|
|
1556
|
+
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
1557
|
e.start("HeadingPairs"), e.start("vt:vector", {
|
|
1548
1558
|
size: n.length > 0 ? "4" : "2",
|
|
1549
1559
|
baseType: "variant"
|
|
@@ -1554,7 +1564,7 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1554
1564
|
for (const t of o) e.start("vt:lpstr"), e.text(t), e.end("vt:lpstr");
|
|
1555
1565
|
for (const t of n) e.start("vt:lpstr"), e.text(t), e.end("vt:lpstr");
|
|
1556
1566
|
e.end("vt:vector"), e.end("TitlesOfParts");
|
|
1557
|
-
},
|
|
1567
|
+
}, Ue = {
|
|
1558
1568
|
minSupportedVersion: "120000",
|
|
1559
1569
|
copy: "1",
|
|
1560
1570
|
pasteAll: "1",
|
|
@@ -1566,18 +1576,18 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1566
1576
|
clearComments: "1",
|
|
1567
1577
|
assign: "1",
|
|
1568
1578
|
coerce: "1"
|
|
1569
|
-
},
|
|
1579
|
+
}, He = (t, e, r = k.EmptyArray) => {
|
|
1570
1580
|
if (!e) return { ...r };
|
|
1571
1581
|
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
1582
|
...r,
|
|
1573
1583
|
...u
|
|
1574
1584
|
};
|
|
1575
|
-
return void 0 !== a && (h.sz = "" +
|
|
1576
|
-
},
|
|
1585
|
+
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;
|
|
1586
|
+
}, qe = (t, e, r) => {
|
|
1577
1587
|
if (!r) return;
|
|
1578
1588
|
const o = t.getXMLWriter();
|
|
1579
1589
|
o.start("txBody"), o.pushDefaultNamespace("a");
|
|
1580
|
-
|
|
1590
|
+
Je(t, e, {
|
|
1581
1591
|
vertOverflow: "clip",
|
|
1582
1592
|
horzOverflow: "clip",
|
|
1583
1593
|
rtlCol: "0",
|
|
@@ -1587,28 +1597,28 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1587
1597
|
const o = t.getXMLWriter();
|
|
1588
1598
|
o.pushDefaultNamespace("a"), "string" == typeof r && (r = { runs: [{ text: r }] }), o.start("p");
|
|
1589
1599
|
o.empty("pPr", { algn: "ctr" });
|
|
1590
|
-
const s =
|
|
1591
|
-
...
|
|
1600
|
+
const s = He(0, r, {
|
|
1601
|
+
...Ke,
|
|
1592
1602
|
size: e.getDefaultFontSize()
|
|
1593
1603
|
}), a = r?.runs, l = a ? a.length : 0;
|
|
1594
1604
|
if (l > 0) for (let t = 0; t < l; t++) {
|
|
1595
1605
|
const r = a[t];
|
|
1596
1606
|
o.start("r", {});
|
|
1597
|
-
const n =
|
|
1598
|
-
s ? (o.start("rPr", n),
|
|
1607
|
+
const n = He(0, r, Ke), s = r.color;
|
|
1608
|
+
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
1609
|
}
|
|
1600
1610
|
else o.empty("endParaRPr", s);
|
|
1601
1611
|
o.end("p"), o.popDefaultNamespace();
|
|
1602
1612
|
})(t, e, r), o.popDefaultNamespace(), o.end("txBody");
|
|
1603
|
-
},
|
|
1613
|
+
}, Ge = (t, e, r) => {
|
|
1604
1614
|
if (!r) return;
|
|
1605
|
-
const o = t.getXMLWriter(), n =
|
|
1615
|
+
const o = t.getXMLWriter(), n = He(0, r);
|
|
1606
1616
|
o.empty("defRPr", n);
|
|
1607
|
-
},
|
|
1617
|
+
}, Je = (t, e, r) => {
|
|
1608
1618
|
if (!r) return;
|
|
1609
1619
|
const o = t.getXMLWriter(), { spAutoFit: n, ...s } = r;
|
|
1610
1620
|
n ? (o.start("bodyPr", s), o.empty("spAutoFit"), o.end("bodyPr")) : o.empty("bodyPr", s);
|
|
1611
|
-
},
|
|
1621
|
+
}, Ke = Object.freeze({ lang: "en-US" }), Ye = (t, e) => {
|
|
1612
1622
|
if (0 !== e.length) {
|
|
1613
1623
|
t.start("a:extLst");
|
|
1614
1624
|
for (const r of e) {
|
|
@@ -1617,10 +1627,10 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1617
1627
|
}
|
|
1618
1628
|
t.end("a:extLst");
|
|
1619
1629
|
}
|
|
1620
|
-
},
|
|
1630
|
+
}, Ze = async (t, e, r, o, n) => {
|
|
1621
1631
|
const s = t.getSharedStates(), a = o.getContent().getResource(), l = await a.getExternalURI();
|
|
1622
1632
|
let i;
|
|
1623
|
-
if (l) i = t.addExternal(
|
|
1633
|
+
if (l) i = t.addExternal(Gt, l);
|
|
1624
1634
|
else if (i = r.get(a), !i) {
|
|
1625
1635
|
let e = s.get("imagesWritten");
|
|
1626
1636
|
e || (e = /* @__PURE__ */ new Map(), s.set("imagesWritten", e));
|
|
@@ -1629,11 +1639,11 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1629
1639
|
const t = await a.toBuffer();
|
|
1630
1640
|
o = {
|
|
1631
1641
|
bytes: new Uint8Array(t),
|
|
1632
|
-
type: await a.getType() ??
|
|
1642
|
+
type: await a.getType() ?? Jt,
|
|
1633
1643
|
index: e.size + 1
|
|
1634
1644
|
}, e.set(a, o);
|
|
1635
1645
|
}
|
|
1636
|
-
i = t.addBinary(o.bytes, o.type.mime,
|
|
1646
|
+
i = t.addBinary(o.bytes, o.type.mime, Gt, `../media/image${o.index}.${o.type.ext}`, !0), r.set(a, i);
|
|
1637
1647
|
}
|
|
1638
1648
|
const c = { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships" };
|
|
1639
1649
|
l ? c["r:link"] = i.relId : c["r:embed"] = i.relId;
|
|
@@ -1647,31 +1657,31 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1647
1657
|
}
|
|
1648
1658
|
]);
|
|
1649
1659
|
const p = t.getXMLWriter();
|
|
1650
|
-
p.start("pic"), p.start("nvPicPr"),
|
|
1651
|
-
},
|
|
1660
|
+
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");
|
|
1661
|
+
}, Qe = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", tr = async (t, e, r, o, n, s) => {
|
|
1652
1662
|
const a = n.content?.json, l = a?.xml, i = a?.chartRelId, c = a?.chartTargetPath;
|
|
1653
|
-
if (!l || !i || !c) return
|
|
1663
|
+
if (!l || !i || !c) return sr(t, e, r, o, n);
|
|
1654
1664
|
const d = t.getSharedStates();
|
|
1655
1665
|
let p, m = d.get("claimedChartTargets");
|
|
1656
1666
|
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",
|
|
1658
|
-
if (!s?.relId) return
|
|
1667
|
+
const s = t.forkPreservedPart(c, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", Qe, "../charts/chart{n}.xml");
|
|
1668
|
+
if (!s?.relId) return sr(t, e, r, o, n);
|
|
1659
1669
|
p = s.relId;
|
|
1660
|
-
} else m.add(c), p = t.addPreservedRelationship(
|
|
1670
|
+
} else m.add(c), p = t.addPreservedRelationship(Qe, c, i);
|
|
1661
1671
|
let f = p === i ? l : l.replace(`r:id="${i}"`, `r:id="${p}"`);
|
|
1662
1672
|
void 0 !== s && "number" == typeof a?.sourceId && (f = f.replace(`cNvPr id="${a.sourceId}"`, `cNvPr id="${s}"`)), t.getXMLWriter().raw(f);
|
|
1663
|
-
},
|
|
1673
|
+
}, 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
1674
|
const a = n.content?.json, l = a?.xml;
|
|
1665
|
-
if (!l) return
|
|
1675
|
+
if (!l) return sr(t, e, r, o, n);
|
|
1666
1676
|
const i = void 0 !== s && "number" == typeof a?.sourceId ? l.replace(`cNvPr id="${a.sourceId}"`, `cNvPr id="${s}"`) : l;
|
|
1667
1677
|
t.getXMLWriter().raw(i);
|
|
1668
|
-
},
|
|
1678
|
+
}, sr = async (t, e, r, o, n) => {
|
|
1669
1679
|
(async (t, e, r, o, n) => {
|
|
1670
1680
|
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"),
|
|
1681
|
+
"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
1682
|
id: "0",
|
|
1673
1683
|
idx: "0"
|
|
1674
|
-
}), s.end("cNvCxnSpPr"), s.end("nvCxnSpPr"),
|
|
1684
|
+
}), 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
1685
|
})(t, e, r, o, {
|
|
1676
1686
|
...n,
|
|
1677
1687
|
content: {
|
|
@@ -1689,13 +1699,13 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1689
1699
|
}
|
|
1690
1700
|
}
|
|
1691
1701
|
});
|
|
1692
|
-
},
|
|
1702
|
+
}, ar = (t, e, r, o, n) => {
|
|
1693
1703
|
const s = t.getXMLWriter(), a = n.content?.json, l = a?.geometry ?? "rect", i = e.getStyles();
|
|
1694
|
-
s.start("spPr"), s.pushDefaultNamespace("a"),
|
|
1695
|
-
},
|
|
1704
|
+
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");
|
|
1705
|
+
}, lr = (t, e, r, o, n) => {
|
|
1696
1706
|
const s = t.getXMLWriter();
|
|
1697
1707
|
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
|
-
},
|
|
1708
|
+
}, ir = (t, e, r, o, n) => {
|
|
1699
1709
|
const s = t.getSharedStates();
|
|
1700
1710
|
let a = s.get("uniqueIdCounter");
|
|
1701
1711
|
a || (a = /* @__PURE__ */ new Map(), s.set("uniqueIdCounter", a));
|
|
@@ -1712,27 +1722,27 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1712
1722
|
"a16:creationId",
|
|
1713
1723
|
{
|
|
1714
1724
|
"xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main",
|
|
1715
|
-
id: `{${
|
|
1725
|
+
id: `{${k.uuidV4().toUpperCase()}}`
|
|
1716
1726
|
}
|
|
1717
|
-
]), e.start("cNvPr", i),
|
|
1718
|
-
},
|
|
1727
|
+
]), e.start("cNvPr", i), Ye(e, c), e.end("cNvPr");
|
|
1728
|
+
}, cr = (t, e, r, o, n) => {
|
|
1719
1729
|
e.empty("cNvSpPr");
|
|
1720
|
-
},
|
|
1730
|
+
}, dr = (t, e, r, o) => {
|
|
1721
1731
|
const n = {};
|
|
1722
1732
|
if (o.lockAspect && (n.noChangeAspect = "1"), o.locks) for (const t of Object.keys(o.locks)) !0 === o.locks[t] && (n[t] = "1");
|
|
1723
1733
|
e.start("cNvPicPr", {}), e.empty("a:picLocks", n), e.end("cNvPicPr");
|
|
1724
|
-
},
|
|
1734
|
+
}, pr = (t, e, r) => {
|
|
1725
1735
|
const o = e.getBounds(), n = {}, s = r.rotation;
|
|
1726
|
-
void 0 !== s && 0 !== s && (n.rot = "" +
|
|
1727
|
-
x:
|
|
1728
|
-
y:
|
|
1736
|
+
void 0 !== s && 0 !== s && (n.rot = "" + Zt(s)), t.start("xfrm", n), t.start("off", {
|
|
1737
|
+
x: Yt(o.x),
|
|
1738
|
+
y: Yt(o.y)
|
|
1729
1739
|
}), t.end("off"), t.start("ext", {
|
|
1730
|
-
cx:
|
|
1731
|
-
cy:
|
|
1740
|
+
cx: Yt(o.width),
|
|
1741
|
+
cy: Yt(o.height)
|
|
1732
1742
|
}), t.end("ext"), t.end("xfrm");
|
|
1733
|
-
},
|
|
1734
|
-
t.start(e), t.start("col"), t.text(r.c ?? 0), t.end("col"), t.start("colOff"), t.text(
|
|
1735
|
-
},
|
|
1743
|
+
}, mr = (t, e, r) => {
|
|
1744
|
+
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);
|
|
1745
|
+
}, fr = 0, ur = (t, e, r, o) => {
|
|
1736
1746
|
const n = o.columns, s = n ? n.length : 0;
|
|
1737
1747
|
if (0 !== s) {
|
|
1738
1748
|
e.start("tableColumns", { count: s });
|
|
@@ -1742,11 +1752,11 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1742
1752
|
const o = {};
|
|
1743
1753
|
o.id = t + 1, o.name = r.name ?? `Column${t + 1}`;
|
|
1744
1754
|
let s = null, a = r.totalsRowFormula;
|
|
1745
|
-
a && ("number" == typeof a && (a =
|
|
1755
|
+
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
1756
|
}
|
|
1747
1757
|
e.end("tableColumns");
|
|
1748
1758
|
}
|
|
1749
|
-
},
|
|
1759
|
+
}, hr = (t, e, r, o) => {
|
|
1750
1760
|
const n = {
|
|
1751
1761
|
name: r.getStyle().getName(),
|
|
1752
1762
|
showFirstColumn: r.isShowHighlightFirstColumn() ? "1" : "0",
|
|
@@ -1755,7 +1765,7 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1755
1765
|
showColumnStripes: r.isShowBandedColumns() ? "1" : "0"
|
|
1756
1766
|
};
|
|
1757
1767
|
e.empty("tableStyleInfo", n);
|
|
1758
|
-
},
|
|
1768
|
+
}, gr = /* @__PURE__ */ new Map([
|
|
1759
1769
|
["average", 101],
|
|
1760
1770
|
["countnums", 102],
|
|
1761
1771
|
["count", 103],
|
|
@@ -1766,22 +1776,22 @@ var Ee = 164, Ne = Object.freeze([
|
|
|
1766
1776
|
["stddevp", 108],
|
|
1767
1777
|
["sum", 109],
|
|
1768
1778
|
["var", 110]
|
|
1769
|
-
]),
|
|
1770
|
-
|
|
1771
|
-
|
|
1779
|
+
]), yr = /* @__PURE__ */ new Map();
|
|
1780
|
+
gr.forEach((t, e) => {
|
|
1781
|
+
yr.set(t, e);
|
|
1772
1782
|
});
|
|
1773
|
-
var
|
|
1783
|
+
var xr = (t, e, r, o) => {
|
|
1774
1784
|
e.start("mc:AlternateContent", { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }), e.start("mc:Choice", {
|
|
1775
1785
|
Requires: "c14",
|
|
1776
1786
|
"xmlns:c14": "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"
|
|
1777
1787
|
}), 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
|
-
},
|
|
1788
|
+
}, vr = (t, e, r, o, n) => {
|
|
1779
1789
|
e.start("chart"), ((t, e, r, o, n) => {
|
|
1780
|
-
e.start("title"), e.empty("overlay", { val: "0" }),
|
|
1790
|
+
e.start("title"), e.empty("overlay", { val: "0" }), Xt(t, r, n, "spPr", !0), e.end("title"), e.empty("autoTitleDeleted", { val: "0" });
|
|
1781
1791
|
})(t, e, r, 0, n), ((t, e, r, o, n) => {
|
|
1782
|
-
e.start("plotArea"), e.empty("layout"),
|
|
1792
|
+
e.start("plotArea"), e.empty("layout"), Xt(t, r, n, "spPr", !0), e.end("plotArea");
|
|
1783
1793
|
})(t, e, r, 0, n), e.empty("plotVisOnly", { val: "1" }), e.empty("dispBlanksAs", { val: "gap" }), e.empty("showDLblsOverMax", { val: "0" }), e.end("chart");
|
|
1784
|
-
},
|
|
1794
|
+
}, Sr = (t, e, r, o) => {
|
|
1785
1795
|
e.start("printSettings"), e.empty("headerFooter"), e.empty("pageMargins", {
|
|
1786
1796
|
b: "0.75",
|
|
1787
1797
|
l: "0.7",
|
|
@@ -1790,16 +1800,16 @@ var fr = (t, e, r, o) => {
|
|
|
1790
1800
|
header: "0.3",
|
|
1791
1801
|
footer: "0.3"
|
|
1792
1802
|
}), e.empty("pageSetup"), e.end("printSettings");
|
|
1793
|
-
},
|
|
1803
|
+
}, wr = (t, e, r, o, n, s = "0") => {
|
|
1794
1804
|
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"),
|
|
1796
|
-
},
|
|
1805
|
+
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);
|
|
1806
|
+
}, br = (t, e, r, o) => {
|
|
1797
1807
|
const n = r.length;
|
|
1798
1808
|
for (let s = 0; s < n; s++) {
|
|
1799
1809
|
const n = r[s];
|
|
1800
|
-
n.empty ? e.empty(n.type, n.mods) : (e.start(n.type, n.mods),
|
|
1810
|
+
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
1811
|
}
|
|
1802
|
-
},
|
|
1812
|
+
}, to = Object.freeze([
|
|
1803
1813
|
{
|
|
1804
1814
|
type: "axisTitle",
|
|
1805
1815
|
fontRef: { color: "tx1 lumMod 65 lumOff 35" },
|
|
@@ -2151,13 +2161,13 @@ var fr = (t, e, r, o) => {
|
|
|
2151
2161
|
fill: { type: "none" },
|
|
2152
2162
|
stroke: {}
|
|
2153
2163
|
}
|
|
2154
|
-
]),
|
|
2164
|
+
]), eo = (t, e, r) => {
|
|
2155
2165
|
const o = r.length;
|
|
2156
2166
|
for (let t = 0; t < o; t++) {
|
|
2157
2167
|
const o = r[t], n = {}, s = o[0], a = o[1];
|
|
2158
2168
|
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
2169
|
}
|
|
2160
|
-
},
|
|
2170
|
+
}, ro = Object.freeze([
|
|
2161
2171
|
[0, 0],
|
|
2162
2172
|
[6e4, 0],
|
|
2163
2173
|
[8e4, 2e4],
|
|
@@ -2167,8 +2177,8 @@ var fr = (t, e, r, o) => {
|
|
|
2167
2177
|
[7e4, 3e4],
|
|
2168
2178
|
[7e4, 0],
|
|
2169
2179
|
[5e4, 5e4]
|
|
2170
|
-
]),
|
|
2171
|
-
new class extends
|
|
2180
|
+
]), oo = [
|
|
2181
|
+
new class extends U {
|
|
2172
2182
|
constructor() {
|
|
2173
2183
|
super({
|
|
2174
2184
|
kind: "workbook",
|
|
@@ -2190,13 +2200,13 @@ var fr = (t, e, r, o) => {
|
|
|
2190
2200
|
"xmlns:xr10": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision10",
|
|
2191
2201
|
"xmlns:xr2": "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"
|
|
2192
2202
|
});
|
|
2193
|
-
const o = /* @__PURE__ */ new Set(),
|
|
2194
|
-
for (let t = 0; t <
|
|
2195
|
-
const
|
|
2203
|
+
const o = /* @__PURE__ */ new Set(), n = t.getCalculation().getNamedFormulas().getItems();
|
|
2204
|
+
for (let t = 0; t < n.length; t++) o.add(n[t].getName().toUpperCase());
|
|
2205
|
+
const s = l(o), a = await t.toJSON({
|
|
2196
2206
|
ignoreData: !0,
|
|
2197
2207
|
ignoreResources: !0,
|
|
2198
2208
|
includeHeaderStyles: !0,
|
|
2199
|
-
formulaTransform:
|
|
2209
|
+
formulaTransform: s,
|
|
2200
2210
|
splitDirectBorders: !0
|
|
2201
2211
|
});
|
|
2202
2212
|
(function(t, e, r) {
|
|
@@ -2207,11 +2217,11 @@ var fr = (t, e, r, o) => {
|
|
|
2207
2217
|
const n = o.protection;
|
|
2208
2218
|
if (!n) return;
|
|
2209
2219
|
const s = {};
|
|
2210
|
-
|
|
2220
|
+
Tt(n.password ?? {}, s, "workbook"), Tt(n.revisionsPassword ?? {}, s, "revisions"), n.structure && (s.lockStructure = "1");
|
|
2211
2221
|
n.windows && (s.lockWindows = "1");
|
|
2212
2222
|
n.revision && (s.lockRevision = "1");
|
|
2213
2223
|
e.empty("workbookProtection", s);
|
|
2214
|
-
}(0, r, 0,
|
|
2224
|
+
}(0, r, 0, a), function(t, e, r) {
|
|
2215
2225
|
e.start("bookViews");
|
|
2216
2226
|
const o = r.getView(), n = {};
|
|
2217
2227
|
o.isShowHorizontalScrollbar() || (n.showHorizontalScroll = "0");
|
|
@@ -2222,18 +2232,18 @@ var fr = (t, e, r, o) => {
|
|
|
2222
2232
|
const a = r.getSelectedSheet().getIndex();
|
|
2223
2233
|
0 !== a && (n.activeTab = "" + a);
|
|
2224
2234
|
e.empty("workbookView", n), e.end("bookViews");
|
|
2225
|
-
}(0, r, t,
|
|
2235
|
+
}(0, r, t, a.view), r.start("sheets");
|
|
2226
2236
|
const i = e.getSharedStates();
|
|
2227
|
-
i.set("formulaTransform",
|
|
2237
|
+
i.set("formulaTransform", s);
|
|
2228
2238
|
const c = t.getStrings().beginPersist();
|
|
2229
2239
|
i.set("persistStrings", c);
|
|
2230
|
-
const d = new
|
|
2240
|
+
const d = new kt();
|
|
2231
2241
|
i.set("metaCollector", d);
|
|
2232
|
-
const p = new
|
|
2242
|
+
const p = new Mt(d, e.warn.bind(e));
|
|
2233
2243
|
i.set("persistRichTypes", p);
|
|
2234
2244
|
try {
|
|
2235
|
-
const o = t.getSheets().getItems({ visibility:
|
|
2236
|
-
for (let t = 0; t <
|
|
2245
|
+
const o = t.getSheets().getItems({ visibility: _.Visibility.VeryHidden }), n = a.sheets, s = t.getSelectedSheet(), l = o.length;
|
|
2246
|
+
for (let t = 0; t < l; t++) {
|
|
2237
2247
|
const a = o[t], l = "" + (a.getIndex() + 1), i = {
|
|
2238
2248
|
name: a.getName(),
|
|
2239
2249
|
sheetId: l
|
|
@@ -2251,11 +2261,11 @@ var fr = (t, e, r, o) => {
|
|
|
2251
2261
|
const d = t.getTheme();
|
|
2252
2262
|
e.addPart("theme", {
|
|
2253
2263
|
model: d,
|
|
2254
|
-
json:
|
|
2264
|
+
json: a.theme
|
|
2255
2265
|
}), await e.waitEmit(), e.addPart("styles", {
|
|
2256
2266
|
styles: t.getStyles(),
|
|
2257
2267
|
theme: t.getTheme(),
|
|
2258
|
-
json:
|
|
2268
|
+
json: a.styles
|
|
2259
2269
|
}), await e.waitEmit();
|
|
2260
2270
|
const p = await c.toJSONAsync();
|
|
2261
2271
|
p && p.length > 0 && (e.addPart("sharedStrings", {
|
|
@@ -2274,7 +2284,7 @@ var fr = (t, e, r, o) => {
|
|
|
2274
2284
|
r.end("sheets"), function(t, e, r, o, n) {
|
|
2275
2285
|
const s = o.names, a = s ? s.length : 0;
|
|
2276
2286
|
if (0 === a) return;
|
|
2277
|
-
const l = r.getCalculation().getNamedFormulas(), i = /* @__PURE__ */ new Map(), c = r.getSheets().getItems({ visibility:
|
|
2287
|
+
const l = r.getCalculation().getNamedFormulas(), i = /* @__PURE__ */ new Map(), c = r.getSheets().getItems({ visibility: _.Visibility.VeryHidden });
|
|
2278
2288
|
for (let t = 0; t < c.length; t++) i.set(c[t].getName().toLowerCase(), t);
|
|
2279
2289
|
e.start("definedNames");
|
|
2280
2290
|
for (let r = 0; r < a; r++) {
|
|
@@ -2292,10 +2302,25 @@ var fr = (t, e, r, o) => {
|
|
|
2292
2302
|
d && (c = d.getExpression({ formulaTransform: n })), e.start("definedName", a), e.text(c), e.end("definedName");
|
|
2293
2303
|
}
|
|
2294
2304
|
e.end("definedNames");
|
|
2295
|
-
}(e, r, t,
|
|
2305
|
+
}(e, r, t, a, s), function(t, e, r) {
|
|
2306
|
+
const o = r.getCalculation().toJSON(), n = {}, s = (t, e) => {
|
|
2307
|
+
const r = o[t];
|
|
2308
|
+
"boolean" == typeof r && (n[e] = r ? "1" : "0");
|
|
2309
|
+
};
|
|
2310
|
+
if (o.calcMode) {
|
|
2311
|
+
const t = It[o.calcMode];
|
|
2312
|
+
t && "auto" !== t && (n.calcMode = t);
|
|
2313
|
+
}
|
|
2314
|
+
s("fullCalcOnLoad", "fullCalcOnLoad"), s("calcOnSave", "calcOnSave"), s("calcCompleted", "calcCompleted"), s("fullPrecision", "fullPrecision"), s("forceFullCalc", "forceFullCalc"), s("concurrentCalc", "concurrentCalc"), o.refMode && (n.refMode = o.refMode);
|
|
2315
|
+
o.iterate && (n.iterate = "1");
|
|
2316
|
+
void 0 !== o.maxIterations && (n.iterateCount = String(o.maxIterations));
|
|
2317
|
+
void 0 !== o.maxIterateChange && (n.iterateDelta = String(o.maxIterateChange));
|
|
2318
|
+
if (0 === Object.keys(n).length) return;
|
|
2319
|
+
e.empty("calcPr", n);
|
|
2320
|
+
}(0, r, t), r.end("workbook"), r.close();
|
|
2296
2321
|
}
|
|
2297
2322
|
}(),
|
|
2298
|
-
new class extends
|
|
2323
|
+
new class extends U {
|
|
2299
2324
|
constructor() {
|
|
2300
2325
|
super({
|
|
2301
2326
|
kind: "worksheet",
|
|
@@ -2304,8 +2329,8 @@ var fr = (t, e, r, o) => {
|
|
|
2304
2329
|
path: () => "/xl/worksheets/sheet{n}.xml"
|
|
2305
2330
|
});
|
|
2306
2331
|
}
|
|
2307
|
-
async emit(t,
|
|
2308
|
-
const c =
|
|
2332
|
+
async emit(t, l) {
|
|
2333
|
+
const c = l.getXMLWriter(), d = t.model, u = t.json;
|
|
2309
2334
|
c.decl(), c.start("worksheet", {
|
|
2310
2335
|
xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
2311
2336
|
"xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
@@ -2314,10 +2339,10 @@ var fr = (t, e, r, o) => {
|
|
|
2314
2339
|
"xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
|
|
2315
2340
|
}), function(t, e, r) {
|
|
2316
2341
|
const o = r.getTabColor();
|
|
2317
|
-
o && (e.start("sheetPr"), o &&
|
|
2318
|
-
}(0, c,
|
|
2342
|
+
o && (e.start("sheetPr"), o && Pt(e, r.getStyles().getTheme(), o, "tabColor", !1), e.end("sheetPr"));
|
|
2343
|
+
}(0, c, d), function(t, e, r, o) {
|
|
2319
2344
|
let n = r.getUsedRange({ features: [] }), s = n ? n.getCoords() : null;
|
|
2320
|
-
const a =
|
|
2345
|
+
const a = Se, l = we, i = o.directStyles, c = i ? i.length : 0;
|
|
2321
2346
|
for (let t = 0; t < c; t++) {
|
|
2322
2347
|
let e = r.getRange(i[t][0]).getCoords();
|
|
2323
2348
|
if (e.colEnd === l) {
|
|
@@ -2336,12 +2361,12 @@ var fr = (t, e, r, o) => {
|
|
|
2336
2361
|
rowEnd: t
|
|
2337
2362
|
};
|
|
2338
2363
|
}
|
|
2339
|
-
s =
|
|
2364
|
+
s = M.unionRanges(s, e);
|
|
2340
2365
|
}
|
|
2341
2366
|
const d = o.merges, p = d ? d.length : 0;
|
|
2342
2367
|
for (let t = 0; t < p; t++) {
|
|
2343
2368
|
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 =
|
|
2369
|
+
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
2370
|
}
|
|
2346
2371
|
let m = "A1";
|
|
2347
2372
|
s && (n = r.getRange(s), m = s.colStart === s.colEnd && s.rowStart === s.rowEnd ? n.getAddress() : `${n.getIntersect({
|
|
@@ -2356,8 +2381,8 @@ var fr = (t, e, r, o) => {
|
|
|
2356
2381
|
rowEnd: s.rowEnd
|
|
2357
2382
|
}).getAddress()}`);
|
|
2358
2383
|
e.empty("dimension", { ref: m });
|
|
2359
|
-
}(0, c,
|
|
2360
|
-
const s = r.getView(), a = s.getTopLeft(), l = r.getRowHeaders().getIndex(a.top), i = r.getColumnHeaders().getIndex(a.left), c =
|
|
2384
|
+
}(0, c, d, u), function(t, e, r, o, n) {
|
|
2385
|
+
const s = r.getView(), a = s.getTopLeft(), l = r.getRowHeaders().getIndex(a.top), i = r.getColumnHeaders().getIndex(a.left), c = b.cellToString({
|
|
2361
2386
|
colIndex: i,
|
|
2362
2387
|
rowIndex: l
|
|
2363
2388
|
});
|
|
@@ -2384,22 +2409,22 @@ var fr = (t, e, r, o) => {
|
|
|
2384
2409
|
d.colorId = "" + l;
|
|
2385
2410
|
}
|
|
2386
2411
|
d.workbookViewId = "0";
|
|
2387
|
-
const f = r.getSelection().getCoords(), u =
|
|
2412
|
+
const f = r.getSelection().getCoords(), u = b.cellToString(f.cell);
|
|
2388
2413
|
let h = {};
|
|
2389
2414
|
const g = s.getFreezePanes(), y = g.coords ?? {}, x = y.colIndex ?? 0, v = y.rowIndex ?? 0;
|
|
2390
2415
|
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 =
|
|
2416
|
+
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
2417
|
colIndex: l,
|
|
2393
2418
|
rowIndex: s
|
|
2394
2419
|
});
|
|
2395
2420
|
"A1" !== f ? d.topLeftCell = f : delete d.topLeftCell, e.start("sheetView", d);
|
|
2396
2421
|
const u = {};
|
|
2397
|
-
if (i > 0 && (u.xSplit = i), c > 0 && (u.ySplit = c), u.topLeftCell =
|
|
2422
|
+
if (i > 0 && (u.xSplit = i), c > 0 && (u.ySplit = c), u.topLeftCell = b.cellToString({
|
|
2398
2423
|
colIndex: p,
|
|
2399
2424
|
rowIndex: m
|
|
2400
2425
|
}), u.state = "frozen", 0 === x) {
|
|
2401
2426
|
u.activePane = "bottomLeft", e.empty("pane", u);
|
|
2402
|
-
const t =
|
|
2427
|
+
const t = b.cellToString({
|
|
2403
2428
|
colIndex: p,
|
|
2404
2429
|
rowIndex: s
|
|
2405
2430
|
});
|
|
@@ -2409,7 +2434,7 @@ var fr = (t, e, r, o) => {
|
|
|
2409
2434
|
}), h.pane = "bottomLeft";
|
|
2410
2435
|
} else if (0 === v) {
|
|
2411
2436
|
u.activePane = "topRight", e.empty("pane", u);
|
|
2412
|
-
const t =
|
|
2437
|
+
const t = b.cellToString({
|
|
2413
2438
|
colIndex: l,
|
|
2414
2439
|
rowIndex: m
|
|
2415
2440
|
});
|
|
@@ -2422,7 +2447,7 @@ var fr = (t, e, r, o) => {
|
|
|
2422
2447
|
activeCell: f,
|
|
2423
2448
|
sqref: f
|
|
2424
2449
|
});
|
|
2425
|
-
const t =
|
|
2450
|
+
const t = b.cellToString({
|
|
2426
2451
|
colIndex: p,
|
|
2427
2452
|
rowIndex: s
|
|
2428
2453
|
});
|
|
@@ -2431,7 +2456,7 @@ var fr = (t, e, r, o) => {
|
|
|
2431
2456
|
activeCell: t,
|
|
2432
2457
|
sqref: t
|
|
2433
2458
|
});
|
|
2434
|
-
const r =
|
|
2459
|
+
const r = b.cellToString({
|
|
2435
2460
|
colIndex: l,
|
|
2436
2461
|
rowIndex: m
|
|
2437
2462
|
});
|
|
@@ -2443,24 +2468,24 @@ var fr = (t, e, r, o) => {
|
|
|
2443
2468
|
}
|
|
2444
2469
|
} else e.start("sheetView", d);
|
|
2445
2470
|
h.activeCell = u;
|
|
2446
|
-
const S = f.ranges,
|
|
2447
|
-
if (
|
|
2471
|
+
const S = f.ranges, w = S ? S.length : 0;
|
|
2472
|
+
if (w > 0) {
|
|
2448
2473
|
let t = "";
|
|
2449
|
-
for (let e = 0; e <
|
|
2474
|
+
for (let e = 0; e < w; e++) {
|
|
2450
2475
|
const r = S[e];
|
|
2451
|
-
e > 0 && (t += " "), t +=
|
|
2476
|
+
e > 0 && (t += " "), t += b.rangeToString(r);
|
|
2452
2477
|
}
|
|
2453
2478
|
h.sqref = t, (f.rangeIndex ?? 0) > 0 && (h.activeCellId = "" + f.rangeIndex);
|
|
2454
2479
|
} else "A1" === u ? h = null : h.sqref = u;
|
|
2455
2480
|
h && e.empty("selection", h);
|
|
2456
2481
|
e.end("sheetView"), e.end("sheetViews");
|
|
2457
|
-
}(0, c,
|
|
2482
|
+
}(0, c, d, 0, t.isSelected), function(t, e, r, o) {
|
|
2458
2483
|
const n = o.defaultColSize, s = o.defaultRowSize, a = {};
|
|
2459
2484
|
void 0 !== n && (a.defaultColWidth = n);
|
|
2460
2485
|
a.defaultRowHeight = s ?? .75 * r.getRowHeaders().getDefaultSize(), void 0 !== s && (a.customHeight = "1");
|
|
2461
2486
|
a["x14ac:dyDescent"] = "0.25", e.empty("sheetFormatPr", a);
|
|
2462
|
-
}(0, c,
|
|
2463
|
-
const n = o.cols ?
|
|
2487
|
+
}(0, c, d, u), function(t, e, r, o) {
|
|
2488
|
+
const n = o.cols ? b.refsToRuns(o.cols, !0) : null, s = n ? n.length : 0;
|
|
2464
2489
|
r.getEntireRange().getColumnEnd();
|
|
2465
2490
|
const a = r.getColumnHeaders().getDefaultSizeNative();
|
|
2466
2491
|
if (s > 0) {
|
|
@@ -2476,111 +2501,111 @@ var fr = (t, e, r, o) => {
|
|
|
2476
2501
|
}
|
|
2477
2502
|
e.end("cols");
|
|
2478
2503
|
}
|
|
2479
|
-
}(0, c,
|
|
2480
|
-
const
|
|
2504
|
+
}(0, c, d, u), function(t, e, n, s, a) {
|
|
2505
|
+
const l = t.getSharedStates(), c = l.get("persistStrings"), d = l.get("metaCollector"), f = l.get("persistRichTypes"), u = l.get("formulaTransform");
|
|
2481
2506
|
let h = 0, y = 0;
|
|
2482
|
-
const
|
|
2483
|
-
let
|
|
2484
|
-
const C =
|
|
2485
|
-
if (
|
|
2486
|
-
const
|
|
2487
|
-
const r =
|
|
2507
|
+
const x = n.getUsedRange();
|
|
2508
|
+
let w = 0;
|
|
2509
|
+
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;
|
|
2510
|
+
if (x || T > 0) {
|
|
2511
|
+
const l = .75, x = s.defaultRowSize ?? n.getRowHeaders().getDefaultSize() * l, T = n.getStyles().getNormal().getBestFit().height * l, I = (t, e) => {
|
|
2512
|
+
const r = Ne;
|
|
2488
2513
|
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
2514
|
const o = e.value;
|
|
2490
2515
|
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 ??
|
|
2516
|
+
const n = o.csz ?? !1, s = o.sz ?? x;
|
|
2492
2517
|
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
2518
|
};
|
|
2494
|
-
let
|
|
2495
|
-
const z = (t,
|
|
2496
|
-
if (
|
|
2497
|
-
for (-1 !==
|
|
2498
|
-
|
|
2499
|
-
const
|
|
2500
|
-
|
|
2519
|
+
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;
|
|
2520
|
+
const z = (t, r = !1) => {
|
|
2521
|
+
if (E !== t) {
|
|
2522
|
+
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;) {
|
|
2523
|
+
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);
|
|
2524
|
+
const o = E < t || r && E === t, n = I(E, P && E >= L && E <= _ ? P : null);
|
|
2525
|
+
o ? e.empty("row", n) : e.start("row", n);
|
|
2501
2526
|
}
|
|
2502
|
-
if (t <
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2527
|
+
if (t < E) {
|
|
2528
|
+
const r = I(t, null);
|
|
2529
|
+
e.start("row", r);
|
|
2505
2530
|
}
|
|
2506
2531
|
}
|
|
2507
2532
|
};
|
|
2508
|
-
|
|
2533
|
+
e.setValidationDisabled(!0), e.start("sheetData");
|
|
2509
2534
|
const j = [];
|
|
2510
|
-
j.push(
|
|
2511
|
-
const X =
|
|
2535
|
+
j.push(Te(t, n, s.directStyles));
|
|
2536
|
+
const X = s.formulas, U = X ? X.length : 0;
|
|
2512
2537
|
if (U > 0) {
|
|
2513
2538
|
const t = /* @__PURE__ */ new Map();
|
|
2514
|
-
if (
|
|
2515
|
-
const r =
|
|
2539
|
+
if (a.names.size > 0 && s.formulaArray) for (const e of s.formulaArray) try {
|
|
2540
|
+
const r = n.getRange(e[0]).getCoords();
|
|
2516
2541
|
t.set(`${r.rowStart},${r.colStart}`, r);
|
|
2517
2542
|
} catch {}
|
|
2518
|
-
const
|
|
2519
|
-
if (
|
|
2520
|
-
|
|
2543
|
+
const e = [];
|
|
2544
|
+
if (s.formulaArray) for (const t of s.formulaArray) try {
|
|
2545
|
+
e.push(n.getRange(t[0]).getCoords());
|
|
2521
2546
|
} catch {}
|
|
2522
|
-
const
|
|
2523
|
-
for (let
|
|
2524
|
-
const
|
|
2525
|
-
if (
|
|
2547
|
+
const l = (t) => {
|
|
2548
|
+
for (let r = 0; r < e.length; r++) {
|
|
2549
|
+
const o = e[r];
|
|
2550
|
+
if (o.rowStart <= t.rowEnd && o.rowEnd >= t.rowStart && o.colStart <= t.colEnd && o.colEnd >= t.colStart) return !0;
|
|
2526
2551
|
}
|
|
2527
2552
|
return !1;
|
|
2528
|
-
},
|
|
2553
|
+
}, c = S(() => n.getCalculation()), d = (t) => {
|
|
2529
2554
|
if (!t) return;
|
|
2530
2555
|
let e;
|
|
2531
2556
|
return t.getExpression({ formulaTransform: (t, r) => {
|
|
2532
2557
|
void 0 === r && (e = t);
|
|
2533
2558
|
} }), e;
|
|
2534
|
-
},
|
|
2535
|
-
for (let
|
|
2536
|
-
const s = X[
|
|
2559
|
+
}, p = [];
|
|
2560
|
+
for (let e = 0; e < U; e++) {
|
|
2561
|
+
const s = X[e];
|
|
2537
2562
|
try {
|
|
2538
|
-
const
|
|
2563
|
+
const f = s[0], h = n.getRange(f), g = h.getCoords();
|
|
2539
2564
|
let y = s[1], x = null;
|
|
2540
|
-
const v =
|
|
2541
|
-
let S = !!v &&
|
|
2542
|
-
const C =
|
|
2543
|
-
if (
|
|
2565
|
+
const v = d(h.getCell().getFormula());
|
|
2566
|
+
let S = !!v && o(v, c);
|
|
2567
|
+
const C = r(v);
|
|
2568
|
+
if (a.affects(e)) {
|
|
2544
2569
|
x = null, S = !1;
|
|
2545
|
-
const
|
|
2570
|
+
const e = (t, e, r) => {
|
|
2546
2571
|
const o = {
|
|
2547
2572
|
rowStart: t,
|
|
2548
2573
|
colStart: e,
|
|
2549
2574
|
rowEnd: t,
|
|
2550
2575
|
colEnd: e
|
|
2551
2576
|
};
|
|
2552
|
-
|
|
2577
|
+
p.push([o, {
|
|
2553
2578
|
coords: o,
|
|
2554
2579
|
formula: r,
|
|
2555
2580
|
sharedId: null,
|
|
2556
|
-
ref:
|
|
2581
|
+
ref: b.rangeToString(o),
|
|
2557
2582
|
isDynamicRange: !1,
|
|
2558
2583
|
isWrapped: !0
|
|
2559
2584
|
}]);
|
|
2560
|
-
},
|
|
2585
|
+
}, r = t.get(`${g.rowStart},${g.colStart}`), o = void 0 !== r && (r.rowEnd > r.rowStart || r.colEnd > r.colStart);
|
|
2561
2586
|
let s = !1;
|
|
2562
|
-
if (
|
|
2563
|
-
const t =
|
|
2564
|
-
if (null !== t) for (let
|
|
2565
|
-
if (
|
|
2566
|
-
|
|
2587
|
+
if (o) {
|
|
2588
|
+
const t = m(y, h.getCell().getValue());
|
|
2589
|
+
if (null !== t) for (let o = r.rowStart; o <= r.rowEnd; o++) for (let a = r.colStart; a <= r.colEnd; a++) {
|
|
2590
|
+
if (o === r.rowStart && a === r.colStart) {
|
|
2591
|
+
e(o, a, t), s = !0;
|
|
2567
2592
|
continue;
|
|
2568
2593
|
}
|
|
2569
|
-
const
|
|
2570
|
-
rowStart:
|
|
2594
|
+
const l = i(n.getRange(b.rangeToString({
|
|
2595
|
+
rowStart: o,
|
|
2571
2596
|
colStart: a,
|
|
2572
|
-
rowEnd:
|
|
2597
|
+
rowEnd: o,
|
|
2573
2598
|
colEnd: a
|
|
2574
2599
|
})).getCell().getValue());
|
|
2575
|
-
null !==
|
|
2600
|
+
null !== l && e(o, a, l);
|
|
2576
2601
|
}
|
|
2577
2602
|
} else {
|
|
2578
2603
|
const t = h.getCells();
|
|
2579
|
-
for (let
|
|
2580
|
-
const o = t[
|
|
2604
|
+
for (let r = 0; r < t.length; r++) {
|
|
2605
|
+
const o = t[r];
|
|
2581
2606
|
for (let t = 0; t < o.length; t++) {
|
|
2582
|
-
const n = o[t],
|
|
2583
|
-
null !==
|
|
2607
|
+
const n = o[t], a = m(n.getFormula()?.getExpression() ?? y, n.getValue());
|
|
2608
|
+
null !== a && (e(g.rowStart + r, g.colStart + t, a), s = !0);
|
|
2584
2609
|
}
|
|
2585
2610
|
}
|
|
2586
2611
|
}
|
|
@@ -2588,7 +2613,7 @@ var fr = (t, e, r, o) => {
|
|
|
2588
2613
|
}
|
|
2589
2614
|
const T = -1 !== y.indexOf("!") || -1 !== y.indexOf("[");
|
|
2590
2615
|
let k;
|
|
2591
|
-
if (S || h.isSingleCell() || T ||
|
|
2616
|
+
if (S || h.isSingleCell() || T || l(g) || (x = "" + w++), null === x && !h.isSingleCell()) {
|
|
2592
2617
|
k = [];
|
|
2593
2618
|
const t = h.getCells();
|
|
2594
2619
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -2601,26 +2626,26 @@ var fr = (t, e, r, o) => {
|
|
|
2601
2626
|
coords: g,
|
|
2602
2627
|
formula: y,
|
|
2603
2628
|
sharedId: x,
|
|
2604
|
-
ref:
|
|
2629
|
+
ref: f,
|
|
2605
2630
|
isDynamicRange: S,
|
|
2606
2631
|
isExcelVolatile: C,
|
|
2607
2632
|
memberTexts: k
|
|
2608
2633
|
}];
|
|
2609
|
-
|
|
2634
|
+
p.push(M);
|
|
2610
2635
|
} catch (t) {
|
|
2611
2636
|
console.warn(`Failed to parse formula: ${s[1]}`, t);
|
|
2612
2637
|
continue;
|
|
2613
2638
|
}
|
|
2614
2639
|
}
|
|
2615
|
-
j.push(
|
|
2640
|
+
j.push(p);
|
|
2616
2641
|
} else j.push([]);
|
|
2617
|
-
const
|
|
2618
|
-
if (
|
|
2619
|
-
const t = new Array(
|
|
2620
|
-
for (let e = 0; e <
|
|
2621
|
-
const r =
|
|
2642
|
+
const H = s.volatile, q = H ? H.length : 0;
|
|
2643
|
+
if (q > 0) {
|
|
2644
|
+
const t = new Array(q);
|
|
2645
|
+
for (let e = 0; e < q; e++) {
|
|
2646
|
+
const r = H[e];
|
|
2622
2647
|
try {
|
|
2623
|
-
t[e] = [
|
|
2648
|
+
t[e] = [n.getRange(r).getCoords(), !0];
|
|
2624
2649
|
} catch (t) {
|
|
2625
2650
|
console.warn(`Failed to parse volatile: ${r}`, t);
|
|
2626
2651
|
continue;
|
|
@@ -2628,14 +2653,14 @@ var fr = (t, e, r, o) => {
|
|
|
2628
2653
|
}
|
|
2629
2654
|
j.push(t);
|
|
2630
2655
|
} else j.push([]);
|
|
2631
|
-
const G =
|
|
2656
|
+
const G = s.formulaArray, J = G ? G.length : 0;
|
|
2632
2657
|
if (J > 0) {
|
|
2633
2658
|
const t = new Array(J);
|
|
2634
2659
|
for (let e = 0; e < J; e++) {
|
|
2635
2660
|
const r = G[e];
|
|
2636
2661
|
try {
|
|
2637
2662
|
const o = r[0];
|
|
2638
|
-
t[e] = [
|
|
2663
|
+
t[e] = [n.getRange(o).getCoords(), {
|
|
2639
2664
|
ref: o,
|
|
2640
2665
|
kind: r[1] ?? "dynamic"
|
|
2641
2666
|
}];
|
|
@@ -2646,72 +2671,72 @@ var fr = (t, e, r, o) => {
|
|
|
2646
2671
|
}
|
|
2647
2672
|
j.push(t);
|
|
2648
2673
|
} else j.push([]);
|
|
2649
|
-
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2652
|
-
let l =
|
|
2653
|
-
if (void 0 === l && void 0 !==
|
|
2654
|
-
for (; a <= F && a > $;)
|
|
2655
|
-
void 0 !== W && a >=
|
|
2674
|
+
n.getEntireRange().forEach((r, o) => {
|
|
2675
|
+
const n = o.getCoords(), s = n.rowIndex, a = n.colIndex;
|
|
2676
|
+
E !== s && z(s);
|
|
2677
|
+
let l = o.getInjectedReference(0);
|
|
2678
|
+
if (void 0 === l && void 0 !== D && s >= L && s <= _ && (l = D), void 0 === l) {
|
|
2679
|
+
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;
|
|
2680
|
+
void 0 !== W && a >= B && a <= $ && (l = W);
|
|
2656
2681
|
}
|
|
2657
|
-
const i =
|
|
2658
|
-
let
|
|
2659
|
-
U > 0 && (
|
|
2660
|
-
let
|
|
2661
|
-
|
|
2662
|
-
let
|
|
2663
|
-
J > 0 && (
|
|
2664
|
-
const
|
|
2665
|
-
b.r =
|
|
2682
|
+
const i = o.getType();
|
|
2683
|
+
let m = null;
|
|
2684
|
+
U > 0 && (m = o.getInjectedReference(1) ?? null);
|
|
2685
|
+
let u = !1;
|
|
2686
|
+
q > 0 && (u = o.getInjectedReference(2) ?? !1);
|
|
2687
|
+
let x = null;
|
|
2688
|
+
J > 0 && (x = o.getInjectedReference(3) ?? null);
|
|
2689
|
+
const S = "dynamicSpillError" === x?.kind, w = "static" === x?.kind, b = Ee;
|
|
2690
|
+
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
2691
|
let C = null, T = null;
|
|
2667
2692
|
switch (i) {
|
|
2668
|
-
case
|
|
2669
|
-
C =
|
|
2693
|
+
case V.Boolean:
|
|
2694
|
+
C = r ? "1" : "0", T = "b";
|
|
2670
2695
|
break;
|
|
2671
|
-
case
|
|
2672
|
-
const t =
|
|
2673
|
-
if (T = "e", t > 7) C =
|
|
2696
|
+
case V.Error:
|
|
2697
|
+
const t = r.getCode();
|
|
2698
|
+
if (T = "e", t > 7) C = R.BuiltIn.Value.getLabel(), b.vm = "" + f.add(r);
|
|
2674
2699
|
else if (t < 1) {
|
|
2675
2700
|
let t;
|
|
2676
|
-
T = "s",
|
|
2677
|
-
} else C = "" +
|
|
2701
|
+
T = "s", m ? (t = "=" + m.formula, m = null) : t = "" + r.getLabel(), C = "" + c.add(t), h++;
|
|
2702
|
+
} else C = "" + r.getLabel();
|
|
2678
2703
|
break;
|
|
2679
|
-
case
|
|
2680
|
-
C = "" +
|
|
2704
|
+
case V.Number:
|
|
2705
|
+
C = "" + r, T = null;
|
|
2681
2706
|
break;
|
|
2682
|
-
case
|
|
2683
|
-
C =
|
|
2707
|
+
case V.String:
|
|
2708
|
+
C = r, m ? (T = "str", C = r) : (T = "s", C = "" + c.add(C), h++);
|
|
2684
2709
|
break;
|
|
2685
|
-
case
|
|
2710
|
+
case V.RichData: T = "e", C = R.BuiltIn.Value.getLabel(), b.vm = "" + f.add(r);
|
|
2686
2711
|
}
|
|
2687
2712
|
T && (b.t = T);
|
|
2688
|
-
const
|
|
2689
|
-
if (null !==
|
|
2690
|
-
if (
|
|
2691
|
-
const t =
|
|
2692
|
-
let
|
|
2693
|
-
const
|
|
2694
|
-
if (
|
|
2695
|
-
|
|
2696
|
-
const t =
|
|
2697
|
-
t.colStart === a && t.rowStart === s ? (
|
|
2698
|
-
} else
|
|
2699
|
-
|
|
2713
|
+
const k = !m?.isWrapped && (null !== x || (m?.isDynamicRange ?? !1));
|
|
2714
|
+
if (null !== m || null !== C) {
|
|
2715
|
+
if (k && null !== m && !w && (b.cm = "" + d.registerArrayCell(S)), e.start("c", b), m) {
|
|
2716
|
+
const t = m.memberTexts?.[s - m.coords.rowStart]?.[a - m.coords.colStart] ?? m.formula;
|
|
2717
|
+
let r, o = null;
|
|
2718
|
+
const n = m.sharedId;
|
|
2719
|
+
if (n) {
|
|
2720
|
+
r = Be;
|
|
2721
|
+
const t = m.coords;
|
|
2722
|
+
t.colStart === a && t.rowStart === s ? (r.ref = m.ref, r.si = n, o = m.formula) : (r.ref = void 0, r.si = n);
|
|
2723
|
+
} 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);
|
|
2724
|
+
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
2725
|
}
|
|
2701
|
-
null !== C && ("str" === T && C ? (
|
|
2702
|
-
} else y++ <
|
|
2726
|
+
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");
|
|
2727
|
+
} else y++ < Ce ? e.empty("c", b) : 1048577 === y && t.warn(`Reached ${Ce} style-only cells at '${b.r}'; not writing the rest.`);
|
|
2703
2728
|
}, {
|
|
2704
2729
|
injectReferences: j,
|
|
2705
2730
|
features: []
|
|
2706
|
-
}), -1 !==
|
|
2707
|
-
} else
|
|
2731
|
+
}), -1 !== E && E >= k ? e.end("row") : z(k, !0), e.end("sheetData"), e.setValidationDisabled(!1);
|
|
2732
|
+
} else e.empty("sheetData");
|
|
2708
2733
|
if (h > 0) {
|
|
2709
|
-
const t =
|
|
2710
|
-
|
|
2734
|
+
const t = l.get("stringsCount") ?? 0;
|
|
2735
|
+
l.set("stringsCount", t + h);
|
|
2711
2736
|
}
|
|
2712
|
-
}(
|
|
2737
|
+
}(l, c, d, u, await (async (t, e) => {
|
|
2713
2738
|
const r = e ? e.length : 0;
|
|
2714
|
-
if (0 === r) return
|
|
2739
|
+
if (0 === r) return be;
|
|
2715
2740
|
const o = /* @__PURE__ */ new Set(), n = new Array(r);
|
|
2716
2741
|
for (let s = 0; s < r; s++) {
|
|
2717
2742
|
n[s] = null;
|
|
@@ -2728,9 +2753,9 @@ var fr = (t, e, r, o) => {
|
|
|
2728
2753
|
} catch {}
|
|
2729
2754
|
}
|
|
2730
2755
|
const s = t.getWorkbook();
|
|
2731
|
-
if (!s) return
|
|
2732
|
-
const a = await
|
|
2733
|
-
return 0 === a.size ?
|
|
2756
|
+
if (!s) return be;
|
|
2757
|
+
const a = await f(s, o);
|
|
2758
|
+
return 0 === a.size ? be : {
|
|
2734
2759
|
names: a,
|
|
2735
2760
|
perFormula: n,
|
|
2736
2761
|
affects: (t) => {
|
|
@@ -2740,17 +2765,17 @@ var fr = (t, e, r, o) => {
|
|
|
2740
2765
|
return !1;
|
|
2741
2766
|
}
|
|
2742
2767
|
};
|
|
2743
|
-
})(
|
|
2768
|
+
})(d, u.formulas)), function(t, e, r, o) {
|
|
2744
2769
|
const n = o.protection;
|
|
2745
2770
|
if (!n) return;
|
|
2746
2771
|
const s = {};
|
|
2747
|
-
|
|
2772
|
+
Tt(n.password ?? {}, s), s.sheet = "1";
|
|
2748
2773
|
const a = (t, e, r) => {
|
|
2749
2774
|
const o = n[t];
|
|
2750
2775
|
void 0 !== o && o !== e && (s[r ?? t] = o ? "1" : "0");
|
|
2751
2776
|
};
|
|
2752
2777
|
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,
|
|
2778
|
+
}(0, c, 0, u), function(t, e, r, o) {
|
|
2754
2779
|
const n = o.protectedRanges, s = n ? n.length : 0;
|
|
2755
2780
|
if (0 === s) return;
|
|
2756
2781
|
const a = [];
|
|
@@ -2758,7 +2783,7 @@ var fr = (t, e, r, o) => {
|
|
|
2758
2783
|
const r = n[e];
|
|
2759
2784
|
let o, s;
|
|
2760
2785
|
Array.isArray(r) ? (o = r[0], s = r[1]) : (o = r.r, s = r.v);
|
|
2761
|
-
const l =
|
|
2786
|
+
const l = Pe(o);
|
|
2762
2787
|
if (!l || !s) {
|
|
2763
2788
|
t.warn("Skipping protectedRange with no range.");
|
|
2764
2789
|
continue;
|
|
@@ -2768,56 +2793,68 @@ var fr = (t, e, r, o) => {
|
|
|
2768
2793
|
continue;
|
|
2769
2794
|
}
|
|
2770
2795
|
const i = {};
|
|
2771
|
-
|
|
2796
|
+
Tt(s.password ?? {}, i), i.sqref = l, i.name = s.name, s.securityDescriptor && (i.securityDescriptor = s.securityDescriptor), a.push(i);
|
|
2772
2797
|
}
|
|
2773
2798
|
if (0 === a.length) return;
|
|
2774
2799
|
e.start("protectedRanges");
|
|
2775
2800
|
for (let t = 0; t < a.length; t++) e.empty("protectedRange", a[t]);
|
|
2776
2801
|
e.end("protectedRanges");
|
|
2777
|
-
}(
|
|
2778
|
-
const
|
|
2779
|
-
if (
|
|
2802
|
+
}(l, c, 0, u);
|
|
2803
|
+
const h = u.autoTable;
|
|
2804
|
+
if (h) {
|
|
2780
2805
|
let t;
|
|
2781
|
-
const e =
|
|
2782
|
-
t = Array.isArray(e) ? e[1] : e.v,
|
|
2806
|
+
const e = h;
|
|
2807
|
+
t = Array.isArray(e) ? e[1] : e.v, he(l, c, d.getAutoTable(), t, !0);
|
|
2783
2808
|
}
|
|
2784
2809
|
(function(t, e, r, o) {
|
|
2785
2810
|
const n = o.merges ? o.merges.length : 0;
|
|
2786
2811
|
if (n > 0) {
|
|
2787
2812
|
e.start("mergeCells", { count: n });
|
|
2788
2813
|
for (let t = 0; t < n; t++) {
|
|
2789
|
-
const r = o.merges[t], n = "string" == typeof r ? r :
|
|
2814
|
+
const r = o.merges[t], n = "string" == typeof r ? r : b.rangeToString(r);
|
|
2790
2815
|
e.empty("mergeCell", { ref: n });
|
|
2791
2816
|
}
|
|
2792
2817
|
e.end("mergeCells");
|
|
2793
2818
|
}
|
|
2794
|
-
})(0, c, 0,
|
|
2795
|
-
const
|
|
2819
|
+
})(0, c, 0, u);
|
|
2820
|
+
const C = function(t, e, r, o) {
|
|
2796
2821
|
const n = [], s = o.conditionals, a = s ? s.length : 0;
|
|
2797
2822
|
if (0 === a) return n;
|
|
2798
2823
|
const l = t.getSharedStates();
|
|
2799
|
-
let
|
|
2800
|
-
|
|
2801
|
-
const
|
|
2802
|
-
let
|
|
2824
|
+
let i = l.get(ee);
|
|
2825
|
+
i || (i = new te(), l.set(ee, i));
|
|
2826
|
+
const c = r.getStyles().getTheme();
|
|
2827
|
+
let d = null, p = 0;
|
|
2803
2828
|
for (let r = 0; r < a; r++) {
|
|
2804
2829
|
const o = s[r];
|
|
2805
2830
|
let a, l;
|
|
2806
2831
|
Array.isArray(o) ? (a = o[0], l = o[1]) : (a = o.r, l = o.v);
|
|
2807
|
-
const
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2832
|
+
const m = Pe(a);
|
|
2833
|
+
if (!m || !l) {
|
|
2834
|
+
t.warn("Skipping conditionalFormatting with no range.");
|
|
2835
|
+
continue;
|
|
2836
|
+
}
|
|
2837
|
+
const f = l.scale, u = f ? { type: f.type } : x(l.condition, Ae(m), (e) => t.warn(e));
|
|
2838
|
+
u ? f?.type === A.ScaleType.IconSet && Ie(f) ? (p++, n.push({
|
|
2839
|
+
guid: w(k.uuidV4),
|
|
2840
|
+
sqref: m,
|
|
2841
|
+
priority: p,
|
|
2842
|
+
scale: f
|
|
2843
|
+
})) : f || !De(u) ? (m !== d && (null !== d && e.end("conditionalFormatting"), e.start("conditionalFormatting", {
|
|
2844
|
+
sqref: m,
|
|
2815
2845
|
pivot: l.pivot ? "1" : void 0
|
|
2816
|
-
}),
|
|
2846
|
+
}), d = m), p++, Fe(t, e, c, l, u, m, p, i, n)) : (p++, n.push({
|
|
2847
|
+
guid: w(k.uuidV4),
|
|
2848
|
+
sqref: m,
|
|
2849
|
+
priority: p,
|
|
2850
|
+
rule: u,
|
|
2851
|
+
style: l.style,
|
|
2852
|
+
stopIfTrue: l.stopIfTrue
|
|
2853
|
+
})) : l.condition || t.warn("Skipping conditional format with neither a condition nor a scale.");
|
|
2817
2854
|
}
|
|
2818
|
-
null !==
|
|
2855
|
+
null !== d && e.end("conditionalFormatting");
|
|
2819
2856
|
return n;
|
|
2820
|
-
}(
|
|
2857
|
+
}(l, c, d, u), T = function(t, e, r, o) {
|
|
2821
2858
|
const n = [], s = o.validations, a = s ? s.length : 0;
|
|
2822
2859
|
if (0 === a) return n;
|
|
2823
2860
|
const l = [];
|
|
@@ -2825,19 +2862,19 @@ var fr = (t, e, r, o) => {
|
|
|
2825
2862
|
const r = s[e];
|
|
2826
2863
|
let o, a;
|
|
2827
2864
|
Array.isArray(r) ? (o = r[0], a = r[1]) : (o = r.r, a = r.v);
|
|
2828
|
-
const i =
|
|
2865
|
+
const i = Pe(o);
|
|
2829
2866
|
if (!i || !a) {
|
|
2830
2867
|
t.warn?.("Skipping dataValidation with no range.");
|
|
2831
2868
|
continue;
|
|
2832
2869
|
}
|
|
2833
2870
|
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:
|
|
2871
|
+
const { type: c, operator: d, formula1: p, formula2: m } = y(a.condition, (e) => t.warn(e)) ?? {}, f = {
|
|
2835
2872
|
type: c,
|
|
2836
2873
|
operator: d,
|
|
2837
|
-
allowBlank:
|
|
2874
|
+
allowBlank: Le(a.condition?.includeBlanks ?? !1),
|
|
2838
2875
|
showDropDown: a.hideDropdown ? "1" : void 0,
|
|
2839
|
-
showInputMessage:
|
|
2840
|
-
showErrorMessage:
|
|
2876
|
+
showInputMessage: Le(a.showPromptMessage),
|
|
2877
|
+
showErrorMessage: Le(a.showAlertMessage),
|
|
2841
2878
|
errorStyle: a.alertStyle ?? "information",
|
|
2842
2879
|
errorTitle: a.alertTitle,
|
|
2843
2880
|
error: a.alert,
|
|
@@ -2845,15 +2882,15 @@ var fr = (t, e, r, o) => {
|
|
|
2845
2882
|
prompt: a.prompt,
|
|
2846
2883
|
imeMode: a.imeMode
|
|
2847
2884
|
};
|
|
2848
|
-
|
|
2849
|
-
attrs:
|
|
2885
|
+
_e(p) || _e(m) ? n.push({
|
|
2886
|
+
attrs: f,
|
|
2850
2887
|
formula1: p,
|
|
2851
|
-
formula2:
|
|
2888
|
+
formula2: m,
|
|
2852
2889
|
sqref: i
|
|
2853
|
-
}) : (
|
|
2854
|
-
attrs:
|
|
2890
|
+
}) : (f.sqref = i, l.push({
|
|
2891
|
+
attrs: f,
|
|
2855
2892
|
formula1: p,
|
|
2856
|
-
formula2:
|
|
2893
|
+
formula2: m
|
|
2857
2894
|
}));
|
|
2858
2895
|
}
|
|
2859
2896
|
if (0 === l.length) return n;
|
|
@@ -2863,7 +2900,7 @@ var fr = (t, e, r, o) => {
|
|
|
2863
2900
|
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
2901
|
}
|
|
2865
2902
|
return e.end("dataValidations"), n;
|
|
2866
|
-
}(
|
|
2903
|
+
}(l, c, 0, u);
|
|
2867
2904
|
(function(t, e, r, o) {
|
|
2868
2905
|
const n = o.hyperlinks, s = n ? n.length : 0;
|
|
2869
2906
|
if (0 === s) return;
|
|
@@ -2876,7 +2913,7 @@ var fr = (t, e, r, o) => {
|
|
|
2876
2913
|
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
2914
|
}
|
|
2878
2915
|
e.end("hyperlinks");
|
|
2879
|
-
})(
|
|
2916
|
+
})(l, c, 0, u), function(t, e, r, o) {
|
|
2880
2917
|
const n = o.pageMargins;
|
|
2881
2918
|
e.empty("pageMargins", {
|
|
2882
2919
|
left: n?.left ?? .7,
|
|
@@ -2886,7 +2923,7 @@ var fr = (t, e, r, o) => {
|
|
|
2886
2923
|
header: n?.header ?? .3,
|
|
2887
2924
|
footer: n?.footer ?? .3
|
|
2888
2925
|
});
|
|
2889
|
-
}(0, c, 0,
|
|
2926
|
+
}(0, c, 0, u), function(t, e, r, o) {
|
|
2890
2927
|
const n = o.movables;
|
|
2891
2928
|
if (0 === (n ? n.length : 0)) return;
|
|
2892
2929
|
const s = (t) => {
|
|
@@ -2906,7 +2943,7 @@ var fr = (t, e, r, o) => {
|
|
|
2906
2943
|
resources: r.getResources()
|
|
2907
2944
|
});
|
|
2908
2945
|
e.empty("drawing", { "r:id": l.relId });
|
|
2909
|
-
}(
|
|
2946
|
+
}(l, c, d, u), function(t, e, r, o) {
|
|
2910
2947
|
const n = o.tables, s = n ? n.length : 0;
|
|
2911
2948
|
if (0 === s) return;
|
|
2912
2949
|
const a = r.getTables().getItems();
|
|
@@ -2923,77 +2960,97 @@ var fr = (t, e, r, o) => {
|
|
|
2923
2960
|
c["r:id"] = i.relId, e.empty("tablePart", c);
|
|
2924
2961
|
}
|
|
2925
2962
|
e.end("tableParts");
|
|
2926
|
-
}(
|
|
2927
|
-
if (0 ===
|
|
2928
|
-
const
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2931
|
-
uri:
|
|
2932
|
-
"xmlns:x14":
|
|
2933
|
-
}),
|
|
2934
|
-
for (let t = 0; t <
|
|
2935
|
-
const { guid:
|
|
2936
|
-
if (
|
|
2937
|
-
|
|
2963
|
+
}(l, c, d, u), function(t, r, o, l, i) {
|
|
2964
|
+
if (0 === l.length && 0 === i.length) return;
|
|
2965
|
+
const c = o.getStyles(), d = c.getTheme();
|
|
2966
|
+
if (r.start("extLst"), l.length > 0) {
|
|
2967
|
+
r.start("ext", {
|
|
2968
|
+
uri: e,
|
|
2969
|
+
"xmlns:x14": n
|
|
2970
|
+
}), r.start("x14:conditionalFormattings");
|
|
2971
|
+
for (let t = 0; t < l.length; t++) {
|
|
2972
|
+
const { guid: e, sqref: o, priority: n, scale: a, rule: i, style: p, stopIfTrue: m } = l[t];
|
|
2973
|
+
if (r.start("x14:conditionalFormatting", { "xmlns:xm": s }), a) if (a.type === A.ScaleType.DataBar) {
|
|
2974
|
+
r.start("x14:cfRule", {
|
|
2938
2975
|
type: "dataBar",
|
|
2939
|
-
id:
|
|
2940
|
-
}),
|
|
2941
|
-
minLength:
|
|
2942
|
-
maxLength:
|
|
2943
|
-
gradient:
|
|
2944
|
-
border:
|
|
2945
|
-
direction:
|
|
2946
|
-
negativeBarColorSameAsPositive:
|
|
2947
|
-
negativeBarBorderColorSameAsPositive:
|
|
2948
|
-
axisPosition:
|
|
2976
|
+
id: e
|
|
2977
|
+
}), r.start("x14:dataBar", {
|
|
2978
|
+
minLength: a.minLength,
|
|
2979
|
+
maxLength: a.maxLength,
|
|
2980
|
+
gradient: a.gradient ? void 0 : "0",
|
|
2981
|
+
border: a.borderColor ? "1" : void 0,
|
|
2982
|
+
direction: a.direction,
|
|
2983
|
+
negativeBarColorSameAsPositive: a.negativeFillColor ? "0" : "1",
|
|
2984
|
+
negativeBarBorderColorSameAsPositive: a.negativeBorderColor ? "0" : void 0,
|
|
2985
|
+
axisPosition: a.axisPosition
|
|
2949
2986
|
});
|
|
2950
|
-
const t =
|
|
2951
|
-
if (0 === t.length)
|
|
2952
|
-
else for (let
|
|
2953
|
-
|
|
2987
|
+
const t = a.stops ?? [];
|
|
2988
|
+
if (0 === t.length) Me(r, { type: A.ColorStopType.AutoMin }), Me(r, { type: A.ColorStopType.AutoMax });
|
|
2989
|
+
else for (let e = 0; e < t.length; e++) Me(r, t[e]);
|
|
2990
|
+
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
2991
|
} else {
|
|
2955
|
-
|
|
2992
|
+
r.start("x14:cfRule", {
|
|
2956
2993
|
type: "iconSet",
|
|
2957
|
-
priority:
|
|
2958
|
-
id:
|
|
2959
|
-
}),
|
|
2960
|
-
iconSet:
|
|
2961
|
-
reverse:
|
|
2962
|
-
showValue:
|
|
2963
|
-
custom: (
|
|
2994
|
+
priority: n,
|
|
2995
|
+
id: e
|
|
2996
|
+
}), r.start("x14:iconSet", {
|
|
2997
|
+
iconSet: a.iconSet,
|
|
2998
|
+
reverse: Le(a.reverse),
|
|
2999
|
+
showValue: Le(a.showValue),
|
|
3000
|
+
custom: (a.icon?.length ?? 0) > 0 ? "1" : void 0
|
|
2964
3001
|
});
|
|
2965
|
-
const t =
|
|
2966
|
-
for (let
|
|
2967
|
-
const o =
|
|
2968
|
-
for (let t = 0; t < o.length; t++)
|
|
3002
|
+
const t = a.stops ?? [];
|
|
3003
|
+
for (let e = 0; e < t.length; e++) Me(r, t[e]);
|
|
3004
|
+
const o = a.icon ?? [];
|
|
3005
|
+
for (let t = 0; t < o.length; t++) r.empty("x14:cfIcon", {
|
|
2969
3006
|
iconSet: o[t].set,
|
|
2970
3007
|
iconId: o[t].id
|
|
2971
3008
|
});
|
|
2972
|
-
|
|
3009
|
+
r.end("x14:iconSet"), r.end("x14:cfRule");
|
|
3010
|
+
}
|
|
3011
|
+
else {
|
|
3012
|
+
r.start("x14:cfRule", {
|
|
3013
|
+
type: i.type,
|
|
3014
|
+
priority: n,
|
|
3015
|
+
stopIfTrue: Le(m),
|
|
3016
|
+
aboveAverage: Le(i.aboveAverage),
|
|
3017
|
+
equalAverage: Le(i.equalAverage),
|
|
3018
|
+
stdDev: i.stdDev,
|
|
3019
|
+
bottom: Le(i.bottom),
|
|
3020
|
+
percent: Le(i.percent),
|
|
3021
|
+
rank: i.rank,
|
|
3022
|
+
operator: i.operator,
|
|
3023
|
+
text: i.text,
|
|
3024
|
+
timePeriod: i.timePeriod,
|
|
3025
|
+
id: e
|
|
3026
|
+
});
|
|
3027
|
+
const t = i.formulas ?? [];
|
|
3028
|
+
for (let e = 0; e < t.length; e++) r.start("xm:f"), r.text(t[e]), r.end("xm:f");
|
|
3029
|
+
p && Object.keys(p).length > 0 && de(0, r, p, c, d, "x14:dxf"), r.end("x14:cfRule");
|
|
2973
3030
|
}
|
|
2974
|
-
|
|
3031
|
+
r.start("xm:sqref"), r.text(o), r.end("xm:sqref"), r.end("x14:conditionalFormatting");
|
|
2975
3032
|
}
|
|
2976
|
-
|
|
3033
|
+
r.end("x14:conditionalFormattings"), r.end("ext");
|
|
2977
3034
|
}
|
|
2978
|
-
if (
|
|
2979
|
-
|
|
2980
|
-
uri:
|
|
2981
|
-
"xmlns:x14":
|
|
2982
|
-
}),
|
|
2983
|
-
"xmlns:xm":
|
|
2984
|
-
count:
|
|
3035
|
+
if (i.length > 0) {
|
|
3036
|
+
r.start("ext", {
|
|
3037
|
+
uri: a,
|
|
3038
|
+
"xmlns:x14": n
|
|
3039
|
+
}), r.start("x14:dataValidations", {
|
|
3040
|
+
"xmlns:xm": s,
|
|
3041
|
+
count: i.length
|
|
2985
3042
|
});
|
|
2986
|
-
for (let t = 0; t <
|
|
2987
|
-
const { attrs:
|
|
2988
|
-
|
|
3043
|
+
for (let t = 0; t < i.length; t++) {
|
|
3044
|
+
const { attrs: e, formula1: o, formula2: n, sqref: s } = i[t];
|
|
3045
|
+
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
3046
|
}
|
|
2990
|
-
|
|
3047
|
+
r.end("x14:dataValidations"), r.end("ext");
|
|
2991
3048
|
}
|
|
2992
|
-
|
|
2993
|
-
}(0, c,
|
|
3049
|
+
r.end("extLst");
|
|
3050
|
+
}(0, c, d, C, T), c.end("worksheet"), c.close();
|
|
2994
3051
|
}
|
|
2995
3052
|
}(),
|
|
2996
|
-
new class extends
|
|
3053
|
+
new class extends U {
|
|
2997
3054
|
constructor() {
|
|
2998
3055
|
super({
|
|
2999
3056
|
kind: "sharedStrings",
|
|
@@ -3013,12 +3070,12 @@ var fr = (t, e, r, o) => {
|
|
|
3013
3070
|
const e = o[t];
|
|
3014
3071
|
r.start("si");
|
|
3015
3072
|
const n = v.test(e) ? g : void 0;
|
|
3016
|
-
r.start("t", n), r.text(
|
|
3073
|
+
r.start("t", n), r.text(p(e)), r.end("t"), r.end("si");
|
|
3017
3074
|
}
|
|
3018
3075
|
r.end("sst"), r.close();
|
|
3019
3076
|
}
|
|
3020
3077
|
}(),
|
|
3021
|
-
new class extends
|
|
3078
|
+
new class extends U {
|
|
3022
3079
|
constructor() {
|
|
3023
3080
|
super({
|
|
3024
3081
|
kind: "theme",
|
|
@@ -3036,22 +3093,22 @@ var fr = (t, e, r, o) => {
|
|
|
3036
3093
|
const n = r?.getColorScheme();
|
|
3037
3094
|
if (!n) return;
|
|
3038
3095
|
e.start(o, { name: n.getName() || "Office" });
|
|
3039
|
-
for (const t of
|
|
3096
|
+
for (const t of Dt) e.start(t), Ft(e, r, n["get" + t.charAt(0).toUpperCase() + t.slice(1)]()), e.end(t);
|
|
3040
3097
|
e.end(o);
|
|
3041
3098
|
}(0, r, o, "clrScheme"), function(t, e, r, o) {
|
|
3042
3099
|
if (!r) return;
|
|
3043
|
-
e.start(o, { name: r.getName() || "Office" }),
|
|
3100
|
+
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
3101
|
}(e, r, o.getFontScheme(), "fontScheme"), function(t, e, r, o, n) {
|
|
3045
3102
|
if (n?.fillStyleLst && n?.lnStyleLst && n?.effectStyleLst && n?.bgFillStyleLst) return void function(t, e, r, o, n) {
|
|
3046
3103
|
const s = { getTheme: () => o };
|
|
3047
3104
|
e.start(r, { name: "Office" }), e.start("fillStyleLst");
|
|
3048
|
-
for (const t of n.fillStyleLst)
|
|
3105
|
+
for (const t of n.fillStyleLst) Wt(0, e, t, s);
|
|
3049
3106
|
e.end("fillStyleLst"), e.start("lnStyleLst");
|
|
3050
|
-
for (const t of n.lnStyleLst)
|
|
3107
|
+
for (const t of n.lnStyleLst) zt(0, e, t, s);
|
|
3051
3108
|
e.end("lnStyleLst"), e.start("effectStyleLst");
|
|
3052
|
-
for (const r of n.effectStyleLst) e.start("effectStyle"), r.length > 0 ?
|
|
3109
|
+
for (const r of n.effectStyleLst) e.start("effectStyle"), r.length > 0 ? Ut(t, e, o, r) : e.empty("effectLst"), e.end("effectStyle");
|
|
3053
3110
|
e.end("effectStyleLst"), e.start("bgFillStyleLst");
|
|
3054
|
-
for (const t of n.bgFillStyleLst)
|
|
3111
|
+
for (const t of n.bgFillStyleLst) Wt(0, e, t, s);
|
|
3055
3112
|
e.end("bgFillStyleLst"), e.end(r);
|
|
3056
3113
|
}(t, e, r, o, n);
|
|
3057
3114
|
if (n?.formatSchemeXml) return void e.raw(n.formatSchemeXml);
|
|
@@ -3102,7 +3159,7 @@ var fr = (t, e, r, o) => {
|
|
|
3102
3159
|
}(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
3160
|
}
|
|
3104
3161
|
}(),
|
|
3105
|
-
new class extends
|
|
3162
|
+
new class extends U {
|
|
3106
3163
|
constructor() {
|
|
3107
3164
|
super({
|
|
3108
3165
|
kind: "styles",
|
|
@@ -3128,11 +3185,11 @@ var fr = (t, e, r, o) => {
|
|
|
3128
3185
|
for (let e = 0; e < o; e++) {
|
|
3129
3186
|
const o = 0 === e ? {
|
|
3130
3187
|
...r[e],
|
|
3131
|
-
named:
|
|
3188
|
+
named: E.BuiltInName.Normal
|
|
3132
3189
|
} : r[e], s = t.resolve(o), a = {};
|
|
3133
3190
|
void 0 !== o.named && (a.named = o.named), void 0 !== o.quotePrefix && (a.quotePrefix = o.quotePrefix);
|
|
3134
|
-
for (let t = 0; t <
|
|
3135
|
-
const e =
|
|
3191
|
+
for (let t = 0; t < re.length; t++) {
|
|
3192
|
+
const e = re[t];
|
|
3136
3193
|
if (void 0 === o[e] && "alignment" !== e) continue;
|
|
3137
3194
|
const r = s?.[e] ?? o[e];
|
|
3138
3195
|
void 0 !== r && (a[e] = r);
|
|
@@ -3154,16 +3211,16 @@ var fr = (t, e, r, o) => {
|
|
|
3154
3211
|
namedStyles: []
|
|
3155
3212
|
};
|
|
3156
3213
|
(function(t, e) {
|
|
3157
|
-
const r = (t.getNamed(
|
|
3158
|
-
e.fontMap.set(
|
|
3214
|
+
const r = (t.getNamed(E.BuiltInName.Normal).toJSON().style ?? {}).font ?? {};
|
|
3215
|
+
e.fontMap.set(C.JSONStableStringify(r), "0"), e.fonts.push(r);
|
|
3159
3216
|
})(t, o), function(t) {
|
|
3160
3217
|
const e = { type: "none" };
|
|
3161
|
-
t.fillMap.set(
|
|
3218
|
+
t.fillMap.set(C.JSONStableStringify(e), "0"), t.fills.push(e);
|
|
3162
3219
|
const r = {
|
|
3163
3220
|
type: "pattern",
|
|
3164
3221
|
patternType: "gray125"
|
|
3165
3222
|
};
|
|
3166
|
-
t.fillMap.set(
|
|
3223
|
+
t.fillMap.set(C.JSONStableStringify(r), "1"), t.fills.push(r);
|
|
3167
3224
|
}(o), function(t) {
|
|
3168
3225
|
const e = {
|
|
3169
3226
|
bottom: { style: "none" },
|
|
@@ -3171,20 +3228,20 @@ var fr = (t, e, r, o) => {
|
|
|
3171
3228
|
right: { style: "none" },
|
|
3172
3229
|
top: { style: "none" }
|
|
3173
3230
|
};
|
|
3174
|
-
t.borderMap.set(
|
|
3231
|
+
t.borderMap.set(C.JSONStableStringify(e), "0"), t.borders.push(e);
|
|
3175
3232
|
}(o), function(t, e) {
|
|
3176
|
-
|
|
3233
|
+
ne(t, t.getNamed(E.BuiltInName.Normal).toJSON(), e);
|
|
3177
3234
|
}(t, o);
|
|
3178
|
-
const n = e?.named ??
|
|
3179
|
-
for (const e of n)
|
|
3180
|
-
for (const e of r)
|
|
3235
|
+
const n = e?.named ?? k.EmptyArray;
|
|
3236
|
+
for (const e of n) ne(t, e, o);
|
|
3237
|
+
for (const e of r) oe(t, e, o);
|
|
3181
3238
|
return o;
|
|
3182
|
-
}(n, o, s), l = e.getSharedStates().get(
|
|
3239
|
+
}(n, o, s), l = e.getSharedStates().get(ee), i = function(t, e = 0) {
|
|
3183
3240
|
const r = t?.tables;
|
|
3184
3241
|
if (!r) return null;
|
|
3185
3242
|
const o = r.styles;
|
|
3186
3243
|
if (!o) return null;
|
|
3187
|
-
const n = [], s = /* @__PURE__ */ new Map(), a = Object.keys(o), l = [...
|
|
3244
|
+
const n = [], s = /* @__PURE__ */ new Map(), a = Object.keys(o), l = [...me].reverse();
|
|
3188
3245
|
for (const t of a) {
|
|
3189
3246
|
const r = o[t];
|
|
3190
3247
|
for (const o of l) {
|
|
@@ -3210,7 +3267,7 @@ var fr = (t, e, r, o) => {
|
|
|
3210
3267
|
for (let t = 0; t < n; t++) {
|
|
3211
3268
|
const r = o[t];
|
|
3212
3269
|
e.empty("numFmt", {
|
|
3213
|
-
numFmtId: String(t +
|
|
3270
|
+
numFmtId: String(t + pe),
|
|
3214
3271
|
formatCode: r
|
|
3215
3272
|
});
|
|
3216
3273
|
}
|
|
@@ -3221,28 +3278,28 @@ var fr = (t, e, r, o) => {
|
|
|
3221
3278
|
count: String(s),
|
|
3222
3279
|
"x14ac:knownFonts": "1"
|
|
3223
3280
|
});
|
|
3224
|
-
for (const o of n)
|
|
3281
|
+
for (const o of n) se(t, e, o, r);
|
|
3225
3282
|
e.end("fonts");
|
|
3226
3283
|
}(e, r, n, a), function(t, e, r, o) {
|
|
3227
3284
|
const n = o.fills, s = n.length;
|
|
3228
3285
|
e.start("fills", { count: String(s) });
|
|
3229
|
-
for (const t of n)
|
|
3286
|
+
for (const t of n) Wt(0, e, t, r, !0);
|
|
3230
3287
|
e.end("fills");
|
|
3231
3288
|
}(0, r, n, a), function(t, e, r, o) {
|
|
3232
3289
|
const n = o.borders, s = n.length;
|
|
3233
3290
|
e.start("borders", { count: String(s) });
|
|
3234
3291
|
const a = r.getTheme();
|
|
3235
|
-
for (const r of n)
|
|
3292
|
+
for (const r of n) le(t, e, r, a, !1);
|
|
3236
3293
|
e.end("borders");
|
|
3237
3294
|
}(e, r, n, a), function(t, e, r, o, n) {
|
|
3238
3295
|
const s = n.namedStyles, a = s.length;
|
|
3239
3296
|
e.start("cellStyleXfs", { count: String(a) });
|
|
3240
|
-
for (const o of s)
|
|
3297
|
+
for (const o of s) ce(t, e, r, o.style ?? k.EmptyObject, n, !1);
|
|
3241
3298
|
e.end("cellStyleXfs");
|
|
3242
3299
|
}(e, r, n, 0, a), function(t, e, r, o, n) {
|
|
3243
3300
|
const s = o.length;
|
|
3244
3301
|
e.start("cellXfs", { count: String(s) });
|
|
3245
|
-
for (let a = 0; a < s; a++)
|
|
3302
|
+
for (let a = 0; a < s; a++) ce(t, e, r, o[a], n, !0);
|
|
3246
3303
|
e.end("cellXfs");
|
|
3247
3304
|
}(e, r, n, s, a), function(t, e, r, o, n) {
|
|
3248
3305
|
const s = n.namedStyles, a = s.length;
|
|
@@ -3255,7 +3312,7 @@ var fr = (t, e, r, o) => {
|
|
|
3255
3312
|
};
|
|
3256
3313
|
o.hidden && (i.hidden = "1"), o.iLevel && (i.iLevel = String(o.iLevel));
|
|
3257
3314
|
let c = null;
|
|
3258
|
-
c = a ===
|
|
3315
|
+
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
3316
|
}
|
|
3260
3317
|
e.end("cellStyles");
|
|
3261
3318
|
}(0, r, n, 0, a), function(t, e, r, o, n) {
|
|
@@ -3263,21 +3320,8 @@ var fr = (t, e, r, o) => {
|
|
|
3263
3320
|
if (0 === s.length) return void e.empty("dxfs", { count: "0" });
|
|
3264
3321
|
const a = r.getTheme();
|
|
3265
3322
|
e.start("dxfs", { count: String(s.length) });
|
|
3266
|
-
let l =
|
|
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
|
-
}
|
|
3323
|
+
let l = pe;
|
|
3324
|
+
for (const o of s) l = de(t, e, o, r, a, "dxf", l);
|
|
3281
3325
|
e.end("dxfs");
|
|
3282
3326
|
}(e, r, n, i, l), function(t, e, r, o, n) {
|
|
3283
3327
|
const s = o?.tables, a = s?.styles ?? null, l = a ? Object.keys(a) : null, i = l ? l.length : 0, c = {
|
|
@@ -3289,7 +3333,7 @@ var fr = (t, e, r, o) => {
|
|
|
3289
3333
|
e.start("tableStyles", c);
|
|
3290
3334
|
for (const t of l) {
|
|
3291
3335
|
const r = a[t], o = [];
|
|
3292
|
-
for (const t of
|
|
3336
|
+
for (const t of me) {
|
|
3293
3337
|
const e = r[t];
|
|
3294
3338
|
e && o.push([t, e]);
|
|
3295
3339
|
}
|
|
@@ -3312,7 +3356,7 @@ var fr = (t, e, r, o) => {
|
|
|
3312
3356
|
if (e.start("colors"), n) {
|
|
3313
3357
|
e.start("indexedColors");
|
|
3314
3358
|
for (const t of o.indexedColors) {
|
|
3315
|
-
const r =
|
|
3359
|
+
const r = $t(t, !0);
|
|
3316
3360
|
e.empty("rgbColor", { rgb: r });
|
|
3317
3361
|
}
|
|
3318
3362
|
e.end("indexedColors");
|
|
@@ -3320,7 +3364,7 @@ var fr = (t, e, r, o) => {
|
|
|
3320
3364
|
if (s) {
|
|
3321
3365
|
e.start("mruColors");
|
|
3322
3366
|
for (const t of o.mruColors) {
|
|
3323
|
-
const r =
|
|
3367
|
+
const r = $t(t);
|
|
3324
3368
|
e.empty("color", { rgb: r });
|
|
3325
3369
|
}
|
|
3326
3370
|
e.end("mruColors");
|
|
@@ -3337,7 +3381,7 @@ var fr = (t, e, r, o) => {
|
|
|
3337
3381
|
}(0, r), r.end("styleSheet"), r.close();
|
|
3338
3382
|
}
|
|
3339
3383
|
}(),
|
|
3340
|
-
new class extends
|
|
3384
|
+
new class extends U {
|
|
3341
3385
|
constructor() {
|
|
3342
3386
|
super({
|
|
3343
3387
|
kind: "propsCore",
|
|
@@ -3358,14 +3402,14 @@ var fr = (t, e, r, o) => {
|
|
|
3358
3402
|
const o = /* @__PURE__ */ new Date(), n = [
|
|
3359
3403
|
["creator", "SheetXL"],
|
|
3360
3404
|
["lastModifiedBy", "SheetXL"],
|
|
3361
|
-
["created",
|
|
3362
|
-
["modified",
|
|
3405
|
+
["created", We(o)],
|
|
3406
|
+
["modified", We(o)]
|
|
3363
3407
|
];
|
|
3364
|
-
for (const t of n)
|
|
3408
|
+
for (const t of n) ze(r, t[0], t[1]);
|
|
3365
3409
|
r.end("cp:coreProperties"), r.close();
|
|
3366
3410
|
}
|
|
3367
3411
|
}(),
|
|
3368
|
-
new class extends
|
|
3412
|
+
new class extends U {
|
|
3369
3413
|
constructor() {
|
|
3370
3414
|
super({
|
|
3371
3415
|
kind: "propsApp",
|
|
@@ -3375,21 +3419,21 @@ var fr = (t, e, r, o) => {
|
|
|
3375
3419
|
});
|
|
3376
3420
|
}
|
|
3377
3421
|
async emit(t, e) {
|
|
3378
|
-
const r = e.getXMLWriter(), o = t.model, n = await
|
|
3379
|
-
if (!t || "string" != typeof t) return
|
|
3422
|
+
const r = e.getXMLWriter(), o = t.model, n = await O.getDetails(), s = function(t) {
|
|
3423
|
+
if (!t || "string" != typeof t) return ve;
|
|
3380
3424
|
if ("local" === t || "dev" === t || "development" === t) return "00.0000";
|
|
3381
3425
|
const e = t.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
3382
|
-
if (!e) return
|
|
3426
|
+
if (!e) return ve;
|
|
3383
3427
|
const r = parseInt(e[1], 10), o = parseInt(e[2] || "0", 10);
|
|
3384
|
-
return r > 99 || o > 9999 ?
|
|
3428
|
+
return r > 99 || o > 9999 ? ve : `${r.toString()}.${o.toString().padStart(4, "0")}`;
|
|
3385
3429
|
}(n.getBuildVersion()), a = n.getLicensee() || "";
|
|
3386
3430
|
r.setValidationDisabled(!0), r.decl(), r.start("Properties", {
|
|
3387
3431
|
xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
|
|
3388
3432
|
"xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
|
|
3389
|
-
}),
|
|
3433
|
+
}), 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
3434
|
}
|
|
3391
3435
|
}(),
|
|
3392
|
-
new class extends
|
|
3436
|
+
new class extends U {
|
|
3393
3437
|
constructor() {
|
|
3394
3438
|
super({
|
|
3395
3439
|
kind: "metadata",
|
|
@@ -3405,11 +3449,11 @@ var fr = (t, e, r, o) => {
|
|
|
3405
3449
|
const p = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" };
|
|
3406
3450
|
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
3451
|
name: "XLDAPR",
|
|
3408
|
-
|
|
3452
|
+
...Ue,
|
|
3409
3453
|
cellMeta: "1"
|
|
3410
3454
|
}), n && r.empty("metadataType", {
|
|
3411
3455
|
name: "XLRICHVALUE",
|
|
3412
|
-
|
|
3456
|
+
...Ue
|
|
3413
3457
|
}), r.end("metadataTypes"), o) {
|
|
3414
3458
|
r.start("futureMetadata", {
|
|
3415
3459
|
name: "XLDAPR",
|
|
@@ -3448,7 +3492,7 @@ var fr = (t, e, r, o) => {
|
|
|
3448
3492
|
r.end("metadata"), r.close();
|
|
3449
3493
|
}
|
|
3450
3494
|
}(),
|
|
3451
|
-
new class extends
|
|
3495
|
+
new class extends U {
|
|
3452
3496
|
constructor() {
|
|
3453
3497
|
super({
|
|
3454
3498
|
kind: "richValue",
|
|
@@ -3473,7 +3517,7 @@ var fr = (t, e, r, o) => {
|
|
|
3473
3517
|
r.end("rvData"), r.close();
|
|
3474
3518
|
}
|
|
3475
3519
|
}(),
|
|
3476
|
-
new class extends
|
|
3520
|
+
new class extends U {
|
|
3477
3521
|
constructor() {
|
|
3478
3522
|
super({
|
|
3479
3523
|
kind: "richValueStructure",
|
|
@@ -3499,7 +3543,7 @@ var fr = (t, e, r, o) => {
|
|
|
3499
3543
|
r.end("rvStructures"), r.close();
|
|
3500
3544
|
}
|
|
3501
3545
|
}(),
|
|
3502
|
-
new class extends
|
|
3546
|
+
new class extends U {
|
|
3503
3547
|
constructor() {
|
|
3504
3548
|
super({
|
|
3505
3549
|
kind: "richValueTypes",
|
|
@@ -3540,7 +3584,7 @@ var fr = (t, e, r, o) => {
|
|
|
3540
3584
|
r.end("keyFlags"), r.end("global"), r.end("rvTypesInfo"), r.close();
|
|
3541
3585
|
}
|
|
3542
3586
|
}(),
|
|
3543
|
-
new class extends
|
|
3587
|
+
new class extends U {
|
|
3544
3588
|
constructor() {
|
|
3545
3589
|
super({
|
|
3546
3590
|
kind: "drawing",
|
|
@@ -3577,33 +3621,33 @@ var fr = (t, e, r, o) => {
|
|
|
3577
3621
|
}
|
|
3578
3622
|
for (let t = 0; t < l; t++) {
|
|
3579
3623
|
const l = a[t], i = s[t], d = l.content?.type;
|
|
3580
|
-
switch (r.start("twoCellAnchor", { editAs: l.anchorType || "twoCell" }),
|
|
3624
|
+
switch (r.start("twoCellAnchor", { editAs: l.anchorType || "twoCell" }), mr(r, "from", l.anchor.tl), mr(r, "to", l.anchor.br), d) {
|
|
3581
3625
|
case "picture":
|
|
3582
|
-
await
|
|
3626
|
+
await Ze(e, n, o, i, l);
|
|
3583
3627
|
break;
|
|
3584
3628
|
case "chart":
|
|
3585
|
-
await
|
|
3629
|
+
await tr(e, n, o, i, l, c.get(l));
|
|
3586
3630
|
break;
|
|
3587
3631
|
case "shape":
|
|
3588
|
-
await
|
|
3632
|
+
await nr(e, n, o, i, l, c.get(l));
|
|
3589
3633
|
break;
|
|
3590
3634
|
case "smartArt":
|
|
3591
|
-
await
|
|
3635
|
+
await er(e, n, o, i, l);
|
|
3592
3636
|
break;
|
|
3593
3637
|
case "slicer":
|
|
3594
|
-
await
|
|
3638
|
+
await rr(e, n, o, i, l);
|
|
3595
3639
|
break;
|
|
3596
3640
|
case "graphicFrame":
|
|
3597
|
-
await
|
|
3641
|
+
await or(e, n, o, i, l);
|
|
3598
3642
|
break;
|
|
3599
|
-
default: await
|
|
3643
|
+
default: await sr(e, n, o, i, l);
|
|
3600
3644
|
}
|
|
3601
3645
|
r.empty("clientData"), r.end("twoCellAnchor");
|
|
3602
3646
|
}
|
|
3603
3647
|
r.end("wsDr"), r.close();
|
|
3604
3648
|
}
|
|
3605
3649
|
}(),
|
|
3606
|
-
new class extends
|
|
3650
|
+
new class extends U {
|
|
3607
3651
|
constructor() {
|
|
3608
3652
|
super({
|
|
3609
3653
|
kind: "table",
|
|
@@ -3622,10 +3666,10 @@ var fr = (t, e, r, o) => {
|
|
|
3622
3666
|
"xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
|
|
3623
3667
|
"xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"
|
|
3624
3668
|
}, n = t.json, s = t.model;
|
|
3625
|
-
s.isShowHeaders(), o.id = ++
|
|
3669
|
+
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
3670
|
}
|
|
3627
3671
|
}(),
|
|
3628
|
-
new class extends
|
|
3672
|
+
new class extends U {
|
|
3629
3673
|
constructor() {
|
|
3630
3674
|
super({
|
|
3631
3675
|
kind: "chart",
|
|
@@ -3641,10 +3685,10 @@ var fr = (t, e, r, o) => {
|
|
|
3641
3685
|
"xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
|
|
3642
3686
|
"xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
3643
3687
|
"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" }),
|
|
3688
|
+
}), 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
3689
|
}
|
|
3646
3690
|
}(),
|
|
3647
|
-
new class extends
|
|
3691
|
+
new class extends U {
|
|
3648
3692
|
constructor() {
|
|
3649
3693
|
super({
|
|
3650
3694
|
kind: "chartStyle",
|
|
@@ -3659,10 +3703,10 @@ var fr = (t, e, r, o) => {
|
|
|
3659
3703
|
"xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
|
|
3660
3704
|
"xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
|
|
3661
3705
|
id: "297"
|
|
3662
|
-
}),
|
|
3706
|
+
}), br(e, r, to, t.styles), r.end("chartStyle"), r.close();
|
|
3663
3707
|
}
|
|
3664
3708
|
}(),
|
|
3665
|
-
new class extends
|
|
3709
|
+
new class extends U {
|
|
3666
3710
|
constructor() {
|
|
3667
3711
|
super({
|
|
3668
3712
|
kind: "chartColors",
|
|
@@ -3678,16 +3722,16 @@ var fr = (t, e, r, o) => {
|
|
|
3678
3722
|
"xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
|
|
3679
3723
|
meth: "cycle",
|
|
3680
3724
|
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" }),
|
|
3725
|
+
}), 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
3726
|
}
|
|
3683
3727
|
}()
|
|
3684
|
-
],
|
|
3685
|
-
const r = new
|
|
3686
|
-
for (const t of
|
|
3687
|
-
const o =
|
|
3728
|
+
], no = async (t, e) => {
|
|
3729
|
+
const r = new Ct();
|
|
3730
|
+
for (const t of oo) r.register(t);
|
|
3731
|
+
const o = so, n = H.createUint8Array({
|
|
3688
3732
|
lastModDate: new Date(1899, 11, 29, 19, 0, 0),
|
|
3689
3733
|
level: o
|
|
3690
|
-
}), s = t.getOrigin(), a = "Excel" === e?.format ?
|
|
3734
|
+
}), s = t.getOrigin(), a = "Excel" === e?.format ? d(s) : null, l = /* @__PURE__ */ new Map(), i = new wt(n, r, {
|
|
3691
3735
|
strictDuplicateChildren: !0,
|
|
3692
3736
|
onPartEmitted: e?.onPartEmitted,
|
|
3693
3737
|
mapState: l,
|
|
@@ -3696,5 +3740,5 @@ var fr = (t, e, r, o) => {
|
|
|
3696
3740
|
i.addPart("workbook", t, "/xl/workbook.xml"), await i.waitEmit(), i.addPart("propsCore", {}), i.addPart("propsApp", { model: t });
|
|
3697
3741
|
const c = await i.build();
|
|
3698
3742
|
return 0 === c.byteOffset && c.byteLength === c.buffer.byteLength ? c.buffer : c.slice().buffer;
|
|
3699
|
-
},
|
|
3700
|
-
export {
|
|
3743
|
+
}, so = 1;
|
|
3744
|
+
export { no as writeXLSX };
|