sophontalk-services 0.0.4 → 0.0.5
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.
|
@@ -0,0 +1,2500 @@
|
|
|
1
|
+
import { env as qt, InferenceSession as te, Tensor as Vt } from "onnxruntime-web";
|
|
2
|
+
var Bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
+
function ee(q) {
|
|
4
|
+
return q && q.__esModule && Object.prototype.hasOwnProperty.call(q, "default") ? q.default : q;
|
|
5
|
+
}
|
|
6
|
+
function Rt(q) {
|
|
7
|
+
throw new Error('Could not dynamically require "' + q + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
8
|
+
}
|
|
9
|
+
var Ut = { exports: {} };
|
|
10
|
+
/*!
|
|
11
|
+
|
|
12
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
13
|
+
<http://stuartk.com/jszip>
|
|
14
|
+
|
|
15
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
16
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
17
|
+
|
|
18
|
+
JSZip uses the library pako released under the MIT license :
|
|
19
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
20
|
+
*/
|
|
21
|
+
var Gt;
|
|
22
|
+
function re() {
|
|
23
|
+
return Gt || (Gt = 1, function(q, $) {
|
|
24
|
+
(function(m) {
|
|
25
|
+
q.exports = m();
|
|
26
|
+
})(function() {
|
|
27
|
+
return function m(O, w, u) {
|
|
28
|
+
function l(_, v) {
|
|
29
|
+
if (!w[_]) {
|
|
30
|
+
if (!O[_]) {
|
|
31
|
+
var p = typeof Rt == "function" && Rt;
|
|
32
|
+
if (!v && p) return p(_, !0);
|
|
33
|
+
if (r) return r(_, !0);
|
|
34
|
+
var g = new Error("Cannot find module '" + _ + "'");
|
|
35
|
+
throw g.code = "MODULE_NOT_FOUND", g;
|
|
36
|
+
}
|
|
37
|
+
var i = w[_] = { exports: {} };
|
|
38
|
+
O[_][0].call(i.exports, function(c) {
|
|
39
|
+
var n = O[_][1][c];
|
|
40
|
+
return l(n || c);
|
|
41
|
+
}, i, i.exports, m, O, w, u);
|
|
42
|
+
}
|
|
43
|
+
return w[_].exports;
|
|
44
|
+
}
|
|
45
|
+
for (var r = typeof Rt == "function" && Rt, s = 0; s < u.length; s++) l(u[s]);
|
|
46
|
+
return l;
|
|
47
|
+
}({ 1: [function(m, O, w) {
|
|
48
|
+
var u = m("./utils"), l = m("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
49
|
+
w.encode = function(s) {
|
|
50
|
+
for (var _, v, p, g, i, c, n, h = [], a = 0, d = s.length, y = d, S = u.getTypeOf(s) !== "string"; a < s.length; ) y = d - a, p = S ? (_ = s[a++], v = a < d ? s[a++] : 0, a < d ? s[a++] : 0) : (_ = s.charCodeAt(a++), v = a < d ? s.charCodeAt(a++) : 0, a < d ? s.charCodeAt(a++) : 0), g = _ >> 2, i = (3 & _) << 4 | v >> 4, c = 1 < y ? (15 & v) << 2 | p >> 6 : 64, n = 2 < y ? 63 & p : 64, h.push(r.charAt(g) + r.charAt(i) + r.charAt(c) + r.charAt(n));
|
|
51
|
+
return h.join("");
|
|
52
|
+
}, w.decode = function(s) {
|
|
53
|
+
var _, v, p, g, i, c, n = 0, h = 0, a = "data:";
|
|
54
|
+
if (s.substr(0, a.length) === a) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
55
|
+
var d, y = 3 * (s = s.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
56
|
+
if (s.charAt(s.length - 1) === r.charAt(64) && y--, s.charAt(s.length - 2) === r.charAt(64) && y--, y % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
57
|
+
for (d = l.uint8array ? new Uint8Array(0 | y) : new Array(0 | y); n < s.length; ) _ = r.indexOf(s.charAt(n++)) << 2 | (g = r.indexOf(s.charAt(n++))) >> 4, v = (15 & g) << 4 | (i = r.indexOf(s.charAt(n++))) >> 2, p = (3 & i) << 6 | (c = r.indexOf(s.charAt(n++))), d[h++] = _, i !== 64 && (d[h++] = v), c !== 64 && (d[h++] = p);
|
|
58
|
+
return d;
|
|
59
|
+
};
|
|
60
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(m, O, w) {
|
|
61
|
+
var u = m("./external"), l = m("./stream/DataWorker"), r = m("./stream/Crc32Probe"), s = m("./stream/DataLengthProbe");
|
|
62
|
+
function _(v, p, g, i, c) {
|
|
63
|
+
this.compressedSize = v, this.uncompressedSize = p, this.crc32 = g, this.compression = i, this.compressedContent = c;
|
|
64
|
+
}
|
|
65
|
+
_.prototype = { getContentWorker: function() {
|
|
66
|
+
var v = new l(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")), p = this;
|
|
67
|
+
return v.on("end", function() {
|
|
68
|
+
if (this.streamInfo.data_length !== p.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
69
|
+
}), v;
|
|
70
|
+
}, getCompressedWorker: function() {
|
|
71
|
+
return new l(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
72
|
+
} }, _.createWorkerFrom = function(v, p, g) {
|
|
73
|
+
return v.pipe(new r()).pipe(new s("uncompressedSize")).pipe(p.compressWorker(g)).pipe(new s("compressedSize")).withStreamInfo("compression", p);
|
|
74
|
+
}, O.exports = _;
|
|
75
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(m, O, w) {
|
|
76
|
+
var u = m("./stream/GenericWorker");
|
|
77
|
+
w.STORE = { magic: "\0\0", compressWorker: function() {
|
|
78
|
+
return new u("STORE compression");
|
|
79
|
+
}, uncompressWorker: function() {
|
|
80
|
+
return new u("STORE decompression");
|
|
81
|
+
} }, w.DEFLATE = m("./flate");
|
|
82
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(m, O, w) {
|
|
83
|
+
var u = m("./utils"), l = function() {
|
|
84
|
+
for (var r, s = [], _ = 0; _ < 256; _++) {
|
|
85
|
+
r = _;
|
|
86
|
+
for (var v = 0; v < 8; v++) r = 1 & r ? 3988292384 ^ r >>> 1 : r >>> 1;
|
|
87
|
+
s[_] = r;
|
|
88
|
+
}
|
|
89
|
+
return s;
|
|
90
|
+
}();
|
|
91
|
+
O.exports = function(r, s) {
|
|
92
|
+
return r !== void 0 && r.length ? u.getTypeOf(r) !== "string" ? function(_, v, p, g) {
|
|
93
|
+
var i = l, c = g + p;
|
|
94
|
+
_ ^= -1;
|
|
95
|
+
for (var n = g; n < c; n++) _ = _ >>> 8 ^ i[255 & (_ ^ v[n])];
|
|
96
|
+
return -1 ^ _;
|
|
97
|
+
}(0 | s, r, r.length, 0) : function(_, v, p, g) {
|
|
98
|
+
var i = l, c = g + p;
|
|
99
|
+
_ ^= -1;
|
|
100
|
+
for (var n = g; n < c; n++) _ = _ >>> 8 ^ i[255 & (_ ^ v.charCodeAt(n))];
|
|
101
|
+
return -1 ^ _;
|
|
102
|
+
}(0 | s, r, r.length, 0) : 0;
|
|
103
|
+
};
|
|
104
|
+
}, { "./utils": 32 }], 5: [function(m, O, w) {
|
|
105
|
+
w.base64 = !1, w.binary = !1, w.dir = !1, w.createFolders = !0, w.date = null, w.compression = null, w.compressionOptions = null, w.comment = null, w.unixPermissions = null, w.dosPermissions = null;
|
|
106
|
+
}, {}], 6: [function(m, O, w) {
|
|
107
|
+
var u = null;
|
|
108
|
+
u = typeof Promise < "u" ? Promise : m("lie"), O.exports = { Promise: u };
|
|
109
|
+
}, { lie: 37 }], 7: [function(m, O, w) {
|
|
110
|
+
var u = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", l = m("pako"), r = m("./utils"), s = m("./stream/GenericWorker"), _ = u ? "uint8array" : "array";
|
|
111
|
+
function v(p, g) {
|
|
112
|
+
s.call(this, "FlateWorker/" + p), this._pako = null, this._pakoAction = p, this._pakoOptions = g, this.meta = {};
|
|
113
|
+
}
|
|
114
|
+
w.magic = "\b\0", r.inherits(v, s), v.prototype.processChunk = function(p) {
|
|
115
|
+
this.meta = p.meta, this._pako === null && this._createPako(), this._pako.push(r.transformTo(_, p.data), !1);
|
|
116
|
+
}, v.prototype.flush = function() {
|
|
117
|
+
s.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
118
|
+
}, v.prototype.cleanUp = function() {
|
|
119
|
+
s.prototype.cleanUp.call(this), this._pako = null;
|
|
120
|
+
}, v.prototype._createPako = function() {
|
|
121
|
+
this._pako = new l[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
122
|
+
var p = this;
|
|
123
|
+
this._pako.onData = function(g) {
|
|
124
|
+
p.push({ data: g, meta: p.meta });
|
|
125
|
+
};
|
|
126
|
+
}, w.compressWorker = function(p) {
|
|
127
|
+
return new v("Deflate", p);
|
|
128
|
+
}, w.uncompressWorker = function() {
|
|
129
|
+
return new v("Inflate", {});
|
|
130
|
+
};
|
|
131
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(m, O, w) {
|
|
132
|
+
function u(i, c) {
|
|
133
|
+
var n, h = "";
|
|
134
|
+
for (n = 0; n < c; n++) h += String.fromCharCode(255 & i), i >>>= 8;
|
|
135
|
+
return h;
|
|
136
|
+
}
|
|
137
|
+
function l(i, c, n, h, a, d) {
|
|
138
|
+
var y, S, x = i.file, F = i.compression, B = d !== _.utf8encode, L = r.transformTo("string", d(x.name)), I = r.transformTo("string", _.utf8encode(x.name)), Z = x.comment, X = r.transformTo("string", d(Z)), b = r.transformTo("string", _.utf8encode(Z)), R = I.length !== x.name.length, e = b.length !== Z.length, D = "", Q = "", U = "", tt = x.dir, j = x.date, J = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
139
|
+
c && !n || (J.crc32 = i.crc32, J.compressedSize = i.compressedSize, J.uncompressedSize = i.uncompressedSize);
|
|
140
|
+
var E = 0;
|
|
141
|
+
c && (E |= 8), B || !R && !e || (E |= 2048);
|
|
142
|
+
var C = 0, V = 0;
|
|
143
|
+
tt && (C |= 16), a === "UNIX" ? (V = 798, C |= function(H, at) {
|
|
144
|
+
var ut = H;
|
|
145
|
+
return H || (ut = at ? 16893 : 33204), (65535 & ut) << 16;
|
|
146
|
+
}(x.unixPermissions, tt)) : (V = 20, C |= function(H) {
|
|
147
|
+
return 63 & (H || 0);
|
|
148
|
+
}(x.dosPermissions)), y = j.getUTCHours(), y <<= 6, y |= j.getUTCMinutes(), y <<= 5, y |= j.getUTCSeconds() / 2, S = j.getUTCFullYear() - 1980, S <<= 4, S |= j.getUTCMonth() + 1, S <<= 5, S |= j.getUTCDate(), R && (Q = u(1, 1) + u(v(L), 4) + I, D += "up" + u(Q.length, 2) + Q), e && (U = u(1, 1) + u(v(X), 4) + b, D += "uc" + u(U.length, 2) + U);
|
|
149
|
+
var G = "";
|
|
150
|
+
return G += `
|
|
151
|
+
\0`, G += u(E, 2), G += F.magic, G += u(y, 2), G += u(S, 2), G += u(J.crc32, 4), G += u(J.compressedSize, 4), G += u(J.uncompressedSize, 4), G += u(L.length, 2), G += u(D.length, 2), { fileRecord: p.LOCAL_FILE_HEADER + G + L + D, dirRecord: p.CENTRAL_FILE_HEADER + u(V, 2) + G + u(X.length, 2) + "\0\0\0\0" + u(C, 4) + u(h, 4) + L + D + X };
|
|
152
|
+
}
|
|
153
|
+
var r = m("../utils"), s = m("../stream/GenericWorker"), _ = m("../utf8"), v = m("../crc32"), p = m("../signature");
|
|
154
|
+
function g(i, c, n, h) {
|
|
155
|
+
s.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = c, this.zipPlatform = n, this.encodeFileName = h, this.streamFiles = i, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
156
|
+
}
|
|
157
|
+
r.inherits(g, s), g.prototype.push = function(i) {
|
|
158
|
+
var c = i.meta.percent || 0, n = this.entriesCount, h = this._sources.length;
|
|
159
|
+
this.accumulate ? this.contentBuffer.push(i) : (this.bytesWritten += i.data.length, s.prototype.push.call(this, { data: i.data, meta: { currentFile: this.currentFile, percent: n ? (c + 100 * (n - h - 1)) / n : 100 } }));
|
|
160
|
+
}, g.prototype.openedSource = function(i) {
|
|
161
|
+
this.currentSourceOffset = this.bytesWritten, this.currentFile = i.file.name;
|
|
162
|
+
var c = this.streamFiles && !i.file.dir;
|
|
163
|
+
if (c) {
|
|
164
|
+
var n = l(i, c, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
165
|
+
this.push({ data: n.fileRecord, meta: { percent: 0 } });
|
|
166
|
+
} else this.accumulate = !0;
|
|
167
|
+
}, g.prototype.closedSource = function(i) {
|
|
168
|
+
this.accumulate = !1;
|
|
169
|
+
var c = this.streamFiles && !i.file.dir, n = l(i, c, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
170
|
+
if (this.dirRecords.push(n.dirRecord), c) this.push({ data: function(h) {
|
|
171
|
+
return p.DATA_DESCRIPTOR + u(h.crc32, 4) + u(h.compressedSize, 4) + u(h.uncompressedSize, 4);
|
|
172
|
+
}(i), meta: { percent: 100 } });
|
|
173
|
+
else for (this.push({ data: n.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
174
|
+
this.currentFile = null;
|
|
175
|
+
}, g.prototype.flush = function() {
|
|
176
|
+
for (var i = this.bytesWritten, c = 0; c < this.dirRecords.length; c++) this.push({ data: this.dirRecords[c], meta: { percent: 100 } });
|
|
177
|
+
var n = this.bytesWritten - i, h = function(a, d, y, S, x) {
|
|
178
|
+
var F = r.transformTo("string", x(S));
|
|
179
|
+
return p.CENTRAL_DIRECTORY_END + "\0\0\0\0" + u(a, 2) + u(a, 2) + u(d, 4) + u(y, 4) + u(F.length, 2) + F;
|
|
180
|
+
}(this.dirRecords.length, n, i, this.zipComment, this.encodeFileName);
|
|
181
|
+
this.push({ data: h, meta: { percent: 100 } });
|
|
182
|
+
}, g.prototype.prepareNextSource = function() {
|
|
183
|
+
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
184
|
+
}, g.prototype.registerPrevious = function(i) {
|
|
185
|
+
this._sources.push(i);
|
|
186
|
+
var c = this;
|
|
187
|
+
return i.on("data", function(n) {
|
|
188
|
+
c.processChunk(n);
|
|
189
|
+
}), i.on("end", function() {
|
|
190
|
+
c.closedSource(c.previous.streamInfo), c._sources.length ? c.prepareNextSource() : c.end();
|
|
191
|
+
}), i.on("error", function(n) {
|
|
192
|
+
c.error(n);
|
|
193
|
+
}), this;
|
|
194
|
+
}, g.prototype.resume = function() {
|
|
195
|
+
return !!s.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
196
|
+
}, g.prototype.error = function(i) {
|
|
197
|
+
var c = this._sources;
|
|
198
|
+
if (!s.prototype.error.call(this, i)) return !1;
|
|
199
|
+
for (var n = 0; n < c.length; n++) try {
|
|
200
|
+
c[n].error(i);
|
|
201
|
+
} catch {
|
|
202
|
+
}
|
|
203
|
+
return !0;
|
|
204
|
+
}, g.prototype.lock = function() {
|
|
205
|
+
s.prototype.lock.call(this);
|
|
206
|
+
for (var i = this._sources, c = 0; c < i.length; c++) i[c].lock();
|
|
207
|
+
}, O.exports = g;
|
|
208
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(m, O, w) {
|
|
209
|
+
var u = m("../compressions"), l = m("./ZipFileWorker");
|
|
210
|
+
w.generateWorker = function(r, s, _) {
|
|
211
|
+
var v = new l(s.streamFiles, _, s.platform, s.encodeFileName), p = 0;
|
|
212
|
+
try {
|
|
213
|
+
r.forEach(function(g, i) {
|
|
214
|
+
p++;
|
|
215
|
+
var c = function(d, y) {
|
|
216
|
+
var S = d || y, x = u[S];
|
|
217
|
+
if (!x) throw new Error(S + " is not a valid compression method !");
|
|
218
|
+
return x;
|
|
219
|
+
}(i.options.compression, s.compression), n = i.options.compressionOptions || s.compressionOptions || {}, h = i.dir, a = i.date;
|
|
220
|
+
i._compressWorker(c, n).withStreamInfo("file", { name: g, dir: h, date: a, comment: i.comment || "", unixPermissions: i.unixPermissions, dosPermissions: i.dosPermissions }).pipe(v);
|
|
221
|
+
}), v.entriesCount = p;
|
|
222
|
+
} catch (g) {
|
|
223
|
+
v.error(g);
|
|
224
|
+
}
|
|
225
|
+
return v;
|
|
226
|
+
};
|
|
227
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(m, O, w) {
|
|
228
|
+
function u() {
|
|
229
|
+
if (!(this instanceof u)) return new u();
|
|
230
|
+
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
231
|
+
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
232
|
+
var l = new u();
|
|
233
|
+
for (var r in this) typeof this[r] != "function" && (l[r] = this[r]);
|
|
234
|
+
return l;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
(u.prototype = m("./object")).loadAsync = m("./load"), u.support = m("./support"), u.defaults = m("./defaults"), u.version = "3.10.1", u.loadAsync = function(l, r) {
|
|
238
|
+
return new u().loadAsync(l, r);
|
|
239
|
+
}, u.external = m("./external"), O.exports = u;
|
|
240
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(m, O, w) {
|
|
241
|
+
var u = m("./utils"), l = m("./external"), r = m("./utf8"), s = m("./zipEntries"), _ = m("./stream/Crc32Probe"), v = m("./nodejsUtils");
|
|
242
|
+
function p(g) {
|
|
243
|
+
return new l.Promise(function(i, c) {
|
|
244
|
+
var n = g.decompressed.getContentWorker().pipe(new _());
|
|
245
|
+
n.on("error", function(h) {
|
|
246
|
+
c(h);
|
|
247
|
+
}).on("end", function() {
|
|
248
|
+
n.streamInfo.crc32 !== g.decompressed.crc32 ? c(new Error("Corrupted zip : CRC32 mismatch")) : i();
|
|
249
|
+
}).resume();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
O.exports = function(g, i) {
|
|
253
|
+
var c = this;
|
|
254
|
+
return i = u.extend(i || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), v.isNode && v.isStream(g) ? l.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u.prepareContent("the loaded zip file", g, !0, i.optimizedBinaryString, i.base64).then(function(n) {
|
|
255
|
+
var h = new s(i);
|
|
256
|
+
return h.load(n), h;
|
|
257
|
+
}).then(function(n) {
|
|
258
|
+
var h = [l.Promise.resolve(n)], a = n.files;
|
|
259
|
+
if (i.checkCRC32) for (var d = 0; d < a.length; d++) h.push(p(a[d]));
|
|
260
|
+
return l.Promise.all(h);
|
|
261
|
+
}).then(function(n) {
|
|
262
|
+
for (var h = n.shift(), a = h.files, d = 0; d < a.length; d++) {
|
|
263
|
+
var y = a[d], S = y.fileNameStr, x = u.resolve(y.fileNameStr);
|
|
264
|
+
c.file(x, y.decompressed, { binary: !0, optimizedBinaryString: !0, date: y.date, dir: y.dir, comment: y.fileCommentStr.length ? y.fileCommentStr : null, unixPermissions: y.unixPermissions, dosPermissions: y.dosPermissions, createFolders: i.createFolders }), y.dir || (c.file(x).unsafeOriginalName = S);
|
|
265
|
+
}
|
|
266
|
+
return h.zipComment.length && (c.comment = h.zipComment), c;
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(m, O, w) {
|
|
270
|
+
var u = m("../utils"), l = m("../stream/GenericWorker");
|
|
271
|
+
function r(s, _) {
|
|
272
|
+
l.call(this, "Nodejs stream input adapter for " + s), this._upstreamEnded = !1, this._bindStream(_);
|
|
273
|
+
}
|
|
274
|
+
u.inherits(r, l), r.prototype._bindStream = function(s) {
|
|
275
|
+
var _ = this;
|
|
276
|
+
(this._stream = s).pause(), s.on("data", function(v) {
|
|
277
|
+
_.push({ data: v, meta: { percent: 0 } });
|
|
278
|
+
}).on("error", function(v) {
|
|
279
|
+
_.isPaused ? this.generatedError = v : _.error(v);
|
|
280
|
+
}).on("end", function() {
|
|
281
|
+
_.isPaused ? _._upstreamEnded = !0 : _.end();
|
|
282
|
+
});
|
|
283
|
+
}, r.prototype.pause = function() {
|
|
284
|
+
return !!l.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
285
|
+
}, r.prototype.resume = function() {
|
|
286
|
+
return !!l.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
287
|
+
}, O.exports = r;
|
|
288
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(m, O, w) {
|
|
289
|
+
var u = m("readable-stream").Readable;
|
|
290
|
+
function l(r, s, _) {
|
|
291
|
+
u.call(this, s), this._helper = r;
|
|
292
|
+
var v = this;
|
|
293
|
+
r.on("data", function(p, g) {
|
|
294
|
+
v.push(p) || v._helper.pause(), _ && _(g);
|
|
295
|
+
}).on("error", function(p) {
|
|
296
|
+
v.emit("error", p);
|
|
297
|
+
}).on("end", function() {
|
|
298
|
+
v.push(null);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
m("../utils").inherits(l, u), l.prototype._read = function() {
|
|
302
|
+
this._helper.resume();
|
|
303
|
+
}, O.exports = l;
|
|
304
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(m, O, w) {
|
|
305
|
+
O.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(u, l) {
|
|
306
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(u, l);
|
|
307
|
+
if (typeof u == "number") throw new Error('The "data" argument must not be a number');
|
|
308
|
+
return new Buffer(u, l);
|
|
309
|
+
}, allocBuffer: function(u) {
|
|
310
|
+
if (Buffer.alloc) return Buffer.alloc(u);
|
|
311
|
+
var l = new Buffer(u);
|
|
312
|
+
return l.fill(0), l;
|
|
313
|
+
}, isBuffer: function(u) {
|
|
314
|
+
return Buffer.isBuffer(u);
|
|
315
|
+
}, isStream: function(u) {
|
|
316
|
+
return u && typeof u.on == "function" && typeof u.pause == "function" && typeof u.resume == "function";
|
|
317
|
+
} };
|
|
318
|
+
}, {}], 15: [function(m, O, w) {
|
|
319
|
+
function u(x, F, B) {
|
|
320
|
+
var L, I = r.getTypeOf(F), Z = r.extend(B || {}, v);
|
|
321
|
+
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 && (x = a(x)), Z.createFolders && (L = h(x)) && d.call(this, L, !0);
|
|
322
|
+
var X = I === "string" && Z.binary === !1 && Z.base64 === !1;
|
|
323
|
+
B && B.binary !== void 0 || (Z.binary = !X), (F instanceof p && F.uncompressedSize === 0 || Z.dir || !F || F.length === 0) && (Z.base64 = !1, Z.binary = !0, F = "", Z.compression = "STORE", I = "string");
|
|
324
|
+
var b = null;
|
|
325
|
+
b = F instanceof p || F instanceof s ? F : c.isNode && c.isStream(F) ? new n(x, F) : r.prepareContent(x, F, Z.binary, Z.optimizedBinaryString, Z.base64);
|
|
326
|
+
var R = new g(x, b, Z);
|
|
327
|
+
this.files[x] = R;
|
|
328
|
+
}
|
|
329
|
+
var l = m("./utf8"), r = m("./utils"), s = m("./stream/GenericWorker"), _ = m("./stream/StreamHelper"), v = m("./defaults"), p = m("./compressedObject"), g = m("./zipObject"), i = m("./generate"), c = m("./nodejsUtils"), n = m("./nodejs/NodejsStreamInputAdapter"), h = function(x) {
|
|
330
|
+
x.slice(-1) === "/" && (x = x.substring(0, x.length - 1));
|
|
331
|
+
var F = x.lastIndexOf("/");
|
|
332
|
+
return 0 < F ? x.substring(0, F) : "";
|
|
333
|
+
}, a = function(x) {
|
|
334
|
+
return x.slice(-1) !== "/" && (x += "/"), x;
|
|
335
|
+
}, d = function(x, F) {
|
|
336
|
+
return F = F !== void 0 ? F : v.createFolders, x = a(x), this.files[x] || u.call(this, x, null, { dir: !0, createFolders: F }), this.files[x];
|
|
337
|
+
};
|
|
338
|
+
function y(x) {
|
|
339
|
+
return Object.prototype.toString.call(x) === "[object RegExp]";
|
|
340
|
+
}
|
|
341
|
+
var S = { load: function() {
|
|
342
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
343
|
+
}, forEach: function(x) {
|
|
344
|
+
var F, B, L;
|
|
345
|
+
for (F in this.files) L = this.files[F], (B = F.slice(this.root.length, F.length)) && F.slice(0, this.root.length) === this.root && x(B, L);
|
|
346
|
+
}, filter: function(x) {
|
|
347
|
+
var F = [];
|
|
348
|
+
return this.forEach(function(B, L) {
|
|
349
|
+
x(B, L) && F.push(L);
|
|
350
|
+
}), F;
|
|
351
|
+
}, file: function(x, F, B) {
|
|
352
|
+
if (arguments.length !== 1) return x = this.root + x, u.call(this, x, F, B), this;
|
|
353
|
+
if (y(x)) {
|
|
354
|
+
var L = x;
|
|
355
|
+
return this.filter(function(Z, X) {
|
|
356
|
+
return !X.dir && L.test(Z);
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
var I = this.files[this.root + x];
|
|
360
|
+
return I && !I.dir ? I : null;
|
|
361
|
+
}, folder: function(x) {
|
|
362
|
+
if (!x) return this;
|
|
363
|
+
if (y(x)) return this.filter(function(I, Z) {
|
|
364
|
+
return Z.dir && x.test(I);
|
|
365
|
+
});
|
|
366
|
+
var F = this.root + x, B = d.call(this, F), L = this.clone();
|
|
367
|
+
return L.root = B.name, L;
|
|
368
|
+
}, remove: function(x) {
|
|
369
|
+
x = this.root + x;
|
|
370
|
+
var F = this.files[x];
|
|
371
|
+
if (F || (x.slice(-1) !== "/" && (x += "/"), F = this.files[x]), F && !F.dir) delete this.files[x];
|
|
372
|
+
else for (var B = this.filter(function(I, Z) {
|
|
373
|
+
return Z.name.slice(0, x.length) === x;
|
|
374
|
+
}), L = 0; L < B.length; L++) delete this.files[B[L].name];
|
|
375
|
+
return this;
|
|
376
|
+
}, generate: function() {
|
|
377
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
378
|
+
}, generateInternalStream: function(x) {
|
|
379
|
+
var F, B = {};
|
|
380
|
+
try {
|
|
381
|
+
if ((B = r.extend(x || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: l.utf8encode })).type = B.type.toLowerCase(), B.compression = B.compression.toUpperCase(), B.type === "binarystring" && (B.type = "string"), !B.type) throw new Error("No output type specified.");
|
|
382
|
+
r.checkSupport(B.type), B.platform !== "darwin" && B.platform !== "freebsd" && B.platform !== "linux" && B.platform !== "sunos" || (B.platform = "UNIX"), B.platform === "win32" && (B.platform = "DOS");
|
|
383
|
+
var L = B.comment || this.comment || "";
|
|
384
|
+
F = i.generateWorker(this, B, L);
|
|
385
|
+
} catch (I) {
|
|
386
|
+
(F = new s("error")).error(I);
|
|
387
|
+
}
|
|
388
|
+
return new _(F, B.type || "string", B.mimeType);
|
|
389
|
+
}, generateAsync: function(x, F) {
|
|
390
|
+
return this.generateInternalStream(x).accumulate(F);
|
|
391
|
+
}, generateNodeStream: function(x, F) {
|
|
392
|
+
return (x = x || {}).type || (x.type = "nodebuffer"), this.generateInternalStream(x).toNodejsStream(F);
|
|
393
|
+
} };
|
|
394
|
+
O.exports = S;
|
|
395
|
+
}, { "./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(m, O, w) {
|
|
396
|
+
O.exports = m("stream");
|
|
397
|
+
}, { stream: void 0 }], 17: [function(m, O, w) {
|
|
398
|
+
var u = m("./DataReader");
|
|
399
|
+
function l(r) {
|
|
400
|
+
u.call(this, r);
|
|
401
|
+
for (var s = 0; s < this.data.length; s++) r[s] = 255 & r[s];
|
|
402
|
+
}
|
|
403
|
+
m("../utils").inherits(l, u), l.prototype.byteAt = function(r) {
|
|
404
|
+
return this.data[this.zero + r];
|
|
405
|
+
}, l.prototype.lastIndexOfSignature = function(r) {
|
|
406
|
+
for (var s = r.charCodeAt(0), _ = r.charCodeAt(1), v = r.charCodeAt(2), p = r.charCodeAt(3), g = this.length - 4; 0 <= g; --g) if (this.data[g] === s && this.data[g + 1] === _ && this.data[g + 2] === v && this.data[g + 3] === p) return g - this.zero;
|
|
407
|
+
return -1;
|
|
408
|
+
}, l.prototype.readAndCheckSignature = function(r) {
|
|
409
|
+
var s = r.charCodeAt(0), _ = r.charCodeAt(1), v = r.charCodeAt(2), p = r.charCodeAt(3), g = this.readData(4);
|
|
410
|
+
return s === g[0] && _ === g[1] && v === g[2] && p === g[3];
|
|
411
|
+
}, l.prototype.readData = function(r) {
|
|
412
|
+
if (this.checkOffset(r), r === 0) return [];
|
|
413
|
+
var s = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
414
|
+
return this.index += r, s;
|
|
415
|
+
}, O.exports = l;
|
|
416
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(m, O, w) {
|
|
417
|
+
var u = m("../utils");
|
|
418
|
+
function l(r) {
|
|
419
|
+
this.data = r, this.length = r.length, this.index = 0, this.zero = 0;
|
|
420
|
+
}
|
|
421
|
+
l.prototype = { checkOffset: function(r) {
|
|
422
|
+
this.checkIndex(this.index + r);
|
|
423
|
+
}, checkIndex: function(r) {
|
|
424
|
+
if (this.length < this.zero + r || r < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + r + "). Corrupted zip ?");
|
|
425
|
+
}, setIndex: function(r) {
|
|
426
|
+
this.checkIndex(r), this.index = r;
|
|
427
|
+
}, skip: function(r) {
|
|
428
|
+
this.setIndex(this.index + r);
|
|
429
|
+
}, byteAt: function() {
|
|
430
|
+
}, readInt: function(r) {
|
|
431
|
+
var s, _ = 0;
|
|
432
|
+
for (this.checkOffset(r), s = this.index + r - 1; s >= this.index; s--) _ = (_ << 8) + this.byteAt(s);
|
|
433
|
+
return this.index += r, _;
|
|
434
|
+
}, readString: function(r) {
|
|
435
|
+
return u.transformTo("string", this.readData(r));
|
|
436
|
+
}, readData: function() {
|
|
437
|
+
}, lastIndexOfSignature: function() {
|
|
438
|
+
}, readAndCheckSignature: function() {
|
|
439
|
+
}, readDate: function() {
|
|
440
|
+
var r = this.readInt(4);
|
|
441
|
+
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));
|
|
442
|
+
} }, O.exports = l;
|
|
443
|
+
}, { "../utils": 32 }], 19: [function(m, O, w) {
|
|
444
|
+
var u = m("./Uint8ArrayReader");
|
|
445
|
+
function l(r) {
|
|
446
|
+
u.call(this, r);
|
|
447
|
+
}
|
|
448
|
+
m("../utils").inherits(l, u), l.prototype.readData = function(r) {
|
|
449
|
+
this.checkOffset(r);
|
|
450
|
+
var s = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
451
|
+
return this.index += r, s;
|
|
452
|
+
}, O.exports = l;
|
|
453
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(m, O, w) {
|
|
454
|
+
var u = m("./DataReader");
|
|
455
|
+
function l(r) {
|
|
456
|
+
u.call(this, r);
|
|
457
|
+
}
|
|
458
|
+
m("../utils").inherits(l, u), l.prototype.byteAt = function(r) {
|
|
459
|
+
return this.data.charCodeAt(this.zero + r);
|
|
460
|
+
}, l.prototype.lastIndexOfSignature = function(r) {
|
|
461
|
+
return this.data.lastIndexOf(r) - this.zero;
|
|
462
|
+
}, l.prototype.readAndCheckSignature = function(r) {
|
|
463
|
+
return r === this.readData(4);
|
|
464
|
+
}, l.prototype.readData = function(r) {
|
|
465
|
+
this.checkOffset(r);
|
|
466
|
+
var s = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
467
|
+
return this.index += r, s;
|
|
468
|
+
}, O.exports = l;
|
|
469
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(m, O, w) {
|
|
470
|
+
var u = m("./ArrayReader");
|
|
471
|
+
function l(r) {
|
|
472
|
+
u.call(this, r);
|
|
473
|
+
}
|
|
474
|
+
m("../utils").inherits(l, u), l.prototype.readData = function(r) {
|
|
475
|
+
if (this.checkOffset(r), r === 0) return new Uint8Array(0);
|
|
476
|
+
var s = this.data.subarray(this.zero + this.index, this.zero + this.index + r);
|
|
477
|
+
return this.index += r, s;
|
|
478
|
+
}, O.exports = l;
|
|
479
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(m, O, w) {
|
|
480
|
+
var u = m("../utils"), l = m("../support"), r = m("./ArrayReader"), s = m("./StringReader"), _ = m("./NodeBufferReader"), v = m("./Uint8ArrayReader");
|
|
481
|
+
O.exports = function(p) {
|
|
482
|
+
var g = u.getTypeOf(p);
|
|
483
|
+
return u.checkSupport(g), g !== "string" || l.uint8array ? g === "nodebuffer" ? new _(p) : l.uint8array ? new v(u.transformTo("uint8array", p)) : new r(u.transformTo("array", p)) : new s(p);
|
|
484
|
+
};
|
|
485
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(m, O, w) {
|
|
486
|
+
w.LOCAL_FILE_HEADER = "PK", w.CENTRAL_FILE_HEADER = "PK", w.CENTRAL_DIRECTORY_END = "PK", w.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", w.ZIP64_CENTRAL_DIRECTORY_END = "PK", w.DATA_DESCRIPTOR = "PK\x07\b";
|
|
487
|
+
}, {}], 24: [function(m, O, w) {
|
|
488
|
+
var u = m("./GenericWorker"), l = m("../utils");
|
|
489
|
+
function r(s) {
|
|
490
|
+
u.call(this, "ConvertWorker to " + s), this.destType = s;
|
|
491
|
+
}
|
|
492
|
+
l.inherits(r, u), r.prototype.processChunk = function(s) {
|
|
493
|
+
this.push({ data: l.transformTo(this.destType, s.data), meta: s.meta });
|
|
494
|
+
}, O.exports = r;
|
|
495
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(m, O, w) {
|
|
496
|
+
var u = m("./GenericWorker"), l = m("../crc32");
|
|
497
|
+
function r() {
|
|
498
|
+
u.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
499
|
+
}
|
|
500
|
+
m("../utils").inherits(r, u), r.prototype.processChunk = function(s) {
|
|
501
|
+
this.streamInfo.crc32 = l(s.data, this.streamInfo.crc32 || 0), this.push(s);
|
|
502
|
+
}, O.exports = r;
|
|
503
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(m, O, w) {
|
|
504
|
+
var u = m("../utils"), l = m("./GenericWorker");
|
|
505
|
+
function r(s) {
|
|
506
|
+
l.call(this, "DataLengthProbe for " + s), this.propName = s, this.withStreamInfo(s, 0);
|
|
507
|
+
}
|
|
508
|
+
u.inherits(r, l), r.prototype.processChunk = function(s) {
|
|
509
|
+
if (s) {
|
|
510
|
+
var _ = this.streamInfo[this.propName] || 0;
|
|
511
|
+
this.streamInfo[this.propName] = _ + s.data.length;
|
|
512
|
+
}
|
|
513
|
+
l.prototype.processChunk.call(this, s);
|
|
514
|
+
}, O.exports = r;
|
|
515
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(m, O, w) {
|
|
516
|
+
var u = m("../utils"), l = m("./GenericWorker");
|
|
517
|
+
function r(s) {
|
|
518
|
+
l.call(this, "DataWorker");
|
|
519
|
+
var _ = this;
|
|
520
|
+
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, s.then(function(v) {
|
|
521
|
+
_.dataIsReady = !0, _.data = v, _.max = v && v.length || 0, _.type = u.getTypeOf(v), _.isPaused || _._tickAndRepeat();
|
|
522
|
+
}, function(v) {
|
|
523
|
+
_.error(v);
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
u.inherits(r, l), r.prototype.cleanUp = function() {
|
|
527
|
+
l.prototype.cleanUp.call(this), this.data = null;
|
|
528
|
+
}, r.prototype.resume = function() {
|
|
529
|
+
return !!l.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, u.delay(this._tickAndRepeat, [], this)), !0);
|
|
530
|
+
}, r.prototype._tickAndRepeat = function() {
|
|
531
|
+
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (u.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
532
|
+
}, r.prototype._tick = function() {
|
|
533
|
+
if (this.isPaused || this.isFinished) return !1;
|
|
534
|
+
var s = null, _ = Math.min(this.max, this.index + 16384);
|
|
535
|
+
if (this.index >= this.max) return this.end();
|
|
536
|
+
switch (this.type) {
|
|
537
|
+
case "string":
|
|
538
|
+
s = this.data.substring(this.index, _);
|
|
539
|
+
break;
|
|
540
|
+
case "uint8array":
|
|
541
|
+
s = this.data.subarray(this.index, _);
|
|
542
|
+
break;
|
|
543
|
+
case "array":
|
|
544
|
+
case "nodebuffer":
|
|
545
|
+
s = this.data.slice(this.index, _);
|
|
546
|
+
}
|
|
547
|
+
return this.index = _, this.push({ data: s, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
548
|
+
}, O.exports = r;
|
|
549
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(m, O, w) {
|
|
550
|
+
function u(l) {
|
|
551
|
+
this.name = l || "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;
|
|
552
|
+
}
|
|
553
|
+
u.prototype = { push: function(l) {
|
|
554
|
+
this.emit("data", l);
|
|
555
|
+
}, end: function() {
|
|
556
|
+
if (this.isFinished) return !1;
|
|
557
|
+
this.flush();
|
|
558
|
+
try {
|
|
559
|
+
this.emit("end"), this.cleanUp(), this.isFinished = !0;
|
|
560
|
+
} catch (l) {
|
|
561
|
+
this.emit("error", l);
|
|
562
|
+
}
|
|
563
|
+
return !0;
|
|
564
|
+
}, error: function(l) {
|
|
565
|
+
return !this.isFinished && (this.isPaused ? this.generatedError = l : (this.isFinished = !0, this.emit("error", l), this.previous && this.previous.error(l), this.cleanUp()), !0);
|
|
566
|
+
}, on: function(l, r) {
|
|
567
|
+
return this._listeners[l].push(r), this;
|
|
568
|
+
}, cleanUp: function() {
|
|
569
|
+
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
570
|
+
}, emit: function(l, r) {
|
|
571
|
+
if (this._listeners[l]) for (var s = 0; s < this._listeners[l].length; s++) this._listeners[l][s].call(this, r);
|
|
572
|
+
}, pipe: function(l) {
|
|
573
|
+
return l.registerPrevious(this);
|
|
574
|
+
}, registerPrevious: function(l) {
|
|
575
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
576
|
+
this.streamInfo = l.streamInfo, this.mergeStreamInfo(), this.previous = l;
|
|
577
|
+
var r = this;
|
|
578
|
+
return l.on("data", function(s) {
|
|
579
|
+
r.processChunk(s);
|
|
580
|
+
}), l.on("end", function() {
|
|
581
|
+
r.end();
|
|
582
|
+
}), l.on("error", function(s) {
|
|
583
|
+
r.error(s);
|
|
584
|
+
}), this;
|
|
585
|
+
}, pause: function() {
|
|
586
|
+
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
|
|
587
|
+
}, resume: function() {
|
|
588
|
+
if (!this.isPaused || this.isFinished) return !1;
|
|
589
|
+
var l = this.isPaused = !1;
|
|
590
|
+
return this.generatedError && (this.error(this.generatedError), l = !0), this.previous && this.previous.resume(), !l;
|
|
591
|
+
}, flush: function() {
|
|
592
|
+
}, processChunk: function(l) {
|
|
593
|
+
this.push(l);
|
|
594
|
+
}, withStreamInfo: function(l, r) {
|
|
595
|
+
return this.extraStreamInfo[l] = r, this.mergeStreamInfo(), this;
|
|
596
|
+
}, mergeStreamInfo: function() {
|
|
597
|
+
for (var l in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, l) && (this.streamInfo[l] = this.extraStreamInfo[l]);
|
|
598
|
+
}, lock: function() {
|
|
599
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
600
|
+
this.isLocked = !0, this.previous && this.previous.lock();
|
|
601
|
+
}, toString: function() {
|
|
602
|
+
var l = "Worker " + this.name;
|
|
603
|
+
return this.previous ? this.previous + " -> " + l : l;
|
|
604
|
+
} }, O.exports = u;
|
|
605
|
+
}, {}], 29: [function(m, O, w) {
|
|
606
|
+
var u = m("../utils"), l = m("./ConvertWorker"), r = m("./GenericWorker"), s = m("../base64"), _ = m("../support"), v = m("../external"), p = null;
|
|
607
|
+
if (_.nodestream) try {
|
|
608
|
+
p = m("../nodejs/NodejsStreamOutputAdapter");
|
|
609
|
+
} catch {
|
|
610
|
+
}
|
|
611
|
+
function g(c, n) {
|
|
612
|
+
return new v.Promise(function(h, a) {
|
|
613
|
+
var d = [], y = c._internalType, S = c._outputType, x = c._mimeType;
|
|
614
|
+
c.on("data", function(F, B) {
|
|
615
|
+
d.push(F), n && n(B);
|
|
616
|
+
}).on("error", function(F) {
|
|
617
|
+
d = [], a(F);
|
|
618
|
+
}).on("end", function() {
|
|
619
|
+
try {
|
|
620
|
+
var F = function(B, L, I) {
|
|
621
|
+
switch (B) {
|
|
622
|
+
case "blob":
|
|
623
|
+
return u.newBlob(u.transformTo("arraybuffer", L), I);
|
|
624
|
+
case "base64":
|
|
625
|
+
return s.encode(L);
|
|
626
|
+
default:
|
|
627
|
+
return u.transformTo(B, L);
|
|
628
|
+
}
|
|
629
|
+
}(S, function(B, L) {
|
|
630
|
+
var I, Z = 0, X = null, b = 0;
|
|
631
|
+
for (I = 0; I < L.length; I++) b += L[I].length;
|
|
632
|
+
switch (B) {
|
|
633
|
+
case "string":
|
|
634
|
+
return L.join("");
|
|
635
|
+
case "array":
|
|
636
|
+
return Array.prototype.concat.apply([], L);
|
|
637
|
+
case "uint8array":
|
|
638
|
+
for (X = new Uint8Array(b), I = 0; I < L.length; I++) X.set(L[I], Z), Z += L[I].length;
|
|
639
|
+
return X;
|
|
640
|
+
case "nodebuffer":
|
|
641
|
+
return Buffer.concat(L);
|
|
642
|
+
default:
|
|
643
|
+
throw new Error("concat : unsupported type '" + B + "'");
|
|
644
|
+
}
|
|
645
|
+
}(y, d), x);
|
|
646
|
+
h(F);
|
|
647
|
+
} catch (B) {
|
|
648
|
+
a(B);
|
|
649
|
+
}
|
|
650
|
+
d = [];
|
|
651
|
+
}).resume();
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
function i(c, n, h) {
|
|
655
|
+
var a = n;
|
|
656
|
+
switch (n) {
|
|
657
|
+
case "blob":
|
|
658
|
+
case "arraybuffer":
|
|
659
|
+
a = "uint8array";
|
|
660
|
+
break;
|
|
661
|
+
case "base64":
|
|
662
|
+
a = "string";
|
|
663
|
+
}
|
|
664
|
+
try {
|
|
665
|
+
this._internalType = a, this._outputType = n, this._mimeType = h, u.checkSupport(a), this._worker = c.pipe(new l(a)), c.lock();
|
|
666
|
+
} catch (d) {
|
|
667
|
+
this._worker = new r("error"), this._worker.error(d);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
i.prototype = { accumulate: function(c) {
|
|
671
|
+
return g(this, c);
|
|
672
|
+
}, on: function(c, n) {
|
|
673
|
+
var h = this;
|
|
674
|
+
return c === "data" ? this._worker.on(c, function(a) {
|
|
675
|
+
n.call(h, a.data, a.meta);
|
|
676
|
+
}) : this._worker.on(c, function() {
|
|
677
|
+
u.delay(n, arguments, h);
|
|
678
|
+
}), this;
|
|
679
|
+
}, resume: function() {
|
|
680
|
+
return u.delay(this._worker.resume, [], this._worker), this;
|
|
681
|
+
}, pause: function() {
|
|
682
|
+
return this._worker.pause(), this;
|
|
683
|
+
}, toNodejsStream: function(c) {
|
|
684
|
+
if (u.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
685
|
+
return new p(this, { objectMode: this._outputType !== "nodebuffer" }, c);
|
|
686
|
+
} }, O.exports = i;
|
|
687
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(m, O, w) {
|
|
688
|
+
if (w.base64 = !0, w.array = !0, w.string = !0, w.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", w.nodebuffer = typeof Buffer < "u", w.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") w.blob = !1;
|
|
689
|
+
else {
|
|
690
|
+
var u = new ArrayBuffer(0);
|
|
691
|
+
try {
|
|
692
|
+
w.blob = new Blob([u], { type: "application/zip" }).size === 0;
|
|
693
|
+
} catch {
|
|
694
|
+
try {
|
|
695
|
+
var l = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
696
|
+
l.append(u), w.blob = l.getBlob("application/zip").size === 0;
|
|
697
|
+
} catch {
|
|
698
|
+
w.blob = !1;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
try {
|
|
703
|
+
w.nodestream = !!m("readable-stream").Readable;
|
|
704
|
+
} catch {
|
|
705
|
+
w.nodestream = !1;
|
|
706
|
+
}
|
|
707
|
+
}, { "readable-stream": 16 }], 31: [function(m, O, w) {
|
|
708
|
+
for (var u = m("./utils"), l = m("./support"), r = m("./nodejsUtils"), s = m("./stream/GenericWorker"), _ = new Array(256), v = 0; v < 256; v++) _[v] = 252 <= v ? 6 : 248 <= v ? 5 : 240 <= v ? 4 : 224 <= v ? 3 : 192 <= v ? 2 : 1;
|
|
709
|
+
_[254] = _[254] = 1;
|
|
710
|
+
function p() {
|
|
711
|
+
s.call(this, "utf-8 decode"), this.leftOver = null;
|
|
712
|
+
}
|
|
713
|
+
function g() {
|
|
714
|
+
s.call(this, "utf-8 encode");
|
|
715
|
+
}
|
|
716
|
+
w.utf8encode = function(i) {
|
|
717
|
+
return l.nodebuffer ? r.newBufferFrom(i, "utf-8") : function(c) {
|
|
718
|
+
var n, h, a, d, y, S = c.length, x = 0;
|
|
719
|
+
for (d = 0; d < S; d++) (64512 & (h = c.charCodeAt(d))) == 55296 && d + 1 < S && (64512 & (a = c.charCodeAt(d + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (a - 56320), d++), x += h < 128 ? 1 : h < 2048 ? 2 : h < 65536 ? 3 : 4;
|
|
720
|
+
for (n = l.uint8array ? new Uint8Array(x) : new Array(x), d = y = 0; y < x; d++) (64512 & (h = c.charCodeAt(d))) == 55296 && d + 1 < S && (64512 & (a = c.charCodeAt(d + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (a - 56320), d++), h < 128 ? n[y++] = h : (h < 2048 ? n[y++] = 192 | h >>> 6 : (h < 65536 ? n[y++] = 224 | h >>> 12 : (n[y++] = 240 | h >>> 18, n[y++] = 128 | h >>> 12 & 63), n[y++] = 128 | h >>> 6 & 63), n[y++] = 128 | 63 & h);
|
|
721
|
+
return n;
|
|
722
|
+
}(i);
|
|
723
|
+
}, w.utf8decode = function(i) {
|
|
724
|
+
return l.nodebuffer ? u.transformTo("nodebuffer", i).toString("utf-8") : function(c) {
|
|
725
|
+
var n, h, a, d, y = c.length, S = new Array(2 * y);
|
|
726
|
+
for (n = h = 0; n < y; ) if ((a = c[n++]) < 128) S[h++] = a;
|
|
727
|
+
else if (4 < (d = _[a])) S[h++] = 65533, n += d - 1;
|
|
728
|
+
else {
|
|
729
|
+
for (a &= d === 2 ? 31 : d === 3 ? 15 : 7; 1 < d && n < y; ) a = a << 6 | 63 & c[n++], d--;
|
|
730
|
+
1 < d ? S[h++] = 65533 : a < 65536 ? S[h++] = a : (a -= 65536, S[h++] = 55296 | a >> 10 & 1023, S[h++] = 56320 | 1023 & a);
|
|
731
|
+
}
|
|
732
|
+
return S.length !== h && (S.subarray ? S = S.subarray(0, h) : S.length = h), u.applyFromCharCode(S);
|
|
733
|
+
}(i = u.transformTo(l.uint8array ? "uint8array" : "array", i));
|
|
734
|
+
}, u.inherits(p, s), p.prototype.processChunk = function(i) {
|
|
735
|
+
var c = u.transformTo(l.uint8array ? "uint8array" : "array", i.data);
|
|
736
|
+
if (this.leftOver && this.leftOver.length) {
|
|
737
|
+
if (l.uint8array) {
|
|
738
|
+
var n = c;
|
|
739
|
+
(c = new Uint8Array(n.length + this.leftOver.length)).set(this.leftOver, 0), c.set(n, this.leftOver.length);
|
|
740
|
+
} else c = this.leftOver.concat(c);
|
|
741
|
+
this.leftOver = null;
|
|
742
|
+
}
|
|
743
|
+
var h = function(d, y) {
|
|
744
|
+
var S;
|
|
745
|
+
for ((y = y || d.length) > d.length && (y = d.length), S = y - 1; 0 <= S && (192 & d[S]) == 128; ) S--;
|
|
746
|
+
return S < 0 || S === 0 ? y : S + _[d[S]] > y ? S : y;
|
|
747
|
+
}(c), a = c;
|
|
748
|
+
h !== c.length && (l.uint8array ? (a = c.subarray(0, h), this.leftOver = c.subarray(h, c.length)) : (a = c.slice(0, h), this.leftOver = c.slice(h, c.length))), this.push({ data: w.utf8decode(a), meta: i.meta });
|
|
749
|
+
}, p.prototype.flush = function() {
|
|
750
|
+
this.leftOver && this.leftOver.length && (this.push({ data: w.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
751
|
+
}, w.Utf8DecodeWorker = p, u.inherits(g, s), g.prototype.processChunk = function(i) {
|
|
752
|
+
this.push({ data: w.utf8encode(i.data), meta: i.meta });
|
|
753
|
+
}, w.Utf8EncodeWorker = g;
|
|
754
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(m, O, w) {
|
|
755
|
+
var u = m("./support"), l = m("./base64"), r = m("./nodejsUtils"), s = m("./external");
|
|
756
|
+
function _(n) {
|
|
757
|
+
return n;
|
|
758
|
+
}
|
|
759
|
+
function v(n, h) {
|
|
760
|
+
for (var a = 0; a < n.length; ++a) h[a] = 255 & n.charCodeAt(a);
|
|
761
|
+
return h;
|
|
762
|
+
}
|
|
763
|
+
m("setimmediate"), w.newBlob = function(n, h) {
|
|
764
|
+
w.checkSupport("blob");
|
|
765
|
+
try {
|
|
766
|
+
return new Blob([n], { type: h });
|
|
767
|
+
} catch {
|
|
768
|
+
try {
|
|
769
|
+
var a = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
770
|
+
return a.append(n), a.getBlob(h);
|
|
771
|
+
} catch {
|
|
772
|
+
throw new Error("Bug : can't construct the Blob.");
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
var p = { stringifyByChunk: function(n, h, a) {
|
|
777
|
+
var d = [], y = 0, S = n.length;
|
|
778
|
+
if (S <= a) return String.fromCharCode.apply(null, n);
|
|
779
|
+
for (; y < S; ) h === "array" || h === "nodebuffer" ? d.push(String.fromCharCode.apply(null, n.slice(y, Math.min(y + a, S)))) : d.push(String.fromCharCode.apply(null, n.subarray(y, Math.min(y + a, S)))), y += a;
|
|
780
|
+
return d.join("");
|
|
781
|
+
}, stringifyByChar: function(n) {
|
|
782
|
+
for (var h = "", a = 0; a < n.length; a++) h += String.fromCharCode(n[a]);
|
|
783
|
+
return h;
|
|
784
|
+
}, applyCanBeUsed: { uint8array: function() {
|
|
785
|
+
try {
|
|
786
|
+
return u.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
787
|
+
} catch {
|
|
788
|
+
return !1;
|
|
789
|
+
}
|
|
790
|
+
}(), nodebuffer: function() {
|
|
791
|
+
try {
|
|
792
|
+
return u.nodebuffer && String.fromCharCode.apply(null, r.allocBuffer(1)).length === 1;
|
|
793
|
+
} catch {
|
|
794
|
+
return !1;
|
|
795
|
+
}
|
|
796
|
+
}() } };
|
|
797
|
+
function g(n) {
|
|
798
|
+
var h = 65536, a = w.getTypeOf(n), d = !0;
|
|
799
|
+
if (a === "uint8array" ? d = p.applyCanBeUsed.uint8array : a === "nodebuffer" && (d = p.applyCanBeUsed.nodebuffer), d) for (; 1 < h; ) try {
|
|
800
|
+
return p.stringifyByChunk(n, a, h);
|
|
801
|
+
} catch {
|
|
802
|
+
h = Math.floor(h / 2);
|
|
803
|
+
}
|
|
804
|
+
return p.stringifyByChar(n);
|
|
805
|
+
}
|
|
806
|
+
function i(n, h) {
|
|
807
|
+
for (var a = 0; a < n.length; a++) h[a] = n[a];
|
|
808
|
+
return h;
|
|
809
|
+
}
|
|
810
|
+
w.applyFromCharCode = g;
|
|
811
|
+
var c = {};
|
|
812
|
+
c.string = { string: _, array: function(n) {
|
|
813
|
+
return v(n, new Array(n.length));
|
|
814
|
+
}, arraybuffer: function(n) {
|
|
815
|
+
return c.string.uint8array(n).buffer;
|
|
816
|
+
}, uint8array: function(n) {
|
|
817
|
+
return v(n, new Uint8Array(n.length));
|
|
818
|
+
}, nodebuffer: function(n) {
|
|
819
|
+
return v(n, r.allocBuffer(n.length));
|
|
820
|
+
} }, c.array = { string: g, array: _, arraybuffer: function(n) {
|
|
821
|
+
return new Uint8Array(n).buffer;
|
|
822
|
+
}, uint8array: function(n) {
|
|
823
|
+
return new Uint8Array(n);
|
|
824
|
+
}, nodebuffer: function(n) {
|
|
825
|
+
return r.newBufferFrom(n);
|
|
826
|
+
} }, c.arraybuffer = { string: function(n) {
|
|
827
|
+
return g(new Uint8Array(n));
|
|
828
|
+
}, array: function(n) {
|
|
829
|
+
return i(new Uint8Array(n), new Array(n.byteLength));
|
|
830
|
+
}, arraybuffer: _, uint8array: function(n) {
|
|
831
|
+
return new Uint8Array(n);
|
|
832
|
+
}, nodebuffer: function(n) {
|
|
833
|
+
return r.newBufferFrom(new Uint8Array(n));
|
|
834
|
+
} }, c.uint8array = { string: g, array: function(n) {
|
|
835
|
+
return i(n, new Array(n.length));
|
|
836
|
+
}, arraybuffer: function(n) {
|
|
837
|
+
return n.buffer;
|
|
838
|
+
}, uint8array: _, nodebuffer: function(n) {
|
|
839
|
+
return r.newBufferFrom(n);
|
|
840
|
+
} }, c.nodebuffer = { string: g, array: function(n) {
|
|
841
|
+
return i(n, new Array(n.length));
|
|
842
|
+
}, arraybuffer: function(n) {
|
|
843
|
+
return c.nodebuffer.uint8array(n).buffer;
|
|
844
|
+
}, uint8array: function(n) {
|
|
845
|
+
return i(n, new Uint8Array(n.length));
|
|
846
|
+
}, nodebuffer: _ }, w.transformTo = function(n, h) {
|
|
847
|
+
if (h = h || "", !n) return h;
|
|
848
|
+
w.checkSupport(n);
|
|
849
|
+
var a = w.getTypeOf(h);
|
|
850
|
+
return c[a][n](h);
|
|
851
|
+
}, w.resolve = function(n) {
|
|
852
|
+
for (var h = n.split("/"), a = [], d = 0; d < h.length; d++) {
|
|
853
|
+
var y = h[d];
|
|
854
|
+
y === "." || y === "" && d !== 0 && d !== h.length - 1 || (y === ".." ? a.pop() : a.push(y));
|
|
855
|
+
}
|
|
856
|
+
return a.join("/");
|
|
857
|
+
}, w.getTypeOf = function(n) {
|
|
858
|
+
return typeof n == "string" ? "string" : Object.prototype.toString.call(n) === "[object Array]" ? "array" : u.nodebuffer && r.isBuffer(n) ? "nodebuffer" : u.uint8array && n instanceof Uint8Array ? "uint8array" : u.arraybuffer && n instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
859
|
+
}, w.checkSupport = function(n) {
|
|
860
|
+
if (!u[n.toLowerCase()]) throw new Error(n + " is not supported by this platform");
|
|
861
|
+
}, w.MAX_VALUE_16BITS = 65535, w.MAX_VALUE_32BITS = -1, w.pretty = function(n) {
|
|
862
|
+
var h, a, d = "";
|
|
863
|
+
for (a = 0; a < (n || "").length; a++) d += "\\x" + ((h = n.charCodeAt(a)) < 16 ? "0" : "") + h.toString(16).toUpperCase();
|
|
864
|
+
return d;
|
|
865
|
+
}, w.delay = function(n, h, a) {
|
|
866
|
+
setImmediate(function() {
|
|
867
|
+
n.apply(a || null, h || []);
|
|
868
|
+
});
|
|
869
|
+
}, w.inherits = function(n, h) {
|
|
870
|
+
function a() {
|
|
871
|
+
}
|
|
872
|
+
a.prototype = h.prototype, n.prototype = new a();
|
|
873
|
+
}, w.extend = function() {
|
|
874
|
+
var n, h, a = {};
|
|
875
|
+
for (n = 0; n < arguments.length; n++) for (h in arguments[n]) Object.prototype.hasOwnProperty.call(arguments[n], h) && a[h] === void 0 && (a[h] = arguments[n][h]);
|
|
876
|
+
return a;
|
|
877
|
+
}, w.prepareContent = function(n, h, a, d, y) {
|
|
878
|
+
return s.Promise.resolve(h).then(function(S) {
|
|
879
|
+
return u.blob && (S instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(S)) !== -1) && typeof FileReader < "u" ? new s.Promise(function(x, F) {
|
|
880
|
+
var B = new FileReader();
|
|
881
|
+
B.onload = function(L) {
|
|
882
|
+
x(L.target.result);
|
|
883
|
+
}, B.onerror = function(L) {
|
|
884
|
+
F(L.target.error);
|
|
885
|
+
}, B.readAsArrayBuffer(S);
|
|
886
|
+
}) : S;
|
|
887
|
+
}).then(function(S) {
|
|
888
|
+
var x = w.getTypeOf(S);
|
|
889
|
+
return x ? (x === "arraybuffer" ? S = w.transformTo("uint8array", S) : x === "string" && (y ? S = l.decode(S) : a && d !== !0 && (S = function(F) {
|
|
890
|
+
return v(F, u.uint8array ? new Uint8Array(F.length) : new Array(F.length));
|
|
891
|
+
}(S))), S) : s.Promise.reject(new Error("Can't read the data of '" + n + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(m, O, w) {
|
|
895
|
+
var u = m("./reader/readerFor"), l = m("./utils"), r = m("./signature"), s = m("./zipEntry"), _ = m("./support");
|
|
896
|
+
function v(p) {
|
|
897
|
+
this.files = [], this.loadOptions = p;
|
|
898
|
+
}
|
|
899
|
+
v.prototype = { checkSignature: function(p) {
|
|
900
|
+
if (!this.reader.readAndCheckSignature(p)) {
|
|
901
|
+
this.reader.index -= 4;
|
|
902
|
+
var g = this.reader.readString(4);
|
|
903
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + l.pretty(g) + ", expected " + l.pretty(p) + ")");
|
|
904
|
+
}
|
|
905
|
+
}, isSignature: function(p, g) {
|
|
906
|
+
var i = this.reader.index;
|
|
907
|
+
this.reader.setIndex(p);
|
|
908
|
+
var c = this.reader.readString(4) === g;
|
|
909
|
+
return this.reader.setIndex(i), c;
|
|
910
|
+
}, readBlockEndOfCentral: function() {
|
|
911
|
+
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);
|
|
912
|
+
var p = this.reader.readData(this.zipCommentLength), g = _.uint8array ? "uint8array" : "array", i = l.transformTo(g, p);
|
|
913
|
+
this.zipComment = this.loadOptions.decodeFileName(i);
|
|
914
|
+
}, readBlockZip64EndOfCentral: function() {
|
|
915
|
+
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 = {};
|
|
916
|
+
for (var p, g, i, c = this.zip64EndOfCentralSize - 44; 0 < c; ) p = this.reader.readInt(2), g = this.reader.readInt(4), i = this.reader.readData(g), this.zip64ExtensibleData[p] = { id: p, length: g, value: i };
|
|
917
|
+
}, readBlockZip64EndOfCentralLocator: function() {
|
|
918
|
+
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");
|
|
919
|
+
}, readLocalFiles: function() {
|
|
920
|
+
var p, g;
|
|
921
|
+
for (p = 0; p < this.files.length; p++) g = this.files[p], this.reader.setIndex(g.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), g.readLocalPart(this.reader), g.handleUTF8(), g.processAttributes();
|
|
922
|
+
}, readCentralDir: function() {
|
|
923
|
+
var p;
|
|
924
|
+
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER); ) (p = new s({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(p);
|
|
925
|
+
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
926
|
+
}, readEndOfCentral: function() {
|
|
927
|
+
var p = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);
|
|
928
|
+
if (p < 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");
|
|
929
|
+
this.reader.setIndex(p);
|
|
930
|
+
var g = p;
|
|
931
|
+
if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === l.MAX_VALUE_16BITS || this.diskWithCentralDirStart === l.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === l.MAX_VALUE_16BITS || this.centralDirRecords === l.MAX_VALUE_16BITS || this.centralDirSize === l.MAX_VALUE_32BITS || this.centralDirOffset === l.MAX_VALUE_32BITS) {
|
|
932
|
+
if (this.zip64 = !0, (p = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
933
|
+
if (this.reader.setIndex(p), 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");
|
|
934
|
+
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
935
|
+
}
|
|
936
|
+
var i = this.centralDirOffset + this.centralDirSize;
|
|
937
|
+
this.zip64 && (i += 20, i += 12 + this.zip64EndOfCentralSize);
|
|
938
|
+
var c = g - i;
|
|
939
|
+
if (0 < c) this.isSignature(g, r.CENTRAL_FILE_HEADER) || (this.reader.zero = c);
|
|
940
|
+
else if (c < 0) throw new Error("Corrupted zip: missing " + Math.abs(c) + " bytes.");
|
|
941
|
+
}, prepareReader: function(p) {
|
|
942
|
+
this.reader = u(p);
|
|
943
|
+
}, load: function(p) {
|
|
944
|
+
this.prepareReader(p), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
945
|
+
} }, O.exports = v;
|
|
946
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(m, O, w) {
|
|
947
|
+
var u = m("./reader/readerFor"), l = m("./utils"), r = m("./compressedObject"), s = m("./crc32"), _ = m("./utf8"), v = m("./compressions"), p = m("./support");
|
|
948
|
+
function g(i, c) {
|
|
949
|
+
this.options = i, this.loadOptions = c;
|
|
950
|
+
}
|
|
951
|
+
g.prototype = { isEncrypted: function() {
|
|
952
|
+
return (1 & this.bitFlag) == 1;
|
|
953
|
+
}, useUTF8: function() {
|
|
954
|
+
return (2048 & this.bitFlag) == 2048;
|
|
955
|
+
}, readLocalPart: function(i) {
|
|
956
|
+
var c, n;
|
|
957
|
+
if (i.skip(22), this.fileNameLength = i.readInt(2), n = i.readInt(2), this.fileName = i.readData(this.fileNameLength), i.skip(n), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
958
|
+
if ((c = function(h) {
|
|
959
|
+
for (var a in v) if (Object.prototype.hasOwnProperty.call(v, a) && v[a].magic === h) return v[a];
|
|
960
|
+
return null;
|
|
961
|
+
}(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + l.pretty(this.compressionMethod) + " unknown (inner file : " + l.transformTo("string", this.fileName) + ")");
|
|
962
|
+
this.decompressed = new r(this.compressedSize, this.uncompressedSize, this.crc32, c, i.readData(this.compressedSize));
|
|
963
|
+
}, readCentralPart: function(i) {
|
|
964
|
+
this.versionMadeBy = i.readInt(2), i.skip(2), this.bitFlag = i.readInt(2), this.compressionMethod = i.readString(2), this.date = i.readDate(), this.crc32 = i.readInt(4), this.compressedSize = i.readInt(4), this.uncompressedSize = i.readInt(4);
|
|
965
|
+
var c = i.readInt(2);
|
|
966
|
+
if (this.extraFieldsLength = i.readInt(2), this.fileCommentLength = i.readInt(2), this.diskNumberStart = i.readInt(2), this.internalFileAttributes = i.readInt(2), this.externalFileAttributes = i.readInt(4), this.localHeaderOffset = i.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
967
|
+
i.skip(c), this.readExtraFields(i), this.parseZIP64ExtraField(i), this.fileComment = i.readData(this.fileCommentLength);
|
|
968
|
+
}, processAttributes: function() {
|
|
969
|
+
this.unixPermissions = null, this.dosPermissions = null;
|
|
970
|
+
var i = this.versionMadeBy >> 8;
|
|
971
|
+
this.dir = !!(16 & this.externalFileAttributes), i == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), i == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = !0);
|
|
972
|
+
}, parseZIP64ExtraField: function() {
|
|
973
|
+
if (this.extraFields[1]) {
|
|
974
|
+
var i = u(this.extraFields[1].value);
|
|
975
|
+
this.uncompressedSize === l.MAX_VALUE_32BITS && (this.uncompressedSize = i.readInt(8)), this.compressedSize === l.MAX_VALUE_32BITS && (this.compressedSize = i.readInt(8)), this.localHeaderOffset === l.MAX_VALUE_32BITS && (this.localHeaderOffset = i.readInt(8)), this.diskNumberStart === l.MAX_VALUE_32BITS && (this.diskNumberStart = i.readInt(4));
|
|
976
|
+
}
|
|
977
|
+
}, readExtraFields: function(i) {
|
|
978
|
+
var c, n, h, a = i.index + this.extraFieldsLength;
|
|
979
|
+
for (this.extraFields || (this.extraFields = {}); i.index + 4 < a; ) c = i.readInt(2), n = i.readInt(2), h = i.readData(n), this.extraFields[c] = { id: c, length: n, value: h };
|
|
980
|
+
i.setIndex(a);
|
|
981
|
+
}, handleUTF8: function() {
|
|
982
|
+
var i = p.uint8array ? "uint8array" : "array";
|
|
983
|
+
if (this.useUTF8()) this.fileNameStr = _.utf8decode(this.fileName), this.fileCommentStr = _.utf8decode(this.fileComment);
|
|
984
|
+
else {
|
|
985
|
+
var c = this.findExtraFieldUnicodePath();
|
|
986
|
+
if (c !== null) this.fileNameStr = c;
|
|
987
|
+
else {
|
|
988
|
+
var n = l.transformTo(i, this.fileName);
|
|
989
|
+
this.fileNameStr = this.loadOptions.decodeFileName(n);
|
|
990
|
+
}
|
|
991
|
+
var h = this.findExtraFieldUnicodeComment();
|
|
992
|
+
if (h !== null) this.fileCommentStr = h;
|
|
993
|
+
else {
|
|
994
|
+
var a = l.transformTo(i, this.fileComment);
|
|
995
|
+
this.fileCommentStr = this.loadOptions.decodeFileName(a);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}, findExtraFieldUnicodePath: function() {
|
|
999
|
+
var i = this.extraFields[28789];
|
|
1000
|
+
if (i) {
|
|
1001
|
+
var c = u(i.value);
|
|
1002
|
+
return c.readInt(1) !== 1 || s(this.fileName) !== c.readInt(4) ? null : _.utf8decode(c.readData(i.length - 5));
|
|
1003
|
+
}
|
|
1004
|
+
return null;
|
|
1005
|
+
}, findExtraFieldUnicodeComment: function() {
|
|
1006
|
+
var i = this.extraFields[25461];
|
|
1007
|
+
if (i) {
|
|
1008
|
+
var c = u(i.value);
|
|
1009
|
+
return c.readInt(1) !== 1 || s(this.fileComment) !== c.readInt(4) ? null : _.utf8decode(c.readData(i.length - 5));
|
|
1010
|
+
}
|
|
1011
|
+
return null;
|
|
1012
|
+
} }, O.exports = g;
|
|
1013
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(m, O, w) {
|
|
1014
|
+
function u(c, n, h) {
|
|
1015
|
+
this.name = c, this.dir = h.dir, this.date = h.date, this.comment = h.comment, this.unixPermissions = h.unixPermissions, this.dosPermissions = h.dosPermissions, this._data = n, this._dataBinary = h.binary, this.options = { compression: h.compression, compressionOptions: h.compressionOptions };
|
|
1016
|
+
}
|
|
1017
|
+
var l = m("./stream/StreamHelper"), r = m("./stream/DataWorker"), s = m("./utf8"), _ = m("./compressedObject"), v = m("./stream/GenericWorker");
|
|
1018
|
+
u.prototype = { internalStream: function(c) {
|
|
1019
|
+
var n = null, h = "string";
|
|
1020
|
+
try {
|
|
1021
|
+
if (!c) throw new Error("No output type specified.");
|
|
1022
|
+
var a = (h = c.toLowerCase()) === "string" || h === "text";
|
|
1023
|
+
h !== "binarystring" && h !== "text" || (h = "string"), n = this._decompressWorker();
|
|
1024
|
+
var d = !this._dataBinary;
|
|
1025
|
+
d && !a && (n = n.pipe(new s.Utf8EncodeWorker())), !d && a && (n = n.pipe(new s.Utf8DecodeWorker()));
|
|
1026
|
+
} catch (y) {
|
|
1027
|
+
(n = new v("error")).error(y);
|
|
1028
|
+
}
|
|
1029
|
+
return new l(n, h, "");
|
|
1030
|
+
}, async: function(c, n) {
|
|
1031
|
+
return this.internalStream(c).accumulate(n);
|
|
1032
|
+
}, nodeStream: function(c, n) {
|
|
1033
|
+
return this.internalStream(c || "nodebuffer").toNodejsStream(n);
|
|
1034
|
+
}, _compressWorker: function(c, n) {
|
|
1035
|
+
if (this._data instanceof _ && this._data.compression.magic === c.magic) return this._data.getCompressedWorker();
|
|
1036
|
+
var h = this._decompressWorker();
|
|
1037
|
+
return this._dataBinary || (h = h.pipe(new s.Utf8EncodeWorker())), _.createWorkerFrom(h, c, n);
|
|
1038
|
+
}, _decompressWorker: function() {
|
|
1039
|
+
return this._data instanceof _ ? this._data.getContentWorker() : this._data instanceof v ? this._data : new r(this._data);
|
|
1040
|
+
} };
|
|
1041
|
+
for (var p = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], g = function() {
|
|
1042
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1043
|
+
}, i = 0; i < p.length; i++) u.prototype[p[i]] = g;
|
|
1044
|
+
O.exports = u;
|
|
1045
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(m, O, w) {
|
|
1046
|
+
(function(u) {
|
|
1047
|
+
var l, r, s = u.MutationObserver || u.WebKitMutationObserver;
|
|
1048
|
+
if (s) {
|
|
1049
|
+
var _ = 0, v = new s(c), p = u.document.createTextNode("");
|
|
1050
|
+
v.observe(p, { characterData: !0 }), l = function() {
|
|
1051
|
+
p.data = _ = ++_ % 2;
|
|
1052
|
+
};
|
|
1053
|
+
} else if (u.setImmediate || u.MessageChannel === void 0) l = "document" in u && "onreadystatechange" in u.document.createElement("script") ? function() {
|
|
1054
|
+
var n = u.document.createElement("script");
|
|
1055
|
+
n.onreadystatechange = function() {
|
|
1056
|
+
c(), n.onreadystatechange = null, n.parentNode.removeChild(n), n = null;
|
|
1057
|
+
}, u.document.documentElement.appendChild(n);
|
|
1058
|
+
} : function() {
|
|
1059
|
+
setTimeout(c, 0);
|
|
1060
|
+
};
|
|
1061
|
+
else {
|
|
1062
|
+
var g = new u.MessageChannel();
|
|
1063
|
+
g.port1.onmessage = c, l = function() {
|
|
1064
|
+
g.port2.postMessage(0);
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
var i = [];
|
|
1068
|
+
function c() {
|
|
1069
|
+
var n, h;
|
|
1070
|
+
r = !0;
|
|
1071
|
+
for (var a = i.length; a; ) {
|
|
1072
|
+
for (h = i, i = [], n = -1; ++n < a; ) h[n]();
|
|
1073
|
+
a = i.length;
|
|
1074
|
+
}
|
|
1075
|
+
r = !1;
|
|
1076
|
+
}
|
|
1077
|
+
O.exports = function(n) {
|
|
1078
|
+
i.push(n) !== 1 || r || l();
|
|
1079
|
+
};
|
|
1080
|
+
}).call(this, typeof Bt < "u" ? Bt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1081
|
+
}, {}], 37: [function(m, O, w) {
|
|
1082
|
+
var u = m("immediate");
|
|
1083
|
+
function l() {
|
|
1084
|
+
}
|
|
1085
|
+
var r = {}, s = ["REJECTED"], _ = ["FULFILLED"], v = ["PENDING"];
|
|
1086
|
+
function p(a) {
|
|
1087
|
+
if (typeof a != "function") throw new TypeError("resolver must be a function");
|
|
1088
|
+
this.state = v, this.queue = [], this.outcome = void 0, a !== l && n(this, a);
|
|
1089
|
+
}
|
|
1090
|
+
function g(a, d, y) {
|
|
1091
|
+
this.promise = a, typeof d == "function" && (this.onFulfilled = d, this.callFulfilled = this.otherCallFulfilled), typeof y == "function" && (this.onRejected = y, this.callRejected = this.otherCallRejected);
|
|
1092
|
+
}
|
|
1093
|
+
function i(a, d, y) {
|
|
1094
|
+
u(function() {
|
|
1095
|
+
var S;
|
|
1096
|
+
try {
|
|
1097
|
+
S = d(y);
|
|
1098
|
+
} catch (x) {
|
|
1099
|
+
return r.reject(a, x);
|
|
1100
|
+
}
|
|
1101
|
+
S === a ? r.reject(a, new TypeError("Cannot resolve promise with itself")) : r.resolve(a, S);
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function c(a) {
|
|
1105
|
+
var d = a && a.then;
|
|
1106
|
+
if (a && (typeof a == "object" || typeof a == "function") && typeof d == "function") return function() {
|
|
1107
|
+
d.apply(a, arguments);
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
function n(a, d) {
|
|
1111
|
+
var y = !1;
|
|
1112
|
+
function S(B) {
|
|
1113
|
+
y || (y = !0, r.reject(a, B));
|
|
1114
|
+
}
|
|
1115
|
+
function x(B) {
|
|
1116
|
+
y || (y = !0, r.resolve(a, B));
|
|
1117
|
+
}
|
|
1118
|
+
var F = h(function() {
|
|
1119
|
+
d(x, S);
|
|
1120
|
+
});
|
|
1121
|
+
F.status === "error" && S(F.value);
|
|
1122
|
+
}
|
|
1123
|
+
function h(a, d) {
|
|
1124
|
+
var y = {};
|
|
1125
|
+
try {
|
|
1126
|
+
y.value = a(d), y.status = "success";
|
|
1127
|
+
} catch (S) {
|
|
1128
|
+
y.status = "error", y.value = S;
|
|
1129
|
+
}
|
|
1130
|
+
return y;
|
|
1131
|
+
}
|
|
1132
|
+
(O.exports = p).prototype.finally = function(a) {
|
|
1133
|
+
if (typeof a != "function") return this;
|
|
1134
|
+
var d = this.constructor;
|
|
1135
|
+
return this.then(function(y) {
|
|
1136
|
+
return d.resolve(a()).then(function() {
|
|
1137
|
+
return y;
|
|
1138
|
+
});
|
|
1139
|
+
}, function(y) {
|
|
1140
|
+
return d.resolve(a()).then(function() {
|
|
1141
|
+
throw y;
|
|
1142
|
+
});
|
|
1143
|
+
});
|
|
1144
|
+
}, p.prototype.catch = function(a) {
|
|
1145
|
+
return this.then(null, a);
|
|
1146
|
+
}, p.prototype.then = function(a, d) {
|
|
1147
|
+
if (typeof a != "function" && this.state === _ || typeof d != "function" && this.state === s) return this;
|
|
1148
|
+
var y = new this.constructor(l);
|
|
1149
|
+
return this.state !== v ? i(y, this.state === _ ? a : d, this.outcome) : this.queue.push(new g(y, a, d)), y;
|
|
1150
|
+
}, g.prototype.callFulfilled = function(a) {
|
|
1151
|
+
r.resolve(this.promise, a);
|
|
1152
|
+
}, g.prototype.otherCallFulfilled = function(a) {
|
|
1153
|
+
i(this.promise, this.onFulfilled, a);
|
|
1154
|
+
}, g.prototype.callRejected = function(a) {
|
|
1155
|
+
r.reject(this.promise, a);
|
|
1156
|
+
}, g.prototype.otherCallRejected = function(a) {
|
|
1157
|
+
i(this.promise, this.onRejected, a);
|
|
1158
|
+
}, r.resolve = function(a, d) {
|
|
1159
|
+
var y = h(c, d);
|
|
1160
|
+
if (y.status === "error") return r.reject(a, y.value);
|
|
1161
|
+
var S = y.value;
|
|
1162
|
+
if (S) n(a, S);
|
|
1163
|
+
else {
|
|
1164
|
+
a.state = _, a.outcome = d;
|
|
1165
|
+
for (var x = -1, F = a.queue.length; ++x < F; ) a.queue[x].callFulfilled(d);
|
|
1166
|
+
}
|
|
1167
|
+
return a;
|
|
1168
|
+
}, r.reject = function(a, d) {
|
|
1169
|
+
a.state = s, a.outcome = d;
|
|
1170
|
+
for (var y = -1, S = a.queue.length; ++y < S; ) a.queue[y].callRejected(d);
|
|
1171
|
+
return a;
|
|
1172
|
+
}, p.resolve = function(a) {
|
|
1173
|
+
return a instanceof this ? a : r.resolve(new this(l), a);
|
|
1174
|
+
}, p.reject = function(a) {
|
|
1175
|
+
var d = new this(l);
|
|
1176
|
+
return r.reject(d, a);
|
|
1177
|
+
}, p.all = function(a) {
|
|
1178
|
+
var d = this;
|
|
1179
|
+
if (Object.prototype.toString.call(a) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1180
|
+
var y = a.length, S = !1;
|
|
1181
|
+
if (!y) return this.resolve([]);
|
|
1182
|
+
for (var x = new Array(y), F = 0, B = -1, L = new this(l); ++B < y; ) I(a[B], B);
|
|
1183
|
+
return L;
|
|
1184
|
+
function I(Z, X) {
|
|
1185
|
+
d.resolve(Z).then(function(b) {
|
|
1186
|
+
x[X] = b, ++F !== y || S || (S = !0, r.resolve(L, x));
|
|
1187
|
+
}, function(b) {
|
|
1188
|
+
S || (S = !0, r.reject(L, b));
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
}, p.race = function(a) {
|
|
1192
|
+
var d = this;
|
|
1193
|
+
if (Object.prototype.toString.call(a) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1194
|
+
var y = a.length, S = !1;
|
|
1195
|
+
if (!y) return this.resolve([]);
|
|
1196
|
+
for (var x = -1, F = new this(l); ++x < y; ) B = a[x], d.resolve(B).then(function(L) {
|
|
1197
|
+
S || (S = !0, r.resolve(F, L));
|
|
1198
|
+
}, function(L) {
|
|
1199
|
+
S || (S = !0, r.reject(F, L));
|
|
1200
|
+
});
|
|
1201
|
+
var B;
|
|
1202
|
+
return F;
|
|
1203
|
+
};
|
|
1204
|
+
}, { immediate: 36 }], 38: [function(m, O, w) {
|
|
1205
|
+
var u = {};
|
|
1206
|
+
(0, m("./lib/utils/common").assign)(u, m("./lib/deflate"), m("./lib/inflate"), m("./lib/zlib/constants")), O.exports = u;
|
|
1207
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(m, O, w) {
|
|
1208
|
+
var u = m("./zlib/deflate"), l = m("./utils/common"), r = m("./utils/strings"), s = m("./zlib/messages"), _ = m("./zlib/zstream"), v = Object.prototype.toString, p = 0, g = -1, i = 0, c = 8;
|
|
1209
|
+
function n(a) {
|
|
1210
|
+
if (!(this instanceof n)) return new n(a);
|
|
1211
|
+
this.options = l.assign({ level: g, method: c, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: i, to: "" }, a || {});
|
|
1212
|
+
var d = this.options;
|
|
1213
|
+
d.raw && 0 < d.windowBits ? d.windowBits = -d.windowBits : d.gzip && 0 < d.windowBits && d.windowBits < 16 && (d.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new _(), this.strm.avail_out = 0;
|
|
1214
|
+
var y = u.deflateInit2(this.strm, d.level, d.method, d.windowBits, d.memLevel, d.strategy);
|
|
1215
|
+
if (y !== p) throw new Error(s[y]);
|
|
1216
|
+
if (d.header && u.deflateSetHeader(this.strm, d.header), d.dictionary) {
|
|
1217
|
+
var S;
|
|
1218
|
+
if (S = typeof d.dictionary == "string" ? r.string2buf(d.dictionary) : v.call(d.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(d.dictionary) : d.dictionary, (y = u.deflateSetDictionary(this.strm, S)) !== p) throw new Error(s[y]);
|
|
1219
|
+
this._dict_set = !0;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
function h(a, d) {
|
|
1223
|
+
var y = new n(d);
|
|
1224
|
+
if (y.push(a, !0), y.err) throw y.msg || s[y.err];
|
|
1225
|
+
return y.result;
|
|
1226
|
+
}
|
|
1227
|
+
n.prototype.push = function(a, d) {
|
|
1228
|
+
var y, S, x = this.strm, F = this.options.chunkSize;
|
|
1229
|
+
if (this.ended) return !1;
|
|
1230
|
+
S = d === ~~d ? d : d === !0 ? 4 : 0, typeof a == "string" ? x.input = r.string2buf(a) : v.call(a) === "[object ArrayBuffer]" ? x.input = new Uint8Array(a) : x.input = a, x.next_in = 0, x.avail_in = x.input.length;
|
|
1231
|
+
do {
|
|
1232
|
+
if (x.avail_out === 0 && (x.output = new l.Buf8(F), x.next_out = 0, x.avail_out = F), (y = u.deflate(x, S)) !== 1 && y !== p) return this.onEnd(y), !(this.ended = !0);
|
|
1233
|
+
x.avail_out !== 0 && (x.avail_in !== 0 || S !== 4 && S !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(l.shrinkBuf(x.output, x.next_out))) : this.onData(l.shrinkBuf(x.output, x.next_out)));
|
|
1234
|
+
} while ((0 < x.avail_in || x.avail_out === 0) && y !== 1);
|
|
1235
|
+
return S === 4 ? (y = u.deflateEnd(this.strm), this.onEnd(y), this.ended = !0, y === p) : S !== 2 || (this.onEnd(p), !(x.avail_out = 0));
|
|
1236
|
+
}, n.prototype.onData = function(a) {
|
|
1237
|
+
this.chunks.push(a);
|
|
1238
|
+
}, n.prototype.onEnd = function(a) {
|
|
1239
|
+
a === p && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = l.flattenChunks(this.chunks)), this.chunks = [], this.err = a, this.msg = this.strm.msg;
|
|
1240
|
+
}, w.Deflate = n, w.deflate = h, w.deflateRaw = function(a, d) {
|
|
1241
|
+
return (d = d || {}).raw = !0, h(a, d);
|
|
1242
|
+
}, w.gzip = function(a, d) {
|
|
1243
|
+
return (d = d || {}).gzip = !0, h(a, d);
|
|
1244
|
+
};
|
|
1245
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(m, O, w) {
|
|
1246
|
+
var u = m("./zlib/inflate"), l = m("./utils/common"), r = m("./utils/strings"), s = m("./zlib/constants"), _ = m("./zlib/messages"), v = m("./zlib/zstream"), p = m("./zlib/gzheader"), g = Object.prototype.toString;
|
|
1247
|
+
function i(n) {
|
|
1248
|
+
if (!(this instanceof i)) return new i(n);
|
|
1249
|
+
this.options = l.assign({ chunkSize: 16384, windowBits: 0, to: "" }, n || {});
|
|
1250
|
+
var h = this.options;
|
|
1251
|
+
h.raw && 0 <= h.windowBits && h.windowBits < 16 && (h.windowBits = -h.windowBits, h.windowBits === 0 && (h.windowBits = -15)), !(0 <= h.windowBits && h.windowBits < 16) || n && n.windowBits || (h.windowBits += 32), 15 < h.windowBits && h.windowBits < 48 && (15 & h.windowBits) == 0 && (h.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new v(), this.strm.avail_out = 0;
|
|
1252
|
+
var a = u.inflateInit2(this.strm, h.windowBits);
|
|
1253
|
+
if (a !== s.Z_OK) throw new Error(_[a]);
|
|
1254
|
+
this.header = new p(), u.inflateGetHeader(this.strm, this.header);
|
|
1255
|
+
}
|
|
1256
|
+
function c(n, h) {
|
|
1257
|
+
var a = new i(h);
|
|
1258
|
+
if (a.push(n, !0), a.err) throw a.msg || _[a.err];
|
|
1259
|
+
return a.result;
|
|
1260
|
+
}
|
|
1261
|
+
i.prototype.push = function(n, h) {
|
|
1262
|
+
var a, d, y, S, x, F, B = this.strm, L = this.options.chunkSize, I = this.options.dictionary, Z = !1;
|
|
1263
|
+
if (this.ended) return !1;
|
|
1264
|
+
d = h === ~~h ? h : h === !0 ? s.Z_FINISH : s.Z_NO_FLUSH, typeof n == "string" ? B.input = r.binstring2buf(n) : g.call(n) === "[object ArrayBuffer]" ? B.input = new Uint8Array(n) : B.input = n, B.next_in = 0, B.avail_in = B.input.length;
|
|
1265
|
+
do {
|
|
1266
|
+
if (B.avail_out === 0 && (B.output = new l.Buf8(L), B.next_out = 0, B.avail_out = L), (a = u.inflate(B, s.Z_NO_FLUSH)) === s.Z_NEED_DICT && I && (F = typeof I == "string" ? r.string2buf(I) : g.call(I) === "[object ArrayBuffer]" ? new Uint8Array(I) : I, a = u.inflateSetDictionary(this.strm, F)), a === s.Z_BUF_ERROR && Z === !0 && (a = s.Z_OK, Z = !1), a !== s.Z_STREAM_END && a !== s.Z_OK) return this.onEnd(a), !(this.ended = !0);
|
|
1267
|
+
B.next_out && (B.avail_out !== 0 && a !== s.Z_STREAM_END && (B.avail_in !== 0 || d !== s.Z_FINISH && d !== s.Z_SYNC_FLUSH) || (this.options.to === "string" ? (y = r.utf8border(B.output, B.next_out), S = B.next_out - y, x = r.buf2string(B.output, y), B.next_out = S, B.avail_out = L - S, S && l.arraySet(B.output, B.output, y, S, 0), this.onData(x)) : this.onData(l.shrinkBuf(B.output, B.next_out)))), B.avail_in === 0 && B.avail_out === 0 && (Z = !0);
|
|
1268
|
+
} while ((0 < B.avail_in || B.avail_out === 0) && a !== s.Z_STREAM_END);
|
|
1269
|
+
return a === s.Z_STREAM_END && (d = s.Z_FINISH), d === s.Z_FINISH ? (a = u.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, a === s.Z_OK) : d !== s.Z_SYNC_FLUSH || (this.onEnd(s.Z_OK), !(B.avail_out = 0));
|
|
1270
|
+
}, i.prototype.onData = function(n) {
|
|
1271
|
+
this.chunks.push(n);
|
|
1272
|
+
}, i.prototype.onEnd = function(n) {
|
|
1273
|
+
n === s.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = l.flattenChunks(this.chunks)), this.chunks = [], this.err = n, this.msg = this.strm.msg;
|
|
1274
|
+
}, w.Inflate = i, w.inflate = c, w.inflateRaw = function(n, h) {
|
|
1275
|
+
return (h = h || {}).raw = !0, c(n, h);
|
|
1276
|
+
}, w.ungzip = c;
|
|
1277
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(m, O, w) {
|
|
1278
|
+
var u = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1279
|
+
w.assign = function(s) {
|
|
1280
|
+
for (var _ = Array.prototype.slice.call(arguments, 1); _.length; ) {
|
|
1281
|
+
var v = _.shift();
|
|
1282
|
+
if (v) {
|
|
1283
|
+
if (typeof v != "object") throw new TypeError(v + "must be non-object");
|
|
1284
|
+
for (var p in v) v.hasOwnProperty(p) && (s[p] = v[p]);
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
return s;
|
|
1288
|
+
}, w.shrinkBuf = function(s, _) {
|
|
1289
|
+
return s.length === _ ? s : s.subarray ? s.subarray(0, _) : (s.length = _, s);
|
|
1290
|
+
};
|
|
1291
|
+
var l = { arraySet: function(s, _, v, p, g) {
|
|
1292
|
+
if (_.subarray && s.subarray) s.set(_.subarray(v, v + p), g);
|
|
1293
|
+
else for (var i = 0; i < p; i++) s[g + i] = _[v + i];
|
|
1294
|
+
}, flattenChunks: function(s) {
|
|
1295
|
+
var _, v, p, g, i, c;
|
|
1296
|
+
for (_ = p = 0, v = s.length; _ < v; _++) p += s[_].length;
|
|
1297
|
+
for (c = new Uint8Array(p), _ = g = 0, v = s.length; _ < v; _++) i = s[_], c.set(i, g), g += i.length;
|
|
1298
|
+
return c;
|
|
1299
|
+
} }, r = { arraySet: function(s, _, v, p, g) {
|
|
1300
|
+
for (var i = 0; i < p; i++) s[g + i] = _[v + i];
|
|
1301
|
+
}, flattenChunks: function(s) {
|
|
1302
|
+
return [].concat.apply([], s);
|
|
1303
|
+
} };
|
|
1304
|
+
w.setTyped = function(s) {
|
|
1305
|
+
s ? (w.Buf8 = Uint8Array, w.Buf16 = Uint16Array, w.Buf32 = Int32Array, w.assign(w, l)) : (w.Buf8 = Array, w.Buf16 = Array, w.Buf32 = Array, w.assign(w, r));
|
|
1306
|
+
}, w.setTyped(u);
|
|
1307
|
+
}, {}], 42: [function(m, O, w) {
|
|
1308
|
+
var u = m("./common"), l = !0, r = !0;
|
|
1309
|
+
try {
|
|
1310
|
+
String.fromCharCode.apply(null, [0]);
|
|
1311
|
+
} catch {
|
|
1312
|
+
l = !1;
|
|
1313
|
+
}
|
|
1314
|
+
try {
|
|
1315
|
+
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1316
|
+
} catch {
|
|
1317
|
+
r = !1;
|
|
1318
|
+
}
|
|
1319
|
+
for (var s = new u.Buf8(256), _ = 0; _ < 256; _++) s[_] = 252 <= _ ? 6 : 248 <= _ ? 5 : 240 <= _ ? 4 : 224 <= _ ? 3 : 192 <= _ ? 2 : 1;
|
|
1320
|
+
function v(p, g) {
|
|
1321
|
+
if (g < 65537 && (p.subarray && r || !p.subarray && l)) return String.fromCharCode.apply(null, u.shrinkBuf(p, g));
|
|
1322
|
+
for (var i = "", c = 0; c < g; c++) i += String.fromCharCode(p[c]);
|
|
1323
|
+
return i;
|
|
1324
|
+
}
|
|
1325
|
+
s[254] = s[254] = 1, w.string2buf = function(p) {
|
|
1326
|
+
var g, i, c, n, h, a = p.length, d = 0;
|
|
1327
|
+
for (n = 0; n < a; n++) (64512 & (i = p.charCodeAt(n))) == 55296 && n + 1 < a && (64512 & (c = p.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (c - 56320), n++), d += i < 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4;
|
|
1328
|
+
for (g = new u.Buf8(d), n = h = 0; h < d; n++) (64512 & (i = p.charCodeAt(n))) == 55296 && n + 1 < a && (64512 & (c = p.charCodeAt(n + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (c - 56320), n++), i < 128 ? g[h++] = i : (i < 2048 ? g[h++] = 192 | i >>> 6 : (i < 65536 ? g[h++] = 224 | i >>> 12 : (g[h++] = 240 | i >>> 18, g[h++] = 128 | i >>> 12 & 63), g[h++] = 128 | i >>> 6 & 63), g[h++] = 128 | 63 & i);
|
|
1329
|
+
return g;
|
|
1330
|
+
}, w.buf2binstring = function(p) {
|
|
1331
|
+
return v(p, p.length);
|
|
1332
|
+
}, w.binstring2buf = function(p) {
|
|
1333
|
+
for (var g = new u.Buf8(p.length), i = 0, c = g.length; i < c; i++) g[i] = p.charCodeAt(i);
|
|
1334
|
+
return g;
|
|
1335
|
+
}, w.buf2string = function(p, g) {
|
|
1336
|
+
var i, c, n, h, a = g || p.length, d = new Array(2 * a);
|
|
1337
|
+
for (i = c = 0; i < a; ) if ((n = p[i++]) < 128) d[c++] = n;
|
|
1338
|
+
else if (4 < (h = s[n])) d[c++] = 65533, i += h - 1;
|
|
1339
|
+
else {
|
|
1340
|
+
for (n &= h === 2 ? 31 : h === 3 ? 15 : 7; 1 < h && i < a; ) n = n << 6 | 63 & p[i++], h--;
|
|
1341
|
+
1 < h ? d[c++] = 65533 : n < 65536 ? d[c++] = n : (n -= 65536, d[c++] = 55296 | n >> 10 & 1023, d[c++] = 56320 | 1023 & n);
|
|
1342
|
+
}
|
|
1343
|
+
return v(d, c);
|
|
1344
|
+
}, w.utf8border = function(p, g) {
|
|
1345
|
+
var i;
|
|
1346
|
+
for ((g = g || p.length) > p.length && (g = p.length), i = g - 1; 0 <= i && (192 & p[i]) == 128; ) i--;
|
|
1347
|
+
return i < 0 || i === 0 ? g : i + s[p[i]] > g ? i : g;
|
|
1348
|
+
};
|
|
1349
|
+
}, { "./common": 41 }], 43: [function(m, O, w) {
|
|
1350
|
+
O.exports = function(u, l, r, s) {
|
|
1351
|
+
for (var _ = 65535 & u | 0, v = u >>> 16 & 65535 | 0, p = 0; r !== 0; ) {
|
|
1352
|
+
for (r -= p = 2e3 < r ? 2e3 : r; v = v + (_ = _ + l[s++] | 0) | 0, --p; ) ;
|
|
1353
|
+
_ %= 65521, v %= 65521;
|
|
1354
|
+
}
|
|
1355
|
+
return _ | v << 16 | 0;
|
|
1356
|
+
};
|
|
1357
|
+
}, {}], 44: [function(m, O, w) {
|
|
1358
|
+
O.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 };
|
|
1359
|
+
}, {}], 45: [function(m, O, w) {
|
|
1360
|
+
var u = function() {
|
|
1361
|
+
for (var l, r = [], s = 0; s < 256; s++) {
|
|
1362
|
+
l = s;
|
|
1363
|
+
for (var _ = 0; _ < 8; _++) l = 1 & l ? 3988292384 ^ l >>> 1 : l >>> 1;
|
|
1364
|
+
r[s] = l;
|
|
1365
|
+
}
|
|
1366
|
+
return r;
|
|
1367
|
+
}();
|
|
1368
|
+
O.exports = function(l, r, s, _) {
|
|
1369
|
+
var v = u, p = _ + s;
|
|
1370
|
+
l ^= -1;
|
|
1371
|
+
for (var g = _; g < p; g++) l = l >>> 8 ^ v[255 & (l ^ r[g])];
|
|
1372
|
+
return -1 ^ l;
|
|
1373
|
+
};
|
|
1374
|
+
}, {}], 46: [function(m, O, w) {
|
|
1375
|
+
var u, l = m("../utils/common"), r = m("./trees"), s = m("./adler32"), _ = m("./crc32"), v = m("./messages"), p = 0, g = 4, i = 0, c = -2, n = -1, h = 4, a = 2, d = 8, y = 9, S = 286, x = 30, F = 19, B = 2 * S + 1, L = 15, I = 3, Z = 258, X = Z + I + 1, b = 42, R = 113, e = 1, D = 2, Q = 3, U = 4;
|
|
1376
|
+
function tt(t, T) {
|
|
1377
|
+
return t.msg = v[T], T;
|
|
1378
|
+
}
|
|
1379
|
+
function j(t) {
|
|
1380
|
+
return (t << 1) - (4 < t ? 9 : 0);
|
|
1381
|
+
}
|
|
1382
|
+
function J(t) {
|
|
1383
|
+
for (var T = t.length; 0 <= --T; ) t[T] = 0;
|
|
1384
|
+
}
|
|
1385
|
+
function E(t) {
|
|
1386
|
+
var T = t.state, A = T.pending;
|
|
1387
|
+
A > t.avail_out && (A = t.avail_out), A !== 0 && (l.arraySet(t.output, T.pending_buf, T.pending_out, A, t.next_out), t.next_out += A, T.pending_out += A, t.total_out += A, t.avail_out -= A, T.pending -= A, T.pending === 0 && (T.pending_out = 0));
|
|
1388
|
+
}
|
|
1389
|
+
function C(t, T) {
|
|
1390
|
+
r._tr_flush_block(t, 0 <= t.block_start ? t.block_start : -1, t.strstart - t.block_start, T), t.block_start = t.strstart, E(t.strm);
|
|
1391
|
+
}
|
|
1392
|
+
function V(t, T) {
|
|
1393
|
+
t.pending_buf[t.pending++] = T;
|
|
1394
|
+
}
|
|
1395
|
+
function G(t, T) {
|
|
1396
|
+
t.pending_buf[t.pending++] = T >>> 8 & 255, t.pending_buf[t.pending++] = 255 & T;
|
|
1397
|
+
}
|
|
1398
|
+
function H(t, T) {
|
|
1399
|
+
var A, f, o = t.max_chain_length, k = t.strstart, N = t.prev_length, P = t.nice_match, z = t.strstart > t.w_size - X ? t.strstart - (t.w_size - X) : 0, W = t.window, K = t.w_mask, M = t.prev, Y = t.strstart + Z, it = W[k + N - 1], rt = W[k + N];
|
|
1400
|
+
t.prev_length >= t.good_match && (o >>= 2), P > t.lookahead && (P = t.lookahead);
|
|
1401
|
+
do
|
|
1402
|
+
if (W[(A = T) + N] === rt && W[A + N - 1] === it && W[A] === W[k] && W[++A] === W[k + 1]) {
|
|
1403
|
+
k += 2, A++;
|
|
1404
|
+
do
|
|
1405
|
+
;
|
|
1406
|
+
while (W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && W[++k] === W[++A] && k < Y);
|
|
1407
|
+
if (f = Z - (Y - k), k = Y - Z, N < f) {
|
|
1408
|
+
if (t.match_start = T, P <= (N = f)) break;
|
|
1409
|
+
it = W[k + N - 1], rt = W[k + N];
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
while ((T = M[T & K]) > z && --o != 0);
|
|
1413
|
+
return N <= t.lookahead ? N : t.lookahead;
|
|
1414
|
+
}
|
|
1415
|
+
function at(t) {
|
|
1416
|
+
var T, A, f, o, k, N, P, z, W, K, M = t.w_size;
|
|
1417
|
+
do {
|
|
1418
|
+
if (o = t.window_size - t.lookahead - t.strstart, t.strstart >= M + (M - X)) {
|
|
1419
|
+
for (l.arraySet(t.window, t.window, M, M, 0), t.match_start -= M, t.strstart -= M, t.block_start -= M, T = A = t.hash_size; f = t.head[--T], t.head[T] = M <= f ? f - M : 0, --A; ) ;
|
|
1420
|
+
for (T = A = M; f = t.prev[--T], t.prev[T] = M <= f ? f - M : 0, --A; ) ;
|
|
1421
|
+
o += M;
|
|
1422
|
+
}
|
|
1423
|
+
if (t.strm.avail_in === 0) break;
|
|
1424
|
+
if (N = t.strm, P = t.window, z = t.strstart + t.lookahead, W = o, K = void 0, K = N.avail_in, W < K && (K = W), A = K === 0 ? 0 : (N.avail_in -= K, l.arraySet(P, N.input, N.next_in, K, z), N.state.wrap === 1 ? N.adler = s(N.adler, P, K, z) : N.state.wrap === 2 && (N.adler = _(N.adler, P, K, z)), N.next_in += K, N.total_in += K, K), t.lookahead += A, t.lookahead + t.insert >= I) 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 + I - 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 < I)); ) ;
|
|
1425
|
+
} while (t.lookahead < X && t.strm.avail_in !== 0);
|
|
1426
|
+
}
|
|
1427
|
+
function ut(t, T) {
|
|
1428
|
+
for (var A, f; ; ) {
|
|
1429
|
+
if (t.lookahead < X) {
|
|
1430
|
+
if (at(t), t.lookahead < X && T === p) return e;
|
|
1431
|
+
if (t.lookahead === 0) break;
|
|
1432
|
+
}
|
|
1433
|
+
if (A = 0, t.lookahead >= I && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), A !== 0 && t.strstart - A <= t.w_size - X && (t.match_length = H(t, A)), t.match_length >= I) if (f = r._tr_tally(t, t.strstart - t.match_start, t.match_length - I), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= I) {
|
|
1434
|
+
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
|
|
1435
|
+
t.strstart++;
|
|
1436
|
+
} 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;
|
|
1437
|
+
else f = r._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
1438
|
+
if (f && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1439
|
+
}
|
|
1440
|
+
return t.insert = t.strstart < I - 1 ? t.strstart : I - 1, T === g ? (C(t, !0), t.strm.avail_out === 0 ? Q : U) : t.last_lit && (C(t, !1), t.strm.avail_out === 0) ? e : D;
|
|
1441
|
+
}
|
|
1442
|
+
function et(t, T) {
|
|
1443
|
+
for (var A, f, o; ; ) {
|
|
1444
|
+
if (t.lookahead < X) {
|
|
1445
|
+
if (at(t), t.lookahead < X && T === p) return e;
|
|
1446
|
+
if (t.lookahead === 0) break;
|
|
1447
|
+
}
|
|
1448
|
+
if (A = 0, t.lookahead >= I && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = 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 = I - 1, A !== 0 && t.prev_length < t.max_lazy_match && t.strstart - A <= t.w_size - X && (t.match_length = H(t, A), t.match_length <= 5 && (t.strategy === 1 || t.match_length === I && 4096 < t.strstart - t.match_start) && (t.match_length = I - 1)), t.prev_length >= I && t.match_length <= t.prev_length) {
|
|
1449
|
+
for (o = t.strstart + t.lookahead - I, f = r._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - I), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= o && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
|
|
1450
|
+
if (t.match_available = 0, t.match_length = I - 1, t.strstart++, f && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1451
|
+
} else if (t.match_available) {
|
|
1452
|
+
if ((f = r._tr_tally(t, 0, t.window[t.strstart - 1])) && C(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
|
|
1453
|
+
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
1454
|
+
}
|
|
1455
|
+
return t.match_available && (f = r._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < I - 1 ? t.strstart : I - 1, T === g ? (C(t, !0), t.strm.avail_out === 0 ? Q : U) : t.last_lit && (C(t, !1), t.strm.avail_out === 0) ? e : D;
|
|
1456
|
+
}
|
|
1457
|
+
function nt(t, T, A, f, o) {
|
|
1458
|
+
this.good_length = t, this.max_lazy = T, this.nice_length = A, this.max_chain = f, this.func = o;
|
|
1459
|
+
}
|
|
1460
|
+
function lt() {
|
|
1461
|
+
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 = d, 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 l.Buf16(2 * B), this.dyn_dtree = new l.Buf16(2 * (2 * x + 1)), this.bl_tree = new l.Buf16(2 * (2 * F + 1)), J(this.dyn_ltree), J(this.dyn_dtree), J(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new l.Buf16(L + 1), this.heap = new l.Buf16(2 * S + 1), J(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new l.Buf16(2 * S + 1), J(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;
|
|
1462
|
+
}
|
|
1463
|
+
function st(t) {
|
|
1464
|
+
var T;
|
|
1465
|
+
return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = a, (T = t.state).pending = 0, T.pending_out = 0, T.wrap < 0 && (T.wrap = -T.wrap), T.status = T.wrap ? b : R, t.adler = T.wrap === 2 ? 0 : 1, T.last_flush = p, r._tr_init(T), i) : tt(t, c);
|
|
1466
|
+
}
|
|
1467
|
+
function ct(t) {
|
|
1468
|
+
var T = st(t);
|
|
1469
|
+
return T === i && function(A) {
|
|
1470
|
+
A.window_size = 2 * A.w_size, J(A.head), A.max_lazy_match = u[A.level].max_lazy, A.good_match = u[A.level].good_length, A.nice_match = u[A.level].nice_length, A.max_chain_length = u[A.level].max_chain, A.strstart = 0, A.block_start = 0, A.lookahead = 0, A.insert = 0, A.match_length = A.prev_length = I - 1, A.match_available = 0, A.ins_h = 0;
|
|
1471
|
+
}(t.state), T;
|
|
1472
|
+
}
|
|
1473
|
+
function ft(t, T, A, f, o, k) {
|
|
1474
|
+
if (!t) return c;
|
|
1475
|
+
var N = 1;
|
|
1476
|
+
if (T === n && (T = 6), f < 0 ? (N = 0, f = -f) : 15 < f && (N = 2, f -= 16), o < 1 || y < o || A !== d || f < 8 || 15 < f || T < 0 || 9 < T || k < 0 || h < k) return tt(t, c);
|
|
1477
|
+
f === 8 && (f = 9);
|
|
1478
|
+
var P = new lt();
|
|
1479
|
+
return (t.state = P).strm = t, P.wrap = N, P.gzhead = null, P.w_bits = f, P.w_size = 1 << P.w_bits, P.w_mask = P.w_size - 1, P.hash_bits = o + 7, P.hash_size = 1 << P.hash_bits, P.hash_mask = P.hash_size - 1, P.hash_shift = ~~((P.hash_bits + I - 1) / I), P.window = new l.Buf8(2 * P.w_size), P.head = new l.Buf16(P.hash_size), P.prev = new l.Buf16(P.w_size), P.lit_bufsize = 1 << o + 6, P.pending_buf_size = 4 * P.lit_bufsize, P.pending_buf = new l.Buf8(P.pending_buf_size), P.d_buf = 1 * P.lit_bufsize, P.l_buf = 3 * P.lit_bufsize, P.level = T, P.strategy = k, P.method = A, ct(t);
|
|
1480
|
+
}
|
|
1481
|
+
u = [new nt(0, 0, 0, 0, function(t, T) {
|
|
1482
|
+
var A = 65535;
|
|
1483
|
+
for (A > t.pending_buf_size - 5 && (A = t.pending_buf_size - 5); ; ) {
|
|
1484
|
+
if (t.lookahead <= 1) {
|
|
1485
|
+
if (at(t), t.lookahead === 0 && T === p) return e;
|
|
1486
|
+
if (t.lookahead === 0) break;
|
|
1487
|
+
}
|
|
1488
|
+
t.strstart += t.lookahead, t.lookahead = 0;
|
|
1489
|
+
var f = t.block_start + A;
|
|
1490
|
+
if ((t.strstart === 0 || t.strstart >= f) && (t.lookahead = t.strstart - f, t.strstart = f, C(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - X && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1491
|
+
}
|
|
1492
|
+
return t.insert = 0, T === g ? (C(t, !0), t.strm.avail_out === 0 ? Q : U) : (t.strstart > t.block_start && (C(t, !1), t.strm.avail_out), e);
|
|
1493
|
+
}), new nt(4, 4, 8, 4, ut), new nt(4, 5, 16, 8, ut), new nt(4, 6, 32, 32, ut), new nt(4, 4, 16, 16, et), new nt(8, 16, 32, 32, et), new nt(8, 16, 128, 128, et), new nt(8, 32, 128, 256, et), new nt(32, 128, 258, 1024, et), new nt(32, 258, 258, 4096, et)], w.deflateInit = function(t, T) {
|
|
1494
|
+
return ft(t, T, d, 15, 8, 0);
|
|
1495
|
+
}, w.deflateInit2 = ft, w.deflateReset = ct, w.deflateResetKeep = st, w.deflateSetHeader = function(t, T) {
|
|
1496
|
+
return t && t.state ? t.state.wrap !== 2 ? c : (t.state.gzhead = T, i) : c;
|
|
1497
|
+
}, w.deflate = function(t, T) {
|
|
1498
|
+
var A, f, o, k;
|
|
1499
|
+
if (!t || !t.state || 5 < T || T < 0) return t ? tt(t, c) : c;
|
|
1500
|
+
if (f = t.state, !t.output || !t.input && t.avail_in !== 0 || f.status === 666 && T !== g) return tt(t, t.avail_out === 0 ? -5 : c);
|
|
1501
|
+
if (f.strm = t, A = f.last_flush, f.last_flush = T, f.status === b) if (f.wrap === 2) t.adler = 0, V(f, 31), V(f, 139), V(f, 8), f.gzhead ? (V(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)), V(f, 255 & f.gzhead.time), V(f, f.gzhead.time >> 8 & 255), V(f, f.gzhead.time >> 16 & 255), V(f, f.gzhead.time >> 24 & 255), V(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), V(f, 255 & f.gzhead.os), f.gzhead.extra && f.gzhead.extra.length && (V(f, 255 & f.gzhead.extra.length), V(f, f.gzhead.extra.length >> 8 & 255)), f.gzhead.hcrc && (t.adler = _(t.adler, f.pending_buf, f.pending, 0)), f.gzindex = 0, f.status = 69) : (V(f, 0), V(f, 0), V(f, 0), V(f, 0), V(f, 0), V(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), V(f, 3), f.status = R);
|
|
1502
|
+
else {
|
|
1503
|
+
var N = d + (f.w_bits - 8 << 4) << 8;
|
|
1504
|
+
N |= (2 <= f.strategy || f.level < 2 ? 0 : f.level < 6 ? 1 : f.level === 6 ? 2 : 3) << 6, f.strstart !== 0 && (N |= 32), N += 31 - N % 31, f.status = R, G(f, N), f.strstart !== 0 && (G(f, t.adler >>> 16), G(f, 65535 & t.adler)), t.adler = 1;
|
|
1505
|
+
}
|
|
1506
|
+
if (f.status === 69) if (f.gzhead.extra) {
|
|
1507
|
+
for (o = f.pending; f.gzindex < (65535 & f.gzhead.extra.length) && (f.pending !== f.pending_buf_size || (f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), E(t), o = f.pending, f.pending !== f.pending_buf_size)); ) V(f, 255 & f.gzhead.extra[f.gzindex]), f.gzindex++;
|
|
1508
|
+
f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), f.gzindex === f.gzhead.extra.length && (f.gzindex = 0, f.status = 73);
|
|
1509
|
+
} else f.status = 73;
|
|
1510
|
+
if (f.status === 73) if (f.gzhead.name) {
|
|
1511
|
+
o = f.pending;
|
|
1512
|
+
do {
|
|
1513
|
+
if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), E(t), o = f.pending, f.pending === f.pending_buf_size)) {
|
|
1514
|
+
k = 1;
|
|
1515
|
+
break;
|
|
1516
|
+
}
|
|
1517
|
+
k = f.gzindex < f.gzhead.name.length ? 255 & f.gzhead.name.charCodeAt(f.gzindex++) : 0, V(f, k);
|
|
1518
|
+
} while (k !== 0);
|
|
1519
|
+
f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), k === 0 && (f.gzindex = 0, f.status = 91);
|
|
1520
|
+
} else f.status = 91;
|
|
1521
|
+
if (f.status === 91) if (f.gzhead.comment) {
|
|
1522
|
+
o = f.pending;
|
|
1523
|
+
do {
|
|
1524
|
+
if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), E(t), o = f.pending, f.pending === f.pending_buf_size)) {
|
|
1525
|
+
k = 1;
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1528
|
+
k = f.gzindex < f.gzhead.comment.length ? 255 & f.gzhead.comment.charCodeAt(f.gzindex++) : 0, V(f, k);
|
|
1529
|
+
} while (k !== 0);
|
|
1530
|
+
f.gzhead.hcrc && f.pending > o && (t.adler = _(t.adler, f.pending_buf, f.pending - o, o)), k === 0 && (f.status = 103);
|
|
1531
|
+
} else f.status = 103;
|
|
1532
|
+
if (f.status === 103 && (f.gzhead.hcrc ? (f.pending + 2 > f.pending_buf_size && E(t), f.pending + 2 <= f.pending_buf_size && (V(f, 255 & t.adler), V(f, t.adler >> 8 & 255), t.adler = 0, f.status = R)) : f.status = R), f.pending !== 0) {
|
|
1533
|
+
if (E(t), t.avail_out === 0) return f.last_flush = -1, i;
|
|
1534
|
+
} else if (t.avail_in === 0 && j(T) <= j(A) && T !== g) return tt(t, -5);
|
|
1535
|
+
if (f.status === 666 && t.avail_in !== 0) return tt(t, -5);
|
|
1536
|
+
if (t.avail_in !== 0 || f.lookahead !== 0 || T !== p && f.status !== 666) {
|
|
1537
|
+
var P = f.strategy === 2 ? function(z, W) {
|
|
1538
|
+
for (var K; ; ) {
|
|
1539
|
+
if (z.lookahead === 0 && (at(z), z.lookahead === 0)) {
|
|
1540
|
+
if (W === p) return e;
|
|
1541
|
+
break;
|
|
1542
|
+
}
|
|
1543
|
+
if (z.match_length = 0, K = r._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++, K && (C(z, !1), z.strm.avail_out === 0)) return e;
|
|
1544
|
+
}
|
|
1545
|
+
return z.insert = 0, W === g ? (C(z, !0), z.strm.avail_out === 0 ? Q : U) : z.last_lit && (C(z, !1), z.strm.avail_out === 0) ? e : D;
|
|
1546
|
+
}(f, T) : f.strategy === 3 ? function(z, W) {
|
|
1547
|
+
for (var K, M, Y, it, rt = z.window; ; ) {
|
|
1548
|
+
if (z.lookahead <= Z) {
|
|
1549
|
+
if (at(z), z.lookahead <= Z && W === p) return e;
|
|
1550
|
+
if (z.lookahead === 0) break;
|
|
1551
|
+
}
|
|
1552
|
+
if (z.match_length = 0, z.lookahead >= I && 0 < z.strstart && (M = rt[Y = z.strstart - 1]) === rt[++Y] && M === rt[++Y] && M === rt[++Y]) {
|
|
1553
|
+
it = z.strstart + Z;
|
|
1554
|
+
do
|
|
1555
|
+
;
|
|
1556
|
+
while (M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && M === rt[++Y] && Y < it);
|
|
1557
|
+
z.match_length = Z - (it - Y), z.match_length > z.lookahead && (z.match_length = z.lookahead);
|
|
1558
|
+
}
|
|
1559
|
+
if (z.match_length >= I ? (K = r._tr_tally(z, 1, z.match_length - I), z.lookahead -= z.match_length, z.strstart += z.match_length, z.match_length = 0) : (K = r._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++), K && (C(z, !1), z.strm.avail_out === 0)) return e;
|
|
1560
|
+
}
|
|
1561
|
+
return z.insert = 0, W === g ? (C(z, !0), z.strm.avail_out === 0 ? Q : U) : z.last_lit && (C(z, !1), z.strm.avail_out === 0) ? e : D;
|
|
1562
|
+
}(f, T) : u[f.level].func(f, T);
|
|
1563
|
+
if (P !== Q && P !== U || (f.status = 666), P === e || P === Q) return t.avail_out === 0 && (f.last_flush = -1), i;
|
|
1564
|
+
if (P === D && (T === 1 ? r._tr_align(f) : T !== 5 && (r._tr_stored_block(f, 0, 0, !1), T === 3 && (J(f.head), f.lookahead === 0 && (f.strstart = 0, f.block_start = 0, f.insert = 0))), E(t), t.avail_out === 0)) return f.last_flush = -1, i;
|
|
1565
|
+
}
|
|
1566
|
+
return T !== g ? i : f.wrap <= 0 ? 1 : (f.wrap === 2 ? (V(f, 255 & t.adler), V(f, t.adler >> 8 & 255), V(f, t.adler >> 16 & 255), V(f, t.adler >> 24 & 255), V(f, 255 & t.total_in), V(f, t.total_in >> 8 & 255), V(f, t.total_in >> 16 & 255), V(f, t.total_in >> 24 & 255)) : (G(f, t.adler >>> 16), G(f, 65535 & t.adler)), E(t), 0 < f.wrap && (f.wrap = -f.wrap), f.pending !== 0 ? i : 1);
|
|
1567
|
+
}, w.deflateEnd = function(t) {
|
|
1568
|
+
var T;
|
|
1569
|
+
return t && t.state ? (T = t.state.status) !== b && T !== 69 && T !== 73 && T !== 91 && T !== 103 && T !== R && T !== 666 ? tt(t, c) : (t.state = null, T === R ? tt(t, -3) : i) : c;
|
|
1570
|
+
}, w.deflateSetDictionary = function(t, T) {
|
|
1571
|
+
var A, f, o, k, N, P, z, W, K = T.length;
|
|
1572
|
+
if (!t || !t.state || (k = (A = t.state).wrap) === 2 || k === 1 && A.status !== b || A.lookahead) return c;
|
|
1573
|
+
for (k === 1 && (t.adler = s(t.adler, T, K, 0)), A.wrap = 0, K >= A.w_size && (k === 0 && (J(A.head), A.strstart = 0, A.block_start = 0, A.insert = 0), W = new l.Buf8(A.w_size), l.arraySet(W, T, K - A.w_size, A.w_size, 0), T = W, K = A.w_size), N = t.avail_in, P = t.next_in, z = t.input, t.avail_in = K, t.next_in = 0, t.input = T, at(A); A.lookahead >= I; ) {
|
|
1574
|
+
for (f = A.strstart, o = A.lookahead - (I - 1); A.ins_h = (A.ins_h << A.hash_shift ^ A.window[f + I - 1]) & A.hash_mask, A.prev[f & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = f, f++, --o; ) ;
|
|
1575
|
+
A.strstart = f, A.lookahead = I - 1, at(A);
|
|
1576
|
+
}
|
|
1577
|
+
return A.strstart += A.lookahead, A.block_start = A.strstart, A.insert = A.lookahead, A.lookahead = 0, A.match_length = A.prev_length = I - 1, A.match_available = 0, t.next_in = P, t.input = z, t.avail_in = N, A.wrap = k, i;
|
|
1578
|
+
}, w.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1579
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(m, O, w) {
|
|
1580
|
+
O.exports = function() {
|
|
1581
|
+
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;
|
|
1582
|
+
};
|
|
1583
|
+
}, {}], 48: [function(m, O, w) {
|
|
1584
|
+
O.exports = function(u, l) {
|
|
1585
|
+
var r, s, _, v, p, g, i, c, n, h, a, d, y, S, x, F, B, L, I, Z, X, b, R, e, D;
|
|
1586
|
+
r = u.state, s = u.next_in, e = u.input, _ = s + (u.avail_in - 5), v = u.next_out, D = u.output, p = v - (l - u.avail_out), g = v + (u.avail_out - 257), i = r.dmax, c = r.wsize, n = r.whave, h = r.wnext, a = r.window, d = r.hold, y = r.bits, S = r.lencode, x = r.distcode, F = (1 << r.lenbits) - 1, B = (1 << r.distbits) - 1;
|
|
1587
|
+
t: do {
|
|
1588
|
+
y < 15 && (d += e[s++] << y, y += 8, d += e[s++] << y, y += 8), L = S[d & F];
|
|
1589
|
+
e: for (; ; ) {
|
|
1590
|
+
if (d >>>= I = L >>> 24, y -= I, (I = L >>> 16 & 255) === 0) D[v++] = 65535 & L;
|
|
1591
|
+
else {
|
|
1592
|
+
if (!(16 & I)) {
|
|
1593
|
+
if ((64 & I) == 0) {
|
|
1594
|
+
L = S[(65535 & L) + (d & (1 << I) - 1)];
|
|
1595
|
+
continue e;
|
|
1596
|
+
}
|
|
1597
|
+
if (32 & I) {
|
|
1598
|
+
r.mode = 12;
|
|
1599
|
+
break t;
|
|
1600
|
+
}
|
|
1601
|
+
u.msg = "invalid literal/length code", r.mode = 30;
|
|
1602
|
+
break t;
|
|
1603
|
+
}
|
|
1604
|
+
Z = 65535 & L, (I &= 15) && (y < I && (d += e[s++] << y, y += 8), Z += d & (1 << I) - 1, d >>>= I, y -= I), y < 15 && (d += e[s++] << y, y += 8, d += e[s++] << y, y += 8), L = x[d & B];
|
|
1605
|
+
r: for (; ; ) {
|
|
1606
|
+
if (d >>>= I = L >>> 24, y -= I, !(16 & (I = L >>> 16 & 255))) {
|
|
1607
|
+
if ((64 & I) == 0) {
|
|
1608
|
+
L = x[(65535 & L) + (d & (1 << I) - 1)];
|
|
1609
|
+
continue r;
|
|
1610
|
+
}
|
|
1611
|
+
u.msg = "invalid distance code", r.mode = 30;
|
|
1612
|
+
break t;
|
|
1613
|
+
}
|
|
1614
|
+
if (X = 65535 & L, y < (I &= 15) && (d += e[s++] << y, (y += 8) < I && (d += e[s++] << y, y += 8)), i < (X += d & (1 << I) - 1)) {
|
|
1615
|
+
u.msg = "invalid distance too far back", r.mode = 30;
|
|
1616
|
+
break t;
|
|
1617
|
+
}
|
|
1618
|
+
if (d >>>= I, y -= I, (I = v - p) < X) {
|
|
1619
|
+
if (n < (I = X - I) && r.sane) {
|
|
1620
|
+
u.msg = "invalid distance too far back", r.mode = 30;
|
|
1621
|
+
break t;
|
|
1622
|
+
}
|
|
1623
|
+
if (R = a, (b = 0) === h) {
|
|
1624
|
+
if (b += c - I, I < Z) {
|
|
1625
|
+
for (Z -= I; D[v++] = a[b++], --I; ) ;
|
|
1626
|
+
b = v - X, R = D;
|
|
1627
|
+
}
|
|
1628
|
+
} else if (h < I) {
|
|
1629
|
+
if (b += c + h - I, (I -= h) < Z) {
|
|
1630
|
+
for (Z -= I; D[v++] = a[b++], --I; ) ;
|
|
1631
|
+
if (b = 0, h < Z) {
|
|
1632
|
+
for (Z -= I = h; D[v++] = a[b++], --I; ) ;
|
|
1633
|
+
b = v - X, R = D;
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
} else if (b += h - I, I < Z) {
|
|
1637
|
+
for (Z -= I; D[v++] = a[b++], --I; ) ;
|
|
1638
|
+
b = v - X, R = D;
|
|
1639
|
+
}
|
|
1640
|
+
for (; 2 < Z; ) D[v++] = R[b++], D[v++] = R[b++], D[v++] = R[b++], Z -= 3;
|
|
1641
|
+
Z && (D[v++] = R[b++], 1 < Z && (D[v++] = R[b++]));
|
|
1642
|
+
} else {
|
|
1643
|
+
for (b = v - X; D[v++] = D[b++], D[v++] = D[b++], D[v++] = D[b++], 2 < (Z -= 3); ) ;
|
|
1644
|
+
Z && (D[v++] = D[b++], 1 < Z && (D[v++] = D[b++]));
|
|
1645
|
+
}
|
|
1646
|
+
break;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
break;
|
|
1650
|
+
}
|
|
1651
|
+
} while (s < _ && v < g);
|
|
1652
|
+
s -= Z = y >> 3, d &= (1 << (y -= Z << 3)) - 1, u.next_in = s, u.next_out = v, u.avail_in = s < _ ? _ - s + 5 : 5 - (s - _), u.avail_out = v < g ? g - v + 257 : 257 - (v - g), r.hold = d, r.bits = y;
|
|
1653
|
+
};
|
|
1654
|
+
}, {}], 49: [function(m, O, w) {
|
|
1655
|
+
var u = m("../utils/common"), l = m("./adler32"), r = m("./crc32"), s = m("./inffast"), _ = m("./inftrees"), v = 1, p = 2, g = 0, i = -2, c = 1, n = 852, h = 592;
|
|
1656
|
+
function a(b) {
|
|
1657
|
+
return (b >>> 24 & 255) + (b >>> 8 & 65280) + ((65280 & b) << 8) + ((255 & b) << 24);
|
|
1658
|
+
}
|
|
1659
|
+
function d() {
|
|
1660
|
+
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new u.Buf16(320), this.work = new u.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1661
|
+
}
|
|
1662
|
+
function y(b) {
|
|
1663
|
+
var R;
|
|
1664
|
+
return b && b.state ? (R = b.state, b.total_in = b.total_out = R.total = 0, b.msg = "", R.wrap && (b.adler = 1 & R.wrap), R.mode = c, R.last = 0, R.havedict = 0, R.dmax = 32768, R.head = null, R.hold = 0, R.bits = 0, R.lencode = R.lendyn = new u.Buf32(n), R.distcode = R.distdyn = new u.Buf32(h), R.sane = 1, R.back = -1, g) : i;
|
|
1665
|
+
}
|
|
1666
|
+
function S(b) {
|
|
1667
|
+
var R;
|
|
1668
|
+
return b && b.state ? ((R = b.state).wsize = 0, R.whave = 0, R.wnext = 0, y(b)) : i;
|
|
1669
|
+
}
|
|
1670
|
+
function x(b, R) {
|
|
1671
|
+
var e, D;
|
|
1672
|
+
return b && b.state ? (D = b.state, R < 0 ? (e = 0, R = -R) : (e = 1 + (R >> 4), R < 48 && (R &= 15)), R && (R < 8 || 15 < R) ? i : (D.window !== null && D.wbits !== R && (D.window = null), D.wrap = e, D.wbits = R, S(b))) : i;
|
|
1673
|
+
}
|
|
1674
|
+
function F(b, R) {
|
|
1675
|
+
var e, D;
|
|
1676
|
+
return b ? (D = new d(), (b.state = D).window = null, (e = x(b, R)) !== g && (b.state = null), e) : i;
|
|
1677
|
+
}
|
|
1678
|
+
var B, L, I = !0;
|
|
1679
|
+
function Z(b) {
|
|
1680
|
+
if (I) {
|
|
1681
|
+
var R;
|
|
1682
|
+
for (B = new u.Buf32(512), L = new u.Buf32(32), R = 0; R < 144; ) b.lens[R++] = 8;
|
|
1683
|
+
for (; R < 256; ) b.lens[R++] = 9;
|
|
1684
|
+
for (; R < 280; ) b.lens[R++] = 7;
|
|
1685
|
+
for (; R < 288; ) b.lens[R++] = 8;
|
|
1686
|
+
for (_(v, b.lens, 0, 288, B, 0, b.work, { bits: 9 }), R = 0; R < 32; ) b.lens[R++] = 5;
|
|
1687
|
+
_(p, b.lens, 0, 32, L, 0, b.work, { bits: 5 }), I = !1;
|
|
1688
|
+
}
|
|
1689
|
+
b.lencode = B, b.lenbits = 9, b.distcode = L, b.distbits = 5;
|
|
1690
|
+
}
|
|
1691
|
+
function X(b, R, e, D) {
|
|
1692
|
+
var Q, U = b.state;
|
|
1693
|
+
return U.window === null && (U.wsize = 1 << U.wbits, U.wnext = 0, U.whave = 0, U.window = new u.Buf8(U.wsize)), D >= U.wsize ? (u.arraySet(U.window, R, e - U.wsize, U.wsize, 0), U.wnext = 0, U.whave = U.wsize) : (D < (Q = U.wsize - U.wnext) && (Q = D), u.arraySet(U.window, R, e - D, Q, U.wnext), (D -= Q) ? (u.arraySet(U.window, R, e - D, D, 0), U.wnext = D, U.whave = U.wsize) : (U.wnext += Q, U.wnext === U.wsize && (U.wnext = 0), U.whave < U.wsize && (U.whave += Q))), 0;
|
|
1694
|
+
}
|
|
1695
|
+
w.inflateReset = S, w.inflateReset2 = x, w.inflateResetKeep = y, w.inflateInit = function(b) {
|
|
1696
|
+
return F(b, 15);
|
|
1697
|
+
}, w.inflateInit2 = F, w.inflate = function(b, R) {
|
|
1698
|
+
var e, D, Q, U, tt, j, J, E, C, V, G, H, at, ut, et, nt, lt, st, ct, ft, t, T, A, f, o = 0, k = new u.Buf8(4), N = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1699
|
+
if (!b || !b.state || !b.output || !b.input && b.avail_in !== 0) return i;
|
|
1700
|
+
(e = b.state).mode === 12 && (e.mode = 13), tt = b.next_out, Q = b.output, J = b.avail_out, U = b.next_in, D = b.input, j = b.avail_in, E = e.hold, C = e.bits, V = j, G = J, T = g;
|
|
1701
|
+
t: for (; ; ) switch (e.mode) {
|
|
1702
|
+
case c:
|
|
1703
|
+
if (e.wrap === 0) {
|
|
1704
|
+
e.mode = 13;
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
for (; C < 16; ) {
|
|
1708
|
+
if (j === 0) break t;
|
|
1709
|
+
j--, E += D[U++] << C, C += 8;
|
|
1710
|
+
}
|
|
1711
|
+
if (2 & e.wrap && E === 35615) {
|
|
1712
|
+
k[e.check = 0] = 255 & E, k[1] = E >>> 8 & 255, e.check = r(e.check, k, 2, 0), C = E = 0, e.mode = 2;
|
|
1713
|
+
break;
|
|
1714
|
+
}
|
|
1715
|
+
if (e.flags = 0, e.head && (e.head.done = !1), !(1 & e.wrap) || (((255 & E) << 8) + (E >> 8)) % 31) {
|
|
1716
|
+
b.msg = "incorrect header check", e.mode = 30;
|
|
1717
|
+
break;
|
|
1718
|
+
}
|
|
1719
|
+
if ((15 & E) != 8) {
|
|
1720
|
+
b.msg = "unknown compression method", e.mode = 30;
|
|
1721
|
+
break;
|
|
1722
|
+
}
|
|
1723
|
+
if (C -= 4, t = 8 + (15 & (E >>>= 4)), e.wbits === 0) e.wbits = t;
|
|
1724
|
+
else if (t > e.wbits) {
|
|
1725
|
+
b.msg = "invalid window size", e.mode = 30;
|
|
1726
|
+
break;
|
|
1727
|
+
}
|
|
1728
|
+
e.dmax = 1 << t, b.adler = e.check = 1, e.mode = 512 & E ? 10 : 12, C = E = 0;
|
|
1729
|
+
break;
|
|
1730
|
+
case 2:
|
|
1731
|
+
for (; C < 16; ) {
|
|
1732
|
+
if (j === 0) break t;
|
|
1733
|
+
j--, E += D[U++] << C, C += 8;
|
|
1734
|
+
}
|
|
1735
|
+
if (e.flags = E, (255 & e.flags) != 8) {
|
|
1736
|
+
b.msg = "unknown compression method", e.mode = 30;
|
|
1737
|
+
break;
|
|
1738
|
+
}
|
|
1739
|
+
if (57344 & e.flags) {
|
|
1740
|
+
b.msg = "unknown header flags set", e.mode = 30;
|
|
1741
|
+
break;
|
|
1742
|
+
}
|
|
1743
|
+
e.head && (e.head.text = E >> 8 & 1), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = r(e.check, k, 2, 0)), C = E = 0, e.mode = 3;
|
|
1744
|
+
case 3:
|
|
1745
|
+
for (; C < 32; ) {
|
|
1746
|
+
if (j === 0) break t;
|
|
1747
|
+
j--, E += D[U++] << C, C += 8;
|
|
1748
|
+
}
|
|
1749
|
+
e.head && (e.head.time = E), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, k[2] = E >>> 16 & 255, k[3] = E >>> 24 & 255, e.check = r(e.check, k, 4, 0)), C = E = 0, e.mode = 4;
|
|
1750
|
+
case 4:
|
|
1751
|
+
for (; C < 16; ) {
|
|
1752
|
+
if (j === 0) break t;
|
|
1753
|
+
j--, E += D[U++] << C, C += 8;
|
|
1754
|
+
}
|
|
1755
|
+
e.head && (e.head.xflags = 255 & E, e.head.os = E >> 8), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = r(e.check, k, 2, 0)), C = E = 0, e.mode = 5;
|
|
1756
|
+
case 5:
|
|
1757
|
+
if (1024 & e.flags) {
|
|
1758
|
+
for (; C < 16; ) {
|
|
1759
|
+
if (j === 0) break t;
|
|
1760
|
+
j--, E += D[U++] << C, C += 8;
|
|
1761
|
+
}
|
|
1762
|
+
e.length = E, e.head && (e.head.extra_len = E), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = r(e.check, k, 2, 0)), C = E = 0;
|
|
1763
|
+
} else e.head && (e.head.extra = null);
|
|
1764
|
+
e.mode = 6;
|
|
1765
|
+
case 6:
|
|
1766
|
+
if (1024 & e.flags && (j < (H = e.length) && (H = j), H && (e.head && (t = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Array(e.head.extra_len)), u.arraySet(e.head.extra, D, U, H, t)), 512 & e.flags && (e.check = r(e.check, D, H, U)), j -= H, U += H, e.length -= H), e.length)) break t;
|
|
1767
|
+
e.length = 0, e.mode = 7;
|
|
1768
|
+
case 7:
|
|
1769
|
+
if (2048 & e.flags) {
|
|
1770
|
+
if (j === 0) break t;
|
|
1771
|
+
for (H = 0; t = D[U + H++], e.head && t && e.length < 65536 && (e.head.name += String.fromCharCode(t)), t && H < j; ) ;
|
|
1772
|
+
if (512 & e.flags && (e.check = r(e.check, D, H, U)), j -= H, U += H, t) break t;
|
|
1773
|
+
} else e.head && (e.head.name = null);
|
|
1774
|
+
e.length = 0, e.mode = 8;
|
|
1775
|
+
case 8:
|
|
1776
|
+
if (4096 & e.flags) {
|
|
1777
|
+
if (j === 0) break t;
|
|
1778
|
+
for (H = 0; t = D[U + H++], e.head && t && e.length < 65536 && (e.head.comment += String.fromCharCode(t)), t && H < j; ) ;
|
|
1779
|
+
if (512 & e.flags && (e.check = r(e.check, D, H, U)), j -= H, U += H, t) break t;
|
|
1780
|
+
} else e.head && (e.head.comment = null);
|
|
1781
|
+
e.mode = 9;
|
|
1782
|
+
case 9:
|
|
1783
|
+
if (512 & e.flags) {
|
|
1784
|
+
for (; C < 16; ) {
|
|
1785
|
+
if (j === 0) break t;
|
|
1786
|
+
j--, E += D[U++] << C, C += 8;
|
|
1787
|
+
}
|
|
1788
|
+
if (E !== (65535 & e.check)) {
|
|
1789
|
+
b.msg = "header crc mismatch", e.mode = 30;
|
|
1790
|
+
break;
|
|
1791
|
+
}
|
|
1792
|
+
C = E = 0;
|
|
1793
|
+
}
|
|
1794
|
+
e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), b.adler = e.check = 0, e.mode = 12;
|
|
1795
|
+
break;
|
|
1796
|
+
case 10:
|
|
1797
|
+
for (; C < 32; ) {
|
|
1798
|
+
if (j === 0) break t;
|
|
1799
|
+
j--, E += D[U++] << C, C += 8;
|
|
1800
|
+
}
|
|
1801
|
+
b.adler = e.check = a(E), C = E = 0, e.mode = 11;
|
|
1802
|
+
case 11:
|
|
1803
|
+
if (e.havedict === 0) return b.next_out = tt, b.avail_out = J, b.next_in = U, b.avail_in = j, e.hold = E, e.bits = C, 2;
|
|
1804
|
+
b.adler = e.check = 1, e.mode = 12;
|
|
1805
|
+
case 12:
|
|
1806
|
+
if (R === 5 || R === 6) break t;
|
|
1807
|
+
case 13:
|
|
1808
|
+
if (e.last) {
|
|
1809
|
+
E >>>= 7 & C, C -= 7 & C, e.mode = 27;
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
for (; C < 3; ) {
|
|
1813
|
+
if (j === 0) break t;
|
|
1814
|
+
j--, E += D[U++] << C, C += 8;
|
|
1815
|
+
}
|
|
1816
|
+
switch (e.last = 1 & E, C -= 1, 3 & (E >>>= 1)) {
|
|
1817
|
+
case 0:
|
|
1818
|
+
e.mode = 14;
|
|
1819
|
+
break;
|
|
1820
|
+
case 1:
|
|
1821
|
+
if (Z(e), e.mode = 20, R !== 6) break;
|
|
1822
|
+
E >>>= 2, C -= 2;
|
|
1823
|
+
break t;
|
|
1824
|
+
case 2:
|
|
1825
|
+
e.mode = 17;
|
|
1826
|
+
break;
|
|
1827
|
+
case 3:
|
|
1828
|
+
b.msg = "invalid block type", e.mode = 30;
|
|
1829
|
+
}
|
|
1830
|
+
E >>>= 2, C -= 2;
|
|
1831
|
+
break;
|
|
1832
|
+
case 14:
|
|
1833
|
+
for (E >>>= 7 & C, C -= 7 & C; C < 32; ) {
|
|
1834
|
+
if (j === 0) break t;
|
|
1835
|
+
j--, E += D[U++] << C, C += 8;
|
|
1836
|
+
}
|
|
1837
|
+
if ((65535 & E) != (E >>> 16 ^ 65535)) {
|
|
1838
|
+
b.msg = "invalid stored block lengths", e.mode = 30;
|
|
1839
|
+
break;
|
|
1840
|
+
}
|
|
1841
|
+
if (e.length = 65535 & E, C = E = 0, e.mode = 15, R === 6) break t;
|
|
1842
|
+
case 15:
|
|
1843
|
+
e.mode = 16;
|
|
1844
|
+
case 16:
|
|
1845
|
+
if (H = e.length) {
|
|
1846
|
+
if (j < H && (H = j), J < H && (H = J), H === 0) break t;
|
|
1847
|
+
u.arraySet(Q, D, U, H, tt), j -= H, U += H, J -= H, tt += H, e.length -= H;
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
e.mode = 12;
|
|
1851
|
+
break;
|
|
1852
|
+
case 17:
|
|
1853
|
+
for (; C < 14; ) {
|
|
1854
|
+
if (j === 0) break t;
|
|
1855
|
+
j--, E += D[U++] << C, C += 8;
|
|
1856
|
+
}
|
|
1857
|
+
if (e.nlen = 257 + (31 & E), E >>>= 5, C -= 5, e.ndist = 1 + (31 & E), E >>>= 5, C -= 5, e.ncode = 4 + (15 & E), E >>>= 4, C -= 4, 286 < e.nlen || 30 < e.ndist) {
|
|
1858
|
+
b.msg = "too many length or distance symbols", e.mode = 30;
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
e.have = 0, e.mode = 18;
|
|
1862
|
+
case 18:
|
|
1863
|
+
for (; e.have < e.ncode; ) {
|
|
1864
|
+
for (; C < 3; ) {
|
|
1865
|
+
if (j === 0) break t;
|
|
1866
|
+
j--, E += D[U++] << C, C += 8;
|
|
1867
|
+
}
|
|
1868
|
+
e.lens[N[e.have++]] = 7 & E, E >>>= 3, C -= 3;
|
|
1869
|
+
}
|
|
1870
|
+
for (; e.have < 19; ) e.lens[N[e.have++]] = 0;
|
|
1871
|
+
if (e.lencode = e.lendyn, e.lenbits = 7, A = { bits: e.lenbits }, T = _(0, e.lens, 0, 19, e.lencode, 0, e.work, A), e.lenbits = A.bits, T) {
|
|
1872
|
+
b.msg = "invalid code lengths set", e.mode = 30;
|
|
1873
|
+
break;
|
|
1874
|
+
}
|
|
1875
|
+
e.have = 0, e.mode = 19;
|
|
1876
|
+
case 19:
|
|
1877
|
+
for (; e.have < e.nlen + e.ndist; ) {
|
|
1878
|
+
for (; nt = (o = e.lencode[E & (1 << e.lenbits) - 1]) >>> 16 & 255, lt = 65535 & o, !((et = o >>> 24) <= C); ) {
|
|
1879
|
+
if (j === 0) break t;
|
|
1880
|
+
j--, E += D[U++] << C, C += 8;
|
|
1881
|
+
}
|
|
1882
|
+
if (lt < 16) E >>>= et, C -= et, e.lens[e.have++] = lt;
|
|
1883
|
+
else {
|
|
1884
|
+
if (lt === 16) {
|
|
1885
|
+
for (f = et + 2; C < f; ) {
|
|
1886
|
+
if (j === 0) break t;
|
|
1887
|
+
j--, E += D[U++] << C, C += 8;
|
|
1888
|
+
}
|
|
1889
|
+
if (E >>>= et, C -= et, e.have === 0) {
|
|
1890
|
+
b.msg = "invalid bit length repeat", e.mode = 30;
|
|
1891
|
+
break;
|
|
1892
|
+
}
|
|
1893
|
+
t = e.lens[e.have - 1], H = 3 + (3 & E), E >>>= 2, C -= 2;
|
|
1894
|
+
} else if (lt === 17) {
|
|
1895
|
+
for (f = et + 3; C < f; ) {
|
|
1896
|
+
if (j === 0) break t;
|
|
1897
|
+
j--, E += D[U++] << C, C += 8;
|
|
1898
|
+
}
|
|
1899
|
+
C -= et, t = 0, H = 3 + (7 & (E >>>= et)), E >>>= 3, C -= 3;
|
|
1900
|
+
} else {
|
|
1901
|
+
for (f = et + 7; C < f; ) {
|
|
1902
|
+
if (j === 0) break t;
|
|
1903
|
+
j--, E += D[U++] << C, C += 8;
|
|
1904
|
+
}
|
|
1905
|
+
C -= et, t = 0, H = 11 + (127 & (E >>>= et)), E >>>= 7, C -= 7;
|
|
1906
|
+
}
|
|
1907
|
+
if (e.have + H > e.nlen + e.ndist) {
|
|
1908
|
+
b.msg = "invalid bit length repeat", e.mode = 30;
|
|
1909
|
+
break;
|
|
1910
|
+
}
|
|
1911
|
+
for (; H--; ) e.lens[e.have++] = t;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
if (e.mode === 30) break;
|
|
1915
|
+
if (e.lens[256] === 0) {
|
|
1916
|
+
b.msg = "invalid code -- missing end-of-block", e.mode = 30;
|
|
1917
|
+
break;
|
|
1918
|
+
}
|
|
1919
|
+
if (e.lenbits = 9, A = { bits: e.lenbits }, T = _(v, e.lens, 0, e.nlen, e.lencode, 0, e.work, A), e.lenbits = A.bits, T) {
|
|
1920
|
+
b.msg = "invalid literal/lengths set", e.mode = 30;
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
1923
|
+
if (e.distbits = 6, e.distcode = e.distdyn, A = { bits: e.distbits }, T = _(p, e.lens, e.nlen, e.ndist, e.distcode, 0, e.work, A), e.distbits = A.bits, T) {
|
|
1924
|
+
b.msg = "invalid distances set", e.mode = 30;
|
|
1925
|
+
break;
|
|
1926
|
+
}
|
|
1927
|
+
if (e.mode = 20, R === 6) break t;
|
|
1928
|
+
case 20:
|
|
1929
|
+
e.mode = 21;
|
|
1930
|
+
case 21:
|
|
1931
|
+
if (6 <= j && 258 <= J) {
|
|
1932
|
+
b.next_out = tt, b.avail_out = J, b.next_in = U, b.avail_in = j, e.hold = E, e.bits = C, s(b, G), tt = b.next_out, Q = b.output, J = b.avail_out, U = b.next_in, D = b.input, j = b.avail_in, E = e.hold, C = e.bits, e.mode === 12 && (e.back = -1);
|
|
1933
|
+
break;
|
|
1934
|
+
}
|
|
1935
|
+
for (e.back = 0; nt = (o = e.lencode[E & (1 << e.lenbits) - 1]) >>> 16 & 255, lt = 65535 & o, !((et = o >>> 24) <= C); ) {
|
|
1936
|
+
if (j === 0) break t;
|
|
1937
|
+
j--, E += D[U++] << C, C += 8;
|
|
1938
|
+
}
|
|
1939
|
+
if (nt && (240 & nt) == 0) {
|
|
1940
|
+
for (st = et, ct = nt, ft = lt; nt = (o = e.lencode[ft + ((E & (1 << st + ct) - 1) >> st)]) >>> 16 & 255, lt = 65535 & o, !(st + (et = o >>> 24) <= C); ) {
|
|
1941
|
+
if (j === 0) break t;
|
|
1942
|
+
j--, E += D[U++] << C, C += 8;
|
|
1943
|
+
}
|
|
1944
|
+
E >>>= st, C -= st, e.back += st;
|
|
1945
|
+
}
|
|
1946
|
+
if (E >>>= et, C -= et, e.back += et, e.length = lt, nt === 0) {
|
|
1947
|
+
e.mode = 26;
|
|
1948
|
+
break;
|
|
1949
|
+
}
|
|
1950
|
+
if (32 & nt) {
|
|
1951
|
+
e.back = -1, e.mode = 12;
|
|
1952
|
+
break;
|
|
1953
|
+
}
|
|
1954
|
+
if (64 & nt) {
|
|
1955
|
+
b.msg = "invalid literal/length code", e.mode = 30;
|
|
1956
|
+
break;
|
|
1957
|
+
}
|
|
1958
|
+
e.extra = 15 & nt, e.mode = 22;
|
|
1959
|
+
case 22:
|
|
1960
|
+
if (e.extra) {
|
|
1961
|
+
for (f = e.extra; C < f; ) {
|
|
1962
|
+
if (j === 0) break t;
|
|
1963
|
+
j--, E += D[U++] << C, C += 8;
|
|
1964
|
+
}
|
|
1965
|
+
e.length += E & (1 << e.extra) - 1, E >>>= e.extra, C -= e.extra, e.back += e.extra;
|
|
1966
|
+
}
|
|
1967
|
+
e.was = e.length, e.mode = 23;
|
|
1968
|
+
case 23:
|
|
1969
|
+
for (; nt = (o = e.distcode[E & (1 << e.distbits) - 1]) >>> 16 & 255, lt = 65535 & o, !((et = o >>> 24) <= C); ) {
|
|
1970
|
+
if (j === 0) break t;
|
|
1971
|
+
j--, E += D[U++] << C, C += 8;
|
|
1972
|
+
}
|
|
1973
|
+
if ((240 & nt) == 0) {
|
|
1974
|
+
for (st = et, ct = nt, ft = lt; nt = (o = e.distcode[ft + ((E & (1 << st + ct) - 1) >> st)]) >>> 16 & 255, lt = 65535 & o, !(st + (et = o >>> 24) <= C); ) {
|
|
1975
|
+
if (j === 0) break t;
|
|
1976
|
+
j--, E += D[U++] << C, C += 8;
|
|
1977
|
+
}
|
|
1978
|
+
E >>>= st, C -= st, e.back += st;
|
|
1979
|
+
}
|
|
1980
|
+
if (E >>>= et, C -= et, e.back += et, 64 & nt) {
|
|
1981
|
+
b.msg = "invalid distance code", e.mode = 30;
|
|
1982
|
+
break;
|
|
1983
|
+
}
|
|
1984
|
+
e.offset = lt, e.extra = 15 & nt, e.mode = 24;
|
|
1985
|
+
case 24:
|
|
1986
|
+
if (e.extra) {
|
|
1987
|
+
for (f = e.extra; C < f; ) {
|
|
1988
|
+
if (j === 0) break t;
|
|
1989
|
+
j--, E += D[U++] << C, C += 8;
|
|
1990
|
+
}
|
|
1991
|
+
e.offset += E & (1 << e.extra) - 1, E >>>= e.extra, C -= e.extra, e.back += e.extra;
|
|
1992
|
+
}
|
|
1993
|
+
if (e.offset > e.dmax) {
|
|
1994
|
+
b.msg = "invalid distance too far back", e.mode = 30;
|
|
1995
|
+
break;
|
|
1996
|
+
}
|
|
1997
|
+
e.mode = 25;
|
|
1998
|
+
case 25:
|
|
1999
|
+
if (J === 0) break t;
|
|
2000
|
+
if (H = G - J, e.offset > H) {
|
|
2001
|
+
if ((H = e.offset - H) > e.whave && e.sane) {
|
|
2002
|
+
b.msg = "invalid distance too far back", e.mode = 30;
|
|
2003
|
+
break;
|
|
2004
|
+
}
|
|
2005
|
+
at = H > e.wnext ? (H -= e.wnext, e.wsize - H) : e.wnext - H, H > e.length && (H = e.length), ut = e.window;
|
|
2006
|
+
} else ut = Q, at = tt - e.offset, H = e.length;
|
|
2007
|
+
for (J < H && (H = J), J -= H, e.length -= H; Q[tt++] = ut[at++], --H; ) ;
|
|
2008
|
+
e.length === 0 && (e.mode = 21);
|
|
2009
|
+
break;
|
|
2010
|
+
case 26:
|
|
2011
|
+
if (J === 0) break t;
|
|
2012
|
+
Q[tt++] = e.length, J--, e.mode = 21;
|
|
2013
|
+
break;
|
|
2014
|
+
case 27:
|
|
2015
|
+
if (e.wrap) {
|
|
2016
|
+
for (; C < 32; ) {
|
|
2017
|
+
if (j === 0) break t;
|
|
2018
|
+
j--, E |= D[U++] << C, C += 8;
|
|
2019
|
+
}
|
|
2020
|
+
if (G -= J, b.total_out += G, e.total += G, G && (b.adler = e.check = e.flags ? r(e.check, Q, G, tt - G) : l(e.check, Q, G, tt - G)), G = J, (e.flags ? E : a(E)) !== e.check) {
|
|
2021
|
+
b.msg = "incorrect data check", e.mode = 30;
|
|
2022
|
+
break;
|
|
2023
|
+
}
|
|
2024
|
+
C = E = 0;
|
|
2025
|
+
}
|
|
2026
|
+
e.mode = 28;
|
|
2027
|
+
case 28:
|
|
2028
|
+
if (e.wrap && e.flags) {
|
|
2029
|
+
for (; C < 32; ) {
|
|
2030
|
+
if (j === 0) break t;
|
|
2031
|
+
j--, E += D[U++] << C, C += 8;
|
|
2032
|
+
}
|
|
2033
|
+
if (E !== (4294967295 & e.total)) {
|
|
2034
|
+
b.msg = "incorrect length check", e.mode = 30;
|
|
2035
|
+
break;
|
|
2036
|
+
}
|
|
2037
|
+
C = E = 0;
|
|
2038
|
+
}
|
|
2039
|
+
e.mode = 29;
|
|
2040
|
+
case 29:
|
|
2041
|
+
T = 1;
|
|
2042
|
+
break t;
|
|
2043
|
+
case 30:
|
|
2044
|
+
T = -3;
|
|
2045
|
+
break t;
|
|
2046
|
+
case 31:
|
|
2047
|
+
return -4;
|
|
2048
|
+
case 32:
|
|
2049
|
+
default:
|
|
2050
|
+
return i;
|
|
2051
|
+
}
|
|
2052
|
+
return b.next_out = tt, b.avail_out = J, b.next_in = U, b.avail_in = j, e.hold = E, e.bits = C, (e.wsize || G !== b.avail_out && e.mode < 30 && (e.mode < 27 || R !== 4)) && X(b, b.output, b.next_out, G - b.avail_out) ? (e.mode = 31, -4) : (V -= b.avail_in, G -= b.avail_out, b.total_in += V, b.total_out += G, e.total += G, e.wrap && G && (b.adler = e.check = e.flags ? r(e.check, Q, G, b.next_out - G) : l(e.check, Q, G, b.next_out - G)), b.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (V == 0 && G === 0 || R === 4) && T === g && (T = -5), T);
|
|
2053
|
+
}, w.inflateEnd = function(b) {
|
|
2054
|
+
if (!b || !b.state) return i;
|
|
2055
|
+
var R = b.state;
|
|
2056
|
+
return R.window && (R.window = null), b.state = null, g;
|
|
2057
|
+
}, w.inflateGetHeader = function(b, R) {
|
|
2058
|
+
var e;
|
|
2059
|
+
return b && b.state ? (2 & (e = b.state).wrap) == 0 ? i : ((e.head = R).done = !1, g) : i;
|
|
2060
|
+
}, w.inflateSetDictionary = function(b, R) {
|
|
2061
|
+
var e, D = R.length;
|
|
2062
|
+
return b && b.state ? (e = b.state).wrap !== 0 && e.mode !== 11 ? i : e.mode === 11 && l(1, R, D, 0) !== e.check ? -3 : X(b, R, D, D) ? (e.mode = 31, -4) : (e.havedict = 1, g) : i;
|
|
2063
|
+
}, w.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2064
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(m, O, w) {
|
|
2065
|
+
var u = m("../utils/common"), l = [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], s = [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], _ = [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];
|
|
2066
|
+
O.exports = function(v, p, g, i, c, n, h, a) {
|
|
2067
|
+
var d, y, S, x, F, B, L, I, Z, X = a.bits, b = 0, R = 0, e = 0, D = 0, Q = 0, U = 0, tt = 0, j = 0, J = 0, E = 0, C = null, V = 0, G = new u.Buf16(16), H = new u.Buf16(16), at = null, ut = 0;
|
|
2068
|
+
for (b = 0; b <= 15; b++) G[b] = 0;
|
|
2069
|
+
for (R = 0; R < i; R++) G[p[g + R]]++;
|
|
2070
|
+
for (Q = X, D = 15; 1 <= D && G[D] === 0; D--) ;
|
|
2071
|
+
if (D < Q && (Q = D), D === 0) return c[n++] = 20971520, c[n++] = 20971520, a.bits = 1, 0;
|
|
2072
|
+
for (e = 1; e < D && G[e] === 0; e++) ;
|
|
2073
|
+
for (Q < e && (Q = e), b = j = 1; b <= 15; b++) if (j <<= 1, (j -= G[b]) < 0) return -1;
|
|
2074
|
+
if (0 < j && (v === 0 || D !== 1)) return -1;
|
|
2075
|
+
for (H[1] = 0, b = 1; b < 15; b++) H[b + 1] = H[b] + G[b];
|
|
2076
|
+
for (R = 0; R < i; R++) p[g + R] !== 0 && (h[H[p[g + R]]++] = R);
|
|
2077
|
+
if (B = v === 0 ? (C = at = h, 19) : v === 1 ? (C = l, V -= 257, at = r, ut -= 257, 256) : (C = s, at = _, -1), b = e, F = n, tt = R = E = 0, S = -1, x = (J = 1 << (U = Q)) - 1, v === 1 && 852 < J || v === 2 && 592 < J) return 1;
|
|
2078
|
+
for (; ; ) {
|
|
2079
|
+
for (L = b - tt, Z = h[R] < B ? (I = 0, h[R]) : h[R] > B ? (I = at[ut + h[R]], C[V + h[R]]) : (I = 96, 0), d = 1 << b - tt, e = y = 1 << U; c[F + (E >> tt) + (y -= d)] = L << 24 | I << 16 | Z | 0, y !== 0; ) ;
|
|
2080
|
+
for (d = 1 << b - 1; E & d; ) d >>= 1;
|
|
2081
|
+
if (d !== 0 ? (E &= d - 1, E += d) : E = 0, R++, --G[b] == 0) {
|
|
2082
|
+
if (b === D) break;
|
|
2083
|
+
b = p[g + h[R]];
|
|
2084
|
+
}
|
|
2085
|
+
if (Q < b && (E & x) !== S) {
|
|
2086
|
+
for (tt === 0 && (tt = Q), F += e, j = 1 << (U = b - tt); U + tt < D && !((j -= G[U + tt]) <= 0); ) U++, j <<= 1;
|
|
2087
|
+
if (J += 1 << U, v === 1 && 852 < J || v === 2 && 592 < J) return 1;
|
|
2088
|
+
c[S = E & x] = Q << 24 | U << 16 | F - n | 0;
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
return E !== 0 && (c[F + E] = b - tt << 24 | 64 << 16 | 0), a.bits = Q, 0;
|
|
2092
|
+
};
|
|
2093
|
+
}, { "../utils/common": 41 }], 51: [function(m, O, w) {
|
|
2094
|
+
O.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" };
|
|
2095
|
+
}, {}], 52: [function(m, O, w) {
|
|
2096
|
+
var u = m("../utils/common"), l = 0, r = 1;
|
|
2097
|
+
function s(o) {
|
|
2098
|
+
for (var k = o.length; 0 <= --k; ) o[k] = 0;
|
|
2099
|
+
}
|
|
2100
|
+
var _ = 0, v = 29, p = 256, g = p + 1 + v, i = 30, c = 19, n = 2 * g + 1, h = 15, a = 16, d = 7, y = 256, S = 16, x = 17, F = 18, B = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], L = [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], I = [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], X = new Array(2 * (g + 2));
|
|
2101
|
+
s(X);
|
|
2102
|
+
var b = new Array(2 * i);
|
|
2103
|
+
s(b);
|
|
2104
|
+
var R = new Array(512);
|
|
2105
|
+
s(R);
|
|
2106
|
+
var e = new Array(256);
|
|
2107
|
+
s(e);
|
|
2108
|
+
var D = new Array(v);
|
|
2109
|
+
s(D);
|
|
2110
|
+
var Q, U, tt, j = new Array(i);
|
|
2111
|
+
function J(o, k, N, P, z) {
|
|
2112
|
+
this.static_tree = o, this.extra_bits = k, this.extra_base = N, this.elems = P, this.max_length = z, this.has_stree = o && o.length;
|
|
2113
|
+
}
|
|
2114
|
+
function E(o, k) {
|
|
2115
|
+
this.dyn_tree = o, this.max_code = 0, this.stat_desc = k;
|
|
2116
|
+
}
|
|
2117
|
+
function C(o) {
|
|
2118
|
+
return o < 256 ? R[o] : R[256 + (o >>> 7)];
|
|
2119
|
+
}
|
|
2120
|
+
function V(o, k) {
|
|
2121
|
+
o.pending_buf[o.pending++] = 255 & k, o.pending_buf[o.pending++] = k >>> 8 & 255;
|
|
2122
|
+
}
|
|
2123
|
+
function G(o, k, N) {
|
|
2124
|
+
o.bi_valid > a - N ? (o.bi_buf |= k << o.bi_valid & 65535, V(o, o.bi_buf), o.bi_buf = k >> a - o.bi_valid, o.bi_valid += N - a) : (o.bi_buf |= k << o.bi_valid & 65535, o.bi_valid += N);
|
|
2125
|
+
}
|
|
2126
|
+
function H(o, k, N) {
|
|
2127
|
+
G(o, N[2 * k], N[2 * k + 1]);
|
|
2128
|
+
}
|
|
2129
|
+
function at(o, k) {
|
|
2130
|
+
for (var N = 0; N |= 1 & o, o >>>= 1, N <<= 1, 0 < --k; ) ;
|
|
2131
|
+
return N >>> 1;
|
|
2132
|
+
}
|
|
2133
|
+
function ut(o, k, N) {
|
|
2134
|
+
var P, z, W = new Array(h + 1), K = 0;
|
|
2135
|
+
for (P = 1; P <= h; P++) W[P] = K = K + N[P - 1] << 1;
|
|
2136
|
+
for (z = 0; z <= k; z++) {
|
|
2137
|
+
var M = o[2 * z + 1];
|
|
2138
|
+
M !== 0 && (o[2 * z] = at(W[M]++, M));
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
function et(o) {
|
|
2142
|
+
var k;
|
|
2143
|
+
for (k = 0; k < g; k++) o.dyn_ltree[2 * k] = 0;
|
|
2144
|
+
for (k = 0; k < i; k++) o.dyn_dtree[2 * k] = 0;
|
|
2145
|
+
for (k = 0; k < c; k++) o.bl_tree[2 * k] = 0;
|
|
2146
|
+
o.dyn_ltree[2 * y] = 1, o.opt_len = o.static_len = 0, o.last_lit = o.matches = 0;
|
|
2147
|
+
}
|
|
2148
|
+
function nt(o) {
|
|
2149
|
+
8 < o.bi_valid ? V(o, o.bi_buf) : 0 < o.bi_valid && (o.pending_buf[o.pending++] = o.bi_buf), o.bi_buf = 0, o.bi_valid = 0;
|
|
2150
|
+
}
|
|
2151
|
+
function lt(o, k, N, P) {
|
|
2152
|
+
var z = 2 * k, W = 2 * N;
|
|
2153
|
+
return o[z] < o[W] || o[z] === o[W] && P[k] <= P[N];
|
|
2154
|
+
}
|
|
2155
|
+
function st(o, k, N) {
|
|
2156
|
+
for (var P = o.heap[N], z = N << 1; z <= o.heap_len && (z < o.heap_len && lt(k, o.heap[z + 1], o.heap[z], o.depth) && z++, !lt(k, P, o.heap[z], o.depth)); ) o.heap[N] = o.heap[z], N = z, z <<= 1;
|
|
2157
|
+
o.heap[N] = P;
|
|
2158
|
+
}
|
|
2159
|
+
function ct(o, k, N) {
|
|
2160
|
+
var P, z, W, K, M = 0;
|
|
2161
|
+
if (o.last_lit !== 0) for (; P = o.pending_buf[o.d_buf + 2 * M] << 8 | o.pending_buf[o.d_buf + 2 * M + 1], z = o.pending_buf[o.l_buf + M], M++, P === 0 ? H(o, z, k) : (H(o, (W = e[z]) + p + 1, k), (K = B[W]) !== 0 && G(o, z -= D[W], K), H(o, W = C(--P), N), (K = L[W]) !== 0 && G(o, P -= j[W], K)), M < o.last_lit; ) ;
|
|
2162
|
+
H(o, y, k);
|
|
2163
|
+
}
|
|
2164
|
+
function ft(o, k) {
|
|
2165
|
+
var N, P, z, W = k.dyn_tree, K = k.stat_desc.static_tree, M = k.stat_desc.has_stree, Y = k.stat_desc.elems, it = -1;
|
|
2166
|
+
for (o.heap_len = 0, o.heap_max = n, N = 0; N < Y; N++) W[2 * N] !== 0 ? (o.heap[++o.heap_len] = it = N, o.depth[N] = 0) : W[2 * N + 1] = 0;
|
|
2167
|
+
for (; o.heap_len < 2; ) W[2 * (z = o.heap[++o.heap_len] = it < 2 ? ++it : 0)] = 1, o.depth[z] = 0, o.opt_len--, M && (o.static_len -= K[2 * z + 1]);
|
|
2168
|
+
for (k.max_code = it, N = o.heap_len >> 1; 1 <= N; N--) st(o, W, N);
|
|
2169
|
+
for (z = Y; N = o.heap[1], o.heap[1] = o.heap[o.heap_len--], st(o, W, 1), P = o.heap[1], o.heap[--o.heap_max] = N, o.heap[--o.heap_max] = P, W[2 * z] = W[2 * N] + W[2 * P], o.depth[z] = (o.depth[N] >= o.depth[P] ? o.depth[N] : o.depth[P]) + 1, W[2 * N + 1] = W[2 * P + 1] = z, o.heap[1] = z++, st(o, W, 1), 2 <= o.heap_len; ) ;
|
|
2170
|
+
o.heap[--o.heap_max] = o.heap[1], function(rt, ht) {
|
|
2171
|
+
var xt, dt, St, ot, It, Pt, mt = ht.dyn_tree, Mt = ht.max_code, Jt = ht.stat_desc.static_tree, $t = ht.stat_desc.has_stree, Qt = ht.stat_desc.extra_bits, Ht = ht.stat_desc.extra_base, zt = ht.stat_desc.max_length, Ot = 0;
|
|
2172
|
+
for (ot = 0; ot <= h; ot++) rt.bl_count[ot] = 0;
|
|
2173
|
+
for (mt[2 * rt.heap[rt.heap_max] + 1] = 0, xt = rt.heap_max + 1; xt < n; xt++) zt < (ot = mt[2 * mt[2 * (dt = rt.heap[xt]) + 1] + 1] + 1) && (ot = zt, Ot++), mt[2 * dt + 1] = ot, Mt < dt || (rt.bl_count[ot]++, It = 0, Ht <= dt && (It = Qt[dt - Ht]), Pt = mt[2 * dt], rt.opt_len += Pt * (ot + It), $t && (rt.static_len += Pt * (Jt[2 * dt + 1] + It)));
|
|
2174
|
+
if (Ot !== 0) {
|
|
2175
|
+
do {
|
|
2176
|
+
for (ot = zt - 1; rt.bl_count[ot] === 0; ) ot--;
|
|
2177
|
+
rt.bl_count[ot]--, rt.bl_count[ot + 1] += 2, rt.bl_count[zt]--, Ot -= 2;
|
|
2178
|
+
} while (0 < Ot);
|
|
2179
|
+
for (ot = zt; ot !== 0; ot--) for (dt = rt.bl_count[ot]; dt !== 0; ) Mt < (St = rt.heap[--xt]) || (mt[2 * St + 1] !== ot && (rt.opt_len += (ot - mt[2 * St + 1]) * mt[2 * St], mt[2 * St + 1] = ot), dt--);
|
|
2180
|
+
}
|
|
2181
|
+
}(o, k), ut(W, it, o.bl_count);
|
|
2182
|
+
}
|
|
2183
|
+
function t(o, k, N) {
|
|
2184
|
+
var P, z, W = -1, K = k[1], M = 0, Y = 7, it = 4;
|
|
2185
|
+
for (K === 0 && (Y = 138, it = 3), k[2 * (N + 1) + 1] = 65535, P = 0; P <= N; P++) z = K, K = k[2 * (P + 1) + 1], ++M < Y && z === K || (M < it ? o.bl_tree[2 * z] += M : z !== 0 ? (z !== W && o.bl_tree[2 * z]++, o.bl_tree[2 * S]++) : M <= 10 ? o.bl_tree[2 * x]++ : o.bl_tree[2 * F]++, W = z, it = (M = 0) === K ? (Y = 138, 3) : z === K ? (Y = 6, 3) : (Y = 7, 4));
|
|
2186
|
+
}
|
|
2187
|
+
function T(o, k, N) {
|
|
2188
|
+
var P, z, W = -1, K = k[1], M = 0, Y = 7, it = 4;
|
|
2189
|
+
for (K === 0 && (Y = 138, it = 3), P = 0; P <= N; P++) if (z = K, K = k[2 * (P + 1) + 1], !(++M < Y && z === K)) {
|
|
2190
|
+
if (M < it) for (; H(o, z, o.bl_tree), --M != 0; ) ;
|
|
2191
|
+
else z !== 0 ? (z !== W && (H(o, z, o.bl_tree), M--), H(o, S, o.bl_tree), G(o, M - 3, 2)) : M <= 10 ? (H(o, x, o.bl_tree), G(o, M - 3, 3)) : (H(o, F, o.bl_tree), G(o, M - 11, 7));
|
|
2192
|
+
W = z, it = (M = 0) === K ? (Y = 138, 3) : z === K ? (Y = 6, 3) : (Y = 7, 4);
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
s(j);
|
|
2196
|
+
var A = !1;
|
|
2197
|
+
function f(o, k, N, P) {
|
|
2198
|
+
G(o, (_ << 1) + (P ? 1 : 0), 3), function(z, W, K, M) {
|
|
2199
|
+
nt(z), V(z, K), V(z, ~K), u.arraySet(z.pending_buf, z.window, W, K, z.pending), z.pending += K;
|
|
2200
|
+
}(o, k, N);
|
|
2201
|
+
}
|
|
2202
|
+
w._tr_init = function(o) {
|
|
2203
|
+
A || (function() {
|
|
2204
|
+
var k, N, P, z, W, K = new Array(h + 1);
|
|
2205
|
+
for (z = P = 0; z < v - 1; z++) for (D[z] = P, k = 0; k < 1 << B[z]; k++) e[P++] = z;
|
|
2206
|
+
for (e[P - 1] = z, z = W = 0; z < 16; z++) for (j[z] = W, k = 0; k < 1 << L[z]; k++) R[W++] = z;
|
|
2207
|
+
for (W >>= 7; z < i; z++) for (j[z] = W << 7, k = 0; k < 1 << L[z] - 7; k++) R[256 + W++] = z;
|
|
2208
|
+
for (N = 0; N <= h; N++) K[N] = 0;
|
|
2209
|
+
for (k = 0; k <= 143; ) X[2 * k + 1] = 8, k++, K[8]++;
|
|
2210
|
+
for (; k <= 255; ) X[2 * k + 1] = 9, k++, K[9]++;
|
|
2211
|
+
for (; k <= 279; ) X[2 * k + 1] = 7, k++, K[7]++;
|
|
2212
|
+
for (; k <= 287; ) X[2 * k + 1] = 8, k++, K[8]++;
|
|
2213
|
+
for (ut(X, g + 1, K), k = 0; k < i; k++) b[2 * k + 1] = 5, b[2 * k] = at(k, 5);
|
|
2214
|
+
Q = new J(X, B, p + 1, g, h), U = new J(b, L, 0, i, h), tt = new J(new Array(0), I, 0, c, d);
|
|
2215
|
+
}(), A = !0), o.l_desc = new E(o.dyn_ltree, Q), o.d_desc = new E(o.dyn_dtree, U), o.bl_desc = new E(o.bl_tree, tt), o.bi_buf = 0, o.bi_valid = 0, et(o);
|
|
2216
|
+
}, w._tr_stored_block = f, w._tr_flush_block = function(o, k, N, P) {
|
|
2217
|
+
var z, W, K = 0;
|
|
2218
|
+
0 < o.level ? (o.strm.data_type === 2 && (o.strm.data_type = function(M) {
|
|
2219
|
+
var Y, it = 4093624447;
|
|
2220
|
+
for (Y = 0; Y <= 31; Y++, it >>>= 1) if (1 & it && M.dyn_ltree[2 * Y] !== 0) return l;
|
|
2221
|
+
if (M.dyn_ltree[18] !== 0 || M.dyn_ltree[20] !== 0 || M.dyn_ltree[26] !== 0) return r;
|
|
2222
|
+
for (Y = 32; Y < p; Y++) if (M.dyn_ltree[2 * Y] !== 0) return r;
|
|
2223
|
+
return l;
|
|
2224
|
+
}(o)), ft(o, o.l_desc), ft(o, o.d_desc), K = function(M) {
|
|
2225
|
+
var Y;
|
|
2226
|
+
for (t(M, M.dyn_ltree, M.l_desc.max_code), t(M, M.dyn_dtree, M.d_desc.max_code), ft(M, M.bl_desc), Y = c - 1; 3 <= Y && M.bl_tree[2 * Z[Y] + 1] === 0; Y--) ;
|
|
2227
|
+
return M.opt_len += 3 * (Y + 1) + 5 + 5 + 4, Y;
|
|
2228
|
+
}(o), z = o.opt_len + 3 + 7 >>> 3, (W = o.static_len + 3 + 7 >>> 3) <= z && (z = W)) : z = W = N + 5, N + 4 <= z && k !== -1 ? f(o, k, N, P) : o.strategy === 4 || W === z ? (G(o, 2 + (P ? 1 : 0), 3), ct(o, X, b)) : (G(o, 4 + (P ? 1 : 0), 3), function(M, Y, it, rt) {
|
|
2229
|
+
var ht;
|
|
2230
|
+
for (G(M, Y - 257, 5), G(M, it - 1, 5), G(M, rt - 4, 4), ht = 0; ht < rt; ht++) G(M, M.bl_tree[2 * Z[ht] + 1], 3);
|
|
2231
|
+
T(M, M.dyn_ltree, Y - 1), T(M, M.dyn_dtree, it - 1);
|
|
2232
|
+
}(o, o.l_desc.max_code + 1, o.d_desc.max_code + 1, K + 1), ct(o, o.dyn_ltree, o.dyn_dtree)), et(o), P && nt(o);
|
|
2233
|
+
}, w._tr_tally = function(o, k, N) {
|
|
2234
|
+
return o.pending_buf[o.d_buf + 2 * o.last_lit] = k >>> 8 & 255, o.pending_buf[o.d_buf + 2 * o.last_lit + 1] = 255 & k, o.pending_buf[o.l_buf + o.last_lit] = 255 & N, o.last_lit++, k === 0 ? o.dyn_ltree[2 * N]++ : (o.matches++, k--, o.dyn_ltree[2 * (e[N] + p + 1)]++, o.dyn_dtree[2 * C(k)]++), o.last_lit === o.lit_bufsize - 1;
|
|
2235
|
+
}, w._tr_align = function(o) {
|
|
2236
|
+
G(o, 2, 3), H(o, y, X), function(k) {
|
|
2237
|
+
k.bi_valid === 16 ? (V(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);
|
|
2238
|
+
}(o);
|
|
2239
|
+
};
|
|
2240
|
+
}, { "../utils/common": 41 }], 53: [function(m, O, w) {
|
|
2241
|
+
O.exports = function() {
|
|
2242
|
+
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;
|
|
2243
|
+
};
|
|
2244
|
+
}, {}], 54: [function(m, O, w) {
|
|
2245
|
+
(function(u) {
|
|
2246
|
+
(function(l, r) {
|
|
2247
|
+
if (!l.setImmediate) {
|
|
2248
|
+
var s, _, v, p, g = 1, i = {}, c = !1, n = l.document, h = Object.getPrototypeOf && Object.getPrototypeOf(l);
|
|
2249
|
+
h = h && h.setTimeout ? h : l, s = {}.toString.call(l.process) === "[object process]" ? function(S) {
|
|
2250
|
+
process.nextTick(function() {
|
|
2251
|
+
d(S);
|
|
2252
|
+
});
|
|
2253
|
+
} : function() {
|
|
2254
|
+
if (l.postMessage && !l.importScripts) {
|
|
2255
|
+
var S = !0, x = l.onmessage;
|
|
2256
|
+
return l.onmessage = function() {
|
|
2257
|
+
S = !1;
|
|
2258
|
+
}, l.postMessage("", "*"), l.onmessage = x, S;
|
|
2259
|
+
}
|
|
2260
|
+
}() ? (p = "setImmediate$" + Math.random() + "$", l.addEventListener ? l.addEventListener("message", y, !1) : l.attachEvent("onmessage", y), function(S) {
|
|
2261
|
+
l.postMessage(p + S, "*");
|
|
2262
|
+
}) : l.MessageChannel ? ((v = new MessageChannel()).port1.onmessage = function(S) {
|
|
2263
|
+
d(S.data);
|
|
2264
|
+
}, function(S) {
|
|
2265
|
+
v.port2.postMessage(S);
|
|
2266
|
+
}) : n && "onreadystatechange" in n.createElement("script") ? (_ = n.documentElement, function(S) {
|
|
2267
|
+
var x = n.createElement("script");
|
|
2268
|
+
x.onreadystatechange = function() {
|
|
2269
|
+
d(S), x.onreadystatechange = null, _.removeChild(x), x = null;
|
|
2270
|
+
}, _.appendChild(x);
|
|
2271
|
+
}) : function(S) {
|
|
2272
|
+
setTimeout(d, 0, S);
|
|
2273
|
+
}, h.setImmediate = function(S) {
|
|
2274
|
+
typeof S != "function" && (S = new Function("" + S));
|
|
2275
|
+
for (var x = new Array(arguments.length - 1), F = 0; F < x.length; F++) x[F] = arguments[F + 1];
|
|
2276
|
+
var B = { callback: S, args: x };
|
|
2277
|
+
return i[g] = B, s(g), g++;
|
|
2278
|
+
}, h.clearImmediate = a;
|
|
2279
|
+
}
|
|
2280
|
+
function a(S) {
|
|
2281
|
+
delete i[S];
|
|
2282
|
+
}
|
|
2283
|
+
function d(S) {
|
|
2284
|
+
if (c) setTimeout(d, 0, S);
|
|
2285
|
+
else {
|
|
2286
|
+
var x = i[S];
|
|
2287
|
+
if (x) {
|
|
2288
|
+
c = !0;
|
|
2289
|
+
try {
|
|
2290
|
+
(function(F) {
|
|
2291
|
+
var B = F.callback, L = F.args;
|
|
2292
|
+
switch (L.length) {
|
|
2293
|
+
case 0:
|
|
2294
|
+
B();
|
|
2295
|
+
break;
|
|
2296
|
+
case 1:
|
|
2297
|
+
B(L[0]);
|
|
2298
|
+
break;
|
|
2299
|
+
case 2:
|
|
2300
|
+
B(L[0], L[1]);
|
|
2301
|
+
break;
|
|
2302
|
+
case 3:
|
|
2303
|
+
B(L[0], L[1], L[2]);
|
|
2304
|
+
break;
|
|
2305
|
+
default:
|
|
2306
|
+
B.apply(r, L);
|
|
2307
|
+
}
|
|
2308
|
+
})(x);
|
|
2309
|
+
} finally {
|
|
2310
|
+
a(S), c = !1;
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
function y(S) {
|
|
2316
|
+
S.source === l && typeof S.data == "string" && S.data.indexOf(p) === 0 && d(+S.data.slice(p.length));
|
|
2317
|
+
}
|
|
2318
|
+
})(typeof self > "u" ? u === void 0 ? this : u : self);
|
|
2319
|
+
}).call(this, typeof Bt < "u" ? Bt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2320
|
+
}, {}] }, {}, [10])(10);
|
|
2321
|
+
});
|
|
2322
|
+
}(Ut)), Ut.exports;
|
|
2323
|
+
}
|
|
2324
|
+
var ne = re(), ie = /* @__PURE__ */ ee(ne);
|
|
2325
|
+
const ae = 80, se = 4, oe = 25, le = 1e3 / oe, ue = (q) => {
|
|
2326
|
+
if (q === 128) return 4;
|
|
2327
|
+
if (q === 96) return 3;
|
|
2328
|
+
throw new Error(`Unsupported crop size: ${q}. Only nano (96) and tiny (128) are supported.`);
|
|
2329
|
+
}, he = (q, $, m) => {
|
|
2330
|
+
if ($ <= 1) return { nextIndex: 0, nextDirection: 1 };
|
|
2331
|
+
let O = q + m, w = m;
|
|
2332
|
+
return O >= $ ? (O = $ - 2, w = -1) : O < 0 && (O = 1, w = 1), { nextIndex: O, nextDirection: w };
|
|
2333
|
+
};
|
|
2334
|
+
qt.wasm.numThreads = 1;
|
|
2335
|
+
const fe = () => typeof navigator < "u" && !!navigator.gpu, Dt = 32;
|
|
2336
|
+
let vt = null, Ft = null, Ct = null, Xt = null;
|
|
2337
|
+
const gt = {
|
|
2338
|
+
tensors: /* @__PURE__ */ new Map(),
|
|
2339
|
+
faceImages: /* @__PURE__ */ new Map(),
|
|
2340
|
+
fullImages: /* @__PURE__ */ new Map()
|
|
2341
|
+
};
|
|
2342
|
+
let Nt = 3, yt = 96, Kt = 0, Yt = 0, kt = null, Lt = null, bt = null, At = null, _t = null, wt = null, jt = null, Et = null, Wt = !1, Tt = "", pt = null;
|
|
2343
|
+
const Zt = (q) => {
|
|
2344
|
+
self.postMessage({ type: "error", payload: q });
|
|
2345
|
+
}, ce = (q) => {
|
|
2346
|
+
const $ = gt.tensors.get(q);
|
|
2347
|
+
if (!$) throw new Error(`Cache miss: ${q}`);
|
|
2348
|
+
const m = yt - 2 * Nt;
|
|
2349
|
+
return new Vt("float32", $, [1, 6, m, m]);
|
|
2350
|
+
}, de = (q) => {
|
|
2351
|
+
const $ = gt.faceImages.get(q);
|
|
2352
|
+
if (!$) throw new Error(`Cache miss: ${q}`);
|
|
2353
|
+
return $;
|
|
2354
|
+
}, pe = async (q) => {
|
|
2355
|
+
const $ = gt.fullImages.get(q);
|
|
2356
|
+
if (!$) throw new Error(`Cache miss: ${q}`);
|
|
2357
|
+
return await createImageBitmap($);
|
|
2358
|
+
}, me = (q) => {
|
|
2359
|
+
const [$, m, O, w] = q.dims, u = q.data;
|
|
2360
|
+
(!bt || bt.width !== w || bt.height !== O) && (kt.width = w, kt.height = O, bt = Lt.createImageData(w, O));
|
|
2361
|
+
const l = O * w, r = new Uint32Array(bt.data.buffer), s = l, _ = l * 2, v = m === 3;
|
|
2362
|
+
for (let p = 0; p < l; p++) {
|
|
2363
|
+
let g = (v ? u[p + _] : u[p]) * 255, i = (v ? u[p + s] : u[p]) * 255, c = u[p] * 255;
|
|
2364
|
+
g = g < 0 ? 0 : g > 255 ? 255 : g, i = i < 0 ? 0 : i > 255 ? 255 : i, c = c < 0 ? 0 : c > 255 ? 255 : c, r[p] = 255 << 24 | (c & 255) << 16 | (i & 255) << 8 | g & 255;
|
|
2365
|
+
}
|
|
2366
|
+
Lt.putImageData(bt, 0, 0);
|
|
2367
|
+
}, _e = async (q, $, m) => {
|
|
2368
|
+
me(q);
|
|
2369
|
+
const O = de($.face_image);
|
|
2370
|
+
_t.globalCompositeOperation = "source-over", _t.drawImage(O, 0, 0), _t.drawImage(kt, Nt, Nt), _t.globalCompositeOperation = "destination-in", _t.drawImage(Xt, 0, 0, yt, yt), _t.globalCompositeOperation = "destination-over", _t.drawImage(O, 0, 0), _t.globalCompositeOperation = "source-over", jt.drawImage(m, 0, 0);
|
|
2371
|
+
const w = $.crop_info.ymax - $.crop_info.ymin;
|
|
2372
|
+
return jt.drawImage(
|
|
2373
|
+
At,
|
|
2374
|
+
$.crop_info.xmin,
|
|
2375
|
+
$.crop_info.ymin,
|
|
2376
|
+
$.crop_info.width,
|
|
2377
|
+
w
|
|
2378
|
+
), await createImageBitmap(wt);
|
|
2379
|
+
}, ge = (q, $, m) => {
|
|
2380
|
+
const [O, w, u] = $, l = w * u, r = Dt * l;
|
|
2381
|
+
(!Et || Et.length !== r) && (Et = new Float32Array(r));
|
|
2382
|
+
for (let s = 0; s < Dt; s++) {
|
|
2383
|
+
const v = Math.min(
|
|
2384
|
+
Math.max(m - Dt / 2 + s, 0),
|
|
2385
|
+
O - 1
|
|
2386
|
+
) * l, p = s * l;
|
|
2387
|
+
Et.set(
|
|
2388
|
+
q.subarray(v, v + l),
|
|
2389
|
+
p
|
|
2390
|
+
);
|
|
2391
|
+
}
|
|
2392
|
+
return Et;
|
|
2393
|
+
}, be = (q, $, m) => {
|
|
2394
|
+
kt || (kt = new OffscreenCanvas(1, 1), Lt = kt.getContext("2d", {
|
|
2395
|
+
willReadFrequently: !0
|
|
2396
|
+
})), (!At || At.width !== m) && (At = new OffscreenCanvas(m, m), _t = At.getContext("2d", {
|
|
2397
|
+
willReadFrequently: !0
|
|
2398
|
+
})), (!wt || wt.width !== q || wt.height !== $) && (wt = new OffscreenCanvas(q, $), jt = wt.getContext("2d", {
|
|
2399
|
+
willReadFrequently: !0
|
|
2400
|
+
}));
|
|
2401
|
+
}, ve = async (q) => {
|
|
2402
|
+
try {
|
|
2403
|
+
if (q.wasmPaths && (qt.wasm.wasmPaths = q.wasmPaths), !q.dataset) throw new Error("Missing dataset");
|
|
2404
|
+
const $ = q.dataset;
|
|
2405
|
+
Ft = $, yt = $.dataset_info.config.crop_size, Nt = ue(yt), Kt = $.dataset_info.source_image_dimensions?.width || 0, Yt = $.dataset_info.source_image_dimensions?.height || 0, be(Kt, Yt, yt), Ct = await ie.loadAsync(q.zipBuffer), q.zipBuffer = null, Xt = q.blendingMask;
|
|
2406
|
+
const m = $.images.map(async (r) => {
|
|
2407
|
+
if (!gt.tensors.has(r.tensor_file)) {
|
|
2408
|
+
const s = Ct.file(r.tensor_file);
|
|
2409
|
+
if (s) {
|
|
2410
|
+
const _ = await s.async("arraybuffer");
|
|
2411
|
+
gt.tensors.set(r.tensor_file, new Float32Array(_));
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
if (!gt.faceImages.has(r.face_image)) {
|
|
2415
|
+
const s = Ct.file(r.face_image);
|
|
2416
|
+
if (s) {
|
|
2417
|
+
const _ = await s.async("blob"), v = await createImageBitmap(_);
|
|
2418
|
+
gt.faceImages.set(r.face_image, v);
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
if (!gt.fullImages.has(r.full_image)) {
|
|
2422
|
+
const s = Ct.file(r.full_image);
|
|
2423
|
+
if (s) {
|
|
2424
|
+
const _ = await s.async("blob");
|
|
2425
|
+
gt.fullImages.set(r.full_image, _);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
await Promise.all(m), Ct = null;
|
|
2430
|
+
const O = [];
|
|
2431
|
+
fe() && O.push("webgpu"), O.push("wasm");
|
|
2432
|
+
const w = new URL(q.modelPath, self.location.href).toString(), u = new URL(w).pathname.split("/").pop() || "model.onnx", l = new URL(`${u}.data`, w).toString();
|
|
2433
|
+
vt = await te.create(w, {
|
|
2434
|
+
executionProviders: O,
|
|
2435
|
+
graphOptimizationLevel: "all",
|
|
2436
|
+
enableMemPattern: !0,
|
|
2437
|
+
enableCpuMemArena: !0,
|
|
2438
|
+
externalData: [{ data: l, path: `${u}.data` }]
|
|
2439
|
+
}), self.postMessage({ type: "ready" });
|
|
2440
|
+
} catch ($) {
|
|
2441
|
+
Zt($?.message || "Init Error");
|
|
2442
|
+
}
|
|
2443
|
+
}, we = async (q) => {
|
|
2444
|
+
if (!vt || !Ft) {
|
|
2445
|
+
Zt("Not initialized");
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2448
|
+
Wt = !1;
|
|
2449
|
+
const $ = q.audioDimensions[0];
|
|
2450
|
+
self.postMessage({
|
|
2451
|
+
type: "start",
|
|
2452
|
+
payload: { totalFrames: $, frameInterval: le }
|
|
2453
|
+
});
|
|
2454
|
+
let m = 0, O = 1;
|
|
2455
|
+
const w = {}, u = vt.inputNames[0], l = vt.inputNames[1], r = vt.outputNames[0];
|
|
2456
|
+
Tt = "", pt && (pt.close(), pt = null);
|
|
2457
|
+
for (let s = 0; s < $ && !Wt; s++) {
|
|
2458
|
+
let _ = null, v = null, p = null, g = null;
|
|
2459
|
+
try {
|
|
2460
|
+
const i = Ft.images[m];
|
|
2461
|
+
_ = ce(i.tensor_file), i.full_image !== Tt && (pt && pt.close(), pt = await pe(i.full_image), Tt = i.full_image);
|
|
2462
|
+
const c = ge(
|
|
2463
|
+
q.audioFeatures,
|
|
2464
|
+
q.audioDimensions,
|
|
2465
|
+
s
|
|
2466
|
+
);
|
|
2467
|
+
v = new Vt("float32", c, [
|
|
2468
|
+
1,
|
|
2469
|
+
Dt,
|
|
2470
|
+
se,
|
|
2471
|
+
ae
|
|
2472
|
+
]), w[u] = _, w[l] = v, p = await vt.run(w);
|
|
2473
|
+
const n = p[r];
|
|
2474
|
+
if (!n)
|
|
2475
|
+
throw new Error("Missing inference output tensor");
|
|
2476
|
+
g = n;
|
|
2477
|
+
const h = await _e(n, i, pt);
|
|
2478
|
+
self.postMessage(
|
|
2479
|
+
{ type: "frame", payload: { frame: h, index: s } },
|
|
2480
|
+
[h]
|
|
2481
|
+
);
|
|
2482
|
+
const a = he(
|
|
2483
|
+
m,
|
|
2484
|
+
Ft.images.length,
|
|
2485
|
+
O
|
|
2486
|
+
);
|
|
2487
|
+
m = a.nextIndex, O = a.nextDirection;
|
|
2488
|
+
} catch (i) {
|
|
2489
|
+
Zt(i?.message || "Run Error");
|
|
2490
|
+
break;
|
|
2491
|
+
} finally {
|
|
2492
|
+
_ && _.dispose(), v && v.dispose(), g && g.dispose(), _ = null, v = null, g = null, p = null;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
pt && (pt.close(), pt = null), Tt = "", self.postMessage({ type: "done" });
|
|
2496
|
+
};
|
|
2497
|
+
self.onmessage = (q) => {
|
|
2498
|
+
const $ = q.data;
|
|
2499
|
+
$.type === "init" ? ve($) : $.type === "run" ? we($) : $.type === "stop" && (Wt = !0);
|
|
2500
|
+
};
|