bok-reader 0.1.5 → 0.1.6
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/bok.es.js +619 -619
- package/dist/bok.umd.js +37 -30
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/bok.es.js
CHANGED
|
@@ -25,43 +25,43 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
25
25
|
(function(p) {
|
|
26
26
|
X.exports = p();
|
|
27
27
|
})(function() {
|
|
28
|
-
return function p(A,
|
|
28
|
+
return function p(A, v, a) {
|
|
29
29
|
function o(g, y) {
|
|
30
|
-
if (!
|
|
30
|
+
if (!v[g]) {
|
|
31
31
|
if (!A[g]) {
|
|
32
32
|
var _ = typeof It == "function" && It;
|
|
33
33
|
if (!y && _) return _(g, !0);
|
|
34
34
|
if (r) return r(g, !0);
|
|
35
|
-
var
|
|
36
|
-
throw
|
|
35
|
+
var b = new Error("Cannot find module '" + g + "'");
|
|
36
|
+
throw b.code = "MODULE_NOT_FOUND", b;
|
|
37
37
|
}
|
|
38
|
-
var i =
|
|
38
|
+
var i = v[g] = { exports: {} };
|
|
39
39
|
A[g][0].call(i.exports, function(d) {
|
|
40
40
|
var n = A[g][1][d];
|
|
41
41
|
return o(n || d);
|
|
42
|
-
}, i, i.exports, p, A,
|
|
42
|
+
}, i, i.exports, p, A, v, a);
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return v[g].exports;
|
|
45
45
|
}
|
|
46
46
|
for (var r = typeof It == "function" && It, l = 0; l < a.length; l++) o(a[l]);
|
|
47
47
|
return o;
|
|
48
|
-
}({ 1: [function(p, A,
|
|
48
|
+
}({ 1: [function(p, A, v) {
|
|
49
49
|
var a = p("./utils"), o = p("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
50
|
-
|
|
51
|
-
for (var g, y, _,
|
|
50
|
+
v.encode = function(l) {
|
|
51
|
+
for (var g, y, _, b, i, d, n, c = [], s = 0, m = l.length, w = m, x = a.getTypeOf(l) !== "string"; s < l.length; ) w = m - s, _ = x ? (g = l[s++], y = s < m ? l[s++] : 0, s < m ? l[s++] : 0) : (g = l.charCodeAt(s++), y = s < m ? l.charCodeAt(s++) : 0, s < m ? l.charCodeAt(s++) : 0), b = g >> 2, i = (3 & g) << 4 | y >> 4, d = 1 < w ? (15 & y) << 2 | _ >> 6 : 64, n = 2 < w ? 63 & _ : 64, c.push(r.charAt(b) + r.charAt(i) + r.charAt(d) + r.charAt(n));
|
|
52
52
|
return c.join("");
|
|
53
|
-
},
|
|
54
|
-
var g, y, _,
|
|
53
|
+
}, v.decode = function(l) {
|
|
54
|
+
var g, y, _, b, i, d, n = 0, c = 0, s = "data:";
|
|
55
55
|
if (l.substr(0, s.length) === s) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
56
56
|
var m, w = 3 * (l = l.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
57
57
|
if (l.charAt(l.length - 1) === r.charAt(64) && w--, l.charAt(l.length - 2) === r.charAt(64) && w--, w % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
58
|
-
for (m = o.uint8array ? new Uint8Array(0 | w) : new Array(0 | w); n < l.length; ) g = r.indexOf(l.charAt(n++)) << 2 | (
|
|
58
|
+
for (m = o.uint8array ? new Uint8Array(0 | w) : new Array(0 | w); n < l.length; ) g = r.indexOf(l.charAt(n++)) << 2 | (b = r.indexOf(l.charAt(n++))) >> 4, y = (15 & b) << 4 | (i = r.indexOf(l.charAt(n++))) >> 2, _ = (3 & i) << 6 | (d = r.indexOf(l.charAt(n++))), m[c++] = g, i !== 64 && (m[c++] = y), d !== 64 && (m[c++] = _);
|
|
59
59
|
return m;
|
|
60
60
|
};
|
|
61
|
-
}, { "./support": 30, "./utils": 32 }], 2: [function(p, A,
|
|
61
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(p, A, v) {
|
|
62
62
|
var a = p("./external"), o = p("./stream/DataWorker"), r = p("./stream/Crc32Probe"), l = p("./stream/DataLengthProbe");
|
|
63
|
-
function g(y, _,
|
|
64
|
-
this.compressedSize = y, this.uncompressedSize = _, this.crc32 =
|
|
63
|
+
function g(y, _, b, i, d) {
|
|
64
|
+
this.compressedSize = y, this.uncompressedSize = _, this.crc32 = b, this.compression = i, this.compressedContent = d;
|
|
65
65
|
}
|
|
66
66
|
g.prototype = { getContentWorker: function() {
|
|
67
67
|
var y = new o(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")), _ = this;
|
|
@@ -70,17 +70,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
70
70
|
}), y;
|
|
71
71
|
}, getCompressedWorker: function() {
|
|
72
72
|
return new o(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
73
|
-
} }, g.createWorkerFrom = function(y, _,
|
|
74
|
-
return y.pipe(new r()).pipe(new l("uncompressedSize")).pipe(_.compressWorker(
|
|
73
|
+
} }, g.createWorkerFrom = function(y, _, b) {
|
|
74
|
+
return y.pipe(new r()).pipe(new l("uncompressedSize")).pipe(_.compressWorker(b)).pipe(new l("compressedSize")).withStreamInfo("compression", _);
|
|
75
75
|
}, A.exports = g;
|
|
76
|
-
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(p, A,
|
|
76
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(p, A, v) {
|
|
77
77
|
var a = p("./stream/GenericWorker");
|
|
78
|
-
|
|
78
|
+
v.STORE = { magic: "\0\0", compressWorker: function() {
|
|
79
79
|
return new a("STORE compression");
|
|
80
80
|
}, uncompressWorker: function() {
|
|
81
81
|
return new a("STORE decompression");
|
|
82
|
-
} },
|
|
83
|
-
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(p, A,
|
|
82
|
+
} }, v.DEFLATE = p("./flate");
|
|
83
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(p, A, v) {
|
|
84
84
|
var a = p("./utils"), o = function() {
|
|
85
85
|
for (var r, l = [], g = 0; g < 256; g++) {
|
|
86
86
|
r = g;
|
|
@@ -90,29 +90,29 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
90
90
|
return l;
|
|
91
91
|
}();
|
|
92
92
|
A.exports = function(r, l) {
|
|
93
|
-
return r !== void 0 && r.length ? a.getTypeOf(r) !== "string" ? function(g, y, _,
|
|
94
|
-
var i = o, d =
|
|
93
|
+
return r !== void 0 && r.length ? a.getTypeOf(r) !== "string" ? function(g, y, _, b) {
|
|
94
|
+
var i = o, d = b + _;
|
|
95
95
|
g ^= -1;
|
|
96
|
-
for (var n =
|
|
96
|
+
for (var n = b; n < d; n++) g = g >>> 8 ^ i[255 & (g ^ y[n])];
|
|
97
97
|
return -1 ^ g;
|
|
98
|
-
}(0 | l, r, r.length, 0) : function(g, y, _,
|
|
99
|
-
var i = o, d =
|
|
98
|
+
}(0 | l, r, r.length, 0) : function(g, y, _, b) {
|
|
99
|
+
var i = o, d = b + _;
|
|
100
100
|
g ^= -1;
|
|
101
|
-
for (var n =
|
|
101
|
+
for (var n = b; n < d; n++) g = g >>> 8 ^ i[255 & (g ^ y.charCodeAt(n))];
|
|
102
102
|
return -1 ^ g;
|
|
103
103
|
}(0 | l, r, r.length, 0) : 0;
|
|
104
104
|
};
|
|
105
|
-
}, { "./utils": 32 }], 5: [function(p, A,
|
|
106
|
-
|
|
107
|
-
}, {}], 6: [function(p, A,
|
|
105
|
+
}, { "./utils": 32 }], 5: [function(p, A, v) {
|
|
106
|
+
v.base64 = !1, v.binary = !1, v.dir = !1, v.createFolders = !0, v.date = null, v.compression = null, v.compressionOptions = null, v.comment = null, v.unixPermissions = null, v.dosPermissions = null;
|
|
107
|
+
}, {}], 6: [function(p, A, v) {
|
|
108
108
|
var a = null;
|
|
109
109
|
a = typeof Promise < "u" ? Promise : p("lie"), A.exports = { Promise: a };
|
|
110
|
-
}, { lie: 37 }], 7: [function(p, A,
|
|
110
|
+
}, { lie: 37 }], 7: [function(p, A, v) {
|
|
111
111
|
var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", o = p("pako"), r = p("./utils"), l = p("./stream/GenericWorker"), g = a ? "uint8array" : "array";
|
|
112
|
-
function y(_,
|
|
113
|
-
l.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions =
|
|
112
|
+
function y(_, b) {
|
|
113
|
+
l.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions = b, this.meta = {};
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
v.magic = "\b\0", r.inherits(y, l), y.prototype.processChunk = function(_) {
|
|
116
116
|
this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(r.transformTo(g, _.data), !1);
|
|
117
117
|
}, y.prototype.flush = function() {
|
|
118
118
|
l.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
@@ -121,51 +121,51 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
121
121
|
}, y.prototype._createPako = function() {
|
|
122
122
|
this._pako = new o[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
123
123
|
var _ = this;
|
|
124
|
-
this._pako.onData = function(
|
|
125
|
-
_.push({ data:
|
|
124
|
+
this._pako.onData = function(b) {
|
|
125
|
+
_.push({ data: b, meta: _.meta });
|
|
126
126
|
};
|
|
127
|
-
},
|
|
127
|
+
}, v.compressWorker = function(_) {
|
|
128
128
|
return new y("Deflate", _);
|
|
129
|
-
},
|
|
129
|
+
}, v.uncompressWorker = function() {
|
|
130
130
|
return new y("Inflate", {});
|
|
131
131
|
};
|
|
132
|
-
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(p, A,
|
|
132
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(p, A, v) {
|
|
133
133
|
function a(i, d) {
|
|
134
134
|
var n, c = "";
|
|
135
135
|
for (n = 0; n < d; n++) c += String.fromCharCode(255 & i), i >>>= 8;
|
|
136
136
|
return c;
|
|
137
137
|
}
|
|
138
138
|
function o(i, d, n, c, s, m) {
|
|
139
|
-
var w, x, S = i.file,
|
|
139
|
+
var w, x, S = i.file, D = i.compression, C = m !== g.utf8encode, F = r.transformTo("string", m(S.name)), E = r.transformTo("string", g.utf8encode(S.name)), z = S.comment, Z = r.transformTo("string", m(z)), h = r.transformTo("string", g.utf8encode(z)), B = E.length !== S.name.length, e = h.length !== z.length, P = "", V = "", L = "", Q = S.dir, W = S.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
140
140
|
d && !n || (tt.crc32 = i.crc32, tt.compressedSize = i.compressedSize, tt.uncompressedSize = i.uncompressedSize);
|
|
141
141
|
var T = 0;
|
|
142
|
-
d && (T |= 8),
|
|
142
|
+
d && (T |= 8), C || !B && !e || (T |= 2048);
|
|
143
143
|
var I = 0, J = 0;
|
|
144
144
|
Q && (I |= 16), s === "UNIX" ? (J = 798, I |= function(G, st) {
|
|
145
145
|
var ft = G;
|
|
146
146
|
return G || (ft = st ? 16893 : 33204), (65535 & ft) << 16;
|
|
147
147
|
}(S.unixPermissions, Q)) : (J = 20, I |= function(G) {
|
|
148
148
|
return 63 & (G || 0);
|
|
149
|
-
}(S.dosPermissions)), w = W.getUTCHours(), w <<= 6, w |= W.getUTCMinutes(), w <<= 5, w |= W.getUTCSeconds() / 2, x = W.getUTCFullYear() - 1980, x <<= 4, x |= W.getUTCMonth() + 1, x <<= 5, x |= W.getUTCDate(), B && (V = a(1, 1) + a(y(
|
|
149
|
+
}(S.dosPermissions)), w = W.getUTCHours(), w <<= 6, w |= W.getUTCMinutes(), w <<= 5, w |= W.getUTCSeconds() / 2, x = W.getUTCFullYear() - 1980, x <<= 4, x |= W.getUTCMonth() + 1, x <<= 5, x |= W.getUTCDate(), B && (V = a(1, 1) + a(y(F), 4) + E, P += "up" + a(V.length, 2) + V), e && (L = a(1, 1) + a(y(Z), 4) + h, P += "uc" + a(L.length, 2) + L);
|
|
150
150
|
var q = "";
|
|
151
151
|
return q += `
|
|
152
|
-
\0`, q += a(T, 2), q +=
|
|
152
|
+
\0`, q += a(T, 2), q += D.magic, q += a(w, 2), q += a(x, 2), q += a(tt.crc32, 4), q += a(tt.compressedSize, 4), q += a(tt.uncompressedSize, 4), q += a(F.length, 2), q += a(P.length, 2), { fileRecord: _.LOCAL_FILE_HEADER + q + F + P, dirRecord: _.CENTRAL_FILE_HEADER + a(J, 2) + q + a(Z.length, 2) + "\0\0\0\0" + a(I, 4) + a(c, 4) + F + P + Z };
|
|
153
153
|
}
|
|
154
154
|
var r = p("../utils"), l = p("../stream/GenericWorker"), g = p("../utf8"), y = p("../crc32"), _ = p("../signature");
|
|
155
|
-
function
|
|
155
|
+
function b(i, d, n, c) {
|
|
156
156
|
l.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = d, this.zipPlatform = n, this.encodeFileName = c, this.streamFiles = i, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
157
157
|
}
|
|
158
|
-
r.inherits(
|
|
158
|
+
r.inherits(b, l), b.prototype.push = function(i) {
|
|
159
159
|
var d = i.meta.percent || 0, n = this.entriesCount, c = this._sources.length;
|
|
160
160
|
this.accumulate ? this.contentBuffer.push(i) : (this.bytesWritten += i.data.length, l.prototype.push.call(this, { data: i.data, meta: { currentFile: this.currentFile, percent: n ? (d + 100 * (n - c - 1)) / n : 100 } }));
|
|
161
|
-
},
|
|
161
|
+
}, b.prototype.openedSource = function(i) {
|
|
162
162
|
this.currentSourceOffset = this.bytesWritten, this.currentFile = i.file.name;
|
|
163
163
|
var d = this.streamFiles && !i.file.dir;
|
|
164
164
|
if (d) {
|
|
165
165
|
var n = o(i, d, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
166
166
|
this.push({ data: n.fileRecord, meta: { percent: 0 } });
|
|
167
167
|
} else this.accumulate = !0;
|
|
168
|
-
},
|
|
168
|
+
}, b.prototype.closedSource = function(i) {
|
|
169
169
|
this.accumulate = !1;
|
|
170
170
|
var d = this.streamFiles && !i.file.dir, n = o(i, d, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
171
171
|
if (this.dirRecords.push(n.dirRecord), d) this.push({ data: function(c) {
|
|
@@ -173,16 +173,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
173
173
|
}(i), meta: { percent: 100 } });
|
|
174
174
|
else for (this.push({ data: n.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
175
175
|
this.currentFile = null;
|
|
176
|
-
},
|
|
176
|
+
}, b.prototype.flush = function() {
|
|
177
177
|
for (var i = this.bytesWritten, d = 0; d < this.dirRecords.length; d++) this.push({ data: this.dirRecords[d], meta: { percent: 100 } });
|
|
178
178
|
var n = this.bytesWritten - i, c = function(s, m, w, x, S) {
|
|
179
|
-
var
|
|
180
|
-
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(s, 2) + a(s, 2) + a(m, 4) + a(w, 4) + a(
|
|
179
|
+
var D = r.transformTo("string", S(x));
|
|
180
|
+
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(s, 2) + a(s, 2) + a(m, 4) + a(w, 4) + a(D.length, 2) + D;
|
|
181
181
|
}(this.dirRecords.length, n, i, this.zipComment, this.encodeFileName);
|
|
182
182
|
this.push({ data: c, meta: { percent: 100 } });
|
|
183
|
-
},
|
|
183
|
+
}, b.prototype.prepareNextSource = function() {
|
|
184
184
|
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
185
|
-
},
|
|
185
|
+
}, b.prototype.registerPrevious = function(i) {
|
|
186
186
|
this._sources.push(i);
|
|
187
187
|
var d = this;
|
|
188
188
|
return i.on("data", function(n) {
|
|
@@ -192,9 +192,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
192
192
|
}), i.on("error", function(n) {
|
|
193
193
|
d.error(n);
|
|
194
194
|
}), this;
|
|
195
|
-
},
|
|
195
|
+
}, b.prototype.resume = function() {
|
|
196
196
|
return !!l.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
197
|
-
},
|
|
197
|
+
}, b.prototype.error = function(i) {
|
|
198
198
|
var d = this._sources;
|
|
199
199
|
if (!l.prototype.error.call(this, i)) return !1;
|
|
200
200
|
for (var n = 0; n < d.length; n++) try {
|
|
@@ -202,30 +202,30 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
202
202
|
} catch {
|
|
203
203
|
}
|
|
204
204
|
return !0;
|
|
205
|
-
},
|
|
205
|
+
}, b.prototype.lock = function() {
|
|
206
206
|
l.prototype.lock.call(this);
|
|
207
207
|
for (var i = this._sources, d = 0; d < i.length; d++) i[d].lock();
|
|
208
|
-
}, A.exports =
|
|
209
|
-
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(p, A,
|
|
208
|
+
}, A.exports = b;
|
|
209
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(p, A, v) {
|
|
210
210
|
var a = p("../compressions"), o = p("./ZipFileWorker");
|
|
211
|
-
|
|
211
|
+
v.generateWorker = function(r, l, g) {
|
|
212
212
|
var y = new o(l.streamFiles, g, l.platform, l.encodeFileName), _ = 0;
|
|
213
213
|
try {
|
|
214
|
-
r.forEach(function(
|
|
214
|
+
r.forEach(function(b, i) {
|
|
215
215
|
_++;
|
|
216
216
|
var d = function(m, w) {
|
|
217
217
|
var x = m || w, S = a[x];
|
|
218
218
|
if (!S) throw new Error(x + " is not a valid compression method !");
|
|
219
219
|
return S;
|
|
220
220
|
}(i.options.compression, l.compression), n = i.options.compressionOptions || l.compressionOptions || {}, c = i.dir, s = i.date;
|
|
221
|
-
i._compressWorker(d, n).withStreamInfo("file", { name:
|
|
221
|
+
i._compressWorker(d, n).withStreamInfo("file", { name: b, dir: c, date: s, comment: i.comment || "", unixPermissions: i.unixPermissions, dosPermissions: i.dosPermissions }).pipe(y);
|
|
222
222
|
}), y.entriesCount = _;
|
|
223
|
-
} catch (
|
|
224
|
-
y.error(
|
|
223
|
+
} catch (b) {
|
|
224
|
+
y.error(b);
|
|
225
225
|
}
|
|
226
226
|
return y;
|
|
227
227
|
};
|
|
228
|
-
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(p, A,
|
|
228
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(p, A, v) {
|
|
229
229
|
function a() {
|
|
230
230
|
if (!(this instanceof a)) return new a();
|
|
231
231
|
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -238,21 +238,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
238
238
|
(a.prototype = p("./object")).loadAsync = p("./load"), a.support = p("./support"), a.defaults = p("./defaults"), a.version = "3.10.1", a.loadAsync = function(o, r) {
|
|
239
239
|
return new a().loadAsync(o, r);
|
|
240
240
|
}, a.external = p("./external"), A.exports = a;
|
|
241
|
-
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(p, A,
|
|
241
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(p, A, v) {
|
|
242
242
|
var a = p("./utils"), o = p("./external"), r = p("./utf8"), l = p("./zipEntries"), g = p("./stream/Crc32Probe"), y = p("./nodejsUtils");
|
|
243
|
-
function _(
|
|
243
|
+
function _(b) {
|
|
244
244
|
return new o.Promise(function(i, d) {
|
|
245
|
-
var n =
|
|
245
|
+
var n = b.decompressed.getContentWorker().pipe(new g());
|
|
246
246
|
n.on("error", function(c) {
|
|
247
247
|
d(c);
|
|
248
248
|
}).on("end", function() {
|
|
249
|
-
n.streamInfo.crc32 !==
|
|
249
|
+
n.streamInfo.crc32 !== b.decompressed.crc32 ? d(new Error("Corrupted zip : CRC32 mismatch")) : i();
|
|
250
250
|
}).resume();
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
A.exports = function(
|
|
253
|
+
A.exports = function(b, i) {
|
|
254
254
|
var d = this;
|
|
255
|
-
return i = a.extend(i || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), y.isNode && y.isStream(
|
|
255
|
+
return i = a.extend(i || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), y.isNode && y.isStream(b) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : a.prepareContent("the loaded zip file", b, !0, i.optimizedBinaryString, i.base64).then(function(n) {
|
|
256
256
|
var c = new l(i);
|
|
257
257
|
return c.load(n), c;
|
|
258
258
|
}).then(function(n) {
|
|
@@ -267,7 +267,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
267
267
|
return c.zipComment.length && (d.comment = c.zipComment), d;
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
|
-
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(p, A,
|
|
270
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(p, A, v) {
|
|
271
271
|
var a = p("../utils"), o = p("../stream/GenericWorker");
|
|
272
272
|
function r(l, g) {
|
|
273
273
|
o.call(this, "Nodejs stream input adapter for " + l), this._upstreamEnded = !1, this._bindStream(g);
|
|
@@ -286,13 +286,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
286
286
|
}, r.prototype.resume = function() {
|
|
287
287
|
return !!o.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
288
288
|
}, A.exports = r;
|
|
289
|
-
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(p, A,
|
|
289
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(p, A, v) {
|
|
290
290
|
var a = p("readable-stream").Readable;
|
|
291
291
|
function o(r, l, g) {
|
|
292
292
|
a.call(this, l), this._helper = r;
|
|
293
293
|
var y = this;
|
|
294
|
-
r.on("data", function(_,
|
|
295
|
-
y.push(_) || y._helper.pause(), g && g(
|
|
294
|
+
r.on("data", function(_, b) {
|
|
295
|
+
y.push(_) || y._helper.pause(), g && g(b);
|
|
296
296
|
}).on("error", function(_) {
|
|
297
297
|
y.emit("error", _);
|
|
298
298
|
}).on("end", function() {
|
|
@@ -302,7 +302,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
302
302
|
p("../utils").inherits(o, a), o.prototype._read = function() {
|
|
303
303
|
this._helper.resume();
|
|
304
304
|
}, A.exports = o;
|
|
305
|
-
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(p, A,
|
|
305
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(p, A, v) {
|
|
306
306
|
A.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(a, o) {
|
|
307
307
|
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(a, o);
|
|
308
308
|
if (typeof a == "number") throw new Error('The "data" argument must not be a number');
|
|
@@ -316,25 +316,25 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
316
316
|
}, isStream: function(a) {
|
|
317
317
|
return a && typeof a.on == "function" && typeof a.pause == "function" && typeof a.resume == "function";
|
|
318
318
|
} };
|
|
319
|
-
}, {}], 15: [function(p, A,
|
|
320
|
-
function a(S,
|
|
321
|
-
var
|
|
322
|
-
z.date = z.date || /* @__PURE__ */ new Date(), z.compression !== null && (z.compression = z.compression.toUpperCase()), typeof z.unixPermissions == "string" && (z.unixPermissions = parseInt(z.unixPermissions, 8)), z.unixPermissions && 16384 & z.unixPermissions && (z.dir = !0), z.dosPermissions && 16 & z.dosPermissions && (z.dir = !0), z.dir && (S = s(S)), z.createFolders && (
|
|
323
|
-
var Z =
|
|
324
|
-
|
|
319
|
+
}, {}], 15: [function(p, A, v) {
|
|
320
|
+
function a(S, D, C) {
|
|
321
|
+
var F, E = r.getTypeOf(D), z = r.extend(C || {}, y);
|
|
322
|
+
z.date = z.date || /* @__PURE__ */ new Date(), z.compression !== null && (z.compression = z.compression.toUpperCase()), typeof z.unixPermissions == "string" && (z.unixPermissions = parseInt(z.unixPermissions, 8)), z.unixPermissions && 16384 & z.unixPermissions && (z.dir = !0), z.dosPermissions && 16 & z.dosPermissions && (z.dir = !0), z.dir && (S = s(S)), z.createFolders && (F = c(S)) && m.call(this, F, !0);
|
|
323
|
+
var Z = E === "string" && z.binary === !1 && z.base64 === !1;
|
|
324
|
+
C && C.binary !== void 0 || (z.binary = !Z), (D instanceof _ && D.uncompressedSize === 0 || z.dir || !D || D.length === 0) && (z.base64 = !1, z.binary = !0, D = "", z.compression = "STORE", E = "string");
|
|
325
325
|
var h = null;
|
|
326
|
-
h =
|
|
327
|
-
var B = new
|
|
326
|
+
h = D instanceof _ || D instanceof l ? D : d.isNode && d.isStream(D) ? new n(S, D) : r.prepareContent(S, D, z.binary, z.optimizedBinaryString, z.base64);
|
|
327
|
+
var B = new b(S, h, z);
|
|
328
328
|
this.files[S] = B;
|
|
329
329
|
}
|
|
330
|
-
var o = p("./utf8"), r = p("./utils"), l = p("./stream/GenericWorker"), g = p("./stream/StreamHelper"), y = p("./defaults"), _ = p("./compressedObject"),
|
|
330
|
+
var o = p("./utf8"), r = p("./utils"), l = p("./stream/GenericWorker"), g = p("./stream/StreamHelper"), y = p("./defaults"), _ = p("./compressedObject"), b = p("./zipObject"), i = p("./generate"), d = p("./nodejsUtils"), n = p("./nodejs/NodejsStreamInputAdapter"), c = function(S) {
|
|
331
331
|
S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
|
|
332
|
-
var
|
|
333
|
-
return 0 <
|
|
332
|
+
var D = S.lastIndexOf("/");
|
|
333
|
+
return 0 < D ? S.substring(0, D) : "";
|
|
334
334
|
}, s = function(S) {
|
|
335
335
|
return S.slice(-1) !== "/" && (S += "/"), S;
|
|
336
|
-
}, m = function(S,
|
|
337
|
-
return
|
|
336
|
+
}, m = function(S, D) {
|
|
337
|
+
return D = D !== void 0 ? D : y.createFolders, S = s(S), this.files[S] || a.call(this, S, null, { dir: !0, createFolders: D }), this.files[S];
|
|
338
338
|
};
|
|
339
339
|
function w(S) {
|
|
340
340
|
return Object.prototype.toString.call(S) === "[object RegExp]";
|
|
@@ -342,60 +342,60 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
342
342
|
var x = { load: function() {
|
|
343
343
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
344
344
|
}, forEach: function(S) {
|
|
345
|
-
var
|
|
346
|
-
for (
|
|
345
|
+
var D, C, F;
|
|
346
|
+
for (D in this.files) F = this.files[D], (C = D.slice(this.root.length, D.length)) && D.slice(0, this.root.length) === this.root && S(C, F);
|
|
347
347
|
}, filter: function(S) {
|
|
348
|
-
var
|
|
349
|
-
return this.forEach(function(
|
|
350
|
-
S(
|
|
351
|
-
}),
|
|
352
|
-
}, file: function(S,
|
|
353
|
-
if (arguments.length !== 1) return S = this.root + S, a.call(this, S,
|
|
348
|
+
var D = [];
|
|
349
|
+
return this.forEach(function(C, F) {
|
|
350
|
+
S(C, F) && D.push(F);
|
|
351
|
+
}), D;
|
|
352
|
+
}, file: function(S, D, C) {
|
|
353
|
+
if (arguments.length !== 1) return S = this.root + S, a.call(this, S, D, C), this;
|
|
354
354
|
if (w(S)) {
|
|
355
|
-
var
|
|
355
|
+
var F = S;
|
|
356
356
|
return this.filter(function(z, Z) {
|
|
357
|
-
return !Z.dir &&
|
|
357
|
+
return !Z.dir && F.test(z);
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
var
|
|
361
|
-
return
|
|
360
|
+
var E = this.files[this.root + S];
|
|
361
|
+
return E && !E.dir ? E : null;
|
|
362
362
|
}, folder: function(S) {
|
|
363
363
|
if (!S) return this;
|
|
364
|
-
if (w(S)) return this.filter(function(
|
|
365
|
-
return z.dir && S.test(
|
|
364
|
+
if (w(S)) return this.filter(function(E, z) {
|
|
365
|
+
return z.dir && S.test(E);
|
|
366
366
|
});
|
|
367
|
-
var
|
|
368
|
-
return
|
|
367
|
+
var D = this.root + S, C = m.call(this, D), F = this.clone();
|
|
368
|
+
return F.root = C.name, F;
|
|
369
369
|
}, remove: function(S) {
|
|
370
370
|
S = this.root + S;
|
|
371
|
-
var
|
|
372
|
-
if (
|
|
373
|
-
else for (var
|
|
371
|
+
var D = this.files[S];
|
|
372
|
+
if (D || (S.slice(-1) !== "/" && (S += "/"), D = this.files[S]), D && !D.dir) delete this.files[S];
|
|
373
|
+
else for (var C = this.filter(function(E, z) {
|
|
374
374
|
return z.name.slice(0, S.length) === S;
|
|
375
|
-
}),
|
|
375
|
+
}), F = 0; F < C.length; F++) delete this.files[C[F].name];
|
|
376
376
|
return this;
|
|
377
377
|
}, generate: function() {
|
|
378
378
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
379
379
|
}, generateInternalStream: function(S) {
|
|
380
|
-
var
|
|
380
|
+
var D, C = {};
|
|
381
381
|
try {
|
|
382
|
-
if ((
|
|
383
|
-
r.checkSupport(
|
|
384
|
-
var
|
|
385
|
-
|
|
386
|
-
} catch (
|
|
387
|
-
(
|
|
382
|
+
if ((C = r.extend(S || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: o.utf8encode })).type = C.type.toLowerCase(), C.compression = C.compression.toUpperCase(), C.type === "binarystring" && (C.type = "string"), !C.type) throw new Error("No output type specified.");
|
|
383
|
+
r.checkSupport(C.type), C.platform !== "darwin" && C.platform !== "freebsd" && C.platform !== "linux" && C.platform !== "sunos" || (C.platform = "UNIX"), C.platform === "win32" && (C.platform = "DOS");
|
|
384
|
+
var F = C.comment || this.comment || "";
|
|
385
|
+
D = i.generateWorker(this, C, F);
|
|
386
|
+
} catch (E) {
|
|
387
|
+
(D = new l("error")).error(E);
|
|
388
388
|
}
|
|
389
|
-
return new g(
|
|
390
|
-
}, generateAsync: function(S,
|
|
391
|
-
return this.generateInternalStream(S).accumulate(
|
|
392
|
-
}, generateNodeStream: function(S,
|
|
393
|
-
return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(
|
|
389
|
+
return new g(D, C.type || "string", C.mimeType);
|
|
390
|
+
}, generateAsync: function(S, D) {
|
|
391
|
+
return this.generateInternalStream(S).accumulate(D);
|
|
392
|
+
}, generateNodeStream: function(S, D) {
|
|
393
|
+
return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(D);
|
|
394
394
|
} };
|
|
395
395
|
A.exports = x;
|
|
396
|
-
}, { "./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(p, A,
|
|
396
|
+
}, { "./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(p, A, v) {
|
|
397
397
|
A.exports = p("stream");
|
|
398
|
-
}, { stream: void 0 }], 17: [function(p, A,
|
|
398
|
+
}, { stream: void 0 }], 17: [function(p, A, v) {
|
|
399
399
|
var a = p("./DataReader");
|
|
400
400
|
function o(r) {
|
|
401
401
|
a.call(this, r);
|
|
@@ -404,17 +404,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
404
404
|
p("../utils").inherits(o, a), o.prototype.byteAt = function(r) {
|
|
405
405
|
return this.data[this.zero + r];
|
|
406
406
|
}, o.prototype.lastIndexOfSignature = function(r) {
|
|
407
|
-
for (var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3),
|
|
407
|
+
for (var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), b = this.length - 4; 0 <= b; --b) if (this.data[b] === l && this.data[b + 1] === g && this.data[b + 2] === y && this.data[b + 3] === _) return b - this.zero;
|
|
408
408
|
return -1;
|
|
409
409
|
}, o.prototype.readAndCheckSignature = function(r) {
|
|
410
|
-
var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3),
|
|
411
|
-
return l ===
|
|
410
|
+
var l = r.charCodeAt(0), g = r.charCodeAt(1), y = r.charCodeAt(2), _ = r.charCodeAt(3), b = this.readData(4);
|
|
411
|
+
return l === b[0] && g === b[1] && y === b[2] && _ === b[3];
|
|
412
412
|
}, o.prototype.readData = function(r) {
|
|
413
413
|
if (this.checkOffset(r), r === 0) return [];
|
|
414
414
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
415
415
|
return this.index += r, l;
|
|
416
416
|
}, A.exports = o;
|
|
417
|
-
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(p, A,
|
|
417
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(p, A, v) {
|
|
418
418
|
var a = p("../utils");
|
|
419
419
|
function o(r) {
|
|
420
420
|
this.data = r, this.length = r.length, this.index = 0, this.zero = 0;
|
|
@@ -441,7 +441,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
441
441
|
var r = this.readInt(4);
|
|
442
442
|
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));
|
|
443
443
|
} }, A.exports = o;
|
|
444
|
-
}, { "../utils": 32 }], 19: [function(p, A,
|
|
444
|
+
}, { "../utils": 32 }], 19: [function(p, A, v) {
|
|
445
445
|
var a = p("./Uint8ArrayReader");
|
|
446
446
|
function o(r) {
|
|
447
447
|
a.call(this, r);
|
|
@@ -451,7 +451,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
451
451
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
452
452
|
return this.index += r, l;
|
|
453
453
|
}, A.exports = o;
|
|
454
|
-
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(p, A,
|
|
454
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(p, A, v) {
|
|
455
455
|
var a = p("./DataReader");
|
|
456
456
|
function o(r) {
|
|
457
457
|
a.call(this, r);
|
|
@@ -467,7 +467,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
467
467
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
468
468
|
return this.index += r, l;
|
|
469
469
|
}, A.exports = o;
|
|
470
|
-
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(p, A,
|
|
470
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(p, A, v) {
|
|
471
471
|
var a = p("./ArrayReader");
|
|
472
472
|
function o(r) {
|
|
473
473
|
a.call(this, r);
|
|
@@ -477,15 +477,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
477
477
|
var l = this.data.subarray(this.zero + this.index, this.zero + this.index + r);
|
|
478
478
|
return this.index += r, l;
|
|
479
479
|
}, A.exports = o;
|
|
480
|
-
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(p, A,
|
|
480
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(p, A, v) {
|
|
481
481
|
var a = p("../utils"), o = p("../support"), r = p("./ArrayReader"), l = p("./StringReader"), g = p("./NodeBufferReader"), y = p("./Uint8ArrayReader");
|
|
482
482
|
A.exports = function(_) {
|
|
483
|
-
var
|
|
484
|
-
return a.checkSupport(
|
|
483
|
+
var b = a.getTypeOf(_);
|
|
484
|
+
return a.checkSupport(b), b !== "string" || o.uint8array ? b === "nodebuffer" ? new g(_) : o.uint8array ? new y(a.transformTo("uint8array", _)) : new r(a.transformTo("array", _)) : new l(_);
|
|
485
485
|
};
|
|
486
|
-
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(p, A,
|
|
487
|
-
|
|
488
|
-
}, {}], 24: [function(p, A,
|
|
486
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(p, A, v) {
|
|
487
|
+
v.LOCAL_FILE_HEADER = "PK", v.CENTRAL_FILE_HEADER = "PK", v.CENTRAL_DIRECTORY_END = "PK", v.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", v.ZIP64_CENTRAL_DIRECTORY_END = "PK", v.DATA_DESCRIPTOR = "PK\x07\b";
|
|
488
|
+
}, {}], 24: [function(p, A, v) {
|
|
489
489
|
var a = p("./GenericWorker"), o = p("../utils");
|
|
490
490
|
function r(l) {
|
|
491
491
|
a.call(this, "ConvertWorker to " + l), this.destType = l;
|
|
@@ -493,7 +493,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
493
493
|
o.inherits(r, a), r.prototype.processChunk = function(l) {
|
|
494
494
|
this.push({ data: o.transformTo(this.destType, l.data), meta: l.meta });
|
|
495
495
|
}, A.exports = r;
|
|
496
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(p, A,
|
|
496
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(p, A, v) {
|
|
497
497
|
var a = p("./GenericWorker"), o = p("../crc32");
|
|
498
498
|
function r() {
|
|
499
499
|
a.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
@@ -501,7 +501,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
501
501
|
p("../utils").inherits(r, a), r.prototype.processChunk = function(l) {
|
|
502
502
|
this.streamInfo.crc32 = o(l.data, this.streamInfo.crc32 || 0), this.push(l);
|
|
503
503
|
}, A.exports = r;
|
|
504
|
-
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(p, A,
|
|
504
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(p, A, v) {
|
|
505
505
|
var a = p("../utils"), o = p("./GenericWorker");
|
|
506
506
|
function r(l) {
|
|
507
507
|
o.call(this, "DataLengthProbe for " + l), this.propName = l, this.withStreamInfo(l, 0);
|
|
@@ -513,7 +513,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
513
513
|
}
|
|
514
514
|
o.prototype.processChunk.call(this, l);
|
|
515
515
|
}, A.exports = r;
|
|
516
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(p, A,
|
|
516
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(p, A, v) {
|
|
517
517
|
var a = p("../utils"), o = p("./GenericWorker");
|
|
518
518
|
function r(l) {
|
|
519
519
|
o.call(this, "DataWorker");
|
|
@@ -547,7 +547,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
547
547
|
}
|
|
548
548
|
return this.index = g, this.push({ data: l, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
549
549
|
}, A.exports = r;
|
|
550
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(p, A,
|
|
550
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(p, A, v) {
|
|
551
551
|
function a(o) {
|
|
552
552
|
this.name = o || "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;
|
|
553
553
|
}
|
|
@@ -603,50 +603,50 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
603
603
|
var o = "Worker " + this.name;
|
|
604
604
|
return this.previous ? this.previous + " -> " + o : o;
|
|
605
605
|
} }, A.exports = a;
|
|
606
|
-
}, {}], 29: [function(p, A,
|
|
606
|
+
}, {}], 29: [function(p, A, v) {
|
|
607
607
|
var a = p("../utils"), o = p("./ConvertWorker"), r = p("./GenericWorker"), l = p("../base64"), g = p("../support"), y = p("../external"), _ = null;
|
|
608
608
|
if (g.nodestream) try {
|
|
609
609
|
_ = p("../nodejs/NodejsStreamOutputAdapter");
|
|
610
610
|
} catch {
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function b(d, n) {
|
|
613
613
|
return new y.Promise(function(c, s) {
|
|
614
614
|
var m = [], w = d._internalType, x = d._outputType, S = d._mimeType;
|
|
615
|
-
d.on("data", function(
|
|
616
|
-
m.push(
|
|
617
|
-
}).on("error", function(
|
|
618
|
-
m = [], s(
|
|
615
|
+
d.on("data", function(D, C) {
|
|
616
|
+
m.push(D), n && n(C);
|
|
617
|
+
}).on("error", function(D) {
|
|
618
|
+
m = [], s(D);
|
|
619
619
|
}).on("end", function() {
|
|
620
620
|
try {
|
|
621
|
-
var
|
|
622
|
-
switch (
|
|
621
|
+
var D = function(C, F, E) {
|
|
622
|
+
switch (C) {
|
|
623
623
|
case "blob":
|
|
624
|
-
return a.newBlob(a.transformTo("arraybuffer",
|
|
624
|
+
return a.newBlob(a.transformTo("arraybuffer", F), E);
|
|
625
625
|
case "base64":
|
|
626
|
-
return l.encode(
|
|
626
|
+
return l.encode(F);
|
|
627
627
|
default:
|
|
628
|
-
return a.transformTo(
|
|
628
|
+
return a.transformTo(C, F);
|
|
629
629
|
}
|
|
630
|
-
}(x, function(
|
|
631
|
-
var
|
|
632
|
-
for (
|
|
633
|
-
switch (
|
|
630
|
+
}(x, function(C, F) {
|
|
631
|
+
var E, z = 0, Z = null, h = 0;
|
|
632
|
+
for (E = 0; E < F.length; E++) h += F[E].length;
|
|
633
|
+
switch (C) {
|
|
634
634
|
case "string":
|
|
635
|
-
return
|
|
635
|
+
return F.join("");
|
|
636
636
|
case "array":
|
|
637
|
-
return Array.prototype.concat.apply([],
|
|
637
|
+
return Array.prototype.concat.apply([], F);
|
|
638
638
|
case "uint8array":
|
|
639
|
-
for (Z = new Uint8Array(h),
|
|
639
|
+
for (Z = new Uint8Array(h), E = 0; E < F.length; E++) Z.set(F[E], z), z += F[E].length;
|
|
640
640
|
return Z;
|
|
641
641
|
case "nodebuffer":
|
|
642
|
-
return Buffer.concat(
|
|
642
|
+
return Buffer.concat(F);
|
|
643
643
|
default:
|
|
644
|
-
throw new Error("concat : unsupported type '" +
|
|
644
|
+
throw new Error("concat : unsupported type '" + C + "'");
|
|
645
645
|
}
|
|
646
646
|
}(w, m), S);
|
|
647
|
-
c(
|
|
648
|
-
} catch (
|
|
649
|
-
s(
|
|
647
|
+
c(D);
|
|
648
|
+
} catch (C) {
|
|
649
|
+
s(C);
|
|
650
650
|
}
|
|
651
651
|
m = [];
|
|
652
652
|
}).resume();
|
|
@@ -669,7 +669,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
i.prototype = { accumulate: function(d) {
|
|
672
|
-
return
|
|
672
|
+
return b(this, d);
|
|
673
673
|
}, on: function(d, n) {
|
|
674
674
|
var c = this;
|
|
675
675
|
return d === "data" ? this._worker.on(d, function(s) {
|
|
@@ -685,43 +685,43 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
685
685
|
if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
686
686
|
return new _(this, { objectMode: this._outputType !== "nodebuffer" }, d);
|
|
687
687
|
} }, A.exports = i;
|
|
688
|
-
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(p, A,
|
|
689
|
-
if (
|
|
688
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(p, A, v) {
|
|
689
|
+
if (v.base64 = !0, v.array = !0, v.string = !0, v.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", v.nodebuffer = typeof Buffer < "u", v.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") v.blob = !1;
|
|
690
690
|
else {
|
|
691
691
|
var a = new ArrayBuffer(0);
|
|
692
692
|
try {
|
|
693
|
-
|
|
693
|
+
v.blob = new Blob([a], { type: "application/zip" }).size === 0;
|
|
694
694
|
} catch {
|
|
695
695
|
try {
|
|
696
696
|
var o = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
697
|
-
o.append(a),
|
|
697
|
+
o.append(a), v.blob = o.getBlob("application/zip").size === 0;
|
|
698
698
|
} catch {
|
|
699
|
-
|
|
699
|
+
v.blob = !1;
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
try {
|
|
704
|
-
|
|
704
|
+
v.nodestream = !!p("readable-stream").Readable;
|
|
705
705
|
} catch {
|
|
706
|
-
|
|
706
|
+
v.nodestream = !1;
|
|
707
707
|
}
|
|
708
|
-
}, { "readable-stream": 16 }], 31: [function(p, A,
|
|
708
|
+
}, { "readable-stream": 16 }], 31: [function(p, A, v) {
|
|
709
709
|
for (var a = p("./utils"), o = p("./support"), r = p("./nodejsUtils"), l = p("./stream/GenericWorker"), g = new Array(256), y = 0; y < 256; y++) g[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
|
|
710
710
|
g[254] = g[254] = 1;
|
|
711
711
|
function _() {
|
|
712
712
|
l.call(this, "utf-8 decode"), this.leftOver = null;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function b() {
|
|
715
715
|
l.call(this, "utf-8 encode");
|
|
716
716
|
}
|
|
717
|
-
|
|
717
|
+
v.utf8encode = function(i) {
|
|
718
718
|
return o.nodebuffer ? r.newBufferFrom(i, "utf-8") : function(d) {
|
|
719
719
|
var n, c, s, m, w, x = d.length, S = 0;
|
|
720
720
|
for (m = 0; m < x; m++) (64512 & (c = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (s = d.charCodeAt(m + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (s - 56320), m++), S += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4;
|
|
721
721
|
for (n = o.uint8array ? new Uint8Array(S) : new Array(S), m = w = 0; w < S; m++) (64512 & (c = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (s = d.charCodeAt(m + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (s - 56320), m++), c < 128 ? n[w++] = c : (c < 2048 ? n[w++] = 192 | c >>> 6 : (c < 65536 ? n[w++] = 224 | c >>> 12 : (n[w++] = 240 | c >>> 18, n[w++] = 128 | c >>> 12 & 63), n[w++] = 128 | c >>> 6 & 63), n[w++] = 128 | 63 & c);
|
|
722
722
|
return n;
|
|
723
723
|
}(i);
|
|
724
|
-
},
|
|
724
|
+
}, v.utf8decode = function(i) {
|
|
725
725
|
return o.nodebuffer ? a.transformTo("nodebuffer", i).toString("utf-8") : function(d) {
|
|
726
726
|
var n, c, s, m, w = d.length, x = new Array(2 * w);
|
|
727
727
|
for (n = c = 0; n < w; ) if ((s = d[n++]) < 128) x[c++] = s;
|
|
@@ -746,13 +746,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
746
746
|
for ((w = w || m.length) > m.length && (w = m.length), x = w - 1; 0 <= x && (192 & m[x]) == 128; ) x--;
|
|
747
747
|
return x < 0 || x === 0 ? w : x + g[m[x]] > w ? x : w;
|
|
748
748
|
}(d), s = d;
|
|
749
|
-
c !== d.length && (o.uint8array ? (s = d.subarray(0, c), this.leftOver = d.subarray(c, d.length)) : (s = d.slice(0, c), this.leftOver = d.slice(c, d.length))), this.push({ data:
|
|
749
|
+
c !== d.length && (o.uint8array ? (s = d.subarray(0, c), this.leftOver = d.subarray(c, d.length)) : (s = d.slice(0, c), this.leftOver = d.slice(c, d.length))), this.push({ data: v.utf8decode(s), meta: i.meta });
|
|
750
750
|
}, _.prototype.flush = function() {
|
|
751
|
-
this.leftOver && this.leftOver.length && (this.push({ data:
|
|
752
|
-
},
|
|
753
|
-
this.push({ data:
|
|
754
|
-
},
|
|
755
|
-
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(p, A,
|
|
751
|
+
this.leftOver && this.leftOver.length && (this.push({ data: v.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
752
|
+
}, v.Utf8DecodeWorker = _, a.inherits(b, l), b.prototype.processChunk = function(i) {
|
|
753
|
+
this.push({ data: v.utf8encode(i.data), meta: i.meta });
|
|
754
|
+
}, v.Utf8EncodeWorker = b;
|
|
755
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(p, A, v) {
|
|
756
756
|
var a = p("./support"), o = p("./base64"), r = p("./nodejsUtils"), l = p("./external");
|
|
757
757
|
function g(n) {
|
|
758
758
|
return n;
|
|
@@ -761,8 +761,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
761
761
|
for (var s = 0; s < n.length; ++s) c[s] = 255 & n.charCodeAt(s);
|
|
762
762
|
return c;
|
|
763
763
|
}
|
|
764
|
-
p("setimmediate"),
|
|
765
|
-
|
|
764
|
+
p("setimmediate"), v.newBlob = function(n, c) {
|
|
765
|
+
v.checkSupport("blob");
|
|
766
766
|
try {
|
|
767
767
|
return new Blob([n], { type: c });
|
|
768
768
|
} catch {
|
|
@@ -795,8 +795,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
795
795
|
return !1;
|
|
796
796
|
}
|
|
797
797
|
}() } };
|
|
798
|
-
function
|
|
799
|
-
var c = 65536, s =
|
|
798
|
+
function b(n) {
|
|
799
|
+
var c = 65536, s = v.getTypeOf(n), m = !0;
|
|
800
800
|
if (s === "uint8array" ? m = _.applyCanBeUsed.uint8array : s === "nodebuffer" && (m = _.applyCanBeUsed.nodebuffer), m) for (; 1 < c; ) try {
|
|
801
801
|
return _.stringifyByChunk(n, s, c);
|
|
802
802
|
} catch {
|
|
@@ -808,7 +808,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
808
808
|
for (var s = 0; s < n.length; s++) c[s] = n[s];
|
|
809
809
|
return c;
|
|
810
810
|
}
|
|
811
|
-
|
|
811
|
+
v.applyFromCharCode = b;
|
|
812
812
|
var d = {};
|
|
813
813
|
d.string = { string: g, array: function(n) {
|
|
814
814
|
return y(n, new Array(n.length));
|
|
@@ -818,81 +818,81 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
818
818
|
return y(n, new Uint8Array(n.length));
|
|
819
819
|
}, nodebuffer: function(n) {
|
|
820
820
|
return y(n, r.allocBuffer(n.length));
|
|
821
|
-
} }, d.array = { string:
|
|
821
|
+
} }, d.array = { string: b, array: g, arraybuffer: function(n) {
|
|
822
822
|
return new Uint8Array(n).buffer;
|
|
823
823
|
}, uint8array: function(n) {
|
|
824
824
|
return new Uint8Array(n);
|
|
825
825
|
}, nodebuffer: function(n) {
|
|
826
826
|
return r.newBufferFrom(n);
|
|
827
827
|
} }, d.arraybuffer = { string: function(n) {
|
|
828
|
-
return
|
|
828
|
+
return b(new Uint8Array(n));
|
|
829
829
|
}, array: function(n) {
|
|
830
830
|
return i(new Uint8Array(n), new Array(n.byteLength));
|
|
831
831
|
}, arraybuffer: g, uint8array: function(n) {
|
|
832
832
|
return new Uint8Array(n);
|
|
833
833
|
}, nodebuffer: function(n) {
|
|
834
834
|
return r.newBufferFrom(new Uint8Array(n));
|
|
835
|
-
} }, d.uint8array = { string:
|
|
835
|
+
} }, d.uint8array = { string: b, array: function(n) {
|
|
836
836
|
return i(n, new Array(n.length));
|
|
837
837
|
}, arraybuffer: function(n) {
|
|
838
838
|
return n.buffer;
|
|
839
839
|
}, uint8array: g, nodebuffer: function(n) {
|
|
840
840
|
return r.newBufferFrom(n);
|
|
841
|
-
} }, d.nodebuffer = { string:
|
|
841
|
+
} }, d.nodebuffer = { string: b, array: function(n) {
|
|
842
842
|
return i(n, new Array(n.length));
|
|
843
843
|
}, arraybuffer: function(n) {
|
|
844
844
|
return d.nodebuffer.uint8array(n).buffer;
|
|
845
845
|
}, uint8array: function(n) {
|
|
846
846
|
return i(n, new Uint8Array(n.length));
|
|
847
|
-
}, nodebuffer: g },
|
|
847
|
+
}, nodebuffer: g }, v.transformTo = function(n, c) {
|
|
848
848
|
if (c = c || "", !n) return c;
|
|
849
|
-
|
|
850
|
-
var s =
|
|
849
|
+
v.checkSupport(n);
|
|
850
|
+
var s = v.getTypeOf(c);
|
|
851
851
|
return d[s][n](c);
|
|
852
|
-
},
|
|
852
|
+
}, v.resolve = function(n) {
|
|
853
853
|
for (var c = n.split("/"), s = [], m = 0; m < c.length; m++) {
|
|
854
854
|
var w = c[m];
|
|
855
855
|
w === "." || w === "" && m !== 0 && m !== c.length - 1 || (w === ".." ? s.pop() : s.push(w));
|
|
856
856
|
}
|
|
857
857
|
return s.join("/");
|
|
858
|
-
},
|
|
858
|
+
}, v.getTypeOf = function(n) {
|
|
859
859
|
return typeof n == "string" ? "string" : Object.prototype.toString.call(n) === "[object Array]" ? "array" : a.nodebuffer && r.isBuffer(n) ? "nodebuffer" : a.uint8array && n instanceof Uint8Array ? "uint8array" : a.arraybuffer && n instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
860
|
-
},
|
|
860
|
+
}, v.checkSupport = function(n) {
|
|
861
861
|
if (!a[n.toLowerCase()]) throw new Error(n + " is not supported by this platform");
|
|
862
|
-
},
|
|
862
|
+
}, v.MAX_VALUE_16BITS = 65535, v.MAX_VALUE_32BITS = -1, v.pretty = function(n) {
|
|
863
863
|
var c, s, m = "";
|
|
864
864
|
for (s = 0; s < (n || "").length; s++) m += "\\x" + ((c = n.charCodeAt(s)) < 16 ? "0" : "") + c.toString(16).toUpperCase();
|
|
865
865
|
return m;
|
|
866
|
-
},
|
|
866
|
+
}, v.delay = function(n, c, s) {
|
|
867
867
|
setImmediate(function() {
|
|
868
868
|
n.apply(s || null, c || []);
|
|
869
869
|
});
|
|
870
|
-
},
|
|
870
|
+
}, v.inherits = function(n, c) {
|
|
871
871
|
function s() {
|
|
872
872
|
}
|
|
873
873
|
s.prototype = c.prototype, n.prototype = new s();
|
|
874
|
-
},
|
|
874
|
+
}, v.extend = function() {
|
|
875
875
|
var n, c, s = {};
|
|
876
876
|
for (n = 0; n < arguments.length; n++) for (c in arguments[n]) Object.prototype.hasOwnProperty.call(arguments[n], c) && s[c] === void 0 && (s[c] = arguments[n][c]);
|
|
877
877
|
return s;
|
|
878
|
-
},
|
|
878
|
+
}, v.prepareContent = function(n, c, s, m, w) {
|
|
879
879
|
return l.Promise.resolve(c).then(function(x) {
|
|
880
|
-
return a.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S,
|
|
881
|
-
var
|
|
882
|
-
|
|
883
|
-
S(
|
|
884
|
-
},
|
|
885
|
-
F
|
|
886
|
-
},
|
|
880
|
+
return a.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S, D) {
|
|
881
|
+
var C = new FileReader();
|
|
882
|
+
C.onload = function(F) {
|
|
883
|
+
S(F.target.result);
|
|
884
|
+
}, C.onerror = function(F) {
|
|
885
|
+
D(F.target.error);
|
|
886
|
+
}, C.readAsArrayBuffer(x);
|
|
887
887
|
}) : x;
|
|
888
888
|
}).then(function(x) {
|
|
889
|
-
var S =
|
|
890
|
-
return S ? (S === "arraybuffer" ? x =
|
|
891
|
-
return y(
|
|
889
|
+
var S = v.getTypeOf(x);
|
|
890
|
+
return S ? (S === "arraybuffer" ? x = v.transformTo("uint8array", x) : S === "string" && (w ? x = o.decode(x) : s && m !== !0 && (x = function(D) {
|
|
891
|
+
return y(D, a.uint8array ? new Uint8Array(D.length) : new Array(D.length));
|
|
892
892
|
}(x))), x) : l.Promise.reject(new Error("Can't read the data of '" + n + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
893
893
|
});
|
|
894
894
|
};
|
|
895
|
-
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(p, A,
|
|
895
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(p, A, v) {
|
|
896
896
|
var a = p("./reader/readerFor"), o = p("./utils"), r = p("./signature"), l = p("./zipEntry"), g = p("./support");
|
|
897
897
|
function y(_) {
|
|
898
898
|
this.files = [], this.loadOptions = _;
|
|
@@ -900,26 +900,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
900
900
|
y.prototype = { checkSignature: function(_) {
|
|
901
901
|
if (!this.reader.readAndCheckSignature(_)) {
|
|
902
902
|
this.reader.index -= 4;
|
|
903
|
-
var
|
|
904
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(
|
|
903
|
+
var b = this.reader.readString(4);
|
|
904
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(b) + ", expected " + o.pretty(_) + ")");
|
|
905
905
|
}
|
|
906
|
-
}, isSignature: function(_,
|
|
906
|
+
}, isSignature: function(_, b) {
|
|
907
907
|
var i = this.reader.index;
|
|
908
908
|
this.reader.setIndex(_);
|
|
909
|
-
var d = this.reader.readString(4) ===
|
|
909
|
+
var d = this.reader.readString(4) === b;
|
|
910
910
|
return this.reader.setIndex(i), d;
|
|
911
911
|
}, readBlockEndOfCentral: function() {
|
|
912
912
|
this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
|
|
913
|
-
var _ = this.reader.readData(this.zipCommentLength),
|
|
913
|
+
var _ = this.reader.readData(this.zipCommentLength), b = g.uint8array ? "uint8array" : "array", i = o.transformTo(b, _);
|
|
914
914
|
this.zipComment = this.loadOptions.decodeFileName(i);
|
|
915
915
|
}, readBlockZip64EndOfCentral: function() {
|
|
916
916
|
this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
|
|
917
|
-
for (var _,
|
|
917
|
+
for (var _, b, i, d = this.zip64EndOfCentralSize - 44; 0 < d; ) _ = this.reader.readInt(2), b = this.reader.readInt(4), i = this.reader.readData(b), this.zip64ExtensibleData[_] = { id: _, length: b, value: i };
|
|
918
918
|
}, readBlockZip64EndOfCentralLocator: function() {
|
|
919
919
|
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
|
|
920
920
|
}, readLocalFiles: function() {
|
|
921
|
-
var _,
|
|
922
|
-
for (_ = 0; _ < this.files.length; _++)
|
|
921
|
+
var _, b;
|
|
922
|
+
for (_ = 0; _ < this.files.length; _++) b = this.files[_], this.reader.setIndex(b.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), b.readLocalPart(this.reader), b.handleUTF8(), b.processAttributes();
|
|
923
923
|
}, readCentralDir: function() {
|
|
924
924
|
var _;
|
|
925
925
|
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER); ) (_ = new l({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(_);
|
|
@@ -928,7 +928,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
928
928
|
var _ = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);
|
|
929
929
|
if (_ < 0) throw this.isSignature(0, r.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
|
|
930
930
|
this.reader.setIndex(_);
|
|
931
|
-
var
|
|
931
|
+
var b = _;
|
|
932
932
|
if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS) {
|
|
933
933
|
if (this.zip64 = !0, (_ = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
934
934
|
if (this.reader.setIndex(_), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, r.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
@@ -936,20 +936,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
936
936
|
}
|
|
937
937
|
var i = this.centralDirOffset + this.centralDirSize;
|
|
938
938
|
this.zip64 && (i += 20, i += 12 + this.zip64EndOfCentralSize);
|
|
939
|
-
var d =
|
|
940
|
-
if (0 < d) this.isSignature(
|
|
939
|
+
var d = b - i;
|
|
940
|
+
if (0 < d) this.isSignature(b, r.CENTRAL_FILE_HEADER) || (this.reader.zero = d);
|
|
941
941
|
else if (d < 0) throw new Error("Corrupted zip: missing " + Math.abs(d) + " bytes.");
|
|
942
942
|
}, prepareReader: function(_) {
|
|
943
943
|
this.reader = a(_);
|
|
944
944
|
}, load: function(_) {
|
|
945
945
|
this.prepareReader(_), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
946
946
|
} }, A.exports = y;
|
|
947
|
-
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(p, A,
|
|
947
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(p, A, v) {
|
|
948
948
|
var a = p("./reader/readerFor"), o = p("./utils"), r = p("./compressedObject"), l = p("./crc32"), g = p("./utf8"), y = p("./compressions"), _ = p("./support");
|
|
949
|
-
function
|
|
949
|
+
function b(i, d) {
|
|
950
950
|
this.options = i, this.loadOptions = d;
|
|
951
951
|
}
|
|
952
|
-
|
|
952
|
+
b.prototype = { isEncrypted: function() {
|
|
953
953
|
return (1 & this.bitFlag) == 1;
|
|
954
954
|
}, useUTF8: function() {
|
|
955
955
|
return (2048 & this.bitFlag) == 2048;
|
|
@@ -1010,8 +1010,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1010
1010
|
return d.readInt(1) !== 1 || l(this.fileComment) !== d.readInt(4) ? null : g.utf8decode(d.readData(i.length - 5));
|
|
1011
1011
|
}
|
|
1012
1012
|
return null;
|
|
1013
|
-
} }, A.exports =
|
|
1014
|
-
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(p, A,
|
|
1013
|
+
} }, A.exports = b;
|
|
1014
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(p, A, v) {
|
|
1015
1015
|
function a(d, n, c) {
|
|
1016
1016
|
this.name = d, this.dir = c.dir, this.date = c.date, this.comment = c.comment, this.unixPermissions = c.unixPermissions, this.dosPermissions = c.dosPermissions, this._data = n, this._dataBinary = c.binary, this.options = { compression: c.compression, compressionOptions: c.compressionOptions };
|
|
1017
1017
|
}
|
|
@@ -1039,11 +1039,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1039
1039
|
}, _decompressWorker: function() {
|
|
1040
1040
|
return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof y ? this._data : new r(this._data);
|
|
1041
1041
|
} };
|
|
1042
|
-
for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"],
|
|
1042
|
+
for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], b = function() {
|
|
1043
1043
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1044
|
-
}, i = 0; i < _.length; i++) a.prototype[_[i]] =
|
|
1044
|
+
}, i = 0; i < _.length; i++) a.prototype[_[i]] = b;
|
|
1045
1045
|
A.exports = a;
|
|
1046
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(p, A,
|
|
1046
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(p, A, v) {
|
|
1047
1047
|
(function(a) {
|
|
1048
1048
|
var o, r, l = a.MutationObserver || a.WebKitMutationObserver;
|
|
1049
1049
|
if (l) {
|
|
@@ -1060,9 +1060,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1060
1060
|
setTimeout(d, 0);
|
|
1061
1061
|
};
|
|
1062
1062
|
else {
|
|
1063
|
-
var
|
|
1064
|
-
|
|
1065
|
-
|
|
1063
|
+
var b = new a.MessageChannel();
|
|
1064
|
+
b.port1.onmessage = d, o = function() {
|
|
1065
|
+
b.port2.postMessage(0);
|
|
1066
1066
|
};
|
|
1067
1067
|
}
|
|
1068
1068
|
var i = [];
|
|
@@ -1079,7 +1079,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1079
1079
|
i.push(n) !== 1 || r || o();
|
|
1080
1080
|
};
|
|
1081
1081
|
}).call(this, typeof Ot < "u" ? Ot : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1082
|
-
}, {}], 37: [function(p, A,
|
|
1082
|
+
}, {}], 37: [function(p, A, v) {
|
|
1083
1083
|
var a = p("immediate");
|
|
1084
1084
|
function o() {
|
|
1085
1085
|
}
|
|
@@ -1088,7 +1088,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1088
1088
|
if (typeof s != "function") throw new TypeError("resolver must be a function");
|
|
1089
1089
|
this.state = y, this.queue = [], this.outcome = void 0, s !== o && n(this, s);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function b(s, m, w) {
|
|
1092
1092
|
this.promise = s, typeof m == "function" && (this.onFulfilled = m, this.callFulfilled = this.otherCallFulfilled), typeof w == "function" && (this.onRejected = w, this.callRejected = this.otherCallRejected);
|
|
1093
1093
|
}
|
|
1094
1094
|
function i(s, m, w) {
|
|
@@ -1110,16 +1110,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1110
1110
|
}
|
|
1111
1111
|
function n(s, m) {
|
|
1112
1112
|
var w = !1;
|
|
1113
|
-
function x(
|
|
1114
|
-
w || (w = !0, r.reject(s,
|
|
1113
|
+
function x(C) {
|
|
1114
|
+
w || (w = !0, r.reject(s, C));
|
|
1115
1115
|
}
|
|
1116
|
-
function S(
|
|
1117
|
-
w || (w = !0, r.resolve(s,
|
|
1116
|
+
function S(C) {
|
|
1117
|
+
w || (w = !0, r.resolve(s, C));
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var D = c(function() {
|
|
1120
1120
|
m(S, x);
|
|
1121
1121
|
});
|
|
1122
|
-
|
|
1122
|
+
D.status === "error" && x(D.value);
|
|
1123
1123
|
}
|
|
1124
1124
|
function c(s, m) {
|
|
1125
1125
|
var w = {};
|
|
@@ -1147,14 +1147,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1147
1147
|
}, _.prototype.then = function(s, m) {
|
|
1148
1148
|
if (typeof s != "function" && this.state === g || typeof m != "function" && this.state === l) return this;
|
|
1149
1149
|
var w = new this.constructor(o);
|
|
1150
|
-
return this.state !== y ? i(w, this.state === g ? s : m, this.outcome) : this.queue.push(new
|
|
1151
|
-
},
|
|
1150
|
+
return this.state !== y ? i(w, this.state === g ? s : m, this.outcome) : this.queue.push(new b(w, s, m)), w;
|
|
1151
|
+
}, b.prototype.callFulfilled = function(s) {
|
|
1152
1152
|
r.resolve(this.promise, s);
|
|
1153
|
-
},
|
|
1153
|
+
}, b.prototype.otherCallFulfilled = function(s) {
|
|
1154
1154
|
i(this.promise, this.onFulfilled, s);
|
|
1155
|
-
},
|
|
1155
|
+
}, b.prototype.callRejected = function(s) {
|
|
1156
1156
|
r.reject(this.promise, s);
|
|
1157
|
-
},
|
|
1157
|
+
}, b.prototype.otherCallRejected = function(s) {
|
|
1158
1158
|
i(this.promise, this.onRejected, s);
|
|
1159
1159
|
}, r.resolve = function(s, m) {
|
|
1160
1160
|
var w = c(d, m);
|
|
@@ -1163,7 +1163,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1163
1163
|
if (x) n(s, x);
|
|
1164
1164
|
else {
|
|
1165
1165
|
s.state = g, s.outcome = m;
|
|
1166
|
-
for (var S = -1,
|
|
1166
|
+
for (var S = -1, D = s.queue.length; ++S < D; ) s.queue[S].callFulfilled(m);
|
|
1167
1167
|
}
|
|
1168
1168
|
return s;
|
|
1169
1169
|
}, r.reject = function(s, m) {
|
|
@@ -1180,13 +1180,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1180
1180
|
if (Object.prototype.toString.call(s) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1181
1181
|
var w = s.length, x = !1;
|
|
1182
1182
|
if (!w) return this.resolve([]);
|
|
1183
|
-
for (var S = new Array(w),
|
|
1184
|
-
return
|
|
1185
|
-
function
|
|
1183
|
+
for (var S = new Array(w), D = 0, C = -1, F = new this(o); ++C < w; ) E(s[C], C);
|
|
1184
|
+
return F;
|
|
1185
|
+
function E(z, Z) {
|
|
1186
1186
|
m.resolve(z).then(function(h) {
|
|
1187
|
-
S[Z] = h, ++
|
|
1187
|
+
S[Z] = h, ++D !== w || x || (x = !0, r.resolve(F, S));
|
|
1188
1188
|
}, function(h) {
|
|
1189
|
-
x || (x = !0, r.reject(
|
|
1189
|
+
x || (x = !0, r.reject(F, h));
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
1192
|
}, _.race = function(s) {
|
|
@@ -1194,22 +1194,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1194
1194
|
if (Object.prototype.toString.call(s) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1195
1195
|
var w = s.length, x = !1;
|
|
1196
1196
|
if (!w) return this.resolve([]);
|
|
1197
|
-
for (var S = -1,
|
|
1198
|
-
x || (x = !0, r.resolve(
|
|
1199
|
-
}, function(
|
|
1200
|
-
x || (x = !0, r.reject(
|
|
1197
|
+
for (var S = -1, D = new this(o); ++S < w; ) C = s[S], m.resolve(C).then(function(F) {
|
|
1198
|
+
x || (x = !0, r.resolve(D, F));
|
|
1199
|
+
}, function(F) {
|
|
1200
|
+
x || (x = !0, r.reject(D, F));
|
|
1201
1201
|
});
|
|
1202
|
-
var
|
|
1203
|
-
return
|
|
1202
|
+
var C;
|
|
1203
|
+
return D;
|
|
1204
1204
|
};
|
|
1205
|
-
}, { immediate: 36 }], 38: [function(p, A,
|
|
1205
|
+
}, { immediate: 36 }], 38: [function(p, A, v) {
|
|
1206
1206
|
var a = {};
|
|
1207
1207
|
(0, p("./lib/utils/common").assign)(a, p("./lib/deflate"), p("./lib/inflate"), p("./lib/zlib/constants")), A.exports = a;
|
|
1208
|
-
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(p, A,
|
|
1209
|
-
var a = p("./zlib/deflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/messages"), g = p("./zlib/zstream"), y = Object.prototype.toString, _ = 0,
|
|
1208
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(p, A, v) {
|
|
1209
|
+
var a = p("./zlib/deflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/messages"), g = p("./zlib/zstream"), y = Object.prototype.toString, _ = 0, b = -1, i = 0, d = 8;
|
|
1210
1210
|
function n(s) {
|
|
1211
1211
|
if (!(this instanceof n)) return new n(s);
|
|
1212
|
-
this.options = o.assign({ level:
|
|
1212
|
+
this.options = o.assign({ level: b, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: i, to: "" }, s || {});
|
|
1213
1213
|
var m = this.options;
|
|
1214
1214
|
m.raw && 0 < m.windowBits ? m.windowBits = -m.windowBits : m.gzip && 0 < m.windowBits && m.windowBits < 16 && (m.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new g(), this.strm.avail_out = 0;
|
|
1215
1215
|
var w = a.deflateInit2(this.strm, m.level, m.method, m.windowBits, m.memLevel, m.strategy);
|
|
@@ -1226,11 +1226,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1226
1226
|
return w.result;
|
|
1227
1227
|
}
|
|
1228
1228
|
n.prototype.push = function(s, m) {
|
|
1229
|
-
var w, x, S = this.strm,
|
|
1229
|
+
var w, x, S = this.strm, D = this.options.chunkSize;
|
|
1230
1230
|
if (this.ended) return !1;
|
|
1231
1231
|
x = m === ~~m ? m : m === !0 ? 4 : 0, typeof s == "string" ? S.input = r.string2buf(s) : y.call(s) === "[object ArrayBuffer]" ? S.input = new Uint8Array(s) : S.input = s, S.next_in = 0, S.avail_in = S.input.length;
|
|
1232
1232
|
do {
|
|
1233
|
-
if (S.avail_out === 0 && (S.output = new o.Buf8(
|
|
1233
|
+
if (S.avail_out === 0 && (S.output = new o.Buf8(D), S.next_out = 0, S.avail_out = D), (w = a.deflate(S, x)) !== 1 && w !== _) return this.onEnd(w), !(this.ended = !0);
|
|
1234
1234
|
S.avail_out !== 0 && (S.avail_in !== 0 || x !== 4 && x !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(o.shrinkBuf(S.output, S.next_out))) : this.onData(o.shrinkBuf(S.output, S.next_out)));
|
|
1235
1235
|
} while ((0 < S.avail_in || S.avail_out === 0) && w !== 1);
|
|
1236
1236
|
return x === 4 ? (w = a.deflateEnd(this.strm), this.onEnd(w), this.ended = !0, w === _) : x !== 2 || (this.onEnd(_), !(S.avail_out = 0));
|
|
@@ -1238,13 +1238,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1238
1238
|
this.chunks.push(s);
|
|
1239
1239
|
}, n.prototype.onEnd = function(s) {
|
|
1240
1240
|
s === _ && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = s, this.msg = this.strm.msg;
|
|
1241
|
-
},
|
|
1241
|
+
}, v.Deflate = n, v.deflate = c, v.deflateRaw = function(s, m) {
|
|
1242
1242
|
return (m = m || {}).raw = !0, c(s, m);
|
|
1243
|
-
},
|
|
1243
|
+
}, v.gzip = function(s, m) {
|
|
1244
1244
|
return (m = m || {}).gzip = !0, c(s, m);
|
|
1245
1245
|
};
|
|
1246
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(p, A,
|
|
1247
|
-
var a = p("./zlib/inflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/constants"), g = p("./zlib/messages"), y = p("./zlib/zstream"), _ = p("./zlib/gzheader"),
|
|
1246
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(p, A, v) {
|
|
1247
|
+
var a = p("./zlib/inflate"), o = p("./utils/common"), r = p("./utils/strings"), l = p("./zlib/constants"), g = p("./zlib/messages"), y = p("./zlib/zstream"), _ = p("./zlib/gzheader"), b = Object.prototype.toString;
|
|
1248
1248
|
function i(n) {
|
|
1249
1249
|
if (!(this instanceof i)) return new i(n);
|
|
1250
1250
|
this.options = o.assign({ chunkSize: 16384, windowBits: 0, to: "" }, n || {});
|
|
@@ -1260,24 +1260,24 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1260
1260
|
return s.result;
|
|
1261
1261
|
}
|
|
1262
1262
|
i.prototype.push = function(n, c) {
|
|
1263
|
-
var s, m, w, x, S,
|
|
1263
|
+
var s, m, w, x, S, D, C = this.strm, F = this.options.chunkSize, E = this.options.dictionary, z = !1;
|
|
1264
1264
|
if (this.ended) return !1;
|
|
1265
|
-
m = c === ~~c ? c : c === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof n == "string" ?
|
|
1265
|
+
m = c === ~~c ? c : c === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof n == "string" ? C.input = r.binstring2buf(n) : b.call(n) === "[object ArrayBuffer]" ? C.input = new Uint8Array(n) : C.input = n, C.next_in = 0, C.avail_in = C.input.length;
|
|
1266
1266
|
do {
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1269
|
-
} while ((0 <
|
|
1270
|
-
return s === l.Z_STREAM_END && (m = l.Z_FINISH), m === l.Z_FINISH ? (s = a.inflateEnd(this.strm), this.onEnd(s), this.ended = !0, s === l.Z_OK) : m !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(
|
|
1267
|
+
if (C.avail_out === 0 && (C.output = new o.Buf8(F), C.next_out = 0, C.avail_out = F), (s = a.inflate(C, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && E && (D = typeof E == "string" ? r.string2buf(E) : b.call(E) === "[object ArrayBuffer]" ? new Uint8Array(E) : E, s = a.inflateSetDictionary(this.strm, D)), s === l.Z_BUF_ERROR && z === !0 && (s = l.Z_OK, z = !1), s !== l.Z_STREAM_END && s !== l.Z_OK) return this.onEnd(s), !(this.ended = !0);
|
|
1268
|
+
C.next_out && (C.avail_out !== 0 && s !== l.Z_STREAM_END && (C.avail_in !== 0 || m !== l.Z_FINISH && m !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (w = r.utf8border(C.output, C.next_out), x = C.next_out - w, S = r.buf2string(C.output, w), C.next_out = x, C.avail_out = F - x, x && o.arraySet(C.output, C.output, w, x, 0), this.onData(S)) : this.onData(o.shrinkBuf(C.output, C.next_out)))), C.avail_in === 0 && C.avail_out === 0 && (z = !0);
|
|
1269
|
+
} while ((0 < C.avail_in || C.avail_out === 0) && s !== l.Z_STREAM_END);
|
|
1270
|
+
return s === l.Z_STREAM_END && (m = l.Z_FINISH), m === l.Z_FINISH ? (s = a.inflateEnd(this.strm), this.onEnd(s), this.ended = !0, s === l.Z_OK) : m !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(C.avail_out = 0));
|
|
1271
1271
|
}, i.prototype.onData = function(n) {
|
|
1272
1272
|
this.chunks.push(n);
|
|
1273
1273
|
}, i.prototype.onEnd = function(n) {
|
|
1274
1274
|
n === l.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = n, this.msg = this.strm.msg;
|
|
1275
|
-
},
|
|
1275
|
+
}, v.Inflate = i, v.inflate = d, v.inflateRaw = function(n, c) {
|
|
1276
1276
|
return (c = c || {}).raw = !0, d(n, c);
|
|
1277
|
-
},
|
|
1278
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(p, A,
|
|
1277
|
+
}, v.ungzip = d;
|
|
1278
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(p, A, v) {
|
|
1279
1279
|
var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1280
|
-
|
|
1280
|
+
v.assign = function(l) {
|
|
1281
1281
|
for (var g = Array.prototype.slice.call(arguments, 1); g.length; ) {
|
|
1282
1282
|
var y = g.shift();
|
|
1283
1283
|
if (y) {
|
|
@@ -1286,26 +1286,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
1288
|
return l;
|
|
1289
|
-
},
|
|
1289
|
+
}, v.shrinkBuf = function(l, g) {
|
|
1290
1290
|
return l.length === g ? l : l.subarray ? l.subarray(0, g) : (l.length = g, l);
|
|
1291
1291
|
};
|
|
1292
|
-
var o = { arraySet: function(l, g, y, _,
|
|
1293
|
-
if (g.subarray && l.subarray) l.set(g.subarray(y, y + _),
|
|
1294
|
-
else for (var i = 0; i < _; i++) l[
|
|
1292
|
+
var o = { arraySet: function(l, g, y, _, b) {
|
|
1293
|
+
if (g.subarray && l.subarray) l.set(g.subarray(y, y + _), b);
|
|
1294
|
+
else for (var i = 0; i < _; i++) l[b + i] = g[y + i];
|
|
1295
1295
|
}, flattenChunks: function(l) {
|
|
1296
|
-
var g, y, _,
|
|
1296
|
+
var g, y, _, b, i, d;
|
|
1297
1297
|
for (g = _ = 0, y = l.length; g < y; g++) _ += l[g].length;
|
|
1298
|
-
for (d = new Uint8Array(_), g =
|
|
1298
|
+
for (d = new Uint8Array(_), g = b = 0, y = l.length; g < y; g++) i = l[g], d.set(i, b), b += i.length;
|
|
1299
1299
|
return d;
|
|
1300
|
-
} }, r = { arraySet: function(l, g, y, _,
|
|
1301
|
-
for (var i = 0; i < _; i++) l[
|
|
1300
|
+
} }, r = { arraySet: function(l, g, y, _, b) {
|
|
1301
|
+
for (var i = 0; i < _; i++) l[b + i] = g[y + i];
|
|
1302
1302
|
}, flattenChunks: function(l) {
|
|
1303
1303
|
return [].concat.apply([], l);
|
|
1304
1304
|
} };
|
|
1305
|
-
|
|
1306
|
-
l ? (
|
|
1307
|
-
},
|
|
1308
|
-
}, {}], 42: [function(p, A,
|
|
1305
|
+
v.setTyped = function(l) {
|
|
1306
|
+
l ? (v.Buf8 = Uint8Array, v.Buf16 = Uint16Array, v.Buf32 = Int32Array, v.assign(v, o)) : (v.Buf8 = Array, v.Buf16 = Array, v.Buf32 = Array, v.assign(v, r));
|
|
1307
|
+
}, v.setTyped(a);
|
|
1308
|
+
}, {}], 42: [function(p, A, v) {
|
|
1309
1309
|
var a = p("./common"), o = !0, r = !0;
|
|
1310
1310
|
try {
|
|
1311
1311
|
String.fromCharCode.apply(null, [0]);
|
|
@@ -1318,23 +1318,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1318
1318
|
r = !1;
|
|
1319
1319
|
}
|
|
1320
1320
|
for (var l = new a.Buf8(256), g = 0; g < 256; g++) l[g] = 252 <= g ? 6 : 248 <= g ? 5 : 240 <= g ? 4 : 224 <= g ? 3 : 192 <= g ? 2 : 1;
|
|
1321
|
-
function y(_,
|
|
1322
|
-
if (
|
|
1323
|
-
for (var i = "", d = 0; d <
|
|
1321
|
+
function y(_, b) {
|
|
1322
|
+
if (b < 65537 && (_.subarray && r || !_.subarray && o)) return String.fromCharCode.apply(null, a.shrinkBuf(_, b));
|
|
1323
|
+
for (var i = "", d = 0; d < b; d++) i += String.fromCharCode(_[d]);
|
|
1324
1324
|
return i;
|
|
1325
1325
|
}
|
|
1326
|
-
l[254] = l[254] = 1,
|
|
1327
|
-
var
|
|
1326
|
+
l[254] = l[254] = 1, v.string2buf = function(_) {
|
|
1327
|
+
var b, i, d, n, c, s = _.length, m = 0;
|
|
1328
1328
|
for (n = 0; n < s; n++) (64512 & (i = _.charCodeAt(n))) == 55296 && n + 1 < s && (64512 & (d = _.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), n++), m += i < 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4;
|
|
1329
|
-
for (
|
|
1330
|
-
return
|
|
1331
|
-
},
|
|
1329
|
+
for (b = new a.Buf8(m), n = c = 0; c < m; n++) (64512 & (i = _.charCodeAt(n))) == 55296 && n + 1 < s && (64512 & (d = _.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), n++), i < 128 ? b[c++] = i : (i < 2048 ? b[c++] = 192 | i >>> 6 : (i < 65536 ? b[c++] = 224 | i >>> 12 : (b[c++] = 240 | i >>> 18, b[c++] = 128 | i >>> 12 & 63), b[c++] = 128 | i >>> 6 & 63), b[c++] = 128 | 63 & i);
|
|
1330
|
+
return b;
|
|
1331
|
+
}, v.buf2binstring = function(_) {
|
|
1332
1332
|
return y(_, _.length);
|
|
1333
|
-
},
|
|
1334
|
-
for (var
|
|
1335
|
-
return
|
|
1336
|
-
},
|
|
1337
|
-
var i, d, n, c, s =
|
|
1333
|
+
}, v.binstring2buf = function(_) {
|
|
1334
|
+
for (var b = new a.Buf8(_.length), i = 0, d = b.length; i < d; i++) b[i] = _.charCodeAt(i);
|
|
1335
|
+
return b;
|
|
1336
|
+
}, v.buf2string = function(_, b) {
|
|
1337
|
+
var i, d, n, c, s = b || _.length, m = new Array(2 * s);
|
|
1338
1338
|
for (i = d = 0; i < s; ) if ((n = _[i++]) < 128) m[d++] = n;
|
|
1339
1339
|
else if (4 < (c = l[n])) m[d++] = 65533, i += c - 1;
|
|
1340
1340
|
else {
|
|
@@ -1342,12 +1342,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1342
1342
|
1 < c ? m[d++] = 65533 : n < 65536 ? m[d++] = n : (n -= 65536, m[d++] = 55296 | n >> 10 & 1023, m[d++] = 56320 | 1023 & n);
|
|
1343
1343
|
}
|
|
1344
1344
|
return y(m, d);
|
|
1345
|
-
},
|
|
1345
|
+
}, v.utf8border = function(_, b) {
|
|
1346
1346
|
var i;
|
|
1347
|
-
for ((
|
|
1348
|
-
return i < 0 || i === 0 ?
|
|
1347
|
+
for ((b = b || _.length) > _.length && (b = _.length), i = b - 1; 0 <= i && (192 & _[i]) == 128; ) i--;
|
|
1348
|
+
return i < 0 || i === 0 ? b : i + l[_[i]] > b ? i : b;
|
|
1349
1349
|
};
|
|
1350
|
-
}, { "./common": 41 }], 43: [function(p, A,
|
|
1350
|
+
}, { "./common": 41 }], 43: [function(p, A, v) {
|
|
1351
1351
|
A.exports = function(a, o, r, l) {
|
|
1352
1352
|
for (var g = 65535 & a | 0, y = a >>> 16 & 65535 | 0, _ = 0; r !== 0; ) {
|
|
1353
1353
|
for (r -= _ = 2e3 < r ? 2e3 : r; y = y + (g = g + o[l++] | 0) | 0, --_; ) ;
|
|
@@ -1355,9 +1355,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1355
1355
|
}
|
|
1356
1356
|
return g | y << 16 | 0;
|
|
1357
1357
|
};
|
|
1358
|
-
}, {}], 44: [function(p, A,
|
|
1358
|
+
}, {}], 44: [function(p, A, v) {
|
|
1359
1359
|
A.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 };
|
|
1360
|
-
}, {}], 45: [function(p, A,
|
|
1360
|
+
}, {}], 45: [function(p, A, v) {
|
|
1361
1361
|
var a = function() {
|
|
1362
1362
|
for (var o, r = [], l = 0; l < 256; l++) {
|
|
1363
1363
|
o = l;
|
|
@@ -1369,11 +1369,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1369
1369
|
A.exports = function(o, r, l, g) {
|
|
1370
1370
|
var y = a, _ = g + l;
|
|
1371
1371
|
o ^= -1;
|
|
1372
|
-
for (var
|
|
1372
|
+
for (var b = g; b < _; b++) o = o >>> 8 ^ y[255 & (o ^ r[b])];
|
|
1373
1373
|
return -1 ^ o;
|
|
1374
1374
|
};
|
|
1375
|
-
}, {}], 46: [function(p, A,
|
|
1376
|
-
var a, o = p("../utils/common"), r = p("./trees"), l = p("./adler32"), g = p("./crc32"), y = p("./messages"), _ = 0,
|
|
1375
|
+
}, {}], 46: [function(p, A, v) {
|
|
1376
|
+
var a, o = p("../utils/common"), r = p("./trees"), l = p("./adler32"), g = p("./crc32"), y = p("./messages"), _ = 0, b = 4, i = 0, d = -2, n = -1, c = 4, s = 2, m = 8, w = 9, x = 286, S = 30, D = 19, C = 2 * x + 1, F = 15, E = 3, z = 258, Z = z + E + 1, h = 42, B = 113, e = 1, P = 2, V = 3, L = 4;
|
|
1377
1377
|
function Q(t, N) {
|
|
1378
1378
|
return t.msg = y[N], N;
|
|
1379
1379
|
}
|
|
@@ -1422,7 +1422,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1422
1422
|
u += H;
|
|
1423
1423
|
}
|
|
1424
1424
|
if (t.strm.avail_in === 0) break;
|
|
1425
|
-
if (U = t.strm, j = t.window, O = t.strstart + t.lookahead, M = u, $ = void 0, $ = U.avail_in, M < $ && ($ = M), R = $ === 0 ? 0 : (U.avail_in -= $, o.arraySet(j, U.input, U.next_in, $, O), U.state.wrap === 1 ? U.adler = l(U.adler, j, $, O) : U.state.wrap === 2 && (U.adler = g(U.adler, j, $, O)), U.next_in += $, U.total_in += $, $), t.lookahead += R, t.lookahead + t.insert >=
|
|
1425
|
+
if (U = t.strm, j = t.window, O = t.strstart + t.lookahead, M = u, $ = void 0, $ = U.avail_in, M < $ && ($ = M), R = $ === 0 ? 0 : (U.avail_in -= $, o.arraySet(j, U.input, U.next_in, $, O), U.state.wrap === 1 ? U.adler = l(U.adler, j, $, O) : U.state.wrap === 2 && (U.adler = g(U.adler, j, $, O)), U.next_in += $, U.total_in += $, $), t.lookahead += R, t.lookahead + t.insert >= E) for (k = t.strstart - t.insert, t.ins_h = t.window[k], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + E - 1]) & t.hash_mask, t.prev[k & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = k, k++, t.insert--, !(t.lookahead + t.insert < E)); ) ;
|
|
1426
1426
|
} while (t.lookahead < Z && t.strm.avail_in !== 0);
|
|
1427
1427
|
}
|
|
1428
1428
|
function ft(t, N) {
|
|
@@ -1431,14 +1431,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1431
1431
|
if (st(t), t.lookahead < Z && N === _) return e;
|
|
1432
1432
|
if (t.lookahead === 0) break;
|
|
1433
1433
|
}
|
|
1434
|
-
if (R = 0, t.lookahead >=
|
|
1435
|
-
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart +
|
|
1434
|
+
if (R = 0, t.lookahead >= E && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + E - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), R !== 0 && t.strstart - R <= t.w_size - Z && (t.match_length = G(t, R)), t.match_length >= E) if (f = r._tr_tally(t, t.strstart - t.match_start, t.match_length - E), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= E) {
|
|
1435
|
+
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + E - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
|
|
1436
1436
|
t.strstart++;
|
|
1437
1437
|
} else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + 1]) & t.hash_mask;
|
|
1438
1438
|
else f = r._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
1439
1439
|
if (f && (I(t, !1), t.strm.avail_out === 0)) return e;
|
|
1440
1440
|
}
|
|
1441
|
-
return t.insert = t.strstart <
|
|
1441
|
+
return t.insert = t.strstart < E - 1 ? t.strstart : E - 1, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : t.last_lit && (I(t, !1), t.strm.avail_out === 0) ? e : P;
|
|
1442
1442
|
}
|
|
1443
1443
|
function rt(t, N) {
|
|
1444
1444
|
for (var R, f, u; ; ) {
|
|
@@ -1446,29 +1446,29 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1446
1446
|
if (st(t), t.lookahead < Z && N === _) return e;
|
|
1447
1447
|
if (t.lookahead === 0) break;
|
|
1448
1448
|
}
|
|
1449
|
-
if (R = 0, t.lookahead >=
|
|
1450
|
-
for (u = t.strstart + t.lookahead -
|
|
1451
|
-
if (t.match_available = 0, t.match_length =
|
|
1449
|
+
if (R = 0, t.lookahead >= E && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + E - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = E - 1, R !== 0 && t.prev_length < t.max_lazy_match && t.strstart - R <= t.w_size - Z && (t.match_length = G(t, R), t.match_length <= 5 && (t.strategy === 1 || t.match_length === E && 4096 < t.strstart - t.match_start) && (t.match_length = E - 1)), t.prev_length >= E && t.match_length <= t.prev_length) {
|
|
1450
|
+
for (u = t.strstart + t.lookahead - E, f = r._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - E), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= u && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + E - 1]) & t.hash_mask, R = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
|
|
1451
|
+
if (t.match_available = 0, t.match_length = E - 1, t.strstart++, f && (I(t, !1), t.strm.avail_out === 0)) return e;
|
|
1452
1452
|
} else if (t.match_available) {
|
|
1453
1453
|
if ((f = r._tr_tally(t, 0, t.window[t.strstart - 1])) && I(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
|
|
1454
1454
|
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
1455
1455
|
}
|
|
1456
|
-
return t.match_available && (f = r._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart <
|
|
1456
|
+
return t.match_available && (f = r._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < E - 1 ? t.strstart : E - 1, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : t.last_lit && (I(t, !1), t.strm.avail_out === 0) ? e : P;
|
|
1457
1457
|
}
|
|
1458
1458
|
function it(t, N, R, f, u) {
|
|
1459
1459
|
this.good_length = t, this.max_lazy = N, this.nice_length = R, this.max_chain = f, this.func = u;
|
|
1460
1460
|
}
|
|
1461
1461
|
function ct() {
|
|
1462
|
-
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 = m, 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 o.Buf16(2 *
|
|
1462
|
+
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 = m, 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 o.Buf16(2 * C), this.dyn_dtree = new o.Buf16(2 * (2 * S + 1)), this.bl_tree = new o.Buf16(2 * (2 * D + 1)), tt(this.dyn_ltree), tt(this.dyn_dtree), tt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(F + 1), this.heap = new o.Buf16(2 * x + 1), tt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * x + 1), tt(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;
|
|
1463
1463
|
}
|
|
1464
1464
|
function ot(t) {
|
|
1465
1465
|
var N;
|
|
1466
1466
|
return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = s, (N = t.state).pending = 0, N.pending_out = 0, N.wrap < 0 && (N.wrap = -N.wrap), N.status = N.wrap ? h : B, t.adler = N.wrap === 2 ? 0 : 1, N.last_flush = _, r._tr_init(N), i) : Q(t, d);
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function bt(t) {
|
|
1469
1469
|
var N = ot(t);
|
|
1470
1470
|
return N === i && function(R) {
|
|
1471
|
-
R.window_size = 2 * R.w_size, tt(R.head), R.max_lazy_match = a[R.level].max_lazy, R.good_match = a[R.level].good_length, R.nice_match = a[R.level].nice_length, R.max_chain_length = a[R.level].max_chain, R.strstart = 0, R.block_start = 0, R.lookahead = 0, R.insert = 0, R.match_length = R.prev_length =
|
|
1471
|
+
R.window_size = 2 * R.w_size, tt(R.head), R.max_lazy_match = a[R.level].max_lazy, R.good_match = a[R.level].good_length, R.nice_match = a[R.level].nice_length, R.max_chain_length = a[R.level].max_chain, R.strstart = 0, R.block_start = 0, R.lookahead = 0, R.insert = 0, R.match_length = R.prev_length = E - 1, R.match_available = 0, R.ins_h = 0;
|
|
1472
1472
|
}(t.state), N;
|
|
1473
1473
|
}
|
|
1474
1474
|
function _t(t, N, R, f, u, k) {
|
|
@@ -1477,7 +1477,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1477
1477
|
if (N === n && (N = 6), f < 0 ? (U = 0, f = -f) : 15 < f && (U = 2, f -= 16), u < 1 || w < u || R !== m || f < 8 || 15 < f || N < 0 || 9 < N || k < 0 || c < k) return Q(t, d);
|
|
1478
1478
|
f === 8 && (f = 9);
|
|
1479
1479
|
var j = new ct();
|
|
1480
|
-
return (t.state = j).strm = t, j.wrap = U, j.gzhead = null, j.w_bits = f, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = u + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits +
|
|
1480
|
+
return (t.state = j).strm = t, j.wrap = U, j.gzhead = null, j.w_bits = f, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = u + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits + E - 1) / E), j.window = new o.Buf8(2 * j.w_size), j.head = new o.Buf16(j.hash_size), j.prev = new o.Buf16(j.w_size), j.lit_bufsize = 1 << u + 6, j.pending_buf_size = 4 * j.lit_bufsize, j.pending_buf = new o.Buf8(j.pending_buf_size), j.d_buf = 1 * j.lit_bufsize, j.l_buf = 3 * j.lit_bufsize, j.level = N, j.strategy = k, j.method = R, bt(t);
|
|
1481
1481
|
}
|
|
1482
1482
|
a = [new it(0, 0, 0, 0, function(t, N) {
|
|
1483
1483
|
var R = 65535;
|
|
@@ -1490,15 +1490,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1490
1490
|
var f = t.block_start + R;
|
|
1491
1491
|
if ((t.strstart === 0 || t.strstart >= f) && (t.lookahead = t.strstart - f, t.strstart = f, I(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - Z && (I(t, !1), t.strm.avail_out === 0)) return e;
|
|
1492
1492
|
}
|
|
1493
|
-
return t.insert = 0, N ===
|
|
1494
|
-
}), new it(4, 4, 8, 4, ft), new it(4, 5, 16, 8, ft), new it(4, 6, 32, 32, ft), new it(4, 4, 16, 16, rt), new it(8, 16, 32, 32, rt), new it(8, 16, 128, 128, rt), new it(8, 32, 128, 256, rt), new it(32, 128, 258, 1024, rt), new it(32, 258, 258, 4096, rt)],
|
|
1493
|
+
return t.insert = 0, N === b ? (I(t, !0), t.strm.avail_out === 0 ? V : L) : (t.strstart > t.block_start && (I(t, !1), t.strm.avail_out), e);
|
|
1494
|
+
}), new it(4, 4, 8, 4, ft), new it(4, 5, 16, 8, ft), new it(4, 6, 32, 32, ft), new it(4, 4, 16, 16, rt), new it(8, 16, 32, 32, rt), new it(8, 16, 128, 128, rt), new it(8, 32, 128, 256, rt), new it(32, 128, 258, 1024, rt), new it(32, 258, 258, 4096, rt)], v.deflateInit = function(t, N) {
|
|
1495
1495
|
return _t(t, N, m, 15, 8, 0);
|
|
1496
|
-
},
|
|
1496
|
+
}, v.deflateInit2 = _t, v.deflateReset = bt, v.deflateResetKeep = ot, v.deflateSetHeader = function(t, N) {
|
|
1497
1497
|
return t && t.state ? t.state.wrap !== 2 ? d : (t.state.gzhead = N, i) : d;
|
|
1498
|
-
},
|
|
1498
|
+
}, v.deflate = function(t, N) {
|
|
1499
1499
|
var R, f, u, k;
|
|
1500
1500
|
if (!t || !t.state || 5 < N || N < 0) return t ? Q(t, d) : d;
|
|
1501
|
-
if (f = t.state, !t.output || !t.input && t.avail_in !== 0 || f.status === 666 && N !==
|
|
1501
|
+
if (f = t.state, !t.output || !t.input && t.avail_in !== 0 || f.status === 666 && N !== b) return Q(t, t.avail_out === 0 ? -5 : d);
|
|
1502
1502
|
if (f.strm = t, R = f.last_flush, f.last_flush = N, f.status === h) if (f.wrap === 2) t.adler = 0, J(f, 31), J(f, 139), J(f, 8), f.gzhead ? (J(f, (f.gzhead.text ? 1 : 0) + (f.gzhead.hcrc ? 2 : 0) + (f.gzhead.extra ? 4 : 0) + (f.gzhead.name ? 8 : 0) + (f.gzhead.comment ? 16 : 0)), J(f, 255 & f.gzhead.time), J(f, f.gzhead.time >> 8 & 255), J(f, f.gzhead.time >> 16 & 255), J(f, f.gzhead.time >> 24 & 255), J(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), J(f, 255 & f.gzhead.os), f.gzhead.extra && f.gzhead.extra.length && (J(f, 255 & f.gzhead.extra.length), J(f, f.gzhead.extra.length >> 8 & 255)), f.gzhead.hcrc && (t.adler = g(t.adler, f.pending_buf, f.pending, 0)), f.gzindex = 0, f.status = 69) : (J(f, 0), J(f, 0), J(f, 0), J(f, 0), J(f, 0), J(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), J(f, 3), f.status = B);
|
|
1503
1503
|
else {
|
|
1504
1504
|
var U = m + (f.w_bits - 8 << 4) << 8;
|
|
@@ -1532,7 +1532,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1532
1532
|
} else f.status = 103;
|
|
1533
1533
|
if (f.status === 103 && (f.gzhead.hcrc ? (f.pending + 2 > f.pending_buf_size && T(t), f.pending + 2 <= f.pending_buf_size && (J(f, 255 & t.adler), J(f, t.adler >> 8 & 255), t.adler = 0, f.status = B)) : f.status = B), f.pending !== 0) {
|
|
1534
1534
|
if (T(t), t.avail_out === 0) return f.last_flush = -1, i;
|
|
1535
|
-
} else if (t.avail_in === 0 && W(N) <= W(R) && N !==
|
|
1535
|
+
} else if (t.avail_in === 0 && W(N) <= W(R) && N !== b) return Q(t, -5);
|
|
1536
1536
|
if (f.status === 666 && t.avail_in !== 0) return Q(t, -5);
|
|
1537
1537
|
if (t.avail_in !== 0 || f.lookahead !== 0 || N !== _ && f.status !== 666) {
|
|
1538
1538
|
var j = f.strategy === 2 ? function(O, M) {
|
|
@@ -1543,99 +1543,99 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1543
1543
|
}
|
|
1544
1544
|
if (O.match_length = 0, $ = r._tr_tally(O, 0, O.window[O.strstart]), O.lookahead--, O.strstart++, $ && (I(O, !1), O.strm.avail_out === 0)) return e;
|
|
1545
1545
|
}
|
|
1546
|
-
return O.insert = 0, M ===
|
|
1546
|
+
return O.insert = 0, M === b ? (I(O, !0), O.strm.avail_out === 0 ? V : L) : O.last_lit && (I(O, !1), O.strm.avail_out === 0) ? e : P;
|
|
1547
1547
|
}(f, N) : f.strategy === 3 ? function(O, M) {
|
|
1548
1548
|
for (var $, H, Y, at, nt = O.window; ; ) {
|
|
1549
1549
|
if (O.lookahead <= z) {
|
|
1550
1550
|
if (st(O), O.lookahead <= z && M === _) return e;
|
|
1551
1551
|
if (O.lookahead === 0) break;
|
|
1552
1552
|
}
|
|
1553
|
-
if (O.match_length = 0, O.lookahead >=
|
|
1553
|
+
if (O.match_length = 0, O.lookahead >= E && 0 < O.strstart && (H = nt[Y = O.strstart - 1]) === nt[++Y] && H === nt[++Y] && H === nt[++Y]) {
|
|
1554
1554
|
at = O.strstart + z;
|
|
1555
1555
|
do
|
|
1556
1556
|
;
|
|
1557
1557
|
while (H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && H === nt[++Y] && Y < at);
|
|
1558
1558
|
O.match_length = z - (at - Y), O.match_length > O.lookahead && (O.match_length = O.lookahead);
|
|
1559
1559
|
}
|
|
1560
|
-
if (O.match_length >=
|
|
1560
|
+
if (O.match_length >= E ? ($ = r._tr_tally(O, 1, O.match_length - E), O.lookahead -= O.match_length, O.strstart += O.match_length, O.match_length = 0) : ($ = r._tr_tally(O, 0, O.window[O.strstart]), O.lookahead--, O.strstart++), $ && (I(O, !1), O.strm.avail_out === 0)) return e;
|
|
1561
1561
|
}
|
|
1562
|
-
return O.insert = 0, M ===
|
|
1562
|
+
return O.insert = 0, M === b ? (I(O, !0), O.strm.avail_out === 0 ? V : L) : O.last_lit && (I(O, !1), O.strm.avail_out === 0) ? e : P;
|
|
1563
1563
|
}(f, N) : a[f.level].func(f, N);
|
|
1564
1564
|
if (j !== V && j !== L || (f.status = 666), j === e || j === V) return t.avail_out === 0 && (f.last_flush = -1), i;
|
|
1565
1565
|
if (j === P && (N === 1 ? r._tr_align(f) : N !== 5 && (r._tr_stored_block(f, 0, 0, !1), N === 3 && (tt(f.head), f.lookahead === 0 && (f.strstart = 0, f.block_start = 0, f.insert = 0))), T(t), t.avail_out === 0)) return f.last_flush = -1, i;
|
|
1566
1566
|
}
|
|
1567
|
-
return N !==
|
|
1568
|
-
},
|
|
1567
|
+
return N !== b ? i : f.wrap <= 0 ? 1 : (f.wrap === 2 ? (J(f, 255 & t.adler), J(f, t.adler >> 8 & 255), J(f, t.adler >> 16 & 255), J(f, t.adler >> 24 & 255), J(f, 255 & t.total_in), J(f, t.total_in >> 8 & 255), J(f, t.total_in >> 16 & 255), J(f, t.total_in >> 24 & 255)) : (q(f, t.adler >>> 16), q(f, 65535 & t.adler)), T(t), 0 < f.wrap && (f.wrap = -f.wrap), f.pending !== 0 ? i : 1);
|
|
1568
|
+
}, v.deflateEnd = function(t) {
|
|
1569
1569
|
var N;
|
|
1570
1570
|
return t && t.state ? (N = t.state.status) !== h && N !== 69 && N !== 73 && N !== 91 && N !== 103 && N !== B && N !== 666 ? Q(t, d) : (t.state = null, N === B ? Q(t, -3) : i) : d;
|
|
1571
|
-
},
|
|
1571
|
+
}, v.deflateSetDictionary = function(t, N) {
|
|
1572
1572
|
var R, f, u, k, U, j, O, M, $ = N.length;
|
|
1573
1573
|
if (!t || !t.state || (k = (R = t.state).wrap) === 2 || k === 1 && R.status !== h || R.lookahead) return d;
|
|
1574
|
-
for (k === 1 && (t.adler = l(t.adler, N, $, 0)), R.wrap = 0, $ >= R.w_size && (k === 0 && (tt(R.head), R.strstart = 0, R.block_start = 0, R.insert = 0), M = new o.Buf8(R.w_size), o.arraySet(M, N, $ - R.w_size, R.w_size, 0), N = M, $ = R.w_size), U = t.avail_in, j = t.next_in, O = t.input, t.avail_in = $, t.next_in = 0, t.input = N, st(R); R.lookahead >=
|
|
1575
|
-
for (f = R.strstart, u = R.lookahead - (
|
|
1576
|
-
R.strstart = f, R.lookahead =
|
|
1574
|
+
for (k === 1 && (t.adler = l(t.adler, N, $, 0)), R.wrap = 0, $ >= R.w_size && (k === 0 && (tt(R.head), R.strstart = 0, R.block_start = 0, R.insert = 0), M = new o.Buf8(R.w_size), o.arraySet(M, N, $ - R.w_size, R.w_size, 0), N = M, $ = R.w_size), U = t.avail_in, j = t.next_in, O = t.input, t.avail_in = $, t.next_in = 0, t.input = N, st(R); R.lookahead >= E; ) {
|
|
1575
|
+
for (f = R.strstart, u = R.lookahead - (E - 1); R.ins_h = (R.ins_h << R.hash_shift ^ R.window[f + E - 1]) & R.hash_mask, R.prev[f & R.w_mask] = R.head[R.ins_h], R.head[R.ins_h] = f, f++, --u; ) ;
|
|
1576
|
+
R.strstart = f, R.lookahead = E - 1, st(R);
|
|
1577
1577
|
}
|
|
1578
|
-
return R.strstart += R.lookahead, R.block_start = R.strstart, R.insert = R.lookahead, R.lookahead = 0, R.match_length = R.prev_length =
|
|
1579
|
-
},
|
|
1580
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(p, A,
|
|
1578
|
+
return R.strstart += R.lookahead, R.block_start = R.strstart, R.insert = R.lookahead, R.lookahead = 0, R.match_length = R.prev_length = E - 1, R.match_available = 0, t.next_in = j, t.input = O, t.avail_in = U, R.wrap = k, i;
|
|
1579
|
+
}, v.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1580
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(p, A, v) {
|
|
1581
1581
|
A.exports = function() {
|
|
1582
1582
|
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;
|
|
1583
1583
|
};
|
|
1584
|
-
}, {}], 48: [function(p, A,
|
|
1584
|
+
}, {}], 48: [function(p, A, v) {
|
|
1585
1585
|
A.exports = function(a, o) {
|
|
1586
|
-
var r, l, g, y, _,
|
|
1587
|
-
r = a.state, l = a.next_in, e = a.input, g = l + (a.avail_in - 5), y = a.next_out, P = a.output, _ = y - (o - a.avail_out),
|
|
1586
|
+
var r, l, g, y, _, b, i, d, n, c, s, m, w, x, S, D, C, F, E, z, Z, h, B, e, P;
|
|
1587
|
+
r = a.state, l = a.next_in, e = a.input, g = l + (a.avail_in - 5), y = a.next_out, P = a.output, _ = y - (o - a.avail_out), b = y + (a.avail_out - 257), i = r.dmax, d = r.wsize, n = r.whave, c = r.wnext, s = r.window, m = r.hold, w = r.bits, x = r.lencode, S = r.distcode, D = (1 << r.lenbits) - 1, C = (1 << r.distbits) - 1;
|
|
1588
1588
|
t: do {
|
|
1589
|
-
w < 15 && (m += e[l++] << w, w += 8, m += e[l++] << w, w += 8),
|
|
1589
|
+
w < 15 && (m += e[l++] << w, w += 8, m += e[l++] << w, w += 8), F = x[m & D];
|
|
1590
1590
|
e: for (; ; ) {
|
|
1591
|
-
if (m >>>=
|
|
1591
|
+
if (m >>>= E = F >>> 24, w -= E, (E = F >>> 16 & 255) === 0) P[y++] = 65535 & F;
|
|
1592
1592
|
else {
|
|
1593
|
-
if (!(16 &
|
|
1594
|
-
if (!(64 &
|
|
1595
|
-
|
|
1593
|
+
if (!(16 & E)) {
|
|
1594
|
+
if (!(64 & E)) {
|
|
1595
|
+
F = x[(65535 & F) + (m & (1 << E) - 1)];
|
|
1596
1596
|
continue e;
|
|
1597
1597
|
}
|
|
1598
|
-
if (32 &
|
|
1598
|
+
if (32 & E) {
|
|
1599
1599
|
r.mode = 12;
|
|
1600
1600
|
break t;
|
|
1601
1601
|
}
|
|
1602
1602
|
a.msg = "invalid literal/length code", r.mode = 30;
|
|
1603
1603
|
break t;
|
|
1604
1604
|
}
|
|
1605
|
-
z = 65535 &
|
|
1605
|
+
z = 65535 & F, (E &= 15) && (w < E && (m += e[l++] << w, w += 8), z += m & (1 << E) - 1, m >>>= E, w -= E), w < 15 && (m += e[l++] << w, w += 8, m += e[l++] << w, w += 8), F = S[m & C];
|
|
1606
1606
|
r: for (; ; ) {
|
|
1607
|
-
if (m >>>=
|
|
1608
|
-
if (!(64 &
|
|
1609
|
-
|
|
1607
|
+
if (m >>>= E = F >>> 24, w -= E, !(16 & (E = F >>> 16 & 255))) {
|
|
1608
|
+
if (!(64 & E)) {
|
|
1609
|
+
F = S[(65535 & F) + (m & (1 << E) - 1)];
|
|
1610
1610
|
continue r;
|
|
1611
1611
|
}
|
|
1612
1612
|
a.msg = "invalid distance code", r.mode = 30;
|
|
1613
1613
|
break t;
|
|
1614
1614
|
}
|
|
1615
|
-
if (Z = 65535 &
|
|
1615
|
+
if (Z = 65535 & F, w < (E &= 15) && (m += e[l++] << w, (w += 8) < E && (m += e[l++] << w, w += 8)), i < (Z += m & (1 << E) - 1)) {
|
|
1616
1616
|
a.msg = "invalid distance too far back", r.mode = 30;
|
|
1617
1617
|
break t;
|
|
1618
1618
|
}
|
|
1619
|
-
if (m >>>=
|
|
1620
|
-
if (n < (
|
|
1619
|
+
if (m >>>= E, w -= E, (E = y - _) < Z) {
|
|
1620
|
+
if (n < (E = Z - E) && r.sane) {
|
|
1621
1621
|
a.msg = "invalid distance too far back", r.mode = 30;
|
|
1622
1622
|
break t;
|
|
1623
1623
|
}
|
|
1624
1624
|
if (B = s, (h = 0) === c) {
|
|
1625
|
-
if (h += d -
|
|
1626
|
-
for (z -=
|
|
1625
|
+
if (h += d - E, E < z) {
|
|
1626
|
+
for (z -= E; P[y++] = s[h++], --E; ) ;
|
|
1627
1627
|
h = y - Z, B = P;
|
|
1628
1628
|
}
|
|
1629
|
-
} else if (c <
|
|
1630
|
-
if (h += d + c -
|
|
1631
|
-
for (z -=
|
|
1629
|
+
} else if (c < E) {
|
|
1630
|
+
if (h += d + c - E, (E -= c) < z) {
|
|
1631
|
+
for (z -= E; P[y++] = s[h++], --E; ) ;
|
|
1632
1632
|
if (h = 0, c < z) {
|
|
1633
|
-
for (z -=
|
|
1633
|
+
for (z -= E = c; P[y++] = s[h++], --E; ) ;
|
|
1634
1634
|
h = y - Z, B = P;
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
} else if (h += c -
|
|
1638
|
-
for (z -=
|
|
1637
|
+
} else if (h += c - E, E < z) {
|
|
1638
|
+
for (z -= E; P[y++] = s[h++], --E; ) ;
|
|
1639
1639
|
h = y - Z, B = P;
|
|
1640
1640
|
}
|
|
1641
1641
|
for (; 2 < z; ) P[y++] = B[h++], P[y++] = B[h++], P[y++] = B[h++], z -= 3;
|
|
@@ -1649,11 +1649,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1649
1649
|
}
|
|
1650
1650
|
break;
|
|
1651
1651
|
}
|
|
1652
|
-
} while (l < g && y <
|
|
1653
|
-
l -= z = w >> 3, m &= (1 << (w -= z << 3)) - 1, a.next_in = l, a.next_out = y, a.avail_in = l < g ? g - l + 5 : 5 - (l - g), a.avail_out = y <
|
|
1652
|
+
} while (l < g && y < b);
|
|
1653
|
+
l -= z = w >> 3, m &= (1 << (w -= z << 3)) - 1, a.next_in = l, a.next_out = y, a.avail_in = l < g ? g - l + 5 : 5 - (l - g), a.avail_out = y < b ? b - y + 257 : 257 - (y - b), r.hold = m, r.bits = w;
|
|
1654
1654
|
};
|
|
1655
|
-
}, {}], 49: [function(p, A,
|
|
1656
|
-
var a = p("../utils/common"), o = p("./adler32"), r = p("./crc32"), l = p("./inffast"), g = p("./inftrees"), y = 1, _ = 2,
|
|
1655
|
+
}, {}], 49: [function(p, A, v) {
|
|
1656
|
+
var a = p("../utils/common"), o = p("./adler32"), r = p("./crc32"), l = p("./inffast"), g = p("./inftrees"), y = 1, _ = 2, b = 0, i = -2, d = 1, n = 852, c = 592;
|
|
1657
1657
|
function s(h) {
|
|
1658
1658
|
return (h >>> 24 & 255) + (h >>> 8 & 65280) + ((65280 & h) << 8) + ((255 & h) << 24);
|
|
1659
1659
|
}
|
|
@@ -1662,7 +1662,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1662
1662
|
}
|
|
1663
1663
|
function w(h) {
|
|
1664
1664
|
var B;
|
|
1665
|
-
return h && h.state ? (B = h.state, h.total_in = h.total_out = B.total = 0, h.msg = "", B.wrap && (h.adler = 1 & B.wrap), B.mode = d, B.last = 0, B.havedict = 0, B.dmax = 32768, B.head = null, B.hold = 0, B.bits = 0, B.lencode = B.lendyn = new a.Buf32(n), B.distcode = B.distdyn = new a.Buf32(c), B.sane = 1, B.back = -1,
|
|
1665
|
+
return h && h.state ? (B = h.state, h.total_in = h.total_out = B.total = 0, h.msg = "", B.wrap && (h.adler = 1 & B.wrap), B.mode = d, B.last = 0, B.havedict = 0, B.dmax = 32768, B.head = null, B.hold = 0, B.bits = 0, B.lencode = B.lendyn = new a.Buf32(n), B.distcode = B.distdyn = new a.Buf32(c), B.sane = 1, B.back = -1, b) : i;
|
|
1666
1666
|
}
|
|
1667
1667
|
function x(h) {
|
|
1668
1668
|
var B;
|
|
@@ -1672,33 +1672,33 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1672
1672
|
var e, P;
|
|
1673
1673
|
return h && h.state ? (P = h.state, B < 0 ? (e = 0, B = -B) : (e = 1 + (B >> 4), B < 48 && (B &= 15)), B && (B < 8 || 15 < B) ? i : (P.window !== null && P.wbits !== B && (P.window = null), P.wrap = e, P.wbits = B, x(h))) : i;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function D(h, B) {
|
|
1676
1676
|
var e, P;
|
|
1677
|
-
return h ? (P = new m(), (h.state = P).window = null, (e = S(h, B)) !==
|
|
1677
|
+
return h ? (P = new m(), (h.state = P).window = null, (e = S(h, B)) !== b && (h.state = null), e) : i;
|
|
1678
1678
|
}
|
|
1679
|
-
var
|
|
1679
|
+
var C, F, E = !0;
|
|
1680
1680
|
function z(h) {
|
|
1681
|
-
if (
|
|
1681
|
+
if (E) {
|
|
1682
1682
|
var B;
|
|
1683
|
-
for (
|
|
1683
|
+
for (C = new a.Buf32(512), F = new a.Buf32(32), B = 0; B < 144; ) h.lens[B++] = 8;
|
|
1684
1684
|
for (; B < 256; ) h.lens[B++] = 9;
|
|
1685
1685
|
for (; B < 280; ) h.lens[B++] = 7;
|
|
1686
1686
|
for (; B < 288; ) h.lens[B++] = 8;
|
|
1687
|
-
for (g(y, h.lens, 0, 288,
|
|
1688
|
-
g(_, h.lens, 0, 32,
|
|
1687
|
+
for (g(y, h.lens, 0, 288, C, 0, h.work, { bits: 9 }), B = 0; B < 32; ) h.lens[B++] = 5;
|
|
1688
|
+
g(_, h.lens, 0, 32, F, 0, h.work, { bits: 5 }), E = !1;
|
|
1689
1689
|
}
|
|
1690
|
-
h.lencode =
|
|
1690
|
+
h.lencode = C, h.lenbits = 9, h.distcode = F, h.distbits = 5;
|
|
1691
1691
|
}
|
|
1692
1692
|
function Z(h, B, e, P) {
|
|
1693
1693
|
var V, L = h.state;
|
|
1694
1694
|
return L.window === null && (L.wsize = 1 << L.wbits, L.wnext = 0, L.whave = 0, L.window = new a.Buf8(L.wsize)), P >= L.wsize ? (a.arraySet(L.window, B, e - L.wsize, L.wsize, 0), L.wnext = 0, L.whave = L.wsize) : (P < (V = L.wsize - L.wnext) && (V = P), a.arraySet(L.window, B, e - P, V, L.wnext), (P -= V) ? (a.arraySet(L.window, B, e - P, P, 0), L.wnext = P, L.whave = L.wsize) : (L.wnext += V, L.wnext === L.wsize && (L.wnext = 0), L.whave < L.wsize && (L.whave += V))), 0;
|
|
1695
1695
|
}
|
|
1696
|
-
|
|
1697
|
-
return
|
|
1698
|
-
},
|
|
1699
|
-
var e, P, V, L, Q, W, tt, T, I, J, q, G, st, ft, rt, it, ct, ot,
|
|
1696
|
+
v.inflateReset = x, v.inflateReset2 = S, v.inflateResetKeep = w, v.inflateInit = function(h) {
|
|
1697
|
+
return D(h, 15);
|
|
1698
|
+
}, v.inflateInit2 = D, v.inflate = function(h, B) {
|
|
1699
|
+
var e, P, V, L, Q, W, tt, T, I, J, q, G, st, ft, rt, it, ct, ot, bt, _t, t, N, R, f, u = 0, k = new a.Buf8(4), U = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1700
1700
|
if (!h || !h.state || !h.output || !h.input && h.avail_in !== 0) return i;
|
|
1701
|
-
(e = h.state).mode === 12 && (e.mode = 13), Q = h.next_out, V = h.output, tt = h.avail_out, L = h.next_in, P = h.input, W = h.avail_in, T = e.hold, I = e.bits, J = W, q = tt, N =
|
|
1701
|
+
(e = h.state).mode === 12 && (e.mode = 13), Q = h.next_out, V = h.output, tt = h.avail_out, L = h.next_in, P = h.input, W = h.avail_in, T = e.hold, I = e.bits, J = W, q = tt, N = b;
|
|
1702
1702
|
t: for (; ; ) switch (e.mode) {
|
|
1703
1703
|
case d:
|
|
1704
1704
|
if (e.wrap === 0) {
|
|
@@ -1938,7 +1938,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1938
1938
|
W--, T += P[L++] << I, I += 8;
|
|
1939
1939
|
}
|
|
1940
1940
|
if (it && !(240 & it)) {
|
|
1941
|
-
for (ot = rt,
|
|
1941
|
+
for (ot = rt, bt = it, _t = ct; it = (u = e.lencode[_t + ((T & (1 << ot + bt) - 1) >> ot)]) >>> 16 & 255, ct = 65535 & u, !(ot + (rt = u >>> 24) <= I); ) {
|
|
1942
1942
|
if (W === 0) break t;
|
|
1943
1943
|
W--, T += P[L++] << I, I += 8;
|
|
1944
1944
|
}
|
|
@@ -1972,7 +1972,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1972
1972
|
W--, T += P[L++] << I, I += 8;
|
|
1973
1973
|
}
|
|
1974
1974
|
if (!(240 & it)) {
|
|
1975
|
-
for (ot = rt,
|
|
1975
|
+
for (ot = rt, bt = it, _t = ct; it = (u = e.distcode[_t + ((T & (1 << ot + bt) - 1) >> ot)]) >>> 16 & 255, ct = 65535 & u, !(ot + (rt = u >>> 24) <= I); ) {
|
|
1976
1976
|
if (W === 0) break t;
|
|
1977
1977
|
W--, T += P[L++] << I, I += 8;
|
|
1978
1978
|
}
|
|
@@ -2050,55 +2050,55 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2050
2050
|
default:
|
|
2051
2051
|
return i;
|
|
2052
2052
|
}
|
|
2053
|
-
return h.next_out = Q, h.avail_out = tt, h.next_in = L, h.avail_in = W, e.hold = T, e.bits = I, (e.wsize || q !== h.avail_out && e.mode < 30 && (e.mode < 27 || B !== 4)) && Z(h, h.output, h.next_out, q - h.avail_out) ? (e.mode = 31, -4) : (J -= h.avail_in, q -= h.avail_out, h.total_in += J, h.total_out += q, e.total += q, e.wrap && q && (h.adler = e.check = e.flags ? r(e.check, V, q, h.next_out - q) : o(e.check, V, q, h.next_out - q)), h.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (J == 0 && q === 0 || B === 4) && N ===
|
|
2054
|
-
},
|
|
2053
|
+
return h.next_out = Q, h.avail_out = tt, h.next_in = L, h.avail_in = W, e.hold = T, e.bits = I, (e.wsize || q !== h.avail_out && e.mode < 30 && (e.mode < 27 || B !== 4)) && Z(h, h.output, h.next_out, q - h.avail_out) ? (e.mode = 31, -4) : (J -= h.avail_in, q -= h.avail_out, h.total_in += J, h.total_out += q, e.total += q, e.wrap && q && (h.adler = e.check = e.flags ? r(e.check, V, q, h.next_out - q) : o(e.check, V, q, h.next_out - q)), h.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (J == 0 && q === 0 || B === 4) && N === b && (N = -5), N);
|
|
2054
|
+
}, v.inflateEnd = function(h) {
|
|
2055
2055
|
if (!h || !h.state) return i;
|
|
2056
2056
|
var B = h.state;
|
|
2057
|
-
return B.window && (B.window = null), h.state = null,
|
|
2058
|
-
},
|
|
2057
|
+
return B.window && (B.window = null), h.state = null, b;
|
|
2058
|
+
}, v.inflateGetHeader = function(h, B) {
|
|
2059
2059
|
var e;
|
|
2060
|
-
return h && h.state && 2 & (e = h.state).wrap ? ((e.head = B).done = !1,
|
|
2061
|
-
},
|
|
2060
|
+
return h && h.state && 2 & (e = h.state).wrap ? ((e.head = B).done = !1, b) : i;
|
|
2061
|
+
}, v.inflateSetDictionary = function(h, B) {
|
|
2062
2062
|
var e, P = B.length;
|
|
2063
|
-
return h && h.state ? (e = h.state).wrap !== 0 && e.mode !== 11 ? i : e.mode === 11 && o(1, B, P, 0) !== e.check ? -3 : Z(h, B, P, P) ? (e.mode = 31, -4) : (e.havedict = 1,
|
|
2064
|
-
},
|
|
2065
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(p, A,
|
|
2063
|
+
return h && h.state ? (e = h.state).wrap !== 0 && e.mode !== 11 ? i : e.mode === 11 && o(1, B, P, 0) !== e.check ? -3 : Z(h, B, P, P) ? (e.mode = 31, -4) : (e.havedict = 1, b) : i;
|
|
2064
|
+
}, v.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2065
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(p, A, v) {
|
|
2066
2066
|
var a = p("../utils/common"), o = [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], g = [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];
|
|
2067
|
-
A.exports = function(y, _,
|
|
2068
|
-
var m, w, x, S,
|
|
2067
|
+
A.exports = function(y, _, b, i, d, n, c, s) {
|
|
2068
|
+
var m, w, x, S, D, C, F, E, z, Z = s.bits, h = 0, B = 0, e = 0, P = 0, V = 0, L = 0, Q = 0, W = 0, tt = 0, T = 0, I = null, J = 0, q = new a.Buf16(16), G = new a.Buf16(16), st = null, ft = 0;
|
|
2069
2069
|
for (h = 0; h <= 15; h++) q[h] = 0;
|
|
2070
|
-
for (B = 0; B < i; B++) q[_[
|
|
2070
|
+
for (B = 0; B < i; B++) q[_[b + B]]++;
|
|
2071
2071
|
for (V = Z, P = 15; 1 <= P && q[P] === 0; P--) ;
|
|
2072
2072
|
if (P < V && (V = P), P === 0) return d[n++] = 20971520, d[n++] = 20971520, s.bits = 1, 0;
|
|
2073
2073
|
for (e = 1; e < P && q[e] === 0; e++) ;
|
|
2074
2074
|
for (V < e && (V = e), h = W = 1; h <= 15; h++) if (W <<= 1, (W -= q[h]) < 0) return -1;
|
|
2075
2075
|
if (0 < W && (y === 0 || P !== 1)) return -1;
|
|
2076
2076
|
for (G[1] = 0, h = 1; h < 15; h++) G[h + 1] = G[h] + q[h];
|
|
2077
|
-
for (B = 0; B < i; B++) _[
|
|
2078
|
-
if (
|
|
2077
|
+
for (B = 0; B < i; B++) _[b + B] !== 0 && (c[G[_[b + B]]++] = B);
|
|
2078
|
+
if (C = y === 0 ? (I = st = c, 19) : y === 1 ? (I = o, J -= 257, st = r, ft -= 257, 256) : (I = l, st = g, -1), h = e, D = n, Q = B = T = 0, x = -1, S = (tt = 1 << (L = V)) - 1, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
|
|
2079
2079
|
for (; ; ) {
|
|
2080
|
-
for (
|
|
2080
|
+
for (F = h - Q, z = c[B] < C ? (E = 0, c[B]) : c[B] > C ? (E = st[ft + c[B]], I[J + c[B]]) : (E = 96, 0), m = 1 << h - Q, e = w = 1 << L; d[D + (T >> Q) + (w -= m)] = F << 24 | E << 16 | z | 0, w !== 0; ) ;
|
|
2081
2081
|
for (m = 1 << h - 1; T & m; ) m >>= 1;
|
|
2082
2082
|
if (m !== 0 ? (T &= m - 1, T += m) : T = 0, B++, --q[h] == 0) {
|
|
2083
2083
|
if (h === P) break;
|
|
2084
|
-
h = _[
|
|
2084
|
+
h = _[b + c[B]];
|
|
2085
2085
|
}
|
|
2086
2086
|
if (V < h && (T & S) !== x) {
|
|
2087
|
-
for (Q === 0 && (Q = V),
|
|
2087
|
+
for (Q === 0 && (Q = V), D += e, W = 1 << (L = h - Q); L + Q < P && !((W -= q[L + Q]) <= 0); ) L++, W <<= 1;
|
|
2088
2088
|
if (tt += 1 << L, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
|
|
2089
|
-
d[x = T & S] = V << 24 | L << 16 |
|
|
2089
|
+
d[x = T & S] = V << 24 | L << 16 | D - n | 0;
|
|
2090
2090
|
}
|
|
2091
2091
|
}
|
|
2092
|
-
return T !== 0 && (d[
|
|
2092
|
+
return T !== 0 && (d[D + T] = h - Q << 24 | 64 << 16 | 0), s.bits = V, 0;
|
|
2093
2093
|
};
|
|
2094
|
-
}, { "../utils/common": 41 }], 51: [function(p, A,
|
|
2094
|
+
}, { "../utils/common": 41 }], 51: [function(p, A, v) {
|
|
2095
2095
|
A.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" };
|
|
2096
|
-
}, {}], 52: [function(p, A,
|
|
2096
|
+
}, {}], 52: [function(p, A, v) {
|
|
2097
2097
|
var a = p("../utils/common"), o = 0, r = 1;
|
|
2098
2098
|
function l(u) {
|
|
2099
2099
|
for (var k = u.length; 0 <= --k; ) u[k] = 0;
|
|
2100
2100
|
}
|
|
2101
|
-
var g = 0, y = 29, _ = 256,
|
|
2101
|
+
var g = 0, y = 29, _ = 256, b = _ + 1 + y, i = 30, d = 19, n = 2 * b + 1, c = 15, s = 16, m = 7, w = 256, x = 16, S = 17, D = 18, C = [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], F = [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], E = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], Z = new Array(2 * (b + 2));
|
|
2102
2102
|
l(Z);
|
|
2103
2103
|
var h = new Array(2 * i);
|
|
2104
2104
|
l(h);
|
|
@@ -2141,7 +2141,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2141
2141
|
}
|
|
2142
2142
|
function rt(u) {
|
|
2143
2143
|
var k;
|
|
2144
|
-
for (k = 0; k <
|
|
2144
|
+
for (k = 0; k < b; k++) u.dyn_ltree[2 * k] = 0;
|
|
2145
2145
|
for (k = 0; k < i; k++) u.dyn_dtree[2 * k] = 0;
|
|
2146
2146
|
for (k = 0; k < d; k++) u.bl_tree[2 * k] = 0;
|
|
2147
2147
|
u.dyn_ltree[2 * w] = 1, u.opt_len = u.static_len = 0, u.last_lit = u.matches = 0;
|
|
@@ -2157,9 +2157,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2157
2157
|
for (var j = u.heap[U], O = U << 1; O <= u.heap_len && (O < u.heap_len && ct(k, u.heap[O + 1], u.heap[O], u.depth) && O++, !ct(k, j, u.heap[O], u.depth)); ) u.heap[U] = u.heap[O], U = O, O <<= 1;
|
|
2158
2158
|
u.heap[U] = j;
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function bt(u, k, U) {
|
|
2161
2161
|
var j, O, M, $, H = 0;
|
|
2162
|
-
if (u.last_lit !== 0) for (; j = u.pending_buf[u.d_buf + 2 * H] << 8 | u.pending_buf[u.d_buf + 2 * H + 1], O = u.pending_buf[u.l_buf + H], H++, j === 0 ? G(u, O, k) : (G(u, (M = e[O]) + _ + 1, k), ($ =
|
|
2162
|
+
if (u.last_lit !== 0) for (; j = u.pending_buf[u.d_buf + 2 * H] << 8 | u.pending_buf[u.d_buf + 2 * H + 1], O = u.pending_buf[u.l_buf + H], H++, j === 0 ? G(u, O, k) : (G(u, (M = e[O]) + _ + 1, k), ($ = C[M]) !== 0 && q(u, O -= P[M], $), G(u, M = I(--j), U), ($ = F[M]) !== 0 && q(u, j -= W[M], $)), H < u.last_lit; ) ;
|
|
2163
2163
|
G(u, w, k);
|
|
2164
2164
|
}
|
|
2165
2165
|
function _t(u, k) {
|
|
@@ -2169,27 +2169,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2169
2169
|
for (k.max_code = at, U = u.heap_len >> 1; 1 <= U; U--) ot(u, M, U);
|
|
2170
2170
|
for (O = Y; U = u.heap[1], u.heap[1] = u.heap[u.heap_len--], ot(u, M, 1), j = u.heap[1], u.heap[--u.heap_max] = U, u.heap[--u.heap_max] = j, M[2 * O] = M[2 * U] + M[2 * j], u.depth[O] = (u.depth[U] >= u.depth[j] ? u.depth[U] : u.depth[j]) + 1, M[2 * U + 1] = M[2 * j + 1] = O, u.heap[1] = O++, ot(u, M, 1), 2 <= u.heap_len; ) ;
|
|
2171
2171
|
u.heap[--u.heap_max] = u.heap[1], function(nt, gt) {
|
|
2172
|
-
var St,
|
|
2172
|
+
var St, vt, Et, lt, zt, Rt, yt = gt.dyn_tree, Pt = gt.max_code, Mt = gt.stat_desc.static_tree, Zt = gt.stat_desc.has_stree, Ht = gt.stat_desc.extra_bits, Ft = gt.stat_desc.extra_base, Ct = gt.stat_desc.max_length, At = 0;
|
|
2173
2173
|
for (lt = 0; lt <= c; lt++) nt.bl_count[lt] = 0;
|
|
2174
|
-
for (yt[2 * nt.heap[nt.heap_max] + 1] = 0, St = nt.heap_max + 1; St < n; St++) Ct < (lt = yt[2 * yt[2 * (
|
|
2174
|
+
for (yt[2 * nt.heap[nt.heap_max] + 1] = 0, St = nt.heap_max + 1; St < n; St++) Ct < (lt = yt[2 * yt[2 * (vt = nt.heap[St]) + 1] + 1] + 1) && (lt = Ct, At++), yt[2 * vt + 1] = lt, Pt < vt || (nt.bl_count[lt]++, zt = 0, Ft <= vt && (zt = Ht[vt - Ft]), Rt = yt[2 * vt], nt.opt_len += Rt * (lt + zt), Zt && (nt.static_len += Rt * (Mt[2 * vt + 1] + zt)));
|
|
2175
2175
|
if (At !== 0) {
|
|
2176
2176
|
do {
|
|
2177
2177
|
for (lt = Ct - 1; nt.bl_count[lt] === 0; ) lt--;
|
|
2178
2178
|
nt.bl_count[lt]--, nt.bl_count[lt + 1] += 2, nt.bl_count[Ct]--, At -= 2;
|
|
2179
2179
|
} while (0 < At);
|
|
2180
|
-
for (lt = Ct; lt !== 0; lt--) for (
|
|
2180
|
+
for (lt = Ct; lt !== 0; lt--) for (vt = nt.bl_count[lt]; vt !== 0; ) Pt < (Et = nt.heap[--St]) || (yt[2 * Et + 1] !== lt && (nt.opt_len += (lt - yt[2 * Et + 1]) * yt[2 * Et], yt[2 * Et + 1] = lt), vt--);
|
|
2181
2181
|
}
|
|
2182
2182
|
}(u, k), ft(M, at, u.bl_count);
|
|
2183
2183
|
}
|
|
2184
2184
|
function t(u, k, U) {
|
|
2185
2185
|
var j, O, M = -1, $ = k[1], H = 0, Y = 7, at = 4;
|
|
2186
|
-
for ($ === 0 && (Y = 138, at = 3), k[2 * (U + 1) + 1] = 65535, j = 0; j <= U; j++) O = $, $ = k[2 * (j + 1) + 1], ++H < Y && O === $ || (H < at ? u.bl_tree[2 * O] += H : O !== 0 ? (O !== M && u.bl_tree[2 * O]++, u.bl_tree[2 * x]++) : H <= 10 ? u.bl_tree[2 * S]++ : u.bl_tree[2 *
|
|
2186
|
+
for ($ === 0 && (Y = 138, at = 3), k[2 * (U + 1) + 1] = 65535, j = 0; j <= U; j++) O = $, $ = k[2 * (j + 1) + 1], ++H < Y && O === $ || (H < at ? u.bl_tree[2 * O] += H : O !== 0 ? (O !== M && u.bl_tree[2 * O]++, u.bl_tree[2 * x]++) : H <= 10 ? u.bl_tree[2 * S]++ : u.bl_tree[2 * D]++, M = O, at = (H = 0) === $ ? (Y = 138, 3) : O === $ ? (Y = 6, 3) : (Y = 7, 4));
|
|
2187
2187
|
}
|
|
2188
2188
|
function N(u, k, U) {
|
|
2189
2189
|
var j, O, M = -1, $ = k[1], H = 0, Y = 7, at = 4;
|
|
2190
2190
|
for ($ === 0 && (Y = 138, at = 3), j = 0; j <= U; j++) if (O = $, $ = k[2 * (j + 1) + 1], !(++H < Y && O === $)) {
|
|
2191
2191
|
if (H < at) for (; G(u, O, u.bl_tree), --H != 0; ) ;
|
|
2192
|
-
else O !== 0 ? (O !== M && (G(u, O, u.bl_tree), H--), G(u, x, u.bl_tree), q(u, H - 3, 2)) : H <= 10 ? (G(u, S, u.bl_tree), q(u, H - 3, 3)) : (G(u,
|
|
2192
|
+
else O !== 0 ? (O !== M && (G(u, O, u.bl_tree), H--), G(u, x, u.bl_tree), q(u, H - 3, 2)) : H <= 10 ? (G(u, S, u.bl_tree), q(u, H - 3, 3)) : (G(u, D, u.bl_tree), q(u, H - 11, 7));
|
|
2193
2193
|
M = O, at = (H = 0) === $ ? (Y = 138, 3) : O === $ ? (Y = 6, 3) : (Y = 7, 4);
|
|
2194
2194
|
}
|
|
2195
2195
|
}
|
|
@@ -2200,21 +2200,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2200
2200
|
it(O), J(O, $), J(O, ~$), a.arraySet(O.pending_buf, O.window, M, $, O.pending), O.pending += $;
|
|
2201
2201
|
}(u, k, U);
|
|
2202
2202
|
}
|
|
2203
|
-
|
|
2203
|
+
v._tr_init = function(u) {
|
|
2204
2204
|
R || (function() {
|
|
2205
2205
|
var k, U, j, O, M, $ = new Array(c + 1);
|
|
2206
|
-
for (O = j = 0; O < y - 1; O++) for (P[O] = j, k = 0; k < 1 <<
|
|
2207
|
-
for (e[j - 1] = O, O = M = 0; O < 16; O++) for (W[O] = M, k = 0; k < 1 <<
|
|
2208
|
-
for (M >>= 7; O < i; O++) for (W[O] = M << 7, k = 0; k < 1 <<
|
|
2206
|
+
for (O = j = 0; O < y - 1; O++) for (P[O] = j, k = 0; k < 1 << C[O]; k++) e[j++] = O;
|
|
2207
|
+
for (e[j - 1] = O, O = M = 0; O < 16; O++) for (W[O] = M, k = 0; k < 1 << F[O]; k++) B[M++] = O;
|
|
2208
|
+
for (M >>= 7; O < i; O++) for (W[O] = M << 7, k = 0; k < 1 << F[O] - 7; k++) B[256 + M++] = O;
|
|
2209
2209
|
for (U = 0; U <= c; U++) $[U] = 0;
|
|
2210
2210
|
for (k = 0; k <= 143; ) Z[2 * k + 1] = 8, k++, $[8]++;
|
|
2211
2211
|
for (; k <= 255; ) Z[2 * k + 1] = 9, k++, $[9]++;
|
|
2212
2212
|
for (; k <= 279; ) Z[2 * k + 1] = 7, k++, $[7]++;
|
|
2213
2213
|
for (; k <= 287; ) Z[2 * k + 1] = 8, k++, $[8]++;
|
|
2214
|
-
for (ft(Z,
|
|
2215
|
-
V = new tt(Z,
|
|
2214
|
+
for (ft(Z, b + 1, $), k = 0; k < i; k++) h[2 * k + 1] = 5, h[2 * k] = st(k, 5);
|
|
2215
|
+
V = new tt(Z, C, _ + 1, b, c), L = new tt(h, F, 0, i, c), Q = new tt(new Array(0), E, 0, d, m);
|
|
2216
2216
|
}(), R = !0), u.l_desc = new T(u.dyn_ltree, V), u.d_desc = new T(u.dyn_dtree, L), u.bl_desc = new T(u.bl_tree, Q), u.bi_buf = 0, u.bi_valid = 0, rt(u);
|
|
2217
|
-
},
|
|
2217
|
+
}, v._tr_stored_block = f, v._tr_flush_block = function(u, k, U, j) {
|
|
2218
2218
|
var O, M, $ = 0;
|
|
2219
2219
|
0 < u.level ? (u.strm.data_type === 2 && (u.strm.data_type = function(H) {
|
|
2220
2220
|
var Y, at = 4093624447;
|
|
@@ -2226,27 +2226,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2226
2226
|
var Y;
|
|
2227
2227
|
for (t(H, H.dyn_ltree, H.l_desc.max_code), t(H, H.dyn_dtree, H.d_desc.max_code), _t(H, H.bl_desc), Y = d - 1; 3 <= Y && H.bl_tree[2 * z[Y] + 1] === 0; Y--) ;
|
|
2228
2228
|
return H.opt_len += 3 * (Y + 1) + 5 + 5 + 4, Y;
|
|
2229
|
-
}(u), O = u.opt_len + 3 + 7 >>> 3, (M = u.static_len + 3 + 7 >>> 3) <= O && (O = M)) : O = M = U + 5, U + 4 <= O && k !== -1 ? f(u, k, U, j) : u.strategy === 4 || M === O ? (q(u, 2 + (j ? 1 : 0), 3),
|
|
2229
|
+
}(u), O = u.opt_len + 3 + 7 >>> 3, (M = u.static_len + 3 + 7 >>> 3) <= O && (O = M)) : O = M = U + 5, U + 4 <= O && k !== -1 ? f(u, k, U, j) : u.strategy === 4 || M === O ? (q(u, 2 + (j ? 1 : 0), 3), bt(u, Z, h)) : (q(u, 4 + (j ? 1 : 0), 3), function(H, Y, at, nt) {
|
|
2230
2230
|
var gt;
|
|
2231
2231
|
for (q(H, Y - 257, 5), q(H, at - 1, 5), q(H, nt - 4, 4), gt = 0; gt < nt; gt++) q(H, H.bl_tree[2 * z[gt] + 1], 3);
|
|
2232
2232
|
N(H, H.dyn_ltree, Y - 1), N(H, H.dyn_dtree, at - 1);
|
|
2233
|
-
}(u, u.l_desc.max_code + 1, u.d_desc.max_code + 1, $ + 1),
|
|
2234
|
-
},
|
|
2233
|
+
}(u, u.l_desc.max_code + 1, u.d_desc.max_code + 1, $ + 1), bt(u, u.dyn_ltree, u.dyn_dtree)), rt(u), j && it(u);
|
|
2234
|
+
}, v._tr_tally = function(u, k, U) {
|
|
2235
2235
|
return u.pending_buf[u.d_buf + 2 * u.last_lit] = k >>> 8 & 255, u.pending_buf[u.d_buf + 2 * u.last_lit + 1] = 255 & k, u.pending_buf[u.l_buf + u.last_lit] = 255 & U, u.last_lit++, k === 0 ? u.dyn_ltree[2 * U]++ : (u.matches++, k--, u.dyn_ltree[2 * (e[U] + _ + 1)]++, u.dyn_dtree[2 * I(k)]++), u.last_lit === u.lit_bufsize - 1;
|
|
2236
|
-
},
|
|
2236
|
+
}, v._tr_align = function(u) {
|
|
2237
2237
|
q(u, 2, 3), G(u, w, Z), function(k) {
|
|
2238
2238
|
k.bi_valid === 16 ? (J(k, k.bi_buf), k.bi_buf = 0, k.bi_valid = 0) : 8 <= k.bi_valid && (k.pending_buf[k.pending++] = 255 & k.bi_buf, k.bi_buf >>= 8, k.bi_valid -= 8);
|
|
2239
2239
|
}(u);
|
|
2240
2240
|
};
|
|
2241
|
-
}, { "../utils/common": 41 }], 53: [function(p, A,
|
|
2241
|
+
}, { "../utils/common": 41 }], 53: [function(p, A, v) {
|
|
2242
2242
|
A.exports = function() {
|
|
2243
2243
|
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;
|
|
2244
2244
|
};
|
|
2245
|
-
}, {}], 54: [function(p, A,
|
|
2245
|
+
}, {}], 54: [function(p, A, v) {
|
|
2246
2246
|
(function(a) {
|
|
2247
2247
|
(function(o, r) {
|
|
2248
2248
|
if (!o.setImmediate) {
|
|
2249
|
-
var l, g, y, _,
|
|
2249
|
+
var l, g, y, _, b = 1, i = {}, d = !1, n = o.document, c = Object.getPrototypeOf && Object.getPrototypeOf(o);
|
|
2250
2250
|
c = c && c.setTimeout ? c : o, l = {}.toString.call(o.process) === "[object process]" ? function(x) {
|
|
2251
2251
|
process.nextTick(function() {
|
|
2252
2252
|
m(x);
|
|
@@ -2273,9 +2273,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2273
2273
|
setTimeout(m, 0, x);
|
|
2274
2274
|
}, c.setImmediate = function(x) {
|
|
2275
2275
|
typeof x != "function" && (x = new Function("" + x));
|
|
2276
|
-
for (var S = new Array(arguments.length - 1),
|
|
2277
|
-
var
|
|
2278
|
-
return i[
|
|
2276
|
+
for (var S = new Array(arguments.length - 1), D = 0; D < S.length; D++) S[D] = arguments[D + 1];
|
|
2277
|
+
var C = { callback: x, args: S };
|
|
2278
|
+
return i[b] = C, l(b), b++;
|
|
2279
2279
|
}, c.clearImmediate = s;
|
|
2280
2280
|
}
|
|
2281
2281
|
function s(x) {
|
|
@@ -2288,23 +2288,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2288
2288
|
if (S) {
|
|
2289
2289
|
d = !0;
|
|
2290
2290
|
try {
|
|
2291
|
-
(function(
|
|
2292
|
-
var
|
|
2293
|
-
switch (
|
|
2291
|
+
(function(D) {
|
|
2292
|
+
var C = D.callback, F = D.args;
|
|
2293
|
+
switch (F.length) {
|
|
2294
2294
|
case 0:
|
|
2295
|
-
|
|
2295
|
+
C();
|
|
2296
2296
|
break;
|
|
2297
2297
|
case 1:
|
|
2298
|
-
|
|
2298
|
+
C(F[0]);
|
|
2299
2299
|
break;
|
|
2300
2300
|
case 2:
|
|
2301
|
-
|
|
2301
|
+
C(F[0], F[1]);
|
|
2302
2302
|
break;
|
|
2303
2303
|
case 3:
|
|
2304
|
-
|
|
2304
|
+
C(F[0], F[1], F[2]);
|
|
2305
2305
|
break;
|
|
2306
2306
|
default:
|
|
2307
|
-
|
|
2307
|
+
C.apply(r, F);
|
|
2308
2308
|
}
|
|
2309
2309
|
})(S);
|
|
2310
2310
|
} finally {
|
|
@@ -2324,27 +2324,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2324
2324
|
var Vt = jt.exports;
|
|
2325
2325
|
const Kt = /* @__PURE__ */ $t(Vt);
|
|
2326
2326
|
function Yt() {
|
|
2327
|
-
const [X, K] = ht(""), [p, A] = ht(!1), [
|
|
2327
|
+
const [X, K] = ht(""), [p, A] = ht(!1), [v, a] = ht(""), [o, r] = ht(null);
|
|
2328
2328
|
let l = "", g = "";
|
|
2329
|
-
const y = wt(null), _ = wt(null),
|
|
2329
|
+
const y = wt(null), _ = wt(null), b = {}, i = [
|
|
2330
2330
|
"text/html",
|
|
2331
2331
|
"text/xml",
|
|
2332
2332
|
"application/xml",
|
|
2333
2333
|
"application/xhtml+xml",
|
|
2334
2334
|
"image/svg+xml"
|
|
2335
2335
|
], d = Tt(
|
|
2336
|
-
async (
|
|
2336
|
+
async (E) => {
|
|
2337
2337
|
A(!0), K(""), a("Loading..."), r(null), _.current && (document.head.removeChild(_.current), URL.revokeObjectURL(_.current.href), _.current = null);
|
|
2338
2338
|
try {
|
|
2339
2339
|
let z;
|
|
2340
|
-
if (typeof
|
|
2341
|
-
const Z = await fetch(
|
|
2340
|
+
if (typeof E == "string") {
|
|
2341
|
+
const Z = await fetch(E);
|
|
2342
2342
|
if (!Z.ok)
|
|
2343
2343
|
throw new Error(
|
|
2344
2344
|
`HTTP error! status: ${Z.status} ${Z.statusText}`
|
|
2345
2345
|
);
|
|
2346
2346
|
z = await Z.arrayBuffer();
|
|
2347
|
-
} else
|
|
2347
|
+
} else E instanceof File ? z = await E.arrayBuffer() : z = E;
|
|
2348
2348
|
if (!z || z.byteLength === 0)
|
|
2349
2349
|
throw new Error(
|
|
2350
2350
|
"EPUB source is empty or could not be read."
|
|
@@ -2376,28 +2376,28 @@ function Yt() {
|
|
|
2376
2376
|
);
|
|
2377
2377
|
s(V), await m(V);
|
|
2378
2378
|
}
|
|
2379
|
-
function c(
|
|
2379
|
+
function c(E) {
|
|
2380
2380
|
const h = new DOMParser().parseFromString(
|
|
2381
|
-
|
|
2381
|
+
E,
|
|
2382
2382
|
"application/xml"
|
|
2383
2383
|
).querySelector(
|
|
2384
2384
|
'rootfile[media-type="application/oebps-package+xml"]'
|
|
2385
2385
|
);
|
|
2386
2386
|
return (h == null ? void 0 : h.getAttribute("full-path")) ?? null;
|
|
2387
2387
|
}
|
|
2388
|
-
function s(
|
|
2389
|
-
const z =
|
|
2388
|
+
function s(E) {
|
|
2389
|
+
const z = E.querySelector("metadata > dc\\:title") || E.querySelector("metadata > title");
|
|
2390
2390
|
a((z == null ? void 0 : z.textContent) || "Untitled Book");
|
|
2391
2391
|
}
|
|
2392
|
-
async function m(
|
|
2392
|
+
async function m(E) {
|
|
2393
2393
|
if (!y.current) return;
|
|
2394
2394
|
const z = {};
|
|
2395
|
-
|
|
2395
|
+
E.querySelectorAll("manifest > item").forEach((e) => {
|
|
2396
2396
|
const P = e.getAttribute("id"), V = e.getAttribute("href"), L = e.getAttribute("media-type");
|
|
2397
2397
|
P && V && L && (z[P] = { href: decodeURIComponent(V), type: L });
|
|
2398
2398
|
});
|
|
2399
2399
|
const Z = Array.from(
|
|
2400
|
-
|
|
2400
|
+
E.querySelectorAll("spine > itemref")
|
|
2401
2401
|
).map((e) => e.getAttribute("idref"));
|
|
2402
2402
|
let h = "";
|
|
2403
2403
|
const B = /* @__PURE__ */ new Set();
|
|
@@ -2437,16 +2437,16 @@ function Yt() {
|
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
|
|
2440
|
+
F(), K(h);
|
|
2441
2441
|
}
|
|
2442
|
-
async function w(
|
|
2443
|
-
let Z = [...
|
|
2442
|
+
async function w(E, z) {
|
|
2443
|
+
let Z = [...E.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/gi)].map((B) => B[1]).join(`
|
|
2444
2444
|
`);
|
|
2445
2445
|
Z = x(Z), g += Z;
|
|
2446
|
-
let h =
|
|
2446
|
+
let h = E.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "");
|
|
2447
2447
|
return h = h.replace(/<link[^>]*?>/gi, ""), h = h.replace(/<title[^>]*>[\s\S]*?<\/title>/gi, ""), h = await S(h, z), h;
|
|
2448
2448
|
}
|
|
2449
|
-
function x(
|
|
2449
|
+
function x(E) {
|
|
2450
2450
|
const z = [
|
|
2451
2451
|
"background-color",
|
|
2452
2452
|
"color",
|
|
@@ -2456,7 +2456,7 @@ function Yt() {
|
|
|
2456
2456
|
"line-height",
|
|
2457
2457
|
"text-align"
|
|
2458
2458
|
];
|
|
2459
|
-
return
|
|
2459
|
+
return E.split(/}/).map((Z) => {
|
|
2460
2460
|
const h = Z.split(/{/), B = h[0], e = h[1];
|
|
2461
2461
|
if (!e) return "";
|
|
2462
2462
|
const P = e.split(/;/).map((V) => V.trim()).filter((V) => V ? !z.some(
|
|
@@ -2466,25 +2466,25 @@ function Yt() {
|
|
|
2466
2466
|
}).filter((Z) => !!Z).join(`
|
|
2467
2467
|
`);
|
|
2468
2468
|
}
|
|
2469
|
-
async function S(
|
|
2469
|
+
async function S(E, z) {
|
|
2470
2470
|
const Z = new DOMParser();
|
|
2471
2471
|
if (i.includes(z))
|
|
2472
2472
|
try {
|
|
2473
2473
|
const h = Z.parseFromString(
|
|
2474
|
-
|
|
2474
|
+
E,
|
|
2475
2475
|
z
|
|
2476
2476
|
), B = h.querySelector("parsererror");
|
|
2477
2477
|
if (B)
|
|
2478
2478
|
return console.warn(
|
|
2479
2479
|
"Parser error in content item during cleanImages, skipping.",
|
|
2480
2480
|
B.textContent
|
|
2481
|
-
),
|
|
2481
|
+
), E;
|
|
2482
2482
|
const e = h.querySelectorAll("img");
|
|
2483
2483
|
for (const Q of e)
|
|
2484
|
-
await
|
|
2484
|
+
await D(Q);
|
|
2485
2485
|
const P = h.querySelectorAll("image");
|
|
2486
2486
|
for (const Q of P)
|
|
2487
|
-
await
|
|
2487
|
+
await C(Q);
|
|
2488
2488
|
return new XMLSerializer().serializeToString(
|
|
2489
2489
|
h.documentElement || h
|
|
2490
2490
|
);
|
|
@@ -2492,65 +2492,65 @@ function Yt() {
|
|
|
2492
2492
|
return console.error(
|
|
2493
2493
|
"Error during cleanImages DOM processing:",
|
|
2494
2494
|
h
|
|
2495
|
-
),
|
|
2495
|
+
), E;
|
|
2496
2496
|
}
|
|
2497
|
-
else return
|
|
2497
|
+
else return E;
|
|
2498
2498
|
}
|
|
2499
|
-
async function
|
|
2499
|
+
async function D(E) {
|
|
2500
2500
|
var Z;
|
|
2501
|
-
let z =
|
|
2501
|
+
let z = E.getAttribute("src");
|
|
2502
2502
|
if (z) {
|
|
2503
2503
|
for (; z.startsWith(".") || z.startsWith("/"); ) z = z.slice(1);
|
|
2504
|
-
if (z = l + z,
|
|
2504
|
+
if (z = l + z, b[z] === void 0) {
|
|
2505
2505
|
const h = (Z = y.current) == null ? void 0 : Z.file(z);
|
|
2506
2506
|
if (h)
|
|
2507
2507
|
try {
|
|
2508
2508
|
const B = await h.async("blob"), e = URL.createObjectURL(B);
|
|
2509
|
-
|
|
2509
|
+
b[z] = e;
|
|
2510
2510
|
} catch (B) {
|
|
2511
2511
|
console.warn(
|
|
2512
2512
|
`Could not load image blob (formatImg) ${z}:`,
|
|
2513
2513
|
B
|
|
2514
|
-
),
|
|
2514
|
+
), b[z] = "";
|
|
2515
2515
|
}
|
|
2516
2516
|
else
|
|
2517
|
-
console.warn(`Image file not found in zip (formatImg): ${z}`),
|
|
2517
|
+
console.warn(`Image file not found in zip (formatImg): ${z}`), b[z] = "";
|
|
2518
2518
|
}
|
|
2519
|
-
|
|
2519
|
+
E.setAttribute("src", b[z]);
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
async function E
|
|
2522
|
+
async function C(E) {
|
|
2523
2523
|
var Z;
|
|
2524
|
-
let z =
|
|
2524
|
+
let z = E.getAttribute("xlink:href");
|
|
2525
2525
|
if (z) {
|
|
2526
2526
|
for (; z.startsWith(".") || z.startsWith("/"); ) z = z.slice(1);
|
|
2527
|
-
if (z = l + z,
|
|
2527
|
+
if (z = l + z, b[z] === void 0) {
|
|
2528
2528
|
const h = (Z = y.current) == null ? void 0 : Z.file(z);
|
|
2529
2529
|
if (h)
|
|
2530
2530
|
try {
|
|
2531
2531
|
const B = await h.async("blob"), e = URL.createObjectURL(B);
|
|
2532
|
-
|
|
2532
|
+
b[z] = e;
|
|
2533
2533
|
} catch (B) {
|
|
2534
2534
|
console.warn(
|
|
2535
2535
|
`Could not load image blob (formatXMLImage) ${z}:`,
|
|
2536
2536
|
B
|
|
2537
|
-
),
|
|
2537
|
+
), b[z] = "";
|
|
2538
2538
|
}
|
|
2539
2539
|
else
|
|
2540
2540
|
console.warn(
|
|
2541
2541
|
`Image file not found in zip (formatXMLImage): ${z}`
|
|
2542
|
-
),
|
|
2542
|
+
), b[z] = "";
|
|
2543
2543
|
}
|
|
2544
|
-
|
|
2544
|
+
E.setAttribute("xlink:href", b[z]);
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2547
|
+
function F() {
|
|
2548
2548
|
if (!g.trim()) return;
|
|
2549
|
-
const
|
|
2549
|
+
const E = new Blob([g], { type: "text/css" }), z = URL.createObjectURL(E);
|
|
2550
2550
|
_.current = document.createElement("link"), _.current.href = z, _.current.rel = "stylesheet", _.current.setAttribute("data-bok-reader-style", "true"), document.head.appendChild(_.current);
|
|
2551
2551
|
}
|
|
2552
2552
|
return {
|
|
2553
|
-
title:
|
|
2553
|
+
title: v,
|
|
2554
2554
|
rawContent: X,
|
|
2555
2555
|
isLoading: p,
|
|
2556
2556
|
error: o,
|
|
@@ -2565,7 +2565,7 @@ function Wt(X) {
|
|
|
2565
2565
|
noOfPages: 1
|
|
2566
2566
|
});
|
|
2567
2567
|
return dt(() => {
|
|
2568
|
-
const A = X == null ? void 0 : X.current,
|
|
2568
|
+
const A = X == null ? void 0 : X.current, v = () => {
|
|
2569
2569
|
if (A) {
|
|
2570
2570
|
const a = A.getBoundingClientRect(), o = a.height < a.width;
|
|
2571
2571
|
p((r) => {
|
|
@@ -2580,8 +2580,8 @@ function Wt(X) {
|
|
|
2580
2580
|
p({ width: 0, height: 0, noOfPages: 1 });
|
|
2581
2581
|
};
|
|
2582
2582
|
if (A) {
|
|
2583
|
-
|
|
2584
|
-
const a = new ResizeObserver(
|
|
2583
|
+
v();
|
|
2584
|
+
const a = new ResizeObserver(v);
|
|
2585
2585
|
return a.observe(A), () => {
|
|
2586
2586
|
a.unobserve(A);
|
|
2587
2587
|
};
|
|
@@ -2591,41 +2591,41 @@ function Wt(X) {
|
|
|
2591
2591
|
function Jt(X) {
|
|
2592
2592
|
const [K, p] = ht(0), A = Tt(() => {
|
|
2593
2593
|
if (X.current) {
|
|
2594
|
-
const
|
|
2594
|
+
const v = X.current.scrollWidth, a = X.current.scrollLeft, o = v > 0 ? a / v : 0;
|
|
2595
2595
|
p(o);
|
|
2596
2596
|
}
|
|
2597
2597
|
}, [X]);
|
|
2598
2598
|
return dt(() => {
|
|
2599
|
-
const
|
|
2600
|
-
if (!
|
|
2599
|
+
const v = X.current;
|
|
2600
|
+
if (!v) return;
|
|
2601
2601
|
let a = null;
|
|
2602
2602
|
const o = 100, r = () => {
|
|
2603
2603
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
2604
2604
|
A();
|
|
2605
2605
|
}, o);
|
|
2606
2606
|
};
|
|
2607
|
-
return
|
|
2608
|
-
a && clearTimeout(a),
|
|
2607
|
+
return v.addEventListener("scroll", r), A(), () => {
|
|
2608
|
+
a && clearTimeout(a), v.removeEventListener("scroll", r);
|
|
2609
2609
|
};
|
|
2610
2610
|
}, [A, X]), [K, p];
|
|
2611
2611
|
}
|
|
2612
|
-
function Qt(X, K, p, A,
|
|
2612
|
+
function Qt(X, K, p, A, v) {
|
|
2613
2613
|
let a = "";
|
|
2614
2614
|
dt(() => {
|
|
2615
2615
|
K > 1e-7 && (a = JSON.stringify({
|
|
2616
2616
|
percentRead: K,
|
|
2617
2617
|
padding: p,
|
|
2618
2618
|
fontSize: A,
|
|
2619
|
-
fontFamily:
|
|
2619
|
+
fontFamily: v
|
|
2620
2620
|
}), localStorage.setItem(X, a));
|
|
2621
|
-
}, [X, K, p, A,
|
|
2621
|
+
}, [X, K, p, A, v]);
|
|
2622
2622
|
}
|
|
2623
2623
|
const te = (X, K, p, A) => {
|
|
2624
|
-
const [
|
|
2624
|
+
const [v, a] = Wt(p), o = wt(null), r = wt(""), l = Tt(
|
|
2625
2625
|
(g, y) => {
|
|
2626
|
-
!K && !A && (g /
|
|
2626
|
+
!K && !A && (g / v <= 0.4 && y / a < 0.8 && X(-1), g / v > 0.4 && y / a < 0.8 && X(1));
|
|
2627
2627
|
},
|
|
2628
|
-
[X, K,
|
|
2628
|
+
[X, K, v, a, A]
|
|
2629
2629
|
);
|
|
2630
2630
|
dt(() => {
|
|
2631
2631
|
const g = () => {
|
|
@@ -2644,24 +2644,24 @@ const te = (X, K, p, A) => {
|
|
|
2644
2644
|
}, y = (_) => {
|
|
2645
2645
|
if (o.current && r.current) {
|
|
2646
2646
|
clearTimeout(o.current), o.current = null;
|
|
2647
|
-
const { pageX:
|
|
2648
|
-
l(
|
|
2647
|
+
const { pageX: b, pageY: i } = _.touches[0];
|
|
2648
|
+
l(b, i);
|
|
2649
2649
|
}
|
|
2650
2650
|
};
|
|
2651
2651
|
return window.addEventListener("touchstart", g), window.addEventListener("touchend", y), () => {
|
|
2652
2652
|
window.removeEventListener("touchstart", g), window.removeEventListener("touchend", y);
|
|
2653
2653
|
};
|
|
2654
|
-
}, [
|
|
2654
|
+
}, [v, l]), dt(() => {
|
|
2655
2655
|
const g = p.current, y = () => {
|
|
2656
2656
|
o.current = window.setTimeout(() => {
|
|
2657
2657
|
}, 200);
|
|
2658
|
-
}, _ = (
|
|
2659
|
-
o.current && !r.current && (clearTimeout(o.current), o.current = null, l(
|
|
2658
|
+
}, _ = (b) => {
|
|
2659
|
+
o.current && !r.current && (clearTimeout(o.current), o.current = null, l(b.clientX, b.clientY));
|
|
2660
2660
|
};
|
|
2661
2661
|
return g == null || g.addEventListener("mousedown", y), g == null || g.addEventListener("mouseup", _), () => {
|
|
2662
2662
|
g == null || g.removeEventListener("mousedown", y), g == null || g.removeEventListener("mouseup", _);
|
|
2663
2663
|
};
|
|
2664
|
-
}, [
|
|
2664
|
+
}, [v, K, l, p]);
|
|
2665
2665
|
};
|
|
2666
2666
|
function ee({ currentPage: X, pages: K }) {
|
|
2667
2667
|
return /* @__PURE__ */ ut("div", { className: "page-number", children: [
|
|
@@ -2675,7 +2675,7 @@ function re({
|
|
|
2675
2675
|
title: K,
|
|
2676
2676
|
setIsLoading: p,
|
|
2677
2677
|
fontSize: A,
|
|
2678
|
-
sidePadding:
|
|
2678
|
+
sidePadding: v,
|
|
2679
2679
|
fontFamily: a,
|
|
2680
2680
|
isOptionMenuVisible: o,
|
|
2681
2681
|
setFontSize: r,
|
|
@@ -2684,69 +2684,69 @@ function re({
|
|
|
2684
2684
|
containerElementRef: y,
|
|
2685
2685
|
showTutorial: _
|
|
2686
2686
|
}) {
|
|
2687
|
-
const
|
|
2688
|
-
Qt(K, c,
|
|
2689
|
-
const
|
|
2690
|
-
(
|
|
2691
|
-
w((
|
|
2692
|
-
const
|
|
2693
|
-
if (
|
|
2694
|
-
let z =
|
|
2695
|
-
return z < 0 && (z = 0), z >= x && (z = x - 1),
|
|
2687
|
+
const b = wt(null), [i, d, n] = Wt(y), [c, s] = Jt(b), [m, w] = ht(1), [x, S] = ht(0);
|
|
2688
|
+
Qt(K, c, v, A, a);
|
|
2689
|
+
const D = Tt(
|
|
2690
|
+
(C) => {
|
|
2691
|
+
w((F) => {
|
|
2692
|
+
const E = b.current;
|
|
2693
|
+
if (E && x > 0 && n > 0 && E.clientWidth > 0) {
|
|
2694
|
+
let z = F + C;
|
|
2695
|
+
return z < 0 && (z = 0), z >= x && (z = x - 1), E.scroll({
|
|
2696
2696
|
left: z * i * n,
|
|
2697
2697
|
behavior: "smooth"
|
|
2698
2698
|
}), z;
|
|
2699
2699
|
}
|
|
2700
|
-
return
|
|
2700
|
+
return F;
|
|
2701
2701
|
});
|
|
2702
2702
|
},
|
|
2703
2703
|
[i, x, n]
|
|
2704
2704
|
);
|
|
2705
2705
|
return te(
|
|
2706
|
-
|
|
2706
|
+
D,
|
|
2707
2707
|
o,
|
|
2708
2708
|
y,
|
|
2709
2709
|
_
|
|
2710
2710
|
), dt(() => {
|
|
2711
2711
|
if (!K) return;
|
|
2712
|
-
const
|
|
2713
|
-
if (
|
|
2712
|
+
const C = localStorage.getItem(K);
|
|
2713
|
+
if (C)
|
|
2714
2714
|
try {
|
|
2715
|
-
const
|
|
2716
|
-
|
|
2717
|
-
} catch (
|
|
2718
|
-
console.error("Failed to parse local storage for", K,
|
|
2715
|
+
const F = JSON.parse(C);
|
|
2716
|
+
F && (s(F.percentRead || 0), F.fontSize !== void 0 && r(F.fontSize), F.padding !== void 0 && l(F.padding), F.fontFamily !== void 0 && g(F.fontFamily));
|
|
2717
|
+
} catch (F) {
|
|
2718
|
+
console.error("Failed to parse local storage for", K, F), s(0);
|
|
2719
2719
|
}
|
|
2720
2720
|
else
|
|
2721
2721
|
s(0);
|
|
2722
2722
|
w(1);
|
|
2723
2723
|
}, [K, s, r, l, g]), dt(() => {
|
|
2724
|
-
const
|
|
2725
|
-
if (!
|
|
2724
|
+
const C = b.current;
|
|
2725
|
+
if (!C || i <= 0 || d <= 0) return;
|
|
2726
2726
|
p(!0);
|
|
2727
|
-
const
|
|
2728
|
-
|
|
2727
|
+
const F = setTimeout(() => {
|
|
2728
|
+
C.style.setProperty(
|
|
2729
2729
|
"--side-padding",
|
|
2730
|
-
`${
|
|
2731
|
-
),
|
|
2732
|
-
const
|
|
2733
|
-
if (S(Z), Z > 0 &&
|
|
2730
|
+
`${v}px`
|
|
2731
|
+
), C.style.setProperty("--font-size", `${A}em`), C.style.setProperty("--font-family", a), C.style.maxHeight = `${d}px`;
|
|
2732
|
+
const E = C.scrollWidth, z = i > 0 && E > 0 ? Math.round(E / i) : 0, Z = n === 1 ? z : Math.round(z / 2);
|
|
2733
|
+
if (S(Z), Z > 0 && C.clientWidth > 0) {
|
|
2734
2734
|
let h = Math.round(Z * c);
|
|
2735
2735
|
h = Math.max(
|
|
2736
2736
|
0,
|
|
2737
2737
|
Math.min(Z - 1, h)
|
|
2738
|
-
), m !== h && (w(h),
|
|
2738
|
+
), m !== h && (w(h), C.scrollLeft = h * i * n);
|
|
2739
2739
|
} else
|
|
2740
2740
|
p(!1), w(1);
|
|
2741
2741
|
p(!1);
|
|
2742
2742
|
}, 400);
|
|
2743
2743
|
return () => {
|
|
2744
|
-
clearTimeout(
|
|
2744
|
+
clearTimeout(F);
|
|
2745
2745
|
};
|
|
2746
2746
|
}, [
|
|
2747
2747
|
i,
|
|
2748
2748
|
d,
|
|
2749
|
-
|
|
2749
|
+
v,
|
|
2750
2750
|
A,
|
|
2751
2751
|
a,
|
|
2752
2752
|
n,
|
|
@@ -2754,17 +2754,17 @@ function re({
|
|
|
2754
2754
|
K,
|
|
2755
2755
|
p
|
|
2756
2756
|
]), dt(() => {
|
|
2757
|
-
const
|
|
2758
|
-
|
|
2757
|
+
const C = (F) => {
|
|
2758
|
+
F.key === "ArrowLeft" ? (F.preventDefault(), D(-1)) : F.key === "ArrowRight" && (F.preventDefault(), D(1));
|
|
2759
2759
|
};
|
|
2760
|
-
return document.addEventListener("keydown",
|
|
2761
|
-
document.removeEventListener("keydown",
|
|
2760
|
+
return document.addEventListener("keydown", C), () => {
|
|
2761
|
+
document.removeEventListener("keydown", C);
|
|
2762
2762
|
};
|
|
2763
|
-
}, [
|
|
2763
|
+
}, [D, i, c]), /* @__PURE__ */ ut(Ut, { children: [
|
|
2764
2764
|
/* @__PURE__ */ et(
|
|
2765
2765
|
"div",
|
|
2766
2766
|
{
|
|
2767
|
-
ref:
|
|
2767
|
+
ref: b,
|
|
2768
2768
|
dangerouslySetInnerHTML: { __html: X },
|
|
2769
2769
|
className: "book-page"
|
|
2770
2770
|
}
|
|
@@ -2810,9 +2810,9 @@ var xt = function(X, K, p) {
|
|
|
2810
2810
|
var A = "react-spinners-".concat(X, "-").concat(p);
|
|
2811
2811
|
if (typeof window > "u" || !window.document)
|
|
2812
2812
|
return A;
|
|
2813
|
-
var
|
|
2814
|
-
document.head.appendChild(
|
|
2815
|
-
var a =
|
|
2813
|
+
var v = document.createElement("style");
|
|
2814
|
+
document.head.appendChild(v);
|
|
2815
|
+
var a = v.sheet, o = `
|
|
2816
2816
|
@keyframes `.concat(A, ` {
|
|
2817
2817
|
`).concat(K, `
|
|
2818
2818
|
}
|
|
@@ -2822,7 +2822,7 @@ var xt = function(X, K, p) {
|
|
|
2822
2822
|
return Bt = Object.assign || function(X) {
|
|
2823
2823
|
for (var K, p = 1, A = arguments.length; p < A; p++) {
|
|
2824
2824
|
K = arguments[p];
|
|
2825
|
-
for (var
|
|
2825
|
+
for (var v in K) Object.prototype.hasOwnProperty.call(K, v) && (X[v] = K[v]);
|
|
2826
2826
|
}
|
|
2827
2827
|
return X;
|
|
2828
2828
|
}, Bt.apply(this, arguments);
|
|
@@ -2830,8 +2830,8 @@ var xt = function(X, K, p) {
|
|
|
2830
2830
|
var p = {};
|
|
2831
2831
|
for (var A in X) Object.prototype.hasOwnProperty.call(X, A) && K.indexOf(A) < 0 && (p[A] = X[A]);
|
|
2832
2832
|
if (X != null && typeof Object.getOwnPropertySymbols == "function")
|
|
2833
|
-
for (var
|
|
2834
|
-
K.indexOf(A[
|
|
2833
|
+
for (var v = 0, A = Object.getOwnPropertySymbols(X); v < A.length; v++)
|
|
2834
|
+
K.indexOf(A[v]) < 0 && Object.prototype.propertyIsEnumerable.call(X, A[v]) && (p[A[v]] = X[A[v]]);
|
|
2835
2835
|
return p;
|
|
2836
2836
|
}, pt = [1, 3, 5], se = [
|
|
2837
2837
|
xt("PropagateLoader", "25% {transform: translateX(-".concat(pt[0], `rem) scale(0.75)}
|
|
@@ -2858,13 +2858,13 @@ var xt = function(X, K, p) {
|
|
|
2858
2858
|
95% {transform: translateX(0rem) scale(1)}`), "propogate-5")
|
|
2859
2859
|
];
|
|
2860
2860
|
function oe(X) {
|
|
2861
|
-
var K = X.loading, p = K === void 0 ? !0 : K, A = X.color,
|
|
2861
|
+
var K = X.loading, p = K === void 0 ? !0 : K, A = X.color, v = A === void 0 ? "#000000" : A, a = X.speedMultiplier, o = a === void 0 ? 1 : a, r = X.cssOverride, l = r === void 0 ? {} : r, g = X.size, y = g === void 0 ? 15 : g, _ = ae(X, ["loading", "color", "speedMultiplier", "cssOverride", "size"]), b = ie(y), i = b.value, d = b.unit, n = Bt({ display: "inherit", position: "relative" }, l), c = function(s) {
|
|
2862
2862
|
return {
|
|
2863
2863
|
position: "absolute",
|
|
2864
2864
|
fontSize: "".concat(i / 3).concat(d),
|
|
2865
2865
|
width: "".concat(i).concat(d),
|
|
2866
2866
|
height: "".concat(i).concat(d),
|
|
2867
|
-
background:
|
|
2867
|
+
background: v,
|
|
2868
2868
|
borderRadius: "50%",
|
|
2869
2869
|
animation: "".concat(se[s], " ").concat(1.5 / o, "s infinite"),
|
|
2870
2870
|
animationFillMode: "forwards"
|
|
@@ -2882,8 +2882,8 @@ function oe(X) {
|
|
|
2882
2882
|
) : null;
|
|
2883
2883
|
}
|
|
2884
2884
|
const Dt = {
|
|
2885
|
-
"loading-screen": "_loading-
|
|
2886
|
-
"loading-screen-gon": "_loading-screen-
|
|
2885
|
+
"loading-screen": "_loading-screen_ywqzh_1",
|
|
2886
|
+
"loading-screen-gon": "_loading-screen-gon_ywqzh_17"
|
|
2887
2887
|
};
|
|
2888
2888
|
function le({
|
|
2889
2889
|
isLoading: X,
|
|
@@ -2910,48 +2910,48 @@ function ue({
|
|
|
2910
2910
|
fontSize: K,
|
|
2911
2911
|
padding: p,
|
|
2912
2912
|
fontFamily: A,
|
|
2913
|
-
setFontSize:
|
|
2913
|
+
setFontSize: v,
|
|
2914
2914
|
setPadding: a,
|
|
2915
2915
|
setFontFamily: o,
|
|
2916
2916
|
supportedFonts: r
|
|
2917
2917
|
}) {
|
|
2918
|
-
const [l, g] = ht(!1), [y, _] = ht(!1),
|
|
2918
|
+
const [l, g] = ht(!1), [y, _] = ht(!1), b = wt(null), i = wt(null), d = [
|
|
2919
2919
|
{ displayName: "System Default", name: "system-ui" },
|
|
2920
2920
|
...r
|
|
2921
2921
|
];
|
|
2922
2922
|
dt(() => {
|
|
2923
|
-
const
|
|
2923
|
+
const C = setTimeout(() => {
|
|
2924
2924
|
_(!0);
|
|
2925
2925
|
}, 0);
|
|
2926
|
-
return () => clearTimeout(
|
|
2926
|
+
return () => clearTimeout(C);
|
|
2927
2927
|
}, []);
|
|
2928
2928
|
const n = () => {
|
|
2929
2929
|
_(!1), g(!0);
|
|
2930
2930
|
};
|
|
2931
2931
|
dt(() => {
|
|
2932
2932
|
if (l) {
|
|
2933
|
-
const
|
|
2933
|
+
const C = setTimeout(() => {
|
|
2934
2934
|
X();
|
|
2935
2935
|
}, 300);
|
|
2936
|
-
return () => clearTimeout(
|
|
2936
|
+
return () => clearTimeout(C);
|
|
2937
2937
|
}
|
|
2938
2938
|
}, [l, X]);
|
|
2939
2939
|
const c = () => {
|
|
2940
2940
|
n();
|
|
2941
|
-
}, s = (
|
|
2942
|
-
|
|
2943
|
-
}, m = (
|
|
2944
|
-
|
|
2945
|
-
|
|
2941
|
+
}, s = (C) => {
|
|
2942
|
+
C.stopPropagation();
|
|
2943
|
+
}, m = (C) => {
|
|
2944
|
+
C.current && (C.current.classList.add("value-changed"), setTimeout(() => {
|
|
2945
|
+
C.current && C.current.classList.remove("value-changed");
|
|
2946
2946
|
}, 300));
|
|
2947
2947
|
}, w = () => {
|
|
2948
|
-
p <= 70 && (a((
|
|
2948
|
+
p <= 70 && (a((C) => C + 5), m(i));
|
|
2949
2949
|
}, x = () => {
|
|
2950
|
-
p - 5 > 0 && (a((
|
|
2950
|
+
p - 5 > 0 && (a((C) => C - 5), m(i));
|
|
2951
2951
|
}, S = () => {
|
|
2952
|
-
K < 3 && (
|
|
2953
|
-
},
|
|
2954
|
-
K - 0.2 > 0.6 && (
|
|
2952
|
+
K < 3 && (v((C) => C + 0.2), m(b));
|
|
2953
|
+
}, D = () => {
|
|
2954
|
+
K - 0.2 > 0.6 && (v((C) => C - 0.2), m(b));
|
|
2955
2955
|
};
|
|
2956
2956
|
return /* @__PURE__ */ et(
|
|
2957
2957
|
"div",
|
|
@@ -2964,35 +2964,27 @@ function ue({
|
|
|
2964
2964
|
className: `options-menu ${y ? "visible" : ""} ${l ? "slide-down" : ""}`,
|
|
2965
2965
|
onClick: s,
|
|
2966
2966
|
children: [
|
|
2967
|
-
/* @__PURE__ */ et("button", { onClick: n, className: "close-button", children: "✕" }),
|
|
2967
|
+
/* @__PURE__ */ et("button", { onClick: n, className: "close-button", "aria-label": "Close menu", children: "✕" }),
|
|
2968
2968
|
/* @__PURE__ */ et("h2", { children: "Reader Options" }),
|
|
2969
2969
|
/* @__PURE__ */ ut("div", { className: "options-buttons", children: [
|
|
2970
2970
|
/* @__PURE__ */ ut("div", { className: "font-family-buttons", children: [
|
|
2971
|
+
/* @__PURE__ */ et("div", { className: "option-label", children: "Font family" }),
|
|
2971
2972
|
/* @__PURE__ */ et(
|
|
2972
2973
|
"select",
|
|
2973
2974
|
{
|
|
2974
2975
|
value: A,
|
|
2975
|
-
onChange: (
|
|
2976
|
-
|
|
2977
|
-
|
|
2976
|
+
onChange: (C) => {
|
|
2977
|
+
const F = d.find((E) => E.name === C.target.value);
|
|
2978
|
+
F && o(F.name);
|
|
2978
2979
|
},
|
|
2979
|
-
children: d.map((
|
|
2980
|
-
"option",
|
|
2981
|
-
{
|
|
2982
|
-
value: E.name,
|
|
2983
|
-
children: E.displayName
|
|
2984
|
-
},
|
|
2985
|
-
E.displayName
|
|
2986
|
-
))
|
|
2980
|
+
children: d.map((C) => /* @__PURE__ */ et("option", { value: C.name, children: C.displayName }, C.displayName))
|
|
2987
2981
|
}
|
|
2988
|
-
)
|
|
2989
|
-
/* @__PURE__ */ et("div", { className: "option-label", children: "Font family" })
|
|
2982
|
+
)
|
|
2990
2983
|
] }),
|
|
2991
2984
|
/* @__PURE__ */ ut("div", { className: "padding-buttons", children: [
|
|
2992
|
-
/* @__PURE__ */ et("
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
|
|
2995
|
-
/* @__PURE__ */ et("span", { className: "option-label", children: "Side padding: " }),
|
|
2985
|
+
/* @__PURE__ */ et("div", { className: "option-label", children: "Side padding" }),
|
|
2986
|
+
/* @__PURE__ */ ut("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2987
|
+
/* @__PURE__ */ et("button", { onClick: x, children: "-" }),
|
|
2996
2988
|
/* @__PURE__ */ et(
|
|
2997
2989
|
"span",
|
|
2998
2990
|
{
|
|
@@ -3000,15 +2992,16 @@ function ue({
|
|
|
3000
2992
|
className: "option-value",
|
|
3001
2993
|
children: p
|
|
3002
2994
|
}
|
|
3003
|
-
)
|
|
2995
|
+
),
|
|
2996
|
+
/* @__PURE__ */ et("button", { onClick: w, children: "+" })
|
|
3004
2997
|
] })
|
|
3005
2998
|
] }),
|
|
3006
2999
|
/* @__PURE__ */ ut("div", { className: "font-buttons", children: [
|
|
3007
|
-
/* @__PURE__ */ et("
|
|
3008
|
-
/* @__PURE__ */
|
|
3009
|
-
|
|
3010
|
-
/* @__PURE__ */ et("span", { className: "option-
|
|
3011
|
-
/* @__PURE__ */ et("
|
|
3000
|
+
/* @__PURE__ */ et("div", { className: "option-label", children: "Font size" }),
|
|
3001
|
+
/* @__PURE__ */ ut("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3002
|
+
/* @__PURE__ */ et("button", { onClick: D, children: "-" }),
|
|
3003
|
+
/* @__PURE__ */ et("span", { ref: b, className: "option-value", children: Math.round(K * 10) }),
|
|
3004
|
+
/* @__PURE__ */ et("button", { onClick: S, children: "+" })
|
|
3012
3005
|
] })
|
|
3013
3006
|
] }),
|
|
3014
3007
|
/* @__PURE__ */ et("button", { onClick: ce, children: "Toggle fullscreen" })
|
|
@@ -3019,7 +3012,7 @@ function ue({
|
|
|
3019
3012
|
}
|
|
3020
3013
|
);
|
|
3021
3014
|
}
|
|
3022
|
-
const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone_1cqa3_86", pe = "_centerZone_1cqa3_96", me = "_iconWrapper_1cqa3_107", ge = "_label_1cqa3_131", _e = "_bottomIconGroup_1cqa3_143",
|
|
3015
|
+
const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone_1cqa3_86", pe = "_centerZone_1cqa3_96", me = "_iconWrapper_1cqa3_107", ge = "_label_1cqa3_131", _e = "_bottomIconGroup_1cqa3_143", be = "_bottomIconWrapper_1cqa3_150", ve = "_bounceArrow_1cqa3_169", ye = "_dismissButton_1cqa3_179", mt = {
|
|
3023
3016
|
overlay: he,
|
|
3024
3017
|
fadeOut: de,
|
|
3025
3018
|
interactionZone: fe,
|
|
@@ -3027,21 +3020,21 @@ const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone
|
|
|
3027
3020
|
iconWrapper: me,
|
|
3028
3021
|
label: ge,
|
|
3029
3022
|
bottomIconGroup: _e,
|
|
3030
|
-
bottomIconWrapper:
|
|
3031
|
-
bounceArrow:
|
|
3023
|
+
bottomIconWrapper: be,
|
|
3024
|
+
bounceArrow: ve,
|
|
3032
3025
|
dismissButton: ye
|
|
3033
3026
|
}, we = ({
|
|
3034
3027
|
color: X = "#4fc3f7",
|
|
3035
3028
|
onDismiss: K
|
|
3036
3029
|
}) => {
|
|
3037
|
-
const [p, A] = ht(!1),
|
|
3030
|
+
const [p, A] = ht(!1), v = () => {
|
|
3038
3031
|
A(!0), setTimeout(K, 400);
|
|
3039
3032
|
};
|
|
3040
3033
|
return /* @__PURE__ */ ut(
|
|
3041
3034
|
"div",
|
|
3042
3035
|
{
|
|
3043
3036
|
className: `${mt.overlay} ${p ? mt.fadeOut : ""}`,
|
|
3044
|
-
onClick:
|
|
3037
|
+
onClick: v,
|
|
3045
3038
|
style: { "--accent-color": X },
|
|
3046
3039
|
children: [
|
|
3047
3040
|
/* @__PURE__ */ ut("div", { className: mt.interactionZone, children: [
|
|
@@ -3070,7 +3063,7 @@ const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone
|
|
|
3070
3063
|
{
|
|
3071
3064
|
className: mt.dismissButton,
|
|
3072
3065
|
onClick: (a) => {
|
|
3073
|
-
a.stopPropagation(),
|
|
3066
|
+
a.stopPropagation(), v();
|
|
3074
3067
|
},
|
|
3075
3068
|
children: "Start Reading"
|
|
3076
3069
|
}
|
|
@@ -3105,7 +3098,7 @@ const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone
|
|
|
3105
3098
|
font-family: var(--font-family);
|
|
3106
3099
|
padding: var(--top-padding) var(--side-padding) var(--bottom-padding);
|
|
3107
3100
|
height: 100%;
|
|
3108
|
-
text-shadow:
|
|
3101
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
|
|
3109
3102
|
font-size: var(--font-size);
|
|
3110
3103
|
|
|
3111
3104
|
column-gap: calc(2 * var(--side-padding));
|
|
@@ -3197,13 +3190,20 @@ const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone
|
|
|
3197
3190
|
|
|
3198
3191
|
.page-number {
|
|
3199
3192
|
position: absolute;
|
|
3200
|
-
bottom:
|
|
3193
|
+
bottom: 20px;
|
|
3201
3194
|
left: 50%;
|
|
3202
3195
|
transform: translateX(-50%);
|
|
3203
|
-
font-size:
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3196
|
+
font-size: 12px;
|
|
3197
|
+
font-weight: 500;
|
|
3198
|
+
letter-spacing: 0.5px;
|
|
3199
|
+
color: rgba(255, 255, 255, 0.4);
|
|
3200
|
+
z-index: 10;
|
|
3201
|
+
pointer-events: none;
|
|
3202
|
+
font-variant-numeric: tabular-nums;
|
|
3203
|
+
background: rgba(0, 0, 0, 0.3);
|
|
3204
|
+
padding: 4px 10px;
|
|
3205
|
+
border-radius: 12px;
|
|
3206
|
+
backdrop-filter: blur(2px);
|
|
3207
3207
|
}
|
|
3208
3208
|
|
|
3209
3209
|
.bottom-click-area {
|
|
@@ -3226,8 +3226,8 @@ const he = "_overlay_1cqa3_53", de = "_fadeOut_1cqa3_80", fe = "_interactionZone
|
|
|
3226
3226
|
`;
|
|
3227
3227
|
function ke(X, K) {
|
|
3228
3228
|
const [p, A] = ht(() => {
|
|
3229
|
-
const
|
|
3230
|
-
return
|
|
3229
|
+
const v = localStorage.getItem(X);
|
|
3230
|
+
return v === null ? K : v === "true";
|
|
3231
3231
|
});
|
|
3232
3232
|
return dt(() => {
|
|
3233
3233
|
localStorage.setItem(X, p ? "true" : "false");
|
|
@@ -3238,24 +3238,24 @@ const Ce = ({
|
|
|
3238
3238
|
onTitleChange: K,
|
|
3239
3239
|
onLoadingChange: p,
|
|
3240
3240
|
onError: A,
|
|
3241
|
-
className:
|
|
3241
|
+
className: v,
|
|
3242
3242
|
style: a,
|
|
3243
3243
|
color: o,
|
|
3244
3244
|
supportedFonts: r = []
|
|
3245
3245
|
}) => {
|
|
3246
|
-
const { title: l, rawContent: g, isLoading: y, error: _, loadEpub:
|
|
3246
|
+
const { title: l, rawContent: g, isLoading: y, error: _, loadEpub: b, setIsLoading: i } = Yt(), [d, n] = ht(!1), [c, s] = ht(1.2), [m, w] = ht(30), [x, S] = ht("Inter"), D = wt(null), [C, F] = ke(
|
|
3247
3247
|
"bokreader_tutorial_shown",
|
|
3248
3248
|
!1
|
|
3249
|
-
), [
|
|
3249
|
+
), [E, z] = ht(!C);
|
|
3250
3250
|
dt(() => {
|
|
3251
|
-
|
|
3252
|
-
}, [
|
|
3251
|
+
C && z(!1);
|
|
3252
|
+
}, [C]);
|
|
3253
3253
|
const Z = () => {
|
|
3254
|
-
z(!1),
|
|
3254
|
+
z(!1), F(!0);
|
|
3255
3255
|
};
|
|
3256
3256
|
dt(() => {
|
|
3257
|
-
X &&
|
|
3258
|
-
}, [X,
|
|
3257
|
+
X && b(X);
|
|
3258
|
+
}, [X, b]), dt(() => {
|
|
3259
3259
|
K && K(l);
|
|
3260
3260
|
}, [l, K]), dt(() => {
|
|
3261
3261
|
p && p(y);
|
|
@@ -3276,7 +3276,7 @@ const Ce = ({
|
|
|
3276
3276
|
return _ && !y && !g ? /* @__PURE__ */ ut(
|
|
3277
3277
|
Lt,
|
|
3278
3278
|
{
|
|
3279
|
-
className: `bok-reader-container ${
|
|
3279
|
+
className: `bok-reader-container ${v || ""}`,
|
|
3280
3280
|
style: a,
|
|
3281
3281
|
children: [
|
|
3282
3282
|
/* @__PURE__ */ et(Nt, {}),
|
|
@@ -3289,14 +3289,14 @@ const Ce = ({
|
|
|
3289
3289
|
) : /* @__PURE__ */ ut(
|
|
3290
3290
|
Lt,
|
|
3291
3291
|
{
|
|
3292
|
-
className: `bok-reader-container ${
|
|
3292
|
+
className: `bok-reader-container ${v || ""}`,
|
|
3293
3293
|
style: { ...a, ...h },
|
|
3294
|
-
ref:
|
|
3294
|
+
ref: D,
|
|
3295
3295
|
children: [
|
|
3296
3296
|
/* @__PURE__ */ et(Nt, {}),
|
|
3297
3297
|
/* @__PURE__ */ et(le, { isLoading: y, color: o }),
|
|
3298
3298
|
g && /* @__PURE__ */ ut(Ut, { children: [
|
|
3299
|
-
|
|
3299
|
+
E && !y && /* @__PURE__ */ et(
|
|
3300
3300
|
we,
|
|
3301
3301
|
{
|
|
3302
3302
|
color: o,
|
|
@@ -3316,8 +3316,8 @@ const Ce = ({
|
|
|
3316
3316
|
setFontSize: s,
|
|
3317
3317
|
setFontFamily: S,
|
|
3318
3318
|
isOptionMenuVisible: d,
|
|
3319
|
-
containerElementRef:
|
|
3320
|
-
showTutorial:
|
|
3319
|
+
containerElementRef: D,
|
|
3320
|
+
showTutorial: E
|
|
3321
3321
|
}
|
|
3322
3322
|
),
|
|
3323
3323
|
d && /* @__PURE__ */ et(
|
|
@@ -3338,7 +3338,7 @@ const Ce = ({
|
|
|
3338
3338
|
{
|
|
3339
3339
|
className: "bottom-click-area",
|
|
3340
3340
|
onClick: () => {
|
|
3341
|
-
|
|
3341
|
+
E || n(!0);
|
|
3342
3342
|
},
|
|
3343
3343
|
"aria-label": "Open reader options"
|
|
3344
3344
|
}
|