@fileverse-dev/dsheet 4.0.3-import-compaction.0 → 4.0.3
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/dist/{executeStringFunction-C1C2F-4h.js → executeStringFunction-BQvE7aeV.js} +13 -15
- package/dist/formula.js +1 -1
- package/dist/{index-Be1UXKhA.js → index-CeTa91qc.js} +5169 -5233
- package/dist/index.es.js +6 -6
- package/dist/sheet-engine/core/api/common.d.ts +0 -1
- package/dist/sheet-engine/core/types.d.ts +0 -2
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +0 -1
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +0 -1
- package/dist/{use-xlsx-import-impl-B_KWT6Kk.js → use-xlsx-import-impl-BVsfV8ZV.js} +74 -74
- package/dist/{xlsx-export-impl-1Lzcuf9K.js → xlsx-export-impl-Ber9FhFY.js} +298 -300
- package/package.json +2 -2
- package/dist/editor/utils/import-compaction.d.ts +0 -25
|
@@ -2,10 +2,10 @@ import { utils as dt, write as Pt } from "xlsx-js-style";
|
|
|
2
2
|
import { Workbook as Ut } from "exceljs";
|
|
3
3
|
import { toast as Rt } from "@fileverse/ui";
|
|
4
4
|
import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
|
|
5
|
-
import { g as jt, c as xt, b as Wt } from "./executeStringFunction-
|
|
6
|
-
import {
|
|
7
|
-
import { c as zt, g as
|
|
8
|
-
const
|
|
5
|
+
import { g as jt, c as xt, b as Wt } from "./executeStringFunction-BQvE7aeV.js";
|
|
6
|
+
import { c as Ct } from "./index-CeTa91qc.js";
|
|
7
|
+
import { c as zt, g as Mt } from "./xlsx-hyperlink-inline-DzewAypN.js";
|
|
8
|
+
const Zt = {
|
|
9
9
|
1: "thin",
|
|
10
10
|
2: "hair",
|
|
11
11
|
3: "dotted",
|
|
@@ -19,7 +19,7 @@ const $t = {
|
|
|
19
19
|
11: "mediumDashDotDot",
|
|
20
20
|
12: "slantDashDot",
|
|
21
21
|
13: "thick"
|
|
22
|
-
},
|
|
22
|
+
}, $t = (U) => {
|
|
23
23
|
if (typeof U != "string") return "000000";
|
|
24
24
|
const K = U.replace("#", "").toUpperCase();
|
|
25
25
|
return K.length === 3 ? K.replace(/(.)/g, "$1$1") : K.length === 6 ? K : "000000";
|
|
@@ -27,28 +27,28 @@ const $t = {
|
|
|
27
27
|
const s = Number(U);
|
|
28
28
|
if (s)
|
|
29
29
|
return {
|
|
30
|
-
style:
|
|
31
|
-
color: { rgb:
|
|
30
|
+
style: Zt[s] ?? "thin",
|
|
31
|
+
color: { rgb: $t(K) }
|
|
32
32
|
};
|
|
33
|
-
}, _t = (U, K, s,
|
|
34
|
-
if (!c || !
|
|
33
|
+
}, _t = (U, K, s, C, c) => {
|
|
34
|
+
if (!c || !C.l && !C.r && !C.t && !C.b) return;
|
|
35
35
|
const o = dt.encode_cell({ r: K, c: s }), a = {
|
|
36
36
|
...U[o] || { t: "z" }
|
|
37
37
|
}, r = { ...a.s || {} }, l = { ...r.border || {} };
|
|
38
|
-
|
|
39
|
-
},
|
|
38
|
+
C.l && (l.left = c), C.r && (l.right = c), C.t && (l.top = c), C.b && (l.bottom = c), r.border = l, a.s = r, U[o] = a;
|
|
39
|
+
}, Ht = (U, K) => {
|
|
40
40
|
K.forEach((s) => {
|
|
41
41
|
if (s.rangeType === "cell") {
|
|
42
42
|
if (!s.value) return;
|
|
43
|
-
const { row_index:
|
|
44
|
-
if (
|
|
45
|
-
const o = s.value, a = dt.encode_cell({ r:
|
|
43
|
+
const { row_index: C, col_index: c } = s.value;
|
|
44
|
+
if (C == null || c == null) return;
|
|
45
|
+
const o = s.value, a = dt.encode_cell({ r: C, c }), r = {
|
|
46
46
|
...U[a] || { t: "z" }
|
|
47
47
|
}, l = { ...r.s || {} }, h = { ...l.border || {} };
|
|
48
48
|
o.l && (h.left = vt(o.l.style, o.l.color)), o.r && (h.right = vt(o.r.style, o.r.color)), o.t && (h.top = vt(o.t.style, o.t.color)), o.b && (h.bottom = vt(o.b.style, o.b.color)), l.border = h, r.s = l, U[a] = r;
|
|
49
49
|
} else if (s.rangeType === "range") {
|
|
50
|
-
const { borderType:
|
|
51
|
-
if (
|
|
50
|
+
const { borderType: C, style: c, color: o, range: a } = s;
|
|
51
|
+
if (C === "border-none" || !Array.isArray(a) || !c)
|
|
52
52
|
return;
|
|
53
53
|
const r = vt(c, o);
|
|
54
54
|
if (!r) return;
|
|
@@ -56,7 +56,7 @@ const $t = {
|
|
|
56
56
|
const [h, v] = l.row, [b, y] = l.column;
|
|
57
57
|
for (let n = h; n <= v; n++)
|
|
58
58
|
for (let p = b; p <= y; p++)
|
|
59
|
-
switch (
|
|
59
|
+
switch (C) {
|
|
60
60
|
case "border-all":
|
|
61
61
|
_t(
|
|
62
62
|
U,
|
|
@@ -111,39 +111,39 @@ function Et(U) {
|
|
|
111
111
|
if (!U || typeof U != "string") return null;
|
|
112
112
|
const K = U.trim();
|
|
113
113
|
if (K.startsWith("#")) {
|
|
114
|
-
const
|
|
115
|
-
return
|
|
114
|
+
const C = K.replace("#", "").toUpperCase();
|
|
115
|
+
return C.length === 3 ? "FF" + C.split("").map((c) => c + c).join("") : C.length === 6 ? "FF" + C : null;
|
|
116
116
|
}
|
|
117
117
|
const s = K.match(/rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i);
|
|
118
118
|
if (s) {
|
|
119
|
-
const
|
|
120
|
-
return "FF" +
|
|
119
|
+
const C = (c) => Math.min(255, Math.max(0, Math.round(c))).toString(16).padStart(2, "0").toUpperCase();
|
|
120
|
+
return "FF" + C(parseFloat(s[1])) + C(parseFloat(s[2])) + C(parseFloat(s[3]));
|
|
121
121
|
}
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Vt(U) {
|
|
125
125
|
const K = {}, s = {};
|
|
126
126
|
if (U.textColor && U.textColor.toLowerCase() !== "#000000") {
|
|
127
127
|
const c = Et(U.textColor);
|
|
128
128
|
c && (s.color = { argb: c });
|
|
129
129
|
}
|
|
130
130
|
U.bold && (s.bold = !0), U.italic && (s.italic = !0), U.underline && (s.underline = !0), U.strikethrough && (s.strike = !0), Object.keys(s).length > 0 && (K.font = s);
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
133
|
-
const c = Et(
|
|
131
|
+
const C = U.cellColor;
|
|
132
|
+
if (C && C.toLowerCase() !== "#ffffff") {
|
|
133
|
+
const c = Et(C);
|
|
134
134
|
c && (K.fill = { type: "pattern", pattern: "solid", fgColor: { argb: c } });
|
|
135
135
|
}
|
|
136
136
|
return K;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Gt(U) {
|
|
139
139
|
return !Array.isArray(U) || U.length === 0 ? "" : U.map((s) => {
|
|
140
|
-
const [
|
|
140
|
+
const [C, c] = s.row, [o, a] = s.column, r = dt.encode_cell({ r: C, c: o }), l = dt.encode_cell({ r: c, c: a });
|
|
141
141
|
return r === l ? r : `${r}:${l}`;
|
|
142
142
|
}).filter(Boolean).join(" ");
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const { conditionName:
|
|
146
|
-
switch (
|
|
144
|
+
function Yt(U, K, s) {
|
|
145
|
+
const { conditionName: C, conditionValue: c = [], format: o = {} } = U, a = Vt(o), r = (h) => h.replace(/"/g, '""'), l = K.split(/[\s:]/)[0];
|
|
146
|
+
switch (C) {
|
|
147
147
|
case "greaterThan":
|
|
148
148
|
case "greaterThanOrEqual":
|
|
149
149
|
case "lessThan":
|
|
@@ -151,7 +151,7 @@ function Kt(U, K, s) {
|
|
|
151
151
|
case "equal":
|
|
152
152
|
return c[0] ? {
|
|
153
153
|
type: "cellIs",
|
|
154
|
-
operator:
|
|
154
|
+
operator: C,
|
|
155
155
|
formulae: [c[0]],
|
|
156
156
|
priority: s,
|
|
157
157
|
style: a
|
|
@@ -388,15 +388,15 @@ function Kt(U, K, s) {
|
|
|
388
388
|
return null;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Kt(U, K, s) {
|
|
392
392
|
var a;
|
|
393
|
-
const
|
|
394
|
-
if (!Array.isArray(
|
|
393
|
+
const C = K.luckysheet_conditionformat_save, c = [];
|
|
394
|
+
if (!Array.isArray(C) || C.length === 0)
|
|
395
395
|
return { nextPriority: s, pendingDuplicateValues: c };
|
|
396
396
|
let o = s;
|
|
397
|
-
for (const r of
|
|
397
|
+
for (const r of C) {
|
|
398
398
|
if (r.type !== "default") continue;
|
|
399
|
-
const l =
|
|
399
|
+
const l = Gt(r.cellrange);
|
|
400
400
|
if (!l) continue;
|
|
401
401
|
if (r.conditionName === "duplicateValue") {
|
|
402
402
|
const v = String(((a = r.conditionValue) == null ? void 0 : a[0]) ?? "0") === "1" ? "uniqueValues" : "duplicateValues";
|
|
@@ -408,7 +408,7 @@ function qt(U, K, s) {
|
|
|
408
408
|
}), o++;
|
|
409
409
|
continue;
|
|
410
410
|
}
|
|
411
|
-
const h =
|
|
411
|
+
const h = Yt(r, l, o);
|
|
412
412
|
h && (U.addConditionalFormatting({ ref: l, rules: [h] }), o++);
|
|
413
413
|
}
|
|
414
414
|
return { nextPriority: o, pendingDuplicateValues: c };
|
|
@@ -429,27 +429,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
429
429
|
(function(s) {
|
|
430
430
|
U.exports = s();
|
|
431
431
|
})(function() {
|
|
432
|
-
return function s(
|
|
432
|
+
return function s(C, c, o) {
|
|
433
433
|
function a(h, v) {
|
|
434
434
|
if (!c[h]) {
|
|
435
|
-
if (!
|
|
436
|
-
var b = typeof
|
|
435
|
+
if (!C[h]) {
|
|
436
|
+
var b = typeof Ct == "function" && Ct;
|
|
437
437
|
if (!v && b) return b(h, !0);
|
|
438
438
|
if (r) return r(h, !0);
|
|
439
439
|
var y = new Error("Cannot find module '" + h + "'");
|
|
440
440
|
throw y.code = "MODULE_NOT_FOUND", y;
|
|
441
441
|
}
|
|
442
442
|
var n = c[h] = { exports: {} };
|
|
443
|
-
|
|
444
|
-
var i =
|
|
443
|
+
C[h][0].call(n.exports, function(p) {
|
|
444
|
+
var i = C[h][1][p];
|
|
445
445
|
return a(i || p);
|
|
446
|
-
}, n, n.exports, s,
|
|
446
|
+
}, n, n.exports, s, C, c, o);
|
|
447
447
|
}
|
|
448
448
|
return c[h].exports;
|
|
449
449
|
}
|
|
450
|
-
for (var r = typeof
|
|
450
|
+
for (var r = typeof Ct == "function" && Ct, l = 0; l < o.length; l++) a(o[l]);
|
|
451
451
|
return a;
|
|
452
|
-
}({ 1: [function(s,
|
|
452
|
+
}({ 1: [function(s, C, c) {
|
|
453
453
|
var o = s("./utils"), a = s("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
454
454
|
c.encode = function(l) {
|
|
455
455
|
for (var h, v, b, y, n, p, i, d = [], u = 0, _ = l.length, k = _, A = o.getTypeOf(l) !== "string"; u < l.length; ) k = _ - u, b = A ? (h = l[u++], v = u < _ ? l[u++] : 0, u < _ ? l[u++] : 0) : (h = l.charCodeAt(u++), v = u < _ ? l.charCodeAt(u++) : 0, u < _ ? l.charCodeAt(u++) : 0), y = h >> 2, n = (3 & h) << 4 | v >> 4, p = 1 < k ? (15 & v) << 2 | b >> 6 : 64, i = 2 < k ? 63 & b : 64, d.push(r.charAt(y) + r.charAt(n) + r.charAt(p) + r.charAt(i));
|
|
@@ -462,7 +462,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
462
462
|
for (_ = a.uint8array ? new Uint8Array(0 | k) : new Array(0 | k); i < l.length; ) h = r.indexOf(l.charAt(i++)) << 2 | (y = r.indexOf(l.charAt(i++))) >> 4, v = (15 & y) << 4 | (n = r.indexOf(l.charAt(i++))) >> 2, b = (3 & n) << 6 | (p = r.indexOf(l.charAt(i++))), _[d++] = h, n !== 64 && (_[d++] = v), p !== 64 && (_[d++] = b);
|
|
463
463
|
return _;
|
|
464
464
|
};
|
|
465
|
-
}, { "./support": 30, "./utils": 32 }], 2: [function(s,
|
|
465
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(s, C, c) {
|
|
466
466
|
var o = s("./external"), a = s("./stream/DataWorker"), r = s("./stream/Crc32Probe"), l = s("./stream/DataLengthProbe");
|
|
467
467
|
function h(v, b, y, n, p) {
|
|
468
468
|
this.compressedSize = v, this.uncompressedSize = b, this.crc32 = y, this.compression = n, this.compressedContent = p;
|
|
@@ -476,15 +476,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
476
476
|
return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
477
477
|
} }, h.createWorkerFrom = function(v, b, y) {
|
|
478
478
|
return v.pipe(new r()).pipe(new l("uncompressedSize")).pipe(b.compressWorker(y)).pipe(new l("compressedSize")).withStreamInfo("compression", b);
|
|
479
|
-
},
|
|
480
|
-
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(s,
|
|
479
|
+
}, C.exports = h;
|
|
480
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(s, C, c) {
|
|
481
481
|
var o = s("./stream/GenericWorker");
|
|
482
482
|
c.STORE = { magic: "\0\0", compressWorker: function() {
|
|
483
483
|
return new o("STORE compression");
|
|
484
484
|
}, uncompressWorker: function() {
|
|
485
485
|
return new o("STORE decompression");
|
|
486
486
|
} }, c.DEFLATE = s("./flate");
|
|
487
|
-
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(s,
|
|
487
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(s, C, c) {
|
|
488
488
|
var o = s("./utils"), a = function() {
|
|
489
489
|
for (var r, l = [], h = 0; h < 256; h++) {
|
|
490
490
|
r = h;
|
|
@@ -493,7 +493,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
493
493
|
}
|
|
494
494
|
return l;
|
|
495
495
|
}();
|
|
496
|
-
|
|
496
|
+
C.exports = function(r, l) {
|
|
497
497
|
return r !== void 0 && r.length ? o.getTypeOf(r) !== "string" ? function(h, v, b, y) {
|
|
498
498
|
var n = a, p = y + b;
|
|
499
499
|
h ^= -1;
|
|
@@ -506,12 +506,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
506
506
|
return -1 ^ h;
|
|
507
507
|
}(0 | l, r, r.length, 0) : 0;
|
|
508
508
|
};
|
|
509
|
-
}, { "./utils": 32 }], 5: [function(s,
|
|
509
|
+
}, { "./utils": 32 }], 5: [function(s, C, c) {
|
|
510
510
|
c.base64 = !1, c.binary = !1, c.dir = !1, c.createFolders = !0, c.date = null, c.compression = null, c.compressionOptions = null, c.comment = null, c.unixPermissions = null, c.dosPermissions = null;
|
|
511
|
-
}, {}], 6: [function(s,
|
|
511
|
+
}, {}], 6: [function(s, C, c) {
|
|
512
512
|
var o = null;
|
|
513
|
-
o = typeof Promise < "u" ? Promise : s("lie"),
|
|
514
|
-
}, { lie: 37 }], 7: [function(s,
|
|
513
|
+
o = typeof Promise < "u" ? Promise : s("lie"), C.exports = { Promise: o };
|
|
514
|
+
}, { lie: 37 }], 7: [function(s, C, c) {
|
|
515
515
|
var o = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", a = s("pako"), r = s("./utils"), l = s("./stream/GenericWorker"), h = o ? "uint8array" : "array";
|
|
516
516
|
function v(b, y) {
|
|
517
517
|
l.call(this, "FlateWorker/" + b), this._pako = null, this._pakoAction = b, this._pakoOptions = y, this.meta = {};
|
|
@@ -533,14 +533,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
533
533
|
}, c.uncompressWorker = function() {
|
|
534
534
|
return new v("Inflate", {});
|
|
535
535
|
};
|
|
536
|
-
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(s,
|
|
536
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(s, C, c) {
|
|
537
537
|
function o(n, p) {
|
|
538
538
|
var i, d = "";
|
|
539
539
|
for (i = 0; i < p; i++) d += String.fromCharCode(255 & n), n >>>= 8;
|
|
540
540
|
return d;
|
|
541
541
|
}
|
|
542
542
|
function a(n, p, i, d, u, _) {
|
|
543
|
-
var k, A,
|
|
543
|
+
var k, A, S = n.file, P = n.compression, B = _ !== h.utf8encode, Z = r.transformTo("string", _(S.name)), z = r.transformTo("string", h.utf8encode(S.name)), V = S.comment, X = r.transformTo("string", _(V)), g = r.transformTo("string", h.utf8encode(V)), O = z.length !== S.name.length, e = g.length !== V.length, F = "", J = "", W = "", et = S.dir, M = S.date, H = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
544
544
|
p && !i || (H.crc32 = n.crc32, H.compressedSize = n.compressedSize, H.uncompressedSize = n.uncompressedSize);
|
|
545
545
|
var E = 0;
|
|
546
546
|
p && (E |= 8), B || !O && !e || (E |= 2048);
|
|
@@ -548,9 +548,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
548
548
|
et && (w |= 16), u === "UNIX" ? (N = 798, w |= function(R, it) {
|
|
549
549
|
var nt = R;
|
|
550
550
|
return R || (nt = it ? 16893 : 33204), (65535 & nt) << 16;
|
|
551
|
-
}(
|
|
551
|
+
}(S.unixPermissions, et)) : (N = 20, w |= function(R) {
|
|
552
552
|
return 63 & (R || 0);
|
|
553
|
-
}(
|
|
553
|
+
}(S.dosPermissions)), k = M.getUTCHours(), k <<= 6, k |= M.getUTCMinutes(), k <<= 5, k |= M.getUTCSeconds() / 2, A = M.getUTCFullYear() - 1980, A <<= 4, A |= M.getUTCMonth() + 1, A <<= 5, A |= M.getUTCDate(), O && (J = o(1, 1) + o(v(Z), 4) + z, F += "up" + o(J.length, 2) + J), e && (W = o(1, 1) + o(v(X), 4) + g, F += "uc" + o(W.length, 2) + W);
|
|
554
554
|
var $ = "";
|
|
555
555
|
return $ += `
|
|
556
556
|
\0`, $ += o(E, 2), $ += P.magic, $ += o(k, 2), $ += o(A, 2), $ += o(H.crc32, 4), $ += o(H.compressedSize, 4), $ += o(H.uncompressedSize, 4), $ += o(Z.length, 2), $ += o(F.length, 2), { fileRecord: b.LOCAL_FILE_HEADER + $ + Z + F, dirRecord: b.CENTRAL_FILE_HEADER + o(N, 2) + $ + o(X.length, 2) + "\0\0\0\0" + o(w, 4) + o(d, 4) + Z + F + X };
|
|
@@ -579,8 +579,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
579
579
|
this.currentFile = null;
|
|
580
580
|
}, y.prototype.flush = function() {
|
|
581
581
|
for (var n = this.bytesWritten, p = 0; p < this.dirRecords.length; p++) this.push({ data: this.dirRecords[p], meta: { percent: 100 } });
|
|
582
|
-
var i = this.bytesWritten - n, d = function(u, _, k, A,
|
|
583
|
-
var P = r.transformTo("string",
|
|
582
|
+
var i = this.bytesWritten - n, d = function(u, _, k, A, S) {
|
|
583
|
+
var P = r.transformTo("string", S(A));
|
|
584
584
|
return b.CENTRAL_DIRECTORY_END + "\0\0\0\0" + o(u, 2) + o(u, 2) + o(_, 4) + o(k, 4) + o(P.length, 2) + P;
|
|
585
585
|
}(this.dirRecords.length, i, n, this.zipComment, this.encodeFileName);
|
|
586
586
|
this.push({ data: d, meta: { percent: 100 } });
|
|
@@ -609,8 +609,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
609
609
|
}, y.prototype.lock = function() {
|
|
610
610
|
l.prototype.lock.call(this);
|
|
611
611
|
for (var n = this._sources, p = 0; p < n.length; p++) n[p].lock();
|
|
612
|
-
},
|
|
613
|
-
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(s,
|
|
612
|
+
}, C.exports = y;
|
|
613
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(s, C, c) {
|
|
614
614
|
var o = s("../compressions"), a = s("./ZipFileWorker");
|
|
615
615
|
c.generateWorker = function(r, l, h) {
|
|
616
616
|
var v = new a(l.streamFiles, h, l.platform, l.encodeFileName), b = 0;
|
|
@@ -618,9 +618,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
618
618
|
r.forEach(function(y, n) {
|
|
619
619
|
b++;
|
|
620
620
|
var p = function(_, k) {
|
|
621
|
-
var A = _ || k,
|
|
622
|
-
if (!
|
|
623
|
-
return
|
|
621
|
+
var A = _ || k, S = o[A];
|
|
622
|
+
if (!S) throw new Error(A + " is not a valid compression method !");
|
|
623
|
+
return S;
|
|
624
624
|
}(n.options.compression, l.compression), i = n.options.compressionOptions || l.compressionOptions || {}, d = n.dir, u = n.date;
|
|
625
625
|
n._compressWorker(p, i).withStreamInfo("file", { name: y, dir: d, date: u, comment: n.comment || "", unixPermissions: n.unixPermissions, dosPermissions: n.dosPermissions }).pipe(v);
|
|
626
626
|
}), v.entriesCount = b;
|
|
@@ -629,7 +629,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
629
629
|
}
|
|
630
630
|
return v;
|
|
631
631
|
};
|
|
632
|
-
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(s,
|
|
632
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(s, C, c) {
|
|
633
633
|
function o() {
|
|
634
634
|
if (!(this instanceof o)) return new o();
|
|
635
635
|
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -641,8 +641,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
641
641
|
}
|
|
642
642
|
(o.prototype = s("./object")).loadAsync = s("./load"), o.support = s("./support"), o.defaults = s("./defaults"), o.version = "3.10.1", o.loadAsync = function(a, r) {
|
|
643
643
|
return new o().loadAsync(a, r);
|
|
644
|
-
}, o.external = s("./external"),
|
|
645
|
-
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(s,
|
|
644
|
+
}, o.external = s("./external"), C.exports = o;
|
|
645
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(s, C, c) {
|
|
646
646
|
var o = s("./utils"), a = s("./external"), r = s("./utf8"), l = s("./zipEntries"), h = s("./stream/Crc32Probe"), v = s("./nodejsUtils");
|
|
647
647
|
function b(y) {
|
|
648
648
|
return new a.Promise(function(n, p) {
|
|
@@ -654,7 +654,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
654
654
|
}).resume();
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
|
|
657
|
+
C.exports = function(y, n) {
|
|
658
658
|
var p = this;
|
|
659
659
|
return n = o.extend(n || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), v.isNode && v.isStream(y) ? a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : o.prepareContent("the loaded zip file", y, !0, n.optimizedBinaryString, n.base64).then(function(i) {
|
|
660
660
|
var d = new l(n);
|
|
@@ -665,13 +665,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
665
665
|
return a.Promise.all(d);
|
|
666
666
|
}).then(function(i) {
|
|
667
667
|
for (var d = i.shift(), u = d.files, _ = 0; _ < u.length; _++) {
|
|
668
|
-
var k = u[_], A = k.fileNameStr,
|
|
669
|
-
p.file(
|
|
668
|
+
var k = u[_], A = k.fileNameStr, S = o.resolve(k.fileNameStr);
|
|
669
|
+
p.file(S, k.decompressed, { binary: !0, optimizedBinaryString: !0, date: k.date, dir: k.dir, comment: k.fileCommentStr.length ? k.fileCommentStr : null, unixPermissions: k.unixPermissions, dosPermissions: k.dosPermissions, createFolders: n.createFolders }), k.dir || (p.file(S).unsafeOriginalName = A);
|
|
670
670
|
}
|
|
671
671
|
return d.zipComment.length && (p.comment = d.zipComment), p;
|
|
672
672
|
});
|
|
673
673
|
};
|
|
674
|
-
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(s,
|
|
674
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(s, C, c) {
|
|
675
675
|
var o = s("../utils"), a = s("../stream/GenericWorker");
|
|
676
676
|
function r(l, h) {
|
|
677
677
|
a.call(this, "Nodejs stream input adapter for " + l), this._upstreamEnded = !1, this._bindStream(h);
|
|
@@ -689,8 +689,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
689
689
|
return !!a.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
690
690
|
}, r.prototype.resume = function() {
|
|
691
691
|
return !!a.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
692
|
-
},
|
|
693
|
-
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(s,
|
|
692
|
+
}, C.exports = r;
|
|
693
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(s, C, c) {
|
|
694
694
|
var o = s("readable-stream").Readable;
|
|
695
695
|
function a(r, l, h) {
|
|
696
696
|
o.call(this, l), this._helper = r;
|
|
@@ -705,9 +705,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
705
705
|
}
|
|
706
706
|
s("../utils").inherits(a, o), a.prototype._read = function() {
|
|
707
707
|
this._helper.resume();
|
|
708
|
-
},
|
|
709
|
-
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(s,
|
|
710
|
-
|
|
708
|
+
}, C.exports = a;
|
|
709
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(s, C, c) {
|
|
710
|
+
C.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(o, a) {
|
|
711
711
|
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(o, a);
|
|
712
712
|
if (typeof o == "number") throw new Error('The "data" argument must not be a number');
|
|
713
713
|
return new Buffer(o, a);
|
|
@@ -720,70 +720,70 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
720
720
|
}, isStream: function(o) {
|
|
721
721
|
return o && typeof o.on == "function" && typeof o.pause == "function" && typeof o.resume == "function";
|
|
722
722
|
} };
|
|
723
|
-
}, {}], 15: [function(s,
|
|
724
|
-
function o(
|
|
723
|
+
}, {}], 15: [function(s, C, c) {
|
|
724
|
+
function o(S, P, B) {
|
|
725
725
|
var Z, z = r.getTypeOf(P), V = r.extend(B || {}, v);
|
|
726
|
-
V.date = V.date || /* @__PURE__ */ new Date(), V.compression !== null && (V.compression = V.compression.toUpperCase()), typeof V.unixPermissions == "string" && (V.unixPermissions = parseInt(V.unixPermissions, 8)), V.unixPermissions && 16384 & V.unixPermissions && (V.dir = !0), V.dosPermissions && 16 & V.dosPermissions && (V.dir = !0), V.dir && (
|
|
726
|
+
V.date = V.date || /* @__PURE__ */ new Date(), V.compression !== null && (V.compression = V.compression.toUpperCase()), typeof V.unixPermissions == "string" && (V.unixPermissions = parseInt(V.unixPermissions, 8)), V.unixPermissions && 16384 & V.unixPermissions && (V.dir = !0), V.dosPermissions && 16 & V.dosPermissions && (V.dir = !0), V.dir && (S = u(S)), V.createFolders && (Z = d(S)) && _.call(this, Z, !0);
|
|
727
727
|
var X = z === "string" && V.binary === !1 && V.base64 === !1;
|
|
728
728
|
B && B.binary !== void 0 || (V.binary = !X), (P instanceof b && P.uncompressedSize === 0 || V.dir || !P || P.length === 0) && (V.base64 = !1, V.binary = !0, P = "", V.compression = "STORE", z = "string");
|
|
729
729
|
var g = null;
|
|
730
|
-
g = P instanceof b || P instanceof l ? P : p.isNode && p.isStream(P) ? new i(
|
|
731
|
-
var O = new y(
|
|
732
|
-
this.files[
|
|
733
|
-
}
|
|
734
|
-
var a = s("./utf8"), r = s("./utils"), l = s("./stream/GenericWorker"), h = s("./stream/StreamHelper"), v = s("./defaults"), b = s("./compressedObject"), y = s("./zipObject"), n = s("./generate"), p = s("./nodejsUtils"), i = s("./nodejs/NodejsStreamInputAdapter"), d = function(
|
|
735
|
-
|
|
736
|
-
var P =
|
|
737
|
-
return 0 < P ?
|
|
738
|
-
}, u = function(
|
|
739
|
-
return
|
|
740
|
-
}, _ = function(
|
|
741
|
-
return P = P !== void 0 ? P : v.createFolders,
|
|
730
|
+
g = P instanceof b || P instanceof l ? P : p.isNode && p.isStream(P) ? new i(S, P) : r.prepareContent(S, P, V.binary, V.optimizedBinaryString, V.base64);
|
|
731
|
+
var O = new y(S, g, V);
|
|
732
|
+
this.files[S] = O;
|
|
733
|
+
}
|
|
734
|
+
var a = s("./utf8"), r = s("./utils"), l = s("./stream/GenericWorker"), h = s("./stream/StreamHelper"), v = s("./defaults"), b = s("./compressedObject"), y = s("./zipObject"), n = s("./generate"), p = s("./nodejsUtils"), i = s("./nodejs/NodejsStreamInputAdapter"), d = function(S) {
|
|
735
|
+
S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
|
|
736
|
+
var P = S.lastIndexOf("/");
|
|
737
|
+
return 0 < P ? S.substring(0, P) : "";
|
|
738
|
+
}, u = function(S) {
|
|
739
|
+
return S.slice(-1) !== "/" && (S += "/"), S;
|
|
740
|
+
}, _ = function(S, P) {
|
|
741
|
+
return P = P !== void 0 ? P : v.createFolders, S = u(S), this.files[S] || o.call(this, S, null, { dir: !0, createFolders: P }), this.files[S];
|
|
742
742
|
};
|
|
743
|
-
function k(
|
|
744
|
-
return Object.prototype.toString.call(
|
|
743
|
+
function k(S) {
|
|
744
|
+
return Object.prototype.toString.call(S) === "[object RegExp]";
|
|
745
745
|
}
|
|
746
746
|
var A = { load: function() {
|
|
747
747
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
748
|
-
}, forEach: function(
|
|
748
|
+
}, forEach: function(S) {
|
|
749
749
|
var P, B, Z;
|
|
750
|
-
for (P in this.files) Z = this.files[P], (B = P.slice(this.root.length, P.length)) && P.slice(0, this.root.length) === this.root &&
|
|
751
|
-
}, filter: function(
|
|
750
|
+
for (P in this.files) Z = this.files[P], (B = P.slice(this.root.length, P.length)) && P.slice(0, this.root.length) === this.root && S(B, Z);
|
|
751
|
+
}, filter: function(S) {
|
|
752
752
|
var P = [];
|
|
753
753
|
return this.forEach(function(B, Z) {
|
|
754
|
-
|
|
754
|
+
S(B, Z) && P.push(Z);
|
|
755
755
|
}), P;
|
|
756
|
-
}, file: function(
|
|
757
|
-
if (arguments.length !== 1) return
|
|
758
|
-
if (k(
|
|
759
|
-
var Z =
|
|
756
|
+
}, file: function(S, P, B) {
|
|
757
|
+
if (arguments.length !== 1) return S = this.root + S, o.call(this, S, P, B), this;
|
|
758
|
+
if (k(S)) {
|
|
759
|
+
var Z = S;
|
|
760
760
|
return this.filter(function(V, X) {
|
|
761
761
|
return !X.dir && Z.test(V);
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
var z = this.files[this.root +
|
|
764
|
+
var z = this.files[this.root + S];
|
|
765
765
|
return z && !z.dir ? z : null;
|
|
766
|
-
}, folder: function(
|
|
767
|
-
if (!
|
|
768
|
-
if (k(
|
|
769
|
-
return V.dir &&
|
|
766
|
+
}, folder: function(S) {
|
|
767
|
+
if (!S) return this;
|
|
768
|
+
if (k(S)) return this.filter(function(z, V) {
|
|
769
|
+
return V.dir && S.test(z);
|
|
770
770
|
});
|
|
771
|
-
var P = this.root +
|
|
771
|
+
var P = this.root + S, B = _.call(this, P), Z = this.clone();
|
|
772
772
|
return Z.root = B.name, Z;
|
|
773
|
-
}, remove: function(
|
|
774
|
-
|
|
775
|
-
var P = this.files[
|
|
776
|
-
if (P || (
|
|
773
|
+
}, remove: function(S) {
|
|
774
|
+
S = this.root + S;
|
|
775
|
+
var P = this.files[S];
|
|
776
|
+
if (P || (S.slice(-1) !== "/" && (S += "/"), P = this.files[S]), P && !P.dir) delete this.files[S];
|
|
777
777
|
else for (var B = this.filter(function(z, V) {
|
|
778
|
-
return V.name.slice(0,
|
|
778
|
+
return V.name.slice(0, S.length) === S;
|
|
779
779
|
}), Z = 0; Z < B.length; Z++) delete this.files[B[Z].name];
|
|
780
780
|
return this;
|
|
781
781
|
}, generate: function() {
|
|
782
782
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
783
|
-
}, generateInternalStream: function(
|
|
783
|
+
}, generateInternalStream: function(S) {
|
|
784
784
|
var P, B = {};
|
|
785
785
|
try {
|
|
786
|
-
if ((B = r.extend(
|
|
786
|
+
if ((B = r.extend(S || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: a.utf8encode })).type = B.type.toLowerCase(), B.compression = B.compression.toUpperCase(), B.type === "binarystring" && (B.type = "string"), !B.type) throw new Error("No output type specified.");
|
|
787
787
|
r.checkSupport(B.type), B.platform !== "darwin" && B.platform !== "freebsd" && B.platform !== "linux" && B.platform !== "sunos" || (B.platform = "UNIX"), B.platform === "win32" && (B.platform = "DOS");
|
|
788
788
|
var Z = B.comment || this.comment || "";
|
|
789
789
|
P = n.generateWorker(this, B, Z);
|
|
@@ -791,15 +791,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
791
791
|
(P = new l("error")).error(z);
|
|
792
792
|
}
|
|
793
793
|
return new h(P, B.type || "string", B.mimeType);
|
|
794
|
-
}, generateAsync: function(
|
|
795
|
-
return this.generateInternalStream(
|
|
796
|
-
}, generateNodeStream: function(
|
|
797
|
-
return (
|
|
794
|
+
}, generateAsync: function(S, P) {
|
|
795
|
+
return this.generateInternalStream(S).accumulate(P);
|
|
796
|
+
}, generateNodeStream: function(S, P) {
|
|
797
|
+
return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(P);
|
|
798
798
|
} };
|
|
799
|
-
|
|
800
|
-
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(s,
|
|
801
|
-
|
|
802
|
-
}, { stream: void 0 }], 17: [function(s,
|
|
799
|
+
C.exports = A;
|
|
800
|
+
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(s, C, c) {
|
|
801
|
+
C.exports = s("stream");
|
|
802
|
+
}, { stream: void 0 }], 17: [function(s, C, c) {
|
|
803
803
|
var o = s("./DataReader");
|
|
804
804
|
function a(r) {
|
|
805
805
|
o.call(this, r);
|
|
@@ -817,8 +817,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
817
817
|
if (this.checkOffset(r), r === 0) return [];
|
|
818
818
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
819
819
|
return this.index += r, l;
|
|
820
|
-
},
|
|
821
|
-
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(s,
|
|
820
|
+
}, C.exports = a;
|
|
821
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(s, C, c) {
|
|
822
822
|
var o = s("../utils");
|
|
823
823
|
function a(r) {
|
|
824
824
|
this.data = r, this.length = r.length, this.index = 0, this.zero = 0;
|
|
@@ -844,8 +844,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
844
844
|
}, readDate: function() {
|
|
845
845
|
var r = this.readInt(4);
|
|
846
846
|
return new Date(Date.UTC(1980 + (r >> 25 & 127), (r >> 21 & 15) - 1, r >> 16 & 31, r >> 11 & 31, r >> 5 & 63, (31 & r) << 1));
|
|
847
|
-
} },
|
|
848
|
-
}, { "../utils": 32 }], 19: [function(s,
|
|
847
|
+
} }, C.exports = a;
|
|
848
|
+
}, { "../utils": 32 }], 19: [function(s, C, c) {
|
|
849
849
|
var o = s("./Uint8ArrayReader");
|
|
850
850
|
function a(r) {
|
|
851
851
|
o.call(this, r);
|
|
@@ -854,8 +854,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
854
854
|
this.checkOffset(r);
|
|
855
855
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
856
856
|
return this.index += r, l;
|
|
857
|
-
},
|
|
858
|
-
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(s,
|
|
857
|
+
}, C.exports = a;
|
|
858
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(s, C, c) {
|
|
859
859
|
var o = s("./DataReader");
|
|
860
860
|
function a(r) {
|
|
861
861
|
o.call(this, r);
|
|
@@ -870,8 +870,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
870
870
|
this.checkOffset(r);
|
|
871
871
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
872
872
|
return this.index += r, l;
|
|
873
|
-
},
|
|
874
|
-
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(s,
|
|
873
|
+
}, C.exports = a;
|
|
874
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(s, C, c) {
|
|
875
875
|
var o = s("./ArrayReader");
|
|
876
876
|
function a(r) {
|
|
877
877
|
o.call(this, r);
|
|
@@ -880,32 +880,32 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
880
880
|
if (this.checkOffset(r), r === 0) return new Uint8Array(0);
|
|
881
881
|
var l = this.data.subarray(this.zero + this.index, this.zero + this.index + r);
|
|
882
882
|
return this.index += r, l;
|
|
883
|
-
},
|
|
884
|
-
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(s,
|
|
883
|
+
}, C.exports = a;
|
|
884
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(s, C, c) {
|
|
885
885
|
var o = s("../utils"), a = s("../support"), r = s("./ArrayReader"), l = s("./StringReader"), h = s("./NodeBufferReader"), v = s("./Uint8ArrayReader");
|
|
886
|
-
|
|
886
|
+
C.exports = function(b) {
|
|
887
887
|
var y = o.getTypeOf(b);
|
|
888
888
|
return o.checkSupport(y), y !== "string" || a.uint8array ? y === "nodebuffer" ? new h(b) : a.uint8array ? new v(o.transformTo("uint8array", b)) : new r(o.transformTo("array", b)) : new l(b);
|
|
889
889
|
};
|
|
890
|
-
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(s,
|
|
890
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(s, C, c) {
|
|
891
891
|
c.LOCAL_FILE_HEADER = "PK", c.CENTRAL_FILE_HEADER = "PK", c.CENTRAL_DIRECTORY_END = "PK", c.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", c.ZIP64_CENTRAL_DIRECTORY_END = "PK", c.DATA_DESCRIPTOR = "PK\x07\b";
|
|
892
|
-
}, {}], 24: [function(s,
|
|
892
|
+
}, {}], 24: [function(s, C, c) {
|
|
893
893
|
var o = s("./GenericWorker"), a = s("../utils");
|
|
894
894
|
function r(l) {
|
|
895
895
|
o.call(this, "ConvertWorker to " + l), this.destType = l;
|
|
896
896
|
}
|
|
897
897
|
a.inherits(r, o), r.prototype.processChunk = function(l) {
|
|
898
898
|
this.push({ data: a.transformTo(this.destType, l.data), meta: l.meta });
|
|
899
|
-
},
|
|
900
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(s,
|
|
899
|
+
}, C.exports = r;
|
|
900
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(s, C, c) {
|
|
901
901
|
var o = s("./GenericWorker"), a = s("../crc32");
|
|
902
902
|
function r() {
|
|
903
903
|
o.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
904
904
|
}
|
|
905
905
|
s("../utils").inherits(r, o), r.prototype.processChunk = function(l) {
|
|
906
906
|
this.streamInfo.crc32 = a(l.data, this.streamInfo.crc32 || 0), this.push(l);
|
|
907
|
-
},
|
|
908
|
-
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(s,
|
|
907
|
+
}, C.exports = r;
|
|
908
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(s, C, c) {
|
|
909
909
|
var o = s("../utils"), a = s("./GenericWorker");
|
|
910
910
|
function r(l) {
|
|
911
911
|
a.call(this, "DataLengthProbe for " + l), this.propName = l, this.withStreamInfo(l, 0);
|
|
@@ -916,8 +916,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
916
916
|
this.streamInfo[this.propName] = h + l.data.length;
|
|
917
917
|
}
|
|
918
918
|
a.prototype.processChunk.call(this, l);
|
|
919
|
-
},
|
|
920
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(s,
|
|
919
|
+
}, C.exports = r;
|
|
920
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(s, C, c) {
|
|
921
921
|
var o = s("../utils"), a = s("./GenericWorker");
|
|
922
922
|
function r(l) {
|
|
923
923
|
a.call(this, "DataWorker");
|
|
@@ -950,8 +950,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
950
950
|
l = this.data.slice(this.index, h);
|
|
951
951
|
}
|
|
952
952
|
return this.index = h, this.push({ data: l, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
953
|
-
},
|
|
954
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(s,
|
|
953
|
+
}, C.exports = r;
|
|
954
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(s, C, c) {
|
|
955
955
|
function o(a) {
|
|
956
956
|
this.name = a || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
957
957
|
}
|
|
@@ -1006,8 +1006,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1006
1006
|
}, toString: function() {
|
|
1007
1007
|
var a = "Worker " + this.name;
|
|
1008
1008
|
return this.previous ? this.previous + " -> " + a : a;
|
|
1009
|
-
} },
|
|
1010
|
-
}, {}], 29: [function(s,
|
|
1009
|
+
} }, C.exports = o;
|
|
1010
|
+
}, {}], 29: [function(s, C, c) {
|
|
1011
1011
|
var o = s("../utils"), a = s("./ConvertWorker"), r = s("./GenericWorker"), l = s("../base64"), h = s("../support"), v = s("../external"), b = null;
|
|
1012
1012
|
if (h.nodestream) try {
|
|
1013
1013
|
b = s("../nodejs/NodejsStreamOutputAdapter");
|
|
@@ -1015,7 +1015,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1015
1015
|
}
|
|
1016
1016
|
function y(p, i) {
|
|
1017
1017
|
return new v.Promise(function(d, u) {
|
|
1018
|
-
var _ = [], k = p._internalType, A = p._outputType,
|
|
1018
|
+
var _ = [], k = p._internalType, A = p._outputType, S = p._mimeType;
|
|
1019
1019
|
p.on("data", function(P, B) {
|
|
1020
1020
|
_.push(P), i && i(B);
|
|
1021
1021
|
}).on("error", function(P) {
|
|
@@ -1047,7 +1047,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1047
1047
|
default:
|
|
1048
1048
|
throw new Error("concat : unsupported type '" + B + "'");
|
|
1049
1049
|
}
|
|
1050
|
-
}(k, _),
|
|
1050
|
+
}(k, _), S);
|
|
1051
1051
|
d(P);
|
|
1052
1052
|
} catch (B) {
|
|
1053
1053
|
u(B);
|
|
@@ -1088,8 +1088,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1088
1088
|
}, toNodejsStream: function(p) {
|
|
1089
1089
|
if (o.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
1090
1090
|
return new b(this, { objectMode: this._outputType !== "nodebuffer" }, p);
|
|
1091
|
-
} },
|
|
1092
|
-
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(s,
|
|
1091
|
+
} }, C.exports = n;
|
|
1092
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(s, C, c) {
|
|
1093
1093
|
if (c.base64 = !0, c.array = !0, c.string = !0, c.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", c.nodebuffer = typeof Buffer < "u", c.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") c.blob = !1;
|
|
1094
1094
|
else {
|
|
1095
1095
|
var o = new ArrayBuffer(0);
|
|
@@ -1109,7 +1109,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1109
1109
|
} catch {
|
|
1110
1110
|
c.nodestream = !1;
|
|
1111
1111
|
}
|
|
1112
|
-
}, { "readable-stream": 16 }], 31: [function(s,
|
|
1112
|
+
}, { "readable-stream": 16 }], 31: [function(s, C, c) {
|
|
1113
1113
|
for (var o = s("./utils"), a = s("./support"), r = s("./nodejsUtils"), l = s("./stream/GenericWorker"), h = new Array(256), v = 0; v < 256; v++) h[v] = 252 <= v ? 6 : 248 <= v ? 5 : 240 <= v ? 4 : 224 <= v ? 3 : 192 <= v ? 2 : 1;
|
|
1114
1114
|
h[254] = h[254] = 1;
|
|
1115
1115
|
function b() {
|
|
@@ -1120,9 +1120,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1120
1120
|
}
|
|
1121
1121
|
c.utf8encode = function(n) {
|
|
1122
1122
|
return a.nodebuffer ? r.newBufferFrom(n, "utf-8") : function(p) {
|
|
1123
|
-
var i, d, u, _, k, A = p.length,
|
|
1124
|
-
for (_ = 0; _ < A; _++) (64512 & (d = p.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (u = p.charCodeAt(_ + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (u - 56320), _++),
|
|
1125
|
-
for (i = a.uint8array ? new Uint8Array(
|
|
1123
|
+
var i, d, u, _, k, A = p.length, S = 0;
|
|
1124
|
+
for (_ = 0; _ < A; _++) (64512 & (d = p.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (u = p.charCodeAt(_ + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (u - 56320), _++), S += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
1125
|
+
for (i = a.uint8array ? new Uint8Array(S) : new Array(S), _ = k = 0; k < S; _++) (64512 & (d = p.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (u = p.charCodeAt(_ + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (u - 56320), _++), d < 128 ? i[k++] = d : (d < 2048 ? i[k++] = 192 | d >>> 6 : (d < 65536 ? i[k++] = 224 | d >>> 12 : (i[k++] = 240 | d >>> 18, i[k++] = 128 | d >>> 12 & 63), i[k++] = 128 | d >>> 6 & 63), i[k++] = 128 | 63 & d);
|
|
1126
1126
|
return i;
|
|
1127
1127
|
}(n);
|
|
1128
1128
|
}, c.utf8decode = function(n) {
|
|
@@ -1156,7 +1156,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1156
1156
|
}, c.Utf8DecodeWorker = b, o.inherits(y, l), y.prototype.processChunk = function(n) {
|
|
1157
1157
|
this.push({ data: c.utf8encode(n.data), meta: n.meta });
|
|
1158
1158
|
}, c.Utf8EncodeWorker = y;
|
|
1159
|
-
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(s,
|
|
1159
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(s, C, c) {
|
|
1160
1160
|
var o = s("./support"), a = s("./base64"), r = s("./nodejsUtils"), l = s("./external");
|
|
1161
1161
|
function h(i) {
|
|
1162
1162
|
return i;
|
|
@@ -1281,22 +1281,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1281
1281
|
return u;
|
|
1282
1282
|
}, c.prepareContent = function(i, d, u, _, k) {
|
|
1283
1283
|
return l.Promise.resolve(d).then(function(A) {
|
|
1284
|
-
return o.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(
|
|
1284
|
+
return o.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S, P) {
|
|
1285
1285
|
var B = new FileReader();
|
|
1286
1286
|
B.onload = function(Z) {
|
|
1287
|
-
|
|
1287
|
+
S(Z.target.result);
|
|
1288
1288
|
}, B.onerror = function(Z) {
|
|
1289
1289
|
P(Z.target.error);
|
|
1290
1290
|
}, B.readAsArrayBuffer(A);
|
|
1291
1291
|
}) : A;
|
|
1292
1292
|
}).then(function(A) {
|
|
1293
|
-
var
|
|
1294
|
-
return
|
|
1293
|
+
var S = c.getTypeOf(A);
|
|
1294
|
+
return S ? (S === "arraybuffer" ? A = c.transformTo("uint8array", A) : S === "string" && (k ? A = a.decode(A) : u && _ !== !0 && (A = function(P) {
|
|
1295
1295
|
return v(P, o.uint8array ? new Uint8Array(P.length) : new Array(P.length));
|
|
1296
1296
|
}(A))), A) : l.Promise.reject(new Error("Can't read the data of '" + i + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
1297
1297
|
});
|
|
1298
1298
|
};
|
|
1299
|
-
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(s,
|
|
1299
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(s, C, c) {
|
|
1300
1300
|
var o = s("./reader/readerFor"), a = s("./utils"), r = s("./signature"), l = s("./zipEntry"), h = s("./support");
|
|
1301
1301
|
function v(b) {
|
|
1302
1302
|
this.files = [], this.loadOptions = b;
|
|
@@ -1347,8 +1347,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1347
1347
|
this.reader = o(b);
|
|
1348
1348
|
}, load: function(b) {
|
|
1349
1349
|
this.prepareReader(b), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
1350
|
-
} },
|
|
1351
|
-
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(s,
|
|
1350
|
+
} }, C.exports = v;
|
|
1351
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(s, C, c) {
|
|
1352
1352
|
var o = s("./reader/readerFor"), a = s("./utils"), r = s("./compressedObject"), l = s("./crc32"), h = s("./utf8"), v = s("./compressions"), b = s("./support");
|
|
1353
1353
|
function y(n, p) {
|
|
1354
1354
|
this.options = n, this.loadOptions = p;
|
|
@@ -1414,8 +1414,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1414
1414
|
return p.readInt(1) !== 1 || l(this.fileComment) !== p.readInt(4) ? null : h.utf8decode(p.readData(n.length - 5));
|
|
1415
1415
|
}
|
|
1416
1416
|
return null;
|
|
1417
|
-
} },
|
|
1418
|
-
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(s,
|
|
1417
|
+
} }, C.exports = y;
|
|
1418
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(s, C, c) {
|
|
1419
1419
|
function o(p, i, d) {
|
|
1420
1420
|
this.name = p, this.dir = d.dir, this.date = d.date, this.comment = d.comment, this.unixPermissions = d.unixPermissions, this.dosPermissions = d.dosPermissions, this._data = i, this._dataBinary = d.binary, this.options = { compression: d.compression, compressionOptions: d.compressionOptions };
|
|
1421
1421
|
}
|
|
@@ -1446,8 +1446,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1446
1446
|
for (var b = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], y = function() {
|
|
1447
1447
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1448
1448
|
}, n = 0; n < b.length; n++) o.prototype[b[n]] = y;
|
|
1449
|
-
|
|
1450
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(s,
|
|
1449
|
+
C.exports = o;
|
|
1450
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(s, C, c) {
|
|
1451
1451
|
(function(o) {
|
|
1452
1452
|
var a, r, l = o.MutationObserver || o.WebKitMutationObserver;
|
|
1453
1453
|
if (l) {
|
|
@@ -1479,11 +1479,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1479
1479
|
}
|
|
1480
1480
|
r = !1;
|
|
1481
1481
|
}
|
|
1482
|
-
|
|
1482
|
+
C.exports = function(i) {
|
|
1483
1483
|
n.push(i) !== 1 || r || a();
|
|
1484
1484
|
};
|
|
1485
1485
|
}).call(this, typeof xt < "u" ? xt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1486
|
-
}, {}], 37: [function(s,
|
|
1486
|
+
}, {}], 37: [function(s, C, c) {
|
|
1487
1487
|
var o = s("immediate");
|
|
1488
1488
|
function a() {
|
|
1489
1489
|
}
|
|
@@ -1500,8 +1500,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1500
1500
|
var A;
|
|
1501
1501
|
try {
|
|
1502
1502
|
A = _(k);
|
|
1503
|
-
} catch (
|
|
1504
|
-
return r.reject(u,
|
|
1503
|
+
} catch (S) {
|
|
1504
|
+
return r.reject(u, S);
|
|
1505
1505
|
}
|
|
1506
1506
|
A === u ? r.reject(u, new TypeError("Cannot resolve promise with itself")) : r.resolve(u, A);
|
|
1507
1507
|
});
|
|
@@ -1517,11 +1517,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1517
1517
|
function A(B) {
|
|
1518
1518
|
k || (k = !0, r.reject(u, B));
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function S(B) {
|
|
1521
1521
|
k || (k = !0, r.resolve(u, B));
|
|
1522
1522
|
}
|
|
1523
1523
|
var P = d(function() {
|
|
1524
|
-
_(
|
|
1524
|
+
_(S, A);
|
|
1525
1525
|
});
|
|
1526
1526
|
P.status === "error" && A(P.value);
|
|
1527
1527
|
}
|
|
@@ -1534,7 +1534,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1534
1534
|
}
|
|
1535
1535
|
return k;
|
|
1536
1536
|
}
|
|
1537
|
-
(
|
|
1537
|
+
(C.exports = b).prototype.finally = function(u) {
|
|
1538
1538
|
if (typeof u != "function") return this;
|
|
1539
1539
|
var _ = this.constructor;
|
|
1540
1540
|
return this.then(function(k) {
|
|
@@ -1567,7 +1567,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1567
1567
|
if (A) i(u, A);
|
|
1568
1568
|
else {
|
|
1569
1569
|
u.state = h, u.outcome = _;
|
|
1570
|
-
for (var
|
|
1570
|
+
for (var S = -1, P = u.queue.length; ++S < P; ) u.queue[S].callFulfilled(_);
|
|
1571
1571
|
}
|
|
1572
1572
|
return u;
|
|
1573
1573
|
}, r.reject = function(u, _) {
|
|
@@ -1584,11 +1584,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1584
1584
|
if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1585
1585
|
var k = u.length, A = !1;
|
|
1586
1586
|
if (!k) return this.resolve([]);
|
|
1587
|
-
for (var
|
|
1587
|
+
for (var S = new Array(k), P = 0, B = -1, Z = new this(a); ++B < k; ) z(u[B], B);
|
|
1588
1588
|
return Z;
|
|
1589
1589
|
function z(V, X) {
|
|
1590
1590
|
_.resolve(V).then(function(g) {
|
|
1591
|
-
|
|
1591
|
+
S[X] = g, ++P !== k || A || (A = !0, r.resolve(Z, S));
|
|
1592
1592
|
}, function(g) {
|
|
1593
1593
|
A || (A = !0, r.reject(Z, g));
|
|
1594
1594
|
});
|
|
@@ -1598,7 +1598,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1598
1598
|
if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1599
1599
|
var k = u.length, A = !1;
|
|
1600
1600
|
if (!k) return this.resolve([]);
|
|
1601
|
-
for (var
|
|
1601
|
+
for (var S = -1, P = new this(a); ++S < k; ) B = u[S], _.resolve(B).then(function(Z) {
|
|
1602
1602
|
A || (A = !0, r.resolve(P, Z));
|
|
1603
1603
|
}, function(Z) {
|
|
1604
1604
|
A || (A = !0, r.reject(P, Z));
|
|
@@ -1606,10 +1606,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1606
1606
|
var B;
|
|
1607
1607
|
return P;
|
|
1608
1608
|
};
|
|
1609
|
-
}, { immediate: 36 }], 38: [function(s,
|
|
1609
|
+
}, { immediate: 36 }], 38: [function(s, C, c) {
|
|
1610
1610
|
var o = {};
|
|
1611
|
-
(0, s("./lib/utils/common").assign)(o, s("./lib/deflate"), s("./lib/inflate"), s("./lib/zlib/constants")),
|
|
1612
|
-
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(s,
|
|
1611
|
+
(0, s("./lib/utils/common").assign)(o, s("./lib/deflate"), s("./lib/inflate"), s("./lib/zlib/constants")), C.exports = o;
|
|
1612
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(s, C, c) {
|
|
1613
1613
|
var o = s("./zlib/deflate"), a = s("./utils/common"), r = s("./utils/strings"), l = s("./zlib/messages"), h = s("./zlib/zstream"), v = Object.prototype.toString, b = 0, y = -1, n = 0, p = 8;
|
|
1614
1614
|
function i(u) {
|
|
1615
1615
|
if (!(this instanceof i)) return new i(u);
|
|
@@ -1630,14 +1630,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1630
1630
|
return k.result;
|
|
1631
1631
|
}
|
|
1632
1632
|
i.prototype.push = function(u, _) {
|
|
1633
|
-
var k, A,
|
|
1633
|
+
var k, A, S = this.strm, P = this.options.chunkSize;
|
|
1634
1634
|
if (this.ended) return !1;
|
|
1635
|
-
A = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof u == "string" ?
|
|
1635
|
+
A = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof u == "string" ? S.input = r.string2buf(u) : v.call(u) === "[object ArrayBuffer]" ? S.input = new Uint8Array(u) : S.input = u, S.next_in = 0, S.avail_in = S.input.length;
|
|
1636
1636
|
do {
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
1639
|
-
} while ((0 <
|
|
1640
|
-
return A === 4 ? (k = o.deflateEnd(this.strm), this.onEnd(k), this.ended = !0, k === b) : A !== 2 || (this.onEnd(b), !(
|
|
1637
|
+
if (S.avail_out === 0 && (S.output = new a.Buf8(P), S.next_out = 0, S.avail_out = P), (k = o.deflate(S, A)) !== 1 && k !== b) return this.onEnd(k), !(this.ended = !0);
|
|
1638
|
+
S.avail_out !== 0 && (S.avail_in !== 0 || A !== 4 && A !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(a.shrinkBuf(S.output, S.next_out))) : this.onData(a.shrinkBuf(S.output, S.next_out)));
|
|
1639
|
+
} while ((0 < S.avail_in || S.avail_out === 0) && k !== 1);
|
|
1640
|
+
return A === 4 ? (k = o.deflateEnd(this.strm), this.onEnd(k), this.ended = !0, k === b) : A !== 2 || (this.onEnd(b), !(S.avail_out = 0));
|
|
1641
1641
|
}, i.prototype.onData = function(u) {
|
|
1642
1642
|
this.chunks.push(u);
|
|
1643
1643
|
}, i.prototype.onEnd = function(u) {
|
|
@@ -1647,7 +1647,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1647
1647
|
}, c.gzip = function(u, _) {
|
|
1648
1648
|
return (_ = _ || {}).gzip = !0, d(u, _);
|
|
1649
1649
|
};
|
|
1650
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(s,
|
|
1650
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(s, C, c) {
|
|
1651
1651
|
var o = s("./zlib/inflate"), a = s("./utils/common"), r = s("./utils/strings"), l = s("./zlib/constants"), h = s("./zlib/messages"), v = s("./zlib/zstream"), b = s("./zlib/gzheader"), y = Object.prototype.toString;
|
|
1652
1652
|
function n(i) {
|
|
1653
1653
|
if (!(this instanceof n)) return new n(i);
|
|
@@ -1664,12 +1664,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1664
1664
|
return u.result;
|
|
1665
1665
|
}
|
|
1666
1666
|
n.prototype.push = function(i, d) {
|
|
1667
|
-
var u, _, k, A,
|
|
1667
|
+
var u, _, k, A, S, P, B = this.strm, Z = this.options.chunkSize, z = this.options.dictionary, V = !1;
|
|
1668
1668
|
if (this.ended) return !1;
|
|
1669
1669
|
_ = d === ~~d ? d : d === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof i == "string" ? B.input = r.binstring2buf(i) : y.call(i) === "[object ArrayBuffer]" ? B.input = new Uint8Array(i) : B.input = i, B.next_in = 0, B.avail_in = B.input.length;
|
|
1670
1670
|
do {
|
|
1671
1671
|
if (B.avail_out === 0 && (B.output = new a.Buf8(Z), B.next_out = 0, B.avail_out = Z), (u = o.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && z && (P = typeof z == "string" ? r.string2buf(z) : y.call(z) === "[object ArrayBuffer]" ? new Uint8Array(z) : z, u = o.inflateSetDictionary(this.strm, P)), u === l.Z_BUF_ERROR && V === !0 && (u = l.Z_OK, V = !1), u !== l.Z_STREAM_END && u !== l.Z_OK) return this.onEnd(u), !(this.ended = !0);
|
|
1672
|
-
B.next_out && (B.avail_out !== 0 && u !== l.Z_STREAM_END && (B.avail_in !== 0 || _ !== l.Z_FINISH && _ !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = r.utf8border(B.output, B.next_out), A = B.next_out - k,
|
|
1672
|
+
B.next_out && (B.avail_out !== 0 && u !== l.Z_STREAM_END && (B.avail_in !== 0 || _ !== l.Z_FINISH && _ !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = r.utf8border(B.output, B.next_out), A = B.next_out - k, S = r.buf2string(B.output, k), B.next_out = A, B.avail_out = Z - A, A && a.arraySet(B.output, B.output, k, A, 0), this.onData(S)) : this.onData(a.shrinkBuf(B.output, B.next_out)))), B.avail_in === 0 && B.avail_out === 0 && (V = !0);
|
|
1673
1673
|
} while ((0 < B.avail_in || B.avail_out === 0) && u !== l.Z_STREAM_END);
|
|
1674
1674
|
return u === l.Z_STREAM_END && (_ = l.Z_FINISH), _ === l.Z_FINISH ? (u = o.inflateEnd(this.strm), this.onEnd(u), this.ended = !0, u === l.Z_OK) : _ !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(B.avail_out = 0));
|
|
1675
1675
|
}, n.prototype.onData = function(i) {
|
|
@@ -1679,7 +1679,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1679
1679
|
}, c.Inflate = n, c.inflate = p, c.inflateRaw = function(i, d) {
|
|
1680
1680
|
return (d = d || {}).raw = !0, p(i, d);
|
|
1681
1681
|
}, c.ungzip = p;
|
|
1682
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(s,
|
|
1682
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(s, C, c) {
|
|
1683
1683
|
var o = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1684
1684
|
c.assign = function(l) {
|
|
1685
1685
|
for (var h = Array.prototype.slice.call(arguments, 1); h.length; ) {
|
|
@@ -1709,7 +1709,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1709
1709
|
c.setTyped = function(l) {
|
|
1710
1710
|
l ? (c.Buf8 = Uint8Array, c.Buf16 = Uint16Array, c.Buf32 = Int32Array, c.assign(c, a)) : (c.Buf8 = Array, c.Buf16 = Array, c.Buf32 = Array, c.assign(c, r));
|
|
1711
1711
|
}, c.setTyped(o);
|
|
1712
|
-
}, {}], 42: [function(s,
|
|
1712
|
+
}, {}], 42: [function(s, C, c) {
|
|
1713
1713
|
var o = s("./common"), a = !0, r = !0;
|
|
1714
1714
|
try {
|
|
1715
1715
|
String.fromCharCode.apply(null, [0]);
|
|
@@ -1751,17 +1751,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1751
1751
|
for ((y = y || b.length) > b.length && (y = b.length), n = y - 1; 0 <= n && (192 & b[n]) == 128; ) n--;
|
|
1752
1752
|
return n < 0 || n === 0 ? y : n + l[b[n]] > y ? n : y;
|
|
1753
1753
|
};
|
|
1754
|
-
}, { "./common": 41 }], 43: [function(s,
|
|
1755
|
-
|
|
1754
|
+
}, { "./common": 41 }], 43: [function(s, C, c) {
|
|
1755
|
+
C.exports = function(o, a, r, l) {
|
|
1756
1756
|
for (var h = 65535 & o | 0, v = o >>> 16 & 65535 | 0, b = 0; r !== 0; ) {
|
|
1757
1757
|
for (r -= b = 2e3 < r ? 2e3 : r; v = v + (h = h + a[l++] | 0) | 0, --b; ) ;
|
|
1758
1758
|
h %= 65521, v %= 65521;
|
|
1759
1759
|
}
|
|
1760
1760
|
return h | v << 16 | 0;
|
|
1761
1761
|
};
|
|
1762
|
-
}, {}], 44: [function(s,
|
|
1763
|
-
|
|
1764
|
-
}, {}], 45: [function(s,
|
|
1762
|
+
}, {}], 44: [function(s, C, c) {
|
|
1763
|
+
C.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
|
1764
|
+
}, {}], 45: [function(s, C, c) {
|
|
1765
1765
|
var o = function() {
|
|
1766
1766
|
for (var a, r = [], l = 0; l < 256; l++) {
|
|
1767
1767
|
a = l;
|
|
@@ -1770,14 +1770,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1770
1770
|
}
|
|
1771
1771
|
return r;
|
|
1772
1772
|
}();
|
|
1773
|
-
|
|
1773
|
+
C.exports = function(a, r, l, h) {
|
|
1774
1774
|
var v = o, b = h + l;
|
|
1775
1775
|
a ^= -1;
|
|
1776
1776
|
for (var y = h; y < b; y++) a = a >>> 8 ^ v[255 & (a ^ r[y])];
|
|
1777
1777
|
return -1 ^ a;
|
|
1778
1778
|
};
|
|
1779
|
-
}, {}], 46: [function(s,
|
|
1780
|
-
var o, a = s("../utils/common"), r = s("./trees"), l = s("./adler32"), h = s("./crc32"), v = s("./messages"), b = 0, y = 4, n = 0, p = -2, i = -1, d = 4, u = 2, _ = 8, k = 9, A = 286,
|
|
1779
|
+
}, {}], 46: [function(s, C, c) {
|
|
1780
|
+
var o, a = s("../utils/common"), r = s("./trees"), l = s("./adler32"), h = s("./crc32"), v = s("./messages"), b = 0, y = 4, n = 0, p = -2, i = -1, d = 4, u = 2, _ = 8, k = 9, A = 286, S = 30, P = 19, B = 2 * A + 1, Z = 15, z = 3, V = 258, X = V + z + 1, g = 42, O = 113, e = 1, F = 2, J = 3, W = 4;
|
|
1781
1781
|
function et(t, D) {
|
|
1782
1782
|
return t.msg = v[D], D;
|
|
1783
1783
|
}
|
|
@@ -1863,7 +1863,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1863
1863
|
this.good_length = t, this.max_lazy = D, this.nice_length = T, this.max_chain = m, this.func = f;
|
|
1864
1864
|
}
|
|
1865
1865
|
function st() {
|
|
1866
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new a.Buf16(2 * B), this.dyn_dtree = new a.Buf16(2 * (2 *
|
|
1866
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new a.Buf16(2 * B), this.dyn_dtree = new a.Buf16(2 * (2 * S + 1)), this.bl_tree = new a.Buf16(2 * (2 * P + 1)), H(this.dyn_ltree), H(this.dyn_dtree), H(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new a.Buf16(Z + 1), this.heap = new a.Buf16(2 * A + 1), H(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new a.Buf16(2 * A + 1), H(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
1867
1867
|
}
|
|
1868
1868
|
function ot(t) {
|
|
1869
1869
|
var D;
|
|
@@ -1981,14 +1981,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1981
1981
|
}
|
|
1982
1982
|
return T.strstart += T.lookahead, T.block_start = T.strstart, T.insert = T.lookahead, T.lookahead = 0, T.match_length = T.prev_length = z - 1, T.match_available = 0, t.next_in = j, t.input = I, t.avail_in = L, T.wrap = x, n;
|
|
1983
1983
|
}, c.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1984
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(s,
|
|
1985
|
-
|
|
1984
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(s, C, c) {
|
|
1985
|
+
C.exports = function() {
|
|
1986
1986
|
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
|
|
1987
1987
|
};
|
|
1988
|
-
}, {}], 48: [function(s,
|
|
1989
|
-
|
|
1990
|
-
var r, l, h, v, b, y, n, p, i, d, u, _, k, A,
|
|
1991
|
-
r = o.state, l = o.next_in, e = o.input, h = l + (o.avail_in - 5), v = o.next_out, F = o.output, b = v - (a - o.avail_out), y = v + (o.avail_out - 257), n = r.dmax, p = r.wsize, i = r.whave, d = r.wnext, u = r.window, _ = r.hold, k = r.bits, A = r.lencode,
|
|
1988
|
+
}, {}], 48: [function(s, C, c) {
|
|
1989
|
+
C.exports = function(o, a) {
|
|
1990
|
+
var r, l, h, v, b, y, n, p, i, d, u, _, k, A, S, P, B, Z, z, V, X, g, O, e, F;
|
|
1991
|
+
r = o.state, l = o.next_in, e = o.input, h = l + (o.avail_in - 5), v = o.next_out, F = o.output, b = v - (a - o.avail_out), y = v + (o.avail_out - 257), n = r.dmax, p = r.wsize, i = r.whave, d = r.wnext, u = r.window, _ = r.hold, k = r.bits, A = r.lencode, S = r.distcode, P = (1 << r.lenbits) - 1, B = (1 << r.distbits) - 1;
|
|
1992
1992
|
t: do {
|
|
1993
1993
|
k < 15 && (_ += e[l++] << k, k += 8, _ += e[l++] << k, k += 8), Z = A[_ & P];
|
|
1994
1994
|
e: for (; ; ) {
|
|
@@ -2006,11 +2006,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2006
2006
|
o.msg = "invalid literal/length code", r.mode = 30;
|
|
2007
2007
|
break t;
|
|
2008
2008
|
}
|
|
2009
|
-
V = 65535 & Z, (z &= 15) && (k < z && (_ += e[l++] << k, k += 8), V += _ & (1 << z) - 1, _ >>>= z, k -= z), k < 15 && (_ += e[l++] << k, k += 8, _ += e[l++] << k, k += 8), Z =
|
|
2009
|
+
V = 65535 & Z, (z &= 15) && (k < z && (_ += e[l++] << k, k += 8), V += _ & (1 << z) - 1, _ >>>= z, k -= z), k < 15 && (_ += e[l++] << k, k += 8, _ += e[l++] << k, k += 8), Z = S[_ & B];
|
|
2010
2010
|
r: for (; ; ) {
|
|
2011
2011
|
if (_ >>>= z = Z >>> 24, k -= z, !(16 & (z = Z >>> 16 & 255))) {
|
|
2012
2012
|
if (!(64 & z)) {
|
|
2013
|
-
Z =
|
|
2013
|
+
Z = S[(65535 & Z) + (_ & (1 << z) - 1)];
|
|
2014
2014
|
continue r;
|
|
2015
2015
|
}
|
|
2016
2016
|
o.msg = "invalid distance code", r.mode = 30;
|
|
@@ -2056,7 +2056,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2056
2056
|
} while (l < h && v < y);
|
|
2057
2057
|
l -= V = k >> 3, _ &= (1 << (k -= V << 3)) - 1, o.next_in = l, o.next_out = v, o.avail_in = l < h ? h - l + 5 : 5 - (l - h), o.avail_out = v < y ? y - v + 257 : 257 - (v - y), r.hold = _, r.bits = k;
|
|
2058
2058
|
};
|
|
2059
|
-
}, {}], 49: [function(s,
|
|
2059
|
+
}, {}], 49: [function(s, C, c) {
|
|
2060
2060
|
var o = s("../utils/common"), a = s("./adler32"), r = s("./crc32"), l = s("./inffast"), h = s("./inftrees"), v = 1, b = 2, y = 0, n = -2, p = 1, i = 852, d = 592;
|
|
2061
2061
|
function u(g) {
|
|
2062
2062
|
return (g >>> 24 & 255) + (g >>> 8 & 65280) + ((65280 & g) << 8) + ((255 & g) << 24);
|
|
@@ -2072,13 +2072,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2072
2072
|
var O;
|
|
2073
2073
|
return g && g.state ? ((O = g.state).wsize = 0, O.whave = 0, O.wnext = 0, k(g)) : n;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function S(g, O) {
|
|
2076
2076
|
var e, F;
|
|
2077
2077
|
return g && g.state ? (F = g.state, O < 0 ? (e = 0, O = -O) : (e = 1 + (O >> 4), O < 48 && (O &= 15)), O && (O < 8 || 15 < O) ? n : (F.window !== null && F.wbits !== O && (F.window = null), F.wrap = e, F.wbits = O, A(g))) : n;
|
|
2078
2078
|
}
|
|
2079
2079
|
function P(g, O) {
|
|
2080
2080
|
var e, F;
|
|
2081
|
-
return g ? (F = new _(), (g.state = F).window = null, (e =
|
|
2081
|
+
return g ? (F = new _(), (g.state = F).window = null, (e = S(g, O)) !== y && (g.state = null), e) : n;
|
|
2082
2082
|
}
|
|
2083
2083
|
var B, Z, z = !0;
|
|
2084
2084
|
function V(g) {
|
|
@@ -2097,7 +2097,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2097
2097
|
var J, W = g.state;
|
|
2098
2098
|
return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new o.Buf8(W.wsize)), F >= W.wsize ? (o.arraySet(W.window, O, e - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (F < (J = W.wsize - W.wnext) && (J = F), o.arraySet(W.window, O, e - F, J, W.wnext), (F -= J) ? (o.arraySet(W.window, O, e - F, F, 0), W.wnext = F, W.whave = W.wsize) : (W.wnext += J, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += J))), 0;
|
|
2099
2099
|
}
|
|
2100
|
-
c.inflateReset = A, c.inflateReset2 =
|
|
2100
|
+
c.inflateReset = A, c.inflateReset2 = S, c.inflateResetKeep = k, c.inflateInit = function(g) {
|
|
2101
2101
|
return P(g, 15);
|
|
2102
2102
|
}, c.inflateInit2 = P, c.inflate = function(g, O) {
|
|
2103
2103
|
var e, F, J, W, et, M, H, E, w, N, $, R, it, nt, tt, rt, st, ot, ft, ut, t, D, T, m, f = 0, x = new o.Buf8(4), L = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
@@ -2466,10 +2466,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2466
2466
|
var e, F = O.length;
|
|
2467
2467
|
return g && g.state ? (e = g.state).wrap !== 0 && e.mode !== 11 ? n : e.mode === 11 && a(1, O, F, 0) !== e.check ? -3 : X(g, O, F, F) ? (e.mode = 31, -4) : (e.havedict = 1, y) : n;
|
|
2468
2468
|
}, c.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2469
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(s,
|
|
2469
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(s, C, c) {
|
|
2470
2470
|
var o = s("../utils/common"), a = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], r = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], l = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], h = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
2471
|
-
|
|
2472
|
-
var _, k, A,
|
|
2471
|
+
C.exports = function(v, b, y, n, p, i, d, u) {
|
|
2472
|
+
var _, k, A, S, P, B, Z, z, V, X = u.bits, g = 0, O = 0, e = 0, F = 0, J = 0, W = 0, et = 0, M = 0, H = 0, E = 0, w = null, N = 0, $ = new o.Buf16(16), R = new o.Buf16(16), it = null, nt = 0;
|
|
2473
2473
|
for (g = 0; g <= 15; g++) $[g] = 0;
|
|
2474
2474
|
for (O = 0; O < n; O++) $[b[y + O]]++;
|
|
2475
2475
|
for (J = X, F = 15; 1 <= F && $[F] === 0; F--) ;
|
|
@@ -2479,7 +2479,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2479
2479
|
if (0 < M && (v === 0 || F !== 1)) return -1;
|
|
2480
2480
|
for (R[1] = 0, g = 1; g < 15; g++) R[g + 1] = R[g] + $[g];
|
|
2481
2481
|
for (O = 0; O < n; O++) b[y + O] !== 0 && (d[R[b[y + O]]++] = O);
|
|
2482
|
-
if (B = v === 0 ? (w = it = d, 19) : v === 1 ? (w = a, N -= 257, it = r, nt -= 257, 256) : (w = l, it = h, -1), g = e, P = i, et = O = E = 0, A = -1,
|
|
2482
|
+
if (B = v === 0 ? (w = it = d, 19) : v === 1 ? (w = a, N -= 257, it = r, nt -= 257, 256) : (w = l, it = h, -1), g = e, P = i, et = O = E = 0, A = -1, S = (H = 1 << (W = J)) - 1, v === 1 && 852 < H || v === 2 && 592 < H) return 1;
|
|
2483
2483
|
for (; ; ) {
|
|
2484
2484
|
for (Z = g - et, V = d[O] < B ? (z = 0, d[O]) : d[O] > B ? (z = it[nt + d[O]], w[N + d[O]]) : (z = 96, 0), _ = 1 << g - et, e = k = 1 << W; p[P + (E >> et) + (k -= _)] = Z << 24 | z << 16 | V | 0, k !== 0; ) ;
|
|
2485
2485
|
for (_ = 1 << g - 1; E & _; ) _ >>= 1;
|
|
@@ -2487,22 +2487,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2487
2487
|
if (g === F) break;
|
|
2488
2488
|
g = b[y + d[O]];
|
|
2489
2489
|
}
|
|
2490
|
-
if (J < g && (E &
|
|
2490
|
+
if (J < g && (E & S) !== A) {
|
|
2491
2491
|
for (et === 0 && (et = J), P += e, M = 1 << (W = g - et); W + et < F && !((M -= $[W + et]) <= 0); ) W++, M <<= 1;
|
|
2492
2492
|
if (H += 1 << W, v === 1 && 852 < H || v === 2 && 592 < H) return 1;
|
|
2493
|
-
p[A = E &
|
|
2493
|
+
p[A = E & S] = J << 24 | W << 16 | P - i | 0;
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
2496
|
return E !== 0 && (p[P + E] = g - et << 24 | 64 << 16 | 0), u.bits = J, 0;
|
|
2497
2497
|
};
|
|
2498
|
-
}, { "../utils/common": 41 }], 51: [function(s,
|
|
2499
|
-
|
|
2500
|
-
}, {}], 52: [function(s,
|
|
2498
|
+
}, { "../utils/common": 41 }], 51: [function(s, C, c) {
|
|
2499
|
+
C.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
2500
|
+
}, {}], 52: [function(s, C, c) {
|
|
2501
2501
|
var o = s("../utils/common"), a = 0, r = 1;
|
|
2502
2502
|
function l(f) {
|
|
2503
2503
|
for (var x = f.length; 0 <= --x; ) f[x] = 0;
|
|
2504
2504
|
}
|
|
2505
|
-
var h = 0, v = 29, b = 256, y = b + 1 + v, n = 30, p = 19, i = 2 * y + 1, d = 15, u = 16, _ = 7, k = 256, A = 16,
|
|
2505
|
+
var h = 0, v = 29, b = 256, y = b + 1 + v, n = 30, p = 19, i = 2 * y + 1, d = 15, u = 16, _ = 7, k = 256, A = 16, S = 17, P = 18, B = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], Z = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], z = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], V = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], X = new Array(2 * (y + 2));
|
|
2506
2506
|
l(X);
|
|
2507
2507
|
var g = new Array(2 * n);
|
|
2508
2508
|
l(g);
|
|
@@ -2587,13 +2587,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2587
2587
|
}
|
|
2588
2588
|
function t(f, x, L) {
|
|
2589
2589
|
var j, I, G = -1, q = x[1], Y = 0, Q = 7, lt = 4;
|
|
2590
|
-
for (q === 0 && (Q = 138, lt = 3), x[2 * (L + 1) + 1] = 65535, j = 0; j <= L; j++) I = q, q = x[2 * (j + 1) + 1], ++Y < Q && I === q || (Y < lt ? f.bl_tree[2 * I] += Y : I !== 0 ? (I !== G && f.bl_tree[2 * I]++, f.bl_tree[2 * A]++) : Y <= 10 ? f.bl_tree[2 *
|
|
2590
|
+
for (q === 0 && (Q = 138, lt = 3), x[2 * (L + 1) + 1] = 65535, j = 0; j <= L; j++) I = q, q = x[2 * (j + 1) + 1], ++Y < Q && I === q || (Y < lt ? f.bl_tree[2 * I] += Y : I !== 0 ? (I !== G && f.bl_tree[2 * I]++, f.bl_tree[2 * A]++) : Y <= 10 ? f.bl_tree[2 * S]++ : f.bl_tree[2 * P]++, G = I, lt = (Y = 0) === q ? (Q = 138, 3) : I === q ? (Q = 6, 3) : (Q = 7, 4));
|
|
2591
2591
|
}
|
|
2592
2592
|
function D(f, x, L) {
|
|
2593
2593
|
var j, I, G = -1, q = x[1], Y = 0, Q = 7, lt = 4;
|
|
2594
2594
|
for (q === 0 && (Q = 138, lt = 3), j = 0; j <= L; j++) if (I = q, q = x[2 * (j + 1) + 1], !(++Y < Q && I === q)) {
|
|
2595
2595
|
if (Y < lt) for (; R(f, I, f.bl_tree), --Y != 0; ) ;
|
|
2596
|
-
else I !== 0 ? (I !== G && (R(f, I, f.bl_tree), Y--), R(f, A, f.bl_tree), $(f, Y - 3, 2)) : Y <= 10 ? (R(f,
|
|
2596
|
+
else I !== 0 ? (I !== G && (R(f, I, f.bl_tree), Y--), R(f, A, f.bl_tree), $(f, Y - 3, 2)) : Y <= 10 ? (R(f, S, f.bl_tree), $(f, Y - 3, 3)) : (R(f, P, f.bl_tree), $(f, Y - 11, 7));
|
|
2597
2597
|
G = I, lt = (Y = 0) === q ? (Q = 138, 3) : I === q ? (Q = 6, 3) : (Q = 7, 4);
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
@@ -2642,11 +2642,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2642
2642
|
x.bi_valid === 16 ? (N(x, x.bi_buf), x.bi_buf = 0, x.bi_valid = 0) : 8 <= x.bi_valid && (x.pending_buf[x.pending++] = 255 & x.bi_buf, x.bi_buf >>= 8, x.bi_valid -= 8);
|
|
2643
2643
|
}(f);
|
|
2644
2644
|
};
|
|
2645
|
-
}, { "../utils/common": 41 }], 53: [function(s,
|
|
2646
|
-
|
|
2645
|
+
}, { "../utils/common": 41 }], 53: [function(s, C, c) {
|
|
2646
|
+
C.exports = function() {
|
|
2647
2647
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
2648
2648
|
};
|
|
2649
|
-
}, {}], 54: [function(s,
|
|
2649
|
+
}, {}], 54: [function(s, C, c) {
|
|
2650
2650
|
(function(o) {
|
|
2651
2651
|
(function(a, r) {
|
|
2652
2652
|
if (!a.setImmediate) {
|
|
@@ -2657,10 +2657,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2657
2657
|
});
|
|
2658
2658
|
} : function() {
|
|
2659
2659
|
if (a.postMessage && !a.importScripts) {
|
|
2660
|
-
var A = !0,
|
|
2660
|
+
var A = !0, S = a.onmessage;
|
|
2661
2661
|
return a.onmessage = function() {
|
|
2662
2662
|
A = !1;
|
|
2663
|
-
}, a.postMessage("", "*"), a.onmessage =
|
|
2663
|
+
}, a.postMessage("", "*"), a.onmessage = S, A;
|
|
2664
2664
|
}
|
|
2665
2665
|
}() ? (b = "setImmediate$" + Math.random() + "$", a.addEventListener ? a.addEventListener("message", k, !1) : a.attachEvent("onmessage", k), function(A) {
|
|
2666
2666
|
a.postMessage(b + A, "*");
|
|
@@ -2669,16 +2669,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2669
2669
|
}, function(A) {
|
|
2670
2670
|
v.port2.postMessage(A);
|
|
2671
2671
|
}) : i && "onreadystatechange" in i.createElement("script") ? (h = i.documentElement, function(A) {
|
|
2672
|
-
var
|
|
2673
|
-
|
|
2674
|
-
_(A),
|
|
2675
|
-
}, h.appendChild(
|
|
2672
|
+
var S = i.createElement("script");
|
|
2673
|
+
S.onreadystatechange = function() {
|
|
2674
|
+
_(A), S.onreadystatechange = null, h.removeChild(S), S = null;
|
|
2675
|
+
}, h.appendChild(S);
|
|
2676
2676
|
}) : function(A) {
|
|
2677
2677
|
setTimeout(_, 0, A);
|
|
2678
2678
|
}, d.setImmediate = function(A) {
|
|
2679
2679
|
typeof A != "function" && (A = new Function("" + A));
|
|
2680
|
-
for (var
|
|
2681
|
-
var B = { callback: A, args:
|
|
2680
|
+
for (var S = new Array(arguments.length - 1), P = 0; P < S.length; P++) S[P] = arguments[P + 1];
|
|
2681
|
+
var B = { callback: A, args: S };
|
|
2682
2682
|
return n[y] = B, l(y), y++;
|
|
2683
2683
|
}, d.clearImmediate = u;
|
|
2684
2684
|
}
|
|
@@ -2688,8 +2688,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2688
2688
|
function _(A) {
|
|
2689
2689
|
if (p) setTimeout(_, 0, A);
|
|
2690
2690
|
else {
|
|
2691
|
-
var
|
|
2692
|
-
if (
|
|
2691
|
+
var S = n[A];
|
|
2692
|
+
if (S) {
|
|
2693
2693
|
p = !0;
|
|
2694
2694
|
try {
|
|
2695
2695
|
(function(P) {
|
|
@@ -2710,7 +2710,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2710
2710
|
default:
|
|
2711
2711
|
B.apply(r, Z);
|
|
2712
2712
|
}
|
|
2713
|
-
})(
|
|
2713
|
+
})(S);
|
|
2714
2714
|
} finally {
|
|
2715
2715
|
u(A), p = !1;
|
|
2716
2716
|
}
|
|
@@ -2725,9 +2725,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2725
2725
|
}, {}] }, {}, [10])(10);
|
|
2726
2726
|
});
|
|
2727
2727
|
})(Bt);
|
|
2728
|
-
var
|
|
2729
|
-
const
|
|
2730
|
-
function
|
|
2728
|
+
var qt = Bt.exports;
|
|
2729
|
+
const Xt = /* @__PURE__ */ jt(qt);
|
|
2730
|
+
function Jt(U) {
|
|
2731
2731
|
let K = "";
|
|
2732
2732
|
const s = [];
|
|
2733
2733
|
if (U.bold && s.push("<b/>"), U.italic && s.push("<i/>"), U.underline && s.push("<u/>"), U.strikethrough && s.push("<strike/>"), U.textColor && U.textColor.toLowerCase() !== "#000000") {
|
|
@@ -2735,20 +2735,20 @@ function Qt(U) {
|
|
|
2735
2735
|
c && s.push(`<color rgb="${c}"/>`);
|
|
2736
2736
|
}
|
|
2737
2737
|
s.length > 0 && (K += `<font>${s.join("")}</font>`);
|
|
2738
|
-
const
|
|
2739
|
-
if (
|
|
2740
|
-
const c = Et(
|
|
2738
|
+
const C = U.cellColor;
|
|
2739
|
+
if (C && C.toLowerCase() !== "#ffffff") {
|
|
2740
|
+
const c = Et(C);
|
|
2741
2741
|
c && (K += `<fill><patternFill patternType="solid"><fgColor rgb="${c}"/></patternFill></fill>`);
|
|
2742
2742
|
}
|
|
2743
2743
|
return `<dxf>${K}</dxf>`;
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2745
|
+
function Qt(U, K) {
|
|
2746
2746
|
const s = U.match(/<dxfs count="(\d+)"/);
|
|
2747
2747
|
if (s) {
|
|
2748
|
-
const
|
|
2748
|
+
const C = parseInt(s[1], 10);
|
|
2749
2749
|
return {
|
|
2750
|
-
xml: U.replace(/<dxfs count="\d+"/, `<dxfs count="${
|
|
2751
|
-
dxfId:
|
|
2750
|
+
xml: U.replace(/<dxfs count="\d+"/, `<dxfs count="${C + 1}"`).replace("</dxfs>", K + "</dxfs>"),
|
|
2751
|
+
dxfId: C
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
2754
|
return U.includes("<dxfs/>") ? {
|
|
@@ -2762,15 +2762,15 @@ function te(U, K) {
|
|
|
2762
2762
|
dxfId: 0
|
|
2763
2763
|
};
|
|
2764
2764
|
}
|
|
2765
|
-
function
|
|
2765
|
+
function te(U) {
|
|
2766
2766
|
return U.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2767
2767
|
}
|
|
2768
|
-
function
|
|
2769
|
-
const
|
|
2770
|
-
`(<conditionalFormatting[^>]*\\bsqref="${
|
|
2768
|
+
function ee(U, K, s) {
|
|
2769
|
+
const C = new RegExp(
|
|
2770
|
+
`(<conditionalFormatting[^>]*\\bsqref="${te(K)}"[^>]*>)`
|
|
2771
2771
|
);
|
|
2772
|
-
if (
|
|
2773
|
-
return U.replace(
|
|
2772
|
+
if (C.test(U))
|
|
2773
|
+
return U.replace(C, `$1${s}`);
|
|
2774
2774
|
const c = `<conditionalFormatting sqref="${K}">${s}</conditionalFormatting>`;
|
|
2775
2775
|
for (const o of [
|
|
2776
2776
|
"<pageMargins",
|
|
@@ -2783,61 +2783,61 @@ function re(U, K, s) {
|
|
|
2783
2783
|
return U.replace(o, c + o);
|
|
2784
2784
|
return U + c;
|
|
2785
2785
|
}
|
|
2786
|
-
function
|
|
2786
|
+
function re(U) {
|
|
2787
2787
|
return U.replace(
|
|
2788
2788
|
/<cfRule([^>]*)type="containsText"([^>]*?)>([\s\S]*?)<\/cfRule>/g,
|
|
2789
|
-
(K, s,
|
|
2790
|
-
if (/\btext=/.test(s) || /\btext=/.test(
|
|
2789
|
+
(K, s, C, c) => {
|
|
2790
|
+
if (/\btext=/.test(s) || /\btext=/.test(C)) return K;
|
|
2791
2791
|
const o = c.match(/<formula[^>]*>([\s\S]*?)<\/formula>/);
|
|
2792
2792
|
if (!o) return K;
|
|
2793
2793
|
const r = o[1].replace(/"/g, '"').replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").match(/SEARCH\s*\(\s*"([^"]*)"/i);
|
|
2794
2794
|
if (!r) return K;
|
|
2795
2795
|
const l = r[1].replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
2796
|
-
return `<cfRule${s}type="containsText"${
|
|
2796
|
+
return `<cfRule${s}type="containsText"${C} text="${l}">${c}</cfRule>`;
|
|
2797
2797
|
}
|
|
2798
2798
|
);
|
|
2799
2799
|
}
|
|
2800
|
-
async function
|
|
2800
|
+
async function ne(U, K) {
|
|
2801
2801
|
var a;
|
|
2802
|
-
const s = await
|
|
2803
|
-
let c =
|
|
2802
|
+
const s = await Xt.loadAsync(U), C = s.file("xl/styles.xml");
|
|
2803
|
+
let c = C ? await C.async("text") : "", o = !1;
|
|
2804
2804
|
for (const [r, l] of Object.entries(s.files)) {
|
|
2805
2805
|
if (l.dir) continue;
|
|
2806
2806
|
const h = r.match(/^xl\/worksheets\/sheet(\d+)\.xml$/);
|
|
2807
2807
|
if (!h) continue;
|
|
2808
2808
|
const v = parseInt(h[1], 10) - 1;
|
|
2809
2809
|
let b = await l.async("text"), y = !1;
|
|
2810
|
-
const n =
|
|
2810
|
+
const n = re(b);
|
|
2811
2811
|
n !== b && (b = n, y = !0);
|
|
2812
2812
|
const p = ((a = K[v]) == null ? void 0 : a.duplicateValues) ?? [];
|
|
2813
2813
|
for (const i of p) {
|
|
2814
|
-
const d =
|
|
2814
|
+
const d = Jt(i.format), { xml: u, dxfId: _ } = Qt(c, d);
|
|
2815
2815
|
c = u, o = !0;
|
|
2816
2816
|
const k = `<cfRule type="${i.type}" dxfId="${_}" priority="${i.priority}"/>`;
|
|
2817
|
-
b =
|
|
2817
|
+
b = ee(b, i.ref, k), y = !0;
|
|
2818
2818
|
}
|
|
2819
2819
|
y && s.file(r, b);
|
|
2820
2820
|
}
|
|
2821
|
-
return o &&
|
|
2821
|
+
return o && C && s.file("xl/styles.xml", c), s.generateAsync({ type: "arraybuffer", compression: "DEFLATE" });
|
|
2822
2822
|
}
|
|
2823
|
-
const
|
|
2823
|
+
const ie = (U) => {
|
|
2824
2824
|
if (!U || typeof U != "string") return null;
|
|
2825
2825
|
const K = U.trim().toLowerCase();
|
|
2826
2826
|
if (K.startsWith("#")) {
|
|
2827
2827
|
const c = K.replace("#", "").toUpperCase();
|
|
2828
2828
|
return c.length === 3 ? c.split("").map((o) => o + o).join("").toUpperCase() : c.length === 6 ? c : null;
|
|
2829
2829
|
}
|
|
2830
|
-
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i,
|
|
2831
|
-
if (
|
|
2832
|
-
const c = Math.min(255, Math.max(0, parseFloat(
|
|
2830
|
+
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i, C = K.match(s);
|
|
2831
|
+
if (C) {
|
|
2832
|
+
const c = Math.min(255, Math.max(0, parseFloat(C[1]))), o = Math.min(255, Math.max(0, parseFloat(C[2]))), a = Math.min(255, Math.max(0, parseFloat(C[3])));
|
|
2833
2833
|
return ((1 << 24) + (c << 16) + (o << 8) + a).toString(16).slice(1).toUpperCase();
|
|
2834
2834
|
}
|
|
2835
2835
|
return null;
|
|
2836
2836
|
};
|
|
2837
|
-
function
|
|
2837
|
+
function ae(U) {
|
|
2838
2838
|
const K = {};
|
|
2839
2839
|
if (U.bl === 1 && (K.bold = !0), U.it === 1 && (K.italic = !0), U.un === 1 && (K.underline = !0), U.cl === 1 && (K.strike = !0), U.fs && (K.size = Number(U.fs)), typeof U.ff == "string" && U.ff && (K.name = U.ff), U.fc) {
|
|
2840
|
-
const s =
|
|
2840
|
+
const s = ie(U.fc);
|
|
2841
2841
|
s && (K.color = { argb: `FF${s}` });
|
|
2842
2842
|
}
|
|
2843
2843
|
return Object.keys(K).length > 0 ? K : void 0;
|
|
@@ -2846,50 +2846,48 @@ function Ot(U) {
|
|
|
2846
2846
|
if (!Array.isArray(U) || U.length === 0) return null;
|
|
2847
2847
|
const K = [];
|
|
2848
2848
|
for (const s of U) {
|
|
2849
|
-
const
|
|
2850
|
-
if (
|
|
2851
|
-
const c =
|
|
2849
|
+
const C = String(s.v ?? "");
|
|
2850
|
+
if (C === "" && !s.bl && !s.it && !s.un && !s.cl) continue;
|
|
2851
|
+
const c = ae(s), o = { text: C };
|
|
2852
2852
|
c && (o.font = c), K.push(o);
|
|
2853
2853
|
}
|
|
2854
2854
|
return K.length === 0 || !K.some((s) => s.text !== "") ? null : { richText: K };
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2857
|
-
K.forEach((s,
|
|
2858
|
-
const c = U.getCell(
|
|
2856
|
+
function se(U, K) {
|
|
2857
|
+
K.forEach((s, C) => {
|
|
2858
|
+
const c = U.getCell(C);
|
|
2859
2859
|
c.value = s;
|
|
2860
2860
|
});
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2863
|
-
const K = U == null ? void 0 : U.filter, s = U == null ? void 0 : U.filter_select,
|
|
2864
|
-
return
|
|
2862
|
+
function oe(U) {
|
|
2863
|
+
const K = U == null ? void 0 : U.filter, s = U == null ? void 0 : U.filter_select, C = !!(K && Object.keys(K).length > 0), c = !!s && (Array.isArray(s.row) || Array.isArray(s.column));
|
|
2864
|
+
return C || c;
|
|
2865
2865
|
}
|
|
2866
|
-
const
|
|
2866
|
+
const St = (U) => {
|
|
2867
2867
|
if (!U || typeof U != "string") return null;
|
|
2868
2868
|
const K = U.trim().toLowerCase();
|
|
2869
2869
|
if (K.startsWith("#")) {
|
|
2870
2870
|
const c = K.replace("#", "").toUpperCase();
|
|
2871
2871
|
return c.length === 3 ? c.split("").map((o) => o + o).join("").toUpperCase() : c.length === 6 ? c : null;
|
|
2872
2872
|
}
|
|
2873
|
-
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i,
|
|
2874
|
-
if (
|
|
2875
|
-
const c = Math.min(255, Math.max(0, parseFloat(
|
|
2873
|
+
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i, C = K.match(s);
|
|
2874
|
+
if (C) {
|
|
2875
|
+
const c = Math.min(255, Math.max(0, parseFloat(C[1]))), o = Math.min(255, Math.max(0, parseFloat(C[2]))), a = Math.min(255, Math.max(0, parseFloat(C[3])));
|
|
2876
2876
|
return ((1 << 24) + (c << 16) + (o << 8) + a).toString(16).slice(1).toUpperCase();
|
|
2877
2877
|
}
|
|
2878
2878
|
return null;
|
|
2879
|
-
},
|
|
2879
|
+
}, me = async (U, K, s, C) => {
|
|
2880
2880
|
var c, o, a, r;
|
|
2881
2881
|
if (!(!U.current || !K.current))
|
|
2882
2882
|
try {
|
|
2883
2883
|
const l = (o = (c = U.current).getWorkbookContext) == null ? void 0 : o.call(c), h = l == null ? void 0 : l.luckysheetfile;
|
|
2884
|
-
Array.isArray(h) && h.some(
|
|
2884
|
+
Array.isArray(h) && h.some(oe) && Rt({
|
|
2885
2885
|
title: "Filters are not supported in Export",
|
|
2886
2886
|
variant: "warning",
|
|
2887
2887
|
showCloseButton: !0,
|
|
2888
2888
|
duration: 30 * 1e3
|
|
2889
2889
|
}), K.current.getArray(s);
|
|
2890
|
-
const b = U.current.getAllSheets();
|
|
2891
|
-
b.forEach((z) => Mt(z));
|
|
2892
|
-
const y = dt.book_new(), n = b.map(() => /* @__PURE__ */ new Map()), p = /* @__PURE__ */ new Set();
|
|
2890
|
+
const b = U.current.getAllSheets(), y = dt.book_new(), n = b.map(() => /* @__PURE__ */ new Map()), p = /* @__PURE__ */ new Set();
|
|
2893
2891
|
b.forEach((z, V) => {
|
|
2894
2892
|
var F, J, W, et, M;
|
|
2895
2893
|
const X = Wt(z), g = dt.aoa_to_sheet(X);
|
|
@@ -2938,7 +2936,7 @@ const Ct = (U) => {
|
|
|
2938
2936
|
ut && n[V].set($, ut);
|
|
2939
2937
|
}
|
|
2940
2938
|
if (N.ct && (N.ct.fa && (R.z = N.ct.fa), N.ct.t && N.ct.t !== "inlineStr" && (R.t = N.ct.t === "d" ? "n" : N.ct.t)), typeof R.v == "number" && !R.t && (R.t = "n"), R.s = R.s || {}, N.bg) {
|
|
2941
|
-
const ut =
|
|
2939
|
+
const ut = St(N.bg);
|
|
2942
2940
|
ut && (R.s.fill = {
|
|
2943
2941
|
patternType: "solid",
|
|
2944
2942
|
fgColor: { rgb: ut }
|
|
@@ -2953,7 +2951,7 @@ const Ct = (U) => {
|
|
|
2953
2951
|
sz: N.fs ?? 10,
|
|
2954
2952
|
name: N.ff ?? void 0,
|
|
2955
2953
|
color: (() => {
|
|
2956
|
-
const ut =
|
|
2954
|
+
const ut = St(N.fc);
|
|
2957
2955
|
return ut ? { rgb: ut } : void 0;
|
|
2958
2956
|
})()
|
|
2959
2957
|
};
|
|
@@ -2972,7 +2970,7 @@ const Ct = (U) => {
|
|
|
2972
2970
|
if (!R && !it) return;
|
|
2973
2971
|
const nt = { ...g[$] || {} };
|
|
2974
2972
|
if (nt.s = nt.s || {}, R && (nt.f = w.f.replace(/^=/, "")), w.bg) {
|
|
2975
|
-
const st =
|
|
2973
|
+
const st = St(w.bg);
|
|
2976
2974
|
st && (nt.s.fill = { patternType: "solid", fgColor: { rgb: st } });
|
|
2977
2975
|
}
|
|
2978
2976
|
nt.s.font = {
|
|
@@ -2984,7 +2982,7 @@ const Ct = (U) => {
|
|
|
2984
2982
|
sz: w.fs ?? 10,
|
|
2985
2983
|
name: w.ff ?? void 0,
|
|
2986
2984
|
color: (() => {
|
|
2987
|
-
const st =
|
|
2985
|
+
const st = St(w.fc);
|
|
2988
2986
|
return st ? { rgb: st } : void 0;
|
|
2989
2987
|
})()
|
|
2990
2988
|
};
|
|
@@ -3009,7 +3007,7 @@ const Ct = (U) => {
|
|
|
3009
3007
|
const it = Ot(w.ct.s);
|
|
3010
3008
|
it && n[V].set($, it);
|
|
3011
3009
|
});
|
|
3012
|
-
}), (M = z.config) != null && M.borderInfo &&
|
|
3010
|
+
}), (M = z.config) != null && M.borderInfo && Ht(g, z.config.borderInfo);
|
|
3013
3011
|
const e = z.name.length > 30 ? z.name.slice(0, 30) : z.name;
|
|
3014
3012
|
if (p.has(e)) {
|
|
3015
3013
|
const H = e !== z.name ? `"${z.name}" is too long and collides with another sheet after being shortened to "${e}"` : `Two sheets share the name "${z.name}"`;
|
|
@@ -3019,7 +3017,7 @@ const Ct = (U) => {
|
|
|
3019
3017
|
}
|
|
3020
3018
|
p.add(e), dt.book_append_sheet(y, g, e);
|
|
3021
3019
|
});
|
|
3022
|
-
const i = await (
|
|
3020
|
+
const i = await (C == null ? void 0 : C(s)) || "Untitled", d = Pt(y, {
|
|
3023
3021
|
bookType: "xlsx",
|
|
3024
3022
|
type: "array",
|
|
3025
3023
|
compression: !0
|
|
@@ -3033,11 +3031,11 @@ const Ct = (U) => {
|
|
|
3033
3031
|
b.forEach((z, V) => {
|
|
3034
3032
|
const X = u.worksheets[V];
|
|
3035
3033
|
if (!X) return;
|
|
3036
|
-
|
|
3034
|
+
se(X, n[V]);
|
|
3037
3035
|
const g = z.data;
|
|
3038
3036
|
Object.entries(z.hyperlink || {}).forEach(([et, M]) => {
|
|
3039
3037
|
var tt, rt, st, ot;
|
|
3040
|
-
const H =
|
|
3038
|
+
const H = Mt(M);
|
|
3041
3039
|
if (!(H != null && H.linkAddress)) return;
|
|
3042
3040
|
const [E, w] = et.split("_").map(Number);
|
|
3043
3041
|
if (Number.isNaN(E) || Number.isNaN(w)) return;
|
|
@@ -3050,7 +3048,7 @@ const Ct = (U) => {
|
|
|
3050
3048
|
hyperlink: H.linkAddress
|
|
3051
3049
|
};
|
|
3052
3050
|
});
|
|
3053
|
-
const { nextPriority: O, pendingDuplicateValues: e } =
|
|
3051
|
+
const { nextPriority: O, pendingDuplicateValues: e } = Kt(X, z, 1);
|
|
3054
3052
|
k[V] = { duplicateValues: e };
|
|
3055
3053
|
let F = O;
|
|
3056
3054
|
if (!z.dataVerification) return;
|
|
@@ -3121,7 +3119,7 @@ const Ct = (U) => {
|
|
|
3121
3119
|
O
|
|
3122
3120
|
);
|
|
3123
3121
|
});
|
|
3124
|
-
const A = await u.xlsx.writeBuffer(),
|
|
3122
|
+
const A = await u.xlsx.writeBuffer(), S = await ne(A, k), P = new Blob([S], {
|
|
3125
3123
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
3126
3124
|
}), B = URL.createObjectURL(P), Z = document.createElement("a");
|
|
3127
3125
|
Z.href = B, Z.download = `${i}.xlsx`, Z.click(), URL.revokeObjectURL(B);
|
|
@@ -3136,5 +3134,5 @@ const Ct = (U) => {
|
|
|
3136
3134
|
}
|
|
3137
3135
|
};
|
|
3138
3136
|
export {
|
|
3139
|
-
|
|
3137
|
+
me as handleExportToXLSX
|
|
3140
3138
|
};
|