@a3s-lab/office 0.12.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +112 -7
  2. package/dist/0~1403.js +20 -12
  3. package/dist/0~2805.js +241 -241
  4. package/dist/0~4980.js +1 -1
  5. package/dist/0~5050.js +1 -20
  6. package/dist/0~5093.js +547 -547
  7. package/dist/0~6090.js +63 -4
  8. package/dist/0~7048.js +31 -29
  9. package/dist/0~document-editor.js +694 -90
  10. package/dist/0~pdf-viewer.js +41 -10
  11. package/dist/0~presentation-editor.js +8 -6
  12. package/dist/0~spreadsheet-editor.js +11892 -9682
  13. package/dist/0~work-document-import-worker-client.js +237 -0
  14. package/dist/0~work-docx-export.js +1 -1
  15. package/dist/0~work-docx-import.js +1 -1
  16. package/dist/0~work-docx-large-document-import.js +559 -0
  17. package/dist/0~work-office-diagnostics.js +46 -32
  18. package/dist/4104.js +5070 -3112
  19. package/dist/432.js +51 -7
  20. package/dist/4476.js +201 -7
  21. package/dist/5184.js +24 -2
  22. package/dist/{8928.js → 6282.js} +2338 -93
  23. package/dist/8715.js +895 -888
  24. package/dist/9356.js +3 -1
  25. package/dist/core.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/internal/features/work/editors/document-editor-support.d.ts +1 -9
  28. package/dist/internal/features/work/editors/document-external-content.d.ts +1 -1
  29. package/dist/internal/features/work/editors/office-menu-keyboard.d.ts +1 -0
  30. package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +3 -1
  31. package/dist/internal/features/work/editors/presentation-slide-thumbnail.d.ts +3 -2
  32. package/dist/internal/features/work/editors/presentation-thumbnail-rail.d.ts +2 -1
  33. package/dist/internal/features/work/editors/presentation-workspace.d.ts +2 -1
  34. package/dist/internal/features/work/editors/spreadsheet-border-ribbon.d.ts +5 -0
  35. package/dist/internal/features/work/editors/spreadsheet-calculation-projection.d.ts +10 -0
  36. package/dist/internal/features/work/editors/spreadsheet-cell-border-command.d.ts +3 -0
  37. package/dist/internal/features/work/editors/spreadsheet-cell-border-per-cell.d.ts +5 -0
  38. package/dist/internal/features/work/editors/spreadsheet-cell-border.d.ts +28 -0
  39. package/dist/internal/features/work/editors/spreadsheet-cell-fill-command.d.ts +3 -0
  40. package/dist/internal/features/work/editors/spreadsheet-cell-fill.d.ts +12 -0
  41. package/dist/internal/features/work/editors/spreadsheet-cell-range.d.ts +14 -0
  42. package/dist/internal/features/work/editors/spreadsheet-cell-style-command.d.ts +3 -0
  43. package/dist/internal/features/work/editors/spreadsheet-cell-style-ribbon.d.ts +9 -0
  44. package/dist/internal/features/work/editors/spreadsheet-cell-style.d.ts +41 -0
  45. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +293 -0
  46. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +10 -4
  47. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +3 -1
  48. package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +8 -2
  49. package/dist/internal/features/work/editors/spreadsheet-home-format-ribbon.d.ts +10 -0
  50. package/dist/internal/features/work/editors/spreadsheet-in-place-workbook-sync.d.ts +10 -0
  51. package/dist/internal/features/work/editors/spreadsheet-number-format.d.ts +15 -3
  52. package/dist/internal/features/work/editors/spreadsheet-operation-projection.d.ts +14 -0
  53. package/dist/internal/features/work/editors/spreadsheet-structure-selection.d.ts +7 -0
  54. package/dist/internal/features/work/editors/use-document-pagination.d.ts +5 -0
  55. package/dist/internal/features/work/editors/use-presentation-design-commands.d.ts +2 -1
  56. package/dist/internal/features/work/editors/use-spreadsheet-workbook-sync.d.ts +2 -1
  57. package/dist/internal/features/work/spreadsheet-history-value.d.ts +1 -0
  58. package/dist/internal/features/work/spreadsheet-sparse.d.ts +6 -1
  59. package/dist/internal/features/work/work-document-chunk-geometry.d.ts +28 -0
  60. package/dist/internal/features/work/work-document-chunk-node.d.ts +23 -0
  61. package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
  62. package/dist/internal/features/work/work-document-html-fingerprint.d.ts +15 -0
  63. package/dist/internal/features/work/work-document-import-worker-client.d.ts +13 -0
  64. package/dist/internal/features/work/work-document-import-worker-protocol.d.ts +36 -0
  65. package/dist/internal/features/work/work-document-import.worker.d.ts +1 -0
  66. package/dist/internal/features/work/work-document-incremental-layout.d.ts +1 -1
  67. package/dist/internal/features/work/work-document-integrity-index.d.ts +14 -0
  68. package/dist/internal/features/work/work-document-lazy-block.d.ts +3 -0
  69. package/dist/internal/features/work/work-document-lazy-html.d.ts +21 -0
  70. package/dist/internal/features/work/work-document-lazy-model.d.ts +29 -0
  71. package/dist/internal/features/work/work-document-lazy-pagination-measurement.d.ts +3 -0
  72. package/dist/internal/features/work/work-document-lazy-preview.d.ts +21 -0
  73. package/dist/internal/features/work/work-document-lazy-update.d.ts +14 -0
  74. package/dist/internal/features/work/work-document-model.d.ts +18 -2
  75. package/dist/internal/features/work/work-document-page-surface-registry.d.ts +16 -0
  76. package/dist/internal/features/work/work-document-pagination-dom.d.ts +1 -0
  77. package/dist/internal/features/work/work-document-pagination-types.d.ts +1 -0
  78. package/dist/internal/features/work/work-document-pagination.d.ts +1 -1
  79. package/dist/internal/features/work/work-document-text-statistics.d.ts +25 -0
  80. package/dist/internal/features/work/work-document-windowing.d.ts +23 -0
  81. package/dist/internal/features/work/work-docx-large-document-import.d.ts +35 -0
  82. package/dist/internal/features/work/work-docx-large-document-parser.d.ts +29 -0
  83. package/dist/internal/features/work/work-file-import.d.ts +5 -0
  84. package/dist/internal/features/work/work-file-io.d.ts +3 -3
  85. package/dist/internal/features/work/work-file-kind.d.ts +5 -0
  86. package/dist/internal/features/work/work-office-diagnostics.d.ts +10 -1
  87. package/dist/internal/features/work/work-ooxml-package.d.ts +8 -0
  88. package/dist/internal/features/work/work-presentation-layouts.d.ts +7 -1
  89. package/dist/internal/features/work/work-repository.d.ts +1 -0
  90. package/dist/internal/features/work/work-spreadsheet-compatibility-summary.d.ts +10 -0
  91. package/dist/internal/features/work/work-spreadsheet-file-export.d.ts +2 -0
  92. package/dist/internal/features/work/work-spreadsheet-file-import.d.ts +3 -0
  93. package/dist/internal/features/work/work-spreadsheet-import-diagnostics.d.ts +2 -0
  94. package/dist/internal/features/work/work-spreadsheet-import-worker-client.d.ts +6 -0
  95. package/dist/internal/features/work/work-spreadsheet-import-worker-protocol.d.ts +32 -0
  96. package/dist/internal/features/work/work-spreadsheet-import.worker.d.ts +1 -0
  97. package/dist/internal/features/work/work-spreadsheet-matrix-profile.d.ts +64 -0
  98. package/dist/internal/features/work/work-spreadsheet-package-scan-worker-client.d.ts +6 -0
  99. package/dist/internal/features/work/work-spreadsheet-package-scan-worker-protocol.d.ts +49 -0
  100. package/dist/internal/features/work/work-spreadsheet-package-scan.worker.d.ts +1 -0
  101. package/dist/internal/features/work/work-xlsx-cell-borders.d.ts +25 -0
  102. package/dist/internal/features/work/work-xlsx-cell-style-writer.d.ts +21 -0
  103. package/dist/internal/features/work/work-xlsx-cell-style-xml.d.ts +17 -0
  104. package/dist/internal/features/work/work-xlsx-cell-styles.d.ts +13 -0
  105. package/dist/internal/features/work/work-xlsx-colors.d.ts +6 -0
  106. package/dist/internal/features/work/work-xlsx-formula-diagnostics.d.ts +3 -1
  107. package/dist/internal/features/work/work-xlsx-formulas.d.ts +2 -1
  108. package/dist/internal/features/work/work-xlsx-interop.d.ts +8 -5
  109. package/dist/internal/features/work/work-xlsx-pivot-diagnostics.d.ts +2 -1
  110. package/dist/internal/features/work/work-xlsx-plain-fast-path.d.ts +54 -0
  111. package/dist/internal/features/work/work-xlsx-style-gate.d.ts +1 -0
  112. package/dist/internal/features/work/work-xlsx-worksheet-scan.d.ts +13 -0
  113. package/dist/internal/features/work/work-xlsx-worksheet.d.ts +12 -0
  114. package/dist/office-kernel.wasm +0 -0
  115. package/dist/office-kernel.worker.js +31 -29
  116. package/dist/react.d.ts +7 -1
  117. package/dist/styles.css +557 -3
  118. package/dist/work-document-import.worker.js +558 -0
  119. package/dist/work-spreadsheet-import.worker.js +24745 -0
  120. package/dist/work-spreadsheet-import.worker.js.LICENSE.txt +3 -0
  121. package/dist/work-spreadsheet-package-scan.worker.js +4161 -0
  122. package/dist/work-spreadsheet-package-scan.worker.js.LICENSE.txt +11 -0
  123. package/docs/latest/en/browser-editor-architecture.md +351 -15
  124. package/package.json +23 -3
@@ -0,0 +1,4161 @@
1
+ /*! LICENSE: work-spreadsheet-package-scan.worker.js.LICENSE.txt */
2
+ (()=>{
3
+ var __webpack_modules__ = {
4
+ 710 (module, __unused_rspack_exports, __webpack_require__) {
5
+ /*!
6
+
7
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
8
+ <http://stuartk.com/jszip>
9
+
10
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
11
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
12
+
13
+ JSZip uses the library pako released under the MIT license :
14
+ https://github.com/nodeca/pako/blob/main/LICENSE
15
+ */ !function(e) {
16
+ module.exports = e();
17
+ }(function() {
18
+ return (function s(a, o, h) {
19
+ function u(r, e) {
20
+ if (!o[r]) {
21
+ if (!a[r]) {
22
+ var t = __webpack_require__(363);
23
+ if (!e && t) return t(r, !0);
24
+ if (l) return l(r, !0);
25
+ var n = new Error("Cannot find module '" + r + "'");
26
+ throw n.code = "MODULE_NOT_FOUND", n;
27
+ }
28
+ var i = o[r] = {
29
+ exports: {}
30
+ };
31
+ a[r][0].call(i.exports, function(e) {
32
+ var t = a[r][1][e];
33
+ return u(t || e);
34
+ }, i, i.exports, s, a, o, h);
35
+ }
36
+ return o[r].exports;
37
+ }
38
+ for(var l = __webpack_require__(363), e = 0; e < h.length; e++)u(h[e]);
39
+ return u;
40
+ })({
41
+ 1: [
42
+ function(e, t, r) {
43
+ "use strict";
44
+ var d = e("./utils"), c = e("./support"), p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
45
+ r.encode = function(e) {
46
+ for(var t, r, n, i, s, a, o, h = [], u = 0, l = e.length, f = l, c = "string" !== d.getTypeOf(e); u < e.length;)f = l - u, n = c ? (t = e[u++], r = u < l ? e[u++] : 0, u < l ? e[u++] : 0) : (t = e.charCodeAt(u++), r = u < l ? e.charCodeAt(u++) : 0, u < l ? e.charCodeAt(u++) : 0), i = t >> 2, s = (3 & t) << 4 | r >> 4, a = 1 < f ? (15 & r) << 2 | n >> 6 : 64, o = 2 < f ? 63 & n : 64, h.push(p.charAt(i) + p.charAt(s) + p.charAt(a) + p.charAt(o));
47
+ return h.join("");
48
+ }, r.decode = function(e) {
49
+ var t, r, n, i, s, a, o = 0, h = 0, u = "data:";
50
+ if (e.substr(0, u.length) === u) throw new Error("Invalid base64 input, it looks like a data url.");
51
+ var l, f = 3 * (e = e.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
52
+ if (e.charAt(e.length - 1) === p.charAt(64) && f--, e.charAt(e.length - 2) === p.charAt(64) && f--, f % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
53
+ for(l = c.uint8array ? new Uint8Array(0 | f) : new Array(0 | f); o < e.length;)t = p.indexOf(e.charAt(o++)) << 2 | (i = p.indexOf(e.charAt(o++))) >> 4, r = (15 & i) << 4 | (s = p.indexOf(e.charAt(o++))) >> 2, n = (3 & s) << 6 | (a = p.indexOf(e.charAt(o++))), l[h++] = t, 64 !== s && (l[h++] = r), 64 !== a && (l[h++] = n);
54
+ return l;
55
+ };
56
+ },
57
+ {
58
+ "./support": 30,
59
+ "./utils": 32
60
+ }
61
+ ],
62
+ 2: [
63
+ function(e, t, r) {
64
+ "use strict";
65
+ var n = e("./external"), i = e("./stream/DataWorker"), s = e("./stream/Crc32Probe"), a = e("./stream/DataLengthProbe");
66
+ function o(e, t, r, n, i) {
67
+ this.compressedSize = e, this.uncompressedSize = t, this.crc32 = r, this.compression = n, this.compressedContent = i;
68
+ }
69
+ o.prototype = {
70
+ getContentWorker: function() {
71
+ var e = new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")), t = this;
72
+ return e.on("end", function() {
73
+ if (this.streamInfo.data_length !== t.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
74
+ }), e;
75
+ },
76
+ getCompressedWorker: function() {
77
+ return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
78
+ }
79
+ }, o.createWorkerFrom = function(e, t, r) {
80
+ return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression", t);
81
+ }, t.exports = o;
82
+ },
83
+ {
84
+ "./external": 6,
85
+ "./stream/Crc32Probe": 25,
86
+ "./stream/DataLengthProbe": 26,
87
+ "./stream/DataWorker": 27
88
+ }
89
+ ],
90
+ 3: [
91
+ function(e, t, r) {
92
+ "use strict";
93
+ var n = e("./stream/GenericWorker");
94
+ r.STORE = {
95
+ magic: "\0\0",
96
+ compressWorker: function() {
97
+ return new n("STORE compression");
98
+ },
99
+ uncompressWorker: function() {
100
+ return new n("STORE decompression");
101
+ }
102
+ }, r.DEFLATE = e("./flate");
103
+ },
104
+ {
105
+ "./flate": 7,
106
+ "./stream/GenericWorker": 28
107
+ }
108
+ ],
109
+ 4: [
110
+ function(e, t, r) {
111
+ "use strict";
112
+ var n = e("./utils");
113
+ var o = function() {
114
+ for(var e, t = [], r = 0; r < 256; r++){
115
+ e = r;
116
+ for(var n = 0; n < 8; n++)e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
117
+ t[r] = e;
118
+ }
119
+ return t;
120
+ }();
121
+ t.exports = function(e, t) {
122
+ return void 0 !== e && e.length ? "string" !== n.getTypeOf(e) ? function(e, t, r, n) {
123
+ var i = o, s = n + r;
124
+ e ^= -1;
125
+ for(var a = n; a < s; a++)e = e >>> 8 ^ i[255 & (e ^ t[a])];
126
+ return -1 ^ e;
127
+ }(0 | t, e, e.length, 0) : function(e, t, r, n) {
128
+ var i = o, s = n + r;
129
+ e ^= -1;
130
+ for(var a = n; a < s; a++)e = e >>> 8 ^ i[255 & (e ^ t.charCodeAt(a))];
131
+ return -1 ^ e;
132
+ }(0 | t, e, e.length, 0) : 0;
133
+ };
134
+ },
135
+ {
136
+ "./utils": 32
137
+ }
138
+ ],
139
+ 5: [
140
+ function(e, t, r) {
141
+ "use strict";
142
+ r.base64 = !1, r.binary = !1, r.dir = !1, r.createFolders = !0, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
143
+ },
144
+ {}
145
+ ],
146
+ 6: [
147
+ function(e, t, r) {
148
+ "use strict";
149
+ var n = null;
150
+ n = "u" > typeof Promise ? Promise : e("lie"), t.exports = {
151
+ Promise: n
152
+ };
153
+ },
154
+ {
155
+ lie: 37
156
+ }
157
+ ],
158
+ 7: [
159
+ function(e, t, r) {
160
+ "use strict";
161
+ var n = "u" > typeof Uint8Array && "u" > typeof Uint16Array && "u" > typeof Uint32Array, i = e("pako"), s = e("./utils"), a = e("./stream/GenericWorker"), o = n ? "uint8array" : "array";
162
+ function h(e, t) {
163
+ a.call(this, "FlateWorker/" + e), this._pako = null, this._pakoAction = e, this._pakoOptions = t, this.meta = {};
164
+ }
165
+ r.magic = "\b\0", s.inherits(h, a), h.prototype.processChunk = function(e) {
166
+ this.meta = e.meta, null === this._pako && this._createPako(), this._pako.push(s.transformTo(o, e.data), !1);
167
+ }, h.prototype.flush = function() {
168
+ a.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], !0);
169
+ }, h.prototype.cleanUp = function() {
170
+ a.prototype.cleanUp.call(this), this._pako = null;
171
+ }, h.prototype._createPako = function() {
172
+ this._pako = new i[this._pakoAction]({
173
+ raw: !0,
174
+ level: this._pakoOptions.level || -1
175
+ });
176
+ var t = this;
177
+ this._pako.onData = function(e) {
178
+ t.push({
179
+ data: e,
180
+ meta: t.meta
181
+ });
182
+ };
183
+ }, r.compressWorker = function(e) {
184
+ return new h("Deflate", e);
185
+ }, r.uncompressWorker = function() {
186
+ return new h("Inflate", {});
187
+ };
188
+ },
189
+ {
190
+ "./stream/GenericWorker": 28,
191
+ "./utils": 32,
192
+ pako: 38
193
+ }
194
+ ],
195
+ 8: [
196
+ function(e, t, r) {
197
+ "use strict";
198
+ function A(e, t) {
199
+ var r, n = "";
200
+ for(r = 0; r < t; r++)n += String.fromCharCode(255 & e), e >>>= 8;
201
+ return n;
202
+ }
203
+ function n(e, t, r, n, i, s) {
204
+ var a, o, h = e.file, u = e.compression, l = s !== O.utf8encode, f = I.transformTo("string", s(h.name)), c = I.transformTo("string", O.utf8encode(h.name)), d = h.comment, p = I.transformTo("string", s(d)), m = I.transformTo("string", O.utf8encode(d)), _ = c.length !== h.name.length, g = m.length !== d.length, b = "", v = "", y = "", w = h.dir, k = h.date, x = {
205
+ crc32: 0,
206
+ compressedSize: 0,
207
+ uncompressedSize: 0
208
+ };
209
+ t && !r || (x.crc32 = e.crc32, x.compressedSize = e.compressedSize, x.uncompressedSize = e.uncompressedSize);
210
+ var S = 0;
211
+ t && (S |= 8), !l && (_ || g) && (S |= 2048);
212
+ var z = 0, C = 0;
213
+ w && (z |= 16), "UNIX" === i ? (C = 798, z |= function(e, t) {
214
+ var r = e;
215
+ return e || (r = t ? 16893 : 33204), (65535 & r) << 16;
216
+ }(h.unixPermissions, w)) : (C = 20, z |= function(e) {
217
+ return 63 & (e || 0);
218
+ }(h.dosPermissions)), a = k.getUTCHours(), a <<= 6, a |= k.getUTCMinutes(), a <<= 5, a |= k.getUTCSeconds() / 2, o = k.getUTCFullYear() - 1980, o <<= 4, o |= k.getUTCMonth() + 1, o <<= 5, o |= k.getUTCDate(), _ && (v = A(1, 1) + A(B(f), 4) + c, b += "up" + A(v.length, 2) + v), g && (y = A(1, 1) + A(B(p), 4) + m, b += "uc" + A(y.length, 2) + y);
219
+ var E = "";
220
+ return E += "\n\0", E += A(S, 2), E += u.magic, E += A(a, 2), E += A(o, 2), E += A(x.crc32, 4), E += A(x.compressedSize, 4), E += A(x.uncompressedSize, 4), E += A(f.length, 2), E += A(b.length, 2), {
221
+ fileRecord: R.LOCAL_FILE_HEADER + E + f + b,
222
+ dirRecord: R.CENTRAL_FILE_HEADER + A(C, 2) + E + A(p.length, 2) + "\0\0\0\0" + A(z, 4) + A(n, 4) + f + b + p
223
+ };
224
+ }
225
+ var I = e("../utils"), i = e("../stream/GenericWorker"), O = e("../utf8"), B = e("../crc32"), R = e("../signature");
226
+ function s(e, t, r, n) {
227
+ i.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t, this.zipPlatform = r, this.encodeFileName = n, this.streamFiles = e, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
228
+ }
229
+ I.inherits(s, i), s.prototype.push = function(e) {
230
+ var t = e.meta.percent || 0, r = this.entriesCount, n = this._sources.length;
231
+ this.accumulate ? this.contentBuffer.push(e) : (this.bytesWritten += e.data.length, i.prototype.push.call(this, {
232
+ data: e.data,
233
+ meta: {
234
+ currentFile: this.currentFile,
235
+ percent: r ? (t + 100 * (r - n - 1)) / r : 100
236
+ }
237
+ }));
238
+ }, s.prototype.openedSource = function(e) {
239
+ this.currentSourceOffset = this.bytesWritten, this.currentFile = e.file.name;
240
+ var t = this.streamFiles && !e.file.dir;
241
+ if (t) {
242
+ var r = n(e, t, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
243
+ this.push({
244
+ data: r.fileRecord,
245
+ meta: {
246
+ percent: 0
247
+ }
248
+ });
249
+ } else this.accumulate = !0;
250
+ }, s.prototype.closedSource = function(e) {
251
+ this.accumulate = !1;
252
+ var t = this.streamFiles && !e.file.dir, r = n(e, t, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
253
+ if (this.dirRecords.push(r.dirRecord), t) this.push({
254
+ data: function(e) {
255
+ return R.DATA_DESCRIPTOR + A(e.crc32, 4) + A(e.compressedSize, 4) + A(e.uncompressedSize, 4);
256
+ }(e),
257
+ meta: {
258
+ percent: 100
259
+ }
260
+ });
261
+ else for(this.push({
262
+ data: r.fileRecord,
263
+ meta: {
264
+ percent: 0
265
+ }
266
+ }); this.contentBuffer.length;)this.push(this.contentBuffer.shift());
267
+ this.currentFile = null;
268
+ }, s.prototype.flush = function() {
269
+ for(var e = this.bytesWritten, t = 0; t < this.dirRecords.length; t++)this.push({
270
+ data: this.dirRecords[t],
271
+ meta: {
272
+ percent: 100
273
+ }
274
+ });
275
+ var r = this.bytesWritten - e, n = function(e, t, r, n, i) {
276
+ var s = I.transformTo("string", i(n));
277
+ return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A(e, 2) + A(e, 2) + A(t, 4) + A(r, 4) + A(s.length, 2) + s;
278
+ }(this.dirRecords.length, r, e, this.zipComment, this.encodeFileName);
279
+ this.push({
280
+ data: n,
281
+ meta: {
282
+ percent: 100
283
+ }
284
+ });
285
+ }, s.prototype.prepareNextSource = function() {
286
+ this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
287
+ }, s.prototype.registerPrevious = function(e) {
288
+ this._sources.push(e);
289
+ var t = this;
290
+ return e.on("data", function(e) {
291
+ t.processChunk(e);
292
+ }), e.on("end", function() {
293
+ t.closedSource(t.previous.streamInfo), t._sources.length ? t.prepareNextSource() : t.end();
294
+ }), e.on("error", function(e) {
295
+ t.error(e);
296
+ }), this;
297
+ }, s.prototype.resume = function() {
298
+ return !!i.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
299
+ }, s.prototype.error = function(e) {
300
+ var t = this._sources;
301
+ if (!i.prototype.error.call(this, e)) return !1;
302
+ for(var r = 0; r < t.length; r++)try {
303
+ t[r].error(e);
304
+ } catch (e) {}
305
+ return !0;
306
+ }, s.prototype.lock = function() {
307
+ i.prototype.lock.call(this);
308
+ for(var e = this._sources, t = 0; t < e.length; t++)e[t].lock();
309
+ }, t.exports = s;
310
+ },
311
+ {
312
+ "../crc32": 4,
313
+ "../signature": 23,
314
+ "../stream/GenericWorker": 28,
315
+ "../utf8": 31,
316
+ "../utils": 32
317
+ }
318
+ ],
319
+ 9: [
320
+ function(e, t, r) {
321
+ "use strict";
322
+ var u = e("../compressions"), n = e("./ZipFileWorker");
323
+ r.generateWorker = function(e, a, t) {
324
+ var o = new n(a.streamFiles, t, a.platform, a.encodeFileName), h = 0;
325
+ try {
326
+ e.forEach(function(e, t) {
327
+ h++;
328
+ var r = function(e, t) {
329
+ var r = e || t, n = u[r];
330
+ if (!n) throw new Error(r + " is not a valid compression method !");
331
+ return n;
332
+ }(t.options.compression, a.compression), n = t.options.compressionOptions || a.compressionOptions || {}, i = t.dir, s = t.date;
333
+ t._compressWorker(r, n).withStreamInfo("file", {
334
+ name: e,
335
+ dir: i,
336
+ date: s,
337
+ comment: t.comment || "",
338
+ unixPermissions: t.unixPermissions,
339
+ dosPermissions: t.dosPermissions
340
+ }).pipe(o);
341
+ }), o.entriesCount = h;
342
+ } catch (e) {
343
+ o.error(e);
344
+ }
345
+ return o;
346
+ };
347
+ },
348
+ {
349
+ "../compressions": 3,
350
+ "./ZipFileWorker": 8
351
+ }
352
+ ],
353
+ 10: [
354
+ function(e, t, r) {
355
+ "use strict";
356
+ function n() {
357
+ if (!(this instanceof n)) return new n;
358
+ if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
359
+ this.files = Object.create(null), this.comment = null, this.root = "", this.clone = function() {
360
+ var e = new n;
361
+ for(var t in this)"function" != typeof this[t] && (e[t] = this[t]);
362
+ return e;
363
+ };
364
+ }
365
+ (n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function(e, t) {
366
+ return (new n).loadAsync(e, t);
367
+ }, n.external = e("./external"), t.exports = n;
368
+ },
369
+ {
370
+ "./defaults": 5,
371
+ "./external": 6,
372
+ "./load": 11,
373
+ "./object": 15,
374
+ "./support": 30
375
+ }
376
+ ],
377
+ 11: [
378
+ function(e, t, r) {
379
+ "use strict";
380
+ var u = e("./utils"), i = e("./external"), n = e("./utf8"), s = e("./zipEntries"), a = e("./stream/Crc32Probe"), l = e("./nodejsUtils");
381
+ function f(n) {
382
+ return new i.Promise(function(e, t) {
383
+ var r = n.decompressed.getContentWorker().pipe(new a);
384
+ r.on("error", function(e) {
385
+ t(e);
386
+ }).on("end", function() {
387
+ r.streamInfo.crc32 !== n.decompressed.crc32 ? t(new Error("Corrupted zip : CRC32 mismatch")) : e();
388
+ }).resume();
389
+ });
390
+ }
391
+ t.exports = function(e, o) {
392
+ var h = this;
393
+ return o = u.extend(o || {}, {
394
+ base64: !1,
395
+ checkCRC32: !1,
396
+ optimizedBinaryString: !1,
397
+ createFolders: !1,
398
+ decodeFileName: n.utf8decode
399
+ }), l.isNode && l.isStream(e) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u.prepareContent("the loaded zip file", e, !0, o.optimizedBinaryString, o.base64).then(function(e) {
400
+ var t = new s(o);
401
+ return t.load(e), t;
402
+ }).then(function(e) {
403
+ var t = [
404
+ i.Promise.resolve(e)
405
+ ], r = e.files;
406
+ if (o.checkCRC32) for(var n = 0; n < r.length; n++)t.push(f(r[n]));
407
+ return i.Promise.all(t);
408
+ }).then(function(e) {
409
+ for(var t = e.shift(), r = t.files, n = 0; n < r.length; n++){
410
+ var i = r[n], s = i.fileNameStr, a = u.resolve(i.fileNameStr);
411
+ h.file(a, i.decompressed, {
412
+ binary: !0,
413
+ optimizedBinaryString: !0,
414
+ date: i.date,
415
+ dir: i.dir,
416
+ comment: i.fileCommentStr.length ? i.fileCommentStr : null,
417
+ unixPermissions: i.unixPermissions,
418
+ dosPermissions: i.dosPermissions,
419
+ createFolders: o.createFolders
420
+ }), i.dir || (h.file(a).unsafeOriginalName = s);
421
+ }
422
+ return t.zipComment.length && (h.comment = t.zipComment), h;
423
+ });
424
+ };
425
+ },
426
+ {
427
+ "./external": 6,
428
+ "./nodejsUtils": 14,
429
+ "./stream/Crc32Probe": 25,
430
+ "./utf8": 31,
431
+ "./utils": 32,
432
+ "./zipEntries": 33
433
+ }
434
+ ],
435
+ 12: [
436
+ function(e, t, r) {
437
+ "use strict";
438
+ var n = e("../utils"), i = e("../stream/GenericWorker");
439
+ function s(e, t) {
440
+ i.call(this, "Nodejs stream input adapter for " + e), this._upstreamEnded = !1, this._bindStream(t);
441
+ }
442
+ n.inherits(s, i), s.prototype._bindStream = function(e) {
443
+ var t = this;
444
+ (this._stream = e).pause(), e.on("data", function(e) {
445
+ t.push({
446
+ data: e,
447
+ meta: {
448
+ percent: 0
449
+ }
450
+ });
451
+ }).on("error", function(e) {
452
+ t.isPaused ? this.generatedError = e : t.error(e);
453
+ }).on("end", function() {
454
+ t.isPaused ? t._upstreamEnded = !0 : t.end();
455
+ });
456
+ }, s.prototype.pause = function() {
457
+ return !!i.prototype.pause.call(this) && (this._stream.pause(), !0);
458
+ }, s.prototype.resume = function() {
459
+ return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
460
+ }, t.exports = s;
461
+ },
462
+ {
463
+ "../stream/GenericWorker": 28,
464
+ "../utils": 32
465
+ }
466
+ ],
467
+ 13: [
468
+ function(e, t, r) {
469
+ "use strict";
470
+ var i = e("readable-stream").Readable;
471
+ function n(e, t, r) {
472
+ i.call(this, t), this._helper = e;
473
+ var n = this;
474
+ e.on("data", function(e, t) {
475
+ n.push(e) || n._helper.pause(), r && r(t);
476
+ }).on("error", function(e) {
477
+ n.emit("error", e);
478
+ }).on("end", function() {
479
+ n.push(null);
480
+ });
481
+ }
482
+ e("../utils").inherits(n, i), n.prototype._read = function() {
483
+ this._helper.resume();
484
+ }, t.exports = n;
485
+ },
486
+ {
487
+ "../utils": 32,
488
+ "readable-stream": 16
489
+ }
490
+ ],
491
+ 14: [
492
+ function(e, t, r) {
493
+ "use strict";
494
+ t.exports = {
495
+ isNode: "u" > typeof Buffer,
496
+ newBufferFrom: function(e, t) {
497
+ if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e, t);
498
+ if ("number" == typeof e) throw new Error('The "data" argument must not be a number');
499
+ return new Buffer(e, t);
500
+ },
501
+ allocBuffer: function(e) {
502
+ if (Buffer.alloc) return Buffer.alloc(e);
503
+ var t = new Buffer(e);
504
+ return t.fill(0), t;
505
+ },
506
+ isBuffer: function(e) {
507
+ return Buffer.isBuffer(e);
508
+ },
509
+ isStream: function(e) {
510
+ return e && "function" == typeof e.on && "function" == typeof e.pause && "function" == typeof e.resume;
511
+ }
512
+ };
513
+ },
514
+ {}
515
+ ],
516
+ 15: [
517
+ function(e, t, r) {
518
+ "use strict";
519
+ function s(e, t, r) {
520
+ var n, i = u.getTypeOf(t), s = u.extend(r || {}, f);
521
+ s.date = s.date || new Date, null !== s.compression && (s.compression = s.compression.toUpperCase()), "string" == typeof s.unixPermissions && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = !0), s.dosPermissions && 16 & s.dosPermissions && (s.dir = !0), s.dir && (e = g(e)), s.createFolders && (n = _(e)) && b.call(this, n, !0);
522
+ var a = "string" === i && !1 === s.binary && !1 === s.base64;
523
+ r && void 0 !== r.binary || (s.binary = !a), (t instanceof c && 0 === t.uncompressedSize || s.dir || !t || 0 === t.length) && (s.base64 = !1, s.binary = !0, t = "", s.compression = "STORE", i = "string");
524
+ var o = null;
525
+ o = t instanceof c || t instanceof l ? t : p.isNode && p.isStream(t) ? new m(e, t) : u.prepareContent(e, t, s.binary, s.optimizedBinaryString, s.base64);
526
+ var h = new d(e, o, s);
527
+ this.files[e] = h;
528
+ }
529
+ var i = e("./utf8"), u = e("./utils"), l = e("./stream/GenericWorker"), a = e("./stream/StreamHelper"), f = e("./defaults"), c = e("./compressedObject"), d = e("./zipObject"), o = e("./generate"), p = e("./nodejsUtils"), m = e("./nodejs/NodejsStreamInputAdapter"), _ = function(e) {
530
+ "/" === e.slice(-1) && (e = e.substring(0, e.length - 1));
531
+ var t = e.lastIndexOf("/");
532
+ return 0 < t ? e.substring(0, t) : "";
533
+ }, g = function(e) {
534
+ return "/" !== e.slice(-1) && (e += "/"), e;
535
+ }, b = function(e, t) {
536
+ return t = void 0 !== t ? t : f.createFolders, e = g(e), this.files[e] || s.call(this, e, null, {
537
+ dir: !0,
538
+ createFolders: t
539
+ }), this.files[e];
540
+ };
541
+ function h(e) {
542
+ return "[object RegExp]" === Object.prototype.toString.call(e);
543
+ }
544
+ var n = {
545
+ load: function() {
546
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
547
+ },
548
+ forEach: function(e) {
549
+ var t, r, n;
550
+ for(t in this.files)n = this.files[t], (r = t.slice(this.root.length, t.length)) && t.slice(0, this.root.length) === this.root && e(r, n);
551
+ },
552
+ filter: function(r) {
553
+ var n = [];
554
+ return this.forEach(function(e, t) {
555
+ r(e, t) && n.push(t);
556
+ }), n;
557
+ },
558
+ file: function(e, t, r) {
559
+ if (1 !== arguments.length) return e = this.root + e, s.call(this, e, t, r), this;
560
+ if (h(e)) {
561
+ var n = e;
562
+ return this.filter(function(e, t) {
563
+ return !t.dir && n.test(e);
564
+ });
565
+ }
566
+ var i = this.files[this.root + e];
567
+ return i && !i.dir ? i : null;
568
+ },
569
+ folder: function(r) {
570
+ if (!r) return this;
571
+ if (h(r)) return this.filter(function(e, t) {
572
+ return t.dir && r.test(e);
573
+ });
574
+ var e = this.root + r, t = b.call(this, e), n = this.clone();
575
+ return n.root = t.name, n;
576
+ },
577
+ remove: function(r) {
578
+ r = this.root + r;
579
+ var e = this.files[r];
580
+ if (e || ("/" !== r.slice(-1) && (r += "/"), e = this.files[r]), e && !e.dir) delete this.files[r];
581
+ else for(var t = this.filter(function(e, t) {
582
+ return t.name.slice(0, r.length) === r;
583
+ }), n = 0; n < t.length; n++)delete this.files[t[n].name];
584
+ return this;
585
+ },
586
+ generate: function() {
587
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
588
+ },
589
+ generateInternalStream: function(e) {
590
+ var t, r = {};
591
+ try {
592
+ if ((r = u.extend(e || {}, {
593
+ streamFiles: !1,
594
+ compression: "STORE",
595
+ compressionOptions: null,
596
+ type: "",
597
+ platform: "DOS",
598
+ comment: null,
599
+ mimeType: "application/zip",
600
+ encodeFileName: i.utf8encode
601
+ })).type = r.type.toLowerCase(), r.compression = r.compression.toUpperCase(), "binarystring" === r.type && (r.type = "string"), !r.type) throw new Error("No output type specified.");
602
+ u.checkSupport(r.type), "darwin" !== r.platform && "freebsd" !== r.platform && "linux" !== r.platform && "sunos" !== r.platform || (r.platform = "UNIX"), "win32" === r.platform && (r.platform = "DOS");
603
+ var n = r.comment || this.comment || "";
604
+ t = o.generateWorker(this, r, n);
605
+ } catch (e) {
606
+ (t = new l("error")).error(e);
607
+ }
608
+ return new a(t, r.type || "string", r.mimeType);
609
+ },
610
+ generateAsync: function(e, t) {
611
+ return this.generateInternalStream(e).accumulate(t);
612
+ },
613
+ generateNodeStream: function(e, t) {
614
+ return (e = e || {}).type || (e.type = "nodebuffer"), this.generateInternalStream(e).toNodejsStream(t);
615
+ }
616
+ };
617
+ t.exports = n;
618
+ },
619
+ {
620
+ "./compressedObject": 2,
621
+ "./defaults": 5,
622
+ "./generate": 9,
623
+ "./nodejs/NodejsStreamInputAdapter": 12,
624
+ "./nodejsUtils": 14,
625
+ "./stream/GenericWorker": 28,
626
+ "./stream/StreamHelper": 29,
627
+ "./utf8": 31,
628
+ "./utils": 32,
629
+ "./zipObject": 35
630
+ }
631
+ ],
632
+ 16: [
633
+ function(e, t, r) {
634
+ "use strict";
635
+ t.exports = e("stream");
636
+ },
637
+ {
638
+ stream: void 0
639
+ }
640
+ ],
641
+ 17: [
642
+ function(e, t, r) {
643
+ "use strict";
644
+ var n = e("./DataReader");
645
+ function i(e) {
646
+ n.call(this, e);
647
+ for(var t = 0; t < this.data.length; t++)e[t] = 255 & e[t];
648
+ }
649
+ e("../utils").inherits(i, n), i.prototype.byteAt = function(e) {
650
+ return this.data[this.zero + e];
651
+ }, i.prototype.lastIndexOfSignature = function(e) {
652
+ for(var t = e.charCodeAt(0), r = e.charCodeAt(1), n = e.charCodeAt(2), i = e.charCodeAt(3), s = this.length - 4; 0 <= s; --s)if (this.data[s] === t && this.data[s + 1] === r && this.data[s + 2] === n && this.data[s + 3] === i) return s - this.zero;
653
+ return -1;
654
+ }, i.prototype.readAndCheckSignature = function(e) {
655
+ var t = e.charCodeAt(0), r = e.charCodeAt(1), n = e.charCodeAt(2), i = e.charCodeAt(3), s = this.readData(4);
656
+ return t === s[0] && r === s[1] && n === s[2] && i === s[3];
657
+ }, i.prototype.readData = function(e) {
658
+ if (this.checkOffset(e), 0 === e) return [];
659
+ var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
660
+ return this.index += e, t;
661
+ }, t.exports = i;
662
+ },
663
+ {
664
+ "../utils": 32,
665
+ "./DataReader": 18
666
+ }
667
+ ],
668
+ 18: [
669
+ function(e, t, r) {
670
+ "use strict";
671
+ var n = e("../utils");
672
+ function i(e) {
673
+ this.data = e, this.length = e.length, this.index = 0, this.zero = 0;
674
+ }
675
+ i.prototype = {
676
+ checkOffset: function(e) {
677
+ this.checkIndex(this.index + e);
678
+ },
679
+ checkIndex: function(e) {
680
+ if (this.length < this.zero + e || e < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e + "). Corrupted zip ?");
681
+ },
682
+ setIndex: function(e) {
683
+ this.checkIndex(e), this.index = e;
684
+ },
685
+ skip: function(e) {
686
+ this.setIndex(this.index + e);
687
+ },
688
+ byteAt: function() {},
689
+ readInt: function(e) {
690
+ var t, r = 0;
691
+ for(this.checkOffset(e), t = this.index + e - 1; t >= this.index; t--)r = (r << 8) + this.byteAt(t);
692
+ return this.index += e, r;
693
+ },
694
+ readString: function(e) {
695
+ return n.transformTo("string", this.readData(e));
696
+ },
697
+ readData: function() {},
698
+ lastIndexOfSignature: function() {},
699
+ readAndCheckSignature: function() {},
700
+ readDate: function() {
701
+ var e = this.readInt(4);
702
+ return new Date(Date.UTC(1980 + (e >> 25 & 127), (e >> 21 & 15) - 1, e >> 16 & 31, e >> 11 & 31, e >> 5 & 63, (31 & e) << 1));
703
+ }
704
+ }, t.exports = i;
705
+ },
706
+ {
707
+ "../utils": 32
708
+ }
709
+ ],
710
+ 19: [
711
+ function(e, t, r) {
712
+ "use strict";
713
+ var n = e("./Uint8ArrayReader");
714
+ function i(e) {
715
+ n.call(this, e);
716
+ }
717
+ e("../utils").inherits(i, n), i.prototype.readData = function(e) {
718
+ this.checkOffset(e);
719
+ var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
720
+ return this.index += e, t;
721
+ }, t.exports = i;
722
+ },
723
+ {
724
+ "../utils": 32,
725
+ "./Uint8ArrayReader": 21
726
+ }
727
+ ],
728
+ 20: [
729
+ function(e, t, r) {
730
+ "use strict";
731
+ var n = e("./DataReader");
732
+ function i(e) {
733
+ n.call(this, e);
734
+ }
735
+ e("../utils").inherits(i, n), i.prototype.byteAt = function(e) {
736
+ return this.data.charCodeAt(this.zero + e);
737
+ }, i.prototype.lastIndexOfSignature = function(e) {
738
+ return this.data.lastIndexOf(e) - this.zero;
739
+ }, i.prototype.readAndCheckSignature = function(e) {
740
+ return e === this.readData(4);
741
+ }, i.prototype.readData = function(e) {
742
+ this.checkOffset(e);
743
+ var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
744
+ return this.index += e, t;
745
+ }, t.exports = i;
746
+ },
747
+ {
748
+ "../utils": 32,
749
+ "./DataReader": 18
750
+ }
751
+ ],
752
+ 21: [
753
+ function(e, t, r) {
754
+ "use strict";
755
+ var n = e("./ArrayReader");
756
+ function i(e) {
757
+ n.call(this, e);
758
+ }
759
+ e("../utils").inherits(i, n), i.prototype.readData = function(e) {
760
+ if (this.checkOffset(e), 0 === e) return new Uint8Array(0);
761
+ var t = this.data.subarray(this.zero + this.index, this.zero + this.index + e);
762
+ return this.index += e, t;
763
+ }, t.exports = i;
764
+ },
765
+ {
766
+ "../utils": 32,
767
+ "./ArrayReader": 17
768
+ }
769
+ ],
770
+ 22: [
771
+ function(e, t, r) {
772
+ "use strict";
773
+ var n = e("../utils"), i = e("../support"), s = e("./ArrayReader"), a = e("./StringReader"), o = e("./NodeBufferReader"), h = e("./Uint8ArrayReader");
774
+ t.exports = function(e) {
775
+ var t = n.getTypeOf(e);
776
+ return n.checkSupport(t), "string" !== t || i.uint8array ? "nodebuffer" === t ? new o(e) : i.uint8array ? new h(n.transformTo("uint8array", e)) : new s(n.transformTo("array", e)) : new a(e);
777
+ };
778
+ },
779
+ {
780
+ "../support": 30,
781
+ "../utils": 32,
782
+ "./ArrayReader": 17,
783
+ "./NodeBufferReader": 19,
784
+ "./StringReader": 20,
785
+ "./Uint8ArrayReader": 21
786
+ }
787
+ ],
788
+ 23: [
789
+ function(e, t, r) {
790
+ "use strict";
791
+ r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\b";
792
+ },
793
+ {}
794
+ ],
795
+ 24: [
796
+ function(e, t, r) {
797
+ "use strict";
798
+ var n = e("./GenericWorker"), i = e("../utils");
799
+ function s(e) {
800
+ n.call(this, "ConvertWorker to " + e), this.destType = e;
801
+ }
802
+ i.inherits(s, n), s.prototype.processChunk = function(e) {
803
+ this.push({
804
+ data: i.transformTo(this.destType, e.data),
805
+ meta: e.meta
806
+ });
807
+ }, t.exports = s;
808
+ },
809
+ {
810
+ "../utils": 32,
811
+ "./GenericWorker": 28
812
+ }
813
+ ],
814
+ 25: [
815
+ function(e, t, r) {
816
+ "use strict";
817
+ var n = e("./GenericWorker"), i = e("../crc32");
818
+ function s() {
819
+ n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
820
+ }
821
+ e("../utils").inherits(s, n), s.prototype.processChunk = function(e) {
822
+ this.streamInfo.crc32 = i(e.data, this.streamInfo.crc32 || 0), this.push(e);
823
+ }, t.exports = s;
824
+ },
825
+ {
826
+ "../crc32": 4,
827
+ "../utils": 32,
828
+ "./GenericWorker": 28
829
+ }
830
+ ],
831
+ 26: [
832
+ function(e, t, r) {
833
+ "use strict";
834
+ var n = e("../utils"), i = e("./GenericWorker");
835
+ function s(e) {
836
+ i.call(this, "DataLengthProbe for " + e), this.propName = e, this.withStreamInfo(e, 0);
837
+ }
838
+ n.inherits(s, i), s.prototype.processChunk = function(e) {
839
+ if (e) {
840
+ var t = this.streamInfo[this.propName] || 0;
841
+ this.streamInfo[this.propName] = t + e.data.length;
842
+ }
843
+ i.prototype.processChunk.call(this, e);
844
+ }, t.exports = s;
845
+ },
846
+ {
847
+ "../utils": 32,
848
+ "./GenericWorker": 28
849
+ }
850
+ ],
851
+ 27: [
852
+ function(e, t, r) {
853
+ "use strict";
854
+ var n = e("../utils"), i = e("./GenericWorker");
855
+ function s(e) {
856
+ i.call(this, "DataWorker");
857
+ var t = this;
858
+ this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, e.then(function(e) {
859
+ t.dataIsReady = !0, t.data = e, t.max = e && e.length || 0, t.type = n.getTypeOf(e), t.isPaused || t._tickAndRepeat();
860
+ }, function(e) {
861
+ t.error(e);
862
+ });
863
+ }
864
+ n.inherits(s, i), s.prototype.cleanUp = function() {
865
+ i.prototype.cleanUp.call(this), this.data = null;
866
+ }, s.prototype.resume = function() {
867
+ return !!i.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, n.delay(this._tickAndRepeat, [], this)), !0);
868
+ }, s.prototype._tickAndRepeat = function() {
869
+ this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
870
+ }, s.prototype._tick = function() {
871
+ if (this.isPaused || this.isFinished) return !1;
872
+ var e = null, t = Math.min(this.max, this.index + 16384);
873
+ if (this.index >= this.max) return this.end();
874
+ switch(this.type){
875
+ case "string":
876
+ e = this.data.substring(this.index, t);
877
+ break;
878
+ case "uint8array":
879
+ e = this.data.subarray(this.index, t);
880
+ break;
881
+ case "array":
882
+ case "nodebuffer":
883
+ e = this.data.slice(this.index, t);
884
+ }
885
+ return this.index = t, this.push({
886
+ data: e,
887
+ meta: {
888
+ percent: this.max ? this.index / this.max * 100 : 0
889
+ }
890
+ });
891
+ }, t.exports = s;
892
+ },
893
+ {
894
+ "../utils": 32,
895
+ "./GenericWorker": 28
896
+ }
897
+ ],
898
+ 28: [
899
+ function(e, t, r) {
900
+ "use strict";
901
+ function n(e) {
902
+ this.name = e || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = {
903
+ data: [],
904
+ end: [],
905
+ error: []
906
+ }, this.previous = null;
907
+ }
908
+ n.prototype = {
909
+ push: function(e) {
910
+ this.emit("data", e);
911
+ },
912
+ end: function() {
913
+ if (this.isFinished) return !1;
914
+ this.flush();
915
+ try {
916
+ this.emit("end"), this.cleanUp(), this.isFinished = !0;
917
+ } catch (e) {
918
+ this.emit("error", e);
919
+ }
920
+ return !0;
921
+ },
922
+ error: function(e) {
923
+ return !this.isFinished && (this.isPaused ? this.generatedError = e : (this.isFinished = !0, this.emit("error", e), this.previous && this.previous.error(e), this.cleanUp()), !0);
924
+ },
925
+ on: function(e, t) {
926
+ return this._listeners[e].push(t), this;
927
+ },
928
+ cleanUp: function() {
929
+ this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
930
+ },
931
+ emit: function(e, t) {
932
+ if (this._listeners[e]) for(var r = 0; r < this._listeners[e].length; r++)this._listeners[e][r].call(this, t);
933
+ },
934
+ pipe: function(e) {
935
+ return e.registerPrevious(this);
936
+ },
937
+ registerPrevious: function(e) {
938
+ if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
939
+ this.streamInfo = e.streamInfo, this.mergeStreamInfo(), this.previous = e;
940
+ var t = this;
941
+ return e.on("data", function(e) {
942
+ t.processChunk(e);
943
+ }), e.on("end", function() {
944
+ t.end();
945
+ }), e.on("error", function(e) {
946
+ t.error(e);
947
+ }), this;
948
+ },
949
+ pause: function() {
950
+ return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
951
+ },
952
+ resume: function() {
953
+ if (!this.isPaused || this.isFinished) return !1;
954
+ var e = this.isPaused = !1;
955
+ return this.generatedError && (this.error(this.generatedError), e = !0), this.previous && this.previous.resume(), !e;
956
+ },
957
+ flush: function() {},
958
+ processChunk: function(e) {
959
+ this.push(e);
960
+ },
961
+ withStreamInfo: function(e, t) {
962
+ return this.extraStreamInfo[e] = t, this.mergeStreamInfo(), this;
963
+ },
964
+ mergeStreamInfo: function() {
965
+ for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo, e) && (this.streamInfo[e] = this.extraStreamInfo[e]);
966
+ },
967
+ lock: function() {
968
+ if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
969
+ this.isLocked = !0, this.previous && this.previous.lock();
970
+ },
971
+ toString: function() {
972
+ var e = "Worker " + this.name;
973
+ return this.previous ? this.previous + " -> " + e : e;
974
+ }
975
+ }, t.exports = n;
976
+ },
977
+ {}
978
+ ],
979
+ 29: [
980
+ function(e, t, r) {
981
+ "use strict";
982
+ var h = e("../utils"), i = e("./ConvertWorker"), s = e("./GenericWorker"), u = e("../base64"), n = e("../support"), a = e("../external"), o = null;
983
+ if (n.nodestream) try {
984
+ o = e("../nodejs/NodejsStreamOutputAdapter");
985
+ } catch (e) {}
986
+ function l(e, o) {
987
+ return new a.Promise(function(t, r) {
988
+ var n = [], i = e._internalType, s = e._outputType, a = e._mimeType;
989
+ e.on("data", function(e, t) {
990
+ n.push(e), o && o(t);
991
+ }).on("error", function(e) {
992
+ n = [], r(e);
993
+ }).on("end", function() {
994
+ try {
995
+ var e = function(e, t, r) {
996
+ switch(e){
997
+ case "blob":
998
+ return h.newBlob(h.transformTo("arraybuffer", t), r);
999
+ case "base64":
1000
+ return u.encode(t);
1001
+ default:
1002
+ return h.transformTo(e, t);
1003
+ }
1004
+ }(s, function(e, t) {
1005
+ var r, n = 0, i = null, s = 0;
1006
+ for(r = 0; r < t.length; r++)s += t[r].length;
1007
+ switch(e){
1008
+ case "string":
1009
+ return t.join("");
1010
+ case "array":
1011
+ return Array.prototype.concat.apply([], t);
1012
+ case "uint8array":
1013
+ for(i = new Uint8Array(s), r = 0; r < t.length; r++)i.set(t[r], n), n += t[r].length;
1014
+ return i;
1015
+ case "nodebuffer":
1016
+ return Buffer.concat(t);
1017
+ default:
1018
+ throw new Error("concat : unsupported type '" + e + "'");
1019
+ }
1020
+ }(i, n), a);
1021
+ t(e);
1022
+ } catch (e) {
1023
+ r(e);
1024
+ }
1025
+ n = [];
1026
+ }).resume();
1027
+ });
1028
+ }
1029
+ function f(e, t, r) {
1030
+ var n = t;
1031
+ switch(t){
1032
+ case "blob":
1033
+ case "arraybuffer":
1034
+ n = "uint8array";
1035
+ break;
1036
+ case "base64":
1037
+ n = "string";
1038
+ }
1039
+ try {
1040
+ this._internalType = n, this._outputType = t, this._mimeType = r, h.checkSupport(n), this._worker = e.pipe(new i(n)), e.lock();
1041
+ } catch (e) {
1042
+ this._worker = new s("error"), this._worker.error(e);
1043
+ }
1044
+ }
1045
+ f.prototype = {
1046
+ accumulate: function(e) {
1047
+ return l(this, e);
1048
+ },
1049
+ on: function(e, t) {
1050
+ var r = this;
1051
+ return "data" === e ? this._worker.on(e, function(e) {
1052
+ t.call(r, e.data, e.meta);
1053
+ }) : this._worker.on(e, function() {
1054
+ h.delay(t, arguments, r);
1055
+ }), this;
1056
+ },
1057
+ resume: function() {
1058
+ return h.delay(this._worker.resume, [], this._worker), this;
1059
+ },
1060
+ pause: function() {
1061
+ return this._worker.pause(), this;
1062
+ },
1063
+ toNodejsStream: function(e) {
1064
+ if (h.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
1065
+ return new o(this, {
1066
+ objectMode: "nodebuffer" !== this._outputType
1067
+ }, e);
1068
+ }
1069
+ }, t.exports = f;
1070
+ },
1071
+ {
1072
+ "../base64": 1,
1073
+ "../external": 6,
1074
+ "../nodejs/NodejsStreamOutputAdapter": 13,
1075
+ "../support": 30,
1076
+ "../utils": 32,
1077
+ "./ConvertWorker": 24,
1078
+ "./GenericWorker": 28
1079
+ }
1080
+ ],
1081
+ 30: [
1082
+ function(e, t, r) {
1083
+ "use strict";
1084
+ if (r.base64 = !0, r.array = !0, r.string = !0, r.arraybuffer = "u" > typeof ArrayBuffer && "u" > typeof Uint8Array, r.nodebuffer = "u" > typeof Buffer, r.uint8array = "u" > typeof Uint8Array, "u" < typeof ArrayBuffer) r.blob = !1;
1085
+ else {
1086
+ var n = new ArrayBuffer(0);
1087
+ try {
1088
+ r.blob = 0 === new Blob([
1089
+ n
1090
+ ], {
1091
+ type: "application/zip"
1092
+ }).size;
1093
+ } catch (e) {
1094
+ try {
1095
+ var i = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder);
1096
+ i.append(n), r.blob = 0 === i.getBlob("application/zip").size;
1097
+ } catch (e) {
1098
+ r.blob = !1;
1099
+ }
1100
+ }
1101
+ }
1102
+ try {
1103
+ r.nodestream = !!e("readable-stream").Readable;
1104
+ } catch (e) {
1105
+ r.nodestream = !1;
1106
+ }
1107
+ },
1108
+ {
1109
+ "readable-stream": 16
1110
+ }
1111
+ ],
1112
+ 31: [
1113
+ function(e, t, s) {
1114
+ "use strict";
1115
+ for(var o = e("./utils"), h = e("./support"), r = e("./nodejsUtils"), n = e("./stream/GenericWorker"), u = new Array(256), i = 0; i < 256; i++)u[i] = 252 <= i ? 6 : 248 <= i ? 5 : 240 <= i ? 4 : 224 <= i ? 3 : 192 <= i ? 2 : 1;
1116
+ u[254] = u[254] = 1;
1117
+ function a() {
1118
+ n.call(this, "utf-8 decode"), this.leftOver = null;
1119
+ }
1120
+ function l() {
1121
+ n.call(this, "utf-8 encode");
1122
+ }
1123
+ s.utf8encode = function(e) {
1124
+ return h.nodebuffer ? r.newBufferFrom(e, "utf-8") : function(e) {
1125
+ var t, r, n, i, s, a = e.length, o = 0;
1126
+ for(i = 0; i < a; i++)55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), o += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
1127
+ for(t = h.uint8array ? new Uint8Array(o) : new Array(o), i = s = 0; s < o; i++)55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), r < 128 ? t[s++] = r : (r < 2048 ? t[s++] = 192 | r >>> 6 : (r < 65536 ? t[s++] = 224 | r >>> 12 : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63), t[s++] = 128 | r >>> 6 & 63), t[s++] = 128 | 63 & r);
1128
+ return t;
1129
+ }(e);
1130
+ }, s.utf8decode = function(e) {
1131
+ return h.nodebuffer ? o.transformTo("nodebuffer", e).toString("utf-8") : function(e) {
1132
+ var t, r, n, i, s = e.length, a = new Array(2 * s);
1133
+ for(t = r = 0; t < s;)if ((n = e[t++]) < 128) a[r++] = n;
1134
+ else if (4 < (i = u[n])) a[r++] = 65533, t += i - 1;
1135
+ else {
1136
+ for(n &= 2 === i ? 31 : 3 === i ? 15 : 7; 1 < i && t < s;)n = n << 6 | 63 & e[t++], i--;
1137
+ 1 < i ? a[r++] = 65533 : n < 65536 ? a[r++] = n : (n -= 65536, a[r++] = 55296 | n >> 10 & 1023, a[r++] = 56320 | 1023 & n);
1138
+ }
1139
+ return a.length !== r && (a.subarray ? a = a.subarray(0, r) : a.length = r), o.applyFromCharCode(a);
1140
+ }(e = o.transformTo(h.uint8array ? "uint8array" : "array", e));
1141
+ }, o.inherits(a, n), a.prototype.processChunk = function(e) {
1142
+ var t = o.transformTo(h.uint8array ? "uint8array" : "array", e.data);
1143
+ if (this.leftOver && this.leftOver.length) {
1144
+ if (h.uint8array) {
1145
+ var r = t;
1146
+ (t = new Uint8Array(r.length + this.leftOver.length)).set(this.leftOver, 0), t.set(r, this.leftOver.length);
1147
+ } else t = this.leftOver.concat(t);
1148
+ this.leftOver = null;
1149
+ }
1150
+ var n = function(e, t) {
1151
+ var r;
1152
+ for((t = t || e.length) > e.length && (t = e.length), r = t - 1; 0 <= r && 128 == (192 & e[r]);)r--;
1153
+ return r < 0 ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
1154
+ }(t), i = t;
1155
+ n !== t.length && (h.uint8array ? (i = t.subarray(0, n), this.leftOver = t.subarray(n, t.length)) : (i = t.slice(0, n), this.leftOver = t.slice(n, t.length))), this.push({
1156
+ data: s.utf8decode(i),
1157
+ meta: e.meta
1158
+ });
1159
+ }, a.prototype.flush = function() {
1160
+ this.leftOver && this.leftOver.length && (this.push({
1161
+ data: s.utf8decode(this.leftOver),
1162
+ meta: {}
1163
+ }), this.leftOver = null);
1164
+ }, s.Utf8DecodeWorker = a, o.inherits(l, n), l.prototype.processChunk = function(e) {
1165
+ this.push({
1166
+ data: s.utf8encode(e.data),
1167
+ meta: e.meta
1168
+ });
1169
+ }, s.Utf8EncodeWorker = l;
1170
+ },
1171
+ {
1172
+ "./nodejsUtils": 14,
1173
+ "./stream/GenericWorker": 28,
1174
+ "./support": 30,
1175
+ "./utils": 32
1176
+ }
1177
+ ],
1178
+ 32: [
1179
+ function(e, t, a) {
1180
+ "use strict";
1181
+ var o = e("./support"), h = e("./base64"), r = e("./nodejsUtils"), u = e("./external");
1182
+ function n(e) {
1183
+ return e;
1184
+ }
1185
+ function l(e, t) {
1186
+ for(var r = 0; r < e.length; ++r)t[r] = 255 & e.charCodeAt(r);
1187
+ return t;
1188
+ }
1189
+ e("setimmediate"), a.newBlob = function(t, r) {
1190
+ a.checkSupport("blob");
1191
+ try {
1192
+ return new Blob([
1193
+ t
1194
+ ], {
1195
+ type: r
1196
+ });
1197
+ } catch (e) {
1198
+ try {
1199
+ var n = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder);
1200
+ return n.append(t), n.getBlob(r);
1201
+ } catch (e) {
1202
+ throw new Error("Bug : can't construct the Blob.");
1203
+ }
1204
+ }
1205
+ };
1206
+ var i = {
1207
+ stringifyByChunk: function(e, t, r) {
1208
+ var n = [], i = 0, s = e.length;
1209
+ if (s <= r) return String.fromCharCode.apply(null, e);
1210
+ for(; i < s;)"array" === t || "nodebuffer" === t ? n.push(String.fromCharCode.apply(null, e.slice(i, Math.min(i + r, s)))) : n.push(String.fromCharCode.apply(null, e.subarray(i, Math.min(i + r, s)))), i += r;
1211
+ return n.join("");
1212
+ },
1213
+ stringifyByChar: function(e) {
1214
+ for(var t = "", r = 0; r < e.length; r++)t += String.fromCharCode(e[r]);
1215
+ return t;
1216
+ },
1217
+ applyCanBeUsed: {
1218
+ uint8array: function() {
1219
+ try {
1220
+ return o.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
1221
+ } catch (e) {
1222
+ return !1;
1223
+ }
1224
+ }(),
1225
+ nodebuffer: function() {
1226
+ try {
1227
+ return o.nodebuffer && 1 === String.fromCharCode.apply(null, r.allocBuffer(1)).length;
1228
+ } catch (e) {
1229
+ return !1;
1230
+ }
1231
+ }()
1232
+ }
1233
+ };
1234
+ function s(e) {
1235
+ var t = 65536, r = a.getTypeOf(e), n = !0;
1236
+ if ("uint8array" === r ? n = i.applyCanBeUsed.uint8array : "nodebuffer" === r && (n = i.applyCanBeUsed.nodebuffer), n) for(; 1 < t;)try {
1237
+ return i.stringifyByChunk(e, r, t);
1238
+ } catch (e) {
1239
+ t = Math.floor(t / 2);
1240
+ }
1241
+ return i.stringifyByChar(e);
1242
+ }
1243
+ function f(e, t) {
1244
+ for(var r = 0; r < e.length; r++)t[r] = e[r];
1245
+ return t;
1246
+ }
1247
+ a.applyFromCharCode = s;
1248
+ var c = {};
1249
+ c.string = {
1250
+ string: n,
1251
+ array: function(e) {
1252
+ return l(e, new Array(e.length));
1253
+ },
1254
+ arraybuffer: function(e) {
1255
+ return c.string.uint8array(e).buffer;
1256
+ },
1257
+ uint8array: function(e) {
1258
+ return l(e, new Uint8Array(e.length));
1259
+ },
1260
+ nodebuffer: function(e) {
1261
+ return l(e, r.allocBuffer(e.length));
1262
+ }
1263
+ }, c.array = {
1264
+ string: s,
1265
+ array: n,
1266
+ arraybuffer: function(e) {
1267
+ return new Uint8Array(e).buffer;
1268
+ },
1269
+ uint8array: function(e) {
1270
+ return new Uint8Array(e);
1271
+ },
1272
+ nodebuffer: function(e) {
1273
+ return r.newBufferFrom(e);
1274
+ }
1275
+ }, c.arraybuffer = {
1276
+ string: function(e) {
1277
+ return s(new Uint8Array(e));
1278
+ },
1279
+ array: function(e) {
1280
+ return f(new Uint8Array(e), new Array(e.byteLength));
1281
+ },
1282
+ arraybuffer: n,
1283
+ uint8array: function(e) {
1284
+ return new Uint8Array(e);
1285
+ },
1286
+ nodebuffer: function(e) {
1287
+ return r.newBufferFrom(new Uint8Array(e));
1288
+ }
1289
+ }, c.uint8array = {
1290
+ string: s,
1291
+ array: function(e) {
1292
+ return f(e, new Array(e.length));
1293
+ },
1294
+ arraybuffer: function(e) {
1295
+ return e.buffer;
1296
+ },
1297
+ uint8array: n,
1298
+ nodebuffer: function(e) {
1299
+ return r.newBufferFrom(e);
1300
+ }
1301
+ }, c.nodebuffer = {
1302
+ string: s,
1303
+ array: function(e) {
1304
+ return f(e, new Array(e.length));
1305
+ },
1306
+ arraybuffer: function(e) {
1307
+ return c.nodebuffer.uint8array(e).buffer;
1308
+ },
1309
+ uint8array: function(e) {
1310
+ return f(e, new Uint8Array(e.length));
1311
+ },
1312
+ nodebuffer: n
1313
+ }, a.transformTo = function(e, t) {
1314
+ if (t = t || "", !e) return t;
1315
+ a.checkSupport(e);
1316
+ var r = a.getTypeOf(t);
1317
+ return c[r][e](t);
1318
+ }, a.resolve = function(e) {
1319
+ for(var t = e.split("/"), r = [], n = 0; n < t.length; n++){
1320
+ var i = t[n];
1321
+ "." === i || "" === i && 0 !== n && n !== t.length - 1 || (".." === i ? r.pop() : r.push(i));
1322
+ }
1323
+ return r.join("/");
1324
+ }, a.getTypeOf = function(e) {
1325
+ return "string" == typeof e ? "string" : "[object Array]" === Object.prototype.toString.call(e) ? "array" : o.nodebuffer && r.isBuffer(e) ? "nodebuffer" : o.uint8array && e instanceof Uint8Array ? "uint8array" : o.arraybuffer && e instanceof ArrayBuffer ? "arraybuffer" : void 0;
1326
+ }, a.checkSupport = function(e) {
1327
+ if (!o[e.toLowerCase()]) throw new Error(e + " is not supported by this platform");
1328
+ }, a.MAX_VALUE_16BITS = 65535, a.MAX_VALUE_32BITS = -1, a.pretty = function(e) {
1329
+ var t, r, n = "";
1330
+ for(r = 0; r < (e || "").length; r++)n += "\\x" + ((t = e.charCodeAt(r)) < 16 ? "0" : "") + t.toString(16).toUpperCase();
1331
+ return n;
1332
+ }, a.delay = function(e, t, r) {
1333
+ setImmediate(function() {
1334
+ e.apply(r || null, t || []);
1335
+ });
1336
+ }, a.inherits = function(e, t) {
1337
+ function r() {}
1338
+ r.prototype = t.prototype, e.prototype = new r;
1339
+ }, a.extend = function() {
1340
+ var e, t, r = {};
1341
+ for(e = 0; e < arguments.length; e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e], t) && void 0 === r[t] && (r[t] = arguments[e][t]);
1342
+ return r;
1343
+ }, a.prepareContent = function(r, e, n, i, s) {
1344
+ return u.Promise.resolve(e).then(function(n) {
1345
+ return o.blob && (n instanceof Blob || -1 !== [
1346
+ "[object File]",
1347
+ "[object Blob]"
1348
+ ].indexOf(Object.prototype.toString.call(n))) && "u" > typeof FileReader ? new u.Promise(function(t, r) {
1349
+ var e = new FileReader;
1350
+ e.onload = function(e) {
1351
+ t(e.target.result);
1352
+ }, e.onerror = function(e) {
1353
+ r(e.target.error);
1354
+ }, e.readAsArrayBuffer(n);
1355
+ }) : n;
1356
+ }).then(function(e) {
1357
+ var t = a.getTypeOf(e);
1358
+ return t ? ("arraybuffer" === t ? e = a.transformTo("uint8array", e) : "string" === t && (s ? e = h.decode(e) : n && !0 !== i && (e = function(e) {
1359
+ return l(e, o.uint8array ? new Uint8Array(e.length) : new Array(e.length));
1360
+ }(e))), e) : u.Promise.reject(new Error("Can't read the data of '" + r + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
1361
+ });
1362
+ };
1363
+ },
1364
+ {
1365
+ "./base64": 1,
1366
+ "./external": 6,
1367
+ "./nodejsUtils": 14,
1368
+ "./support": 30,
1369
+ setimmediate: 54
1370
+ }
1371
+ ],
1372
+ 33: [
1373
+ function(e, t, r) {
1374
+ "use strict";
1375
+ var n = e("./reader/readerFor"), i = e("./utils"), s = e("./signature"), a = e("./zipEntry"), o = e("./support");
1376
+ function h(e) {
1377
+ this.files = [], this.loadOptions = e;
1378
+ }
1379
+ h.prototype = {
1380
+ checkSignature: function(e) {
1381
+ if (!this.reader.readAndCheckSignature(e)) {
1382
+ this.reader.index -= 4;
1383
+ var t = this.reader.readString(4);
1384
+ throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(t) + ", expected " + i.pretty(e) + ")");
1385
+ }
1386
+ },
1387
+ isSignature: function(e, t) {
1388
+ var r = this.reader.index;
1389
+ this.reader.setIndex(e);
1390
+ var n = this.reader.readString(4) === t;
1391
+ return this.reader.setIndex(r), n;
1392
+ },
1393
+ readBlockEndOfCentral: function() {
1394
+ 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);
1395
+ var e = this.reader.readData(this.zipCommentLength), t = o.uint8array ? "uint8array" : "array", r = i.transformTo(t, e);
1396
+ this.zipComment = this.loadOptions.decodeFileName(r);
1397
+ },
1398
+ readBlockZip64EndOfCentral: function() {
1399
+ 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 = {};
1400
+ for(var e, t, r, n = this.zip64EndOfCentralSize - 44; 0 < n;)e = this.reader.readInt(2), t = this.reader.readInt(4), r = this.reader.readData(t), this.zip64ExtensibleData[e] = {
1401
+ id: e,
1402
+ length: t,
1403
+ value: r
1404
+ };
1405
+ },
1406
+ readBlockZip64EndOfCentralLocator: function() {
1407
+ if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
1408
+ },
1409
+ readLocalFiles: function() {
1410
+ var e, t;
1411
+ for(e = 0; e < this.files.length; e++)t = this.files[e], this.reader.setIndex(t.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t.readLocalPart(this.reader), t.handleUTF8(), t.processAttributes();
1412
+ },
1413
+ readCentralDir: function() {
1414
+ var e;
1415
+ for(this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e = new a({
1416
+ zip64: this.zip64
1417
+ }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e);
1418
+ if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
1419
+ },
1420
+ readEndOfCentral: function() {
1421
+ var e = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
1422
+ if (e < 0) 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");
1423
+ this.reader.setIndex(e);
1424
+ var t = e;
1425
+ 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) {
1426
+ if (this.zip64 = !0, (e = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
1427
+ if (this.reader.setIndex(e), 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)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
1428
+ this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
1429
+ }
1430
+ var r = this.centralDirOffset + this.centralDirSize;
1431
+ this.zip64 && (r += 20, r += 12 + this.zip64EndOfCentralSize);
1432
+ var n = t - r;
1433
+ if (0 < n) this.isSignature(t, s.CENTRAL_FILE_HEADER) || (this.reader.zero = n);
1434
+ else if (n < 0) throw new Error("Corrupted zip: missing " + Math.abs(n) + " bytes.");
1435
+ },
1436
+ prepareReader: function(e) {
1437
+ this.reader = n(e);
1438
+ },
1439
+ load: function(e) {
1440
+ this.prepareReader(e), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
1441
+ }
1442
+ }, t.exports = h;
1443
+ },
1444
+ {
1445
+ "./reader/readerFor": 22,
1446
+ "./signature": 23,
1447
+ "./support": 30,
1448
+ "./utils": 32,
1449
+ "./zipEntry": 34
1450
+ }
1451
+ ],
1452
+ 34: [
1453
+ function(e, t, r) {
1454
+ "use strict";
1455
+ var n = e("./reader/readerFor"), s = e("./utils"), i = e("./compressedObject"), a = e("./crc32"), o = e("./utf8"), h = e("./compressions"), u = e("./support");
1456
+ function l(e, t) {
1457
+ this.options = e, this.loadOptions = t;
1458
+ }
1459
+ l.prototype = {
1460
+ isEncrypted: function() {
1461
+ return 1 == (1 & this.bitFlag);
1462
+ },
1463
+ useUTF8: function() {
1464
+ return 2048 == (2048 & this.bitFlag);
1465
+ },
1466
+ readLocalPart: function(e) {
1467
+ var t, r;
1468
+ if (e.skip(22), this.fileNameLength = e.readInt(2), r = e.readInt(2), this.fileName = e.readData(this.fileNameLength), e.skip(r), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
1469
+ if (null === (t = function(e) {
1470
+ for(var t in h)if (Object.prototype.hasOwnProperty.call(h, t) && h[t].magic === e) return h[t];
1471
+ return null;
1472
+ }(this.compressionMethod))) throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
1473
+ this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, t, e.readData(this.compressedSize));
1474
+ },
1475
+ readCentralPart: function(e) {
1476
+ this.versionMadeBy = e.readInt(2), e.skip(2), this.bitFlag = e.readInt(2), this.compressionMethod = e.readString(2), this.date = e.readDate(), this.crc32 = e.readInt(4), this.compressedSize = e.readInt(4), this.uncompressedSize = e.readInt(4);
1477
+ var t = e.readInt(2);
1478
+ if (this.extraFieldsLength = e.readInt(2), this.fileCommentLength = e.readInt(2), this.diskNumberStart = e.readInt(2), this.internalFileAttributes = e.readInt(2), this.externalFileAttributes = e.readInt(4), this.localHeaderOffset = e.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
1479
+ e.skip(t), this.readExtraFields(e), this.parseZIP64ExtraField(e), this.fileComment = e.readData(this.fileCommentLength);
1480
+ },
1481
+ processAttributes: function() {
1482
+ this.unixPermissions = null, this.dosPermissions = null;
1483
+ var e = this.versionMadeBy >> 8;
1484
+ this.dir = !!(16 & this.externalFileAttributes), 0 == e && (this.dosPermissions = 63 & this.externalFileAttributes), 3 == e && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = !0);
1485
+ },
1486
+ parseZIP64ExtraField: function() {
1487
+ if (this.extraFields[1]) {
1488
+ var e = n(this.extraFields[1].value);
1489
+ this.uncompressedSize === s.MAX_VALUE_32BITS && (this.uncompressedSize = e.readInt(8)), this.compressedSize === s.MAX_VALUE_32BITS && (this.compressedSize = e.readInt(8)), this.localHeaderOffset === s.MAX_VALUE_32BITS && (this.localHeaderOffset = e.readInt(8)), this.diskNumberStart === s.MAX_VALUE_32BITS && (this.diskNumberStart = e.readInt(4));
1490
+ }
1491
+ },
1492
+ readExtraFields: function(e) {
1493
+ var t, r, n, i = e.index + this.extraFieldsLength;
1494
+ for(this.extraFields || (this.extraFields = {}); e.index + 4 < i;)t = e.readInt(2), r = e.readInt(2), n = e.readData(r), this.extraFields[t] = {
1495
+ id: t,
1496
+ length: r,
1497
+ value: n
1498
+ };
1499
+ e.setIndex(i);
1500
+ },
1501
+ handleUTF8: function() {
1502
+ var e = u.uint8array ? "uint8array" : "array";
1503
+ if (this.useUTF8()) this.fileNameStr = o.utf8decode(this.fileName), this.fileCommentStr = o.utf8decode(this.fileComment);
1504
+ else {
1505
+ var t = this.findExtraFieldUnicodePath();
1506
+ if (null !== t) this.fileNameStr = t;
1507
+ else {
1508
+ var r = s.transformTo(e, this.fileName);
1509
+ this.fileNameStr = this.loadOptions.decodeFileName(r);
1510
+ }
1511
+ var n = this.findExtraFieldUnicodeComment();
1512
+ if (null !== n) this.fileCommentStr = n;
1513
+ else {
1514
+ var i = s.transformTo(e, this.fileComment);
1515
+ this.fileCommentStr = this.loadOptions.decodeFileName(i);
1516
+ }
1517
+ }
1518
+ },
1519
+ findExtraFieldUnicodePath: function() {
1520
+ var e = this.extraFields[28789];
1521
+ if (e) {
1522
+ var t = n(e.value);
1523
+ return 1 !== t.readInt(1) ? null : a(this.fileName) !== t.readInt(4) ? null : o.utf8decode(t.readData(e.length - 5));
1524
+ }
1525
+ return null;
1526
+ },
1527
+ findExtraFieldUnicodeComment: function() {
1528
+ var e = this.extraFields[25461];
1529
+ if (e) {
1530
+ var t = n(e.value);
1531
+ return 1 !== t.readInt(1) ? null : a(this.fileComment) !== t.readInt(4) ? null : o.utf8decode(t.readData(e.length - 5));
1532
+ }
1533
+ return null;
1534
+ }
1535
+ }, t.exports = l;
1536
+ },
1537
+ {
1538
+ "./compressedObject": 2,
1539
+ "./compressions": 3,
1540
+ "./crc32": 4,
1541
+ "./reader/readerFor": 22,
1542
+ "./support": 30,
1543
+ "./utf8": 31,
1544
+ "./utils": 32
1545
+ }
1546
+ ],
1547
+ 35: [
1548
+ function(e, t, r) {
1549
+ "use strict";
1550
+ function n(e, t, r) {
1551
+ this.name = e, this.dir = r.dir, this.date = r.date, this.comment = r.comment, this.unixPermissions = r.unixPermissions, this.dosPermissions = r.dosPermissions, this._data = t, this._dataBinary = r.binary, this.options = {
1552
+ compression: r.compression,
1553
+ compressionOptions: r.compressionOptions
1554
+ };
1555
+ }
1556
+ var s = e("./stream/StreamHelper"), i = e("./stream/DataWorker"), a = e("./utf8"), o = e("./compressedObject"), h = e("./stream/GenericWorker");
1557
+ n.prototype = {
1558
+ internalStream: function(e) {
1559
+ var t = null, r = "string";
1560
+ try {
1561
+ if (!e) throw new Error("No output type specified.");
1562
+ var n = "string" === (r = e.toLowerCase()) || "text" === r;
1563
+ "binarystring" !== r && "text" !== r || (r = "string"), t = this._decompressWorker();
1564
+ var i = !this._dataBinary;
1565
+ i && !n && (t = t.pipe(new a.Utf8EncodeWorker)), !i && n && (t = t.pipe(new a.Utf8DecodeWorker));
1566
+ } catch (e) {
1567
+ (t = new h("error")).error(e);
1568
+ }
1569
+ return new s(t, r, "");
1570
+ },
1571
+ async: function(e, t) {
1572
+ return this.internalStream(e).accumulate(t);
1573
+ },
1574
+ nodeStream: function(e, t) {
1575
+ return this.internalStream(e || "nodebuffer").toNodejsStream(t);
1576
+ },
1577
+ _compressWorker: function(e, t) {
1578
+ if (this._data instanceof o && this._data.compression.magic === e.magic) return this._data.getCompressedWorker();
1579
+ var r = this._decompressWorker();
1580
+ return this._dataBinary || (r = r.pipe(new a.Utf8EncodeWorker)), o.createWorkerFrom(r, e, t);
1581
+ },
1582
+ _decompressWorker: function() {
1583
+ return this._data instanceof o ? this._data.getContentWorker() : this._data instanceof h ? this._data : new i(this._data);
1584
+ }
1585
+ };
1586
+ for(var u = [
1587
+ "asText",
1588
+ "asBinary",
1589
+ "asNodeBuffer",
1590
+ "asUint8Array",
1591
+ "asArrayBuffer"
1592
+ ], l = function() {
1593
+ throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
1594
+ }, f = 0; f < u.length; f++)n.prototype[u[f]] = l;
1595
+ t.exports = n;
1596
+ },
1597
+ {
1598
+ "./compressedObject": 2,
1599
+ "./stream/DataWorker": 27,
1600
+ "./stream/GenericWorker": 28,
1601
+ "./stream/StreamHelper": 29,
1602
+ "./utf8": 31
1603
+ }
1604
+ ],
1605
+ 36: [
1606
+ function(e, l, t) {
1607
+ (function(t) {
1608
+ "use strict";
1609
+ var r, n, e = t.MutationObserver || t.WebKitMutationObserver;
1610
+ if (e) {
1611
+ var i = 0, s = new e(u), a = t.document.createTextNode("");
1612
+ s.observe(a, {
1613
+ characterData: !0
1614
+ }), r = function() {
1615
+ a.data = i = ++i % 2;
1616
+ };
1617
+ } else if (t.setImmediate || void 0 === t.MessageChannel) r = "document" in t && "onreadystatechange" in t.document.createElement("script") ? function() {
1618
+ var e = t.document.createElement("script");
1619
+ e.onreadystatechange = function() {
1620
+ u(), e.onreadystatechange = null, e.parentNode.removeChild(e), e = null;
1621
+ }, t.document.documentElement.appendChild(e);
1622
+ } : function() {
1623
+ setTimeout(u, 0);
1624
+ };
1625
+ else {
1626
+ var o = new t.MessageChannel;
1627
+ o.port1.onmessage = u, r = function() {
1628
+ o.port2.postMessage(0);
1629
+ };
1630
+ }
1631
+ var h = [];
1632
+ function u() {
1633
+ var e, t;
1634
+ n = !0;
1635
+ for(var r = h.length; r;){
1636
+ for(t = h, h = [], e = -1; ++e < r;)t[e]();
1637
+ r = h.length;
1638
+ }
1639
+ n = !1;
1640
+ }
1641
+ l.exports = function(e) {
1642
+ 1 !== h.push(e) || n || r();
1643
+ };
1644
+ }).call(this, void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof self ? self : "u" > typeof window ? window : {});
1645
+ },
1646
+ {}
1647
+ ],
1648
+ 37: [
1649
+ function(e, t, r) {
1650
+ "use strict";
1651
+ var i = e("immediate");
1652
+ function u() {}
1653
+ var l = {}, s = [
1654
+ "REJECTED"
1655
+ ], a = [
1656
+ "FULFILLED"
1657
+ ], n = [
1658
+ "PENDING"
1659
+ ];
1660
+ function o(e) {
1661
+ if ("function" != typeof e) throw new TypeError("resolver must be a function");
1662
+ this.state = n, this.queue = [], this.outcome = void 0, e !== u && d(this, e);
1663
+ }
1664
+ function h(e, t, r) {
1665
+ this.promise = e, "function" == typeof t && (this.onFulfilled = t, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r && (this.onRejected = r, this.callRejected = this.otherCallRejected);
1666
+ }
1667
+ function f(t, r, n) {
1668
+ i(function() {
1669
+ var e;
1670
+ try {
1671
+ e = r(n);
1672
+ } catch (e) {
1673
+ return l.reject(t, e);
1674
+ }
1675
+ e === t ? l.reject(t, new TypeError("Cannot resolve promise with itself")) : l.resolve(t, e);
1676
+ });
1677
+ }
1678
+ function c(e) {
1679
+ var t = e && e.then;
1680
+ if (e && ("object" == typeof e || "function" == typeof e) && "function" == typeof t) return function() {
1681
+ t.apply(e, arguments);
1682
+ };
1683
+ }
1684
+ function d(t, e) {
1685
+ var r = !1;
1686
+ function n(e) {
1687
+ r || (r = !0, l.reject(t, e));
1688
+ }
1689
+ function i(e) {
1690
+ r || (r = !0, l.resolve(t, e));
1691
+ }
1692
+ var s = p(function() {
1693
+ e(i, n);
1694
+ });
1695
+ "error" === s.status && n(s.value);
1696
+ }
1697
+ function p(e, t) {
1698
+ var r = {};
1699
+ try {
1700
+ r.value = e(t), r.status = "success";
1701
+ } catch (e) {
1702
+ r.status = "error", r.value = e;
1703
+ }
1704
+ return r;
1705
+ }
1706
+ (t.exports = o).prototype.finally = function(t) {
1707
+ if ("function" != typeof t) return this;
1708
+ var r = this.constructor;
1709
+ return this.then(function(e) {
1710
+ return r.resolve(t()).then(function() {
1711
+ return e;
1712
+ });
1713
+ }, function(e) {
1714
+ return r.resolve(t()).then(function() {
1715
+ throw e;
1716
+ });
1717
+ });
1718
+ }, o.prototype.catch = function(e) {
1719
+ return this.then(null, e);
1720
+ }, o.prototype.then = function(e, t) {
1721
+ if ("function" != typeof e && this.state === a || "function" != typeof t && this.state === s) return this;
1722
+ var r = new this.constructor(u);
1723
+ this.state !== n ? f(r, this.state === a ? e : t, this.outcome) : this.queue.push(new h(r, e, t));
1724
+ return r;
1725
+ }, h.prototype.callFulfilled = function(e) {
1726
+ l.resolve(this.promise, e);
1727
+ }, h.prototype.otherCallFulfilled = function(e) {
1728
+ f(this.promise, this.onFulfilled, e);
1729
+ }, h.prototype.callRejected = function(e) {
1730
+ l.reject(this.promise, e);
1731
+ }, h.prototype.otherCallRejected = function(e) {
1732
+ f(this.promise, this.onRejected, e);
1733
+ }, l.resolve = function(e, t) {
1734
+ var r = p(c, t);
1735
+ if ("error" === r.status) return l.reject(e, r.value);
1736
+ var n = r.value;
1737
+ if (n) d(e, n);
1738
+ else {
1739
+ e.state = a, e.outcome = t;
1740
+ for(var i = -1, s = e.queue.length; ++i < s;)e.queue[i].callFulfilled(t);
1741
+ }
1742
+ return e;
1743
+ }, l.reject = function(e, t) {
1744
+ e.state = s, e.outcome = t;
1745
+ for(var r = -1, n = e.queue.length; ++r < n;)e.queue[r].callRejected(t);
1746
+ return e;
1747
+ }, o.resolve = function(e) {
1748
+ if (e instanceof this) return e;
1749
+ return l.resolve(new this(u), e);
1750
+ }, o.reject = function(e) {
1751
+ var t = new this(u);
1752
+ return l.reject(t, e);
1753
+ }, o.all = function(e) {
1754
+ var r = this;
1755
+ if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
1756
+ var n = e.length, i = !1;
1757
+ if (!n) return this.resolve([]);
1758
+ var s = new Array(n), a = 0, t = -1, o = new this(u);
1759
+ for(; ++t < n;)h(e[t], t);
1760
+ return o;
1761
+ function h(e, t) {
1762
+ r.resolve(e).then(function(e) {
1763
+ s[t] = e, ++a !== n || i || (i = !0, l.resolve(o, s));
1764
+ }, function(e) {
1765
+ i || (i = !0, l.reject(o, e));
1766
+ });
1767
+ }
1768
+ }, o.race = function(e) {
1769
+ var t = this;
1770
+ if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
1771
+ var r = e.length, n = !1;
1772
+ if (!r) return this.resolve([]);
1773
+ var i = -1, s = new this(u);
1774
+ for(; ++i < r;)a = e[i], t.resolve(a).then(function(e) {
1775
+ n || (n = !0, l.resolve(s, e));
1776
+ }, function(e) {
1777
+ n || (n = !0, l.reject(s, e));
1778
+ });
1779
+ var a;
1780
+ return s;
1781
+ };
1782
+ },
1783
+ {
1784
+ immediate: 36
1785
+ }
1786
+ ],
1787
+ 38: [
1788
+ function(e, t, r) {
1789
+ "use strict";
1790
+ var n = {};
1791
+ (0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t.exports = n;
1792
+ },
1793
+ {
1794
+ "./lib/deflate": 39,
1795
+ "./lib/inflate": 40,
1796
+ "./lib/utils/common": 41,
1797
+ "./lib/zlib/constants": 44
1798
+ }
1799
+ ],
1800
+ 39: [
1801
+ function(e, t, r) {
1802
+ "use strict";
1803
+ var a = e("./zlib/deflate"), o = e("./utils/common"), h = e("./utils/strings"), i = e("./zlib/messages"), s = e("./zlib/zstream"), u = Object.prototype.toString, l = 0, f = -1, c = 0, d = 8;
1804
+ function p(e) {
1805
+ if (!(this instanceof p)) return new p(e);
1806
+ this.options = o.assign({
1807
+ level: f,
1808
+ method: d,
1809
+ chunkSize: 16384,
1810
+ windowBits: 15,
1811
+ memLevel: 8,
1812
+ strategy: c,
1813
+ to: ""
1814
+ }, e || {});
1815
+ var t = this.options;
1816
+ t.raw && 0 < t.windowBits ? t.windowBits = -t.windowBits : t.gzip && 0 < t.windowBits && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new s, this.strm.avail_out = 0;
1817
+ var r = a.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy);
1818
+ if (r !== l) throw new Error(i[r]);
1819
+ if (t.header && a.deflateSetHeader(this.strm, t.header), t.dictionary) {
1820
+ var n;
1821
+ if (n = "string" == typeof t.dictionary ? h.string2buf(t.dictionary) : "[object ArrayBuffer]" === u.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, (r = a.deflateSetDictionary(this.strm, n)) !== l) throw new Error(i[r]);
1822
+ this._dict_set = !0;
1823
+ }
1824
+ }
1825
+ function n(e, t) {
1826
+ var r = new p(t);
1827
+ if (r.push(e, !0), r.err) throw r.msg || i[r.err];
1828
+ return r.result;
1829
+ }
1830
+ p.prototype.push = function(e, t) {
1831
+ var r, n, i = this.strm, s = this.options.chunkSize;
1832
+ if (this.ended) return !1;
1833
+ n = t === ~~t ? t : !0 === t ? 4 : 0, "string" == typeof e ? i.input = h.string2buf(e) : "[object ArrayBuffer]" === u.call(e) ? i.input = new Uint8Array(e) : i.input = e, i.next_in = 0, i.avail_in = i.input.length;
1834
+ do {
1835
+ if (0 === i.avail_out && (i.output = new o.Buf8(s), i.next_out = 0, i.avail_out = s), 1 !== (r = a.deflate(i, n)) && r !== l) return this.onEnd(r), this.ended = !0, false;
1836
+ 0 !== i.avail_out && (0 !== i.avail_in || 4 !== n && 2 !== n) || ("string" === this.options.to ? this.onData(h.buf2binstring(o.shrinkBuf(i.output, i.next_out))) : this.onData(o.shrinkBuf(i.output, i.next_out)));
1837
+ }while ((0 < i.avail_in || 0 === i.avail_out) && 1 !== r)
1838
+ return 4 === n ? (r = a.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === l) : 2 !== n || (this.onEnd(l), i.avail_out = 0, true);
1839
+ }, p.prototype.onData = function(e) {
1840
+ this.chunks.push(e);
1841
+ }, p.prototype.onEnd = function(e) {
1842
+ e === l && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
1843
+ }, r.Deflate = p, r.deflate = n, r.deflateRaw = function(e, t) {
1844
+ return (t = t || {}).raw = !0, n(e, t);
1845
+ }, r.gzip = function(e, t) {
1846
+ return (t = t || {}).gzip = !0, n(e, t);
1847
+ };
1848
+ },
1849
+ {
1850
+ "./utils/common": 41,
1851
+ "./utils/strings": 42,
1852
+ "./zlib/deflate": 46,
1853
+ "./zlib/messages": 51,
1854
+ "./zlib/zstream": 53
1855
+ }
1856
+ ],
1857
+ 40: [
1858
+ function(e, t, r) {
1859
+ "use strict";
1860
+ var c = e("./zlib/inflate"), d = e("./utils/common"), p = e("./utils/strings"), m = e("./zlib/constants"), n = e("./zlib/messages"), i = e("./zlib/zstream"), s = e("./zlib/gzheader"), _ = Object.prototype.toString;
1861
+ function a(e) {
1862
+ if (!(this instanceof a)) return new a(e);
1863
+ this.options = d.assign({
1864
+ chunkSize: 16384,
1865
+ windowBits: 0,
1866
+ to: ""
1867
+ }, e || {});
1868
+ var t = this.options;
1869
+ t.raw && 0 <= t.windowBits && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(0 <= t.windowBits && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), 15 < t.windowBits && t.windowBits < 48 && 0 == (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new i, this.strm.avail_out = 0;
1870
+ var r = c.inflateInit2(this.strm, t.windowBits);
1871
+ if (r !== m.Z_OK) throw new Error(n[r]);
1872
+ this.header = new s, c.inflateGetHeader(this.strm, this.header);
1873
+ }
1874
+ function o(e, t) {
1875
+ var r = new a(t);
1876
+ if (r.push(e, !0), r.err) throw r.msg || n[r.err];
1877
+ return r.result;
1878
+ }
1879
+ a.prototype.push = function(e, t) {
1880
+ var r, n, i, s, a, o, h = this.strm, u = this.options.chunkSize, l = this.options.dictionary, f = !1;
1881
+ if (this.ended) return !1;
1882
+ n = t === ~~t ? t : !0 === t ? m.Z_FINISH : m.Z_NO_FLUSH, "string" == typeof e ? h.input = p.binstring2buf(e) : "[object ArrayBuffer]" === _.call(e) ? h.input = new Uint8Array(e) : h.input = e, h.next_in = 0, h.avail_in = h.input.length;
1883
+ do {
1884
+ if (0 === h.avail_out && (h.output = new d.Buf8(u), h.next_out = 0, h.avail_out = u), (r = c.inflate(h, m.Z_NO_FLUSH)) === m.Z_NEED_DICT && l && (o = "string" == typeof l ? p.string2buf(l) : "[object ArrayBuffer]" === _.call(l) ? new Uint8Array(l) : l, r = c.inflateSetDictionary(this.strm, o)), r === m.Z_BUF_ERROR && !0 === f && (r = m.Z_OK, f = !1), r !== m.Z_STREAM_END && r !== m.Z_OK) return this.onEnd(r), this.ended = !0, false;
1885
+ h.next_out && (0 !== h.avail_out && r !== m.Z_STREAM_END && (0 !== h.avail_in || n !== m.Z_FINISH && n !== m.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i = p.utf8border(h.output, h.next_out), s = h.next_out - i, a = p.buf2string(h.output, i), h.next_out = s, h.avail_out = u - s, s && d.arraySet(h.output, h.output, i, s, 0), this.onData(a)) : this.onData(d.shrinkBuf(h.output, h.next_out)))), 0 === h.avail_in && 0 === h.avail_out && (f = !0);
1886
+ }while ((0 < h.avail_in || 0 === h.avail_out) && r !== m.Z_STREAM_END)
1887
+ return r === m.Z_STREAM_END && (n = m.Z_FINISH), n === m.Z_FINISH ? (r = c.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === m.Z_OK) : n !== m.Z_SYNC_FLUSH || (this.onEnd(m.Z_OK), h.avail_out = 0, true);
1888
+ }, a.prototype.onData = function(e) {
1889
+ this.chunks.push(e);
1890
+ }, a.prototype.onEnd = function(e) {
1891
+ e === m.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = d.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
1892
+ }, r.Inflate = a, r.inflate = o, r.inflateRaw = function(e, t) {
1893
+ return (t = t || {}).raw = !0, o(e, t);
1894
+ }, r.ungzip = o;
1895
+ },
1896
+ {
1897
+ "./utils/common": 41,
1898
+ "./utils/strings": 42,
1899
+ "./zlib/constants": 44,
1900
+ "./zlib/gzheader": 47,
1901
+ "./zlib/inflate": 49,
1902
+ "./zlib/messages": 51,
1903
+ "./zlib/zstream": 53
1904
+ }
1905
+ ],
1906
+ 41: [
1907
+ function(e, t, r) {
1908
+ "use strict";
1909
+ var n = "u" > typeof Uint8Array && "u" > typeof Uint16Array && "u" > typeof Int32Array;
1910
+ r.assign = function(e) {
1911
+ for(var t = Array.prototype.slice.call(arguments, 1); t.length;){
1912
+ var r = t.shift();
1913
+ if (r) {
1914
+ if ("object" != typeof r) throw new TypeError(r + "must be non-object");
1915
+ for(var n in r)r.hasOwnProperty(n) && (e[n] = r[n]);
1916
+ }
1917
+ }
1918
+ return e;
1919
+ }, r.shrinkBuf = function(e, t) {
1920
+ return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e);
1921
+ };
1922
+ var i = {
1923
+ arraySet: function(e, t, r, n, i) {
1924
+ if (t.subarray && e.subarray) e.set(t.subarray(r, r + n), i);
1925
+ else for(var s = 0; s < n; s++)e[i + s] = t[r + s];
1926
+ },
1927
+ flattenChunks: function(e) {
1928
+ var t, r, n, i, s, a;
1929
+ for(t = n = 0, r = e.length; t < r; t++)n += e[t].length;
1930
+ for(a = new Uint8Array(n), t = i = 0, r = e.length; t < r; t++)s = e[t], a.set(s, i), i += s.length;
1931
+ return a;
1932
+ }
1933
+ }, s = {
1934
+ arraySet: function(e, t, r, n, i) {
1935
+ for(var s = 0; s < n; s++)e[i + s] = t[r + s];
1936
+ },
1937
+ flattenChunks: function(e) {
1938
+ return [].concat.apply([], e);
1939
+ }
1940
+ };
1941
+ r.setTyped = function(e) {
1942
+ e ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, i)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, s));
1943
+ }, r.setTyped(n);
1944
+ },
1945
+ {}
1946
+ ],
1947
+ 42: [
1948
+ function(e, t, r) {
1949
+ "use strict";
1950
+ var h = e("./common"), i = !0, s = !0;
1951
+ try {
1952
+ String.fromCharCode.apply(null, [
1953
+ 0
1954
+ ]);
1955
+ } catch (e) {
1956
+ i = !1;
1957
+ }
1958
+ try {
1959
+ String.fromCharCode.apply(null, new Uint8Array(1));
1960
+ } catch (e) {
1961
+ s = !1;
1962
+ }
1963
+ for(var u = new h.Buf8(256), n = 0; n < 256; n++)u[n] = 252 <= n ? 6 : 248 <= n ? 5 : 240 <= n ? 4 : 224 <= n ? 3 : 192 <= n ? 2 : 1;
1964
+ function l(e, t) {
1965
+ if (t < 65537 && (e.subarray && s || !e.subarray && i)) return String.fromCharCode.apply(null, h.shrinkBuf(e, t));
1966
+ for(var r = "", n = 0; n < t; n++)r += String.fromCharCode(e[n]);
1967
+ return r;
1968
+ }
1969
+ u[254] = u[254] = 1, r.string2buf = function(e) {
1970
+ var t, r, n, i, s, a = e.length, o = 0;
1971
+ for(i = 0; i < a; i++)55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), o += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
1972
+ for(t = new h.Buf8(o), i = s = 0; s < o; i++)55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), r < 128 ? t[s++] = r : (r < 2048 ? t[s++] = 192 | r >>> 6 : (r < 65536 ? t[s++] = 224 | r >>> 12 : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63), t[s++] = 128 | r >>> 6 & 63), t[s++] = 128 | 63 & r);
1973
+ return t;
1974
+ }, r.buf2binstring = function(e) {
1975
+ return l(e, e.length);
1976
+ }, r.binstring2buf = function(e) {
1977
+ for(var t = new h.Buf8(e.length), r = 0, n = t.length; r < n; r++)t[r] = e.charCodeAt(r);
1978
+ return t;
1979
+ }, r.buf2string = function(e, t) {
1980
+ var r, n, i, s, a = t || e.length, o = new Array(2 * a);
1981
+ for(r = n = 0; r < a;)if ((i = e[r++]) < 128) o[n++] = i;
1982
+ else if (4 < (s = u[i])) o[n++] = 65533, r += s - 1;
1983
+ else {
1984
+ for(i &= 2 === s ? 31 : 3 === s ? 15 : 7; 1 < s && r < a;)i = i << 6 | 63 & e[r++], s--;
1985
+ 1 < s ? o[n++] = 65533 : i < 65536 ? o[n++] = i : (i -= 65536, o[n++] = 55296 | i >> 10 & 1023, o[n++] = 56320 | 1023 & i);
1986
+ }
1987
+ return l(o, n);
1988
+ }, r.utf8border = function(e, t) {
1989
+ var r;
1990
+ for((t = t || e.length) > e.length && (t = e.length), r = t - 1; 0 <= r && 128 == (192 & e[r]);)r--;
1991
+ return r < 0 ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
1992
+ };
1993
+ },
1994
+ {
1995
+ "./common": 41
1996
+ }
1997
+ ],
1998
+ 43: [
1999
+ function(e, t, r) {
2000
+ "use strict";
2001
+ t.exports = function(e, t, r, n) {
2002
+ for(var i = 65535 & e, s = e >>> 16 & 65535, a = 0; 0 !== r;){
2003
+ for(r -= a = 2e3 < r ? 2e3 : r; s = s + (i = i + t[n++] | 0) | 0, --a;);
2004
+ i %= 65521, s %= 65521;
2005
+ }
2006
+ return i | s << 16;
2007
+ };
2008
+ },
2009
+ {}
2010
+ ],
2011
+ 44: [
2012
+ function(e, t, r) {
2013
+ "use strict";
2014
+ t.exports = {
2015
+ Z_NO_FLUSH: 0,
2016
+ Z_PARTIAL_FLUSH: 1,
2017
+ Z_SYNC_FLUSH: 2,
2018
+ Z_FULL_FLUSH: 3,
2019
+ Z_FINISH: 4,
2020
+ Z_BLOCK: 5,
2021
+ Z_TREES: 6,
2022
+ Z_OK: 0,
2023
+ Z_STREAM_END: 1,
2024
+ Z_NEED_DICT: 2,
2025
+ Z_ERRNO: -1,
2026
+ Z_STREAM_ERROR: -2,
2027
+ Z_DATA_ERROR: -3,
2028
+ Z_BUF_ERROR: -5,
2029
+ Z_NO_COMPRESSION: 0,
2030
+ Z_BEST_SPEED: 1,
2031
+ Z_BEST_COMPRESSION: 9,
2032
+ Z_DEFAULT_COMPRESSION: -1,
2033
+ Z_FILTERED: 1,
2034
+ Z_HUFFMAN_ONLY: 2,
2035
+ Z_RLE: 3,
2036
+ Z_FIXED: 4,
2037
+ Z_DEFAULT_STRATEGY: 0,
2038
+ Z_BINARY: 0,
2039
+ Z_TEXT: 1,
2040
+ Z_UNKNOWN: 2,
2041
+ Z_DEFLATED: 8
2042
+ };
2043
+ },
2044
+ {}
2045
+ ],
2046
+ 45: [
2047
+ function(e, t, r) {
2048
+ "use strict";
2049
+ var o = function() {
2050
+ for(var e, t = [], r = 0; r < 256; r++){
2051
+ e = r;
2052
+ for(var n = 0; n < 8; n++)e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
2053
+ t[r] = e;
2054
+ }
2055
+ return t;
2056
+ }();
2057
+ t.exports = function(e, t, r, n) {
2058
+ var i = o, s = n + r;
2059
+ e ^= -1;
2060
+ for(var a = n; a < s; a++)e = e >>> 8 ^ i[255 & (e ^ t[a])];
2061
+ return -1 ^ e;
2062
+ };
2063
+ },
2064
+ {}
2065
+ ],
2066
+ 46: [
2067
+ function(e, t, r) {
2068
+ "use strict";
2069
+ var h, c = e("../utils/common"), u = e("./trees"), d = e("./adler32"), p = e("./crc32"), n = e("./messages"), l = 0, f = 4, m = 0, _ = -2, g = -1, b = 4, i = 2, v = 8, y = 9, s = 286, a = 30, o = 19, w = 2 * s + 1, k = 15, x = 3, S = 258, z = S + x + 1, C = 42, E = 113, A = 1, I = 2, O = 3, B = 4;
2070
+ function R(e, t) {
2071
+ return e.msg = n[t], t;
2072
+ }
2073
+ function T(e) {
2074
+ return (e << 1) - (4 < e ? 9 : 0);
2075
+ }
2076
+ function D(e) {
2077
+ for(var t = e.length; 0 <= --t;)e[t] = 0;
2078
+ }
2079
+ function F(e) {
2080
+ var t = e.state, r = t.pending;
2081
+ r > e.avail_out && (r = e.avail_out), 0 !== r && (c.arraySet(e.output, t.pending_buf, t.pending_out, r, e.next_out), e.next_out += r, t.pending_out += r, e.total_out += r, e.avail_out -= r, t.pending -= r, 0 === t.pending && (t.pending_out = 0));
2082
+ }
2083
+ function N(e, t) {
2084
+ u._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, F(e.strm);
2085
+ }
2086
+ function U(e, t) {
2087
+ e.pending_buf[e.pending++] = t;
2088
+ }
2089
+ function P(e, t) {
2090
+ e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
2091
+ }
2092
+ function L(e, t) {
2093
+ var r, n, i = e.max_chain_length, s = e.strstart, a = e.prev_length, o = e.nice_match, h = e.strstart > e.w_size - z ? e.strstart - (e.w_size - z) : 0, u = e.window, l = e.w_mask, f = e.prev, c = e.strstart + S, d = u[s + a - 1], p = u[s + a];
2094
+ e.prev_length >= e.good_match && (i >>= 2), o > e.lookahead && (o = e.lookahead);
2095
+ do if (u[(r = t) + a] === p && u[r + a - 1] === d && u[r] === u[s] && u[++r] === u[s + 1]) {
2096
+ s += 2, r++;
2097
+ do ;
2098
+ while (u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && s < c)
2099
+ if (n = S - (c - s), s = c - S, a < n) {
2100
+ if (e.match_start = t, o <= (a = n)) break;
2101
+ d = u[s + a - 1], p = u[s + a];
2102
+ }
2103
+ }
2104
+ while ((t = f[t & l]) > h && 0 != --i)
2105
+ return a <= e.lookahead ? a : e.lookahead;
2106
+ }
2107
+ function j(e) {
2108
+ var t, r, n, i, s, a, o, h, u, l, f = e.w_size;
2109
+ do {
2110
+ if (i = e.window_size - e.lookahead - e.strstart, e.strstart >= f + (f - z)) {
2111
+ for(c.arraySet(e.window, e.window, f, f, 0), e.match_start -= f, e.strstart -= f, e.block_start -= f, t = r = e.hash_size; n = e.head[--t], e.head[t] = f <= n ? n - f : 0, --r;);
2112
+ for(t = r = f; n = e.prev[--t], e.prev[t] = f <= n ? n - f : 0, --r;);
2113
+ i += f;
2114
+ }
2115
+ if (0 === e.strm.avail_in) break;
2116
+ if (a = e.strm, o = e.window, h = e.strstart + e.lookahead, u = i, l = void 0, l = a.avail_in, u < l && (l = u), r = 0 === l ? 0 : (a.avail_in -= l, c.arraySet(o, a.input, a.next_in, l, h), 1 === a.state.wrap ? a.adler = d(a.adler, o, l, h) : 2 === a.state.wrap && (a.adler = p(a.adler, o, l, h)), a.next_in += l, a.total_in += l, l), e.lookahead += r, e.lookahead + e.insert >= x) for(s = e.strstart - e.insert, e.ins_h = e.window[s], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[s + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[s + x - 1]) & e.hash_mask, e.prev[s & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = s, s++, e.insert--, !(e.lookahead + e.insert < x)););
2117
+ }while (e.lookahead < z && 0 !== e.strm.avail_in)
2118
+ }
2119
+ function Z(e, t) {
2120
+ for(var r, n;;){
2121
+ if (e.lookahead < z) {
2122
+ if (j(e), e.lookahead < z && t === l) return A;
2123
+ if (0 === e.lookahead) break;
2124
+ }
2125
+ if (r = 0, e.lookahead >= x && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== r && e.strstart - r <= e.w_size - z && (e.match_length = L(e, r)), e.match_length >= x) if (n = u._tr_tally(e, e.strstart - e.match_start, e.match_length - x), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= x) {
2126
+ for(e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, 0 != --e.match_length;);
2127
+ e.strstart++;
2128
+ } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
2129
+ else n = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
2130
+ if (n && (N(e, !1), 0 === e.strm.avail_out)) return A;
2131
+ }
2132
+ return e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === f ? (N(e, !0), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, !1), 0 === e.strm.avail_out) ? A : I;
2133
+ }
2134
+ function W(e, t) {
2135
+ for(var r, n, i;;){
2136
+ if (e.lookahead < z) {
2137
+ if (j(e), e.lookahead < z && t === l) return A;
2138
+ if (0 === e.lookahead) break;
2139
+ }
2140
+ if (r = 0, e.lookahead >= x && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = x - 1, 0 !== r && e.prev_length < e.max_lazy_match && e.strstart - r <= e.w_size - z && (e.match_length = L(e, r), e.match_length <= 5 && (1 === e.strategy || e.match_length === x && 4096 < e.strstart - e.match_start) && (e.match_length = x - 1)), e.prev_length >= x && e.match_length <= e.prev_length) {
2141
+ for(i = e.strstart + e.lookahead - x, n = u._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - x), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 != --e.prev_length;);
2142
+ if (e.match_available = 0, e.match_length = x - 1, e.strstart++, n && (N(e, !1), 0 === e.strm.avail_out)) return A;
2143
+ } else if (e.match_available) {
2144
+ if ((n = u._tr_tally(e, 0, e.window[e.strstart - 1])) && N(e, !1), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return A;
2145
+ } else e.match_available = 1, e.strstart++, e.lookahead--;
2146
+ }
2147
+ return e.match_available && (n = u._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === f ? (N(e, !0), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, !1), 0 === e.strm.avail_out) ? A : I;
2148
+ }
2149
+ function M(e, t, r, n, i) {
2150
+ this.good_length = e, this.max_lazy = t, this.nice_length = r, this.max_chain = n, this.func = i;
2151
+ }
2152
+ function H() {
2153
+ 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 = v, 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 c.Buf16(2 * w), this.dyn_dtree = new c.Buf16(2 * (2 * a + 1)), this.bl_tree = new c.Buf16(2 * (2 * o + 1)), D(this.dyn_ltree), D(this.dyn_dtree), D(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new c.Buf16(k + 1), this.heap = new c.Buf16(2 * s + 1), D(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new c.Buf16(2 * s + 1), D(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;
2154
+ }
2155
+ function G(e) {
2156
+ var t;
2157
+ return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = i, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? C : E, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = l, u._tr_init(t), m) : R(e, _);
2158
+ }
2159
+ function K(e) {
2160
+ var t = G(e);
2161
+ return t === m && function(e) {
2162
+ e.window_size = 2 * e.w_size, D(e.head), e.max_lazy_match = h[e.level].max_lazy, e.good_match = h[e.level].good_length, e.nice_match = h[e.level].nice_length, e.max_chain_length = h[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = x - 1, e.match_available = 0, e.ins_h = 0;
2163
+ }(e.state), t;
2164
+ }
2165
+ function Y(e, t, r, n, i, s) {
2166
+ if (!e) return _;
2167
+ var a = 1;
2168
+ if (t === g && (t = 6), n < 0 ? (a = 0, n = -n) : 15 < n && (a = 2, n -= 16), i < 1 || y < i || r !== v || n < 8 || 15 < n || t < 0 || 9 < t || s < 0 || b < s) return R(e, _);
2169
+ 8 === n && (n = 9);
2170
+ var o = new H;
2171
+ return (e.state = o).strm = e, o.wrap = a, o.gzhead = null, o.w_bits = n, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = i + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + x - 1) / x), o.window = new c.Buf8(2 * o.w_size), o.head = new c.Buf16(o.hash_size), o.prev = new c.Buf16(o.w_size), o.lit_bufsize = 1 << i + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new c.Buf8(o.pending_buf_size), o.d_buf = +o.lit_bufsize, o.l_buf = 3 * o.lit_bufsize, o.level = t, o.strategy = s, o.method = r, K(e);
2172
+ }
2173
+ h = [
2174
+ new M(0, 0, 0, 0, function(e, t) {
2175
+ var r = 65535;
2176
+ for(r > e.pending_buf_size - 5 && (r = e.pending_buf_size - 5);;){
2177
+ if (e.lookahead <= 1) {
2178
+ if (j(e), 0 === e.lookahead && t === l) return A;
2179
+ if (0 === e.lookahead) break;
2180
+ }
2181
+ e.strstart += e.lookahead, e.lookahead = 0;
2182
+ var n = e.block_start + r;
2183
+ if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e.strstart - n, e.strstart = n, N(e, !1), 0 === e.strm.avail_out)) return A;
2184
+ if (e.strstart - e.block_start >= e.w_size - z && (N(e, !1), 0 === e.strm.avail_out)) return A;
2185
+ }
2186
+ return e.insert = 0, t === f ? (N(e, !0), 0 === e.strm.avail_out ? O : B) : (e.strstart > e.block_start && (N(e, !1), e.strm.avail_out), A);
2187
+ }),
2188
+ new M(4, 4, 8, 4, Z),
2189
+ new M(4, 5, 16, 8, Z),
2190
+ new M(4, 6, 32, 32, Z),
2191
+ new M(4, 4, 16, 16, W),
2192
+ new M(8, 16, 32, 32, W),
2193
+ new M(8, 16, 128, 128, W),
2194
+ new M(8, 32, 128, 256, W),
2195
+ new M(32, 128, 258, 1024, W),
2196
+ new M(32, 258, 258, 4096, W)
2197
+ ], r.deflateInit = function(e, t) {
2198
+ return Y(e, t, v, 15, 8, 0);
2199
+ }, r.deflateInit2 = Y, r.deflateReset = K, r.deflateResetKeep = G, r.deflateSetHeader = function(e, t) {
2200
+ return e && e.state ? 2 !== e.state.wrap ? _ : (e.state.gzhead = t, m) : _;
2201
+ }, r.deflate = function(e, t) {
2202
+ var r, n, i, s;
2203
+ if (!e || !e.state || 5 < t || t < 0) return e ? R(e, _) : _;
2204
+ if (n = e.state, !e.output || !e.input && 0 !== e.avail_in || 666 === n.status && t !== f) return R(e, 0 === e.avail_out ? -5 : _);
2205
+ if (n.strm = e, r = n.last_flush, n.last_flush = t, n.status === C) if (2 === n.wrap) e.adler = 0, U(n, 31), U(n, 139), U(n, 8), n.gzhead ? (U(n, (n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), U(n, 255 & n.gzhead.time), U(n, n.gzhead.time >> 8 & 255), U(n, n.gzhead.time >> 16 & 255), U(n, n.gzhead.time >> 24 & 255), U(n, 9 === n.level ? 2 : 2 <= n.strategy || n.level < 2 ? 4 : 0), U(n, 255 & n.gzhead.os), n.gzhead.extra && n.gzhead.extra.length && (U(n, 255 & n.gzhead.extra.length), U(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = p(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = 69) : (U(n, 0), U(n, 0), U(n, 0), U(n, 0), U(n, 0), U(n, 9 === n.level ? 2 : 2 <= n.strategy || n.level < 2 ? 4 : 0), U(n, 3), n.status = E);
2206
+ else {
2207
+ var a = v + (n.w_bits - 8 << 4) << 8;
2208
+ a |= (2 <= n.strategy || n.level < 2 ? 0 : n.level < 6 ? 1 : 6 === n.level ? 2 : 3) << 6, 0 !== n.strstart && (a |= 32), a += 31 - a % 31, n.status = E, P(n, a), 0 !== n.strstart && (P(n, e.adler >>> 16), P(n, 65535 & e.adler)), e.adler = 1;
2209
+ }
2210
+ if (69 === n.status) if (n.gzhead.extra) {
2211
+ for(i = n.pending; n.gzindex < (65535 & n.gzhead.extra.length) && (n.pending !== n.pending_buf_size || (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending !== n.pending_buf_size));)U(n, 255 & n.gzhead.extra[n.gzindex]), n.gzindex++;
2212
+ n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), n.gzindex === n.gzhead.extra.length && (n.gzindex = 0, n.status = 73);
2213
+ } else n.status = 73;
2214
+ if (73 === n.status) if (n.gzhead.name) {
2215
+ i = n.pending;
2216
+ do {
2217
+ if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending === n.pending_buf_size)) {
2218
+ s = 1;
2219
+ break;
2220
+ }
2221
+ s = n.gzindex < n.gzhead.name.length ? 255 & n.gzhead.name.charCodeAt(n.gzindex++) : 0, U(n, s);
2222
+ }while (0 !== s)
2223
+ n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), 0 === s && (n.gzindex = 0, n.status = 91);
2224
+ } else n.status = 91;
2225
+ if (91 === n.status) if (n.gzhead.comment) {
2226
+ i = n.pending;
2227
+ do {
2228
+ if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending === n.pending_buf_size)) {
2229
+ s = 1;
2230
+ break;
2231
+ }
2232
+ s = n.gzindex < n.gzhead.comment.length ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++) : 0, U(n, s);
2233
+ }while (0 !== s)
2234
+ n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), 0 === s && (n.status = 103);
2235
+ } else n.status = 103;
2236
+ if (103 === n.status && (n.gzhead.hcrc ? (n.pending + 2 > n.pending_buf_size && F(e), n.pending + 2 <= n.pending_buf_size && (U(n, 255 & e.adler), U(n, e.adler >> 8 & 255), e.adler = 0, n.status = E)) : n.status = E), 0 !== n.pending) {
2237
+ if (F(e), 0 === e.avail_out) return n.last_flush = -1, m;
2238
+ } else if (0 === e.avail_in && T(t) <= T(r) && t !== f) return R(e, -5);
2239
+ if (666 === n.status && 0 !== e.avail_in) return R(e, -5);
2240
+ if (0 !== e.avail_in || 0 !== n.lookahead || t !== l && 666 !== n.status) {
2241
+ var o = 2 === n.strategy ? function(e, t) {
2242
+ for(var r;;){
2243
+ if (0 === e.lookahead && (j(e), 0 === e.lookahead)) {
2244
+ if (t === l) return A;
2245
+ break;
2246
+ }
2247
+ if (e.match_length = 0, r = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, r && (N(e, !1), 0 === e.strm.avail_out)) return A;
2248
+ }
2249
+ return e.insert = 0, t === f ? (N(e, !0), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, !1), 0 === e.strm.avail_out) ? A : I;
2250
+ }(n, t) : 3 === n.strategy ? function(e, t) {
2251
+ for(var r, n, i, s, a = e.window;;){
2252
+ if (e.lookahead <= S) {
2253
+ if (j(e), e.lookahead <= S && t === l) return A;
2254
+ if (0 === e.lookahead) break;
2255
+ }
2256
+ if (e.match_length = 0, e.lookahead >= x && 0 < e.strstart && (n = a[i = e.strstart - 1]) === a[++i] && n === a[++i] && n === a[++i]) {
2257
+ s = e.strstart + S;
2258
+ do ;
2259
+ while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && i < s)
2260
+ e.match_length = S - (s - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
2261
+ }
2262
+ if (e.match_length >= x ? (r = u._tr_tally(e, 1, e.match_length - x), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (r = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), r && (N(e, !1), 0 === e.strm.avail_out)) return A;
2263
+ }
2264
+ return e.insert = 0, t === f ? (N(e, !0), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, !1), 0 === e.strm.avail_out) ? A : I;
2265
+ }(n, t) : h[n.level].func(n, t);
2266
+ if (o !== O && o !== B || (n.status = 666), o === A || o === O) return 0 === e.avail_out && (n.last_flush = -1), m;
2267
+ if (o === I && (1 === t ? u._tr_align(n) : 5 !== t && (u._tr_stored_block(n, 0, 0, !1), 3 === t && (D(n.head), 0 === n.lookahead && (n.strstart = 0, n.block_start = 0, n.insert = 0))), F(e), 0 === e.avail_out)) return n.last_flush = -1, m;
2268
+ }
2269
+ return t !== f ? m : n.wrap <= 0 ? 1 : (2 === n.wrap ? (U(n, 255 & e.adler), U(n, e.adler >> 8 & 255), U(n, e.adler >> 16 & 255), U(n, e.adler >> 24 & 255), U(n, 255 & e.total_in), U(n, e.total_in >> 8 & 255), U(n, e.total_in >> 16 & 255), U(n, e.total_in >> 24 & 255)) : (P(n, e.adler >>> 16), P(n, 65535 & e.adler)), F(e), 0 < n.wrap && (n.wrap = -n.wrap), 0 !== n.pending ? m : 1);
2270
+ }, r.deflateEnd = function(e) {
2271
+ var t;
2272
+ return e && e.state ? (t = e.state.status) !== C && 69 !== t && 73 !== t && 91 !== t && 103 !== t && t !== E && 666 !== t ? R(e, _) : (e.state = null, t === E ? R(e, -3) : m) : _;
2273
+ }, r.deflateSetDictionary = function(e, t) {
2274
+ var r, n, i, s, a, o, h, u, l = t.length;
2275
+ if (!e || !e.state) return _;
2276
+ if (2 === (s = (r = e.state).wrap) || 1 === s && r.status !== C || r.lookahead) return _;
2277
+ for(1 === s && (e.adler = d(e.adler, t, l, 0)), r.wrap = 0, l >= r.w_size && (0 === s && (D(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0), u = new c.Buf8(r.w_size), c.arraySet(u, t, l - r.w_size, r.w_size, 0), t = u, l = r.w_size), a = e.avail_in, o = e.next_in, h = e.input, e.avail_in = l, e.next_in = 0, e.input = t, j(r); r.lookahead >= x;){
2278
+ for(n = r.strstart, i = r.lookahead - (x - 1); r.ins_h = (r.ins_h << r.hash_shift ^ r.window[n + x - 1]) & r.hash_mask, r.prev[n & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = n, n++, --i;);
2279
+ r.strstart = n, r.lookahead = x - 1, j(r);
2280
+ }
2281
+ return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = x - 1, r.match_available = 0, e.next_in = o, e.input = h, e.avail_in = a, r.wrap = s, m;
2282
+ }, r.deflateInfo = "pako deflate (from Nodeca project)";
2283
+ },
2284
+ {
2285
+ "../utils/common": 41,
2286
+ "./adler32": 43,
2287
+ "./crc32": 45,
2288
+ "./messages": 51,
2289
+ "./trees": 52
2290
+ }
2291
+ ],
2292
+ 47: [
2293
+ function(e, t, r) {
2294
+ "use strict";
2295
+ t.exports = function() {
2296
+ this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
2297
+ };
2298
+ },
2299
+ {}
2300
+ ],
2301
+ 48: [
2302
+ function(e, t, r) {
2303
+ "use strict";
2304
+ t.exports = function(e, t) {
2305
+ var r, n, i, s, a, o, h, u, l, f, c, d, p, m, _, g, b, v, y, w, k, x, S, z, C;
2306
+ r = e.state, n = e.next_in, z = e.input, i = n + (e.avail_in - 5), s = e.next_out, C = e.output, a = s - (t - e.avail_out), o = s + (e.avail_out - 257), h = r.dmax, u = r.wsize, l = r.whave, f = r.wnext, c = r.window, d = r.hold, p = r.bits, m = r.lencode, _ = r.distcode, g = (1 << r.lenbits) - 1, b = (1 << r.distbits) - 1;
2307
+ e: do {
2308
+ p < 15 && (d += z[n++] << p, p += 8, d += z[n++] << p, p += 8), v = m[d & g];
2309
+ for(;;){
2310
+ if (d >>>= y = v >>> 24, p -= y, 0 === (y = v >>> 16 & 255)) C[s++] = 65535 & v;
2311
+ else {
2312
+ if (!(16 & y)) {
2313
+ if (0 == (64 & y)) {
2314
+ v = m[(65535 & v) + (d & (1 << y) - 1)];
2315
+ continue;
2316
+ }
2317
+ if (32 & y) {
2318
+ r.mode = 12;
2319
+ break e;
2320
+ }
2321
+ e.msg = "invalid literal/length code", r.mode = 30;
2322
+ break e;
2323
+ }
2324
+ w = 65535 & v, (y &= 15) && (p < y && (d += z[n++] << p, p += 8), w += d & (1 << y) - 1, d >>>= y, p -= y), p < 15 && (d += z[n++] << p, p += 8, d += z[n++] << p, p += 8), v = _[d & b];
2325
+ for(;;){
2326
+ if (d >>>= y = v >>> 24, p -= y, !(16 & (y = v >>> 16 & 255))) {
2327
+ if (0 == (64 & y)) {
2328
+ v = _[(65535 & v) + (d & (1 << y) - 1)];
2329
+ continue;
2330
+ }
2331
+ e.msg = "invalid distance code", r.mode = 30;
2332
+ break e;
2333
+ }
2334
+ if (k = 65535 & v, p < (y &= 15) && (d += z[n++] << p, (p += 8) < y && (d += z[n++] << p, p += 8)), h < (k += d & (1 << y) - 1)) {
2335
+ e.msg = "invalid distance too far back", r.mode = 30;
2336
+ break e;
2337
+ }
2338
+ if (d >>>= y, p -= y, (y = s - a) < k) {
2339
+ if (l < (y = k - y) && r.sane) {
2340
+ e.msg = "invalid distance too far back", r.mode = 30;
2341
+ break e;
2342
+ }
2343
+ if (S = c, (x = 0) === f) {
2344
+ if (x += u - y, y < w) {
2345
+ for(w -= y; C[s++] = c[x++], --y;);
2346
+ x = s - k, S = C;
2347
+ }
2348
+ } else if (f < y) {
2349
+ if (x += u + f - y, (y -= f) < w) {
2350
+ for(w -= y; C[s++] = c[x++], --y;);
2351
+ if (x = 0, f < w) {
2352
+ for(w -= y = f; C[s++] = c[x++], --y;);
2353
+ x = s - k, S = C;
2354
+ }
2355
+ }
2356
+ } else if (x += f - y, y < w) {
2357
+ for(w -= y; C[s++] = c[x++], --y;);
2358
+ x = s - k, S = C;
2359
+ }
2360
+ for(; 2 < w;)C[s++] = S[x++], C[s++] = S[x++], C[s++] = S[x++], w -= 3;
2361
+ w && (C[s++] = S[x++], 1 < w && (C[s++] = S[x++]));
2362
+ } else {
2363
+ for(x = s - k; C[s++] = C[x++], C[s++] = C[x++], C[s++] = C[x++], 2 < (w -= 3););
2364
+ w && (C[s++] = C[x++], 1 < w && (C[s++] = C[x++]));
2365
+ }
2366
+ break;
2367
+ }
2368
+ }
2369
+ break;
2370
+ }
2371
+ }while (n < i && s < o)
2372
+ n -= w = p >> 3, d &= (1 << (p -= w << 3)) - 1, e.next_in = n, e.next_out = s, e.avail_in = n < i ? i - n + 5 : 5 - (n - i), e.avail_out = s < o ? o - s + 257 : 257 - (s - o), r.hold = d, r.bits = p;
2373
+ };
2374
+ },
2375
+ {}
2376
+ ],
2377
+ 49: [
2378
+ function(e, t, r) {
2379
+ "use strict";
2380
+ var I = e("../utils/common"), O = e("./adler32"), B = e("./crc32"), R = e("./inffast"), T = e("./inftrees"), D = 1, F = 2, N = 0, U = -2, P = 1, n = 852, i = 592;
2381
+ function L(e) {
2382
+ return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
2383
+ }
2384
+ function s() {
2385
+ this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new I.Buf16(320), this.work = new I.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
2386
+ }
2387
+ function a(e) {
2388
+ var t;
2389
+ return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = P, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new I.Buf32(n), t.distcode = t.distdyn = new I.Buf32(i), t.sane = 1, t.back = -1, N) : U;
2390
+ }
2391
+ function o(e) {
2392
+ var t;
2393
+ return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, a(e)) : U;
2394
+ }
2395
+ function h(e, t) {
2396
+ var r, n;
2397
+ return e && e.state ? (n = e.state, t < 0 ? (r = 0, t = -t) : (r = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? U : (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = r, n.wbits = t, o(e))) : U;
2398
+ }
2399
+ function u(e, t) {
2400
+ var r, n;
2401
+ return e ? (n = new s, (e.state = n).window = null, (r = h(e, t)) !== N && (e.state = null), r) : U;
2402
+ }
2403
+ var l, f, c = !0;
2404
+ function j(e) {
2405
+ if (c) {
2406
+ var t;
2407
+ for(l = new I.Buf32(512), f = new I.Buf32(32), t = 0; t < 144;)e.lens[t++] = 8;
2408
+ for(; t < 256;)e.lens[t++] = 9;
2409
+ for(; t < 280;)e.lens[t++] = 7;
2410
+ for(; t < 288;)e.lens[t++] = 8;
2411
+ for(T(D, e.lens, 0, 288, l, 0, e.work, {
2412
+ bits: 9
2413
+ }), t = 0; t < 32;)e.lens[t++] = 5;
2414
+ T(F, e.lens, 0, 32, f, 0, e.work, {
2415
+ bits: 5
2416
+ }), c = !1;
2417
+ }
2418
+ e.lencode = l, e.lenbits = 9, e.distcode = f, e.distbits = 5;
2419
+ }
2420
+ function Z(e, t, r, n) {
2421
+ var i, s = e.state;
2422
+ return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new I.Buf8(s.wsize)), n >= s.wsize ? (I.arraySet(s.window, t, r - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s.wsize) : (n < (i = s.wsize - s.wnext) && (i = n), I.arraySet(s.window, t, r - n, i, s.wnext), (n -= i) ? (I.arraySet(s.window, t, r - n, n, 0), s.wnext = n, s.whave = s.wsize) : (s.wnext += i, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += i))), 0;
2423
+ }
2424
+ r.inflateReset = o, r.inflateReset2 = h, r.inflateResetKeep = a, r.inflateInit = function(e) {
2425
+ return u(e, 15);
2426
+ }, r.inflateInit2 = u, r.inflate = function(e, t) {
2427
+ var r, n, i, s, a, o, h, u, l, f, c, d, p, m, _, g, b, v, y, w, k, x, S, z, C = 0, E = new I.Buf8(4), A = [
2428
+ 16,
2429
+ 17,
2430
+ 18,
2431
+ 0,
2432
+ 8,
2433
+ 7,
2434
+ 9,
2435
+ 6,
2436
+ 10,
2437
+ 5,
2438
+ 11,
2439
+ 4,
2440
+ 12,
2441
+ 3,
2442
+ 13,
2443
+ 2,
2444
+ 14,
2445
+ 1,
2446
+ 15
2447
+ ];
2448
+ if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return U;
2449
+ 12 === (r = e.state).mode && (r.mode = 13), a = e.next_out, i = e.output, h = e.avail_out, s = e.next_in, n = e.input, o = e.avail_in, u = r.hold, l = r.bits, f = o, c = h, x = N;
2450
+ e: for(;;)switch(r.mode){
2451
+ case P:
2452
+ if (0 === r.wrap) {
2453
+ r.mode = 13;
2454
+ break;
2455
+ }
2456
+ for(; l < 16;){
2457
+ if (0 === o) break e;
2458
+ o--, u += n[s++] << l, l += 8;
2459
+ }
2460
+ if (2 & r.wrap && 35615 === u) {
2461
+ E[r.check = 0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0), l = u = 0, r.mode = 2;
2462
+ break;
2463
+ }
2464
+ if (r.flags = 0, r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & u) << 8) + (u >> 8)) % 31) {
2465
+ e.msg = "incorrect header check", r.mode = 30;
2466
+ break;
2467
+ }
2468
+ if (8 != (15 & u)) {
2469
+ e.msg = "unknown compression method", r.mode = 30;
2470
+ break;
2471
+ }
2472
+ if (l -= 4, k = 8 + (15 & (u >>>= 4)), 0 === r.wbits) r.wbits = k;
2473
+ else if (k > r.wbits) {
2474
+ e.msg = "invalid window size", r.mode = 30;
2475
+ break;
2476
+ }
2477
+ r.dmax = 1 << k, e.adler = r.check = 1, r.mode = 512 & u ? 10 : 12, l = u = 0;
2478
+ break;
2479
+ case 2:
2480
+ for(; l < 16;){
2481
+ if (0 === o) break e;
2482
+ o--, u += n[s++] << l, l += 8;
2483
+ }
2484
+ if (r.flags = u, 8 != (255 & r.flags)) {
2485
+ e.msg = "unknown compression method", r.mode = 30;
2486
+ break;
2487
+ }
2488
+ if (57344 & r.flags) {
2489
+ e.msg = "unknown header flags set", r.mode = 30;
2490
+ break;
2491
+ }
2492
+ r.head && (r.head.text = u >> 8 & 1), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0, r.mode = 3;
2493
+ case 3:
2494
+ for(; l < 32;){
2495
+ if (0 === o) break e;
2496
+ o--, u += n[s++] << l, l += 8;
2497
+ }
2498
+ r.head && (r.head.time = u), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, E[2] = u >>> 16 & 255, E[3] = u >>> 24 & 255, r.check = B(r.check, E, 4, 0)), l = u = 0, r.mode = 4;
2499
+ case 4:
2500
+ for(; l < 16;){
2501
+ if (0 === o) break e;
2502
+ o--, u += n[s++] << l, l += 8;
2503
+ }
2504
+ r.head && (r.head.xflags = 255 & u, r.head.os = u >> 8), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0, r.mode = 5;
2505
+ case 5:
2506
+ if (1024 & r.flags) {
2507
+ for(; l < 16;){
2508
+ if (0 === o) break e;
2509
+ o--, u += n[s++] << l, l += 8;
2510
+ }
2511
+ r.length = u, r.head && (r.head.extra_len = u), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0;
2512
+ } else r.head && (r.head.extra = null);
2513
+ r.mode = 6;
2514
+ case 6:
2515
+ if (1024 & r.flags && (o < (d = r.length) && (d = o), d && (r.head && (k = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Array(r.head.extra_len)), I.arraySet(r.head.extra, n, s, d, k)), 512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, r.length -= d), r.length)) break e;
2516
+ r.length = 0, r.mode = 7;
2517
+ case 7:
2518
+ if (2048 & r.flags) {
2519
+ if (0 === o) break e;
2520
+ for(d = 0; k = n[s + d++], r.head && k && r.length < 65536 && (r.head.name += String.fromCharCode(k)), k && d < o;);
2521
+ if (512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, k) break e;
2522
+ } else r.head && (r.head.name = null);
2523
+ r.length = 0, r.mode = 8;
2524
+ case 8:
2525
+ if (4096 & r.flags) {
2526
+ if (0 === o) break e;
2527
+ for(d = 0; k = n[s + d++], r.head && k && r.length < 65536 && (r.head.comment += String.fromCharCode(k)), k && d < o;);
2528
+ if (512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, k) break e;
2529
+ } else r.head && (r.head.comment = null);
2530
+ r.mode = 9;
2531
+ case 9:
2532
+ if (512 & r.flags) {
2533
+ for(; l < 16;){
2534
+ if (0 === o) break e;
2535
+ o--, u += n[s++] << l, l += 8;
2536
+ }
2537
+ if (u !== (65535 & r.check)) {
2538
+ e.msg = "header crc mismatch", r.mode = 30;
2539
+ break;
2540
+ }
2541
+ l = u = 0;
2542
+ }
2543
+ r.head && (r.head.hcrc = r.flags >> 9 & 1, r.head.done = !0), e.adler = r.check = 0, r.mode = 12;
2544
+ break;
2545
+ case 10:
2546
+ for(; l < 32;){
2547
+ if (0 === o) break e;
2548
+ o--, u += n[s++] << l, l += 8;
2549
+ }
2550
+ e.adler = r.check = L(u), l = u = 0, r.mode = 11;
2551
+ case 11:
2552
+ if (0 === r.havedict) return e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, 2;
2553
+ e.adler = r.check = 1, r.mode = 12;
2554
+ case 12:
2555
+ if (5 === t || 6 === t) break e;
2556
+ case 13:
2557
+ if (r.last) {
2558
+ u >>>= 7 & l, l -= 7 & l, r.mode = 27;
2559
+ break;
2560
+ }
2561
+ for(; l < 3;){
2562
+ if (0 === o) break e;
2563
+ o--, u += n[s++] << l, l += 8;
2564
+ }
2565
+ switch(r.last = 1 & u, l -= 1, 3 & (u >>>= 1)){
2566
+ case 0:
2567
+ r.mode = 14;
2568
+ break;
2569
+ case 1:
2570
+ if (j(r), r.mode = 20, 6 !== t) break;
2571
+ u >>>= 2, l -= 2;
2572
+ break e;
2573
+ case 2:
2574
+ r.mode = 17;
2575
+ break;
2576
+ case 3:
2577
+ e.msg = "invalid block type", r.mode = 30;
2578
+ }
2579
+ u >>>= 2, l -= 2;
2580
+ break;
2581
+ case 14:
2582
+ for(u >>>= 7 & l, l -= 7 & l; l < 32;){
2583
+ if (0 === o) break e;
2584
+ o--, u += n[s++] << l, l += 8;
2585
+ }
2586
+ if ((65535 & u) != (u >>> 16 ^ 65535)) {
2587
+ e.msg = "invalid stored block lengths", r.mode = 30;
2588
+ break;
2589
+ }
2590
+ if (r.length = 65535 & u, l = u = 0, r.mode = 15, 6 === t) break e;
2591
+ case 15:
2592
+ r.mode = 16;
2593
+ case 16:
2594
+ if (d = r.length) {
2595
+ if (o < d && (d = o), h < d && (d = h), 0 === d) break e;
2596
+ I.arraySet(i, n, s, d, a), o -= d, s += d, h -= d, a += d, r.length -= d;
2597
+ break;
2598
+ }
2599
+ r.mode = 12;
2600
+ break;
2601
+ case 17:
2602
+ for(; l < 14;){
2603
+ if (0 === o) break e;
2604
+ o--, u += n[s++] << l, l += 8;
2605
+ }
2606
+ if (r.nlen = 257 + (31 & u), u >>>= 5, l -= 5, r.ndist = 1 + (31 & u), u >>>= 5, l -= 5, r.ncode = 4 + (15 & u), u >>>= 4, l -= 4, 286 < r.nlen || 30 < r.ndist) {
2607
+ e.msg = "too many length or distance symbols", r.mode = 30;
2608
+ break;
2609
+ }
2610
+ r.have = 0, r.mode = 18;
2611
+ case 18:
2612
+ for(; r.have < r.ncode;){
2613
+ for(; l < 3;){
2614
+ if (0 === o) break e;
2615
+ o--, u += n[s++] << l, l += 8;
2616
+ }
2617
+ r.lens[A[r.have++]] = 7 & u, u >>>= 3, l -= 3;
2618
+ }
2619
+ for(; r.have < 19;)r.lens[A[r.have++]] = 0;
2620
+ if (r.lencode = r.lendyn, r.lenbits = 7, S = {
2621
+ bits: r.lenbits
2622
+ }, x = T(0, r.lens, 0, 19, r.lencode, 0, r.work, S), r.lenbits = S.bits, x) {
2623
+ e.msg = "invalid code lengths set", r.mode = 30;
2624
+ break;
2625
+ }
2626
+ r.have = 0, r.mode = 19;
2627
+ case 19:
2628
+ for(; r.have < r.nlen + r.ndist;){
2629
+ for(; g = (C = r.lencode[u & (1 << r.lenbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);){
2630
+ if (0 === o) break e;
2631
+ o--, u += n[s++] << l, l += 8;
2632
+ }
2633
+ if (b < 16) u >>>= _, l -= _, r.lens[r.have++] = b;
2634
+ else {
2635
+ if (16 === b) {
2636
+ for(z = _ + 2; l < z;){
2637
+ if (0 === o) break e;
2638
+ o--, u += n[s++] << l, l += 8;
2639
+ }
2640
+ if (u >>>= _, l -= _, 0 === r.have) {
2641
+ e.msg = "invalid bit length repeat", r.mode = 30;
2642
+ break;
2643
+ }
2644
+ k = r.lens[r.have - 1], d = 3 + (3 & u), u >>>= 2, l -= 2;
2645
+ } else if (17 === b) {
2646
+ for(z = _ + 3; l < z;){
2647
+ if (0 === o) break e;
2648
+ o--, u += n[s++] << l, l += 8;
2649
+ }
2650
+ l -= _, k = 0, d = 3 + (7 & (u >>>= _)), u >>>= 3, l -= 3;
2651
+ } else {
2652
+ for(z = _ + 7; l < z;){
2653
+ if (0 === o) break e;
2654
+ o--, u += n[s++] << l, l += 8;
2655
+ }
2656
+ l -= _, k = 0, d = 11 + (127 & (u >>>= _)), u >>>= 7, l -= 7;
2657
+ }
2658
+ if (r.have + d > r.nlen + r.ndist) {
2659
+ e.msg = "invalid bit length repeat", r.mode = 30;
2660
+ break;
2661
+ }
2662
+ for(; d--;)r.lens[r.have++] = k;
2663
+ }
2664
+ }
2665
+ if (30 === r.mode) break;
2666
+ if (0 === r.lens[256]) {
2667
+ e.msg = "invalid code -- missing end-of-block", r.mode = 30;
2668
+ break;
2669
+ }
2670
+ if (r.lenbits = 9, S = {
2671
+ bits: r.lenbits
2672
+ }, x = T(D, r.lens, 0, r.nlen, r.lencode, 0, r.work, S), r.lenbits = S.bits, x) {
2673
+ e.msg = "invalid literal/lengths set", r.mode = 30;
2674
+ break;
2675
+ }
2676
+ if (r.distbits = 6, r.distcode = r.distdyn, S = {
2677
+ bits: r.distbits
2678
+ }, x = T(F, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, S), r.distbits = S.bits, x) {
2679
+ e.msg = "invalid distances set", r.mode = 30;
2680
+ break;
2681
+ }
2682
+ if (r.mode = 20, 6 === t) break e;
2683
+ case 20:
2684
+ r.mode = 21;
2685
+ case 21:
2686
+ if (6 <= o && 258 <= h) {
2687
+ e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, R(e, c), a = e.next_out, i = e.output, h = e.avail_out, s = e.next_in, n = e.input, o = e.avail_in, u = r.hold, l = r.bits, 12 === r.mode && (r.back = -1);
2688
+ break;
2689
+ }
2690
+ for(r.back = 0; g = (C = r.lencode[u & (1 << r.lenbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);){
2691
+ if (0 === o) break e;
2692
+ o--, u += n[s++] << l, l += 8;
2693
+ }
2694
+ if (g && 0 == (240 & g)) {
2695
+ for(v = _, y = g, w = b; g = (C = r.lencode[w + ((u & (1 << v + y) - 1) >> v)]) >>> 16 & 255, b = 65535 & C, !(v + (_ = C >>> 24) <= l);){
2696
+ if (0 === o) break e;
2697
+ o--, u += n[s++] << l, l += 8;
2698
+ }
2699
+ u >>>= v, l -= v, r.back += v;
2700
+ }
2701
+ if (u >>>= _, l -= _, r.back += _, r.length = b, 0 === g) {
2702
+ r.mode = 26;
2703
+ break;
2704
+ }
2705
+ if (32 & g) {
2706
+ r.back = -1, r.mode = 12;
2707
+ break;
2708
+ }
2709
+ if (64 & g) {
2710
+ e.msg = "invalid literal/length code", r.mode = 30;
2711
+ break;
2712
+ }
2713
+ r.extra = 15 & g, r.mode = 22;
2714
+ case 22:
2715
+ if (r.extra) {
2716
+ for(z = r.extra; l < z;){
2717
+ if (0 === o) break e;
2718
+ o--, u += n[s++] << l, l += 8;
2719
+ }
2720
+ r.length += u & (1 << r.extra) - 1, u >>>= r.extra, l -= r.extra, r.back += r.extra;
2721
+ }
2722
+ r.was = r.length, r.mode = 23;
2723
+ case 23:
2724
+ for(; g = (C = r.distcode[u & (1 << r.distbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);){
2725
+ if (0 === o) break e;
2726
+ o--, u += n[s++] << l, l += 8;
2727
+ }
2728
+ if (0 == (240 & g)) {
2729
+ for(v = _, y = g, w = b; g = (C = r.distcode[w + ((u & (1 << v + y) - 1) >> v)]) >>> 16 & 255, b = 65535 & C, !(v + (_ = C >>> 24) <= l);){
2730
+ if (0 === o) break e;
2731
+ o--, u += n[s++] << l, l += 8;
2732
+ }
2733
+ u >>>= v, l -= v, r.back += v;
2734
+ }
2735
+ if (u >>>= _, l -= _, r.back += _, 64 & g) {
2736
+ e.msg = "invalid distance code", r.mode = 30;
2737
+ break;
2738
+ }
2739
+ r.offset = b, r.extra = 15 & g, r.mode = 24;
2740
+ case 24:
2741
+ if (r.extra) {
2742
+ for(z = r.extra; l < z;){
2743
+ if (0 === o) break e;
2744
+ o--, u += n[s++] << l, l += 8;
2745
+ }
2746
+ r.offset += u & (1 << r.extra) - 1, u >>>= r.extra, l -= r.extra, r.back += r.extra;
2747
+ }
2748
+ if (r.offset > r.dmax) {
2749
+ e.msg = "invalid distance too far back", r.mode = 30;
2750
+ break;
2751
+ }
2752
+ r.mode = 25;
2753
+ case 25:
2754
+ if (0 === h) break e;
2755
+ if (d = c - h, r.offset > d) {
2756
+ if ((d = r.offset - d) > r.whave && r.sane) {
2757
+ e.msg = "invalid distance too far back", r.mode = 30;
2758
+ break;
2759
+ }
2760
+ p = d > r.wnext ? (d -= r.wnext, r.wsize - d) : r.wnext - d, d > r.length && (d = r.length), m = r.window;
2761
+ } else m = i, p = a - r.offset, d = r.length;
2762
+ for(h < d && (d = h), h -= d, r.length -= d; i[a++] = m[p++], --d;);
2763
+ 0 === r.length && (r.mode = 21);
2764
+ break;
2765
+ case 26:
2766
+ if (0 === h) break e;
2767
+ i[a++] = r.length, h--, r.mode = 21;
2768
+ break;
2769
+ case 27:
2770
+ if (r.wrap) {
2771
+ for(; l < 32;){
2772
+ if (0 === o) break e;
2773
+ o--, u |= n[s++] << l, l += 8;
2774
+ }
2775
+ if (c -= h, e.total_out += c, r.total += c, c && (e.adler = r.check = r.flags ? B(r.check, i, c, a - c) : O(r.check, i, c, a - c)), c = h, (r.flags ? u : L(u)) !== r.check) {
2776
+ e.msg = "incorrect data check", r.mode = 30;
2777
+ break;
2778
+ }
2779
+ l = u = 0;
2780
+ }
2781
+ r.mode = 28;
2782
+ case 28:
2783
+ if (r.wrap && r.flags) {
2784
+ for(; l < 32;){
2785
+ if (0 === o) break e;
2786
+ o--, u += n[s++] << l, l += 8;
2787
+ }
2788
+ if (u !== (0 | r.total)) {
2789
+ e.msg = "incorrect length check", r.mode = 30;
2790
+ break;
2791
+ }
2792
+ l = u = 0;
2793
+ }
2794
+ r.mode = 29;
2795
+ case 29:
2796
+ x = 1;
2797
+ break e;
2798
+ case 30:
2799
+ x = -3;
2800
+ break e;
2801
+ case 31:
2802
+ return -4;
2803
+ case 32:
2804
+ default:
2805
+ return U;
2806
+ }
2807
+ return e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, (r.wsize || c !== e.avail_out && r.mode < 30 && (r.mode < 27 || 4 !== t)) && Z(e, e.output, e.next_out, c - e.avail_out) ? (r.mode = 31, -4) : (f -= e.avail_in, c -= e.avail_out, e.total_in += f, e.total_out += c, r.total += c, r.wrap && c && (e.adler = r.check = r.flags ? B(r.check, i, c, e.next_out - c) : O(r.check, i, c, e.next_out - c)), e.data_type = r.bits + (r.last ? 64 : 0) + (12 === r.mode ? 128 : 0) + (20 === r.mode || 15 === r.mode ? 256 : 0), (0 == f && 0 === c || 4 === t) && x === N && (x = -5), x);
2808
+ }, r.inflateEnd = function(e) {
2809
+ if (!e || !e.state) return U;
2810
+ var t = e.state;
2811
+ return t.window && (t.window = null), e.state = null, N;
2812
+ }, r.inflateGetHeader = function(e, t) {
2813
+ var r;
2814
+ return e && e.state ? 0 == (2 & (r = e.state).wrap) ? U : ((r.head = t).done = !1, N) : U;
2815
+ }, r.inflateSetDictionary = function(e, t) {
2816
+ var r, n = t.length;
2817
+ return e && e.state ? 0 !== (r = e.state).wrap && 11 !== r.mode ? U : 11 === r.mode && O(1, t, n, 0) !== r.check ? -3 : Z(e, t, n, n) ? (r.mode = 31, -4) : (r.havedict = 1, N) : U;
2818
+ }, r.inflateInfo = "pako inflate (from Nodeca project)";
2819
+ },
2820
+ {
2821
+ "../utils/common": 41,
2822
+ "./adler32": 43,
2823
+ "./crc32": 45,
2824
+ "./inffast": 48,
2825
+ "./inftrees": 50
2826
+ }
2827
+ ],
2828
+ 50: [
2829
+ function(e, t, r) {
2830
+ "use strict";
2831
+ var D = e("../utils/common"), F = [
2832
+ 3,
2833
+ 4,
2834
+ 5,
2835
+ 6,
2836
+ 7,
2837
+ 8,
2838
+ 9,
2839
+ 10,
2840
+ 11,
2841
+ 13,
2842
+ 15,
2843
+ 17,
2844
+ 19,
2845
+ 23,
2846
+ 27,
2847
+ 31,
2848
+ 35,
2849
+ 43,
2850
+ 51,
2851
+ 59,
2852
+ 67,
2853
+ 83,
2854
+ 99,
2855
+ 115,
2856
+ 131,
2857
+ 163,
2858
+ 195,
2859
+ 227,
2860
+ 258,
2861
+ 0,
2862
+ 0
2863
+ ], N = [
2864
+ 16,
2865
+ 16,
2866
+ 16,
2867
+ 16,
2868
+ 16,
2869
+ 16,
2870
+ 16,
2871
+ 16,
2872
+ 17,
2873
+ 17,
2874
+ 17,
2875
+ 17,
2876
+ 18,
2877
+ 18,
2878
+ 18,
2879
+ 18,
2880
+ 19,
2881
+ 19,
2882
+ 19,
2883
+ 19,
2884
+ 20,
2885
+ 20,
2886
+ 20,
2887
+ 20,
2888
+ 21,
2889
+ 21,
2890
+ 21,
2891
+ 21,
2892
+ 16,
2893
+ 72,
2894
+ 78
2895
+ ], U = [
2896
+ 1,
2897
+ 2,
2898
+ 3,
2899
+ 4,
2900
+ 5,
2901
+ 7,
2902
+ 9,
2903
+ 13,
2904
+ 17,
2905
+ 25,
2906
+ 33,
2907
+ 49,
2908
+ 65,
2909
+ 97,
2910
+ 129,
2911
+ 193,
2912
+ 257,
2913
+ 385,
2914
+ 513,
2915
+ 769,
2916
+ 1025,
2917
+ 1537,
2918
+ 2049,
2919
+ 3073,
2920
+ 4097,
2921
+ 6145,
2922
+ 8193,
2923
+ 12289,
2924
+ 16385,
2925
+ 24577,
2926
+ 0,
2927
+ 0
2928
+ ], P = [
2929
+ 16,
2930
+ 16,
2931
+ 16,
2932
+ 16,
2933
+ 17,
2934
+ 17,
2935
+ 18,
2936
+ 18,
2937
+ 19,
2938
+ 19,
2939
+ 20,
2940
+ 20,
2941
+ 21,
2942
+ 21,
2943
+ 22,
2944
+ 22,
2945
+ 23,
2946
+ 23,
2947
+ 24,
2948
+ 24,
2949
+ 25,
2950
+ 25,
2951
+ 26,
2952
+ 26,
2953
+ 27,
2954
+ 27,
2955
+ 28,
2956
+ 28,
2957
+ 29,
2958
+ 29,
2959
+ 64,
2960
+ 64
2961
+ ];
2962
+ t.exports = function(e, t, r, n, i, s, a, o) {
2963
+ var h, u, l, f, c, d, p, m, _, g = o.bits, b = 0, v = 0, y = 0, w = 0, k = 0, x = 0, S = 0, z = 0, C = 0, E = 0, A = null, I = 0, O = new D.Buf16(16), B = new D.Buf16(16), R = null, T = 0;
2964
+ for(b = 0; b <= 15; b++)O[b] = 0;
2965
+ for(v = 0; v < n; v++)O[t[r + v]]++;
2966
+ for(k = g, w = 15; 1 <= w && 0 === O[w]; w--);
2967
+ if (w < k && (k = w), 0 === w) return i[s++] = 20971520, i[s++] = 20971520, o.bits = 1, 0;
2968
+ for(y = 1; y < w && 0 === O[y]; y++);
2969
+ for(k < y && (k = y), b = z = 1; b <= 15; b++)if (z <<= 1, (z -= O[b]) < 0) return -1;
2970
+ if (0 < z && (0 === e || 1 !== w)) return -1;
2971
+ for(B[1] = 0, b = 1; b < 15; b++)B[b + 1] = B[b] + O[b];
2972
+ for(v = 0; v < n; v++)0 !== t[r + v] && (a[B[t[r + v]]++] = v);
2973
+ if (d = 0 === e ? (A = R = a, 19) : 1 === e ? (A = F, I -= 257, R = N, T -= 257, 256) : (A = U, R = P, -1), b = y, c = s, S = v = E = 0, l = -1, f = (C = 1 << (x = k)) - 1, 1 === e && 852 < C || 2 === e && 592 < C) return 1;
2974
+ for(;;){
2975
+ for(p = b - S, _ = a[v] < d ? (m = 0, a[v]) : a[v] > d ? (m = R[T + a[v]], A[I + a[v]]) : (m = 96, 0), h = 1 << b - S, y = u = 1 << x; i[c + (E >> S) + (u -= h)] = p << 24 | m << 16 | _, 0 !== u;);
2976
+ for(h = 1 << b - 1; E & h;)h >>= 1;
2977
+ if (0 !== h ? (E &= h - 1, E += h) : E = 0, v++, 0 == --O[b]) {
2978
+ if (b === w) break;
2979
+ b = t[r + a[v]];
2980
+ }
2981
+ if (k < b && (E & f) !== l) {
2982
+ for(0 === S && (S = k), c += y, z = 1 << (x = b - S); x + S < w && !((z -= O[x + S]) <= 0);)x++, z <<= 1;
2983
+ if (C += 1 << x, 1 === e && 852 < C || 2 === e && 592 < C) return 1;
2984
+ i[l = E & f] = k << 24 | x << 16 | c - s;
2985
+ }
2986
+ }
2987
+ return 0 !== E && (i[c + E] = b - S << 24 | 4194304), o.bits = k, 0;
2988
+ };
2989
+ },
2990
+ {
2991
+ "../utils/common": 41
2992
+ }
2993
+ ],
2994
+ 51: [
2995
+ function(e, t, r) {
2996
+ "use strict";
2997
+ t.exports = {
2998
+ 2: "need dictionary",
2999
+ 1: "stream end",
3000
+ 0: "",
3001
+ "-1": "file error",
3002
+ "-2": "stream error",
3003
+ "-3": "data error",
3004
+ "-4": "insufficient memory",
3005
+ "-5": "buffer error",
3006
+ "-6": "incompatible version"
3007
+ };
3008
+ },
3009
+ {}
3010
+ ],
3011
+ 52: [
3012
+ function(e, t, r) {
3013
+ "use strict";
3014
+ var i = e("../utils/common"), o = 0, h = 1;
3015
+ function n(e) {
3016
+ for(var t = e.length; 0 <= --t;)e[t] = 0;
3017
+ }
3018
+ var s = 0, a = 29, u = 256, l = u + 1 + a, f = 30, c = 19, _ = 2 * l + 1, g = 15, d = 16, p = 7, m = 256, b = 16, v = 17, y = 18, w = [
3019
+ 0,
3020
+ 0,
3021
+ 0,
3022
+ 0,
3023
+ 0,
3024
+ 0,
3025
+ 0,
3026
+ 0,
3027
+ 1,
3028
+ 1,
3029
+ 1,
3030
+ 1,
3031
+ 2,
3032
+ 2,
3033
+ 2,
3034
+ 2,
3035
+ 3,
3036
+ 3,
3037
+ 3,
3038
+ 3,
3039
+ 4,
3040
+ 4,
3041
+ 4,
3042
+ 4,
3043
+ 5,
3044
+ 5,
3045
+ 5,
3046
+ 5,
3047
+ 0
3048
+ ], k = [
3049
+ 0,
3050
+ 0,
3051
+ 0,
3052
+ 0,
3053
+ 1,
3054
+ 1,
3055
+ 2,
3056
+ 2,
3057
+ 3,
3058
+ 3,
3059
+ 4,
3060
+ 4,
3061
+ 5,
3062
+ 5,
3063
+ 6,
3064
+ 6,
3065
+ 7,
3066
+ 7,
3067
+ 8,
3068
+ 8,
3069
+ 9,
3070
+ 9,
3071
+ 10,
3072
+ 10,
3073
+ 11,
3074
+ 11,
3075
+ 12,
3076
+ 12,
3077
+ 13,
3078
+ 13
3079
+ ], x = [
3080
+ 0,
3081
+ 0,
3082
+ 0,
3083
+ 0,
3084
+ 0,
3085
+ 0,
3086
+ 0,
3087
+ 0,
3088
+ 0,
3089
+ 0,
3090
+ 0,
3091
+ 0,
3092
+ 0,
3093
+ 0,
3094
+ 0,
3095
+ 0,
3096
+ 2,
3097
+ 3,
3098
+ 7
3099
+ ], S = [
3100
+ 16,
3101
+ 17,
3102
+ 18,
3103
+ 0,
3104
+ 8,
3105
+ 7,
3106
+ 9,
3107
+ 6,
3108
+ 10,
3109
+ 5,
3110
+ 11,
3111
+ 4,
3112
+ 12,
3113
+ 3,
3114
+ 13,
3115
+ 2,
3116
+ 14,
3117
+ 1,
3118
+ 15
3119
+ ], z = new Array(2 * (l + 2));
3120
+ n(z);
3121
+ var C = new Array(2 * f);
3122
+ n(C);
3123
+ var E = new Array(512);
3124
+ n(E);
3125
+ var A = new Array(256);
3126
+ n(A);
3127
+ var I = new Array(a);
3128
+ n(I);
3129
+ var O, B, R, T = new Array(f);
3130
+ function D(e, t, r, n, i) {
3131
+ this.static_tree = e, this.extra_bits = t, this.extra_base = r, this.elems = n, this.max_length = i, this.has_stree = e && e.length;
3132
+ }
3133
+ function F(e, t) {
3134
+ this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
3135
+ }
3136
+ function N(e) {
3137
+ return e < 256 ? E[e] : E[256 + (e >>> 7)];
3138
+ }
3139
+ function U(e, t) {
3140
+ e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
3141
+ }
3142
+ function P(e, t, r) {
3143
+ e.bi_valid > d - r ? (e.bi_buf |= t << e.bi_valid & 65535, U(e, e.bi_buf), e.bi_buf = t >> d - e.bi_valid, e.bi_valid += r - d) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += r);
3144
+ }
3145
+ function L(e, t, r) {
3146
+ P(e, r[2 * t], r[2 * t + 1]);
3147
+ }
3148
+ function j(e, t) {
3149
+ for(var r = 0; r |= 1 & e, e >>>= 1, r <<= 1, 0 < --t;);
3150
+ return r >>> 1;
3151
+ }
3152
+ function Z(e, t, r) {
3153
+ var n, i, s = new Array(g + 1), a = 0;
3154
+ for(n = 1; n <= g; n++)s[n] = a = a + r[n - 1] << 1;
3155
+ for(i = 0; i <= t; i++){
3156
+ var o = e[2 * i + 1];
3157
+ 0 !== o && (e[2 * i] = j(s[o]++, o));
3158
+ }
3159
+ }
3160
+ function W(e) {
3161
+ var t;
3162
+ for(t = 0; t < l; t++)e.dyn_ltree[2 * t] = 0;
3163
+ for(t = 0; t < f; t++)e.dyn_dtree[2 * t] = 0;
3164
+ for(t = 0; t < c; t++)e.bl_tree[2 * t] = 0;
3165
+ e.dyn_ltree[2 * m] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
3166
+ }
3167
+ function M(e) {
3168
+ 8 < e.bi_valid ? U(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
3169
+ }
3170
+ function H(e, t, r, n) {
3171
+ var i = 2 * t, s = 2 * r;
3172
+ return e[i] < e[s] || e[i] === e[s] && n[t] <= n[r];
3173
+ }
3174
+ function G(e, t, r) {
3175
+ for(var n = e.heap[r], i = r << 1; i <= e.heap_len && (i < e.heap_len && H(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !H(t, n, e.heap[i], e.depth));)e.heap[r] = e.heap[i], r = i, i <<= 1;
3176
+ e.heap[r] = n;
3177
+ }
3178
+ function K(e, t, r) {
3179
+ var n, i, s, a, o = 0;
3180
+ if (0 !== e.last_lit) for(; n = e.pending_buf[e.d_buf + 2 * o] << 8 | e.pending_buf[e.d_buf + 2 * o + 1], i = e.pending_buf[e.l_buf + o], o++, 0 === n ? L(e, i, t) : (L(e, (s = A[i]) + u + 1, t), 0 !== (a = w[s]) && P(e, i -= I[s], a), L(e, s = N(--n), r), 0 !== (a = k[s]) && P(e, n -= T[s], a)), o < e.last_lit;);
3181
+ L(e, m, t);
3182
+ }
3183
+ function Y(e, t) {
3184
+ var r, n, i, s = t.dyn_tree, a = t.stat_desc.static_tree, o = t.stat_desc.has_stree, h = t.stat_desc.elems, u = -1;
3185
+ for(e.heap_len = 0, e.heap_max = _, r = 0; r < h; r++)0 !== s[2 * r] ? (e.heap[++e.heap_len] = u = r, e.depth[r] = 0) : s[2 * r + 1] = 0;
3186
+ for(; e.heap_len < 2;)s[2 * (i = e.heap[++e.heap_len] = u < 2 ? ++u : 0)] = 1, e.depth[i] = 0, e.opt_len--, o && (e.static_len -= a[2 * i + 1]);
3187
+ for(t.max_code = u, r = e.heap_len >> 1; 1 <= r; r--)G(e, s, r);
3188
+ for(i = h; r = e.heap[1], e.heap[1] = e.heap[e.heap_len--], G(e, s, 1), n = e.heap[1], e.heap[--e.heap_max] = r, e.heap[--e.heap_max] = n, s[2 * i] = s[2 * r] + s[2 * n], e.depth[i] = (e.depth[r] >= e.depth[n] ? e.depth[r] : e.depth[n]) + 1, s[2 * r + 1] = s[2 * n + 1] = i, e.heap[1] = i++, G(e, s, 1), 2 <= e.heap_len;);
3189
+ e.heap[--e.heap_max] = e.heap[1], function(e, t) {
3190
+ var r, n, i, s, a, o, h = t.dyn_tree, u = t.max_code, l = t.stat_desc.static_tree, f = t.stat_desc.has_stree, c = t.stat_desc.extra_bits, d = t.stat_desc.extra_base, p = t.stat_desc.max_length, m = 0;
3191
+ for(s = 0; s <= g; s++)e.bl_count[s] = 0;
3192
+ for(h[2 * e.heap[e.heap_max] + 1] = 0, r = e.heap_max + 1; r < _; r++)p < (s = h[2 * h[2 * (n = e.heap[r]) + 1] + 1] + 1) && (s = p, m++), h[2 * n + 1] = s, u < n || (e.bl_count[s]++, a = 0, d <= n && (a = c[n - d]), o = h[2 * n], e.opt_len += o * (s + a), f && (e.static_len += o * (l[2 * n + 1] + a)));
3193
+ if (0 !== m) {
3194
+ do {
3195
+ for(s = p - 1; 0 === e.bl_count[s];)s--;
3196
+ e.bl_count[s]--, e.bl_count[s + 1] += 2, e.bl_count[p]--, m -= 2;
3197
+ }while (0 < m)
3198
+ for(s = p; 0 !== s; s--)for(n = e.bl_count[s]; 0 !== n;)u < (i = e.heap[--r]) || (h[2 * i + 1] !== s && (e.opt_len += (s - h[2 * i + 1]) * h[2 * i], h[2 * i + 1] = s), n--);
3199
+ }
3200
+ }(e, t), Z(s, u, e.bl_count);
3201
+ }
3202
+ function X(e, t, r) {
3203
+ var n, i, s = -1, a = t[1], o = 0, h = 7, u = 4;
3204
+ for(0 === a && (h = 138, u = 3), t[2 * (r + 1) + 1] = 65535, n = 0; n <= r; n++)i = a, a = t[2 * (n + 1) + 1], ++o < h && i === a || (o < u ? e.bl_tree[2 * i] += o : 0 !== i ? (i !== s && e.bl_tree[2 * i]++, e.bl_tree[2 * b]++) : o <= 10 ? e.bl_tree[2 * v]++ : e.bl_tree[2 * y]++, s = i, u = (o = 0) === a ? (h = 138, 3) : i === a ? (h = 6, 3) : (h = 7, 4));
3205
+ }
3206
+ function V(e, t, r) {
3207
+ var n, i, s = -1, a = t[1], o = 0, h = 7, u = 4;
3208
+ for(0 === a && (h = 138, u = 3), n = 0; n <= r; n++)if (i = a, a = t[2 * (n + 1) + 1], !(++o < h && i === a)) {
3209
+ if (o < u) for(; L(e, i, e.bl_tree), 0 != --o;);
3210
+ else 0 !== i ? (i !== s && (L(e, i, e.bl_tree), o--), L(e, b, e.bl_tree), P(e, o - 3, 2)) : o <= 10 ? (L(e, v, e.bl_tree), P(e, o - 3, 3)) : (L(e, y, e.bl_tree), P(e, o - 11, 7));
3211
+ s = i, u = (o = 0) === a ? (h = 138, 3) : i === a ? (h = 6, 3) : (h = 7, 4);
3212
+ }
3213
+ }
3214
+ n(T);
3215
+ var q = !1;
3216
+ function J(e, t, r, n) {
3217
+ P(e, (s << 1) + (n ? 1 : 0), 3), function(e, t, r, n) {
3218
+ M(e), n && (U(e, r), U(e, ~r)), i.arraySet(e.pending_buf, e.window, t, r, e.pending), e.pending += r;
3219
+ }(e, t, r, !0);
3220
+ }
3221
+ r._tr_init = function(e) {
3222
+ q || (function() {
3223
+ var e, t, r, n, i, s = new Array(g + 1);
3224
+ for(n = r = 0; n < a - 1; n++)for(I[n] = r, e = 0; e < 1 << w[n]; e++)A[r++] = n;
3225
+ for(A[r - 1] = n, n = i = 0; n < 16; n++)for(T[n] = i, e = 0; e < 1 << k[n]; e++)E[i++] = n;
3226
+ for(i >>= 7; n < f; n++)for(T[n] = i << 7, e = 0; e < 1 << k[n] - 7; e++)E[256 + i++] = n;
3227
+ for(t = 0; t <= g; t++)s[t] = 0;
3228
+ for(e = 0; e <= 143;)z[2 * e + 1] = 8, e++, s[8]++;
3229
+ for(; e <= 255;)z[2 * e + 1] = 9, e++, s[9]++;
3230
+ for(; e <= 279;)z[2 * e + 1] = 7, e++, s[7]++;
3231
+ for(; e <= 287;)z[2 * e + 1] = 8, e++, s[8]++;
3232
+ for(Z(z, l + 1, s), e = 0; e < f; e++)C[2 * e + 1] = 5, C[2 * e] = j(e, 5);
3233
+ O = new D(z, w, u + 1, l, g), B = new D(C, k, 0, f, g), R = new D(new Array(0), x, 0, c, p);
3234
+ }(), q = !0), e.l_desc = new F(e.dyn_ltree, O), e.d_desc = new F(e.dyn_dtree, B), e.bl_desc = new F(e.bl_tree, R), e.bi_buf = 0, e.bi_valid = 0, W(e);
3235
+ }, r._tr_stored_block = J, r._tr_flush_block = function(e, t, r, n) {
3236
+ var i, s, a = 0;
3237
+ 0 < e.level ? (2 === e.strm.data_type && (e.strm.data_type = function(e) {
3238
+ var t, r = 4093624447;
3239
+ for(t = 0; t <= 31; t++, r >>>= 1)if (1 & r && 0 !== e.dyn_ltree[2 * t]) return o;
3240
+ if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return h;
3241
+ for(t = 32; t < u; t++)if (0 !== e.dyn_ltree[2 * t]) return h;
3242
+ return o;
3243
+ }(e)), Y(e, e.l_desc), Y(e, e.d_desc), a = function(e) {
3244
+ var t;
3245
+ for(X(e, e.dyn_ltree, e.l_desc.max_code), X(e, e.dyn_dtree, e.d_desc.max_code), Y(e, e.bl_desc), t = c - 1; 3 <= t && 0 === e.bl_tree[2 * S[t] + 1]; t--);
3246
+ return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
3247
+ }(e), i = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= i && (i = s)) : i = s = r + 5, r + 4 <= i && -1 !== t ? J(e, t, r, n) : 4 === e.strategy || s === i ? (P(e, 2 + (n ? 1 : 0), 3), K(e, z, C)) : (P(e, 4 + (n ? 1 : 0), 3), function(e, t, r, n) {
3248
+ var i;
3249
+ for(P(e, t - 257, 5), P(e, r - 1, 5), P(e, n - 4, 4), i = 0; i < n; i++)P(e, e.bl_tree[2 * S[i] + 1], 3);
3250
+ V(e, e.dyn_ltree, t - 1), V(e, e.dyn_dtree, r - 1);
3251
+ }(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, a + 1), K(e, e.dyn_ltree, e.dyn_dtree)), W(e), n && M(e);
3252
+ }, r._tr_tally = function(e, t, r) {
3253
+ return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & r, e.last_lit++, 0 === t ? e.dyn_ltree[2 * r]++ : (e.matches++, t--, e.dyn_ltree[2 * (A[r] + u + 1)]++, e.dyn_dtree[2 * N(t)]++), e.last_lit === e.lit_bufsize - 1;
3254
+ }, r._tr_align = function(e) {
3255
+ P(e, 2, 3), L(e, m, z), function(e) {
3256
+ 16 === e.bi_valid ? (U(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
3257
+ }(e);
3258
+ };
3259
+ },
3260
+ {
3261
+ "../utils/common": 41
3262
+ }
3263
+ ],
3264
+ 53: [
3265
+ function(e, t, r) {
3266
+ "use strict";
3267
+ t.exports = function() {
3268
+ 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;
3269
+ };
3270
+ },
3271
+ {}
3272
+ ],
3273
+ 54: [
3274
+ function(e, t, r) {
3275
+ (function(e) {
3276
+ !function(r, n) {
3277
+ "use strict";
3278
+ if (!r.setImmediate) {
3279
+ var i, s, t, a, o = 1, h = {}, u = !1, l = r.document, e = Object.getPrototypeOf && Object.getPrototypeOf(r);
3280
+ e = e && e.setTimeout ? e : r, i = "[object process]" === ({}).toString.call(r.process) ? function(e) {
3281
+ process.nextTick(function() {
3282
+ c(e);
3283
+ });
3284
+ } : function() {
3285
+ if (r.postMessage && !r.importScripts) {
3286
+ var e = !0, t = r.onmessage;
3287
+ return r.onmessage = function() {
3288
+ e = !1;
3289
+ }, r.postMessage("", "*"), r.onmessage = t, e;
3290
+ }
3291
+ }() ? (a = "setImmediate$" + Math.random() + "$", r.addEventListener ? r.addEventListener("message", d, !1) : r.attachEvent("onmessage", d), function(e) {
3292
+ r.postMessage(a + e, "*");
3293
+ }) : r.MessageChannel ? ((t = new MessageChannel).port1.onmessage = function(e) {
3294
+ c(e.data);
3295
+ }, function(e) {
3296
+ t.port2.postMessage(e);
3297
+ }) : l && "onreadystatechange" in l.createElement("script") ? (s = l.documentElement, function(e) {
3298
+ var t = l.createElement("script");
3299
+ t.onreadystatechange = function() {
3300
+ c(e), t.onreadystatechange = null, s.removeChild(t), t = null;
3301
+ }, s.appendChild(t);
3302
+ }) : function(e) {
3303
+ setTimeout(c, 0, e);
3304
+ }, e.setImmediate = function(e) {
3305
+ "function" != typeof e && (e = new Function("" + e));
3306
+ for(var t = new Array(arguments.length - 1), r = 0; r < t.length; r++)t[r] = arguments[r + 1];
3307
+ var n = {
3308
+ callback: e,
3309
+ args: t
3310
+ };
3311
+ return h[o] = n, i(o), o++;
3312
+ }, e.clearImmediate = f;
3313
+ }
3314
+ function f(e) {
3315
+ delete h[e];
3316
+ }
3317
+ function c(e) {
3318
+ if (u) setTimeout(c, 0, e);
3319
+ else {
3320
+ var t = h[e];
3321
+ if (t) {
3322
+ u = !0;
3323
+ try {
3324
+ !function(e) {
3325
+ var t = e.callback, r = e.args;
3326
+ switch(r.length){
3327
+ case 0:
3328
+ t();
3329
+ break;
3330
+ case 1:
3331
+ t(r[0]);
3332
+ break;
3333
+ case 2:
3334
+ t(r[0], r[1]);
3335
+ break;
3336
+ case 3:
3337
+ t(r[0], r[1], r[2]);
3338
+ break;
3339
+ default:
3340
+ t.apply(n, r);
3341
+ }
3342
+ }(t);
3343
+ } finally{
3344
+ f(e), u = !1;
3345
+ }
3346
+ }
3347
+ }
3348
+ }
3349
+ function d(e) {
3350
+ e.source === r && "string" == typeof e.data && 0 === e.data.indexOf(a) && c(+e.data.slice(a.length));
3351
+ }
3352
+ }("u" < typeof self ? void 0 === e ? this : e : self);
3353
+ }).call(this, void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof self ? self : "u" > typeof window ? window : {});
3354
+ },
3355
+ {}
3356
+ ]
3357
+ }, {}, [
3358
+ 10
3359
+ ])(10);
3360
+ });
3361
+ },
3362
+ 363 (module) {
3363
+ function __rspack_empty_context(req) {
3364
+ var e = new Error("Cannot find module '" + req + "'");
3365
+ e.code = 'MODULE_NOT_FOUND';
3366
+ throw e;
3367
+ }
3368
+ __rspack_empty_context.keys = ()=>[];
3369
+ __rspack_empty_context.resolve = __rspack_empty_context;
3370
+ __rspack_empty_context.id = 363;
3371
+ module.exports = __rspack_empty_context;
3372
+ }
3373
+ };
3374
+ var __webpack_module_cache__ = {};
3375
+ function __webpack_require__(moduleId) {
3376
+ var cachedModule = __webpack_module_cache__[moduleId];
3377
+ if (void 0 !== cachedModule) return cachedModule.exports;
3378
+ var module = __webpack_module_cache__[moduleId] = {
3379
+ exports: {}
3380
+ };
3381
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3382
+ return module.exports;
3383
+ }
3384
+ (()=>{
3385
+ __webpack_require__.n = (module)=>{
3386
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
3387
+ __webpack_require__.d(getter, {
3388
+ a: getter
3389
+ });
3390
+ return getter;
3391
+ };
3392
+ })();
3393
+ (()=>{
3394
+ __webpack_require__.d = (exports, getters, values)=>{
3395
+ var define = (defs, kind)=>{
3396
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
3397
+ enumerable: true,
3398
+ [kind]: defs[key]
3399
+ });
3400
+ };
3401
+ define(getters, "get");
3402
+ define(values, "value");
3403
+ };
3404
+ })();
3405
+ (()=>{
3406
+ __webpack_require__.g = (()=>{
3407
+ if ('object' == typeof globalThis) return globalThis;
3408
+ try {
3409
+ return this || new Function('return this')();
3410
+ } catch (e) {
3411
+ if ('object' == typeof window) return window;
3412
+ }
3413
+ })();
3414
+ })();
3415
+ (()=>{
3416
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
3417
+ })();
3418
+ (()=>{
3419
+ var jszip_min = __webpack_require__(710);
3420
+ var jszip_min_default = /*#__PURE__*/ __webpack_require__.n(jszip_min);
3421
+ function decodeXmlBytes(bytes, label) {
3422
+ let encoding = 'utf-8';
3423
+ let offset = 0;
3424
+ if (0xef === bytes[0] && 0xbb === bytes[1] && 0xbf === bytes[2]) offset = 3;
3425
+ else if (0xff === bytes[0] && 0xfe === bytes[1]) {
3426
+ encoding = 'utf-16le';
3427
+ offset = 2;
3428
+ } else if (0xfe === bytes[0] && 0xff === bytes[1]) {
3429
+ encoding = 'utf-16be';
3430
+ offset = 2;
3431
+ } else if (0x3c === bytes[0] && 0 === bytes[1] && 0x3f === bytes[2] && 0 === bytes[3]) encoding = 'utf-16le';
3432
+ else if (0 === bytes[0] && 0x3c === bytes[1] && 0 === bytes[2] && 0x3f === bytes[3]) encoding = 'utf-16be';
3433
+ try {
3434
+ return new TextDecoder(encoding, {
3435
+ fatal: true
3436
+ }).decode(bytes.subarray(offset));
3437
+ } catch {
3438
+ throw new Error(`${label} uses an invalid ${encoding} XML encoding.`);
3439
+ }
3440
+ }
3441
+ const CONTENT_TYPES_NAMESPACE = 'http://schemas.openxmlformats.org/package/2006/content-types';
3442
+ const PACKAGE_RELATIONSHIPS_NAMESPACE = 'http://schemas.openxmlformats.org/package/2006/relationships';
3443
+ const SPREADSHEET_NAMESPACE = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main';
3444
+ const OFFICE_RELATIONSHIPS_NAMESPACE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships';
3445
+ const OFFICE_DOCUMENT_RELATIONSHIP = `${OFFICE_RELATIONSHIPS_NAMESPACE}/officeDocument`;
3446
+ const WORKSHEET_RELATIONSHIP = `${OFFICE_RELATIONSHIPS_NAMESPACE}/worksheet`;
3447
+ const WORKBOOK_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml';
3448
+ const WORKSHEET_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml';
3449
+ const RELATIONSHIPS_CONTENT_TYPE = 'application/vnd.openxmlformats-package.relationships+xml';
3450
+ const MAX_XLSX_COLUMN = 16383;
3451
+ const MAX_XLSX_ROW = 1048575;
3452
+ const PLAIN_XLSX_COLUMN_BITS = 14;
3453
+ const PLAIN_XLSX_CELL_CHUNK_SIZE = 4096;
3454
+ const PLAIN_XLSX_ROW_CHUNK_SIZE = 256;
3455
+ const PLAIN_XLSX_CELL_NUMBER = 0;
3456
+ const PLAIN_XLSX_CELL_BOOLEAN = 1;
3457
+ const PLAIN_XLSX_CELL_ERROR = 2;
3458
+ const PLAIN_XLSX_CELL_TEXT = 3;
3459
+ function createPlainXlsxWorkbookPlan(parts) {
3460
+ const sheets = parseWorkbookSheets(parts.workbook);
3461
+ if (!sheets?.length) return null;
3462
+ const relationships = parseRelationships(parts.workbookRelationships);
3463
+ if (!relationships || relationships.length !== sheets.length) return null;
3464
+ const rootRelationships = parseRelationships(parts.rootRelationships);
3465
+ if (!rootRelationships || 1 !== rootRelationships.length || rootRelationships[0]?.Type !== OFFICE_DOCUMENT_RELATIONSHIP || rootRelationships[0]?.Target !== 'xl/workbook.xml' || rootRelationships[0]?.TargetMode !== void 0) return null;
3466
+ const relationshipById = new Map(relationships.map((relationship)=>[
3467
+ relationship.Id,
3468
+ relationship
3469
+ ]));
3470
+ if (relationshipById.size !== relationships.length) return null;
3471
+ const plannedSheets = [];
3472
+ for (const sheet of sheets){
3473
+ const relationship = relationshipById.get(sheet.relationshipId);
3474
+ if (!relationship || relationship.Type !== WORKSHEET_RELATIONSHIP || void 0 !== relationship.TargetMode) return null;
3475
+ const partPath = plainWorksheetPartPath(relationship.Target);
3476
+ if (!partPath) return null;
3477
+ plannedSheets.push({
3478
+ name: sheet.name,
3479
+ partPath
3480
+ });
3481
+ }
3482
+ if (new Set(plannedSheets.map((sheet)=>sheet.partPath)).size !== sheets.length) return null;
3483
+ const expectedPaths = new Set([
3484
+ '[Content_Types].xml',
3485
+ '_rels/.rels',
3486
+ 'xl/workbook.xml',
3487
+ 'xl/_rels/workbook.xml.rels',
3488
+ ...plannedSheets.map((sheet)=>sheet.partPath)
3489
+ ]);
3490
+ if (!sameStringSet(parts.packagePaths, expectedPaths)) return null;
3491
+ if (!validPlainContentTypes(parts.contentTypes, plannedSheets)) return null;
3492
+ const sheetNames = sheets.map((sheet)=>sheet.name);
3493
+ return {
3494
+ sheets: plannedSheets,
3495
+ workbook: {
3496
+ Custprops: {},
3497
+ Props: {
3498
+ SheetNames: sheetNames,
3499
+ Worksheets: sheets.length
3500
+ },
3501
+ SheetNames: sheetNames,
3502
+ Workbook: {
3503
+ Names: [],
3504
+ Sheets: sheets.map((sheet)=>({
3505
+ Hidden: sheet.hidden,
3506
+ id: sheet.relationshipId,
3507
+ name: sheet.name,
3508
+ sheetId: sheet.sheetId,
3509
+ sheetid: sheet.sheetId
3510
+ }))
3511
+ }
3512
+ }
3513
+ };
3514
+ }
3515
+ function streamPlainXlsxWorksheet(source, visit, start) {
3516
+ let cursor = xmlBodyStart(source);
3517
+ const worksheetOpen = `<worksheet xmlns="${SPREADSHEET_NAMESPACE}">`;
3518
+ if (!source.startsWith(worksheetOpen, cursor)) return null;
3519
+ cursor = skipXmlWhitespace(source, cursor + worksheetOpen.length);
3520
+ const dimensionPrefix = '<dimension ref="';
3521
+ if (!source.startsWith(dimensionPrefix, cursor)) return null;
3522
+ const dimensionEnd = source.indexOf('"/>', cursor + dimensionPrefix.length);
3523
+ if (dimensionEnd < 0) return null;
3524
+ const reference = source.slice(cursor + dimensionPrefix.length, dimensionEnd);
3525
+ const range = decodePlainRange(reference);
3526
+ if (!range) return null;
3527
+ cursor = skipXmlWhitespace(source, dimensionEnd + 3);
3528
+ if (!source.startsWith('<sheetData>', cursor)) return null;
3529
+ cursor += 11;
3530
+ start?.({
3531
+ columnCount: range.end.column + 1,
3532
+ rowCount: range.end.row + 1
3533
+ });
3534
+ let chunkCoordinates = [];
3535
+ let chunkKinds = [];
3536
+ let chunkNumericValues = [];
3537
+ let chunkTextValues = [];
3538
+ let chunkStart = -1;
3539
+ let lastRow = -1;
3540
+ let populatedCellCount = 0;
3541
+ const flush = ()=>{
3542
+ if (chunkStart < 0 || !chunkCoordinates.length) return;
3543
+ visit({
3544
+ coordinates: Uint32Array.from(chunkCoordinates),
3545
+ kinds: Uint8Array.from(chunkKinds),
3546
+ numericValues: Float64Array.from(chunkNumericValues),
3547
+ startRow: chunkStart,
3548
+ textValues: chunkTextValues
3549
+ });
3550
+ chunkCoordinates = [];
3551
+ chunkKinds = [];
3552
+ chunkNumericValues = [];
3553
+ chunkTextValues = [];
3554
+ chunkStart = -1;
3555
+ };
3556
+ while(true){
3557
+ cursor = skipXmlWhitespace(source, cursor);
3558
+ if (source.startsWith('</sheetData>', cursor)) {
3559
+ cursor += 12;
3560
+ break;
3561
+ }
3562
+ const rowStart = readExactPositiveInteger(source, cursor, '<row r="', '">', MAX_XLSX_ROW + 1);
3563
+ if (!rowStart) return null;
3564
+ const row = rowStart.value - 1;
3565
+ if (row <= lastRow || row > MAX_XLSX_ROW || row < range.start.row || row > range.end.row) return null;
3566
+ cursor = rowStart.end;
3567
+ const nextChunkStart = Math.floor(row / PLAIN_XLSX_ROW_CHUNK_SIZE) * PLAIN_XLSX_ROW_CHUNK_SIZE;
3568
+ if (chunkStart !== nextChunkStart) {
3569
+ flush();
3570
+ chunkStart = nextChunkStart;
3571
+ }
3572
+ let lastColumn = -1;
3573
+ let rowCellCount = 0;
3574
+ while(true){
3575
+ cursor = skipXmlWhitespace(source, cursor);
3576
+ if (source.startsWith('</row>', cursor)) {
3577
+ cursor += 6;
3578
+ break;
3579
+ }
3580
+ if (!source.startsWith('<c r="', cursor)) return null;
3581
+ const addressStart = cursor + 6;
3582
+ const addressEnd = source.indexOf('"', addressStart);
3583
+ if (addressEnd < 0) return null;
3584
+ const column = decodePlainCellColumnForRow(source, addressStart, addressEnd, row);
3585
+ if (null === column || column <= lastColumn || column < range.start.column || column > range.end.column) return null;
3586
+ const cell = readPlainCell(source, addressEnd + 1);
3587
+ if (!cell) return null;
3588
+ if (chunkCoordinates.length >= PLAIN_XLSX_CELL_CHUNK_SIZE) {
3589
+ flush();
3590
+ chunkStart = nextChunkStart;
3591
+ }
3592
+ chunkCoordinates.push(row - chunkStart << PLAIN_XLSX_COLUMN_BITS | column);
3593
+ chunkKinds.push(cell.kind);
3594
+ if (cell.kind === PLAIN_XLSX_CELL_TEXT) chunkTextValues.push(cell.textValue);
3595
+ else chunkNumericValues.push(cell.numericValue);
3596
+ cursor = cell.end;
3597
+ lastColumn = column;
3598
+ rowCellCount += 1;
3599
+ }
3600
+ if (!rowCellCount) return null;
3601
+ populatedCellCount += rowCellCount;
3602
+ lastRow = row;
3603
+ }
3604
+ cursor = skipXmlWhitespace(source, cursor);
3605
+ if (!source.startsWith('</worksheet>', cursor)) return null;
3606
+ cursor = skipXmlWhitespace(source, cursor + 12);
3607
+ if (cursor !== source.length || 0 === populatedCellCount) return null;
3608
+ flush();
3609
+ return {
3610
+ columnCount: range.end.column + 1,
3611
+ populatedCellCount,
3612
+ properties: {
3613
+ '!ref': reference
3614
+ },
3615
+ rowCount: Math.max(lastRow + 1, range.end.row + 1)
3616
+ };
3617
+ }
3618
+ function readPlainCell(source, cursor) {
3619
+ if (source.startsWith('>', cursor)) {
3620
+ const value = readElementText(source, cursor + 1, '<v>', '</v></c>');
3621
+ if (!value || !PLAIN_NUMBER.test(value.text)) return null;
3622
+ const number = Number(value.text);
3623
+ return Number.isFinite(number) ? {
3624
+ end: value.end,
3625
+ kind: PLAIN_XLSX_CELL_NUMBER,
3626
+ numericValue: number
3627
+ } : null;
3628
+ }
3629
+ if (source.startsWith(' t="inlineStr">', cursor)) {
3630
+ const contentStart = cursor + 15;
3631
+ const textPrefix = source.startsWith('<is><t>', contentStart) ? '<is><t>' : source.startsWith('<is><t xml:space="preserve">', contentStart) ? '<is><t xml:space="preserve">' : null;
3632
+ if (!textPrefix) return null;
3633
+ const value = readElementText(source, contentStart, textPrefix, '</t></is></c>');
3634
+ if (!value) return null;
3635
+ const text = decodeStrictXmlText(value.text);
3636
+ return null === text ? null : {
3637
+ end: value.end,
3638
+ kind: PLAIN_XLSX_CELL_TEXT,
3639
+ textValue: text
3640
+ };
3641
+ }
3642
+ if (source.startsWith(' t="b">', cursor)) {
3643
+ const value = readElementText(source, cursor + 7, '<v>', '</v></c>');
3644
+ if (!value || '0' !== value.text && '1' !== value.text) return null;
3645
+ return {
3646
+ end: value.end,
3647
+ kind: PLAIN_XLSX_CELL_BOOLEAN,
3648
+ numericValue: '1' === value.text ? 1 : 0
3649
+ };
3650
+ }
3651
+ if (source.startsWith(' t="e">', cursor)) {
3652
+ const value = readElementText(source, cursor + 7, '<v>', '</v></c>');
3653
+ if (!value) return null;
3654
+ const error = XLSX_ERROR_VALUES[value.text];
3655
+ return void 0 === error ? null : {
3656
+ end: value.end,
3657
+ kind: PLAIN_XLSX_CELL_ERROR,
3658
+ numericValue: error
3659
+ };
3660
+ }
3661
+ return null;
3662
+ }
3663
+ const PLAIN_NUMBER = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?$/;
3664
+ const XLSX_ERROR_VALUES = {
3665
+ '#NULL!': 0x00,
3666
+ '#DIV/0!': 0x07,
3667
+ '#VALUE!': 0x0f,
3668
+ '#REF!': 0x17,
3669
+ '#NAME?': 0x1d,
3670
+ '#NUM!': 0x24,
3671
+ '#N/A': 0x2a,
3672
+ '#GETTING_DATA': 0x2b
3673
+ };
3674
+ function readElementText(source, cursor, opening, closing) {
3675
+ if (!source.startsWith(opening, cursor)) return null;
3676
+ const start = cursor + opening.length;
3677
+ const end = source.indexOf(closing, start);
3678
+ return end < 0 ? null : {
3679
+ end: end + closing.length,
3680
+ text: source.slice(start, end)
3681
+ };
3682
+ }
3683
+ function parseWorkbookSheets(source) {
3684
+ const workbook = rootContent(source, 'workbook', {
3685
+ xmlns: SPREADSHEET_NAMESPACE,
3686
+ 'xmlns:r': OFFICE_RELATIONSHIPS_NAMESPACE
3687
+ });
3688
+ if (null === workbook) return null;
3689
+ const sheetsSource = rootContent(workbook, 'sheets', {});
3690
+ if (null === sheetsSource) return null;
3691
+ const tags = emptyChildTags(sheetsSource, 'sheet');
3692
+ if (!tags?.length) return null;
3693
+ const names = new Set();
3694
+ const relationshipIds = new Set();
3695
+ const sheetIds = new Set();
3696
+ const sheets = [];
3697
+ for (const tag of tags){
3698
+ if (!hasOnlyKeys(tag.attributes, [
3699
+ 'name',
3700
+ 'sheetId',
3701
+ 'r:id',
3702
+ 'state'
3703
+ ])) return null;
3704
+ const name = tag.attributes.name;
3705
+ const relationshipId = tag.attributes['r:id'];
3706
+ const sheetId = tag.attributes.sheetId;
3707
+ const hidden = plainSheetHiddenValue(tag.attributes.state);
3708
+ if (!name || !relationshipId || !sheetId || null === hidden || names.has(name) || relationshipIds.has(relationshipId) || sheetIds.has(sheetId)) return null;
3709
+ names.add(name);
3710
+ relationshipIds.add(relationshipId);
3711
+ sheetIds.add(sheetId);
3712
+ sheets.push({
3713
+ hidden,
3714
+ name,
3715
+ relationshipId,
3716
+ sheetId
3717
+ });
3718
+ }
3719
+ return sheets;
3720
+ }
3721
+ function validPlainContentTypes(source, sheets) {
3722
+ const content = rootContent(source, 'Types', {
3723
+ xmlns: CONTENT_TYPES_NAMESPACE
3724
+ });
3725
+ if (null === content) return false;
3726
+ const tags = emptyChildTags(content);
3727
+ if (!tags) return false;
3728
+ const defaults = new Map();
3729
+ const overrides = new Map();
3730
+ for (const tag of tags)if ('Default' === tag.name) {
3731
+ if (!hasOnlyKeys(tag.attributes, [
3732
+ 'Extension',
3733
+ 'ContentType'
3734
+ ])) return false;
3735
+ const extension = tag.attributes.Extension;
3736
+ const contentType = tag.attributes.ContentType;
3737
+ if (!extension || !contentType || defaults.has(extension)) return false;
3738
+ defaults.set(extension, contentType);
3739
+ } else {
3740
+ if ('Override' !== tag.name) return false;
3741
+ if (!hasOnlyKeys(tag.attributes, [
3742
+ 'PartName',
3743
+ 'ContentType'
3744
+ ])) return false;
3745
+ const partName = tag.attributes.PartName;
3746
+ const contentType = tag.attributes.ContentType;
3747
+ if (!partName || !contentType || overrides.has(partName)) return false;
3748
+ overrides.set(partName, contentType);
3749
+ }
3750
+ if (2 !== defaults.size || defaults.get('rels') !== RELATIONSHIPS_CONTENT_TYPE || 'application/xml' !== defaults.get('xml')) return false;
3751
+ const expectedOverrides = new Map([
3752
+ [
3753
+ '/xl/workbook.xml',
3754
+ WORKBOOK_CONTENT_TYPE
3755
+ ],
3756
+ ...sheets.map((sheet)=>[
3757
+ `/${sheet.partPath}`,
3758
+ WORKSHEET_CONTENT_TYPE
3759
+ ])
3760
+ ]);
3761
+ if (overrides.size !== expectedOverrides.size) return false;
3762
+ for (const [path, contentType] of expectedOverrides)if (overrides.get(path) !== contentType) return false;
3763
+ return true;
3764
+ }
3765
+ function parseRelationships(source) {
3766
+ const content = rootContent(source, 'Relationships', {
3767
+ xmlns: PACKAGE_RELATIONSHIPS_NAMESPACE
3768
+ });
3769
+ if (null === content) return null;
3770
+ const tags = emptyChildTags(content, 'Relationship');
3771
+ if (!tags) return null;
3772
+ const relationships = [];
3773
+ for (const tag of tags){
3774
+ if (!hasOnlyKeys(tag.attributes, [
3775
+ 'Id',
3776
+ 'Type',
3777
+ 'Target',
3778
+ 'TargetMode'
3779
+ ])) return null;
3780
+ if (!tag.attributes.Id || !tag.attributes.Type || !tag.attributes.Target) return null;
3781
+ relationships.push(tag.attributes);
3782
+ }
3783
+ return relationships;
3784
+ }
3785
+ function rootContent(source, name, attributes) {
3786
+ const body = stripSmallXmlDocument(source);
3787
+ const tagEnd = body.indexOf('>');
3788
+ if (tagEnd < 0) return null;
3789
+ const tag = parseTag(body.slice(0, tagEnd + 1));
3790
+ if (!tag || tag.selfClosing || tag.name !== name || !sameAttributes(tag.attributes, attributes)) return null;
3791
+ const closing = `</${name}>`;
3792
+ if (!body.endsWith(closing)) return null;
3793
+ return body.slice(tagEnd + 1, -closing.length).trim();
3794
+ }
3795
+ function emptyChildTags(source, expectedName) {
3796
+ const tags = [];
3797
+ let cursor = 0;
3798
+ while(cursor < source.length){
3799
+ cursor = skipXmlWhitespace(source, cursor);
3800
+ if (cursor === source.length) break;
3801
+ const end = source.indexOf('>', cursor);
3802
+ if (end < 0) return null;
3803
+ const tag = parseTag(source.slice(cursor, end + 1));
3804
+ if (!tag?.selfClosing || expectedName && tag.name !== expectedName) return null;
3805
+ tags.push(tag);
3806
+ cursor = end + 1;
3807
+ }
3808
+ return tags;
3809
+ }
3810
+ function parseTag(source) {
3811
+ const match = /^<([A-Za-z_][\w:.-]*)([\s\S]*?)(\/?)>$/.exec(source);
3812
+ if (!match) return null;
3813
+ const attributes = {};
3814
+ const attributeSource = match[2] ?? '';
3815
+ let cursor = 0;
3816
+ while(cursor < attributeSource.length){
3817
+ const attribute = /^\s+([A-Za-z_][\w:.-]*)="([^"]*)"/.exec(attributeSource.slice(cursor));
3818
+ if (!attribute || Object.hasOwn(attributes, attribute[1])) return null;
3819
+ const value = decodeStrictXmlText(attribute[2]);
3820
+ if (null === value) return null;
3821
+ attributes[attribute[1]] = value;
3822
+ cursor += attribute[0].length;
3823
+ }
3824
+ return {
3825
+ attributes,
3826
+ name: match[1],
3827
+ selfClosing: '/' === match[3]
3828
+ };
3829
+ }
3830
+ function decodeStrictXmlText(value) {
3831
+ if (value.includes('<')) return null;
3832
+ if (!value.includes('&')) return value;
3833
+ let result = '';
3834
+ let cursor = 0;
3835
+ while(cursor < value.length){
3836
+ const start = value.indexOf('&', cursor);
3837
+ if (start < 0) return result + value.slice(cursor);
3838
+ result += value.slice(cursor, start);
3839
+ const end = value.indexOf(';', start + 1);
3840
+ if (end < 0) return null;
3841
+ const entity = value.slice(start + 1, end);
3842
+ const decoded = decodeXmlEntity(entity);
3843
+ if (null === decoded) return null;
3844
+ result += decoded;
3845
+ cursor = end + 1;
3846
+ }
3847
+ return result;
3848
+ }
3849
+ function decodeXmlEntity(entity) {
3850
+ const named = {
3851
+ amp: '&',
3852
+ apos: "'",
3853
+ gt: '>',
3854
+ lt: '<',
3855
+ quot: '"'
3856
+ };
3857
+ if (Object.hasOwn(named, entity)) return named[entity] ?? null;
3858
+ const codePoint = /^#x[\da-f]+$/i.test(entity) ? Number.parseInt(entity.slice(2), 16) : /^#\d+$/.test(entity) ? Number.parseInt(entity.slice(1), 10) : NaN;
3859
+ if (!isXmlCodePoint(codePoint)) return null;
3860
+ try {
3861
+ return String.fromCodePoint(codePoint);
3862
+ } catch {
3863
+ return null;
3864
+ }
3865
+ }
3866
+ function isXmlCodePoint(value) {
3867
+ return Number.isSafeInteger(value) && (0x09 === value || 0x0a === value || 0x0d === value || value >= 0x20 && value <= 0xd7ff || value >= 0xe000 && value <= 0xfffd || value >= 0x10000 && value <= 0x10ffff);
3868
+ }
3869
+ function decodePlainRange(reference) {
3870
+ const separator = reference.indexOf(':');
3871
+ const start = decodePlainCellAddress(separator < 0 ? reference : reference.slice(0, separator));
3872
+ const end = decodePlainCellAddress(separator < 0 ? reference : reference.slice(separator + 1));
3873
+ return start && end && start.row <= end.row && start.column <= end.column && (separator < 0 || reference.indexOf(':', separator + 1) < 0) ? {
3874
+ end,
3875
+ start
3876
+ } : null;
3877
+ }
3878
+ function decodePlainCellAddress(address) {
3879
+ const match = /^([A-Z]{1,3})([1-9]\d{0,6})$/.exec(address);
3880
+ if (!match) return null;
3881
+ let column = 0;
3882
+ for (const character of match[1])column = 26 * column + character.charCodeAt(0) - 64;
3883
+ let row = Number(match[2]);
3884
+ column -= 1;
3885
+ row -= 1;
3886
+ return column <= MAX_XLSX_COLUMN && row <= MAX_XLSX_ROW ? {
3887
+ column,
3888
+ row
3889
+ } : null;
3890
+ }
3891
+ function decodePlainCellColumnForRow(source, start, end, expectedRow) {
3892
+ let cursor = start;
3893
+ let column = 0;
3894
+ let columnDigits = 0;
3895
+ while(cursor < end && columnDigits < 3){
3896
+ const code = source.charCodeAt(cursor);
3897
+ if (code < 65 || code > 90) break;
3898
+ column = 26 * column + code - 64;
3899
+ columnDigits += 1;
3900
+ cursor += 1;
3901
+ }
3902
+ if (0 === columnDigits || column > MAX_XLSX_COLUMN + 1 || cursor >= end) return null;
3903
+ const firstRowDigit = source.charCodeAt(cursor);
3904
+ if (firstRowDigit < 49 || firstRowDigit > 57) return null;
3905
+ let row = firstRowDigit - 48;
3906
+ let rowDigits = 1;
3907
+ cursor += 1;
3908
+ while(cursor < end){
3909
+ const code = source.charCodeAt(cursor);
3910
+ if (code < 48 || code > 57 || rowDigits >= 7) return null;
3911
+ row = 10 * row + code - 48;
3912
+ rowDigits += 1;
3913
+ cursor += 1;
3914
+ }
3915
+ return row === expectedRow + 1 && row <= MAX_XLSX_ROW + 1 ? column - 1 : null;
3916
+ }
3917
+ function readExactPositiveInteger(source, cursor, prefix, suffix, maximum = Number.MAX_SAFE_INTEGER) {
3918
+ if (!source.startsWith(prefix, cursor)) return null;
3919
+ const start = cursor + prefix.length;
3920
+ const end = source.indexOf(suffix, start);
3921
+ if (end <= start) return null;
3922
+ const firstDigit = source.charCodeAt(start);
3923
+ if (firstDigit < 49 || firstDigit > 57) return null;
3924
+ let value = firstDigit - 48;
3925
+ for(let index = start + 1; index < end; index += 1){
3926
+ const code = source.charCodeAt(index);
3927
+ if (code < 48 || code > 57) return null;
3928
+ value = 10 * value + code - 48;
3929
+ if (value > maximum) return null;
3930
+ }
3931
+ return value <= maximum ? {
3932
+ end: end + suffix.length,
3933
+ value
3934
+ } : null;
3935
+ }
3936
+ function stripSmallXmlDocument(source) {
3937
+ let body = source.trim();
3938
+ if (body.startsWith('<?xml')) {
3939
+ const end = body.indexOf('?>');
3940
+ if (end < 0) return '';
3941
+ body = body.slice(end + 2).trim();
3942
+ }
3943
+ return body;
3944
+ }
3945
+ function xmlBodyStart(source) {
3946
+ let cursor = skipXmlWhitespace(source, 0);
3947
+ if (source.startsWith('<?xml', cursor)) {
3948
+ const end = source.indexOf('?>', cursor + 5);
3949
+ if (end < 0) return source.length;
3950
+ cursor = skipXmlWhitespace(source, end + 2);
3951
+ }
3952
+ return cursor;
3953
+ }
3954
+ function skipXmlWhitespace(source, start) {
3955
+ let cursor = start;
3956
+ while(cursor < source.length){
3957
+ const code = source.charCodeAt(cursor);
3958
+ if (9 !== code && 10 !== code && 13 !== code && 32 !== code) break;
3959
+ cursor += 1;
3960
+ }
3961
+ return cursor;
3962
+ }
3963
+ function plainWorksheetPartPath(target) {
3964
+ return target && /^worksheets\/[A-Za-z0-9._-]+\.xml$/.test(target) ? `xl/${target}` : null;
3965
+ }
3966
+ function plainSheetHiddenValue(value) {
3967
+ if (void 0 === value || 'visible' === value) return 0;
3968
+ if ('hidden' === value) return 1;
3969
+ if ('veryHidden' === value) return 2;
3970
+ return null;
3971
+ }
3972
+ function sameStringSet(values, expected) {
3973
+ const actual = new Set(values);
3974
+ if (actual.size !== values.length || actual.size !== expected.size) return false;
3975
+ for (const value of actual)if (!expected.has(value)) return false;
3976
+ return true;
3977
+ }
3978
+ function hasOnlyKeys(value, allowed) {
3979
+ const keys = Object.keys(value);
3980
+ return keys.every((key)=>allowed.includes(key));
3981
+ }
3982
+ function sameAttributes(actual, expected) {
3983
+ const keys = Object.keys(actual);
3984
+ return keys.length === Object.keys(expected).length && keys.every((key)=>actual[key] === expected[key]);
3985
+ }
3986
+ const IMPORTED_WORKSHEET_ELEMENTS = new Set([
3987
+ 'pane',
3988
+ 'dataValidation',
3989
+ 'conditionalFormatting',
3990
+ 'sheetProtection',
3991
+ 'protectedRange',
3992
+ 'rowBreaks',
3993
+ 'colBreaks',
3994
+ 'pageSetup',
3995
+ 'pageMargins',
3996
+ 'printOptions',
3997
+ 'headerFooter',
3998
+ 'pageSetUpPr',
3999
+ 'drawing'
4000
+ ]);
4001
+ const DIAGNOSTIC_WORKSHEET_ELEMENTS = new Set([
4002
+ 'conditionalFormatting',
4003
+ 'dataValidation',
4004
+ 'sheetProtection',
4005
+ 'protectedRange',
4006
+ 'pageSetup',
4007
+ 'pageMargins',
4008
+ 'printOptions',
4009
+ 'headerFooter',
4010
+ 'pageSetUpPr',
4011
+ 'rowBreaks',
4012
+ 'colBreaks'
4013
+ ]);
4014
+ const WORKSHEET_SCAN_PATTERN = /<(?:[A-Za-z_][\w.-]*:)?(?:(cols|f|pane|dataValidation|conditionalFormatting|sheetProtection|protectedRange|rowBreaks|colBreaks|pageSetup|pageMargins|printOptions|headerFooter|pageSetUpPr|drawing)(?=[\s/>])|(row)(?=[\s/>])[^>]*\s(?:collapsed|customFormat|customHeight|hidden|ht|outlineLevel|thickBot|thickTop)\s*=|(c)(?=[\s/>])[^>]*\ss\s*=)/g;
4015
+ function scanXlsxWorksheetXml(source) {
4016
+ let hasDirectCellStyles = false;
4017
+ let hasDiagnosticFeatures = false;
4018
+ let hasFormulaFeatures = false;
4019
+ let hasImportedFeatures = false;
4020
+ let requiresSheetJsCellStyles = false;
4021
+ WORKSHEET_SCAN_PATTERN.lastIndex = 0;
4022
+ for(let match = WORKSHEET_SCAN_PATTERN.exec(source); match;){
4023
+ const element = match[1];
4024
+ if (match[3]) hasDirectCellStyles = true;
4025
+ if (match[2] || match[3] || 'cols' === element) requiresSheetJsCellStyles = true;
4026
+ if ('f' === element) hasFormulaFeatures = true;
4027
+ if (element && IMPORTED_WORKSHEET_ELEMENTS.has(element)) hasImportedFeatures = true;
4028
+ if (element && DIAGNOSTIC_WORKSHEET_ELEMENTS.has(element)) hasDiagnosticFeatures = true;
4029
+ if (hasDirectCellStyles && hasDiagnosticFeatures && hasFormulaFeatures && hasImportedFeatures && requiresSheetJsCellStyles) break;
4030
+ match = WORKSHEET_SCAN_PATTERN.exec(source);
4031
+ }
4032
+ WORKSHEET_SCAN_PATTERN.lastIndex = 0;
4033
+ return {
4034
+ hasDirectCellStyles,
4035
+ hasDiagnosticFeatures,
4036
+ hasFormulaFeatures,
4037
+ hasImportedFeatures,
4038
+ requiresSheetJsCellStyles
4039
+ };
4040
+ }
4041
+ const scope = globalThis;
4042
+ scope.onmessage = async (event)=>{
4043
+ if ('scan' !== event.data.kind) return;
4044
+ try {
4045
+ const zip = await jszip_min_default().loadAsync(event.data.bytes);
4046
+ const packagePaths = Object.values(zip.files).filter((entry)=>!entry.dir).map((entry)=>entry.name);
4047
+ const plan = await plainWorkbookPlan(zip, packagePaths);
4048
+ let fastPath = null !== plan;
4049
+ let fastPathRejected = false;
4050
+ if (plan) scope.postMessage({
4051
+ kind: 'workbook',
4052
+ workbook: plan.workbook
4053
+ });
4054
+ const plannedSheetByPath = new Map(plan?.sheets.map((sheet)=>[
4055
+ sheet.partPath,
4056
+ sheet
4057
+ ]));
4058
+ const parsedSheetPaths = new Set();
4059
+ const worksheets = {};
4060
+ for (const [partPath, entry] of Object.entries(zip.files)){
4061
+ if (entry.dir || !partPath.startsWith('xl/worksheets/') || !partPath.endsWith('.xml')) continue;
4062
+ const bytes = await entry.async('uint8array');
4063
+ const source = decodeXmlBytes(bytes, partPath);
4064
+ const plannedSheet = fastPath ? plannedSheetByPath.get(partPath) : null;
4065
+ if (plannedSheet) {
4066
+ const parsed = streamPlainXlsxWorksheet(source, (chunk)=>{
4067
+ scope.postMessage({
4068
+ chunk,
4069
+ kind: 'plain-cells',
4070
+ name: plannedSheet.name
4071
+ }, [
4072
+ chunk.coordinates.buffer,
4073
+ chunk.kinds.buffer,
4074
+ chunk.numericValues.buffer
4075
+ ]);
4076
+ }, ({ columnCount, rowCount })=>{
4077
+ scope.postMessage({
4078
+ columnCount,
4079
+ kind: 'plain-worksheet-start',
4080
+ name: plannedSheet.name,
4081
+ rowCount
4082
+ });
4083
+ });
4084
+ if (parsed) {
4085
+ parsedSheetPaths.add(partPath);
4086
+ worksheets[partPath] = PLAIN_WORKSHEET_SCAN;
4087
+ scope.postMessage({
4088
+ columnCount: parsed.columnCount,
4089
+ dense: true,
4090
+ kind: 'worksheet',
4091
+ name: plannedSheet.name,
4092
+ populatedCellCount: parsed.populatedCellCount,
4093
+ properties: parsed.properties,
4094
+ rowCount: parsed.rowCount
4095
+ });
4096
+ continue;
4097
+ }
4098
+ fastPath = false;
4099
+ if (!fastPathRejected) {
4100
+ fastPathRejected = true;
4101
+ scope.postMessage({
4102
+ kind: 'fast-path-rejected'
4103
+ });
4104
+ }
4105
+ } else if (fastPath) {
4106
+ fastPath = false;
4107
+ if (!fastPathRejected) {
4108
+ fastPathRejected = true;
4109
+ scope.postMessage({
4110
+ kind: 'fast-path-rejected'
4111
+ });
4112
+ }
4113
+ }
4114
+ worksheets[partPath] = scanXlsxWorksheetXml(source);
4115
+ }
4116
+ fastPath = fastPath && null !== plan && parsedSheetPaths.size === plan.sheets.length;
4117
+ scope.postMessage({
4118
+ fastPath,
4119
+ kind: 'success',
4120
+ worksheets
4121
+ });
4122
+ } catch {
4123
+ scope.postMessage({
4124
+ kind: 'failure'
4125
+ });
4126
+ }
4127
+ };
4128
+ const PLAIN_WORKSHEET_SCAN = {
4129
+ hasDirectCellStyles: false,
4130
+ hasDiagnosticFeatures: false,
4131
+ hasFormulaFeatures: false,
4132
+ hasImportedFeatures: false,
4133
+ requiresSheetJsCellStyles: false
4134
+ };
4135
+ async function plainWorkbookPlan(zip, packagePaths) {
4136
+ try {
4137
+ const [contentTypes, rootRelationships, workbook, workbookRelationships] = await Promise.all([
4138
+ zipXml(zip, '[Content_Types].xml'),
4139
+ zipXml(zip, '_rels/.rels'),
4140
+ zipXml(zip, 'xl/workbook.xml'),
4141
+ zipXml(zip, 'xl/_rels/workbook.xml.rels')
4142
+ ]);
4143
+ if (null === contentTypes || null === rootRelationships || null === workbook || null === workbookRelationships) return null;
4144
+ return createPlainXlsxWorkbookPlan({
4145
+ contentTypes,
4146
+ packagePaths,
4147
+ rootRelationships,
4148
+ workbook,
4149
+ workbookRelationships
4150
+ });
4151
+ } catch {
4152
+ return null;
4153
+ }
4154
+ }
4155
+ async function zipXml(zip, partPath) {
4156
+ const entry = zip.file(partPath);
4157
+ if (!entry || entry.dir) return null;
4158
+ return decodeXmlBytes(await entry.async('uint8array'), partPath);
4159
+ }
4160
+ })();
4161
+ })();