@loaders.gl/zip 4.0.0-alpha.4 → 4.0.0-alpha.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.
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/dist.min.js +3467 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/tar/header.d.ts +9 -0
- package/dist/lib/tar/header.d.ts.map +1 -0
- package/dist/lib/tar/header.js.map +1 -1
- package/dist/lib/tar/tar.d.ts +29 -0
- package/dist/lib/tar/tar.d.ts.map +1 -0
- package/dist/lib/tar/types.d.ts +48 -0
- package/dist/lib/tar/types.d.ts.map +1 -0
- package/dist/lib/tar/utils.d.ts +23 -0
- package/dist/lib/tar/utils.d.ts.map +1 -0
- package/dist/tar-builder.d.ts +28 -0
- package/dist/tar-builder.d.ts.map +1 -0
- package/dist/zip-loader.d.ts +18 -0
- package/dist/zip-loader.d.ts.map +1 -0
- package/dist/zip-loader.js +1 -1
- package/dist/zip-writer.d.ts +6 -0
- package/dist/zip-writer.d.ts.map +1 -0
- package/package.json +4 -7
- package/src/lib/tar/header.ts +1 -1
package/dist/dist.min.js
ADDED
|
@@ -0,0 +1,3467 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
9
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
10
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
11
|
+
}) : x)(function(x) {
|
|
12
|
+
if (typeof require !== "undefined")
|
|
13
|
+
return require.apply(this, arguments);
|
|
14
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
15
|
+
});
|
|
16
|
+
var __esm = (fn, res) => function __init() {
|
|
17
|
+
return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res;
|
|
18
|
+
};
|
|
19
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
20
|
+
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
21
|
+
};
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
__markAsModule(target);
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __reExport = (target, module, desc) => {
|
|
28
|
+
if (module && typeof module === "object" || typeof module === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(module))
|
|
30
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
31
|
+
__defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __toModule = (module) => {
|
|
36
|
+
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// ../../node_modules/jszip/dist/jszip.min.js
|
|
40
|
+
var require_jszip_min = __commonJS({
|
|
41
|
+
"../../node_modules/jszip/dist/jszip.min.js"(exports, module) {
|
|
42
|
+
!function(e) {
|
|
43
|
+
if (typeof exports == "object" && typeof module != "undefined")
|
|
44
|
+
module.exports = e();
|
|
45
|
+
else if (typeof define == "function" && define.amd)
|
|
46
|
+
define([], e);
|
|
47
|
+
else {
|
|
48
|
+
(typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this).JSZip = e();
|
|
49
|
+
}
|
|
50
|
+
}(function() {
|
|
51
|
+
return function s(o, a, f) {
|
|
52
|
+
function u(r, e2) {
|
|
53
|
+
if (!a[r]) {
|
|
54
|
+
if (!o[r]) {
|
|
55
|
+
var t = typeof __require == "function" && __require;
|
|
56
|
+
if (!e2 && t)
|
|
57
|
+
return t(r, true);
|
|
58
|
+
if (d)
|
|
59
|
+
return d(r, true);
|
|
60
|
+
var n = new Error("Cannot find module '" + r + "'");
|
|
61
|
+
throw n.code = "MODULE_NOT_FOUND", n;
|
|
62
|
+
}
|
|
63
|
+
var i = a[r] = { exports: {} };
|
|
64
|
+
o[r][0].call(i.exports, function(e3) {
|
|
65
|
+
var t2 = o[r][1][e3];
|
|
66
|
+
return u(t2 || e3);
|
|
67
|
+
}, i, i.exports, s, o, a, f);
|
|
68
|
+
}
|
|
69
|
+
return a[r].exports;
|
|
70
|
+
}
|
|
71
|
+
for (var d = typeof __require == "function" && __require, e = 0; e < f.length; e++)
|
|
72
|
+
u(f[e]);
|
|
73
|
+
return u;
|
|
74
|
+
}({ 1: [function(h, t, n) {
|
|
75
|
+
(function(r) {
|
|
76
|
+
!function(e) {
|
|
77
|
+
typeof n == "object" && t !== void 0 ? t.exports = e() : (typeof window != "undefined" ? window : r !== void 0 ? r : typeof self != "undefined" ? self : this).JSZip = e();
|
|
78
|
+
}(function() {
|
|
79
|
+
return function s(o, a, f) {
|
|
80
|
+
function u(t2, e2) {
|
|
81
|
+
if (!a[t2]) {
|
|
82
|
+
if (!o[t2]) {
|
|
83
|
+
var r2 = typeof h == "function" && h;
|
|
84
|
+
if (!e2 && r2)
|
|
85
|
+
return r2(t2, true);
|
|
86
|
+
if (d)
|
|
87
|
+
return d(t2, true);
|
|
88
|
+
var n2 = new Error("Cannot find module '" + t2 + "'");
|
|
89
|
+
throw n2.code = "MODULE_NOT_FOUND", n2;
|
|
90
|
+
}
|
|
91
|
+
var i = a[t2] = { exports: {} };
|
|
92
|
+
o[t2][0].call(i.exports, function(e3) {
|
|
93
|
+
return u(o[t2][1][e3] || e3);
|
|
94
|
+
}, i, i.exports, s, o, a, f);
|
|
95
|
+
}
|
|
96
|
+
return a[t2].exports;
|
|
97
|
+
}
|
|
98
|
+
for (var d = typeof h == "function" && h, e = 0; e < f.length; e++)
|
|
99
|
+
u(f[e]);
|
|
100
|
+
return u;
|
|
101
|
+
}({ 1: [function(h2, t2, n2) {
|
|
102
|
+
(function(r2) {
|
|
103
|
+
!function(e) {
|
|
104
|
+
typeof n2 == "object" && t2 !== void 0 ? t2.exports = e() : (typeof window != "undefined" ? window : r2 !== void 0 ? r2 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
105
|
+
}(function() {
|
|
106
|
+
return function s(o, a, f) {
|
|
107
|
+
function u(t3, e2) {
|
|
108
|
+
if (!a[t3]) {
|
|
109
|
+
if (!o[t3]) {
|
|
110
|
+
var r3 = typeof h2 == "function" && h2;
|
|
111
|
+
if (!e2 && r3)
|
|
112
|
+
return r3(t3, true);
|
|
113
|
+
if (d)
|
|
114
|
+
return d(t3, true);
|
|
115
|
+
var n3 = new Error("Cannot find module '" + t3 + "'");
|
|
116
|
+
throw n3.code = "MODULE_NOT_FOUND", n3;
|
|
117
|
+
}
|
|
118
|
+
var i = a[t3] = { exports: {} };
|
|
119
|
+
o[t3][0].call(i.exports, function(e3) {
|
|
120
|
+
return u(o[t3][1][e3] || e3);
|
|
121
|
+
}, i, i.exports, s, o, a, f);
|
|
122
|
+
}
|
|
123
|
+
return a[t3].exports;
|
|
124
|
+
}
|
|
125
|
+
for (var d = typeof h2 == "function" && h2, e = 0; e < f.length; e++)
|
|
126
|
+
u(f[e]);
|
|
127
|
+
return u;
|
|
128
|
+
}({ 1: [function(h3, t3, n3) {
|
|
129
|
+
(function(r3) {
|
|
130
|
+
!function(e) {
|
|
131
|
+
typeof n3 == "object" && t3 !== void 0 ? t3.exports = e() : (typeof window != "undefined" ? window : r3 !== void 0 ? r3 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
132
|
+
}(function() {
|
|
133
|
+
return function s(o, a, f) {
|
|
134
|
+
function u(t4, e2) {
|
|
135
|
+
if (!a[t4]) {
|
|
136
|
+
if (!o[t4]) {
|
|
137
|
+
var r4 = typeof h3 == "function" && h3;
|
|
138
|
+
if (!e2 && r4)
|
|
139
|
+
return r4(t4, true);
|
|
140
|
+
if (d)
|
|
141
|
+
return d(t4, true);
|
|
142
|
+
var n4 = new Error("Cannot find module '" + t4 + "'");
|
|
143
|
+
throw n4.code = "MODULE_NOT_FOUND", n4;
|
|
144
|
+
}
|
|
145
|
+
var i = a[t4] = { exports: {} };
|
|
146
|
+
o[t4][0].call(i.exports, function(e3) {
|
|
147
|
+
return u(o[t4][1][e3] || e3);
|
|
148
|
+
}, i, i.exports, s, o, a, f);
|
|
149
|
+
}
|
|
150
|
+
return a[t4].exports;
|
|
151
|
+
}
|
|
152
|
+
for (var d = typeof h3 == "function" && h3, e = 0; e < f.length; e++)
|
|
153
|
+
u(f[e]);
|
|
154
|
+
return u;
|
|
155
|
+
}({ 1: [function(h4, t4, n4) {
|
|
156
|
+
(function(r4) {
|
|
157
|
+
!function(e) {
|
|
158
|
+
typeof n4 == "object" && t4 !== void 0 ? t4.exports = e() : (typeof window != "undefined" ? window : r4 !== void 0 ? r4 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
159
|
+
}(function() {
|
|
160
|
+
return function s(o, a, f) {
|
|
161
|
+
function u(t5, e2) {
|
|
162
|
+
if (!a[t5]) {
|
|
163
|
+
if (!o[t5]) {
|
|
164
|
+
var r5 = typeof h4 == "function" && h4;
|
|
165
|
+
if (!e2 && r5)
|
|
166
|
+
return r5(t5, true);
|
|
167
|
+
if (d)
|
|
168
|
+
return d(t5, true);
|
|
169
|
+
var n5 = new Error("Cannot find module '" + t5 + "'");
|
|
170
|
+
throw n5.code = "MODULE_NOT_FOUND", n5;
|
|
171
|
+
}
|
|
172
|
+
var i = a[t5] = { exports: {} };
|
|
173
|
+
o[t5][0].call(i.exports, function(e3) {
|
|
174
|
+
return u(o[t5][1][e3] || e3);
|
|
175
|
+
}, i, i.exports, s, o, a, f);
|
|
176
|
+
}
|
|
177
|
+
return a[t5].exports;
|
|
178
|
+
}
|
|
179
|
+
for (var d = typeof h4 == "function" && h4, e = 0; e < f.length; e++)
|
|
180
|
+
u(f[e]);
|
|
181
|
+
return u;
|
|
182
|
+
}({ 1: [function(h5, t5, n5) {
|
|
183
|
+
(function(r5) {
|
|
184
|
+
!function(e) {
|
|
185
|
+
typeof n5 == "object" && t5 !== void 0 ? t5.exports = e() : (typeof window != "undefined" ? window : r5 !== void 0 ? r5 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
186
|
+
}(function() {
|
|
187
|
+
return function s(o, a, f) {
|
|
188
|
+
function u(t6, e2) {
|
|
189
|
+
if (!a[t6]) {
|
|
190
|
+
if (!o[t6]) {
|
|
191
|
+
var r6 = typeof h5 == "function" && h5;
|
|
192
|
+
if (!e2 && r6)
|
|
193
|
+
return r6(t6, true);
|
|
194
|
+
if (d)
|
|
195
|
+
return d(t6, true);
|
|
196
|
+
var n6 = new Error("Cannot find module '" + t6 + "'");
|
|
197
|
+
throw n6.code = "MODULE_NOT_FOUND", n6;
|
|
198
|
+
}
|
|
199
|
+
var i = a[t6] = { exports: {} };
|
|
200
|
+
o[t6][0].call(i.exports, function(e3) {
|
|
201
|
+
return u(o[t6][1][e3] || e3);
|
|
202
|
+
}, i, i.exports, s, o, a, f);
|
|
203
|
+
}
|
|
204
|
+
return a[t6].exports;
|
|
205
|
+
}
|
|
206
|
+
for (var d = typeof h5 == "function" && h5, e = 0; e < f.length; e++)
|
|
207
|
+
u(f[e]);
|
|
208
|
+
return u;
|
|
209
|
+
}({ 1: [function(h6, t6, n6) {
|
|
210
|
+
(function(r6) {
|
|
211
|
+
!function(e) {
|
|
212
|
+
typeof n6 == "object" && t6 !== void 0 ? t6.exports = e() : (typeof window != "undefined" ? window : r6 !== void 0 ? r6 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
213
|
+
}(function() {
|
|
214
|
+
return function s(o, a, f) {
|
|
215
|
+
function u(t7, e2) {
|
|
216
|
+
if (!a[t7]) {
|
|
217
|
+
if (!o[t7]) {
|
|
218
|
+
var r7 = typeof h6 == "function" && h6;
|
|
219
|
+
if (!e2 && r7)
|
|
220
|
+
return r7(t7, true);
|
|
221
|
+
if (d)
|
|
222
|
+
return d(t7, true);
|
|
223
|
+
var n7 = new Error("Cannot find module '" + t7 + "'");
|
|
224
|
+
throw n7.code = "MODULE_NOT_FOUND", n7;
|
|
225
|
+
}
|
|
226
|
+
var i = a[t7] = { exports: {} };
|
|
227
|
+
o[t7][0].call(i.exports, function(e3) {
|
|
228
|
+
return u(o[t7][1][e3] || e3);
|
|
229
|
+
}, i, i.exports, s, o, a, f);
|
|
230
|
+
}
|
|
231
|
+
return a[t7].exports;
|
|
232
|
+
}
|
|
233
|
+
for (var d = typeof h6 == "function" && h6, e = 0; e < f.length; e++)
|
|
234
|
+
u(f[e]);
|
|
235
|
+
return u;
|
|
236
|
+
}({ 1: [function(h7, t7, n7) {
|
|
237
|
+
(function(r7) {
|
|
238
|
+
!function(e) {
|
|
239
|
+
typeof n7 == "object" && t7 !== void 0 ? t7.exports = e() : (typeof window != "undefined" ? window : r7 !== void 0 ? r7 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
240
|
+
}(function() {
|
|
241
|
+
return function s(o, a, f) {
|
|
242
|
+
function u(t8, e2) {
|
|
243
|
+
if (!a[t8]) {
|
|
244
|
+
if (!o[t8]) {
|
|
245
|
+
var r8 = typeof h7 == "function" && h7;
|
|
246
|
+
if (!e2 && r8)
|
|
247
|
+
return r8(t8, true);
|
|
248
|
+
if (d)
|
|
249
|
+
return d(t8, true);
|
|
250
|
+
var n8 = new Error("Cannot find module '" + t8 + "'");
|
|
251
|
+
throw n8.code = "MODULE_NOT_FOUND", n8;
|
|
252
|
+
}
|
|
253
|
+
var i = a[t8] = { exports: {} };
|
|
254
|
+
o[t8][0].call(i.exports, function(e3) {
|
|
255
|
+
return u(o[t8][1][e3] || e3);
|
|
256
|
+
}, i, i.exports, s, o, a, f);
|
|
257
|
+
}
|
|
258
|
+
return a[t8].exports;
|
|
259
|
+
}
|
|
260
|
+
for (var d = typeof h7 == "function" && h7, e = 0; e < f.length; e++)
|
|
261
|
+
u(f[e]);
|
|
262
|
+
return u;
|
|
263
|
+
}({ 1: [function(h8, t8, n8) {
|
|
264
|
+
(function(r8) {
|
|
265
|
+
!function(e) {
|
|
266
|
+
typeof n8 == "object" && t8 !== void 0 ? t8.exports = e() : (typeof window != "undefined" ? window : r8 !== void 0 ? r8 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
267
|
+
}(function() {
|
|
268
|
+
return function s(o, a, f) {
|
|
269
|
+
function u(t9, e2) {
|
|
270
|
+
if (!a[t9]) {
|
|
271
|
+
if (!o[t9]) {
|
|
272
|
+
var r9 = typeof h8 == "function" && h8;
|
|
273
|
+
if (!e2 && r9)
|
|
274
|
+
return r9(t9, true);
|
|
275
|
+
if (d)
|
|
276
|
+
return d(t9, true);
|
|
277
|
+
var n9 = new Error("Cannot find module '" + t9 + "'");
|
|
278
|
+
throw n9.code = "MODULE_NOT_FOUND", n9;
|
|
279
|
+
}
|
|
280
|
+
var i = a[t9] = { exports: {} };
|
|
281
|
+
o[t9][0].call(i.exports, function(e3) {
|
|
282
|
+
return u(o[t9][1][e3] || e3);
|
|
283
|
+
}, i, i.exports, s, o, a, f);
|
|
284
|
+
}
|
|
285
|
+
return a[t9].exports;
|
|
286
|
+
}
|
|
287
|
+
for (var d = typeof h8 == "function" && h8, e = 0; e < f.length; e++)
|
|
288
|
+
u(f[e]);
|
|
289
|
+
return u;
|
|
290
|
+
}({ 1: [function(h9, t9, n9) {
|
|
291
|
+
(function(r9) {
|
|
292
|
+
!function(e) {
|
|
293
|
+
typeof n9 == "object" && t9 !== void 0 ? t9.exports = e() : (typeof window != "undefined" ? window : r9 !== void 0 ? r9 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
294
|
+
}(function() {
|
|
295
|
+
return function s(o, a, f) {
|
|
296
|
+
function u(t10, e2) {
|
|
297
|
+
if (!a[t10]) {
|
|
298
|
+
if (!o[t10]) {
|
|
299
|
+
var r10 = typeof h9 == "function" && h9;
|
|
300
|
+
if (!e2 && r10)
|
|
301
|
+
return r10(t10, true);
|
|
302
|
+
if (d)
|
|
303
|
+
return d(t10, true);
|
|
304
|
+
var n10 = new Error("Cannot find module '" + t10 + "'");
|
|
305
|
+
throw n10.code = "MODULE_NOT_FOUND", n10;
|
|
306
|
+
}
|
|
307
|
+
var i = a[t10] = { exports: {} };
|
|
308
|
+
o[t10][0].call(i.exports, function(e3) {
|
|
309
|
+
return u(o[t10][1][e3] || e3);
|
|
310
|
+
}, i, i.exports, s, o, a, f);
|
|
311
|
+
}
|
|
312
|
+
return a[t10].exports;
|
|
313
|
+
}
|
|
314
|
+
for (var d = typeof h9 == "function" && h9, e = 0; e < f.length; e++)
|
|
315
|
+
u(f[e]);
|
|
316
|
+
return u;
|
|
317
|
+
}({ 1: [function(h10, t10, n10) {
|
|
318
|
+
(function(r10) {
|
|
319
|
+
!function(e) {
|
|
320
|
+
typeof n10 == "object" && t10 !== void 0 ? t10.exports = e() : (typeof window != "undefined" ? window : r10 !== void 0 ? r10 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
321
|
+
}(function() {
|
|
322
|
+
return function s(o, a, f) {
|
|
323
|
+
function u(t11, e2) {
|
|
324
|
+
if (!a[t11]) {
|
|
325
|
+
if (!o[t11]) {
|
|
326
|
+
var r11 = typeof h10 == "function" && h10;
|
|
327
|
+
if (!e2 && r11)
|
|
328
|
+
return r11(t11, true);
|
|
329
|
+
if (d)
|
|
330
|
+
return d(t11, true);
|
|
331
|
+
var n11 = new Error("Cannot find module '" + t11 + "'");
|
|
332
|
+
throw n11.code = "MODULE_NOT_FOUND", n11;
|
|
333
|
+
}
|
|
334
|
+
var i = a[t11] = { exports: {} };
|
|
335
|
+
o[t11][0].call(i.exports, function(e3) {
|
|
336
|
+
return u(o[t11][1][e3] || e3);
|
|
337
|
+
}, i, i.exports, s, o, a, f);
|
|
338
|
+
}
|
|
339
|
+
return a[t11].exports;
|
|
340
|
+
}
|
|
341
|
+
for (var d = typeof h10 == "function" && h10, e = 0; e < f.length; e++)
|
|
342
|
+
u(f[e]);
|
|
343
|
+
return u;
|
|
344
|
+
}({ 1: [function(h11, t11, n11) {
|
|
345
|
+
(function(r11) {
|
|
346
|
+
!function(e) {
|
|
347
|
+
typeof n11 == "object" && t11 !== void 0 ? t11.exports = e() : (typeof window != "undefined" ? window : r11 !== void 0 ? r11 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
348
|
+
}(function() {
|
|
349
|
+
return function s(o, a, f) {
|
|
350
|
+
function u(t12, e2) {
|
|
351
|
+
if (!a[t12]) {
|
|
352
|
+
if (!o[t12]) {
|
|
353
|
+
var r12 = typeof h11 == "function" && h11;
|
|
354
|
+
if (!e2 && r12)
|
|
355
|
+
return r12(t12, true);
|
|
356
|
+
if (d)
|
|
357
|
+
return d(t12, true);
|
|
358
|
+
var n12 = new Error("Cannot find module '" + t12 + "'");
|
|
359
|
+
throw n12.code = "MODULE_NOT_FOUND", n12;
|
|
360
|
+
}
|
|
361
|
+
var i = a[t12] = { exports: {} };
|
|
362
|
+
o[t12][0].call(i.exports, function(e3) {
|
|
363
|
+
return u(o[t12][1][e3] || e3);
|
|
364
|
+
}, i, i.exports, s, o, a, f);
|
|
365
|
+
}
|
|
366
|
+
return a[t12].exports;
|
|
367
|
+
}
|
|
368
|
+
for (var d = typeof h11 == "function" && h11, e = 0; e < f.length; e++)
|
|
369
|
+
u(f[e]);
|
|
370
|
+
return u;
|
|
371
|
+
}({ 1: [function(h12, t12, n12) {
|
|
372
|
+
(function(r12) {
|
|
373
|
+
!function(e) {
|
|
374
|
+
typeof n12 == "object" && t12 !== void 0 ? t12.exports = e() : (typeof window != "undefined" ? window : r12 !== void 0 ? r12 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
375
|
+
}(function() {
|
|
376
|
+
return function s(o, a, f) {
|
|
377
|
+
function u(t13, e2) {
|
|
378
|
+
if (!a[t13]) {
|
|
379
|
+
if (!o[t13]) {
|
|
380
|
+
var r13 = typeof h12 == "function" && h12;
|
|
381
|
+
if (!e2 && r13)
|
|
382
|
+
return r13(t13, true);
|
|
383
|
+
if (d)
|
|
384
|
+
return d(t13, true);
|
|
385
|
+
var n13 = new Error("Cannot find module '" + t13 + "'");
|
|
386
|
+
throw n13.code = "MODULE_NOT_FOUND", n13;
|
|
387
|
+
}
|
|
388
|
+
var i = a[t13] = { exports: {} };
|
|
389
|
+
o[t13][0].call(i.exports, function(e3) {
|
|
390
|
+
return u(o[t13][1][e3] || e3);
|
|
391
|
+
}, i, i.exports, s, o, a, f);
|
|
392
|
+
}
|
|
393
|
+
return a[t13].exports;
|
|
394
|
+
}
|
|
395
|
+
for (var d = typeof h12 == "function" && h12, e = 0; e < f.length; e++)
|
|
396
|
+
u(f[e]);
|
|
397
|
+
return u;
|
|
398
|
+
}({ 1: [function(h13, t13, n13) {
|
|
399
|
+
(function(r13) {
|
|
400
|
+
!function(e) {
|
|
401
|
+
typeof n13 == "object" && t13 !== void 0 ? t13.exports = e() : (typeof window != "undefined" ? window : r13 !== void 0 ? r13 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
402
|
+
}(function() {
|
|
403
|
+
return function s(o, a, f) {
|
|
404
|
+
function u(t14, e2) {
|
|
405
|
+
if (!a[t14]) {
|
|
406
|
+
if (!o[t14]) {
|
|
407
|
+
var r14 = typeof h13 == "function" && h13;
|
|
408
|
+
if (!e2 && r14)
|
|
409
|
+
return r14(t14, true);
|
|
410
|
+
if (d)
|
|
411
|
+
return d(t14, true);
|
|
412
|
+
var n14 = new Error("Cannot find module '" + t14 + "'");
|
|
413
|
+
throw n14.code = "MODULE_NOT_FOUND", n14;
|
|
414
|
+
}
|
|
415
|
+
var i = a[t14] = { exports: {} };
|
|
416
|
+
o[t14][0].call(i.exports, function(e3) {
|
|
417
|
+
return u(o[t14][1][e3] || e3);
|
|
418
|
+
}, i, i.exports, s, o, a, f);
|
|
419
|
+
}
|
|
420
|
+
return a[t14].exports;
|
|
421
|
+
}
|
|
422
|
+
for (var d = typeof h13 == "function" && h13, e = 0; e < f.length; e++)
|
|
423
|
+
u(f[e]);
|
|
424
|
+
return u;
|
|
425
|
+
}({ 1: [function(h14, t14, n14) {
|
|
426
|
+
(function(r14) {
|
|
427
|
+
!function(e) {
|
|
428
|
+
typeof n14 == "object" && t14 !== void 0 ? t14.exports = e() : (typeof window != "undefined" ? window : r14 !== void 0 ? r14 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
429
|
+
}(function() {
|
|
430
|
+
return function s(o, a, f) {
|
|
431
|
+
function u(t15, e2) {
|
|
432
|
+
if (!a[t15]) {
|
|
433
|
+
if (!o[t15]) {
|
|
434
|
+
var r15 = typeof h14 == "function" && h14;
|
|
435
|
+
if (!e2 && r15)
|
|
436
|
+
return r15(t15, true);
|
|
437
|
+
if (d)
|
|
438
|
+
return d(t15, true);
|
|
439
|
+
var n15 = new Error("Cannot find module '" + t15 + "'");
|
|
440
|
+
throw n15.code = "MODULE_NOT_FOUND", n15;
|
|
441
|
+
}
|
|
442
|
+
var i = a[t15] = { exports: {} };
|
|
443
|
+
o[t15][0].call(i.exports, function(e3) {
|
|
444
|
+
return u(o[t15][1][e3] || e3);
|
|
445
|
+
}, i, i.exports, s, o, a, f);
|
|
446
|
+
}
|
|
447
|
+
return a[t15].exports;
|
|
448
|
+
}
|
|
449
|
+
for (var d = typeof h14 == "function" && h14, e = 0; e < f.length; e++)
|
|
450
|
+
u(f[e]);
|
|
451
|
+
return u;
|
|
452
|
+
}({ 1: [function(h15, t15, n15) {
|
|
453
|
+
(function(r15) {
|
|
454
|
+
!function(e) {
|
|
455
|
+
typeof n15 == "object" && t15 !== void 0 ? t15.exports = e() : (typeof window != "undefined" ? window : r15 !== void 0 ? r15 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
456
|
+
}(function() {
|
|
457
|
+
return function s(o, a, f) {
|
|
458
|
+
function u(t16, e2) {
|
|
459
|
+
if (!a[t16]) {
|
|
460
|
+
if (!o[t16]) {
|
|
461
|
+
var r16 = typeof h15 == "function" && h15;
|
|
462
|
+
if (!e2 && r16)
|
|
463
|
+
return r16(t16, true);
|
|
464
|
+
if (d)
|
|
465
|
+
return d(t16, true);
|
|
466
|
+
var n16 = new Error("Cannot find module '" + t16 + "'");
|
|
467
|
+
throw n16.code = "MODULE_NOT_FOUND", n16;
|
|
468
|
+
}
|
|
469
|
+
var i = a[t16] = { exports: {} };
|
|
470
|
+
o[t16][0].call(i.exports, function(e3) {
|
|
471
|
+
return u(o[t16][1][e3] || e3);
|
|
472
|
+
}, i, i.exports, s, o, a, f);
|
|
473
|
+
}
|
|
474
|
+
return a[t16].exports;
|
|
475
|
+
}
|
|
476
|
+
for (var d = typeof h15 == "function" && h15, e = 0; e < f.length; e++)
|
|
477
|
+
u(f[e]);
|
|
478
|
+
return u;
|
|
479
|
+
}({ 1: [function(h16, t16, n16) {
|
|
480
|
+
(function(r16) {
|
|
481
|
+
!function(e) {
|
|
482
|
+
typeof n16 == "object" && t16 !== void 0 ? t16.exports = e() : (typeof window != "undefined" ? window : r16 !== void 0 ? r16 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
483
|
+
}(function() {
|
|
484
|
+
return function s(o, a, f) {
|
|
485
|
+
function u(t17, e2) {
|
|
486
|
+
if (!a[t17]) {
|
|
487
|
+
if (!o[t17]) {
|
|
488
|
+
var r17 = typeof h16 == "function" && h16;
|
|
489
|
+
if (!e2 && r17)
|
|
490
|
+
return r17(t17, true);
|
|
491
|
+
if (d)
|
|
492
|
+
return d(t17, true);
|
|
493
|
+
var n17 = new Error("Cannot find module '" + t17 + "'");
|
|
494
|
+
throw n17.code = "MODULE_NOT_FOUND", n17;
|
|
495
|
+
}
|
|
496
|
+
var i = a[t17] = { exports: {} };
|
|
497
|
+
o[t17][0].call(i.exports, function(e3) {
|
|
498
|
+
return u(o[t17][1][e3] || e3);
|
|
499
|
+
}, i, i.exports, s, o, a, f);
|
|
500
|
+
}
|
|
501
|
+
return a[t17].exports;
|
|
502
|
+
}
|
|
503
|
+
for (var d = typeof h16 == "function" && h16, e = 0; e < f.length; e++)
|
|
504
|
+
u(f[e]);
|
|
505
|
+
return u;
|
|
506
|
+
}({ 1: [function(h17, t17, n17) {
|
|
507
|
+
(function(r17) {
|
|
508
|
+
!function(e) {
|
|
509
|
+
typeof n17 == "object" && t17 !== void 0 ? t17.exports = e() : (typeof window != "undefined" ? window : r17 !== void 0 ? r17 : typeof self != "undefined" ? self : this).JSZip = e();
|
|
510
|
+
}(function() {
|
|
511
|
+
return function s(o, a, f) {
|
|
512
|
+
function u(t18, e2) {
|
|
513
|
+
if (!a[t18]) {
|
|
514
|
+
if (!o[t18]) {
|
|
515
|
+
var r18 = typeof h17 == "function" && h17;
|
|
516
|
+
if (!e2 && r18)
|
|
517
|
+
return r18(t18, true);
|
|
518
|
+
if (d)
|
|
519
|
+
return d(t18, true);
|
|
520
|
+
var n18 = new Error("Cannot find module '" + t18 + "'");
|
|
521
|
+
throw n18.code = "MODULE_NOT_FOUND", n18;
|
|
522
|
+
}
|
|
523
|
+
var i = a[t18] = { exports: {} };
|
|
524
|
+
o[t18][0].call(i.exports, function(e3) {
|
|
525
|
+
return u(o[t18][1][e3] || e3);
|
|
526
|
+
}, i, i.exports, s, o, a, f);
|
|
527
|
+
}
|
|
528
|
+
return a[t18].exports;
|
|
529
|
+
}
|
|
530
|
+
for (var d = typeof h17 == "function" && h17, e = 0; e < f.length; e++)
|
|
531
|
+
u(f[e]);
|
|
532
|
+
return u;
|
|
533
|
+
}({ 1: [function(e, t18, r18) {
|
|
534
|
+
"use strict";
|
|
535
|
+
var c = e("./utils"), h18 = e("./support"), p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
536
|
+
r18.encode = function(e2) {
|
|
537
|
+
for (var t19, r19, n18, i, s, o, a, f = [], u = 0, d = e2.length, h19 = d, l = c.getTypeOf(e2) !== "string"; u < e2.length; )
|
|
538
|
+
h19 = d - u, n18 = l ? (t19 = e2[u++], r19 = u < d ? e2[u++] : 0, u < d ? e2[u++] : 0) : (t19 = e2.charCodeAt(u++), r19 = u < d ? e2.charCodeAt(u++) : 0, u < d ? e2.charCodeAt(u++) : 0), i = t19 >> 2, s = (3 & t19) << 4 | r19 >> 4, o = 1 < h19 ? (15 & r19) << 2 | n18 >> 6 : 64, a = 2 < h19 ? 63 & n18 : 64, f.push(p.charAt(i) + p.charAt(s) + p.charAt(o) + p.charAt(a));
|
|
539
|
+
return f.join("");
|
|
540
|
+
}, r18.decode = function(e2) {
|
|
541
|
+
var t19, r19, n18, i, s, o, a = 0, f = 0;
|
|
542
|
+
if (e2.substr(0, "data:".length) === "data:")
|
|
543
|
+
throw new Error("Invalid base64 input, it looks like a data url.");
|
|
544
|
+
var u, d = 3 * (e2 = e2.replace(/[^A-Za-z0-9\+\/\=]/g, "")).length / 4;
|
|
545
|
+
if (e2.charAt(e2.length - 1) === p.charAt(64) && d--, e2.charAt(e2.length - 2) === p.charAt(64) && d--, d % 1 != 0)
|
|
546
|
+
throw new Error("Invalid base64 input, bad content length.");
|
|
547
|
+
for (u = h18.uint8array ? new Uint8Array(0 | d) : new Array(0 | d); a < e2.length; )
|
|
548
|
+
t19 = p.indexOf(e2.charAt(a++)) << 2 | (i = p.indexOf(e2.charAt(a++))) >> 4, r19 = (15 & i) << 4 | (s = p.indexOf(e2.charAt(a++))) >> 2, n18 = (3 & s) << 6 | (o = p.indexOf(e2.charAt(a++))), u[f++] = t19, s !== 64 && (u[f++] = r19), o !== 64 && (u[f++] = n18);
|
|
549
|
+
return u;
|
|
550
|
+
};
|
|
551
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(e, t18, r18) {
|
|
552
|
+
"use strict";
|
|
553
|
+
var n18 = e("./external"), i = e("./stream/DataWorker"), s = e("./stream/Crc32Probe"), o = e("./stream/DataLengthProbe");
|
|
554
|
+
function a(e2, t19, r19, n19, i2) {
|
|
555
|
+
this.compressedSize = e2, this.uncompressedSize = t19, this.crc32 = r19, this.compression = n19, this.compressedContent = i2;
|
|
556
|
+
}
|
|
557
|
+
a.prototype = { getContentWorker: function() {
|
|
558
|
+
var e2 = new i(n18.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")), t19 = this;
|
|
559
|
+
return e2.on("end", function() {
|
|
560
|
+
if (this.streamInfo.data_length !== t19.uncompressedSize)
|
|
561
|
+
throw new Error("Bug : uncompressed data size mismatch");
|
|
562
|
+
}), e2;
|
|
563
|
+
}, getCompressedWorker: function() {
|
|
564
|
+
return new i(n18.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
565
|
+
} }, a.createWorkerFrom = function(e2, t19, r19) {
|
|
566
|
+
return e2.pipe(new s()).pipe(new o("uncompressedSize")).pipe(t19.compressWorker(r19)).pipe(new o("compressedSize")).withStreamInfo("compression", t19);
|
|
567
|
+
}, t18.exports = a;
|
|
568
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e, t18, r18) {
|
|
569
|
+
"use strict";
|
|
570
|
+
var n18 = e("./stream/GenericWorker");
|
|
571
|
+
r18.STORE = { magic: "\0\0", compressWorker: function(e2) {
|
|
572
|
+
return new n18("STORE compression");
|
|
573
|
+
}, uncompressWorker: function() {
|
|
574
|
+
return new n18("STORE decompression");
|
|
575
|
+
} }, r18.DEFLATE = e("./flate");
|
|
576
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e, t18, r18) {
|
|
577
|
+
"use strict";
|
|
578
|
+
var n18 = e("./utils"), o = function() {
|
|
579
|
+
for (var e2, t19 = [], r19 = 0; r19 < 256; r19++) {
|
|
580
|
+
e2 = r19;
|
|
581
|
+
for (var n19 = 0; n19 < 8; n19++)
|
|
582
|
+
e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
|
|
583
|
+
t19[r19] = e2;
|
|
584
|
+
}
|
|
585
|
+
return t19;
|
|
586
|
+
}();
|
|
587
|
+
t18.exports = function(e2, t19) {
|
|
588
|
+
return e2 !== void 0 && e2.length ? n18.getTypeOf(e2) !== "string" ? function(e3, t20, r19) {
|
|
589
|
+
var n19 = o, i = 0 + r19;
|
|
590
|
+
e3 ^= -1;
|
|
591
|
+
for (var s = 0; s < i; s++)
|
|
592
|
+
e3 = e3 >>> 8 ^ n19[255 & (e3 ^ t20[s])];
|
|
593
|
+
return -1 ^ e3;
|
|
594
|
+
}(0 | t19, e2, e2.length) : function(e3, t20, r19) {
|
|
595
|
+
var n19 = o, i = 0 + r19;
|
|
596
|
+
e3 ^= -1;
|
|
597
|
+
for (var s = 0; s < i; s++)
|
|
598
|
+
e3 = e3 >>> 8 ^ n19[255 & (e3 ^ t20.charCodeAt(s))];
|
|
599
|
+
return -1 ^ e3;
|
|
600
|
+
}(0 | t19, e2, e2.length) : 0;
|
|
601
|
+
};
|
|
602
|
+
}, { "./utils": 32 }], 5: [function(e, t18, r18) {
|
|
603
|
+
"use strict";
|
|
604
|
+
r18.base64 = false, r18.binary = false, r18.dir = false, r18.createFolders = true, r18.date = null, r18.compression = null, r18.compressionOptions = null, r18.comment = null, r18.unixPermissions = null, r18.dosPermissions = null;
|
|
605
|
+
}, {}], 6: [function(e, t18, r18) {
|
|
606
|
+
"use strict";
|
|
607
|
+
var n18;
|
|
608
|
+
n18 = typeof Promise != "undefined" ? Promise : e("lie"), t18.exports = { Promise: n18 };
|
|
609
|
+
}, { lie: 37 }], 7: [function(e, t18, r18) {
|
|
610
|
+
"use strict";
|
|
611
|
+
var n18 = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Uint32Array != "undefined", i = e("pako"), s = e("./utils"), o = e("./stream/GenericWorker"), a = n18 ? "uint8array" : "array";
|
|
612
|
+
function f(e2, t19) {
|
|
613
|
+
o.call(this, "FlateWorker/" + e2), this._pako = null, this._pakoAction = e2, this._pakoOptions = t19, this.meta = {};
|
|
614
|
+
}
|
|
615
|
+
r18.magic = "\b\0", s.inherits(f, o), f.prototype.processChunk = function(e2) {
|
|
616
|
+
this.meta = e2.meta, this._pako === null && this._createPako(), this._pako.push(s.transformTo(a, e2.data), false);
|
|
617
|
+
}, f.prototype.flush = function() {
|
|
618
|
+
o.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], true);
|
|
619
|
+
}, f.prototype.cleanUp = function() {
|
|
620
|
+
o.prototype.cleanUp.call(this), this._pako = null;
|
|
621
|
+
}, f.prototype._createPako = function() {
|
|
622
|
+
this._pako = new i[this._pakoAction]({ raw: true, level: this._pakoOptions.level || -1 });
|
|
623
|
+
var t19 = this;
|
|
624
|
+
this._pako.onData = function(e2) {
|
|
625
|
+
t19.push({ data: e2, meta: t19.meta });
|
|
626
|
+
};
|
|
627
|
+
}, r18.compressWorker = function(e2) {
|
|
628
|
+
return new f("Deflate", e2);
|
|
629
|
+
}, r18.uncompressWorker = function() {
|
|
630
|
+
return new f("Inflate", {});
|
|
631
|
+
};
|
|
632
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e, t18, r18) {
|
|
633
|
+
"use strict";
|
|
634
|
+
function O(e2, t19) {
|
|
635
|
+
var r19, n19 = "";
|
|
636
|
+
for (r19 = 0; r19 < t19; r19++)
|
|
637
|
+
n19 += String.fromCharCode(255 & e2), e2 >>>= 8;
|
|
638
|
+
return n19;
|
|
639
|
+
}
|
|
640
|
+
function i(e2, t19, r19, n19, i2, s2) {
|
|
641
|
+
var o, a, f = e2.file, u = e2.compression, d = s2 !== D.utf8encode, h18 = I.transformTo("string", s2(f.name)), l = I.transformTo("string", D.utf8encode(f.name)), c = f.comment, p = I.transformTo("string", s2(c)), m = I.transformTo("string", D.utf8encode(c)), _ = l.length !== f.name.length, w = m.length !== c.length, v = "", g = "", y = "", b = f.dir, k = f.date, x = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
642
|
+
t19 && !r19 || (x.crc32 = e2.crc32, x.compressedSize = e2.compressedSize, x.uncompressedSize = e2.uncompressedSize);
|
|
643
|
+
var S = 0;
|
|
644
|
+
t19 && (S |= 8), d || !_ && !w || (S |= 2048);
|
|
645
|
+
var E, z = 0, C = 0;
|
|
646
|
+
b && (z |= 16), i2 === "UNIX" ? (C = 798, z |= ((E = f.unixPermissions) || (E = b ? 16893 : 33204), (65535 & E) << 16)) : (C = 20, z |= 63 & (f.dosPermissions || 0)), o = k.getUTCHours(), o <<= 6, o |= k.getUTCMinutes(), o <<= 5, o |= k.getUTCSeconds() / 2, a = k.getUTCFullYear() - 1980, a <<= 4, a |= k.getUTCMonth() + 1, a <<= 5, a |= k.getUTCDate(), _ && (v += "up" + O((g = O(1, 1) + O(B(h18), 4) + l).length, 2) + g), w && (v += "uc" + O((y = O(1, 1) + O(B(p), 4) + m).length, 2) + y);
|
|
647
|
+
var A = "";
|
|
648
|
+
return A += "\n\0", A += O(S, 2), A += u.magic, A += O(o, 2), A += O(a, 2), A += O(x.crc32, 4), A += O(x.compressedSize, 4), A += O(x.uncompressedSize, 4), A += O(h18.length, 2), A += O(v.length, 2), { fileRecord: T.LOCAL_FILE_HEADER + A + h18 + v, dirRecord: T.CENTRAL_FILE_HEADER + O(C, 2) + A + O(p.length, 2) + "\0\0\0\0" + O(z, 4) + O(n19, 4) + h18 + v + p };
|
|
649
|
+
}
|
|
650
|
+
var I = e("../utils"), s = e("../stream/GenericWorker"), D = e("../utf8"), B = e("../crc32"), T = e("../signature");
|
|
651
|
+
function n18(e2, t19, r19, n19) {
|
|
652
|
+
s.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t19, this.zipPlatform = r19, this.encodeFileName = n19, this.streamFiles = e2, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
653
|
+
}
|
|
654
|
+
I.inherits(n18, s), n18.prototype.push = function(e2) {
|
|
655
|
+
var t19 = e2.meta.percent || 0, r19 = this.entriesCount, n19 = this._sources.length;
|
|
656
|
+
this.accumulate ? this.contentBuffer.push(e2) : (this.bytesWritten += e2.data.length, s.prototype.push.call(this, { data: e2.data, meta: { currentFile: this.currentFile, percent: r19 ? (t19 + 100 * (r19 - n19 - 1)) / r19 : 100 } }));
|
|
657
|
+
}, n18.prototype.openedSource = function(e2) {
|
|
658
|
+
this.currentSourceOffset = this.bytesWritten, this.currentFile = e2.file.name;
|
|
659
|
+
var t19 = this.streamFiles && !e2.file.dir;
|
|
660
|
+
if (t19) {
|
|
661
|
+
var r19 = i(e2, t19, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
662
|
+
this.push({ data: r19.fileRecord, meta: { percent: 0 } });
|
|
663
|
+
} else
|
|
664
|
+
this.accumulate = true;
|
|
665
|
+
}, n18.prototype.closedSource = function(e2) {
|
|
666
|
+
this.accumulate = false;
|
|
667
|
+
var t19, r19 = this.streamFiles && !e2.file.dir, n19 = i(e2, r19, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
668
|
+
if (this.dirRecords.push(n19.dirRecord), r19)
|
|
669
|
+
this.push({ data: (t19 = e2, T.DATA_DESCRIPTOR + O(t19.crc32, 4) + O(t19.compressedSize, 4) + O(t19.uncompressedSize, 4)), meta: { percent: 100 } });
|
|
670
|
+
else
|
|
671
|
+
for (this.push({ data: n19.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; )
|
|
672
|
+
this.push(this.contentBuffer.shift());
|
|
673
|
+
this.currentFile = null;
|
|
674
|
+
}, n18.prototype.flush = function() {
|
|
675
|
+
for (var e2 = this.bytesWritten, t19 = 0; t19 < this.dirRecords.length; t19++)
|
|
676
|
+
this.push({ data: this.dirRecords[t19], meta: { percent: 100 } });
|
|
677
|
+
var r19, n19, i2, s2, o, a, f = this.bytesWritten - e2, u = (r19 = this.dirRecords.length, n19 = f, i2 = e2, s2 = this.zipComment, o = this.encodeFileName, a = I.transformTo("string", o(s2)), T.CENTRAL_DIRECTORY_END + "\0\0\0\0" + O(r19, 2) + O(r19, 2) + O(n19, 4) + O(i2, 4) + O(a.length, 2) + a);
|
|
678
|
+
this.push({ data: u, meta: { percent: 100 } });
|
|
679
|
+
}, n18.prototype.prepareNextSource = function() {
|
|
680
|
+
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
681
|
+
}, n18.prototype.registerPrevious = function(e2) {
|
|
682
|
+
this._sources.push(e2);
|
|
683
|
+
var t19 = this;
|
|
684
|
+
return e2.on("data", function(e3) {
|
|
685
|
+
t19.processChunk(e3);
|
|
686
|
+
}), e2.on("end", function() {
|
|
687
|
+
t19.closedSource(t19.previous.streamInfo), t19._sources.length ? t19.prepareNextSource() : t19.end();
|
|
688
|
+
}), e2.on("error", function(e3) {
|
|
689
|
+
t19.error(e3);
|
|
690
|
+
}), this;
|
|
691
|
+
}, n18.prototype.resume = function() {
|
|
692
|
+
return !!s.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), true) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), true));
|
|
693
|
+
}, n18.prototype.error = function(e2) {
|
|
694
|
+
var t19 = this._sources;
|
|
695
|
+
if (!s.prototype.error.call(this, e2))
|
|
696
|
+
return false;
|
|
697
|
+
for (var r19 = 0; r19 < t19.length; r19++)
|
|
698
|
+
try {
|
|
699
|
+
t19[r19].error(e2);
|
|
700
|
+
} catch (e3) {
|
|
701
|
+
}
|
|
702
|
+
return true;
|
|
703
|
+
}, n18.prototype.lock = function() {
|
|
704
|
+
s.prototype.lock.call(this);
|
|
705
|
+
for (var e2 = this._sources, t19 = 0; t19 < e2.length; t19++)
|
|
706
|
+
e2[t19].lock();
|
|
707
|
+
}, t18.exports = n18;
|
|
708
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, t18, r18) {
|
|
709
|
+
"use strict";
|
|
710
|
+
var u = e("../compressions"), n18 = e("./ZipFileWorker");
|
|
711
|
+
r18.generateWorker = function(e2, o, t19) {
|
|
712
|
+
var a = new n18(o.streamFiles, t19, o.platform, o.encodeFileName), f = 0;
|
|
713
|
+
try {
|
|
714
|
+
e2.forEach(function(e3, t20) {
|
|
715
|
+
f++;
|
|
716
|
+
var r19 = function(e4, t21) {
|
|
717
|
+
var r20 = e4 || t21, n20 = u[r20];
|
|
718
|
+
if (!n20)
|
|
719
|
+
throw new Error(r20 + " is not a valid compression method !");
|
|
720
|
+
return n20;
|
|
721
|
+
}(t20.options.compression, o.compression), n19 = t20.options.compressionOptions || o.compressionOptions || {}, i = t20.dir, s = t20.date;
|
|
722
|
+
t20._compressWorker(r19, n19).withStreamInfo("file", { name: e3, dir: i, date: s, comment: t20.comment || "", unixPermissions: t20.unixPermissions, dosPermissions: t20.dosPermissions }).pipe(a);
|
|
723
|
+
}), a.entriesCount = f;
|
|
724
|
+
} catch (e3) {
|
|
725
|
+
a.error(e3);
|
|
726
|
+
}
|
|
727
|
+
return a;
|
|
728
|
+
};
|
|
729
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e, t18, r18) {
|
|
730
|
+
"use strict";
|
|
731
|
+
function n18() {
|
|
732
|
+
if (!(this instanceof n18))
|
|
733
|
+
return new n18();
|
|
734
|
+
if (arguments.length)
|
|
735
|
+
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
736
|
+
this.files = {}, this.comment = null, this.root = "", this.clone = function() {
|
|
737
|
+
var e2 = new n18();
|
|
738
|
+
for (var t19 in this)
|
|
739
|
+
typeof this[t19] != "function" && (e2[t19] = this[t19]);
|
|
740
|
+
return e2;
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
(n18.prototype = e("./object")).loadAsync = e("./load"), n18.support = e("./support"), n18.defaults = e("./defaults"), n18.version = "3.5.0", n18.loadAsync = function(e2, t19) {
|
|
744
|
+
return new n18().loadAsync(e2, t19);
|
|
745
|
+
}, n18.external = e("./external"), t18.exports = n18;
|
|
746
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, t18, r18) {
|
|
747
|
+
"use strict";
|
|
748
|
+
var n18 = e("./utils"), i = e("./external"), a = e("./utf8"), f = e("./zipEntries"), s = e("./stream/Crc32Probe"), u = e("./nodejsUtils");
|
|
749
|
+
function d(n19) {
|
|
750
|
+
return new i.Promise(function(e2, t19) {
|
|
751
|
+
var r19 = n19.decompressed.getContentWorker().pipe(new s());
|
|
752
|
+
r19.on("error", function(e3) {
|
|
753
|
+
t19(e3);
|
|
754
|
+
}).on("end", function() {
|
|
755
|
+
r19.streamInfo.crc32 !== n19.decompressed.crc32 ? t19(new Error("Corrupted zip : CRC32 mismatch")) : e2();
|
|
756
|
+
}).resume();
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
t18.exports = function(e2, s2) {
|
|
760
|
+
var o = this;
|
|
761
|
+
return s2 = n18.extend(s2 || {}, { base64: false, checkCRC32: false, optimizedBinaryString: false, createFolders: false, decodeFileName: a.utf8decode }), u.isNode && u.isStream(e2) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n18.prepareContent("the loaded zip file", e2, true, s2.optimizedBinaryString, s2.base64).then(function(e3) {
|
|
762
|
+
var t19 = new f(s2);
|
|
763
|
+
return t19.load(e3), t19;
|
|
764
|
+
}).then(function(e3) {
|
|
765
|
+
var t19 = [i.Promise.resolve(e3)], r19 = e3.files;
|
|
766
|
+
if (s2.checkCRC32)
|
|
767
|
+
for (var n19 = 0; n19 < r19.length; n19++)
|
|
768
|
+
t19.push(d(r19[n19]));
|
|
769
|
+
return i.Promise.all(t19);
|
|
770
|
+
}).then(function(e3) {
|
|
771
|
+
for (var t19 = e3.shift(), r19 = t19.files, n19 = 0; n19 < r19.length; n19++) {
|
|
772
|
+
var i2 = r19[n19];
|
|
773
|
+
o.file(i2.fileNameStr, i2.decompressed, { binary: true, optimizedBinaryString: true, date: i2.date, dir: i2.dir, comment: i2.fileCommentStr.length ? i2.fileCommentStr : null, unixPermissions: i2.unixPermissions, dosPermissions: i2.dosPermissions, createFolders: s2.createFolders });
|
|
774
|
+
}
|
|
775
|
+
return t19.zipComment.length && (o.comment = t19.zipComment), o;
|
|
776
|
+
});
|
|
777
|
+
};
|
|
778
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e, t18, r18) {
|
|
779
|
+
"use strict";
|
|
780
|
+
var n18 = e("../utils"), i = e("../stream/GenericWorker");
|
|
781
|
+
function s(e2, t19) {
|
|
782
|
+
i.call(this, "Nodejs stream input adapter for " + e2), this._upstreamEnded = false, this._bindStream(t19);
|
|
783
|
+
}
|
|
784
|
+
n18.inherits(s, i), s.prototype._bindStream = function(e2) {
|
|
785
|
+
var t19 = this;
|
|
786
|
+
(this._stream = e2).pause(), e2.on("data", function(e3) {
|
|
787
|
+
t19.push({ data: e3, meta: { percent: 0 } });
|
|
788
|
+
}).on("error", function(e3) {
|
|
789
|
+
t19.isPaused ? this.generatedError = e3 : t19.error(e3);
|
|
790
|
+
}).on("end", function() {
|
|
791
|
+
t19.isPaused ? t19._upstreamEnded = true : t19.end();
|
|
792
|
+
});
|
|
793
|
+
}, s.prototype.pause = function() {
|
|
794
|
+
return !!i.prototype.pause.call(this) && (this._stream.pause(), true);
|
|
795
|
+
}, s.prototype.resume = function() {
|
|
796
|
+
return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), true);
|
|
797
|
+
}, t18.exports = s;
|
|
798
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e, t18, r18) {
|
|
799
|
+
"use strict";
|
|
800
|
+
var i = e("readable-stream").Readable;
|
|
801
|
+
function n18(e2, t19, r19) {
|
|
802
|
+
i.call(this, t19), this._helper = e2;
|
|
803
|
+
var n19 = this;
|
|
804
|
+
e2.on("data", function(e3, t20) {
|
|
805
|
+
n19.push(e3) || n19._helper.pause(), r19 && r19(t20);
|
|
806
|
+
}).on("error", function(e3) {
|
|
807
|
+
n19.emit("error", e3);
|
|
808
|
+
}).on("end", function() {
|
|
809
|
+
n19.push(null);
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
e("../utils").inherits(n18, i), n18.prototype._read = function() {
|
|
813
|
+
this._helper.resume();
|
|
814
|
+
}, t18.exports = n18;
|
|
815
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e, t18, r18) {
|
|
816
|
+
"use strict";
|
|
817
|
+
t18.exports = { isNode: typeof Buffer != "undefined", newBufferFrom: function(e2, t19) {
|
|
818
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from)
|
|
819
|
+
return Buffer.from(e2, t19);
|
|
820
|
+
if (typeof e2 == "number")
|
|
821
|
+
throw new Error('The "data" argument must not be a number');
|
|
822
|
+
return new Buffer(e2, t19);
|
|
823
|
+
}, allocBuffer: function(e2) {
|
|
824
|
+
if (Buffer.alloc)
|
|
825
|
+
return Buffer.alloc(e2);
|
|
826
|
+
var t19 = new Buffer(e2);
|
|
827
|
+
return t19.fill(0), t19;
|
|
828
|
+
}, isBuffer: function(e2) {
|
|
829
|
+
return Buffer.isBuffer(e2);
|
|
830
|
+
}, isStream: function(e2) {
|
|
831
|
+
return e2 && typeof e2.on == "function" && typeof e2.pause == "function" && typeof e2.resume == "function";
|
|
832
|
+
} };
|
|
833
|
+
}, {}], 15: [function(e, t18, r18) {
|
|
834
|
+
"use strict";
|
|
835
|
+
function s(e2, t19, r19) {
|
|
836
|
+
var n19, i2 = d.getTypeOf(t19), s2 = d.extend(r19 || {}, l);
|
|
837
|
+
s2.date = s2.date || new Date(), s2.compression !== null && (s2.compression = s2.compression.toUpperCase()), typeof s2.unixPermissions == "string" && (s2.unixPermissions = parseInt(s2.unixPermissions, 8)), s2.unixPermissions && 16384 & s2.unixPermissions && (s2.dir = true), s2.dosPermissions && 16 & s2.dosPermissions && (s2.dir = true), s2.dir && (e2 = u(e2)), s2.createFolders && (n19 = function(e3) {
|
|
838
|
+
e3.slice(-1) === "/" && (e3 = e3.substring(0, e3.length - 1));
|
|
839
|
+
var t20 = e3.lastIndexOf("/");
|
|
840
|
+
return 0 < t20 ? e3.substring(0, t20) : "";
|
|
841
|
+
}(e2)) && w.call(this, n19, true);
|
|
842
|
+
var o2, a2 = i2 === "string" && s2.binary === false && s2.base64 === false;
|
|
843
|
+
r19 && r19.binary !== void 0 || (s2.binary = !a2), (t19 instanceof c && t19.uncompressedSize === 0 || s2.dir || !t19 || t19.length === 0) && (s2.base64 = false, s2.binary = true, t19 = "", s2.compression = "STORE", i2 = "string"), o2 = t19 instanceof c || t19 instanceof h18 ? t19 : m.isNode && m.isStream(t19) ? new _(e2, t19) : d.prepareContent(e2, t19, s2.binary, s2.optimizedBinaryString, s2.base64);
|
|
844
|
+
var f2 = new p(e2, o2, s2);
|
|
845
|
+
this.files[e2] = f2;
|
|
846
|
+
}
|
|
847
|
+
function u(e2) {
|
|
848
|
+
return e2.slice(-1) !== "/" && (e2 += "/"), e2;
|
|
849
|
+
}
|
|
850
|
+
var i = e("./utf8"), d = e("./utils"), h18 = e("./stream/GenericWorker"), o = e("./stream/StreamHelper"), l = e("./defaults"), c = e("./compressedObject"), p = e("./zipObject"), a = e("./generate"), m = e("./nodejsUtils"), _ = e("./nodejs/NodejsStreamInputAdapter"), w = function(e2, t19) {
|
|
851
|
+
return t19 = t19 !== void 0 ? t19 : l.createFolders, e2 = u(e2), this.files[e2] || s.call(this, e2, null, { dir: true, createFolders: t19 }), this.files[e2];
|
|
852
|
+
};
|
|
853
|
+
function f(e2) {
|
|
854
|
+
return Object.prototype.toString.call(e2) === "[object RegExp]";
|
|
855
|
+
}
|
|
856
|
+
var n18 = { load: function() {
|
|
857
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
858
|
+
}, forEach: function(e2) {
|
|
859
|
+
var t19, r19, n19;
|
|
860
|
+
for (t19 in this.files)
|
|
861
|
+
this.files.hasOwnProperty(t19) && (n19 = this.files[t19], (r19 = t19.slice(this.root.length, t19.length)) && t19.slice(0, this.root.length) === this.root && e2(r19, n19));
|
|
862
|
+
}, filter: function(r19) {
|
|
863
|
+
var n19 = [];
|
|
864
|
+
return this.forEach(function(e2, t19) {
|
|
865
|
+
r19(e2, t19) && n19.push(t19);
|
|
866
|
+
}), n19;
|
|
867
|
+
}, file: function(e2, t19, r19) {
|
|
868
|
+
if (arguments.length !== 1)
|
|
869
|
+
return e2 = this.root + e2, s.call(this, e2, t19, r19), this;
|
|
870
|
+
if (f(e2)) {
|
|
871
|
+
var n19 = e2;
|
|
872
|
+
return this.filter(function(e3, t20) {
|
|
873
|
+
return !t20.dir && n19.test(e3);
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
var i2 = this.files[this.root + e2];
|
|
877
|
+
return i2 && !i2.dir ? i2 : null;
|
|
878
|
+
}, folder: function(r19) {
|
|
879
|
+
if (!r19)
|
|
880
|
+
return this;
|
|
881
|
+
if (f(r19))
|
|
882
|
+
return this.filter(function(e3, t20) {
|
|
883
|
+
return t20.dir && r19.test(e3);
|
|
884
|
+
});
|
|
885
|
+
var e2 = this.root + r19, t19 = w.call(this, e2), n19 = this.clone();
|
|
886
|
+
return n19.root = t19.name, n19;
|
|
887
|
+
}, remove: function(r19) {
|
|
888
|
+
r19 = this.root + r19;
|
|
889
|
+
var e2 = this.files[r19];
|
|
890
|
+
if (e2 || (r19.slice(-1) !== "/" && (r19 += "/"), e2 = this.files[r19]), e2 && !e2.dir)
|
|
891
|
+
delete this.files[r19];
|
|
892
|
+
else
|
|
893
|
+
for (var t19 = this.filter(function(e3, t20) {
|
|
894
|
+
return t20.name.slice(0, r19.length) === r19;
|
|
895
|
+
}), n19 = 0; n19 < t19.length; n19++)
|
|
896
|
+
delete this.files[t19[n19].name];
|
|
897
|
+
return this;
|
|
898
|
+
}, generate: function(e2) {
|
|
899
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
900
|
+
}, generateInternalStream: function(e2) {
|
|
901
|
+
var t19, r19 = {};
|
|
902
|
+
try {
|
|
903
|
+
if ((r19 = d.extend(e2 || {}, { streamFiles: false, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i.utf8encode })).type = r19.type.toLowerCase(), r19.compression = r19.compression.toUpperCase(), r19.type === "binarystring" && (r19.type = "string"), !r19.type)
|
|
904
|
+
throw new Error("No output type specified.");
|
|
905
|
+
d.checkSupport(r19.type), r19.platform !== "darwin" && r19.platform !== "freebsd" && r19.platform !== "linux" && r19.platform !== "sunos" || (r19.platform = "UNIX"), r19.platform === "win32" && (r19.platform = "DOS");
|
|
906
|
+
var n19 = r19.comment || this.comment || "";
|
|
907
|
+
t19 = a.generateWorker(this, r19, n19);
|
|
908
|
+
} catch (e3) {
|
|
909
|
+
(t19 = new h18("error")).error(e3);
|
|
910
|
+
}
|
|
911
|
+
return new o(t19, r19.type || "string", r19.mimeType);
|
|
912
|
+
}, generateAsync: function(e2, t19) {
|
|
913
|
+
return this.generateInternalStream(e2).accumulate(t19);
|
|
914
|
+
}, generateNodeStream: function(e2, t19) {
|
|
915
|
+
return (e2 = e2 || {}).type || (e2.type = "nodebuffer"), this.generateInternalStream(e2).toNodejsStream(t19);
|
|
916
|
+
} };
|
|
917
|
+
t18.exports = n18;
|
|
918
|
+
}, { "./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(e, t18, r18) {
|
|
919
|
+
t18.exports = e("stream");
|
|
920
|
+
}, { stream: void 0 }], 17: [function(e, t18, r18) {
|
|
921
|
+
"use strict";
|
|
922
|
+
var n18 = e("./DataReader");
|
|
923
|
+
function i(e2) {
|
|
924
|
+
n18.call(this, e2);
|
|
925
|
+
for (var t19 = 0; t19 < this.data.length; t19++)
|
|
926
|
+
e2[t19] = 255 & e2[t19];
|
|
927
|
+
}
|
|
928
|
+
e("../utils").inherits(i, n18), i.prototype.byteAt = function(e2) {
|
|
929
|
+
return this.data[this.zero + e2];
|
|
930
|
+
}, i.prototype.lastIndexOfSignature = function(e2) {
|
|
931
|
+
for (var t19 = e2.charCodeAt(0), r19 = e2.charCodeAt(1), n19 = e2.charCodeAt(2), i2 = e2.charCodeAt(3), s = this.length - 4; 0 <= s; --s)
|
|
932
|
+
if (this.data[s] === t19 && this.data[s + 1] === r19 && this.data[s + 2] === n19 && this.data[s + 3] === i2)
|
|
933
|
+
return s - this.zero;
|
|
934
|
+
return -1;
|
|
935
|
+
}, i.prototype.readAndCheckSignature = function(e2) {
|
|
936
|
+
var t19 = e2.charCodeAt(0), r19 = e2.charCodeAt(1), n19 = e2.charCodeAt(2), i2 = e2.charCodeAt(3), s = this.readData(4);
|
|
937
|
+
return t19 === s[0] && r19 === s[1] && n19 === s[2] && i2 === s[3];
|
|
938
|
+
}, i.prototype.readData = function(e2) {
|
|
939
|
+
if (this.checkOffset(e2), e2 === 0)
|
|
940
|
+
return [];
|
|
941
|
+
var t19 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
942
|
+
return this.index += e2, t19;
|
|
943
|
+
}, t18.exports = i;
|
|
944
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(e, t18, r18) {
|
|
945
|
+
"use strict";
|
|
946
|
+
var n18 = e("../utils");
|
|
947
|
+
function i(e2) {
|
|
948
|
+
this.data = e2, this.length = e2.length, this.index = 0, this.zero = 0;
|
|
949
|
+
}
|
|
950
|
+
i.prototype = { checkOffset: function(e2) {
|
|
951
|
+
this.checkIndex(this.index + e2);
|
|
952
|
+
}, checkIndex: function(e2) {
|
|
953
|
+
if (this.length < this.zero + e2 || e2 < 0)
|
|
954
|
+
throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e2 + "). Corrupted zip ?");
|
|
955
|
+
}, setIndex: function(e2) {
|
|
956
|
+
this.checkIndex(e2), this.index = e2;
|
|
957
|
+
}, skip: function(e2) {
|
|
958
|
+
this.setIndex(this.index + e2);
|
|
959
|
+
}, byteAt: function(e2) {
|
|
960
|
+
}, readInt: function(e2) {
|
|
961
|
+
var t19, r19 = 0;
|
|
962
|
+
for (this.checkOffset(e2), t19 = this.index + e2 - 1; t19 >= this.index; t19--)
|
|
963
|
+
r19 = (r19 << 8) + this.byteAt(t19);
|
|
964
|
+
return this.index += e2, r19;
|
|
965
|
+
}, readString: function(e2) {
|
|
966
|
+
return n18.transformTo("string", this.readData(e2));
|
|
967
|
+
}, readData: function(e2) {
|
|
968
|
+
}, lastIndexOfSignature: function(e2) {
|
|
969
|
+
}, readAndCheckSignature: function(e2) {
|
|
970
|
+
}, readDate: function() {
|
|
971
|
+
var e2 = this.readInt(4);
|
|
972
|
+
return new Date(Date.UTC(1980 + (e2 >> 25 & 127), (e2 >> 21 & 15) - 1, e2 >> 16 & 31, e2 >> 11 & 31, e2 >> 5 & 63, (31 & e2) << 1));
|
|
973
|
+
} }, t18.exports = i;
|
|
974
|
+
}, { "../utils": 32 }], 19: [function(e, t18, r18) {
|
|
975
|
+
"use strict";
|
|
976
|
+
var n18 = e("./Uint8ArrayReader");
|
|
977
|
+
function i(e2) {
|
|
978
|
+
n18.call(this, e2);
|
|
979
|
+
}
|
|
980
|
+
e("../utils").inherits(i, n18), i.prototype.readData = function(e2) {
|
|
981
|
+
this.checkOffset(e2);
|
|
982
|
+
var t19 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
983
|
+
return this.index += e2, t19;
|
|
984
|
+
}, t18.exports = i;
|
|
985
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e, t18, r18) {
|
|
986
|
+
"use strict";
|
|
987
|
+
var n18 = e("./DataReader");
|
|
988
|
+
function i(e2) {
|
|
989
|
+
n18.call(this, e2);
|
|
990
|
+
}
|
|
991
|
+
e("../utils").inherits(i, n18), i.prototype.byteAt = function(e2) {
|
|
992
|
+
return this.data.charCodeAt(this.zero + e2);
|
|
993
|
+
}, i.prototype.lastIndexOfSignature = function(e2) {
|
|
994
|
+
return this.data.lastIndexOf(e2) - this.zero;
|
|
995
|
+
}, i.prototype.readAndCheckSignature = function(e2) {
|
|
996
|
+
return e2 === this.readData(4);
|
|
997
|
+
}, i.prototype.readData = function(e2) {
|
|
998
|
+
this.checkOffset(e2);
|
|
999
|
+
var t19 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
1000
|
+
return this.index += e2, t19;
|
|
1001
|
+
}, t18.exports = i;
|
|
1002
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(e, t18, r18) {
|
|
1003
|
+
"use strict";
|
|
1004
|
+
var n18 = e("./ArrayReader");
|
|
1005
|
+
function i(e2) {
|
|
1006
|
+
n18.call(this, e2);
|
|
1007
|
+
}
|
|
1008
|
+
e("../utils").inherits(i, n18), i.prototype.readData = function(e2) {
|
|
1009
|
+
if (this.checkOffset(e2), e2 === 0)
|
|
1010
|
+
return new Uint8Array(0);
|
|
1011
|
+
var t19 = this.data.subarray(this.zero + this.index, this.zero + this.index + e2);
|
|
1012
|
+
return this.index += e2, t19;
|
|
1013
|
+
}, t18.exports = i;
|
|
1014
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e, t18, r18) {
|
|
1015
|
+
"use strict";
|
|
1016
|
+
var n18 = e("../utils"), i = e("../support"), s = e("./ArrayReader"), o = e("./StringReader"), a = e("./NodeBufferReader"), f = e("./Uint8ArrayReader");
|
|
1017
|
+
t18.exports = function(e2) {
|
|
1018
|
+
var t19 = n18.getTypeOf(e2);
|
|
1019
|
+
return n18.checkSupport(t19), t19 !== "string" || i.uint8array ? t19 === "nodebuffer" ? new a(e2) : i.uint8array ? new f(n18.transformTo("uint8array", e2)) : new s(n18.transformTo("array", e2)) : new o(e2);
|
|
1020
|
+
};
|
|
1021
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e, t18, r18) {
|
|
1022
|
+
"use strict";
|
|
1023
|
+
r18.LOCAL_FILE_HEADER = "PK", r18.CENTRAL_FILE_HEADER = "PK", r18.CENTRAL_DIRECTORY_END = "PK", r18.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", r18.ZIP64_CENTRAL_DIRECTORY_END = "PK", r18.DATA_DESCRIPTOR = "PK\x07\b";
|
|
1024
|
+
}, {}], 24: [function(e, t18, r18) {
|
|
1025
|
+
"use strict";
|
|
1026
|
+
var n18 = e("./GenericWorker"), i = e("../utils");
|
|
1027
|
+
function s(e2) {
|
|
1028
|
+
n18.call(this, "ConvertWorker to " + e2), this.destType = e2;
|
|
1029
|
+
}
|
|
1030
|
+
i.inherits(s, n18), s.prototype.processChunk = function(e2) {
|
|
1031
|
+
this.push({ data: i.transformTo(this.destType, e2.data), meta: e2.meta });
|
|
1032
|
+
}, t18.exports = s;
|
|
1033
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e, t18, r18) {
|
|
1034
|
+
"use strict";
|
|
1035
|
+
var n18 = e("./GenericWorker"), i = e("../crc32");
|
|
1036
|
+
function s() {
|
|
1037
|
+
n18.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
1038
|
+
}
|
|
1039
|
+
e("../utils").inherits(s, n18), s.prototype.processChunk = function(e2) {
|
|
1040
|
+
this.streamInfo.crc32 = i(e2.data, this.streamInfo.crc32 || 0), this.push(e2);
|
|
1041
|
+
}, t18.exports = s;
|
|
1042
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e, t18, r18) {
|
|
1043
|
+
"use strict";
|
|
1044
|
+
var n18 = e("../utils"), i = e("./GenericWorker");
|
|
1045
|
+
function s(e2) {
|
|
1046
|
+
i.call(this, "DataLengthProbe for " + e2), this.propName = e2, this.withStreamInfo(e2, 0);
|
|
1047
|
+
}
|
|
1048
|
+
n18.inherits(s, i), s.prototype.processChunk = function(e2) {
|
|
1049
|
+
if (e2) {
|
|
1050
|
+
var t19 = this.streamInfo[this.propName] || 0;
|
|
1051
|
+
this.streamInfo[this.propName] = t19 + e2.data.length;
|
|
1052
|
+
}
|
|
1053
|
+
i.prototype.processChunk.call(this, e2);
|
|
1054
|
+
}, t18.exports = s;
|
|
1055
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e, t18, r18) {
|
|
1056
|
+
"use strict";
|
|
1057
|
+
var n18 = e("../utils"), i = e("./GenericWorker");
|
|
1058
|
+
function s(e2) {
|
|
1059
|
+
i.call(this, "DataWorker");
|
|
1060
|
+
var t19 = this;
|
|
1061
|
+
this.dataIsReady = false, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = false, e2.then(function(e3) {
|
|
1062
|
+
t19.dataIsReady = true, t19.data = e3, t19.max = e3 && e3.length || 0, t19.type = n18.getTypeOf(e3), t19.isPaused || t19._tickAndRepeat();
|
|
1063
|
+
}, function(e3) {
|
|
1064
|
+
t19.error(e3);
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
n18.inherits(s, i), s.prototype.cleanUp = function() {
|
|
1068
|
+
i.prototype.cleanUp.call(this), this.data = null;
|
|
1069
|
+
}, s.prototype.resume = function() {
|
|
1070
|
+
return !!i.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = true, n18.delay(this._tickAndRepeat, [], this)), true);
|
|
1071
|
+
}, s.prototype._tickAndRepeat = function() {
|
|
1072
|
+
this._tickScheduled = false, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n18.delay(this._tickAndRepeat, [], this), this._tickScheduled = true));
|
|
1073
|
+
}, s.prototype._tick = function() {
|
|
1074
|
+
if (this.isPaused || this.isFinished)
|
|
1075
|
+
return false;
|
|
1076
|
+
var e2 = null, t19 = Math.min(this.max, this.index + 16384);
|
|
1077
|
+
if (this.index >= this.max)
|
|
1078
|
+
return this.end();
|
|
1079
|
+
switch (this.type) {
|
|
1080
|
+
case "string":
|
|
1081
|
+
e2 = this.data.substring(this.index, t19);
|
|
1082
|
+
break;
|
|
1083
|
+
case "uint8array":
|
|
1084
|
+
e2 = this.data.subarray(this.index, t19);
|
|
1085
|
+
break;
|
|
1086
|
+
case "array":
|
|
1087
|
+
case "nodebuffer":
|
|
1088
|
+
e2 = this.data.slice(this.index, t19);
|
|
1089
|
+
}
|
|
1090
|
+
return this.index = t19, this.push({ data: e2, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
1091
|
+
}, t18.exports = s;
|
|
1092
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e, t18, r18) {
|
|
1093
|
+
"use strict";
|
|
1094
|
+
function n18(e2) {
|
|
1095
|
+
this.name = e2 || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = true, this.isFinished = false, this.isLocked = false, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
1096
|
+
}
|
|
1097
|
+
n18.prototype = { push: function(e2) {
|
|
1098
|
+
this.emit("data", e2);
|
|
1099
|
+
}, end: function() {
|
|
1100
|
+
if (this.isFinished)
|
|
1101
|
+
return false;
|
|
1102
|
+
this.flush();
|
|
1103
|
+
try {
|
|
1104
|
+
this.emit("end"), this.cleanUp(), this.isFinished = true;
|
|
1105
|
+
} catch (e2) {
|
|
1106
|
+
this.emit("error", e2);
|
|
1107
|
+
}
|
|
1108
|
+
return true;
|
|
1109
|
+
}, error: function(e2) {
|
|
1110
|
+
return !this.isFinished && (this.isPaused ? this.generatedError = e2 : (this.isFinished = true, this.emit("error", e2), this.previous && this.previous.error(e2), this.cleanUp()), true);
|
|
1111
|
+
}, on: function(e2, t19) {
|
|
1112
|
+
return this._listeners[e2].push(t19), this;
|
|
1113
|
+
}, cleanUp: function() {
|
|
1114
|
+
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
1115
|
+
}, emit: function(e2, t19) {
|
|
1116
|
+
if (this._listeners[e2])
|
|
1117
|
+
for (var r19 = 0; r19 < this._listeners[e2].length; r19++)
|
|
1118
|
+
this._listeners[e2][r19].call(this, t19);
|
|
1119
|
+
}, pipe: function(e2) {
|
|
1120
|
+
return e2.registerPrevious(this);
|
|
1121
|
+
}, registerPrevious: function(e2) {
|
|
1122
|
+
if (this.isLocked)
|
|
1123
|
+
throw new Error("The stream '" + this + "' has already been used.");
|
|
1124
|
+
this.streamInfo = e2.streamInfo, this.mergeStreamInfo(), this.previous = e2;
|
|
1125
|
+
var t19 = this;
|
|
1126
|
+
return e2.on("data", function(e3) {
|
|
1127
|
+
t19.processChunk(e3);
|
|
1128
|
+
}), e2.on("end", function() {
|
|
1129
|
+
t19.end();
|
|
1130
|
+
}), e2.on("error", function(e3) {
|
|
1131
|
+
t19.error(e3);
|
|
1132
|
+
}), this;
|
|
1133
|
+
}, pause: function() {
|
|
1134
|
+
return !this.isPaused && !this.isFinished && (this.isPaused = true, this.previous && this.previous.pause(), true);
|
|
1135
|
+
}, resume: function() {
|
|
1136
|
+
if (!this.isPaused || this.isFinished)
|
|
1137
|
+
return false;
|
|
1138
|
+
var e2 = this.isPaused = false;
|
|
1139
|
+
return this.generatedError && (this.error(this.generatedError), e2 = true), this.previous && this.previous.resume(), !e2;
|
|
1140
|
+
}, flush: function() {
|
|
1141
|
+
}, processChunk: function(e2) {
|
|
1142
|
+
this.push(e2);
|
|
1143
|
+
}, withStreamInfo: function(e2, t19) {
|
|
1144
|
+
return this.extraStreamInfo[e2] = t19, this.mergeStreamInfo(), this;
|
|
1145
|
+
}, mergeStreamInfo: function() {
|
|
1146
|
+
for (var e2 in this.extraStreamInfo)
|
|
1147
|
+
this.extraStreamInfo.hasOwnProperty(e2) && (this.streamInfo[e2] = this.extraStreamInfo[e2]);
|
|
1148
|
+
}, lock: function() {
|
|
1149
|
+
if (this.isLocked)
|
|
1150
|
+
throw new Error("The stream '" + this + "' has already been used.");
|
|
1151
|
+
this.isLocked = true, this.previous && this.previous.lock();
|
|
1152
|
+
}, toString: function() {
|
|
1153
|
+
var e2 = "Worker " + this.name;
|
|
1154
|
+
return this.previous ? this.previous + " -> " + e2 : e2;
|
|
1155
|
+
} }, t18.exports = n18;
|
|
1156
|
+
}, {}], 29: [function(e, t18, r18) {
|
|
1157
|
+
"use strict";
|
|
1158
|
+
var u = e("../utils"), i = e("./ConvertWorker"), s = e("./GenericWorker"), d = e("../base64"), n18 = e("../support"), o = e("../external"), a = null;
|
|
1159
|
+
if (n18.nodestream)
|
|
1160
|
+
try {
|
|
1161
|
+
a = e("../nodejs/NodejsStreamOutputAdapter");
|
|
1162
|
+
} catch (e2) {
|
|
1163
|
+
}
|
|
1164
|
+
function f(e2, t19, r19) {
|
|
1165
|
+
var n19 = t19;
|
|
1166
|
+
switch (t19) {
|
|
1167
|
+
case "blob":
|
|
1168
|
+
case "arraybuffer":
|
|
1169
|
+
n19 = "uint8array";
|
|
1170
|
+
break;
|
|
1171
|
+
case "base64":
|
|
1172
|
+
n19 = "string";
|
|
1173
|
+
}
|
|
1174
|
+
try {
|
|
1175
|
+
this._internalType = n19, this._outputType = t19, this._mimeType = r19, u.checkSupport(n19), this._worker = e2.pipe(new i(n19)), e2.lock();
|
|
1176
|
+
} catch (e3) {
|
|
1177
|
+
this._worker = new s("error"), this._worker.error(e3);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
f.prototype = { accumulate: function(e2) {
|
|
1181
|
+
return a2 = this, f2 = e2, new o.Promise(function(t19, r19) {
|
|
1182
|
+
var n19 = [], i2 = a2._internalType, s2 = a2._outputType, o2 = a2._mimeType;
|
|
1183
|
+
a2.on("data", function(e3, t20) {
|
|
1184
|
+
n19.push(e3), f2 && f2(t20);
|
|
1185
|
+
}).on("error", function(e3) {
|
|
1186
|
+
n19 = [], r19(e3);
|
|
1187
|
+
}).on("end", function() {
|
|
1188
|
+
try {
|
|
1189
|
+
var e3 = function(e4, t20, r20) {
|
|
1190
|
+
switch (e4) {
|
|
1191
|
+
case "blob":
|
|
1192
|
+
return u.newBlob(u.transformTo("arraybuffer", t20), r20);
|
|
1193
|
+
case "base64":
|
|
1194
|
+
return d.encode(t20);
|
|
1195
|
+
default:
|
|
1196
|
+
return u.transformTo(e4, t20);
|
|
1197
|
+
}
|
|
1198
|
+
}(s2, function(e4, t20) {
|
|
1199
|
+
var r20, n20 = 0, i3 = null, s3 = 0;
|
|
1200
|
+
for (r20 = 0; r20 < t20.length; r20++)
|
|
1201
|
+
s3 += t20[r20].length;
|
|
1202
|
+
switch (e4) {
|
|
1203
|
+
case "string":
|
|
1204
|
+
return t20.join("");
|
|
1205
|
+
case "array":
|
|
1206
|
+
return Array.prototype.concat.apply([], t20);
|
|
1207
|
+
case "uint8array":
|
|
1208
|
+
for (i3 = new Uint8Array(s3), r20 = 0; r20 < t20.length; r20++)
|
|
1209
|
+
i3.set(t20[r20], n20), n20 += t20[r20].length;
|
|
1210
|
+
return i3;
|
|
1211
|
+
case "nodebuffer":
|
|
1212
|
+
return Buffer.concat(t20);
|
|
1213
|
+
default:
|
|
1214
|
+
throw new Error("concat : unsupported type '" + e4 + "'");
|
|
1215
|
+
}
|
|
1216
|
+
}(i2, n19), o2);
|
|
1217
|
+
t19(e3);
|
|
1218
|
+
} catch (e4) {
|
|
1219
|
+
r19(e4);
|
|
1220
|
+
}
|
|
1221
|
+
n19 = [];
|
|
1222
|
+
}).resume();
|
|
1223
|
+
});
|
|
1224
|
+
var a2, f2;
|
|
1225
|
+
}, on: function(e2, t19) {
|
|
1226
|
+
var r19 = this;
|
|
1227
|
+
return e2 === "data" ? this._worker.on(e2, function(e3) {
|
|
1228
|
+
t19.call(r19, e3.data, e3.meta);
|
|
1229
|
+
}) : this._worker.on(e2, function() {
|
|
1230
|
+
u.delay(t19, arguments, r19);
|
|
1231
|
+
}), this;
|
|
1232
|
+
}, resume: function() {
|
|
1233
|
+
return u.delay(this._worker.resume, [], this._worker), this;
|
|
1234
|
+
}, pause: function() {
|
|
1235
|
+
return this._worker.pause(), this;
|
|
1236
|
+
}, toNodejsStream: function(e2) {
|
|
1237
|
+
if (u.checkSupport("nodestream"), this._outputType !== "nodebuffer")
|
|
1238
|
+
throw new Error(this._outputType + " is not supported by this method");
|
|
1239
|
+
return new a(this, { objectMode: this._outputType !== "nodebuffer" }, e2);
|
|
1240
|
+
} }, t18.exports = f;
|
|
1241
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e, t18, r18) {
|
|
1242
|
+
"use strict";
|
|
1243
|
+
if (r18.base64 = true, r18.array = true, r18.string = true, r18.arraybuffer = typeof ArrayBuffer != "undefined" && typeof Uint8Array != "undefined", r18.nodebuffer = typeof Buffer != "undefined", r18.uint8array = typeof Uint8Array != "undefined", typeof ArrayBuffer == "undefined")
|
|
1244
|
+
r18.blob = false;
|
|
1245
|
+
else {
|
|
1246
|
+
var n18 = new ArrayBuffer(0);
|
|
1247
|
+
try {
|
|
1248
|
+
r18.blob = new Blob([n18], { type: "application/zip" }).size === 0;
|
|
1249
|
+
} catch (e2) {
|
|
1250
|
+
try {
|
|
1251
|
+
var i = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
1252
|
+
i.append(n18), r18.blob = i.getBlob("application/zip").size === 0;
|
|
1253
|
+
} catch (e3) {
|
|
1254
|
+
r18.blob = false;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
try {
|
|
1259
|
+
r18.nodestream = !!e("readable-stream").Readable;
|
|
1260
|
+
} catch (e2) {
|
|
1261
|
+
r18.nodestream = false;
|
|
1262
|
+
}
|
|
1263
|
+
}, { "readable-stream": 16 }], 31: [function(e, t18, s) {
|
|
1264
|
+
"use strict";
|
|
1265
|
+
for (var a = e("./utils"), f = e("./support"), r18 = e("./nodejsUtils"), n18 = e("./stream/GenericWorker"), u = new Array(256), i = 0; i < 256; i++)
|
|
1266
|
+
u[i] = 252 <= i ? 6 : 248 <= i ? 5 : 240 <= i ? 4 : 224 <= i ? 3 : 192 <= i ? 2 : 1;
|
|
1267
|
+
function o() {
|
|
1268
|
+
n18.call(this, "utf-8 decode"), this.leftOver = null;
|
|
1269
|
+
}
|
|
1270
|
+
function d() {
|
|
1271
|
+
n18.call(this, "utf-8 encode");
|
|
1272
|
+
}
|
|
1273
|
+
u[254] = u[254] = 1, s.utf8encode = function(e2) {
|
|
1274
|
+
return f.nodebuffer ? r18.newBufferFrom(e2, "utf-8") : function(e3) {
|
|
1275
|
+
var t19, r19, n19, i2, s2, o2 = e3.length, a2 = 0;
|
|
1276
|
+
for (i2 = 0; i2 < o2; i2++)
|
|
1277
|
+
(64512 & (r19 = e3.charCodeAt(i2))) == 55296 && i2 + 1 < o2 && (64512 & (n19 = e3.charCodeAt(i2 + 1))) == 56320 && (r19 = 65536 + (r19 - 55296 << 10) + (n19 - 56320), i2++), a2 += r19 < 128 ? 1 : r19 < 2048 ? 2 : r19 < 65536 ? 3 : 4;
|
|
1278
|
+
for (t19 = f.uint8array ? new Uint8Array(a2) : new Array(a2), i2 = s2 = 0; s2 < a2; i2++)
|
|
1279
|
+
(64512 & (r19 = e3.charCodeAt(i2))) == 55296 && i2 + 1 < o2 && (64512 & (n19 = e3.charCodeAt(i2 + 1))) == 56320 && (r19 = 65536 + (r19 - 55296 << 10) + (n19 - 56320), i2++), r19 < 128 ? t19[s2++] = r19 : (r19 < 2048 ? t19[s2++] = 192 | r19 >>> 6 : (r19 < 65536 ? t19[s2++] = 224 | r19 >>> 12 : (t19[s2++] = 240 | r19 >>> 18, t19[s2++] = 128 | r19 >>> 12 & 63), t19[s2++] = 128 | r19 >>> 6 & 63), t19[s2++] = 128 | 63 & r19);
|
|
1280
|
+
return t19;
|
|
1281
|
+
}(e2);
|
|
1282
|
+
}, s.utf8decode = function(e2) {
|
|
1283
|
+
return f.nodebuffer ? a.transformTo("nodebuffer", e2).toString("utf-8") : function(e3) {
|
|
1284
|
+
var t19, r19, n19, i2, s2 = e3.length, o2 = new Array(2 * s2);
|
|
1285
|
+
for (t19 = r19 = 0; t19 < s2; )
|
|
1286
|
+
if ((n19 = e3[t19++]) < 128)
|
|
1287
|
+
o2[r19++] = n19;
|
|
1288
|
+
else if (4 < (i2 = u[n19]))
|
|
1289
|
+
o2[r19++] = 65533, t19 += i2 - 1;
|
|
1290
|
+
else {
|
|
1291
|
+
for (n19 &= i2 === 2 ? 31 : i2 === 3 ? 15 : 7; 1 < i2 && t19 < s2; )
|
|
1292
|
+
n19 = n19 << 6 | 63 & e3[t19++], i2--;
|
|
1293
|
+
1 < i2 ? o2[r19++] = 65533 : n19 < 65536 ? o2[r19++] = n19 : (n19 -= 65536, o2[r19++] = 55296 | n19 >> 10 & 1023, o2[r19++] = 56320 | 1023 & n19);
|
|
1294
|
+
}
|
|
1295
|
+
return o2.length !== r19 && (o2.subarray ? o2 = o2.subarray(0, r19) : o2.length = r19), a.applyFromCharCode(o2);
|
|
1296
|
+
}(e2 = a.transformTo(f.uint8array ? "uint8array" : "array", e2));
|
|
1297
|
+
}, a.inherits(o, n18), o.prototype.processChunk = function(e2) {
|
|
1298
|
+
var t19 = a.transformTo(f.uint8array ? "uint8array" : "array", e2.data);
|
|
1299
|
+
if (this.leftOver && this.leftOver.length) {
|
|
1300
|
+
if (f.uint8array) {
|
|
1301
|
+
var r19 = t19;
|
|
1302
|
+
(t19 = new Uint8Array(r19.length + this.leftOver.length)).set(this.leftOver, 0), t19.set(r19, this.leftOver.length);
|
|
1303
|
+
} else
|
|
1304
|
+
t19 = this.leftOver.concat(t19);
|
|
1305
|
+
this.leftOver = null;
|
|
1306
|
+
}
|
|
1307
|
+
var n19 = function(e3, t20) {
|
|
1308
|
+
var r20;
|
|
1309
|
+
for ((t20 = t20 || e3.length) > e3.length && (t20 = e3.length), r20 = t20 - 1; 0 <= r20 && (192 & e3[r20]) == 128; )
|
|
1310
|
+
r20--;
|
|
1311
|
+
return r20 < 0 ? t20 : r20 === 0 ? t20 : r20 + u[e3[r20]] > t20 ? r20 : t20;
|
|
1312
|
+
}(t19), i2 = t19;
|
|
1313
|
+
n19 !== t19.length && (f.uint8array ? (i2 = t19.subarray(0, n19), this.leftOver = t19.subarray(n19, t19.length)) : (i2 = t19.slice(0, n19), this.leftOver = t19.slice(n19, t19.length))), this.push({ data: s.utf8decode(i2), meta: e2.meta });
|
|
1314
|
+
}, o.prototype.flush = function() {
|
|
1315
|
+
this.leftOver && this.leftOver.length && (this.push({ data: s.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
1316
|
+
}, s.Utf8DecodeWorker = o, a.inherits(d, n18), d.prototype.processChunk = function(e2) {
|
|
1317
|
+
this.push({ data: s.utf8encode(e2.data), meta: e2.meta });
|
|
1318
|
+
}, s.Utf8EncodeWorker = d;
|
|
1319
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e, t18, a) {
|
|
1320
|
+
"use strict";
|
|
1321
|
+
var f = e("./support"), u = e("./base64"), r18 = e("./nodejsUtils"), n18 = e("set-immediate-shim"), d = e("./external");
|
|
1322
|
+
function i(e2) {
|
|
1323
|
+
return e2;
|
|
1324
|
+
}
|
|
1325
|
+
function h18(e2, t19) {
|
|
1326
|
+
for (var r19 = 0; r19 < e2.length; ++r19)
|
|
1327
|
+
t19[r19] = 255 & e2.charCodeAt(r19);
|
|
1328
|
+
return t19;
|
|
1329
|
+
}
|
|
1330
|
+
a.newBlob = function(t19, r19) {
|
|
1331
|
+
a.checkSupport("blob");
|
|
1332
|
+
try {
|
|
1333
|
+
return new Blob([t19], { type: r19 });
|
|
1334
|
+
} catch (e2) {
|
|
1335
|
+
try {
|
|
1336
|
+
var n19 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
1337
|
+
return n19.append(t19), n19.getBlob(r19);
|
|
1338
|
+
} catch (e3) {
|
|
1339
|
+
throw new Error("Bug : can't construct the Blob.");
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
var s = { stringifyByChunk: function(e2, t19, r19) {
|
|
1344
|
+
var n19 = [], i2 = 0, s2 = e2.length;
|
|
1345
|
+
if (s2 <= r19)
|
|
1346
|
+
return String.fromCharCode.apply(null, e2);
|
|
1347
|
+
for (; i2 < s2; )
|
|
1348
|
+
t19 === "array" || t19 === "nodebuffer" ? n19.push(String.fromCharCode.apply(null, e2.slice(i2, Math.min(i2 + r19, s2)))) : n19.push(String.fromCharCode.apply(null, e2.subarray(i2, Math.min(i2 + r19, s2)))), i2 += r19;
|
|
1349
|
+
return n19.join("");
|
|
1350
|
+
}, stringifyByChar: function(e2) {
|
|
1351
|
+
for (var t19 = "", r19 = 0; r19 < e2.length; r19++)
|
|
1352
|
+
t19 += String.fromCharCode(e2[r19]);
|
|
1353
|
+
return t19;
|
|
1354
|
+
}, applyCanBeUsed: { uint8array: function() {
|
|
1355
|
+
try {
|
|
1356
|
+
return f.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
1357
|
+
} catch (e2) {
|
|
1358
|
+
return false;
|
|
1359
|
+
}
|
|
1360
|
+
}(), nodebuffer: function() {
|
|
1361
|
+
try {
|
|
1362
|
+
return f.nodebuffer && String.fromCharCode.apply(null, r18.allocBuffer(1)).length === 1;
|
|
1363
|
+
} catch (e2) {
|
|
1364
|
+
return false;
|
|
1365
|
+
}
|
|
1366
|
+
}() } };
|
|
1367
|
+
function o(e2) {
|
|
1368
|
+
var t19 = 65536, r19 = a.getTypeOf(e2), n19 = true;
|
|
1369
|
+
if (r19 === "uint8array" ? n19 = s.applyCanBeUsed.uint8array : r19 === "nodebuffer" && (n19 = s.applyCanBeUsed.nodebuffer), n19)
|
|
1370
|
+
for (; 1 < t19; )
|
|
1371
|
+
try {
|
|
1372
|
+
return s.stringifyByChunk(e2, r19, t19);
|
|
1373
|
+
} catch (e3) {
|
|
1374
|
+
t19 = Math.floor(t19 / 2);
|
|
1375
|
+
}
|
|
1376
|
+
return s.stringifyByChar(e2);
|
|
1377
|
+
}
|
|
1378
|
+
function l(e2, t19) {
|
|
1379
|
+
for (var r19 = 0; r19 < e2.length; r19++)
|
|
1380
|
+
t19[r19] = e2[r19];
|
|
1381
|
+
return t19;
|
|
1382
|
+
}
|
|
1383
|
+
a.applyFromCharCode = o;
|
|
1384
|
+
var c = {};
|
|
1385
|
+
c.string = { string: i, array: function(e2) {
|
|
1386
|
+
return h18(e2, new Array(e2.length));
|
|
1387
|
+
}, arraybuffer: function(e2) {
|
|
1388
|
+
return c.string.uint8array(e2).buffer;
|
|
1389
|
+
}, uint8array: function(e2) {
|
|
1390
|
+
return h18(e2, new Uint8Array(e2.length));
|
|
1391
|
+
}, nodebuffer: function(e2) {
|
|
1392
|
+
return h18(e2, r18.allocBuffer(e2.length));
|
|
1393
|
+
} }, c.array = { string: o, array: i, arraybuffer: function(e2) {
|
|
1394
|
+
return new Uint8Array(e2).buffer;
|
|
1395
|
+
}, uint8array: function(e2) {
|
|
1396
|
+
return new Uint8Array(e2);
|
|
1397
|
+
}, nodebuffer: function(e2) {
|
|
1398
|
+
return r18.newBufferFrom(e2);
|
|
1399
|
+
} }, c.arraybuffer = { string: function(e2) {
|
|
1400
|
+
return o(new Uint8Array(e2));
|
|
1401
|
+
}, array: function(e2) {
|
|
1402
|
+
return l(new Uint8Array(e2), new Array(e2.byteLength));
|
|
1403
|
+
}, arraybuffer: i, uint8array: function(e2) {
|
|
1404
|
+
return new Uint8Array(e2);
|
|
1405
|
+
}, nodebuffer: function(e2) {
|
|
1406
|
+
return r18.newBufferFrom(new Uint8Array(e2));
|
|
1407
|
+
} }, c.uint8array = { string: o, array: function(e2) {
|
|
1408
|
+
return l(e2, new Array(e2.length));
|
|
1409
|
+
}, arraybuffer: function(e2) {
|
|
1410
|
+
return e2.buffer;
|
|
1411
|
+
}, uint8array: i, nodebuffer: function(e2) {
|
|
1412
|
+
return r18.newBufferFrom(e2);
|
|
1413
|
+
} }, c.nodebuffer = { string: o, array: function(e2) {
|
|
1414
|
+
return l(e2, new Array(e2.length));
|
|
1415
|
+
}, arraybuffer: function(e2) {
|
|
1416
|
+
return c.nodebuffer.uint8array(e2).buffer;
|
|
1417
|
+
}, uint8array: function(e2) {
|
|
1418
|
+
return l(e2, new Uint8Array(e2.length));
|
|
1419
|
+
}, nodebuffer: i }, a.transformTo = function(e2, t19) {
|
|
1420
|
+
if (t19 = t19 || "", !e2)
|
|
1421
|
+
return t19;
|
|
1422
|
+
a.checkSupport(e2);
|
|
1423
|
+
var r19 = a.getTypeOf(t19);
|
|
1424
|
+
return c[r19][e2](t19);
|
|
1425
|
+
}, a.getTypeOf = function(e2) {
|
|
1426
|
+
return typeof e2 == "string" ? "string" : Object.prototype.toString.call(e2) === "[object Array]" ? "array" : f.nodebuffer && r18.isBuffer(e2) ? "nodebuffer" : f.uint8array && e2 instanceof Uint8Array ? "uint8array" : f.arraybuffer && e2 instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
1427
|
+
}, a.checkSupport = function(e2) {
|
|
1428
|
+
if (!f[e2.toLowerCase()])
|
|
1429
|
+
throw new Error(e2 + " is not supported by this platform");
|
|
1430
|
+
}, a.MAX_VALUE_16BITS = 65535, a.MAX_VALUE_32BITS = -1, a.pretty = function(e2) {
|
|
1431
|
+
var t19, r19, n19 = "";
|
|
1432
|
+
for (r19 = 0; r19 < (e2 || "").length; r19++)
|
|
1433
|
+
n19 += "\\x" + ((t19 = e2.charCodeAt(r19)) < 16 ? "0" : "") + t19.toString(16).toUpperCase();
|
|
1434
|
+
return n19;
|
|
1435
|
+
}, a.delay = function(e2, t19, r19) {
|
|
1436
|
+
n18(function() {
|
|
1437
|
+
e2.apply(r19 || null, t19 || []);
|
|
1438
|
+
});
|
|
1439
|
+
}, a.inherits = function(e2, t19) {
|
|
1440
|
+
function r19() {
|
|
1441
|
+
}
|
|
1442
|
+
r19.prototype = t19.prototype, e2.prototype = new r19();
|
|
1443
|
+
}, a.extend = function() {
|
|
1444
|
+
var e2, t19, r19 = {};
|
|
1445
|
+
for (e2 = 0; e2 < arguments.length; e2++)
|
|
1446
|
+
for (t19 in arguments[e2])
|
|
1447
|
+
arguments[e2].hasOwnProperty(t19) && r19[t19] === void 0 && (r19[t19] = arguments[e2][t19]);
|
|
1448
|
+
return r19;
|
|
1449
|
+
}, a.prepareContent = function(n19, e2, i2, s2, o2) {
|
|
1450
|
+
return d.Promise.resolve(e2).then(function(n20) {
|
|
1451
|
+
return f.blob && (n20 instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n20)) !== -1) && typeof FileReader != "undefined" ? new d.Promise(function(t19, r19) {
|
|
1452
|
+
var e3 = new FileReader();
|
|
1453
|
+
e3.onload = function(e4) {
|
|
1454
|
+
t19(e4.target.result);
|
|
1455
|
+
}, e3.onerror = function(e4) {
|
|
1456
|
+
r19(e4.target.error);
|
|
1457
|
+
}, e3.readAsArrayBuffer(n20);
|
|
1458
|
+
}) : n20;
|
|
1459
|
+
}).then(function(e3) {
|
|
1460
|
+
var t19, r19 = a.getTypeOf(e3);
|
|
1461
|
+
return r19 ? (r19 === "arraybuffer" ? e3 = a.transformTo("uint8array", e3) : r19 === "string" && (o2 ? e3 = u.decode(e3) : i2 && s2 !== true && (e3 = h18(t19 = e3, f.uint8array ? new Uint8Array(t19.length) : new Array(t19.length)))), e3) : d.Promise.reject(new Error("Can't read the data of '" + n19 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
1462
|
+
});
|
|
1463
|
+
};
|
|
1464
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, "set-immediate-shim": 54 }], 33: [function(e, t18, r18) {
|
|
1465
|
+
"use strict";
|
|
1466
|
+
var n18 = e("./reader/readerFor"), i = e("./utils"), s = e("./signature"), o = e("./zipEntry"), a = (e("./utf8"), e("./support"));
|
|
1467
|
+
function f(e2) {
|
|
1468
|
+
this.files = [], this.loadOptions = e2;
|
|
1469
|
+
}
|
|
1470
|
+
f.prototype = { checkSignature: function(e2) {
|
|
1471
|
+
if (!this.reader.readAndCheckSignature(e2)) {
|
|
1472
|
+
this.reader.index -= 4;
|
|
1473
|
+
var t19 = this.reader.readString(4);
|
|
1474
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(t19) + ", expected " + i.pretty(e2) + ")");
|
|
1475
|
+
}
|
|
1476
|
+
}, isSignature: function(e2, t19) {
|
|
1477
|
+
var r19 = this.reader.index;
|
|
1478
|
+
this.reader.setIndex(e2);
|
|
1479
|
+
var n19 = this.reader.readString(4) === t19;
|
|
1480
|
+
return this.reader.setIndex(r19), n19;
|
|
1481
|
+
}, readBlockEndOfCentral: function() {
|
|
1482
|
+
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);
|
|
1483
|
+
var e2 = this.reader.readData(this.zipCommentLength), t19 = a.uint8array ? "uint8array" : "array", r19 = i.transformTo(t19, e2);
|
|
1484
|
+
this.zipComment = this.loadOptions.decodeFileName(r19);
|
|
1485
|
+
}, readBlockZip64EndOfCentral: function() {
|
|
1486
|
+
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 = {};
|
|
1487
|
+
for (var e2, t19, r19, n19 = this.zip64EndOfCentralSize - 44; 0 < n19; )
|
|
1488
|
+
e2 = this.reader.readInt(2), t19 = this.reader.readInt(4), r19 = this.reader.readData(t19), this.zip64ExtensibleData[e2] = { id: e2, length: t19, value: r19 };
|
|
1489
|
+
}, readBlockZip64EndOfCentralLocator: function() {
|
|
1490
|
+
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount)
|
|
1491
|
+
throw new Error("Multi-volumes zip are not supported");
|
|
1492
|
+
}, readLocalFiles: function() {
|
|
1493
|
+
var e2, t19;
|
|
1494
|
+
for (e2 = 0; e2 < this.files.length; e2++)
|
|
1495
|
+
t19 = this.files[e2], this.reader.setIndex(t19.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t19.readLocalPart(this.reader), t19.handleUTF8(), t19.processAttributes();
|
|
1496
|
+
}, readCentralDir: function() {
|
|
1497
|
+
var e2;
|
|
1498
|
+
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER); )
|
|
1499
|
+
(e2 = new o({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e2);
|
|
1500
|
+
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0)
|
|
1501
|
+
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
1502
|
+
}, readEndOfCentral: function() {
|
|
1503
|
+
var e2 = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
|
|
1504
|
+
if (e2 < 0)
|
|
1505
|
+
throw this.isSignature(0, s.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");
|
|
1506
|
+
this.reader.setIndex(e2);
|
|
1507
|
+
var t19 = e2;
|
|
1508
|
+
if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i.MAX_VALUE_16BITS || this.centralDirRecords === i.MAX_VALUE_16BITS || this.centralDirSize === i.MAX_VALUE_32BITS || this.centralDirOffset === i.MAX_VALUE_32BITS) {
|
|
1509
|
+
if (this.zip64 = true, (e2 = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0)
|
|
1510
|
+
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
1511
|
+
if (this.reader.setIndex(e2), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0))
|
|
1512
|
+
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
1513
|
+
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
1514
|
+
}
|
|
1515
|
+
var r19 = this.centralDirOffset + this.centralDirSize;
|
|
1516
|
+
this.zip64 && (r19 += 20, r19 += 12 + this.zip64EndOfCentralSize);
|
|
1517
|
+
var n19 = t19 - r19;
|
|
1518
|
+
if (0 < n19)
|
|
1519
|
+
this.isSignature(t19, s.CENTRAL_FILE_HEADER) || (this.reader.zero = n19);
|
|
1520
|
+
else if (n19 < 0)
|
|
1521
|
+
throw new Error("Corrupted zip: missing " + Math.abs(n19) + " bytes.");
|
|
1522
|
+
}, prepareReader: function(e2) {
|
|
1523
|
+
this.reader = n18(e2);
|
|
1524
|
+
}, load: function(e2) {
|
|
1525
|
+
this.prepareReader(e2), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
1526
|
+
} }, t18.exports = f;
|
|
1527
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utf8": 31, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, t18, r18) {
|
|
1528
|
+
"use strict";
|
|
1529
|
+
var n18 = e("./reader/readerFor"), s = e("./utils"), i = e("./compressedObject"), o = e("./crc32"), a = e("./utf8"), f = e("./compressions"), u = e("./support");
|
|
1530
|
+
function d(e2, t19) {
|
|
1531
|
+
this.options = e2, this.loadOptions = t19;
|
|
1532
|
+
}
|
|
1533
|
+
d.prototype = { isEncrypted: function() {
|
|
1534
|
+
return (1 & this.bitFlag) == 1;
|
|
1535
|
+
}, useUTF8: function() {
|
|
1536
|
+
return (2048 & this.bitFlag) == 2048;
|
|
1537
|
+
}, readLocalPart: function(e2) {
|
|
1538
|
+
var t19, r19;
|
|
1539
|
+
if (e2.skip(22), this.fileNameLength = e2.readInt(2), r19 = e2.readInt(2), this.fileName = e2.readData(this.fileNameLength), e2.skip(r19), this.compressedSize === -1 || this.uncompressedSize === -1)
|
|
1540
|
+
throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
1541
|
+
if ((t19 = function(e3) {
|
|
1542
|
+
for (var t20 in f)
|
|
1543
|
+
if (f.hasOwnProperty(t20) && f[t20].magic === e3)
|
|
1544
|
+
return f[t20];
|
|
1545
|
+
return null;
|
|
1546
|
+
}(this.compressionMethod)) === null)
|
|
1547
|
+
throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
|
|
1548
|
+
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, t19, e2.readData(this.compressedSize));
|
|
1549
|
+
}, readCentralPart: function(e2) {
|
|
1550
|
+
this.versionMadeBy = e2.readInt(2), e2.skip(2), this.bitFlag = e2.readInt(2), this.compressionMethod = e2.readString(2), this.date = e2.readDate(), this.crc32 = e2.readInt(4), this.compressedSize = e2.readInt(4), this.uncompressedSize = e2.readInt(4);
|
|
1551
|
+
var t19 = e2.readInt(2);
|
|
1552
|
+
if (this.extraFieldsLength = e2.readInt(2), this.fileCommentLength = e2.readInt(2), this.diskNumberStart = e2.readInt(2), this.internalFileAttributes = e2.readInt(2), this.externalFileAttributes = e2.readInt(4), this.localHeaderOffset = e2.readInt(4), this.isEncrypted())
|
|
1553
|
+
throw new Error("Encrypted zip are not supported");
|
|
1554
|
+
e2.skip(t19), this.readExtraFields(e2), this.parseZIP64ExtraField(e2), this.fileComment = e2.readData(this.fileCommentLength);
|
|
1555
|
+
}, processAttributes: function() {
|
|
1556
|
+
this.unixPermissions = null, this.dosPermissions = null;
|
|
1557
|
+
var e2 = this.versionMadeBy >> 8;
|
|
1558
|
+
this.dir = !!(16 & this.externalFileAttributes), e2 == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), e2 == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = true);
|
|
1559
|
+
}, parseZIP64ExtraField: function(e2) {
|
|
1560
|
+
if (this.extraFields[1]) {
|
|
1561
|
+
var t19 = n18(this.extraFields[1].value);
|
|
1562
|
+
this.uncompressedSize === s.MAX_VALUE_32BITS && (this.uncompressedSize = t19.readInt(8)), this.compressedSize === s.MAX_VALUE_32BITS && (this.compressedSize = t19.readInt(8)), this.localHeaderOffset === s.MAX_VALUE_32BITS && (this.localHeaderOffset = t19.readInt(8)), this.diskNumberStart === s.MAX_VALUE_32BITS && (this.diskNumberStart = t19.readInt(4));
|
|
1563
|
+
}
|
|
1564
|
+
}, readExtraFields: function(e2) {
|
|
1565
|
+
var t19, r19, n19, i2 = e2.index + this.extraFieldsLength;
|
|
1566
|
+
for (this.extraFields || (this.extraFields = {}); e2.index + 4 < i2; )
|
|
1567
|
+
t19 = e2.readInt(2), r19 = e2.readInt(2), n19 = e2.readData(r19), this.extraFields[t19] = { id: t19, length: r19, value: n19 };
|
|
1568
|
+
e2.setIndex(i2);
|
|
1569
|
+
}, handleUTF8: function() {
|
|
1570
|
+
var e2 = u.uint8array ? "uint8array" : "array";
|
|
1571
|
+
if (this.useUTF8())
|
|
1572
|
+
this.fileNameStr = a.utf8decode(this.fileName), this.fileCommentStr = a.utf8decode(this.fileComment);
|
|
1573
|
+
else {
|
|
1574
|
+
var t19 = this.findExtraFieldUnicodePath();
|
|
1575
|
+
if (t19 !== null)
|
|
1576
|
+
this.fileNameStr = t19;
|
|
1577
|
+
else {
|
|
1578
|
+
var r19 = s.transformTo(e2, this.fileName);
|
|
1579
|
+
this.fileNameStr = this.loadOptions.decodeFileName(r19);
|
|
1580
|
+
}
|
|
1581
|
+
var n19 = this.findExtraFieldUnicodeComment();
|
|
1582
|
+
if (n19 !== null)
|
|
1583
|
+
this.fileCommentStr = n19;
|
|
1584
|
+
else {
|
|
1585
|
+
var i2 = s.transformTo(e2, this.fileComment);
|
|
1586
|
+
this.fileCommentStr = this.loadOptions.decodeFileName(i2);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}, findExtraFieldUnicodePath: function() {
|
|
1590
|
+
var e2 = this.extraFields[28789];
|
|
1591
|
+
if (e2) {
|
|
1592
|
+
var t19 = n18(e2.value);
|
|
1593
|
+
return t19.readInt(1) !== 1 ? null : o(this.fileName) !== t19.readInt(4) ? null : a.utf8decode(t19.readData(e2.length - 5));
|
|
1594
|
+
}
|
|
1595
|
+
return null;
|
|
1596
|
+
}, findExtraFieldUnicodeComment: function() {
|
|
1597
|
+
var e2 = this.extraFields[25461];
|
|
1598
|
+
if (e2) {
|
|
1599
|
+
var t19 = n18(e2.value);
|
|
1600
|
+
return t19.readInt(1) !== 1 ? null : o(this.fileComment) !== t19.readInt(4) ? null : a.utf8decode(t19.readData(e2.length - 5));
|
|
1601
|
+
}
|
|
1602
|
+
return null;
|
|
1603
|
+
} }, t18.exports = d;
|
|
1604
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e, t18, r18) {
|
|
1605
|
+
"use strict";
|
|
1606
|
+
function n18(e2, t19, r19) {
|
|
1607
|
+
this.name = e2, this.dir = r19.dir, this.date = r19.date, this.comment = r19.comment, this.unixPermissions = r19.unixPermissions, this.dosPermissions = r19.dosPermissions, this._data = t19, this._dataBinary = r19.binary, this.options = { compression: r19.compression, compressionOptions: r19.compressionOptions };
|
|
1608
|
+
}
|
|
1609
|
+
var s = e("./stream/StreamHelper"), i = e("./stream/DataWorker"), o = e("./utf8"), a = e("./compressedObject"), f = e("./stream/GenericWorker");
|
|
1610
|
+
n18.prototype = { internalStream: function(e2) {
|
|
1611
|
+
var t19 = null, r19 = "string";
|
|
1612
|
+
try {
|
|
1613
|
+
if (!e2)
|
|
1614
|
+
throw new Error("No output type specified.");
|
|
1615
|
+
var n19 = (r19 = e2.toLowerCase()) === "string" || r19 === "text";
|
|
1616
|
+
r19 !== "binarystring" && r19 !== "text" || (r19 = "string"), t19 = this._decompressWorker();
|
|
1617
|
+
var i2 = !this._dataBinary;
|
|
1618
|
+
i2 && !n19 && (t19 = t19.pipe(new o.Utf8EncodeWorker())), !i2 && n19 && (t19 = t19.pipe(new o.Utf8DecodeWorker()));
|
|
1619
|
+
} catch (e3) {
|
|
1620
|
+
(t19 = new f("error")).error(e3);
|
|
1621
|
+
}
|
|
1622
|
+
return new s(t19, r19, "");
|
|
1623
|
+
}, async: function(e2, t19) {
|
|
1624
|
+
return this.internalStream(e2).accumulate(t19);
|
|
1625
|
+
}, nodeStream: function(e2, t19) {
|
|
1626
|
+
return this.internalStream(e2 || "nodebuffer").toNodejsStream(t19);
|
|
1627
|
+
}, _compressWorker: function(e2, t19) {
|
|
1628
|
+
if (this._data instanceof a && this._data.compression.magic === e2.magic)
|
|
1629
|
+
return this._data.getCompressedWorker();
|
|
1630
|
+
var r19 = this._decompressWorker();
|
|
1631
|
+
return this._dataBinary || (r19 = r19.pipe(new o.Utf8EncodeWorker())), a.createWorkerFrom(r19, e2, t19);
|
|
1632
|
+
}, _decompressWorker: function() {
|
|
1633
|
+
return this._data instanceof a ? this._data.getContentWorker() : this._data instanceof f ? this._data : new i(this._data);
|
|
1634
|
+
} };
|
|
1635
|
+
for (var u = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], d = function() {
|
|
1636
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1637
|
+
}, h18 = 0; h18 < u.length; h18++)
|
|
1638
|
+
n18.prototype[u[h18]] = d;
|
|
1639
|
+
t18.exports = n18;
|
|
1640
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e, d, t18) {
|
|
1641
|
+
(function(t19) {
|
|
1642
|
+
"use strict";
|
|
1643
|
+
var r18, n18, e2 = t19.MutationObserver || t19.WebKitMutationObserver;
|
|
1644
|
+
if (e2) {
|
|
1645
|
+
var i = 0, s = new e2(u), o = t19.document.createTextNode("");
|
|
1646
|
+
s.observe(o, { characterData: true }), r18 = function() {
|
|
1647
|
+
o.data = i = ++i % 2;
|
|
1648
|
+
};
|
|
1649
|
+
} else if (t19.setImmediate || t19.MessageChannel === void 0)
|
|
1650
|
+
r18 = "document" in t19 && "onreadystatechange" in t19.document.createElement("script") ? function() {
|
|
1651
|
+
var e3 = t19.document.createElement("script");
|
|
1652
|
+
e3.onreadystatechange = function() {
|
|
1653
|
+
u(), e3.onreadystatechange = null, e3.parentNode.removeChild(e3), e3 = null;
|
|
1654
|
+
}, t19.document.documentElement.appendChild(e3);
|
|
1655
|
+
} : function() {
|
|
1656
|
+
setTimeout(u, 0);
|
|
1657
|
+
};
|
|
1658
|
+
else {
|
|
1659
|
+
var a = new t19.MessageChannel();
|
|
1660
|
+
a.port1.onmessage = u, r18 = function() {
|
|
1661
|
+
a.port2.postMessage(0);
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
var f = [];
|
|
1665
|
+
function u() {
|
|
1666
|
+
var e3, t20;
|
|
1667
|
+
n18 = true;
|
|
1668
|
+
for (var r19 = f.length; r19; ) {
|
|
1669
|
+
for (t20 = f, f = [], e3 = -1; ++e3 < r19; )
|
|
1670
|
+
t20[e3]();
|
|
1671
|
+
r19 = f.length;
|
|
1672
|
+
}
|
|
1673
|
+
n18 = false;
|
|
1674
|
+
}
|
|
1675
|
+
d.exports = function(e3) {
|
|
1676
|
+
f.push(e3) !== 1 || n18 || r18();
|
|
1677
|
+
};
|
|
1678
|
+
}).call(this, r17 !== void 0 ? r17 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
1679
|
+
}, {}], 37: [function(e, t18, r18) {
|
|
1680
|
+
"use strict";
|
|
1681
|
+
var i = e("immediate");
|
|
1682
|
+
function u() {
|
|
1683
|
+
}
|
|
1684
|
+
var d = {}, s = ["REJECTED"], o = ["FULFILLED"], n18 = ["PENDING"];
|
|
1685
|
+
function a(e2) {
|
|
1686
|
+
if (typeof e2 != "function")
|
|
1687
|
+
throw new TypeError("resolver must be a function");
|
|
1688
|
+
this.state = n18, this.queue = [], this.outcome = void 0, e2 !== u && c(this, e2);
|
|
1689
|
+
}
|
|
1690
|
+
function f(e2, t19, r19) {
|
|
1691
|
+
this.promise = e2, typeof t19 == "function" && (this.onFulfilled = t19, this.callFulfilled = this.otherCallFulfilled), typeof r19 == "function" && (this.onRejected = r19, this.callRejected = this.otherCallRejected);
|
|
1692
|
+
}
|
|
1693
|
+
function h18(t19, r19, n19) {
|
|
1694
|
+
i(function() {
|
|
1695
|
+
var e2;
|
|
1696
|
+
try {
|
|
1697
|
+
e2 = r19(n19);
|
|
1698
|
+
} catch (e3) {
|
|
1699
|
+
return d.reject(t19, e3);
|
|
1700
|
+
}
|
|
1701
|
+
e2 === t19 ? d.reject(t19, new TypeError("Cannot resolve promise with itself")) : d.resolve(t19, e2);
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
function l(e2) {
|
|
1705
|
+
var t19 = e2 && e2.then;
|
|
1706
|
+
if (e2 && (typeof e2 == "object" || typeof e2 == "function") && typeof t19 == "function")
|
|
1707
|
+
return function() {
|
|
1708
|
+
t19.apply(e2, arguments);
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
function c(t19, e2) {
|
|
1712
|
+
var r19 = false;
|
|
1713
|
+
function n19(e3) {
|
|
1714
|
+
r19 || (r19 = true, d.reject(t19, e3));
|
|
1715
|
+
}
|
|
1716
|
+
function i2(e3) {
|
|
1717
|
+
r19 || (r19 = true, d.resolve(t19, e3));
|
|
1718
|
+
}
|
|
1719
|
+
var s2 = p(function() {
|
|
1720
|
+
e2(i2, n19);
|
|
1721
|
+
});
|
|
1722
|
+
s2.status === "error" && n19(s2.value);
|
|
1723
|
+
}
|
|
1724
|
+
function p(e2, t19) {
|
|
1725
|
+
var r19 = {};
|
|
1726
|
+
try {
|
|
1727
|
+
r19.value = e2(t19), r19.status = "success";
|
|
1728
|
+
} catch (e3) {
|
|
1729
|
+
r19.status = "error", r19.value = e3;
|
|
1730
|
+
}
|
|
1731
|
+
return r19;
|
|
1732
|
+
}
|
|
1733
|
+
(t18.exports = a).prototype.finally = function(t19) {
|
|
1734
|
+
if (typeof t19 != "function")
|
|
1735
|
+
return this;
|
|
1736
|
+
var r19 = this.constructor;
|
|
1737
|
+
return this.then(function(e2) {
|
|
1738
|
+
return r19.resolve(t19()).then(function() {
|
|
1739
|
+
return e2;
|
|
1740
|
+
});
|
|
1741
|
+
}, function(e2) {
|
|
1742
|
+
return r19.resolve(t19()).then(function() {
|
|
1743
|
+
throw e2;
|
|
1744
|
+
});
|
|
1745
|
+
});
|
|
1746
|
+
}, a.prototype.catch = function(e2) {
|
|
1747
|
+
return this.then(null, e2);
|
|
1748
|
+
}, a.prototype.then = function(e2, t19) {
|
|
1749
|
+
if (typeof e2 != "function" && this.state === o || typeof t19 != "function" && this.state === s)
|
|
1750
|
+
return this;
|
|
1751
|
+
var r19 = new this.constructor(u);
|
|
1752
|
+
return this.state !== n18 ? h18(r19, this.state === o ? e2 : t19, this.outcome) : this.queue.push(new f(r19, e2, t19)), r19;
|
|
1753
|
+
}, f.prototype.callFulfilled = function(e2) {
|
|
1754
|
+
d.resolve(this.promise, e2);
|
|
1755
|
+
}, f.prototype.otherCallFulfilled = function(e2) {
|
|
1756
|
+
h18(this.promise, this.onFulfilled, e2);
|
|
1757
|
+
}, f.prototype.callRejected = function(e2) {
|
|
1758
|
+
d.reject(this.promise, e2);
|
|
1759
|
+
}, f.prototype.otherCallRejected = function(e2) {
|
|
1760
|
+
h18(this.promise, this.onRejected, e2);
|
|
1761
|
+
}, d.resolve = function(e2, t19) {
|
|
1762
|
+
var r19 = p(l, t19);
|
|
1763
|
+
if (r19.status === "error")
|
|
1764
|
+
return d.reject(e2, r19.value);
|
|
1765
|
+
var n19 = r19.value;
|
|
1766
|
+
if (n19)
|
|
1767
|
+
c(e2, n19);
|
|
1768
|
+
else {
|
|
1769
|
+
e2.state = o, e2.outcome = t19;
|
|
1770
|
+
for (var i2 = -1, s2 = e2.queue.length; ++i2 < s2; )
|
|
1771
|
+
e2.queue[i2].callFulfilled(t19);
|
|
1772
|
+
}
|
|
1773
|
+
return e2;
|
|
1774
|
+
}, d.reject = function(e2, t19) {
|
|
1775
|
+
e2.state = s, e2.outcome = t19;
|
|
1776
|
+
for (var r19 = -1, n19 = e2.queue.length; ++r19 < n19; )
|
|
1777
|
+
e2.queue[r19].callRejected(t19);
|
|
1778
|
+
return e2;
|
|
1779
|
+
}, a.resolve = function(e2) {
|
|
1780
|
+
return e2 instanceof this ? e2 : d.resolve(new this(u), e2);
|
|
1781
|
+
}, a.reject = function(e2) {
|
|
1782
|
+
var t19 = new this(u);
|
|
1783
|
+
return d.reject(t19, e2);
|
|
1784
|
+
}, a.all = function(e2) {
|
|
1785
|
+
var r19 = this;
|
|
1786
|
+
if (Object.prototype.toString.call(e2) !== "[object Array]")
|
|
1787
|
+
return this.reject(new TypeError("must be an array"));
|
|
1788
|
+
var n19 = e2.length, i2 = false;
|
|
1789
|
+
if (!n19)
|
|
1790
|
+
return this.resolve([]);
|
|
1791
|
+
for (var s2 = new Array(n19), o2 = 0, t19 = -1, a2 = new this(u); ++t19 < n19; )
|
|
1792
|
+
f2(e2[t19], t19);
|
|
1793
|
+
return a2;
|
|
1794
|
+
function f2(e3, t20) {
|
|
1795
|
+
r19.resolve(e3).then(function(e4) {
|
|
1796
|
+
s2[t20] = e4, ++o2 !== n19 || i2 || (i2 = true, d.resolve(a2, s2));
|
|
1797
|
+
}, function(e4) {
|
|
1798
|
+
i2 || (i2 = true, d.reject(a2, e4));
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
}, a.race = function(e2) {
|
|
1802
|
+
if (Object.prototype.toString.call(e2) !== "[object Array]")
|
|
1803
|
+
return this.reject(new TypeError("must be an array"));
|
|
1804
|
+
var t19 = e2.length, r19 = false;
|
|
1805
|
+
if (!t19)
|
|
1806
|
+
return this.resolve([]);
|
|
1807
|
+
for (var n19, i2 = -1, s2 = new this(u); ++i2 < t19; )
|
|
1808
|
+
n19 = e2[i2], this.resolve(n19).then(function(e3) {
|
|
1809
|
+
r19 || (r19 = true, d.resolve(s2, e3));
|
|
1810
|
+
}, function(e3) {
|
|
1811
|
+
r19 || (r19 = true, d.reject(s2, e3));
|
|
1812
|
+
});
|
|
1813
|
+
return s2;
|
|
1814
|
+
};
|
|
1815
|
+
}, { immediate: 36 }], 38: [function(e, t18, r18) {
|
|
1816
|
+
"use strict";
|
|
1817
|
+
var n18 = {};
|
|
1818
|
+
(0, e("./lib/utils/common").assign)(n18, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t18.exports = n18;
|
|
1819
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, t18, r18) {
|
|
1820
|
+
"use strict";
|
|
1821
|
+
var o = e("./zlib/deflate"), a = e("./utils/common"), f = e("./utils/strings"), i = e("./zlib/messages"), s = e("./zlib/zstream"), u = Object.prototype.toString, d = 0, h18 = -1, l = 0, c = 8;
|
|
1822
|
+
function p(e2) {
|
|
1823
|
+
if (!(this instanceof p))
|
|
1824
|
+
return new p(e2);
|
|
1825
|
+
this.options = a.assign({ level: h18, method: c, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: l, to: "" }, e2 || {});
|
|
1826
|
+
var t19 = this.options;
|
|
1827
|
+
t19.raw && 0 < t19.windowBits ? t19.windowBits = -t19.windowBits : t19.gzip && 0 < t19.windowBits && t19.windowBits < 16 && (t19.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new s(), this.strm.avail_out = 0;
|
|
1828
|
+
var r19 = o.deflateInit2(this.strm, t19.level, t19.method, t19.windowBits, t19.memLevel, t19.strategy);
|
|
1829
|
+
if (r19 !== d)
|
|
1830
|
+
throw new Error(i[r19]);
|
|
1831
|
+
if (t19.header && o.deflateSetHeader(this.strm, t19.header), t19.dictionary) {
|
|
1832
|
+
var n19;
|
|
1833
|
+
if (n19 = typeof t19.dictionary == "string" ? f.string2buf(t19.dictionary) : u.call(t19.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(t19.dictionary) : t19.dictionary, (r19 = o.deflateSetDictionary(this.strm, n19)) !== d)
|
|
1834
|
+
throw new Error(i[r19]);
|
|
1835
|
+
this._dict_set = true;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
function n18(e2, t19) {
|
|
1839
|
+
var r19 = new p(t19);
|
|
1840
|
+
if (r19.push(e2, true), r19.err)
|
|
1841
|
+
throw r19.msg || i[r19.err];
|
|
1842
|
+
return r19.result;
|
|
1843
|
+
}
|
|
1844
|
+
p.prototype.push = function(e2, t19) {
|
|
1845
|
+
var r19, n19, i2 = this.strm, s2 = this.options.chunkSize;
|
|
1846
|
+
if (this.ended)
|
|
1847
|
+
return false;
|
|
1848
|
+
n19 = t19 === ~~t19 ? t19 : t19 === true ? 4 : 0, typeof e2 == "string" ? i2.input = f.string2buf(e2) : u.call(e2) === "[object ArrayBuffer]" ? i2.input = new Uint8Array(e2) : i2.input = e2, i2.next_in = 0, i2.avail_in = i2.input.length;
|
|
1849
|
+
do {
|
|
1850
|
+
if (i2.avail_out === 0 && (i2.output = new a.Buf8(s2), i2.next_out = 0, i2.avail_out = s2), (r19 = o.deflate(i2, n19)) !== 1 && r19 !== d)
|
|
1851
|
+
return this.onEnd(r19), !(this.ended = true);
|
|
1852
|
+
i2.avail_out !== 0 && (i2.avail_in !== 0 || n19 !== 4 && n19 !== 2) || (this.options.to === "string" ? this.onData(f.buf2binstring(a.shrinkBuf(i2.output, i2.next_out))) : this.onData(a.shrinkBuf(i2.output, i2.next_out)));
|
|
1853
|
+
} while ((0 < i2.avail_in || i2.avail_out === 0) && r19 !== 1);
|
|
1854
|
+
return n19 === 4 ? (r19 = o.deflateEnd(this.strm), this.onEnd(r19), this.ended = true, r19 === d) : n19 !== 2 || (this.onEnd(d), !(i2.avail_out = 0));
|
|
1855
|
+
}, p.prototype.onData = function(e2) {
|
|
1856
|
+
this.chunks.push(e2);
|
|
1857
|
+
}, p.prototype.onEnd = function(e2) {
|
|
1858
|
+
e2 === d && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = a.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
|
1859
|
+
}, r18.Deflate = p, r18.deflate = n18, r18.deflateRaw = function(e2, t19) {
|
|
1860
|
+
return (t19 = t19 || {}).raw = true, n18(e2, t19);
|
|
1861
|
+
}, r18.gzip = function(e2, t19) {
|
|
1862
|
+
return (t19 = t19 || {}).gzip = true, n18(e2, t19);
|
|
1863
|
+
};
|
|
1864
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e, t18, r18) {
|
|
1865
|
+
"use strict";
|
|
1866
|
+
var l = e("./zlib/inflate"), c = e("./utils/common"), p = e("./utils/strings"), m = e("./zlib/constants"), n18 = e("./zlib/messages"), i = e("./zlib/zstream"), s = e("./zlib/gzheader"), _ = Object.prototype.toString;
|
|
1867
|
+
function o(e2) {
|
|
1868
|
+
if (!(this instanceof o))
|
|
1869
|
+
return new o(e2);
|
|
1870
|
+
this.options = c.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {});
|
|
1871
|
+
var t19 = this.options;
|
|
1872
|
+
t19.raw && 0 <= t19.windowBits && t19.windowBits < 16 && (t19.windowBits = -t19.windowBits, t19.windowBits === 0 && (t19.windowBits = -15)), !(0 <= t19.windowBits && t19.windowBits < 16) || e2 && e2.windowBits || (t19.windowBits += 32), 15 < t19.windowBits && t19.windowBits < 48 && (15 & t19.windowBits) == 0 && (t19.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new i(), this.strm.avail_out = 0;
|
|
1873
|
+
var r19 = l.inflateInit2(this.strm, t19.windowBits);
|
|
1874
|
+
if (r19 !== m.Z_OK)
|
|
1875
|
+
throw new Error(n18[r19]);
|
|
1876
|
+
this.header = new s(), l.inflateGetHeader(this.strm, this.header);
|
|
1877
|
+
}
|
|
1878
|
+
function a(e2, t19) {
|
|
1879
|
+
var r19 = new o(t19);
|
|
1880
|
+
if (r19.push(e2, true), r19.err)
|
|
1881
|
+
throw r19.msg || n18[r19.err];
|
|
1882
|
+
return r19.result;
|
|
1883
|
+
}
|
|
1884
|
+
o.prototype.push = function(e2, t19) {
|
|
1885
|
+
var r19, n19, i2, s2, o2, a2, f = this.strm, u = this.options.chunkSize, d = this.options.dictionary, h18 = false;
|
|
1886
|
+
if (this.ended)
|
|
1887
|
+
return false;
|
|
1888
|
+
n19 = t19 === ~~t19 ? t19 : t19 === true ? m.Z_FINISH : m.Z_NO_FLUSH, typeof e2 == "string" ? f.input = p.binstring2buf(e2) : _.call(e2) === "[object ArrayBuffer]" ? f.input = new Uint8Array(e2) : f.input = e2, f.next_in = 0, f.avail_in = f.input.length;
|
|
1889
|
+
do {
|
|
1890
|
+
if (f.avail_out === 0 && (f.output = new c.Buf8(u), f.next_out = 0, f.avail_out = u), (r19 = l.inflate(f, m.Z_NO_FLUSH)) === m.Z_NEED_DICT && d && (a2 = typeof d == "string" ? p.string2buf(d) : _.call(d) === "[object ArrayBuffer]" ? new Uint8Array(d) : d, r19 = l.inflateSetDictionary(this.strm, a2)), r19 === m.Z_BUF_ERROR && h18 === true && (r19 = m.Z_OK, h18 = false), r19 !== m.Z_STREAM_END && r19 !== m.Z_OK)
|
|
1891
|
+
return this.onEnd(r19), !(this.ended = true);
|
|
1892
|
+
f.next_out && (f.avail_out !== 0 && r19 !== m.Z_STREAM_END && (f.avail_in !== 0 || n19 !== m.Z_FINISH && n19 !== m.Z_SYNC_FLUSH) || (this.options.to === "string" ? (i2 = p.utf8border(f.output, f.next_out), s2 = f.next_out - i2, o2 = p.buf2string(f.output, i2), f.next_out = s2, f.avail_out = u - s2, s2 && c.arraySet(f.output, f.output, i2, s2, 0), this.onData(o2)) : this.onData(c.shrinkBuf(f.output, f.next_out)))), f.avail_in === 0 && f.avail_out === 0 && (h18 = true);
|
|
1893
|
+
} while ((0 < f.avail_in || f.avail_out === 0) && r19 !== m.Z_STREAM_END);
|
|
1894
|
+
return r19 === m.Z_STREAM_END && (n19 = m.Z_FINISH), n19 === m.Z_FINISH ? (r19 = l.inflateEnd(this.strm), this.onEnd(r19), this.ended = true, r19 === m.Z_OK) : n19 !== m.Z_SYNC_FLUSH || (this.onEnd(m.Z_OK), !(f.avail_out = 0));
|
|
1895
|
+
}, o.prototype.onData = function(e2) {
|
|
1896
|
+
this.chunks.push(e2);
|
|
1897
|
+
}, o.prototype.onEnd = function(e2) {
|
|
1898
|
+
e2 === m.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = c.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
|
1899
|
+
}, r18.Inflate = o, r18.inflate = a, r18.inflateRaw = function(e2, t19) {
|
|
1900
|
+
return (t19 = t19 || {}).raw = true, a(e2, t19);
|
|
1901
|
+
}, r18.ungzip = a;
|
|
1902
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(e, t18, r18) {
|
|
1903
|
+
"use strict";
|
|
1904
|
+
var n18 = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Int32Array != "undefined";
|
|
1905
|
+
r18.assign = function(e2) {
|
|
1906
|
+
for (var t19 = Array.prototype.slice.call(arguments, 1); t19.length; ) {
|
|
1907
|
+
var r19 = t19.shift();
|
|
1908
|
+
if (r19) {
|
|
1909
|
+
if (typeof r19 != "object")
|
|
1910
|
+
throw new TypeError(r19 + "must be non-object");
|
|
1911
|
+
for (var n19 in r19)
|
|
1912
|
+
r19.hasOwnProperty(n19) && (e2[n19] = r19[n19]);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
return e2;
|
|
1916
|
+
}, r18.shrinkBuf = function(e2, t19) {
|
|
1917
|
+
return e2.length === t19 ? e2 : e2.subarray ? e2.subarray(0, t19) : (e2.length = t19, e2);
|
|
1918
|
+
};
|
|
1919
|
+
var i = { arraySet: function(e2, t19, r19, n19, i2) {
|
|
1920
|
+
if (t19.subarray && e2.subarray)
|
|
1921
|
+
e2.set(t19.subarray(r19, r19 + n19), i2);
|
|
1922
|
+
else
|
|
1923
|
+
for (var s2 = 0; s2 < n19; s2++)
|
|
1924
|
+
e2[i2 + s2] = t19[r19 + s2];
|
|
1925
|
+
}, flattenChunks: function(e2) {
|
|
1926
|
+
var t19, r19, n19, i2, s2, o;
|
|
1927
|
+
for (t19 = n19 = 0, r19 = e2.length; t19 < r19; t19++)
|
|
1928
|
+
n19 += e2[t19].length;
|
|
1929
|
+
for (o = new Uint8Array(n19), t19 = i2 = 0, r19 = e2.length; t19 < r19; t19++)
|
|
1930
|
+
s2 = e2[t19], o.set(s2, i2), i2 += s2.length;
|
|
1931
|
+
return o;
|
|
1932
|
+
} }, s = { arraySet: function(e2, t19, r19, n19, i2) {
|
|
1933
|
+
for (var s2 = 0; s2 < n19; s2++)
|
|
1934
|
+
e2[i2 + s2] = t19[r19 + s2];
|
|
1935
|
+
}, flattenChunks: function(e2) {
|
|
1936
|
+
return [].concat.apply([], e2);
|
|
1937
|
+
} };
|
|
1938
|
+
r18.setTyped = function(e2) {
|
|
1939
|
+
e2 ? (r18.Buf8 = Uint8Array, r18.Buf16 = Uint16Array, r18.Buf32 = Int32Array, r18.assign(r18, i)) : (r18.Buf8 = Array, r18.Buf16 = Array, r18.Buf32 = Array, r18.assign(r18, s));
|
|
1940
|
+
}, r18.setTyped(n18);
|
|
1941
|
+
}, {}], 42: [function(e, t18, r18) {
|
|
1942
|
+
"use strict";
|
|
1943
|
+
var f = e("./common"), i = true, s = true;
|
|
1944
|
+
try {
|
|
1945
|
+
String.fromCharCode.apply(null, [0]);
|
|
1946
|
+
} catch (e2) {
|
|
1947
|
+
i = false;
|
|
1948
|
+
}
|
|
1949
|
+
try {
|
|
1950
|
+
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1951
|
+
} catch (e2) {
|
|
1952
|
+
s = false;
|
|
1953
|
+
}
|
|
1954
|
+
for (var u = new f.Buf8(256), n18 = 0; n18 < 256; n18++)
|
|
1955
|
+
u[n18] = 252 <= n18 ? 6 : 248 <= n18 ? 5 : 240 <= n18 ? 4 : 224 <= n18 ? 3 : 192 <= n18 ? 2 : 1;
|
|
1956
|
+
function d(e2, t19) {
|
|
1957
|
+
if (t19 < 65537 && (e2.subarray && s || !e2.subarray && i))
|
|
1958
|
+
return String.fromCharCode.apply(null, f.shrinkBuf(e2, t19));
|
|
1959
|
+
for (var r19 = "", n19 = 0; n19 < t19; n19++)
|
|
1960
|
+
r19 += String.fromCharCode(e2[n19]);
|
|
1961
|
+
return r19;
|
|
1962
|
+
}
|
|
1963
|
+
u[254] = u[254] = 1, r18.string2buf = function(e2) {
|
|
1964
|
+
var t19, r19, n19, i2, s2, o = e2.length, a = 0;
|
|
1965
|
+
for (i2 = 0; i2 < o; i2++)
|
|
1966
|
+
(64512 & (r19 = e2.charCodeAt(i2))) == 55296 && i2 + 1 < o && (64512 & (n19 = e2.charCodeAt(i2 + 1))) == 56320 && (r19 = 65536 + (r19 - 55296 << 10) + (n19 - 56320), i2++), a += r19 < 128 ? 1 : r19 < 2048 ? 2 : r19 < 65536 ? 3 : 4;
|
|
1967
|
+
for (t19 = new f.Buf8(a), i2 = s2 = 0; s2 < a; i2++)
|
|
1968
|
+
(64512 & (r19 = e2.charCodeAt(i2))) == 55296 && i2 + 1 < o && (64512 & (n19 = e2.charCodeAt(i2 + 1))) == 56320 && (r19 = 65536 + (r19 - 55296 << 10) + (n19 - 56320), i2++), r19 < 128 ? t19[s2++] = r19 : (r19 < 2048 ? t19[s2++] = 192 | r19 >>> 6 : (r19 < 65536 ? t19[s2++] = 224 | r19 >>> 12 : (t19[s2++] = 240 | r19 >>> 18, t19[s2++] = 128 | r19 >>> 12 & 63), t19[s2++] = 128 | r19 >>> 6 & 63), t19[s2++] = 128 | 63 & r19);
|
|
1969
|
+
return t19;
|
|
1970
|
+
}, r18.buf2binstring = function(e2) {
|
|
1971
|
+
return d(e2, e2.length);
|
|
1972
|
+
}, r18.binstring2buf = function(e2) {
|
|
1973
|
+
for (var t19 = new f.Buf8(e2.length), r19 = 0, n19 = t19.length; r19 < n19; r19++)
|
|
1974
|
+
t19[r19] = e2.charCodeAt(r19);
|
|
1975
|
+
return t19;
|
|
1976
|
+
}, r18.buf2string = function(e2, t19) {
|
|
1977
|
+
var r19, n19, i2, s2, o = t19 || e2.length, a = new Array(2 * o);
|
|
1978
|
+
for (r19 = n19 = 0; r19 < o; )
|
|
1979
|
+
if ((i2 = e2[r19++]) < 128)
|
|
1980
|
+
a[n19++] = i2;
|
|
1981
|
+
else if (4 < (s2 = u[i2]))
|
|
1982
|
+
a[n19++] = 65533, r19 += s2 - 1;
|
|
1983
|
+
else {
|
|
1984
|
+
for (i2 &= s2 === 2 ? 31 : s2 === 3 ? 15 : 7; 1 < s2 && r19 < o; )
|
|
1985
|
+
i2 = i2 << 6 | 63 & e2[r19++], s2--;
|
|
1986
|
+
1 < s2 ? a[n19++] = 65533 : i2 < 65536 ? a[n19++] = i2 : (i2 -= 65536, a[n19++] = 55296 | i2 >> 10 & 1023, a[n19++] = 56320 | 1023 & i2);
|
|
1987
|
+
}
|
|
1988
|
+
return d(a, n19);
|
|
1989
|
+
}, r18.utf8border = function(e2, t19) {
|
|
1990
|
+
var r19;
|
|
1991
|
+
for ((t19 = t19 || e2.length) > e2.length && (t19 = e2.length), r19 = t19 - 1; 0 <= r19 && (192 & e2[r19]) == 128; )
|
|
1992
|
+
r19--;
|
|
1993
|
+
return r19 < 0 ? t19 : r19 === 0 ? t19 : r19 + u[e2[r19]] > t19 ? r19 : t19;
|
|
1994
|
+
};
|
|
1995
|
+
}, { "./common": 41 }], 43: [function(e, t18, r18) {
|
|
1996
|
+
"use strict";
|
|
1997
|
+
t18.exports = function(e2, t19, r19, n18) {
|
|
1998
|
+
for (var i = 65535 & e2 | 0, s = e2 >>> 16 & 65535 | 0, o = 0; r19 !== 0; ) {
|
|
1999
|
+
for (r19 -= o = 2e3 < r19 ? 2e3 : r19; s = s + (i = i + t19[n18++] | 0) | 0, --o; )
|
|
2000
|
+
;
|
|
2001
|
+
i %= 65521, s %= 65521;
|
|
2002
|
+
}
|
|
2003
|
+
return i | s << 16 | 0;
|
|
2004
|
+
};
|
|
2005
|
+
}, {}], 44: [function(e, t18, r18) {
|
|
2006
|
+
"use strict";
|
|
2007
|
+
t18.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 };
|
|
2008
|
+
}, {}], 45: [function(e, t18, r18) {
|
|
2009
|
+
"use strict";
|
|
2010
|
+
var a = function() {
|
|
2011
|
+
for (var e2, t19 = [], r19 = 0; r19 < 256; r19++) {
|
|
2012
|
+
e2 = r19;
|
|
2013
|
+
for (var n18 = 0; n18 < 8; n18++)
|
|
2014
|
+
e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
|
|
2015
|
+
t19[r19] = e2;
|
|
2016
|
+
}
|
|
2017
|
+
return t19;
|
|
2018
|
+
}();
|
|
2019
|
+
t18.exports = function(e2, t19, r19, n18) {
|
|
2020
|
+
var i = a, s = n18 + r19;
|
|
2021
|
+
e2 ^= -1;
|
|
2022
|
+
for (var o = n18; o < s; o++)
|
|
2023
|
+
e2 = e2 >>> 8 ^ i[255 & (e2 ^ t19[o])];
|
|
2024
|
+
return -1 ^ e2;
|
|
2025
|
+
};
|
|
2026
|
+
}, {}], 46: [function(e, t18, r18) {
|
|
2027
|
+
"use strict";
|
|
2028
|
+
var f, l = e("../utils/common"), u = e("./trees"), c = e("./adler32"), p = e("./crc32"), n18 = e("./messages"), d = 0, h18 = 0, m = -2, i = 2, _ = 8, s = 286, o = 30, a = 19, w = 2 * s + 1, v = 15, g = 3, y = 258, b = y + g + 1, k = 42, x = 113;
|
|
2029
|
+
function S(e2, t19) {
|
|
2030
|
+
return e2.msg = n18[t19], t19;
|
|
2031
|
+
}
|
|
2032
|
+
function E(e2) {
|
|
2033
|
+
return (e2 << 1) - (4 < e2 ? 9 : 0);
|
|
2034
|
+
}
|
|
2035
|
+
function z(e2) {
|
|
2036
|
+
for (var t19 = e2.length; 0 <= --t19; )
|
|
2037
|
+
e2[t19] = 0;
|
|
2038
|
+
}
|
|
2039
|
+
function C(e2) {
|
|
2040
|
+
var t19 = e2.state, r19 = t19.pending;
|
|
2041
|
+
r19 > e2.avail_out && (r19 = e2.avail_out), r19 !== 0 && (l.arraySet(e2.output, t19.pending_buf, t19.pending_out, r19, e2.next_out), e2.next_out += r19, t19.pending_out += r19, e2.total_out += r19, e2.avail_out -= r19, t19.pending -= r19, t19.pending === 0 && (t19.pending_out = 0));
|
|
2042
|
+
}
|
|
2043
|
+
function A(e2, t19) {
|
|
2044
|
+
u._tr_flush_block(e2, 0 <= e2.block_start ? e2.block_start : -1, e2.strstart - e2.block_start, t19), e2.block_start = e2.strstart, C(e2.strm);
|
|
2045
|
+
}
|
|
2046
|
+
function O(e2, t19) {
|
|
2047
|
+
e2.pending_buf[e2.pending++] = t19;
|
|
2048
|
+
}
|
|
2049
|
+
function I(e2, t19) {
|
|
2050
|
+
e2.pending_buf[e2.pending++] = t19 >>> 8 & 255, e2.pending_buf[e2.pending++] = 255 & t19;
|
|
2051
|
+
}
|
|
2052
|
+
function D(e2, t19) {
|
|
2053
|
+
var r19, n19, i2 = e2.max_chain_length, s2 = e2.strstart, o2 = e2.prev_length, a2 = e2.nice_match, f2 = e2.strstart > e2.w_size - b ? e2.strstart - (e2.w_size - b) : 0, u2 = e2.window, d2 = e2.w_mask, h19 = e2.prev, l2 = e2.strstart + y, c2 = u2[s2 + o2 - 1], p2 = u2[s2 + o2];
|
|
2054
|
+
e2.prev_length >= e2.good_match && (i2 >>= 2), a2 > e2.lookahead && (a2 = e2.lookahead);
|
|
2055
|
+
do {
|
|
2056
|
+
if (u2[(r19 = t19) + o2] === p2 && u2[r19 + o2 - 1] === c2 && u2[r19] === u2[s2] && u2[++r19] === u2[s2 + 1]) {
|
|
2057
|
+
s2 += 2, r19++;
|
|
2058
|
+
do {
|
|
2059
|
+
} while (u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && u2[++s2] === u2[++r19] && s2 < l2);
|
|
2060
|
+
if (n19 = y - (l2 - s2), s2 = l2 - y, o2 < n19) {
|
|
2061
|
+
if (e2.match_start = t19, a2 <= (o2 = n19))
|
|
2062
|
+
break;
|
|
2063
|
+
c2 = u2[s2 + o2 - 1], p2 = u2[s2 + o2];
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
} while ((t19 = h19[t19 & d2]) > f2 && --i2 != 0);
|
|
2067
|
+
return o2 <= e2.lookahead ? o2 : e2.lookahead;
|
|
2068
|
+
}
|
|
2069
|
+
function B(e2) {
|
|
2070
|
+
var t19, r19, n19, i2, s2, o2, a2, f2, u2, d2, h19 = e2.w_size;
|
|
2071
|
+
do {
|
|
2072
|
+
if (i2 = e2.window_size - e2.lookahead - e2.strstart, e2.strstart >= h19 + (h19 - b)) {
|
|
2073
|
+
for (l.arraySet(e2.window, e2.window, h19, h19, 0), e2.match_start -= h19, e2.strstart -= h19, e2.block_start -= h19, t19 = r19 = e2.hash_size; n19 = e2.head[--t19], e2.head[t19] = h19 <= n19 ? n19 - h19 : 0, --r19; )
|
|
2074
|
+
;
|
|
2075
|
+
for (t19 = r19 = h19; n19 = e2.prev[--t19], e2.prev[t19] = h19 <= n19 ? n19 - h19 : 0, --r19; )
|
|
2076
|
+
;
|
|
2077
|
+
i2 += h19;
|
|
2078
|
+
}
|
|
2079
|
+
if (e2.strm.avail_in === 0)
|
|
2080
|
+
break;
|
|
2081
|
+
if (o2 = e2.strm, a2 = e2.window, f2 = e2.strstart + e2.lookahead, d2 = void 0, (u2 = i2) < (d2 = o2.avail_in) && (d2 = u2), r19 = d2 === 0 ? 0 : (o2.avail_in -= d2, l.arraySet(a2, o2.input, o2.next_in, d2, f2), o2.state.wrap === 1 ? o2.adler = c(o2.adler, a2, d2, f2) : o2.state.wrap === 2 && (o2.adler = p(o2.adler, a2, d2, f2)), o2.next_in += d2, o2.total_in += d2, d2), e2.lookahead += r19, e2.lookahead + e2.insert >= g)
|
|
2082
|
+
for (s2 = e2.strstart - e2.insert, e2.ins_h = e2.window[s2], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s2 + 1]) & e2.hash_mask; e2.insert && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s2 + g - 1]) & e2.hash_mask, e2.prev[s2 & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = s2, s2++, e2.insert--, !(e2.lookahead + e2.insert < g)); )
|
|
2083
|
+
;
|
|
2084
|
+
} while (e2.lookahead < b && e2.strm.avail_in !== 0);
|
|
2085
|
+
}
|
|
2086
|
+
function T(e2, t19) {
|
|
2087
|
+
for (var r19, n19; ; ) {
|
|
2088
|
+
if (e2.lookahead < b) {
|
|
2089
|
+
if (B(e2), e2.lookahead < b && t19 === d)
|
|
2090
|
+
return 1;
|
|
2091
|
+
if (e2.lookahead === 0)
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
if (r19 = 0, e2.lookahead >= g && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + g - 1]) & e2.hash_mask, r19 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), r19 !== 0 && e2.strstart - r19 <= e2.w_size - b && (e2.match_length = D(e2, r19)), e2.match_length >= g)
|
|
2095
|
+
if (n19 = u._tr_tally(e2, e2.strstart - e2.match_start, e2.match_length - g), e2.lookahead -= e2.match_length, e2.match_length <= e2.max_lazy_match && e2.lookahead >= g) {
|
|
2096
|
+
for (e2.match_length--; e2.strstart++, e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + g - 1]) & e2.hash_mask, r19 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart, --e2.match_length != 0; )
|
|
2097
|
+
;
|
|
2098
|
+
e2.strstart++;
|
|
2099
|
+
} else
|
|
2100
|
+
e2.strstart += e2.match_length, e2.match_length = 0, e2.ins_h = e2.window[e2.strstart], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + 1]) & e2.hash_mask;
|
|
2101
|
+
else
|
|
2102
|
+
n19 = u._tr_tally(e2, 0, e2.window[e2.strstart]), e2.lookahead--, e2.strstart++;
|
|
2103
|
+
if (n19 && (A(e2, false), e2.strm.avail_out === 0))
|
|
2104
|
+
return 1;
|
|
2105
|
+
}
|
|
2106
|
+
return e2.insert = e2.strstart < g - 1 ? e2.strstart : g - 1, t19 === 4 ? (A(e2, true), e2.strm.avail_out === 0 ? 3 : 4) : e2.last_lit && (A(e2, false), e2.strm.avail_out === 0) ? 1 : 2;
|
|
2107
|
+
}
|
|
2108
|
+
function R(e2, t19) {
|
|
2109
|
+
for (var r19, n19, i2; ; ) {
|
|
2110
|
+
if (e2.lookahead < b) {
|
|
2111
|
+
if (B(e2), e2.lookahead < b && t19 === d)
|
|
2112
|
+
return 1;
|
|
2113
|
+
if (e2.lookahead === 0)
|
|
2114
|
+
break;
|
|
2115
|
+
}
|
|
2116
|
+
if (r19 = 0, e2.lookahead >= g && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + g - 1]) & e2.hash_mask, r19 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), e2.prev_length = e2.match_length, e2.prev_match = e2.match_start, e2.match_length = g - 1, r19 !== 0 && e2.prev_length < e2.max_lazy_match && e2.strstart - r19 <= e2.w_size - b && (e2.match_length = D(e2, r19), e2.match_length <= 5 && (e2.strategy === 1 || e2.match_length === g && 4096 < e2.strstart - e2.match_start) && (e2.match_length = g - 1)), e2.prev_length >= g && e2.match_length <= e2.prev_length) {
|
|
2117
|
+
for (i2 = e2.strstart + e2.lookahead - g, n19 = u._tr_tally(e2, e2.strstart - 1 - e2.prev_match, e2.prev_length - g), e2.lookahead -= e2.prev_length - 1, e2.prev_length -= 2; ++e2.strstart <= i2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + g - 1]) & e2.hash_mask, r19 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), --e2.prev_length != 0; )
|
|
2118
|
+
;
|
|
2119
|
+
if (e2.match_available = 0, e2.match_length = g - 1, e2.strstart++, n19 && (A(e2, false), e2.strm.avail_out === 0))
|
|
2120
|
+
return 1;
|
|
2121
|
+
} else if (e2.match_available) {
|
|
2122
|
+
if ((n19 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1])) && A(e2, false), e2.strstart++, e2.lookahead--, e2.strm.avail_out === 0)
|
|
2123
|
+
return 1;
|
|
2124
|
+
} else
|
|
2125
|
+
e2.match_available = 1, e2.strstart++, e2.lookahead--;
|
|
2126
|
+
}
|
|
2127
|
+
return e2.match_available && (n19 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < g - 1 ? e2.strstart : g - 1, t19 === 4 ? (A(e2, true), e2.strm.avail_out === 0 ? 3 : 4) : e2.last_lit && (A(e2, false), e2.strm.avail_out === 0) ? 1 : 2;
|
|
2128
|
+
}
|
|
2129
|
+
function F(e2, t19, r19, n19, i2) {
|
|
2130
|
+
this.good_length = e2, this.max_lazy = t19, this.nice_length = r19, this.max_chain = n19, this.func = i2;
|
|
2131
|
+
}
|
|
2132
|
+
function N() {
|
|
2133
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new l.Buf16(2 * w), this.dyn_dtree = new l.Buf16(2 * (2 * o + 1)), this.bl_tree = new l.Buf16(2 * (2 * a + 1)), z(this.dyn_ltree), z(this.dyn_dtree), z(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new l.Buf16(v + 1), this.heap = new l.Buf16(2 * s + 1), z(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new l.Buf16(2 * s + 1), z(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;
|
|
2134
|
+
}
|
|
2135
|
+
function U(e2) {
|
|
2136
|
+
var t19;
|
|
2137
|
+
return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i, (t19 = e2.state).pending = 0, t19.pending_out = 0, t19.wrap < 0 && (t19.wrap = -t19.wrap), t19.status = t19.wrap ? k : x, e2.adler = t19.wrap === 2 ? 0 : 1, t19.last_flush = d, u._tr_init(t19), h18) : S(e2, m);
|
|
2138
|
+
}
|
|
2139
|
+
function L(e2) {
|
|
2140
|
+
var t19, r19 = U(e2);
|
|
2141
|
+
return r19 === h18 && ((t19 = e2.state).window_size = 2 * t19.w_size, z(t19.head), t19.max_lazy_match = f[t19.level].max_lazy, t19.good_match = f[t19.level].good_length, t19.nice_match = f[t19.level].nice_length, t19.max_chain_length = f[t19.level].max_chain, t19.strstart = 0, t19.block_start = 0, t19.lookahead = 0, t19.insert = 0, t19.match_length = t19.prev_length = g - 1, t19.match_available = 0, t19.ins_h = 0), r19;
|
|
2142
|
+
}
|
|
2143
|
+
function P(e2, t19, r19, n19, i2, s2) {
|
|
2144
|
+
if (!e2)
|
|
2145
|
+
return m;
|
|
2146
|
+
var o2 = 1;
|
|
2147
|
+
if (t19 === -1 && (t19 = 6), n19 < 0 ? (o2 = 0, n19 = -n19) : 15 < n19 && (o2 = 2, n19 -= 16), i2 < 1 || 9 < i2 || r19 !== _ || n19 < 8 || 15 < n19 || t19 < 0 || 9 < t19 || s2 < 0 || 4 < s2)
|
|
2148
|
+
return S(e2, m);
|
|
2149
|
+
n19 === 8 && (n19 = 9);
|
|
2150
|
+
var a2 = new N();
|
|
2151
|
+
return (e2.state = a2).strm = e2, a2.wrap = o2, a2.gzhead = null, a2.w_bits = n19, a2.w_size = 1 << a2.w_bits, a2.w_mask = a2.w_size - 1, a2.hash_bits = i2 + 7, a2.hash_size = 1 << a2.hash_bits, a2.hash_mask = a2.hash_size - 1, a2.hash_shift = ~~((a2.hash_bits + g - 1) / g), a2.window = new l.Buf8(2 * a2.w_size), a2.head = new l.Buf16(a2.hash_size), a2.prev = new l.Buf16(a2.w_size), a2.lit_bufsize = 1 << i2 + 6, a2.pending_buf_size = 4 * a2.lit_bufsize, a2.pending_buf = new l.Buf8(a2.pending_buf_size), a2.d_buf = 1 * a2.lit_bufsize, a2.l_buf = 3 * a2.lit_bufsize, a2.level = t19, a2.strategy = s2, a2.method = r19, L(e2);
|
|
2152
|
+
}
|
|
2153
|
+
f = [new F(0, 0, 0, 0, function(e2, t19) {
|
|
2154
|
+
var r19 = 65535;
|
|
2155
|
+
for (r19 > e2.pending_buf_size - 5 && (r19 = e2.pending_buf_size - 5); ; ) {
|
|
2156
|
+
if (e2.lookahead <= 1) {
|
|
2157
|
+
if (B(e2), e2.lookahead === 0 && t19 === d)
|
|
2158
|
+
return 1;
|
|
2159
|
+
if (e2.lookahead === 0)
|
|
2160
|
+
break;
|
|
2161
|
+
}
|
|
2162
|
+
e2.strstart += e2.lookahead, e2.lookahead = 0;
|
|
2163
|
+
var n19 = e2.block_start + r19;
|
|
2164
|
+
if ((e2.strstart === 0 || e2.strstart >= n19) && (e2.lookahead = e2.strstart - n19, e2.strstart = n19, A(e2, false), e2.strm.avail_out === 0))
|
|
2165
|
+
return 1;
|
|
2166
|
+
if (e2.strstart - e2.block_start >= e2.w_size - b && (A(e2, false), e2.strm.avail_out === 0))
|
|
2167
|
+
return 1;
|
|
2168
|
+
}
|
|
2169
|
+
return e2.insert = 0, t19 === 4 ? (A(e2, true), e2.strm.avail_out === 0 ? 3 : 4) : (e2.strstart > e2.block_start && (A(e2, false), e2.strm.avail_out), 1);
|
|
2170
|
+
}), new F(4, 4, 8, 4, T), new F(4, 5, 16, 8, T), new F(4, 6, 32, 32, T), new F(4, 4, 16, 16, R), new F(8, 16, 32, 32, R), new F(8, 16, 128, 128, R), new F(8, 32, 128, 256, R), new F(32, 128, 258, 1024, R), new F(32, 258, 258, 4096, R)], r18.deflateInit = function(e2, t19) {
|
|
2171
|
+
return P(e2, t19, _, 15, 8, 0);
|
|
2172
|
+
}, r18.deflateInit2 = P, r18.deflateReset = L, r18.deflateResetKeep = U, r18.deflateSetHeader = function(e2, t19) {
|
|
2173
|
+
return e2 && e2.state ? e2.state.wrap !== 2 ? m : (e2.state.gzhead = t19, h18) : m;
|
|
2174
|
+
}, r18.deflate = function(e2, t19) {
|
|
2175
|
+
var r19, n19, i2, s2;
|
|
2176
|
+
if (!e2 || !e2.state || 5 < t19 || t19 < 0)
|
|
2177
|
+
return e2 ? S(e2, m) : m;
|
|
2178
|
+
if (n19 = e2.state, !e2.output || !e2.input && e2.avail_in !== 0 || n19.status === 666 && t19 !== 4)
|
|
2179
|
+
return S(e2, e2.avail_out === 0 ? -5 : m);
|
|
2180
|
+
if (n19.strm = e2, r19 = n19.last_flush, n19.last_flush = t19, n19.status === k)
|
|
2181
|
+
if (n19.wrap === 2)
|
|
2182
|
+
e2.adler = 0, O(n19, 31), O(n19, 139), O(n19, 8), n19.gzhead ? (O(n19, (n19.gzhead.text ? 1 : 0) + (n19.gzhead.hcrc ? 2 : 0) + (n19.gzhead.extra ? 4 : 0) + (n19.gzhead.name ? 8 : 0) + (n19.gzhead.comment ? 16 : 0)), O(n19, 255 & n19.gzhead.time), O(n19, n19.gzhead.time >> 8 & 255), O(n19, n19.gzhead.time >> 16 & 255), O(n19, n19.gzhead.time >> 24 & 255), O(n19, n19.level === 9 ? 2 : 2 <= n19.strategy || n19.level < 2 ? 4 : 0), O(n19, 255 & n19.gzhead.os), n19.gzhead.extra && n19.gzhead.extra.length && (O(n19, 255 & n19.gzhead.extra.length), O(n19, n19.gzhead.extra.length >> 8 & 255)), n19.gzhead.hcrc && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending, 0)), n19.gzindex = 0, n19.status = 69) : (O(n19, 0), O(n19, 0), O(n19, 0), O(n19, 0), O(n19, 0), O(n19, n19.level === 9 ? 2 : 2 <= n19.strategy || n19.level < 2 ? 4 : 0), O(n19, 3), n19.status = x);
|
|
2183
|
+
else {
|
|
2184
|
+
var o2 = _ + (n19.w_bits - 8 << 4) << 8;
|
|
2185
|
+
o2 |= (2 <= n19.strategy || n19.level < 2 ? 0 : n19.level < 6 ? 1 : n19.level === 6 ? 2 : 3) << 6, n19.strstart !== 0 && (o2 |= 32), o2 += 31 - o2 % 31, n19.status = x, I(n19, o2), n19.strstart !== 0 && (I(n19, e2.adler >>> 16), I(n19, 65535 & e2.adler)), e2.adler = 1;
|
|
2186
|
+
}
|
|
2187
|
+
if (n19.status === 69)
|
|
2188
|
+
if (n19.gzhead.extra) {
|
|
2189
|
+
for (i2 = n19.pending; n19.gzindex < (65535 & n19.gzhead.extra.length) && (n19.pending !== n19.pending_buf_size || (n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), C(e2), i2 = n19.pending, n19.pending !== n19.pending_buf_size)); )
|
|
2190
|
+
O(n19, 255 & n19.gzhead.extra[n19.gzindex]), n19.gzindex++;
|
|
2191
|
+
n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), n19.gzindex === n19.gzhead.extra.length && (n19.gzindex = 0, n19.status = 73);
|
|
2192
|
+
} else
|
|
2193
|
+
n19.status = 73;
|
|
2194
|
+
if (n19.status === 73)
|
|
2195
|
+
if (n19.gzhead.name) {
|
|
2196
|
+
i2 = n19.pending;
|
|
2197
|
+
do {
|
|
2198
|
+
if (n19.pending === n19.pending_buf_size && (n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), C(e2), i2 = n19.pending, n19.pending === n19.pending_buf_size)) {
|
|
2199
|
+
s2 = 1;
|
|
2200
|
+
break;
|
|
2201
|
+
}
|
|
2202
|
+
s2 = n19.gzindex < n19.gzhead.name.length ? 255 & n19.gzhead.name.charCodeAt(n19.gzindex++) : 0, O(n19, s2);
|
|
2203
|
+
} while (s2 !== 0);
|
|
2204
|
+
n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), s2 === 0 && (n19.gzindex = 0, n19.status = 91);
|
|
2205
|
+
} else
|
|
2206
|
+
n19.status = 91;
|
|
2207
|
+
if (n19.status === 91)
|
|
2208
|
+
if (n19.gzhead.comment) {
|
|
2209
|
+
i2 = n19.pending;
|
|
2210
|
+
do {
|
|
2211
|
+
if (n19.pending === n19.pending_buf_size && (n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), C(e2), i2 = n19.pending, n19.pending === n19.pending_buf_size)) {
|
|
2212
|
+
s2 = 1;
|
|
2213
|
+
break;
|
|
2214
|
+
}
|
|
2215
|
+
s2 = n19.gzindex < n19.gzhead.comment.length ? 255 & n19.gzhead.comment.charCodeAt(n19.gzindex++) : 0, O(n19, s2);
|
|
2216
|
+
} while (s2 !== 0);
|
|
2217
|
+
n19.gzhead.hcrc && n19.pending > i2 && (e2.adler = p(e2.adler, n19.pending_buf, n19.pending - i2, i2)), s2 === 0 && (n19.status = 103);
|
|
2218
|
+
} else
|
|
2219
|
+
n19.status = 103;
|
|
2220
|
+
if (n19.status === 103 && (n19.gzhead.hcrc ? (n19.pending + 2 > n19.pending_buf_size && C(e2), n19.pending + 2 <= n19.pending_buf_size && (O(n19, 255 & e2.adler), O(n19, e2.adler >> 8 & 255), e2.adler = 0, n19.status = x)) : n19.status = x), n19.pending !== 0) {
|
|
2221
|
+
if (C(e2), e2.avail_out === 0)
|
|
2222
|
+
return n19.last_flush = -1, h18;
|
|
2223
|
+
} else if (e2.avail_in === 0 && E(t19) <= E(r19) && t19 !== 4)
|
|
2224
|
+
return S(e2, -5);
|
|
2225
|
+
if (n19.status === 666 && e2.avail_in !== 0)
|
|
2226
|
+
return S(e2, -5);
|
|
2227
|
+
if (e2.avail_in !== 0 || n19.lookahead !== 0 || t19 !== d && n19.status !== 666) {
|
|
2228
|
+
var a2 = n19.strategy === 2 ? function(e3, t20) {
|
|
2229
|
+
for (var r20; ; ) {
|
|
2230
|
+
if (e3.lookahead === 0 && (B(e3), e3.lookahead === 0)) {
|
|
2231
|
+
if (t20 === d)
|
|
2232
|
+
return 1;
|
|
2233
|
+
break;
|
|
2234
|
+
}
|
|
2235
|
+
if (e3.match_length = 0, r20 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++, r20 && (A(e3, false), e3.strm.avail_out === 0))
|
|
2236
|
+
return 1;
|
|
2237
|
+
}
|
|
2238
|
+
return e3.insert = 0, t20 === 4 ? (A(e3, true), e3.strm.avail_out === 0 ? 3 : 4) : e3.last_lit && (A(e3, false), e3.strm.avail_out === 0) ? 1 : 2;
|
|
2239
|
+
}(n19, t19) : n19.strategy === 3 ? function(e3, t20) {
|
|
2240
|
+
for (var r20, n20, i3, s3, o3 = e3.window; ; ) {
|
|
2241
|
+
if (e3.lookahead <= y) {
|
|
2242
|
+
if (B(e3), e3.lookahead <= y && t20 === d)
|
|
2243
|
+
return 1;
|
|
2244
|
+
if (e3.lookahead === 0)
|
|
2245
|
+
break;
|
|
2246
|
+
}
|
|
2247
|
+
if (e3.match_length = 0, e3.lookahead >= g && 0 < e3.strstart && (n20 = o3[i3 = e3.strstart - 1]) === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3]) {
|
|
2248
|
+
s3 = e3.strstart + y;
|
|
2249
|
+
do {
|
|
2250
|
+
} while (n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && n20 === o3[++i3] && i3 < s3);
|
|
2251
|
+
e3.match_length = y - (s3 - i3), e3.match_length > e3.lookahead && (e3.match_length = e3.lookahead);
|
|
2252
|
+
}
|
|
2253
|
+
if (e3.match_length >= g ? (r20 = u._tr_tally(e3, 1, e3.match_length - g), e3.lookahead -= e3.match_length, e3.strstart += e3.match_length, e3.match_length = 0) : (r20 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++), r20 && (A(e3, false), e3.strm.avail_out === 0))
|
|
2254
|
+
return 1;
|
|
2255
|
+
}
|
|
2256
|
+
return e3.insert = 0, t20 === 4 ? (A(e3, true), e3.strm.avail_out === 0 ? 3 : 4) : e3.last_lit && (A(e3, false), e3.strm.avail_out === 0) ? 1 : 2;
|
|
2257
|
+
}(n19, t19) : f[n19.level].func(n19, t19);
|
|
2258
|
+
if (a2 !== 3 && a2 !== 4 || (n19.status = 666), a2 === 1 || a2 === 3)
|
|
2259
|
+
return e2.avail_out === 0 && (n19.last_flush = -1), h18;
|
|
2260
|
+
if (a2 === 2 && (t19 === 1 ? u._tr_align(n19) : t19 !== 5 && (u._tr_stored_block(n19, 0, 0, false), t19 === 3 && (z(n19.head), n19.lookahead === 0 && (n19.strstart = 0, n19.block_start = 0, n19.insert = 0))), C(e2), e2.avail_out === 0))
|
|
2261
|
+
return n19.last_flush = -1, h18;
|
|
2262
|
+
}
|
|
2263
|
+
return t19 !== 4 ? h18 : n19.wrap <= 0 ? 1 : (n19.wrap === 2 ? (O(n19, 255 & e2.adler), O(n19, e2.adler >> 8 & 255), O(n19, e2.adler >> 16 & 255), O(n19, e2.adler >> 24 & 255), O(n19, 255 & e2.total_in), O(n19, e2.total_in >> 8 & 255), O(n19, e2.total_in >> 16 & 255), O(n19, e2.total_in >> 24 & 255)) : (I(n19, e2.adler >>> 16), I(n19, 65535 & e2.adler)), C(e2), 0 < n19.wrap && (n19.wrap = -n19.wrap), n19.pending !== 0 ? h18 : 1);
|
|
2264
|
+
}, r18.deflateEnd = function(e2) {
|
|
2265
|
+
var t19;
|
|
2266
|
+
return e2 && e2.state ? (t19 = e2.state.status) !== k && t19 !== 69 && t19 !== 73 && t19 !== 91 && t19 !== 103 && t19 !== x && t19 !== 666 ? S(e2, m) : (e2.state = null, t19 === x ? S(e2, -3) : h18) : m;
|
|
2267
|
+
}, r18.deflateSetDictionary = function(e2, t19) {
|
|
2268
|
+
var r19, n19, i2, s2, o2, a2, f2, u2, d2 = t19.length;
|
|
2269
|
+
if (!e2 || !e2.state)
|
|
2270
|
+
return m;
|
|
2271
|
+
if ((s2 = (r19 = e2.state).wrap) === 2 || s2 === 1 && r19.status !== k || r19.lookahead)
|
|
2272
|
+
return m;
|
|
2273
|
+
for (s2 === 1 && (e2.adler = c(e2.adler, t19, d2, 0)), r19.wrap = 0, d2 >= r19.w_size && (s2 === 0 && (z(r19.head), r19.strstart = 0, r19.block_start = 0, r19.insert = 0), u2 = new l.Buf8(r19.w_size), l.arraySet(u2, t19, d2 - r19.w_size, r19.w_size, 0), t19 = u2, d2 = r19.w_size), o2 = e2.avail_in, a2 = e2.next_in, f2 = e2.input, e2.avail_in = d2, e2.next_in = 0, e2.input = t19, B(r19); r19.lookahead >= g; ) {
|
|
2274
|
+
for (n19 = r19.strstart, i2 = r19.lookahead - (g - 1); r19.ins_h = (r19.ins_h << r19.hash_shift ^ r19.window[n19 + g - 1]) & r19.hash_mask, r19.prev[n19 & r19.w_mask] = r19.head[r19.ins_h], r19.head[r19.ins_h] = n19, n19++, --i2; )
|
|
2275
|
+
;
|
|
2276
|
+
r19.strstart = n19, r19.lookahead = g - 1, B(r19);
|
|
2277
|
+
}
|
|
2278
|
+
return r19.strstart += r19.lookahead, r19.block_start = r19.strstart, r19.insert = r19.lookahead, r19.lookahead = 0, r19.match_length = r19.prev_length = g - 1, r19.match_available = 0, e2.next_in = a2, e2.input = f2, e2.avail_in = o2, r19.wrap = s2, h18;
|
|
2279
|
+
}, r18.deflateInfo = "pako deflate (from Nodeca project)";
|
|
2280
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, t18, r18) {
|
|
2281
|
+
"use strict";
|
|
2282
|
+
t18.exports = function() {
|
|
2283
|
+
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 = false;
|
|
2284
|
+
};
|
|
2285
|
+
}, {}], 48: [function(e, t18, r18) {
|
|
2286
|
+
"use strict";
|
|
2287
|
+
t18.exports = function(e2, t19) {
|
|
2288
|
+
var r19, n18, i, s, o, a, f, u, d, h18, l, c, p, m, _, w, v, g, y, b, k, x, S, E, z;
|
|
2289
|
+
r19 = e2.state, n18 = e2.next_in, E = e2.input, i = n18 + (e2.avail_in - 5), s = e2.next_out, z = e2.output, o = s - (t19 - e2.avail_out), a = s + (e2.avail_out - 257), f = r19.dmax, u = r19.wsize, d = r19.whave, h18 = r19.wnext, l = r19.window, c = r19.hold, p = r19.bits, m = r19.lencode, _ = r19.distcode, w = (1 << r19.lenbits) - 1, v = (1 << r19.distbits) - 1;
|
|
2290
|
+
e:
|
|
2291
|
+
do {
|
|
2292
|
+
p < 15 && (c += E[n18++] << p, p += 8, c += E[n18++] << p, p += 8), g = m[c & w];
|
|
2293
|
+
t:
|
|
2294
|
+
for (; ; ) {
|
|
2295
|
+
if (c >>>= y = g >>> 24, p -= y, (y = g >>> 16 & 255) == 0)
|
|
2296
|
+
z[s++] = 65535 & g;
|
|
2297
|
+
else {
|
|
2298
|
+
if (!(16 & y)) {
|
|
2299
|
+
if ((64 & y) == 0) {
|
|
2300
|
+
g = m[(65535 & g) + (c & (1 << y) - 1)];
|
|
2301
|
+
continue t;
|
|
2302
|
+
}
|
|
2303
|
+
if (32 & y) {
|
|
2304
|
+
r19.mode = 12;
|
|
2305
|
+
break e;
|
|
2306
|
+
}
|
|
2307
|
+
e2.msg = "invalid literal/length code", r19.mode = 30;
|
|
2308
|
+
break e;
|
|
2309
|
+
}
|
|
2310
|
+
b = 65535 & g, (y &= 15) && (p < y && (c += E[n18++] << p, p += 8), b += c & (1 << y) - 1, c >>>= y, p -= y), p < 15 && (c += E[n18++] << p, p += 8, c += E[n18++] << p, p += 8), g = _[c & v];
|
|
2311
|
+
r:
|
|
2312
|
+
for (; ; ) {
|
|
2313
|
+
if (c >>>= y = g >>> 24, p -= y, !(16 & (y = g >>> 16 & 255))) {
|
|
2314
|
+
if ((64 & y) == 0) {
|
|
2315
|
+
g = _[(65535 & g) + (c & (1 << y) - 1)];
|
|
2316
|
+
continue r;
|
|
2317
|
+
}
|
|
2318
|
+
e2.msg = "invalid distance code", r19.mode = 30;
|
|
2319
|
+
break e;
|
|
2320
|
+
}
|
|
2321
|
+
if (k = 65535 & g, p < (y &= 15) && (c += E[n18++] << p, (p += 8) < y && (c += E[n18++] << p, p += 8)), f < (k += c & (1 << y) - 1)) {
|
|
2322
|
+
e2.msg = "invalid distance too far back", r19.mode = 30;
|
|
2323
|
+
break e;
|
|
2324
|
+
}
|
|
2325
|
+
if (c >>>= y, p -= y, (y = s - o) < k) {
|
|
2326
|
+
if (d < (y = k - y) && r19.sane) {
|
|
2327
|
+
e2.msg = "invalid distance too far back", r19.mode = 30;
|
|
2328
|
+
break e;
|
|
2329
|
+
}
|
|
2330
|
+
if (S = l, (x = 0) === h18) {
|
|
2331
|
+
if (x += u - y, y < b) {
|
|
2332
|
+
for (b -= y; z[s++] = l[x++], --y; )
|
|
2333
|
+
;
|
|
2334
|
+
x = s - k, S = z;
|
|
2335
|
+
}
|
|
2336
|
+
} else if (h18 < y) {
|
|
2337
|
+
if (x += u + h18 - y, (y -= h18) < b) {
|
|
2338
|
+
for (b -= y; z[s++] = l[x++], --y; )
|
|
2339
|
+
;
|
|
2340
|
+
if (x = 0, h18 < b) {
|
|
2341
|
+
for (b -= y = h18; z[s++] = l[x++], --y; )
|
|
2342
|
+
;
|
|
2343
|
+
x = s - k, S = z;
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
} else if (x += h18 - y, y < b) {
|
|
2347
|
+
for (b -= y; z[s++] = l[x++], --y; )
|
|
2348
|
+
;
|
|
2349
|
+
x = s - k, S = z;
|
|
2350
|
+
}
|
|
2351
|
+
for (; 2 < b; )
|
|
2352
|
+
z[s++] = S[x++], z[s++] = S[x++], z[s++] = S[x++], b -= 3;
|
|
2353
|
+
b && (z[s++] = S[x++], 1 < b && (z[s++] = S[x++]));
|
|
2354
|
+
} else {
|
|
2355
|
+
for (x = s - k; z[s++] = z[x++], z[s++] = z[x++], z[s++] = z[x++], 2 < (b -= 3); )
|
|
2356
|
+
;
|
|
2357
|
+
b && (z[s++] = z[x++], 1 < b && (z[s++] = z[x++]));
|
|
2358
|
+
}
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
break;
|
|
2363
|
+
}
|
|
2364
|
+
} while (n18 < i && s < a);
|
|
2365
|
+
n18 -= b = p >> 3, c &= (1 << (p -= b << 3)) - 1, e2.next_in = n18, e2.next_out = s, e2.avail_in = n18 < i ? i - n18 + 5 : 5 - (n18 - i), e2.avail_out = s < a ? a - s + 257 : 257 - (s - a), r19.hold = c, r19.bits = p;
|
|
2366
|
+
};
|
|
2367
|
+
}, {}], 49: [function(e, t18, r18) {
|
|
2368
|
+
"use strict";
|
|
2369
|
+
var O = e("../utils/common"), I = e("./adler32"), D = e("./crc32"), B = e("./inffast"), T = e("./inftrees"), R = 1, F = 2, N = 0, U = -2, L = 1, n18 = 852, i = 592;
|
|
2370
|
+
function P(e2) {
|
|
2371
|
+
return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
|
|
2372
|
+
}
|
|
2373
|
+
function s() {
|
|
2374
|
+
this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, 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 O.Buf16(320), this.work = new O.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
2375
|
+
}
|
|
2376
|
+
function o(e2) {
|
|
2377
|
+
var t19;
|
|
2378
|
+
return e2 && e2.state ? (t19 = e2.state, e2.total_in = e2.total_out = t19.total = 0, e2.msg = "", t19.wrap && (e2.adler = 1 & t19.wrap), t19.mode = L, t19.last = 0, t19.havedict = 0, t19.dmax = 32768, t19.head = null, t19.hold = 0, t19.bits = 0, t19.lencode = t19.lendyn = new O.Buf32(n18), t19.distcode = t19.distdyn = new O.Buf32(i), t19.sane = 1, t19.back = -1, N) : U;
|
|
2379
|
+
}
|
|
2380
|
+
function a(e2) {
|
|
2381
|
+
var t19;
|
|
2382
|
+
return e2 && e2.state ? ((t19 = e2.state).wsize = 0, t19.whave = 0, t19.wnext = 0, o(e2)) : U;
|
|
2383
|
+
}
|
|
2384
|
+
function f(e2, t19) {
|
|
2385
|
+
var r19, n19;
|
|
2386
|
+
return e2 && e2.state ? (n19 = e2.state, t19 < 0 ? (r19 = 0, t19 = -t19) : (r19 = 1 + (t19 >> 4), t19 < 48 && (t19 &= 15)), t19 && (t19 < 8 || 15 < t19) ? U : (n19.window !== null && n19.wbits !== t19 && (n19.window = null), n19.wrap = r19, n19.wbits = t19, a(e2))) : U;
|
|
2387
|
+
}
|
|
2388
|
+
function u(e2, t19) {
|
|
2389
|
+
var r19, n19;
|
|
2390
|
+
return e2 ? (n19 = new s(), (e2.state = n19).window = null, (r19 = f(e2, t19)) !== N && (e2.state = null), r19) : U;
|
|
2391
|
+
}
|
|
2392
|
+
var d, h18, l = true;
|
|
2393
|
+
function j(e2) {
|
|
2394
|
+
if (l) {
|
|
2395
|
+
var t19;
|
|
2396
|
+
for (d = new O.Buf32(512), h18 = new O.Buf32(32), t19 = 0; t19 < 144; )
|
|
2397
|
+
e2.lens[t19++] = 8;
|
|
2398
|
+
for (; t19 < 256; )
|
|
2399
|
+
e2.lens[t19++] = 9;
|
|
2400
|
+
for (; t19 < 280; )
|
|
2401
|
+
e2.lens[t19++] = 7;
|
|
2402
|
+
for (; t19 < 288; )
|
|
2403
|
+
e2.lens[t19++] = 8;
|
|
2404
|
+
for (T(R, e2.lens, 0, 288, d, 0, e2.work, { bits: 9 }), t19 = 0; t19 < 32; )
|
|
2405
|
+
e2.lens[t19++] = 5;
|
|
2406
|
+
T(F, e2.lens, 0, 32, h18, 0, e2.work, { bits: 5 }), l = false;
|
|
2407
|
+
}
|
|
2408
|
+
e2.lencode = d, e2.lenbits = 9, e2.distcode = h18, e2.distbits = 5;
|
|
2409
|
+
}
|
|
2410
|
+
function Z(e2, t19, r19, n19) {
|
|
2411
|
+
var i2, s2 = e2.state;
|
|
2412
|
+
return s2.window === null && (s2.wsize = 1 << s2.wbits, s2.wnext = 0, s2.whave = 0, s2.window = new O.Buf8(s2.wsize)), n19 >= s2.wsize ? (O.arraySet(s2.window, t19, r19 - s2.wsize, s2.wsize, 0), s2.wnext = 0, s2.whave = s2.wsize) : (n19 < (i2 = s2.wsize - s2.wnext) && (i2 = n19), O.arraySet(s2.window, t19, r19 - n19, i2, s2.wnext), (n19 -= i2) ? (O.arraySet(s2.window, t19, r19 - n19, n19, 0), s2.wnext = n19, s2.whave = s2.wsize) : (s2.wnext += i2, s2.wnext === s2.wsize && (s2.wnext = 0), s2.whave < s2.wsize && (s2.whave += i2))), 0;
|
|
2413
|
+
}
|
|
2414
|
+
r18.inflateReset = a, r18.inflateReset2 = f, r18.inflateResetKeep = o, r18.inflateInit = function(e2) {
|
|
2415
|
+
return u(e2, 15);
|
|
2416
|
+
}, r18.inflateInit2 = u, r18.inflate = function(e2, t19) {
|
|
2417
|
+
var r19, n19, i2, s2, o2, a2, f2, u2, d2, h19, l2, c, p, m, _, w, v, g, y, b, k, x, S, E, z = 0, C = new O.Buf8(4), A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
2418
|
+
if (!e2 || !e2.state || !e2.output || !e2.input && e2.avail_in !== 0)
|
|
2419
|
+
return U;
|
|
2420
|
+
(r19 = e2.state).mode === 12 && (r19.mode = 13), o2 = e2.next_out, i2 = e2.output, f2 = e2.avail_out, s2 = e2.next_in, n19 = e2.input, a2 = e2.avail_in, u2 = r19.hold, d2 = r19.bits, h19 = a2, l2 = f2, x = N;
|
|
2421
|
+
e:
|
|
2422
|
+
for (; ; )
|
|
2423
|
+
switch (r19.mode) {
|
|
2424
|
+
case L:
|
|
2425
|
+
if (r19.wrap === 0) {
|
|
2426
|
+
r19.mode = 13;
|
|
2427
|
+
break;
|
|
2428
|
+
}
|
|
2429
|
+
for (; d2 < 16; ) {
|
|
2430
|
+
if (a2 === 0)
|
|
2431
|
+
break e;
|
|
2432
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2433
|
+
}
|
|
2434
|
+
if (2 & r19.wrap && u2 === 35615) {
|
|
2435
|
+
C[r19.check = 0] = 255 & u2, C[1] = u2 >>> 8 & 255, r19.check = D(r19.check, C, 2, 0), d2 = u2 = 0, r19.mode = 2;
|
|
2436
|
+
break;
|
|
2437
|
+
}
|
|
2438
|
+
if (r19.flags = 0, r19.head && (r19.head.done = false), !(1 & r19.wrap) || (((255 & u2) << 8) + (u2 >> 8)) % 31) {
|
|
2439
|
+
e2.msg = "incorrect header check", r19.mode = 30;
|
|
2440
|
+
break;
|
|
2441
|
+
}
|
|
2442
|
+
if ((15 & u2) != 8) {
|
|
2443
|
+
e2.msg = "unknown compression method", r19.mode = 30;
|
|
2444
|
+
break;
|
|
2445
|
+
}
|
|
2446
|
+
if (d2 -= 4, k = 8 + (15 & (u2 >>>= 4)), r19.wbits === 0)
|
|
2447
|
+
r19.wbits = k;
|
|
2448
|
+
else if (k > r19.wbits) {
|
|
2449
|
+
e2.msg = "invalid window size", r19.mode = 30;
|
|
2450
|
+
break;
|
|
2451
|
+
}
|
|
2452
|
+
r19.dmax = 1 << k, e2.adler = r19.check = 1, r19.mode = 512 & u2 ? 10 : 12, d2 = u2 = 0;
|
|
2453
|
+
break;
|
|
2454
|
+
case 2:
|
|
2455
|
+
for (; d2 < 16; ) {
|
|
2456
|
+
if (a2 === 0)
|
|
2457
|
+
break e;
|
|
2458
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2459
|
+
}
|
|
2460
|
+
if (r19.flags = u2, (255 & r19.flags) != 8) {
|
|
2461
|
+
e2.msg = "unknown compression method", r19.mode = 30;
|
|
2462
|
+
break;
|
|
2463
|
+
}
|
|
2464
|
+
if (57344 & r19.flags) {
|
|
2465
|
+
e2.msg = "unknown header flags set", r19.mode = 30;
|
|
2466
|
+
break;
|
|
2467
|
+
}
|
|
2468
|
+
r19.head && (r19.head.text = u2 >> 8 & 1), 512 & r19.flags && (C[0] = 255 & u2, C[1] = u2 >>> 8 & 255, r19.check = D(r19.check, C, 2, 0)), d2 = u2 = 0, r19.mode = 3;
|
|
2469
|
+
case 3:
|
|
2470
|
+
for (; d2 < 32; ) {
|
|
2471
|
+
if (a2 === 0)
|
|
2472
|
+
break e;
|
|
2473
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2474
|
+
}
|
|
2475
|
+
r19.head && (r19.head.time = u2), 512 & r19.flags && (C[0] = 255 & u2, C[1] = u2 >>> 8 & 255, C[2] = u2 >>> 16 & 255, C[3] = u2 >>> 24 & 255, r19.check = D(r19.check, C, 4, 0)), d2 = u2 = 0, r19.mode = 4;
|
|
2476
|
+
case 4:
|
|
2477
|
+
for (; d2 < 16; ) {
|
|
2478
|
+
if (a2 === 0)
|
|
2479
|
+
break e;
|
|
2480
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2481
|
+
}
|
|
2482
|
+
r19.head && (r19.head.xflags = 255 & u2, r19.head.os = u2 >> 8), 512 & r19.flags && (C[0] = 255 & u2, C[1] = u2 >>> 8 & 255, r19.check = D(r19.check, C, 2, 0)), d2 = u2 = 0, r19.mode = 5;
|
|
2483
|
+
case 5:
|
|
2484
|
+
if (1024 & r19.flags) {
|
|
2485
|
+
for (; d2 < 16; ) {
|
|
2486
|
+
if (a2 === 0)
|
|
2487
|
+
break e;
|
|
2488
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2489
|
+
}
|
|
2490
|
+
r19.length = u2, r19.head && (r19.head.extra_len = u2), 512 & r19.flags && (C[0] = 255 & u2, C[1] = u2 >>> 8 & 255, r19.check = D(r19.check, C, 2, 0)), d2 = u2 = 0;
|
|
2491
|
+
} else
|
|
2492
|
+
r19.head && (r19.head.extra = null);
|
|
2493
|
+
r19.mode = 6;
|
|
2494
|
+
case 6:
|
|
2495
|
+
if (1024 & r19.flags && (a2 < (c = r19.length) && (c = a2), c && (r19.head && (k = r19.head.extra_len - r19.length, r19.head.extra || (r19.head.extra = new Array(r19.head.extra_len)), O.arraySet(r19.head.extra, n19, s2, c, k)), 512 & r19.flags && (r19.check = D(r19.check, n19, c, s2)), a2 -= c, s2 += c, r19.length -= c), r19.length))
|
|
2496
|
+
break e;
|
|
2497
|
+
r19.length = 0, r19.mode = 7;
|
|
2498
|
+
case 7:
|
|
2499
|
+
if (2048 & r19.flags) {
|
|
2500
|
+
if (a2 === 0)
|
|
2501
|
+
break e;
|
|
2502
|
+
for (c = 0; k = n19[s2 + c++], r19.head && k && r19.length < 65536 && (r19.head.name += String.fromCharCode(k)), k && c < a2; )
|
|
2503
|
+
;
|
|
2504
|
+
if (512 & r19.flags && (r19.check = D(r19.check, n19, c, s2)), a2 -= c, s2 += c, k)
|
|
2505
|
+
break e;
|
|
2506
|
+
} else
|
|
2507
|
+
r19.head && (r19.head.name = null);
|
|
2508
|
+
r19.length = 0, r19.mode = 8;
|
|
2509
|
+
case 8:
|
|
2510
|
+
if (4096 & r19.flags) {
|
|
2511
|
+
if (a2 === 0)
|
|
2512
|
+
break e;
|
|
2513
|
+
for (c = 0; k = n19[s2 + c++], r19.head && k && r19.length < 65536 && (r19.head.comment += String.fromCharCode(k)), k && c < a2; )
|
|
2514
|
+
;
|
|
2515
|
+
if (512 & r19.flags && (r19.check = D(r19.check, n19, c, s2)), a2 -= c, s2 += c, k)
|
|
2516
|
+
break e;
|
|
2517
|
+
} else
|
|
2518
|
+
r19.head && (r19.head.comment = null);
|
|
2519
|
+
r19.mode = 9;
|
|
2520
|
+
case 9:
|
|
2521
|
+
if (512 & r19.flags) {
|
|
2522
|
+
for (; d2 < 16; ) {
|
|
2523
|
+
if (a2 === 0)
|
|
2524
|
+
break e;
|
|
2525
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2526
|
+
}
|
|
2527
|
+
if (u2 !== (65535 & r19.check)) {
|
|
2528
|
+
e2.msg = "header crc mismatch", r19.mode = 30;
|
|
2529
|
+
break;
|
|
2530
|
+
}
|
|
2531
|
+
d2 = u2 = 0;
|
|
2532
|
+
}
|
|
2533
|
+
r19.head && (r19.head.hcrc = r19.flags >> 9 & 1, r19.head.done = true), e2.adler = r19.check = 0, r19.mode = 12;
|
|
2534
|
+
break;
|
|
2535
|
+
case 10:
|
|
2536
|
+
for (; d2 < 32; ) {
|
|
2537
|
+
if (a2 === 0)
|
|
2538
|
+
break e;
|
|
2539
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2540
|
+
}
|
|
2541
|
+
e2.adler = r19.check = P(u2), d2 = u2 = 0, r19.mode = 11;
|
|
2542
|
+
case 11:
|
|
2543
|
+
if (r19.havedict === 0)
|
|
2544
|
+
return e2.next_out = o2, e2.avail_out = f2, e2.next_in = s2, e2.avail_in = a2, r19.hold = u2, r19.bits = d2, 2;
|
|
2545
|
+
e2.adler = r19.check = 1, r19.mode = 12;
|
|
2546
|
+
case 12:
|
|
2547
|
+
if (t19 === 5 || t19 === 6)
|
|
2548
|
+
break e;
|
|
2549
|
+
case 13:
|
|
2550
|
+
if (r19.last) {
|
|
2551
|
+
u2 >>>= 7 & d2, d2 -= 7 & d2, r19.mode = 27;
|
|
2552
|
+
break;
|
|
2553
|
+
}
|
|
2554
|
+
for (; d2 < 3; ) {
|
|
2555
|
+
if (a2 === 0)
|
|
2556
|
+
break e;
|
|
2557
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2558
|
+
}
|
|
2559
|
+
switch (r19.last = 1 & u2, d2 -= 1, 3 & (u2 >>>= 1)) {
|
|
2560
|
+
case 0:
|
|
2561
|
+
r19.mode = 14;
|
|
2562
|
+
break;
|
|
2563
|
+
case 1:
|
|
2564
|
+
if (j(r19), r19.mode = 20, t19 !== 6)
|
|
2565
|
+
break;
|
|
2566
|
+
u2 >>>= 2, d2 -= 2;
|
|
2567
|
+
break e;
|
|
2568
|
+
case 2:
|
|
2569
|
+
r19.mode = 17;
|
|
2570
|
+
break;
|
|
2571
|
+
case 3:
|
|
2572
|
+
e2.msg = "invalid block type", r19.mode = 30;
|
|
2573
|
+
}
|
|
2574
|
+
u2 >>>= 2, d2 -= 2;
|
|
2575
|
+
break;
|
|
2576
|
+
case 14:
|
|
2577
|
+
for (u2 >>>= 7 & d2, d2 -= 7 & d2; d2 < 32; ) {
|
|
2578
|
+
if (a2 === 0)
|
|
2579
|
+
break e;
|
|
2580
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2581
|
+
}
|
|
2582
|
+
if ((65535 & u2) != (u2 >>> 16 ^ 65535)) {
|
|
2583
|
+
e2.msg = "invalid stored block lengths", r19.mode = 30;
|
|
2584
|
+
break;
|
|
2585
|
+
}
|
|
2586
|
+
if (r19.length = 65535 & u2, d2 = u2 = 0, r19.mode = 15, t19 === 6)
|
|
2587
|
+
break e;
|
|
2588
|
+
case 15:
|
|
2589
|
+
r19.mode = 16;
|
|
2590
|
+
case 16:
|
|
2591
|
+
if (c = r19.length) {
|
|
2592
|
+
if (a2 < c && (c = a2), f2 < c && (c = f2), c === 0)
|
|
2593
|
+
break e;
|
|
2594
|
+
O.arraySet(i2, n19, s2, c, o2), a2 -= c, s2 += c, f2 -= c, o2 += c, r19.length -= c;
|
|
2595
|
+
break;
|
|
2596
|
+
}
|
|
2597
|
+
r19.mode = 12;
|
|
2598
|
+
break;
|
|
2599
|
+
case 17:
|
|
2600
|
+
for (; d2 < 14; ) {
|
|
2601
|
+
if (a2 === 0)
|
|
2602
|
+
break e;
|
|
2603
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2604
|
+
}
|
|
2605
|
+
if (r19.nlen = 257 + (31 & u2), u2 >>>= 5, d2 -= 5, r19.ndist = 1 + (31 & u2), u2 >>>= 5, d2 -= 5, r19.ncode = 4 + (15 & u2), u2 >>>= 4, d2 -= 4, 286 < r19.nlen || 30 < r19.ndist) {
|
|
2606
|
+
e2.msg = "too many length or distance symbols", r19.mode = 30;
|
|
2607
|
+
break;
|
|
2608
|
+
}
|
|
2609
|
+
r19.have = 0, r19.mode = 18;
|
|
2610
|
+
case 18:
|
|
2611
|
+
for (; r19.have < r19.ncode; ) {
|
|
2612
|
+
for (; d2 < 3; ) {
|
|
2613
|
+
if (a2 === 0)
|
|
2614
|
+
break e;
|
|
2615
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2616
|
+
}
|
|
2617
|
+
r19.lens[A[r19.have++]] = 7 & u2, u2 >>>= 3, d2 -= 3;
|
|
2618
|
+
}
|
|
2619
|
+
for (; r19.have < 19; )
|
|
2620
|
+
r19.lens[A[r19.have++]] = 0;
|
|
2621
|
+
if (r19.lencode = r19.lendyn, r19.lenbits = 7, S = { bits: r19.lenbits }, x = T(0, r19.lens, 0, 19, r19.lencode, 0, r19.work, S), r19.lenbits = S.bits, x) {
|
|
2622
|
+
e2.msg = "invalid code lengths set", r19.mode = 30;
|
|
2623
|
+
break;
|
|
2624
|
+
}
|
|
2625
|
+
r19.have = 0, r19.mode = 19;
|
|
2626
|
+
case 19:
|
|
2627
|
+
for (; r19.have < r19.nlen + r19.ndist; ) {
|
|
2628
|
+
for (; w = (z = r19.lencode[u2 & (1 << r19.lenbits) - 1]) >>> 16 & 255, v = 65535 & z, !((_ = z >>> 24) <= d2); ) {
|
|
2629
|
+
if (a2 === 0)
|
|
2630
|
+
break e;
|
|
2631
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2632
|
+
}
|
|
2633
|
+
if (v < 16)
|
|
2634
|
+
u2 >>>= _, d2 -= _, r19.lens[r19.have++] = v;
|
|
2635
|
+
else {
|
|
2636
|
+
if (v === 16) {
|
|
2637
|
+
for (E = _ + 2; d2 < E; ) {
|
|
2638
|
+
if (a2 === 0)
|
|
2639
|
+
break e;
|
|
2640
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2641
|
+
}
|
|
2642
|
+
if (u2 >>>= _, d2 -= _, r19.have === 0) {
|
|
2643
|
+
e2.msg = "invalid bit length repeat", r19.mode = 30;
|
|
2644
|
+
break;
|
|
2645
|
+
}
|
|
2646
|
+
k = r19.lens[r19.have - 1], c = 3 + (3 & u2), u2 >>>= 2, d2 -= 2;
|
|
2647
|
+
} else if (v === 17) {
|
|
2648
|
+
for (E = _ + 3; d2 < E; ) {
|
|
2649
|
+
if (a2 === 0)
|
|
2650
|
+
break e;
|
|
2651
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2652
|
+
}
|
|
2653
|
+
d2 -= _, k = 0, c = 3 + (7 & (u2 >>>= _)), u2 >>>= 3, d2 -= 3;
|
|
2654
|
+
} else {
|
|
2655
|
+
for (E = _ + 7; d2 < E; ) {
|
|
2656
|
+
if (a2 === 0)
|
|
2657
|
+
break e;
|
|
2658
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2659
|
+
}
|
|
2660
|
+
d2 -= _, k = 0, c = 11 + (127 & (u2 >>>= _)), u2 >>>= 7, d2 -= 7;
|
|
2661
|
+
}
|
|
2662
|
+
if (r19.have + c > r19.nlen + r19.ndist) {
|
|
2663
|
+
e2.msg = "invalid bit length repeat", r19.mode = 30;
|
|
2664
|
+
break;
|
|
2665
|
+
}
|
|
2666
|
+
for (; c--; )
|
|
2667
|
+
r19.lens[r19.have++] = k;
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
if (r19.mode === 30)
|
|
2671
|
+
break;
|
|
2672
|
+
if (r19.lens[256] === 0) {
|
|
2673
|
+
e2.msg = "invalid code -- missing end-of-block", r19.mode = 30;
|
|
2674
|
+
break;
|
|
2675
|
+
}
|
|
2676
|
+
if (r19.lenbits = 9, S = { bits: r19.lenbits }, x = T(R, r19.lens, 0, r19.nlen, r19.lencode, 0, r19.work, S), r19.lenbits = S.bits, x) {
|
|
2677
|
+
e2.msg = "invalid literal/lengths set", r19.mode = 30;
|
|
2678
|
+
break;
|
|
2679
|
+
}
|
|
2680
|
+
if (r19.distbits = 6, r19.distcode = r19.distdyn, S = { bits: r19.distbits }, x = T(F, r19.lens, r19.nlen, r19.ndist, r19.distcode, 0, r19.work, S), r19.distbits = S.bits, x) {
|
|
2681
|
+
e2.msg = "invalid distances set", r19.mode = 30;
|
|
2682
|
+
break;
|
|
2683
|
+
}
|
|
2684
|
+
if (r19.mode = 20, t19 === 6)
|
|
2685
|
+
break e;
|
|
2686
|
+
case 20:
|
|
2687
|
+
r19.mode = 21;
|
|
2688
|
+
case 21:
|
|
2689
|
+
if (6 <= a2 && 258 <= f2) {
|
|
2690
|
+
e2.next_out = o2, e2.avail_out = f2, e2.next_in = s2, e2.avail_in = a2, r19.hold = u2, r19.bits = d2, B(e2, l2), o2 = e2.next_out, i2 = e2.output, f2 = e2.avail_out, s2 = e2.next_in, n19 = e2.input, a2 = e2.avail_in, u2 = r19.hold, d2 = r19.bits, r19.mode === 12 && (r19.back = -1);
|
|
2691
|
+
break;
|
|
2692
|
+
}
|
|
2693
|
+
for (r19.back = 0; w = (z = r19.lencode[u2 & (1 << r19.lenbits) - 1]) >>> 16 & 255, v = 65535 & z, !((_ = z >>> 24) <= d2); ) {
|
|
2694
|
+
if (a2 === 0)
|
|
2695
|
+
break e;
|
|
2696
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2697
|
+
}
|
|
2698
|
+
if (w && (240 & w) == 0) {
|
|
2699
|
+
for (g = _, y = w, b = v; w = (z = r19.lencode[b + ((u2 & (1 << g + y) - 1) >> g)]) >>> 16 & 255, v = 65535 & z, !(g + (_ = z >>> 24) <= d2); ) {
|
|
2700
|
+
if (a2 === 0)
|
|
2701
|
+
break e;
|
|
2702
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2703
|
+
}
|
|
2704
|
+
u2 >>>= g, d2 -= g, r19.back += g;
|
|
2705
|
+
}
|
|
2706
|
+
if (u2 >>>= _, d2 -= _, r19.back += _, r19.length = v, w === 0) {
|
|
2707
|
+
r19.mode = 26;
|
|
2708
|
+
break;
|
|
2709
|
+
}
|
|
2710
|
+
if (32 & w) {
|
|
2711
|
+
r19.back = -1, r19.mode = 12;
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2714
|
+
if (64 & w) {
|
|
2715
|
+
e2.msg = "invalid literal/length code", r19.mode = 30;
|
|
2716
|
+
break;
|
|
2717
|
+
}
|
|
2718
|
+
r19.extra = 15 & w, r19.mode = 22;
|
|
2719
|
+
case 22:
|
|
2720
|
+
if (r19.extra) {
|
|
2721
|
+
for (E = r19.extra; d2 < E; ) {
|
|
2722
|
+
if (a2 === 0)
|
|
2723
|
+
break e;
|
|
2724
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2725
|
+
}
|
|
2726
|
+
r19.length += u2 & (1 << r19.extra) - 1, u2 >>>= r19.extra, d2 -= r19.extra, r19.back += r19.extra;
|
|
2727
|
+
}
|
|
2728
|
+
r19.was = r19.length, r19.mode = 23;
|
|
2729
|
+
case 23:
|
|
2730
|
+
for (; w = (z = r19.distcode[u2 & (1 << r19.distbits) - 1]) >>> 16 & 255, v = 65535 & z, !((_ = z >>> 24) <= d2); ) {
|
|
2731
|
+
if (a2 === 0)
|
|
2732
|
+
break e;
|
|
2733
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2734
|
+
}
|
|
2735
|
+
if ((240 & w) == 0) {
|
|
2736
|
+
for (g = _, y = w, b = v; w = (z = r19.distcode[b + ((u2 & (1 << g + y) - 1) >> g)]) >>> 16 & 255, v = 65535 & z, !(g + (_ = z >>> 24) <= d2); ) {
|
|
2737
|
+
if (a2 === 0)
|
|
2738
|
+
break e;
|
|
2739
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2740
|
+
}
|
|
2741
|
+
u2 >>>= g, d2 -= g, r19.back += g;
|
|
2742
|
+
}
|
|
2743
|
+
if (u2 >>>= _, d2 -= _, r19.back += _, 64 & w) {
|
|
2744
|
+
e2.msg = "invalid distance code", r19.mode = 30;
|
|
2745
|
+
break;
|
|
2746
|
+
}
|
|
2747
|
+
r19.offset = v, r19.extra = 15 & w, r19.mode = 24;
|
|
2748
|
+
case 24:
|
|
2749
|
+
if (r19.extra) {
|
|
2750
|
+
for (E = r19.extra; d2 < E; ) {
|
|
2751
|
+
if (a2 === 0)
|
|
2752
|
+
break e;
|
|
2753
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2754
|
+
}
|
|
2755
|
+
r19.offset += u2 & (1 << r19.extra) - 1, u2 >>>= r19.extra, d2 -= r19.extra, r19.back += r19.extra;
|
|
2756
|
+
}
|
|
2757
|
+
if (r19.offset > r19.dmax) {
|
|
2758
|
+
e2.msg = "invalid distance too far back", r19.mode = 30;
|
|
2759
|
+
break;
|
|
2760
|
+
}
|
|
2761
|
+
r19.mode = 25;
|
|
2762
|
+
case 25:
|
|
2763
|
+
if (f2 === 0)
|
|
2764
|
+
break e;
|
|
2765
|
+
if (c = l2 - f2, r19.offset > c) {
|
|
2766
|
+
if ((c = r19.offset - c) > r19.whave && r19.sane) {
|
|
2767
|
+
e2.msg = "invalid distance too far back", r19.mode = 30;
|
|
2768
|
+
break;
|
|
2769
|
+
}
|
|
2770
|
+
p = c > r19.wnext ? (c -= r19.wnext, r19.wsize - c) : r19.wnext - c, c > r19.length && (c = r19.length), m = r19.window;
|
|
2771
|
+
} else
|
|
2772
|
+
m = i2, p = o2 - r19.offset, c = r19.length;
|
|
2773
|
+
for (f2 < c && (c = f2), f2 -= c, r19.length -= c; i2[o2++] = m[p++], --c; )
|
|
2774
|
+
;
|
|
2775
|
+
r19.length === 0 && (r19.mode = 21);
|
|
2776
|
+
break;
|
|
2777
|
+
case 26:
|
|
2778
|
+
if (f2 === 0)
|
|
2779
|
+
break e;
|
|
2780
|
+
i2[o2++] = r19.length, f2--, r19.mode = 21;
|
|
2781
|
+
break;
|
|
2782
|
+
case 27:
|
|
2783
|
+
if (r19.wrap) {
|
|
2784
|
+
for (; d2 < 32; ) {
|
|
2785
|
+
if (a2 === 0)
|
|
2786
|
+
break e;
|
|
2787
|
+
a2--, u2 |= n19[s2++] << d2, d2 += 8;
|
|
2788
|
+
}
|
|
2789
|
+
if (l2 -= f2, e2.total_out += l2, r19.total += l2, l2 && (e2.adler = r19.check = r19.flags ? D(r19.check, i2, l2, o2 - l2) : I(r19.check, i2, l2, o2 - l2)), l2 = f2, (r19.flags ? u2 : P(u2)) !== r19.check) {
|
|
2790
|
+
e2.msg = "incorrect data check", r19.mode = 30;
|
|
2791
|
+
break;
|
|
2792
|
+
}
|
|
2793
|
+
d2 = u2 = 0;
|
|
2794
|
+
}
|
|
2795
|
+
r19.mode = 28;
|
|
2796
|
+
case 28:
|
|
2797
|
+
if (r19.wrap && r19.flags) {
|
|
2798
|
+
for (; d2 < 32; ) {
|
|
2799
|
+
if (a2 === 0)
|
|
2800
|
+
break e;
|
|
2801
|
+
a2--, u2 += n19[s2++] << d2, d2 += 8;
|
|
2802
|
+
}
|
|
2803
|
+
if (u2 !== (4294967295 & r19.total)) {
|
|
2804
|
+
e2.msg = "incorrect length check", r19.mode = 30;
|
|
2805
|
+
break;
|
|
2806
|
+
}
|
|
2807
|
+
d2 = u2 = 0;
|
|
2808
|
+
}
|
|
2809
|
+
r19.mode = 29;
|
|
2810
|
+
case 29:
|
|
2811
|
+
x = 1;
|
|
2812
|
+
break e;
|
|
2813
|
+
case 30:
|
|
2814
|
+
x = -3;
|
|
2815
|
+
break e;
|
|
2816
|
+
case 31:
|
|
2817
|
+
return -4;
|
|
2818
|
+
case 32:
|
|
2819
|
+
default:
|
|
2820
|
+
return U;
|
|
2821
|
+
}
|
|
2822
|
+
return e2.next_out = o2, e2.avail_out = f2, e2.next_in = s2, e2.avail_in = a2, r19.hold = u2, r19.bits = d2, (r19.wsize || l2 !== e2.avail_out && r19.mode < 30 && (r19.mode < 27 || t19 !== 4)) && Z(e2, e2.output, e2.next_out, l2 - e2.avail_out) ? (r19.mode = 31, -4) : (h19 -= e2.avail_in, l2 -= e2.avail_out, e2.total_in += h19, e2.total_out += l2, r19.total += l2, r19.wrap && l2 && (e2.adler = r19.check = r19.flags ? D(r19.check, i2, l2, e2.next_out - l2) : I(r19.check, i2, l2, e2.next_out - l2)), e2.data_type = r19.bits + (r19.last ? 64 : 0) + (r19.mode === 12 ? 128 : 0) + (r19.mode === 20 || r19.mode === 15 ? 256 : 0), (h19 == 0 && l2 === 0 || t19 === 4) && x === N && (x = -5), x);
|
|
2823
|
+
}, r18.inflateEnd = function(e2) {
|
|
2824
|
+
if (!e2 || !e2.state)
|
|
2825
|
+
return U;
|
|
2826
|
+
var t19 = e2.state;
|
|
2827
|
+
return t19.window && (t19.window = null), e2.state = null, N;
|
|
2828
|
+
}, r18.inflateGetHeader = function(e2, t19) {
|
|
2829
|
+
var r19;
|
|
2830
|
+
return e2 && e2.state ? (2 & (r19 = e2.state).wrap) == 0 ? U : ((r19.head = t19).done = false, N) : U;
|
|
2831
|
+
}, r18.inflateSetDictionary = function(e2, t19) {
|
|
2832
|
+
var r19, n19 = t19.length;
|
|
2833
|
+
return e2 && e2.state ? (r19 = e2.state).wrap !== 0 && r19.mode !== 11 ? U : r19.mode === 11 && I(1, t19, n19, 0) !== r19.check ? -3 : Z(e2, t19, n19, n19) ? (r19.mode = 31, -4) : (r19.havedict = 1, N) : U;
|
|
2834
|
+
}, r18.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2835
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, t18, r18) {
|
|
2836
|
+
"use strict";
|
|
2837
|
+
var R = e("../utils/common"), F = [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], N = [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], U = [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], L = [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];
|
|
2838
|
+
t18.exports = function(e2, t19, r19, n18, i, s, o, a) {
|
|
2839
|
+
var f, u, d, h18, l, c, p, m, _, w = a.bits, v = 0, g = 0, y = 0, b = 0, k = 0, x = 0, S = 0, E = 0, z = 0, C = 0, A = null, O = 0, I = new R.Buf16(16), D = new R.Buf16(16), B = null, T = 0;
|
|
2840
|
+
for (v = 0; v <= 15; v++)
|
|
2841
|
+
I[v] = 0;
|
|
2842
|
+
for (g = 0; g < n18; g++)
|
|
2843
|
+
I[t19[r19 + g]]++;
|
|
2844
|
+
for (k = w, b = 15; 1 <= b && I[b] === 0; b--)
|
|
2845
|
+
;
|
|
2846
|
+
if (b < k && (k = b), b === 0)
|
|
2847
|
+
return i[s++] = 20971520, i[s++] = 20971520, a.bits = 1, 0;
|
|
2848
|
+
for (y = 1; y < b && I[y] === 0; y++)
|
|
2849
|
+
;
|
|
2850
|
+
for (k < y && (k = y), v = E = 1; v <= 15; v++)
|
|
2851
|
+
if (E <<= 1, (E -= I[v]) < 0)
|
|
2852
|
+
return -1;
|
|
2853
|
+
if (0 < E && (e2 === 0 || b !== 1))
|
|
2854
|
+
return -1;
|
|
2855
|
+
for (D[1] = 0, v = 1; v < 15; v++)
|
|
2856
|
+
D[v + 1] = D[v] + I[v];
|
|
2857
|
+
for (g = 0; g < n18; g++)
|
|
2858
|
+
t19[r19 + g] !== 0 && (o[D[t19[r19 + g]]++] = g);
|
|
2859
|
+
if (c = e2 === 0 ? (A = B = o, 19) : e2 === 1 ? (A = F, O -= 257, B = N, T -= 257, 256) : (A = U, B = L, -1), v = y, l = s, S = g = C = 0, d = -1, h18 = (z = 1 << (x = k)) - 1, e2 === 1 && 852 < z || e2 === 2 && 592 < z)
|
|
2860
|
+
return 1;
|
|
2861
|
+
for (; ; ) {
|
|
2862
|
+
for (p = v - S, _ = o[g] < c ? (m = 0, o[g]) : o[g] > c ? (m = B[T + o[g]], A[O + o[g]]) : (m = 96, 0), f = 1 << v - S, y = u = 1 << x; i[l + (C >> S) + (u -= f)] = p << 24 | m << 16 | _ | 0, u !== 0; )
|
|
2863
|
+
;
|
|
2864
|
+
for (f = 1 << v - 1; C & f; )
|
|
2865
|
+
f >>= 1;
|
|
2866
|
+
if (f !== 0 ? (C &= f - 1, C += f) : C = 0, g++, --I[v] == 0) {
|
|
2867
|
+
if (v === b)
|
|
2868
|
+
break;
|
|
2869
|
+
v = t19[r19 + o[g]];
|
|
2870
|
+
}
|
|
2871
|
+
if (k < v && (C & h18) !== d) {
|
|
2872
|
+
for (S === 0 && (S = k), l += y, E = 1 << (x = v - S); x + S < b && !((E -= I[x + S]) <= 0); )
|
|
2873
|
+
x++, E <<= 1;
|
|
2874
|
+
if (z += 1 << x, e2 === 1 && 852 < z || e2 === 2 && 592 < z)
|
|
2875
|
+
return 1;
|
|
2876
|
+
i[d = C & h18] = k << 24 | x << 16 | l - s | 0;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
return C !== 0 && (i[l + C] = v - S << 24 | 64 << 16 | 0), a.bits = k, 0;
|
|
2880
|
+
};
|
|
2881
|
+
}, { "../utils/common": 41 }], 51: [function(e, t18, r18) {
|
|
2882
|
+
"use strict";
|
|
2883
|
+
t18.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" };
|
|
2884
|
+
}, {}], 52: [function(e, t18, r18) {
|
|
2885
|
+
"use strict";
|
|
2886
|
+
var a = e("../utils/common");
|
|
2887
|
+
function n18(e2) {
|
|
2888
|
+
for (var t19 = e2.length; 0 <= --t19; )
|
|
2889
|
+
e2[t19] = 0;
|
|
2890
|
+
}
|
|
2891
|
+
var _ = 15, i = 16, f = [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], u = [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], o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], d = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], h18 = new Array(576);
|
|
2892
|
+
n18(h18);
|
|
2893
|
+
var l = new Array(60);
|
|
2894
|
+
n18(l);
|
|
2895
|
+
var c = new Array(512);
|
|
2896
|
+
n18(c);
|
|
2897
|
+
var p = new Array(256);
|
|
2898
|
+
n18(p);
|
|
2899
|
+
var m = new Array(29);
|
|
2900
|
+
n18(m);
|
|
2901
|
+
var w, v, g, y = new Array(30);
|
|
2902
|
+
function b(e2, t19, r19, n19, i2) {
|
|
2903
|
+
this.static_tree = e2, this.extra_bits = t19, this.extra_base = r19, this.elems = n19, this.max_length = i2, this.has_stree = e2 && e2.length;
|
|
2904
|
+
}
|
|
2905
|
+
function s(e2, t19) {
|
|
2906
|
+
this.dyn_tree = e2, this.max_code = 0, this.stat_desc = t19;
|
|
2907
|
+
}
|
|
2908
|
+
function k(e2) {
|
|
2909
|
+
return e2 < 256 ? c[e2] : c[256 + (e2 >>> 7)];
|
|
2910
|
+
}
|
|
2911
|
+
function x(e2, t19) {
|
|
2912
|
+
e2.pending_buf[e2.pending++] = 255 & t19, e2.pending_buf[e2.pending++] = t19 >>> 8 & 255;
|
|
2913
|
+
}
|
|
2914
|
+
function S(e2, t19, r19) {
|
|
2915
|
+
e2.bi_valid > i - r19 ? (e2.bi_buf |= t19 << e2.bi_valid & 65535, x(e2, e2.bi_buf), e2.bi_buf = t19 >> i - e2.bi_valid, e2.bi_valid += r19 - i) : (e2.bi_buf |= t19 << e2.bi_valid & 65535, e2.bi_valid += r19);
|
|
2916
|
+
}
|
|
2917
|
+
function E(e2, t19, r19) {
|
|
2918
|
+
S(e2, r19[2 * t19], r19[2 * t19 + 1]);
|
|
2919
|
+
}
|
|
2920
|
+
function z(e2, t19) {
|
|
2921
|
+
for (var r19 = 0; r19 |= 1 & e2, e2 >>>= 1, r19 <<= 1, 0 < --t19; )
|
|
2922
|
+
;
|
|
2923
|
+
return r19 >>> 1;
|
|
2924
|
+
}
|
|
2925
|
+
function C(e2, t19, r19) {
|
|
2926
|
+
var n19, i2, s2 = new Array(_ + 1), o2 = 0;
|
|
2927
|
+
for (n19 = 1; n19 <= _; n19++)
|
|
2928
|
+
s2[n19] = o2 = o2 + r19[n19 - 1] << 1;
|
|
2929
|
+
for (i2 = 0; i2 <= t19; i2++) {
|
|
2930
|
+
var a2 = e2[2 * i2 + 1];
|
|
2931
|
+
a2 !== 0 && (e2[2 * i2] = z(s2[a2]++, a2));
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
function A(e2) {
|
|
2935
|
+
var t19;
|
|
2936
|
+
for (t19 = 0; t19 < 286; t19++)
|
|
2937
|
+
e2.dyn_ltree[2 * t19] = 0;
|
|
2938
|
+
for (t19 = 0; t19 < 30; t19++)
|
|
2939
|
+
e2.dyn_dtree[2 * t19] = 0;
|
|
2940
|
+
for (t19 = 0; t19 < 19; t19++)
|
|
2941
|
+
e2.bl_tree[2 * t19] = 0;
|
|
2942
|
+
e2.dyn_ltree[512] = 1, e2.opt_len = e2.static_len = 0, e2.last_lit = e2.matches = 0;
|
|
2943
|
+
}
|
|
2944
|
+
function O(e2) {
|
|
2945
|
+
8 < e2.bi_valid ? x(e2, e2.bi_buf) : 0 < e2.bi_valid && (e2.pending_buf[e2.pending++] = e2.bi_buf), e2.bi_buf = 0, e2.bi_valid = 0;
|
|
2946
|
+
}
|
|
2947
|
+
function I(e2, t19, r19, n19) {
|
|
2948
|
+
var i2 = 2 * t19, s2 = 2 * r19;
|
|
2949
|
+
return e2[i2] < e2[s2] || e2[i2] === e2[s2] && n19[t19] <= n19[r19];
|
|
2950
|
+
}
|
|
2951
|
+
function D(e2, t19, r19) {
|
|
2952
|
+
for (var n19 = e2.heap[r19], i2 = r19 << 1; i2 <= e2.heap_len && (i2 < e2.heap_len && I(t19, e2.heap[i2 + 1], e2.heap[i2], e2.depth) && i2++, !I(t19, n19, e2.heap[i2], e2.depth)); )
|
|
2953
|
+
e2.heap[r19] = e2.heap[i2], r19 = i2, i2 <<= 1;
|
|
2954
|
+
e2.heap[r19] = n19;
|
|
2955
|
+
}
|
|
2956
|
+
function B(e2, t19, r19) {
|
|
2957
|
+
var n19, i2, s2, o2, a2 = 0;
|
|
2958
|
+
if (e2.last_lit !== 0)
|
|
2959
|
+
for (; n19 = e2.pending_buf[e2.d_buf + 2 * a2] << 8 | e2.pending_buf[e2.d_buf + 2 * a2 + 1], i2 = e2.pending_buf[e2.l_buf + a2], a2++, n19 === 0 ? E(e2, i2, t19) : (E(e2, (s2 = p[i2]) + 256 + 1, t19), (o2 = f[s2]) !== 0 && S(e2, i2 -= m[s2], o2), E(e2, s2 = k(--n19), r19), (o2 = u[s2]) !== 0 && S(e2, n19 -= y[s2], o2)), a2 < e2.last_lit; )
|
|
2960
|
+
;
|
|
2961
|
+
E(e2, 256, t19);
|
|
2962
|
+
}
|
|
2963
|
+
function T(e2, t19) {
|
|
2964
|
+
var r19, n19, i2, s2 = t19.dyn_tree, o2 = t19.stat_desc.static_tree, a2 = t19.stat_desc.has_stree, f2 = t19.stat_desc.elems, u2 = -1;
|
|
2965
|
+
for (e2.heap_len = 0, e2.heap_max = 573, r19 = 0; r19 < f2; r19++)
|
|
2966
|
+
s2[2 * r19] !== 0 ? (e2.heap[++e2.heap_len] = u2 = r19, e2.depth[r19] = 0) : s2[2 * r19 + 1] = 0;
|
|
2967
|
+
for (; e2.heap_len < 2; )
|
|
2968
|
+
s2[2 * (i2 = e2.heap[++e2.heap_len] = u2 < 2 ? ++u2 : 0)] = 1, e2.depth[i2] = 0, e2.opt_len--, a2 && (e2.static_len -= o2[2 * i2 + 1]);
|
|
2969
|
+
for (t19.max_code = u2, r19 = e2.heap_len >> 1; 1 <= r19; r19--)
|
|
2970
|
+
D(e2, s2, r19);
|
|
2971
|
+
for (i2 = f2; r19 = e2.heap[1], e2.heap[1] = e2.heap[e2.heap_len--], D(e2, s2, 1), n19 = e2.heap[1], e2.heap[--e2.heap_max] = r19, e2.heap[--e2.heap_max] = n19, s2[2 * i2] = s2[2 * r19] + s2[2 * n19], e2.depth[i2] = (e2.depth[r19] >= e2.depth[n19] ? e2.depth[r19] : e2.depth[n19]) + 1, s2[2 * r19 + 1] = s2[2 * n19 + 1] = i2, e2.heap[1] = i2++, D(e2, s2, 1), 2 <= e2.heap_len; )
|
|
2972
|
+
;
|
|
2973
|
+
e2.heap[--e2.heap_max] = e2.heap[1], function(e3, t20) {
|
|
2974
|
+
var r20, n20, i3, s3, o3, a3, f3 = t20.dyn_tree, u3 = t20.max_code, d2 = t20.stat_desc.static_tree, h19 = t20.stat_desc.has_stree, l2 = t20.stat_desc.extra_bits, c2 = t20.stat_desc.extra_base, p2 = t20.stat_desc.max_length, m2 = 0;
|
|
2975
|
+
for (s3 = 0; s3 <= _; s3++)
|
|
2976
|
+
e3.bl_count[s3] = 0;
|
|
2977
|
+
for (f3[2 * e3.heap[e3.heap_max] + 1] = 0, r20 = e3.heap_max + 1; r20 < 573; r20++)
|
|
2978
|
+
p2 < (s3 = f3[2 * f3[2 * (n20 = e3.heap[r20]) + 1] + 1] + 1) && (s3 = p2, m2++), f3[2 * n20 + 1] = s3, u3 < n20 || (e3.bl_count[s3]++, o3 = 0, c2 <= n20 && (o3 = l2[n20 - c2]), a3 = f3[2 * n20], e3.opt_len += a3 * (s3 + o3), h19 && (e3.static_len += a3 * (d2[2 * n20 + 1] + o3)));
|
|
2979
|
+
if (m2 !== 0) {
|
|
2980
|
+
do {
|
|
2981
|
+
for (s3 = p2 - 1; e3.bl_count[s3] === 0; )
|
|
2982
|
+
s3--;
|
|
2983
|
+
e3.bl_count[s3]--, e3.bl_count[s3 + 1] += 2, e3.bl_count[p2]--, m2 -= 2;
|
|
2984
|
+
} while (0 < m2);
|
|
2985
|
+
for (s3 = p2; s3 !== 0; s3--)
|
|
2986
|
+
for (n20 = e3.bl_count[s3]; n20 !== 0; )
|
|
2987
|
+
u3 < (i3 = e3.heap[--r20]) || (f3[2 * i3 + 1] !== s3 && (e3.opt_len += (s3 - f3[2 * i3 + 1]) * f3[2 * i3], f3[2 * i3 + 1] = s3), n20--);
|
|
2988
|
+
}
|
|
2989
|
+
}(e2, t19), C(s2, u2, e2.bl_count);
|
|
2990
|
+
}
|
|
2991
|
+
function R(e2, t19, r19) {
|
|
2992
|
+
var n19, i2, s2 = -1, o2 = t19[1], a2 = 0, f2 = 7, u2 = 4;
|
|
2993
|
+
for (o2 === 0 && (f2 = 138, u2 = 3), t19[2 * (r19 + 1) + 1] = 65535, n19 = 0; n19 <= r19; n19++)
|
|
2994
|
+
i2 = o2, o2 = t19[2 * (n19 + 1) + 1], ++a2 < f2 && i2 === o2 || (a2 < u2 ? e2.bl_tree[2 * i2] += a2 : i2 !== 0 ? (i2 !== s2 && e2.bl_tree[2 * i2]++, e2.bl_tree[32]++) : a2 <= 10 ? e2.bl_tree[34]++ : e2.bl_tree[36]++, s2 = i2, u2 = (a2 = 0) === o2 ? (f2 = 138, 3) : i2 === o2 ? (f2 = 6, 3) : (f2 = 7, 4));
|
|
2995
|
+
}
|
|
2996
|
+
function F(e2, t19, r19) {
|
|
2997
|
+
var n19, i2, s2 = -1, o2 = t19[1], a2 = 0, f2 = 7, u2 = 4;
|
|
2998
|
+
for (o2 === 0 && (f2 = 138, u2 = 3), n19 = 0; n19 <= r19; n19++)
|
|
2999
|
+
if (i2 = o2, o2 = t19[2 * (n19 + 1) + 1], !(++a2 < f2 && i2 === o2)) {
|
|
3000
|
+
if (a2 < u2)
|
|
3001
|
+
for (; E(e2, i2, e2.bl_tree), --a2 != 0; )
|
|
3002
|
+
;
|
|
3003
|
+
else
|
|
3004
|
+
i2 !== 0 ? (i2 !== s2 && (E(e2, i2, e2.bl_tree), a2--), E(e2, 16, e2.bl_tree), S(e2, a2 - 3, 2)) : a2 <= 10 ? (E(e2, 17, e2.bl_tree), S(e2, a2 - 3, 3)) : (E(e2, 18, e2.bl_tree), S(e2, a2 - 11, 7));
|
|
3005
|
+
s2 = i2, u2 = (a2 = 0) === o2 ? (f2 = 138, 3) : i2 === o2 ? (f2 = 6, 3) : (f2 = 7, 4);
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
n18(y);
|
|
3009
|
+
var N = false;
|
|
3010
|
+
function U(e2, t19, r19, n19) {
|
|
3011
|
+
var i2, s2, o2;
|
|
3012
|
+
S(e2, 0 + (n19 ? 1 : 0), 3), s2 = t19, o2 = r19, O(i2 = e2), x(i2, o2), x(i2, ~o2), a.arraySet(i2.pending_buf, i2.window, s2, o2, i2.pending), i2.pending += o2;
|
|
3013
|
+
}
|
|
3014
|
+
r18._tr_init = function(e2) {
|
|
3015
|
+
N || (function() {
|
|
3016
|
+
var e3, t19, r19, n19, i2, s2 = new Array(_ + 1);
|
|
3017
|
+
for (n19 = r19 = 0; n19 < 28; n19++)
|
|
3018
|
+
for (m[n19] = r19, e3 = 0; e3 < 1 << f[n19]; e3++)
|
|
3019
|
+
p[r19++] = n19;
|
|
3020
|
+
for (p[r19 - 1] = n19, n19 = i2 = 0; n19 < 16; n19++)
|
|
3021
|
+
for (y[n19] = i2, e3 = 0; e3 < 1 << u[n19]; e3++)
|
|
3022
|
+
c[i2++] = n19;
|
|
3023
|
+
for (i2 >>= 7; n19 < 30; n19++)
|
|
3024
|
+
for (y[n19] = i2 << 7, e3 = 0; e3 < 1 << u[n19] - 7; e3++)
|
|
3025
|
+
c[256 + i2++] = n19;
|
|
3026
|
+
for (t19 = 0; t19 <= _; t19++)
|
|
3027
|
+
s2[t19] = 0;
|
|
3028
|
+
for (e3 = 0; e3 <= 143; )
|
|
3029
|
+
h18[2 * e3 + 1] = 8, e3++, s2[8]++;
|
|
3030
|
+
for (; e3 <= 255; )
|
|
3031
|
+
h18[2 * e3 + 1] = 9, e3++, s2[9]++;
|
|
3032
|
+
for (; e3 <= 279; )
|
|
3033
|
+
h18[2 * e3 + 1] = 7, e3++, s2[7]++;
|
|
3034
|
+
for (; e3 <= 287; )
|
|
3035
|
+
h18[2 * e3 + 1] = 8, e3++, s2[8]++;
|
|
3036
|
+
for (C(h18, 287, s2), e3 = 0; e3 < 30; e3++)
|
|
3037
|
+
l[2 * e3 + 1] = 5, l[2 * e3] = z(e3, 5);
|
|
3038
|
+
w = new b(h18, f, 257, 286, _), v = new b(l, u, 0, 30, _), g = new b(new Array(0), o, 0, 19, 7);
|
|
3039
|
+
}(), N = true), e2.l_desc = new s(e2.dyn_ltree, w), e2.d_desc = new s(e2.dyn_dtree, v), e2.bl_desc = new s(e2.bl_tree, g), e2.bi_buf = 0, e2.bi_valid = 0, A(e2);
|
|
3040
|
+
}, r18._tr_stored_block = U, r18._tr_flush_block = function(e2, t19, r19, n19) {
|
|
3041
|
+
var i2, s2, o2 = 0;
|
|
3042
|
+
0 < e2.level ? (e2.strm.data_type === 2 && (e2.strm.data_type = function(e3) {
|
|
3043
|
+
var t20, r20 = 4093624447;
|
|
3044
|
+
for (t20 = 0; t20 <= 31; t20++, r20 >>>= 1)
|
|
3045
|
+
if (1 & r20 && e3.dyn_ltree[2 * t20] !== 0)
|
|
3046
|
+
return 0;
|
|
3047
|
+
if (e3.dyn_ltree[18] !== 0 || e3.dyn_ltree[20] !== 0 || e3.dyn_ltree[26] !== 0)
|
|
3048
|
+
return 1;
|
|
3049
|
+
for (t20 = 32; t20 < 256; t20++)
|
|
3050
|
+
if (e3.dyn_ltree[2 * t20] !== 0)
|
|
3051
|
+
return 1;
|
|
3052
|
+
return 0;
|
|
3053
|
+
}(e2)), T(e2, e2.l_desc), T(e2, e2.d_desc), o2 = function(e3) {
|
|
3054
|
+
var t20;
|
|
3055
|
+
for (R(e3, e3.dyn_ltree, e3.l_desc.max_code), R(e3, e3.dyn_dtree, e3.d_desc.max_code), T(e3, e3.bl_desc), t20 = 18; 3 <= t20 && e3.bl_tree[2 * d[t20] + 1] === 0; t20--)
|
|
3056
|
+
;
|
|
3057
|
+
return e3.opt_len += 3 * (t20 + 1) + 5 + 5 + 4, t20;
|
|
3058
|
+
}(e2), i2 = e2.opt_len + 3 + 7 >>> 3, (s2 = e2.static_len + 3 + 7 >>> 3) <= i2 && (i2 = s2)) : i2 = s2 = r19 + 5, r19 + 4 <= i2 && t19 !== -1 ? U(e2, t19, r19, n19) : e2.strategy === 4 || s2 === i2 ? (S(e2, 2 + (n19 ? 1 : 0), 3), B(e2, h18, l)) : (S(e2, 4 + (n19 ? 1 : 0), 3), function(e3, t20, r20, n20) {
|
|
3059
|
+
var i3;
|
|
3060
|
+
for (S(e3, t20 - 257, 5), S(e3, r20 - 1, 5), S(e3, n20 - 4, 4), i3 = 0; i3 < n20; i3++)
|
|
3061
|
+
S(e3, e3.bl_tree[2 * d[i3] + 1], 3);
|
|
3062
|
+
F(e3, e3.dyn_ltree, t20 - 1), F(e3, e3.dyn_dtree, r20 - 1);
|
|
3063
|
+
}(e2, e2.l_desc.max_code + 1, e2.d_desc.max_code + 1, o2 + 1), B(e2, e2.dyn_ltree, e2.dyn_dtree)), A(e2), n19 && O(e2);
|
|
3064
|
+
}, r18._tr_tally = function(e2, t19, r19) {
|
|
3065
|
+
return e2.pending_buf[e2.d_buf + 2 * e2.last_lit] = t19 >>> 8 & 255, e2.pending_buf[e2.d_buf + 2 * e2.last_lit + 1] = 255 & t19, e2.pending_buf[e2.l_buf + e2.last_lit] = 255 & r19, e2.last_lit++, t19 === 0 ? e2.dyn_ltree[2 * r19]++ : (e2.matches++, t19--, e2.dyn_ltree[2 * (p[r19] + 256 + 1)]++, e2.dyn_dtree[2 * k(t19)]++), e2.last_lit === e2.lit_bufsize - 1;
|
|
3066
|
+
}, r18._tr_align = function(e2) {
|
|
3067
|
+
var t19;
|
|
3068
|
+
S(e2, 2, 3), E(e2, 256, h18), (t19 = e2).bi_valid === 16 ? (x(t19, t19.bi_buf), t19.bi_buf = 0, t19.bi_valid = 0) : 8 <= t19.bi_valid && (t19.pending_buf[t19.pending++] = 255 & t19.bi_buf, t19.bi_buf >>= 8, t19.bi_valid -= 8);
|
|
3069
|
+
};
|
|
3070
|
+
}, { "../utils/common": 41 }], 53: [function(e, t18, r18) {
|
|
3071
|
+
"use strict";
|
|
3072
|
+
t18.exports = function() {
|
|
3073
|
+
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;
|
|
3074
|
+
};
|
|
3075
|
+
}, {}], 54: [function(e, t18, r18) {
|
|
3076
|
+
"use strict";
|
|
3077
|
+
t18.exports = typeof setImmediate == "function" ? setImmediate : function() {
|
|
3078
|
+
var e2 = [].slice.apply(arguments);
|
|
3079
|
+
e2.splice(1, 0, 0), setTimeout.apply(null, e2);
|
|
3080
|
+
};
|
|
3081
|
+
}, {}] }, {}, [10])(10);
|
|
3082
|
+
});
|
|
3083
|
+
}).call(this, r16 !== void 0 ? r16 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3084
|
+
}, {}] }, {}, [1])(1);
|
|
3085
|
+
});
|
|
3086
|
+
}).call(this, r15 !== void 0 ? r15 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3087
|
+
}, {}] }, {}, [1])(1);
|
|
3088
|
+
});
|
|
3089
|
+
}).call(this, r14 !== void 0 ? r14 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3090
|
+
}, {}] }, {}, [1])(1);
|
|
3091
|
+
});
|
|
3092
|
+
}).call(this, r13 !== void 0 ? r13 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3093
|
+
}, {}] }, {}, [1])(1);
|
|
3094
|
+
});
|
|
3095
|
+
}).call(this, r12 !== void 0 ? r12 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3096
|
+
}, {}] }, {}, [1])(1);
|
|
3097
|
+
});
|
|
3098
|
+
}).call(this, r11 !== void 0 ? r11 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3099
|
+
}, {}] }, {}, [1])(1);
|
|
3100
|
+
});
|
|
3101
|
+
}).call(this, r10 !== void 0 ? r10 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3102
|
+
}, {}] }, {}, [1])(1);
|
|
3103
|
+
});
|
|
3104
|
+
}).call(this, r9 !== void 0 ? r9 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3105
|
+
}, {}] }, {}, [1])(1);
|
|
3106
|
+
});
|
|
3107
|
+
}).call(this, r8 !== void 0 ? r8 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3108
|
+
}, {}] }, {}, [1])(1);
|
|
3109
|
+
});
|
|
3110
|
+
}).call(this, r7 !== void 0 ? r7 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3111
|
+
}, {}] }, {}, [1])(1);
|
|
3112
|
+
});
|
|
3113
|
+
}).call(this, r6 !== void 0 ? r6 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3114
|
+
}, {}] }, {}, [1])(1);
|
|
3115
|
+
});
|
|
3116
|
+
}).call(this, r5 !== void 0 ? r5 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3117
|
+
}, {}] }, {}, [1])(1);
|
|
3118
|
+
});
|
|
3119
|
+
}).call(this, r4 !== void 0 ? r4 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3120
|
+
}, {}] }, {}, [1])(1);
|
|
3121
|
+
});
|
|
3122
|
+
}).call(this, r3 !== void 0 ? r3 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3123
|
+
}, {}] }, {}, [1])(1);
|
|
3124
|
+
});
|
|
3125
|
+
}).call(this, r2 !== void 0 ? r2 : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3126
|
+
}, {}] }, {}, [1])(1);
|
|
3127
|
+
});
|
|
3128
|
+
}).call(this, r !== void 0 ? r : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3129
|
+
}, {}] }, {}, [1])(1);
|
|
3130
|
+
});
|
|
3131
|
+
}).call(this, typeof global != "undefined" ? global : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
3132
|
+
}, {}] }, {}, [1])(1);
|
|
3133
|
+
});
|
|
3134
|
+
}
|
|
3135
|
+
});
|
|
3136
|
+
|
|
3137
|
+
// src/zip-loader.ts
|
|
3138
|
+
async function parseZipAsync(data, options = {}) {
|
|
3139
|
+
const promises = [];
|
|
3140
|
+
const fileMap = {};
|
|
3141
|
+
try {
|
|
3142
|
+
const jsZip = new import_jszip.default();
|
|
3143
|
+
const zip = await jsZip.loadAsync(data, options);
|
|
3144
|
+
zip.forEach((relativePath, zipEntry) => {
|
|
3145
|
+
const subFilename = zipEntry.name;
|
|
3146
|
+
const promise = loadZipEntry(jsZip, subFilename, options).then((arrayBufferOrError) => {
|
|
3147
|
+
fileMap[relativePath] = arrayBufferOrError;
|
|
3148
|
+
});
|
|
3149
|
+
promises.push(promise);
|
|
3150
|
+
});
|
|
3151
|
+
await Promise.all(promises);
|
|
3152
|
+
return fileMap;
|
|
3153
|
+
} catch (error) {
|
|
3154
|
+
options.log.error(`Unable to read zip archive: ${error}`);
|
|
3155
|
+
throw error;
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
async function loadZipEntry(jsZip, subFilename, options = {}) {
|
|
3159
|
+
try {
|
|
3160
|
+
const arrayBuffer = await jsZip.file(subFilename).async(options.dataType || "arraybuffer");
|
|
3161
|
+
return arrayBuffer;
|
|
3162
|
+
} catch (error) {
|
|
3163
|
+
options.log.error(`Unable to read ${subFilename} from zip archive: ${error}`);
|
|
3164
|
+
return error;
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
var import_jszip, VERSION, ZipLoader;
|
|
3168
|
+
var init_zip_loader = __esm({
|
|
3169
|
+
"src/zip-loader.ts"() {
|
|
3170
|
+
import_jszip = __toModule(require_jszip_min());
|
|
3171
|
+
VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
3172
|
+
ZipLoader = {
|
|
3173
|
+
id: "zip",
|
|
3174
|
+
module: "zip",
|
|
3175
|
+
name: "Zip Archive",
|
|
3176
|
+
version: VERSION,
|
|
3177
|
+
extensions: ["zip"],
|
|
3178
|
+
mimeTypes: ["application/zip"],
|
|
3179
|
+
category: "archive",
|
|
3180
|
+
tests: ["PK"],
|
|
3181
|
+
options: {},
|
|
3182
|
+
parse: parseZipAsync
|
|
3183
|
+
};
|
|
3184
|
+
}
|
|
3185
|
+
});
|
|
3186
|
+
|
|
3187
|
+
// src/zip-writer.ts
|
|
3188
|
+
async function encodeZipAsync(fileMap, options = {}) {
|
|
3189
|
+
const jsZip = new import_jszip2.default();
|
|
3190
|
+
for (const subFileName in fileMap) {
|
|
3191
|
+
const subFileData = fileMap[subFileName];
|
|
3192
|
+
jsZip.file(subFileName, subFileData, options);
|
|
3193
|
+
}
|
|
3194
|
+
options = Object.assign({}, options, {
|
|
3195
|
+
type: "arraybuffer"
|
|
3196
|
+
});
|
|
3197
|
+
const { onUpdate = () => {
|
|
3198
|
+
} } = options;
|
|
3199
|
+
return jsZip.generateAsync(options, onUpdate).catch((error) => {
|
|
3200
|
+
options.log.error(`Unable to write zip archive: ${error}`);
|
|
3201
|
+
throw error;
|
|
3202
|
+
});
|
|
3203
|
+
}
|
|
3204
|
+
var import_jszip2, ZipWriter;
|
|
3205
|
+
var init_zip_writer = __esm({
|
|
3206
|
+
"src/zip-writer.ts"() {
|
|
3207
|
+
import_jszip2 = __toModule(require_jszip_min());
|
|
3208
|
+
ZipWriter = {
|
|
3209
|
+
name: "Zip Archive",
|
|
3210
|
+
extensions: ["zip"],
|
|
3211
|
+
category: "archive",
|
|
3212
|
+
mimeTypes: ["application/zip"],
|
|
3213
|
+
encode: encodeZipAsync
|
|
3214
|
+
};
|
|
3215
|
+
}
|
|
3216
|
+
});
|
|
3217
|
+
|
|
3218
|
+
// src/lib/tar/utils.ts
|
|
3219
|
+
function clean(length) {
|
|
3220
|
+
let i;
|
|
3221
|
+
const buffer = new Uint8Array(length);
|
|
3222
|
+
for (i = 0; i < length; i += 1) {
|
|
3223
|
+
buffer[i] = 0;
|
|
3224
|
+
}
|
|
3225
|
+
return buffer;
|
|
3226
|
+
}
|
|
3227
|
+
function pad(num, bytes, base) {
|
|
3228
|
+
const numStr = num.toString(base || 8);
|
|
3229
|
+
return "000000000000".substr(numStr.length + 12 - bytes) + numStr;
|
|
3230
|
+
}
|
|
3231
|
+
function stringToUint8(input, out, offset) {
|
|
3232
|
+
let i;
|
|
3233
|
+
let length;
|
|
3234
|
+
out = out || clean(input.length);
|
|
3235
|
+
offset = offset || 0;
|
|
3236
|
+
for (i = 0, length = input.length; i < length; i += 1) {
|
|
3237
|
+
out[offset] = input.charCodeAt(i);
|
|
3238
|
+
offset += 1;
|
|
3239
|
+
}
|
|
3240
|
+
return out;
|
|
3241
|
+
}
|
|
3242
|
+
var init_utils = __esm({
|
|
3243
|
+
"src/lib/tar/utils.ts"() {
|
|
3244
|
+
}
|
|
3245
|
+
});
|
|
3246
|
+
|
|
3247
|
+
// src/lib/tar/header.ts
|
|
3248
|
+
function format(data, cb) {
|
|
3249
|
+
const buffer = clean(512);
|
|
3250
|
+
let offset = 0;
|
|
3251
|
+
Object.entries(structure).forEach(([field, length]) => {
|
|
3252
|
+
const str = data[field] || "";
|
|
3253
|
+
let i;
|
|
3254
|
+
let fieldLength;
|
|
3255
|
+
for (i = 0, fieldLength = str.length; i < fieldLength; i += 1) {
|
|
3256
|
+
buffer[offset] = str.charCodeAt(i);
|
|
3257
|
+
offset += 1;
|
|
3258
|
+
}
|
|
3259
|
+
offset += length - i;
|
|
3260
|
+
});
|
|
3261
|
+
if (typeof cb === "function") {
|
|
3262
|
+
return cb(buffer, offset);
|
|
3263
|
+
}
|
|
3264
|
+
return buffer;
|
|
3265
|
+
}
|
|
3266
|
+
var structure;
|
|
3267
|
+
var init_header = __esm({
|
|
3268
|
+
"src/lib/tar/header.ts"() {
|
|
3269
|
+
init_utils();
|
|
3270
|
+
structure = {
|
|
3271
|
+
fileName: 100,
|
|
3272
|
+
fileMode: 8,
|
|
3273
|
+
uid: 8,
|
|
3274
|
+
gid: 8,
|
|
3275
|
+
fileSize: 12,
|
|
3276
|
+
mtime: 12,
|
|
3277
|
+
checksum: 8,
|
|
3278
|
+
type: 1,
|
|
3279
|
+
linkName: 100,
|
|
3280
|
+
ustar: 8,
|
|
3281
|
+
owner: 32,
|
|
3282
|
+
group: 32,
|
|
3283
|
+
majorNumber: 8,
|
|
3284
|
+
minorNumber: 8,
|
|
3285
|
+
filenamePrefix: 155,
|
|
3286
|
+
padding: 12
|
|
3287
|
+
};
|
|
3288
|
+
}
|
|
3289
|
+
});
|
|
3290
|
+
|
|
3291
|
+
// src/lib/tar/tar.ts
|
|
3292
|
+
var blockSize, headerLength, inputLength, recordSize, Tar, tar_default;
|
|
3293
|
+
var init_tar = __esm({
|
|
3294
|
+
"src/lib/tar/tar.ts"() {
|
|
3295
|
+
init_utils();
|
|
3296
|
+
init_header();
|
|
3297
|
+
recordSize = 512;
|
|
3298
|
+
Tar = class {
|
|
3299
|
+
constructor(recordsPerBlock) {
|
|
3300
|
+
this.blocks = [];
|
|
3301
|
+
this.written = 0;
|
|
3302
|
+
blockSize = (recordsPerBlock || 20) * recordSize;
|
|
3303
|
+
this.out = clean(blockSize);
|
|
3304
|
+
this.blocks = [];
|
|
3305
|
+
this.length = 0;
|
|
3306
|
+
this.save = this.save.bind(this);
|
|
3307
|
+
this.clear = this.clear.bind(this);
|
|
3308
|
+
this.append = this.append.bind(this);
|
|
3309
|
+
}
|
|
3310
|
+
append(filepath, input, opts) {
|
|
3311
|
+
let checksum;
|
|
3312
|
+
if (typeof input === "string") {
|
|
3313
|
+
input = stringToUint8(input);
|
|
3314
|
+
} else if (input.constructor && input.constructor !== Uint8Array.prototype.constructor) {
|
|
3315
|
+
const errorInputMatch = /function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/.exec(input.constructor.toString());
|
|
3316
|
+
const errorInput = errorInputMatch && errorInputMatch[1];
|
|
3317
|
+
const errorMessage = `Invalid input type. You gave me: ${errorInput}`;
|
|
3318
|
+
throw errorMessage;
|
|
3319
|
+
}
|
|
3320
|
+
opts = opts || {};
|
|
3321
|
+
const mode = opts.mode || parseInt("777", 8) & 4095;
|
|
3322
|
+
const mtime = opts.mtime || Math.floor(Number(new Date()) / 1e3);
|
|
3323
|
+
const uid = opts.uid || 0;
|
|
3324
|
+
const gid = opts.gid || 0;
|
|
3325
|
+
const data = {
|
|
3326
|
+
fileName: filepath,
|
|
3327
|
+
fileMode: pad(mode, 7),
|
|
3328
|
+
uid: pad(uid, 7),
|
|
3329
|
+
gid: pad(gid, 7),
|
|
3330
|
+
fileSize: pad(input.length, 11),
|
|
3331
|
+
mtime: pad(mtime, 11),
|
|
3332
|
+
checksum: " ",
|
|
3333
|
+
type: "0",
|
|
3334
|
+
ustar: "ustar ",
|
|
3335
|
+
owner: opts.owner || "",
|
|
3336
|
+
group: opts.group || ""
|
|
3337
|
+
};
|
|
3338
|
+
checksum = 0;
|
|
3339
|
+
Object.keys(data).forEach((key) => {
|
|
3340
|
+
let i;
|
|
3341
|
+
const value = data[key];
|
|
3342
|
+
let length;
|
|
3343
|
+
for (i = 0, length = value.length; i < length; i += 1) {
|
|
3344
|
+
checksum += value.charCodeAt(i);
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3347
|
+
data.checksum = `${pad(checksum, 6)}\0 `;
|
|
3348
|
+
const headerArr = format(data);
|
|
3349
|
+
headerLength = Math.ceil(headerArr.length / recordSize) * recordSize;
|
|
3350
|
+
inputLength = Math.ceil(input.length / recordSize) * recordSize;
|
|
3351
|
+
this.blocks.push({
|
|
3352
|
+
header: headerArr,
|
|
3353
|
+
input,
|
|
3354
|
+
headerLength,
|
|
3355
|
+
inputLength
|
|
3356
|
+
});
|
|
3357
|
+
}
|
|
3358
|
+
save() {
|
|
3359
|
+
const buffers = [];
|
|
3360
|
+
const chunks = new Array();
|
|
3361
|
+
let length = 0;
|
|
3362
|
+
const max = Math.pow(2, 20);
|
|
3363
|
+
let chunk = new Array();
|
|
3364
|
+
this.blocks.forEach((b = []) => {
|
|
3365
|
+
if (length + b.headerLength + b.inputLength > max) {
|
|
3366
|
+
chunks.push({ blocks: chunk, length });
|
|
3367
|
+
chunk = [];
|
|
3368
|
+
length = 0;
|
|
3369
|
+
}
|
|
3370
|
+
chunk.push(b);
|
|
3371
|
+
length += b.headerLength + b.inputLength;
|
|
3372
|
+
});
|
|
3373
|
+
chunks.push({ blocks: chunk, length });
|
|
3374
|
+
chunks.forEach((c = []) => {
|
|
3375
|
+
const buffer = new Uint8Array(c.length);
|
|
3376
|
+
let written = 0;
|
|
3377
|
+
c.blocks.forEach((b = []) => {
|
|
3378
|
+
buffer.set(b.header, written);
|
|
3379
|
+
written += b.headerLength;
|
|
3380
|
+
buffer.set(b.input, written);
|
|
3381
|
+
written += b.inputLength;
|
|
3382
|
+
});
|
|
3383
|
+
buffers.push(buffer);
|
|
3384
|
+
});
|
|
3385
|
+
buffers.push(new Uint8Array(2 * recordSize));
|
|
3386
|
+
return new Blob(buffers, { type: "octet/stream" });
|
|
3387
|
+
}
|
|
3388
|
+
clear() {
|
|
3389
|
+
this.written = 0;
|
|
3390
|
+
this.out = clean(blockSize);
|
|
3391
|
+
}
|
|
3392
|
+
};
|
|
3393
|
+
tar_default = Tar;
|
|
3394
|
+
}
|
|
3395
|
+
});
|
|
3396
|
+
|
|
3397
|
+
// src/tar-builder.ts
|
|
3398
|
+
var TAR_BUILDER_OPTIONS, TARBuilder;
|
|
3399
|
+
var init_tar_builder = __esm({
|
|
3400
|
+
"src/tar-builder.ts"() {
|
|
3401
|
+
init_tar();
|
|
3402
|
+
TAR_BUILDER_OPTIONS = {
|
|
3403
|
+
recordsPerBlock: 20
|
|
3404
|
+
};
|
|
3405
|
+
TARBuilder = class {
|
|
3406
|
+
constructor(options) {
|
|
3407
|
+
this.count = 0;
|
|
3408
|
+
this.options = { ...TAR_BUILDER_OPTIONS, ...options };
|
|
3409
|
+
this.tape = new tar_default(this.options.recordsPerBlock);
|
|
3410
|
+
}
|
|
3411
|
+
static get properties() {
|
|
3412
|
+
return {
|
|
3413
|
+
id: "tar",
|
|
3414
|
+
name: "TAR",
|
|
3415
|
+
extensions: ["tar"],
|
|
3416
|
+
mimeTypes: ["application/x-tar"],
|
|
3417
|
+
builder: TARBuilder,
|
|
3418
|
+
options: TAR_BUILDER_OPTIONS
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
addFile(filename, buffer) {
|
|
3422
|
+
this.tape.append(filename, new Uint8Array(buffer));
|
|
3423
|
+
this.count++;
|
|
3424
|
+
}
|
|
3425
|
+
async build() {
|
|
3426
|
+
return new Response(this.tape.save()).arrayBuffer();
|
|
3427
|
+
}
|
|
3428
|
+
};
|
|
3429
|
+
}
|
|
3430
|
+
});
|
|
3431
|
+
|
|
3432
|
+
// src/index.ts
|
|
3433
|
+
var src_exports = {};
|
|
3434
|
+
__export(src_exports, {
|
|
3435
|
+
TarBuilder: () => TARBuilder,
|
|
3436
|
+
ZipLoader: () => ZipLoader,
|
|
3437
|
+
ZipWriter: () => ZipWriter
|
|
3438
|
+
});
|
|
3439
|
+
var init_src = __esm({
|
|
3440
|
+
"src/index.ts"() {
|
|
3441
|
+
init_zip_loader();
|
|
3442
|
+
init_zip_writer();
|
|
3443
|
+
init_tar_builder();
|
|
3444
|
+
}
|
|
3445
|
+
});
|
|
3446
|
+
|
|
3447
|
+
// src/bundle.ts
|
|
3448
|
+
var require_bundle = __commonJS({
|
|
3449
|
+
"src/bundle.ts"(exports, module) {
|
|
3450
|
+
var moduleExports = (init_src(), src_exports);
|
|
3451
|
+
globalThis.loaders = globalThis.loaders || {};
|
|
3452
|
+
module.exports = Object.assign(globalThis.loaders, moduleExports);
|
|
3453
|
+
}
|
|
3454
|
+
});
|
|
3455
|
+
require_bundle();
|
|
3456
|
+
})();
|
|
3457
|
+
/*!
|
|
3458
|
+
|
|
3459
|
+
JSZip v3.7.0 - A JavaScript class for generating and reading zip files
|
|
3460
|
+
<http://stuartk.com/jszip>
|
|
3461
|
+
|
|
3462
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
3463
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
|
|
3464
|
+
|
|
3465
|
+
JSZip uses the library pako released under the MIT license :
|
|
3466
|
+
https://github.com/nodeca/pako/blob/master/LICENSE
|
|
3467
|
+
*/
|