docs[TimeLine2]:设施农业-新增时间轴组件 feat[设施农业 病虫害预测-2 环境监测 长势监测]:新增页面 长势监测新增作物分类 fix[农作物监管-长势监测]:修改地图服务bug
This commit is contained in:
1
public/CesiumUnminified/ThirdParty/Workers/package.json
vendored
Normal file
1
public/CesiumUnminified/ThirdParty/Workers/package.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
605
public/CesiumUnminified/ThirdParty/Workers/pako_deflate.min.js
vendored
Normal file
605
public/CesiumUnminified/ThirdParty/Workers/pako_deflate.min.js
vendored
Normal file
@ -0,0 +1,605 @@
|
||||
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
|
||||
!function(t, e) {
|
||||
"object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).pako = {});
|
||||
}(this, function(t) {
|
||||
"use strict";
|
||||
function e(t2) {
|
||||
let e2 = t2.length;
|
||||
for (; --e2 >= 0; )
|
||||
t2[e2] = 0;
|
||||
}
|
||||
const a = 256, s = 286, n = 30, r = 15, i = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]), _ = new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]), l = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]), h = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), o = new Array(576);
|
||||
e(o);
|
||||
const d = new Array(60);
|
||||
e(d);
|
||||
const u = new Array(512);
|
||||
e(u);
|
||||
const f = new Array(256);
|
||||
e(f);
|
||||
const c = new Array(29);
|
||||
e(c);
|
||||
const p = new Array(n);
|
||||
function g(t2, e2, a2, s2, n2) {
|
||||
this.static_tree = t2, this.extra_bits = e2, this.extra_base = a2, this.elems = s2, this.max_length = n2, this.has_stree = t2 && t2.length;
|
||||
}
|
||||
let w, m, b;
|
||||
function y(t2, e2) {
|
||||
this.dyn_tree = t2, this.max_code = 0, this.stat_desc = e2;
|
||||
}
|
||||
e(p);
|
||||
const v = (t2) => t2 < 256 ? u[t2] : u[256 + (t2 >>> 7)], z = (t2, e2) => {
|
||||
t2.pending_buf[t2.pending++] = 255 & e2, t2.pending_buf[t2.pending++] = e2 >>> 8 & 255;
|
||||
}, k = (t2, e2, a2) => {
|
||||
t2.bi_valid > 16 - a2 ? (t2.bi_buf |= e2 << t2.bi_valid & 65535, z(t2, t2.bi_buf), t2.bi_buf = e2 >> 16 - t2.bi_valid, t2.bi_valid += a2 - 16) : (t2.bi_buf |= e2 << t2.bi_valid & 65535, t2.bi_valid += a2);
|
||||
}, x = (t2, e2, a2) => {
|
||||
k(t2, a2[2 * e2], a2[2 * e2 + 1]);
|
||||
}, A = (t2, e2) => {
|
||||
let a2 = 0;
|
||||
do {
|
||||
a2 |= 1 & t2, t2 >>>= 1, a2 <<= 1;
|
||||
} while (--e2 > 0);
|
||||
return a2 >>> 1;
|
||||
}, E = (t2, e2, a2) => {
|
||||
const s2 = new Array(16);
|
||||
let n2, i2, _2 = 0;
|
||||
for (n2 = 1; n2 <= r; n2++)
|
||||
_2 = _2 + a2[n2 - 1] << 1, s2[n2] = _2;
|
||||
for (i2 = 0; i2 <= e2; i2++) {
|
||||
let e3 = t2[2 * i2 + 1];
|
||||
0 !== e3 && (t2[2 * i2] = A(s2[e3]++, e3));
|
||||
}
|
||||
}, Z = (t2) => {
|
||||
let e2;
|
||||
for (e2 = 0; e2 < s; e2++)
|
||||
t2.dyn_ltree[2 * e2] = 0;
|
||||
for (e2 = 0; e2 < n; e2++)
|
||||
t2.dyn_dtree[2 * e2] = 0;
|
||||
for (e2 = 0; e2 < 19; e2++)
|
||||
t2.bl_tree[2 * e2] = 0;
|
||||
t2.dyn_ltree[512] = 1, t2.opt_len = t2.static_len = 0, t2.sym_next = t2.matches = 0;
|
||||
}, U = (t2) => {
|
||||
t2.bi_valid > 8 ? z(t2, t2.bi_buf) : t2.bi_valid > 0 && (t2.pending_buf[t2.pending++] = t2.bi_buf), t2.bi_buf = 0, t2.bi_valid = 0;
|
||||
}, R = (t2, e2, a2, s2) => {
|
||||
const n2 = 2 * e2, r2 = 2 * a2;
|
||||
return t2[n2] < t2[r2] || t2[n2] === t2[r2] && s2[e2] <= s2[a2];
|
||||
}, S = (t2, e2, a2) => {
|
||||
const s2 = t2.heap[a2];
|
||||
let n2 = a2 << 1;
|
||||
for (; n2 <= t2.heap_len && (n2 < t2.heap_len && R(e2, t2.heap[n2 + 1], t2.heap[n2], t2.depth) && n2++, !R(e2, s2, t2.heap[n2], t2.depth)); )
|
||||
t2.heap[a2] = t2.heap[n2], a2 = n2, n2 <<= 1;
|
||||
t2.heap[a2] = s2;
|
||||
}, T = (t2, e2, s2) => {
|
||||
let n2, r2, l2, h2, o2 = 0;
|
||||
if (0 !== t2.sym_next)
|
||||
do {
|
||||
n2 = 255 & t2.pending_buf[t2.sym_buf + o2++], n2 += (255 & t2.pending_buf[t2.sym_buf + o2++]) << 8, r2 = t2.pending_buf[t2.sym_buf + o2++], 0 === n2 ? x(t2, r2, e2) : (l2 = f[r2], x(t2, l2 + a + 1, e2), h2 = i[l2], 0 !== h2 && (r2 -= c[l2], k(t2, r2, h2)), n2--, l2 = v(n2), x(t2, l2, s2), h2 = _[l2], 0 !== h2 && (n2 -= p[l2], k(t2, n2, h2)));
|
||||
} while (o2 < t2.sym_next);
|
||||
x(t2, 256, e2);
|
||||
}, L = (t2, e2) => {
|
||||
const a2 = e2.dyn_tree, s2 = e2.stat_desc.static_tree, n2 = e2.stat_desc.has_stree, i2 = e2.stat_desc.elems;
|
||||
let _2, l2, h2, o2 = -1;
|
||||
for (t2.heap_len = 0, t2.heap_max = 573, _2 = 0; _2 < i2; _2++)
|
||||
0 !== a2[2 * _2] ? (t2.heap[++t2.heap_len] = o2 = _2, t2.depth[_2] = 0) : a2[2 * _2 + 1] = 0;
|
||||
for (; t2.heap_len < 2; )
|
||||
h2 = t2.heap[++t2.heap_len] = o2 < 2 ? ++o2 : 0, a2[2 * h2] = 1, t2.depth[h2] = 0, t2.opt_len--, n2 && (t2.static_len -= s2[2 * h2 + 1]);
|
||||
for (e2.max_code = o2, _2 = t2.heap_len >> 1; _2 >= 1; _2--)
|
||||
S(t2, a2, _2);
|
||||
h2 = i2;
|
||||
do {
|
||||
_2 = t2.heap[1], t2.heap[1] = t2.heap[t2.heap_len--], S(t2, a2, 1), l2 = t2.heap[1], t2.heap[--t2.heap_max] = _2, t2.heap[--t2.heap_max] = l2, a2[2 * h2] = a2[2 * _2] + a2[2 * l2], t2.depth[h2] = (t2.depth[_2] >= t2.depth[l2] ? t2.depth[_2] : t2.depth[l2]) + 1, a2[2 * _2 + 1] = a2[2 * l2 + 1] = h2, t2.heap[1] = h2++, S(t2, a2, 1);
|
||||
} while (t2.heap_len >= 2);
|
||||
t2.heap[--t2.heap_max] = t2.heap[1], ((t3, e3) => {
|
||||
const a3 = e3.dyn_tree, s3 = e3.max_code, n3 = e3.stat_desc.static_tree, i3 = e3.stat_desc.has_stree, _3 = e3.stat_desc.extra_bits, l3 = e3.stat_desc.extra_base, h3 = e3.stat_desc.max_length;
|
||||
let o3, d2, u2, f2, c2, p2, g2 = 0;
|
||||
for (f2 = 0; f2 <= r; f2++)
|
||||
t3.bl_count[f2] = 0;
|
||||
for (a3[2 * t3.heap[t3.heap_max] + 1] = 0, o3 = t3.heap_max + 1; o3 < 573; o3++)
|
||||
d2 = t3.heap[o3], f2 = a3[2 * a3[2 * d2 + 1] + 1] + 1, f2 > h3 && (f2 = h3, g2++), a3[2 * d2 + 1] = f2, d2 > s3 || (t3.bl_count[f2]++, c2 = 0, d2 >= l3 && (c2 = _3[d2 - l3]), p2 = a3[2 * d2], t3.opt_len += p2 * (f2 + c2), i3 && (t3.static_len += p2 * (n3[2 * d2 + 1] + c2)));
|
||||
if (0 !== g2) {
|
||||
do {
|
||||
for (f2 = h3 - 1; 0 === t3.bl_count[f2]; )
|
||||
f2--;
|
||||
t3.bl_count[f2]--, t3.bl_count[f2 + 1] += 2, t3.bl_count[h3]--, g2 -= 2;
|
||||
} while (g2 > 0);
|
||||
for (f2 = h3; 0 !== f2; f2--)
|
||||
for (d2 = t3.bl_count[f2]; 0 !== d2; )
|
||||
u2 = t3.heap[--o3], u2 > s3 || (a3[2 * u2 + 1] !== f2 && (t3.opt_len += (f2 - a3[2 * u2 + 1]) * a3[2 * u2], a3[2 * u2 + 1] = f2), d2--);
|
||||
}
|
||||
})(t2, e2), E(a2, o2, t2.bl_count);
|
||||
}, F = (t2, e2, a2) => {
|
||||
let s2, n2, r2 = -1, i2 = e2[1], _2 = 0, l2 = 7, h2 = 4;
|
||||
for (0 === i2 && (l2 = 138, h2 = 3), e2[2 * (a2 + 1) + 1] = 65535, s2 = 0; s2 <= a2; s2++)
|
||||
n2 = i2, i2 = e2[2 * (s2 + 1) + 1], ++_2 < l2 && n2 === i2 || (_2 < h2 ? t2.bl_tree[2 * n2] += _2 : 0 !== n2 ? (n2 !== r2 && t2.bl_tree[2 * n2]++, t2.bl_tree[32]++) : _2 <= 10 ? t2.bl_tree[34]++ : t2.bl_tree[36]++, _2 = 0, r2 = n2, 0 === i2 ? (l2 = 138, h2 = 3) : n2 === i2 ? (l2 = 6, h2 = 3) : (l2 = 7, h2 = 4));
|
||||
}, O = (t2, e2, a2) => {
|
||||
let s2, n2, r2 = -1, i2 = e2[1], _2 = 0, l2 = 7, h2 = 4;
|
||||
for (0 === i2 && (l2 = 138, h2 = 3), s2 = 0; s2 <= a2; s2++)
|
||||
if (n2 = i2, i2 = e2[2 * (s2 + 1) + 1], !(++_2 < l2 && n2 === i2)) {
|
||||
if (_2 < h2)
|
||||
do {
|
||||
x(t2, n2, t2.bl_tree);
|
||||
} while (0 != --_2);
|
||||
else
|
||||
0 !== n2 ? (n2 !== r2 && (x(t2, n2, t2.bl_tree), _2--), x(t2, 16, t2.bl_tree), k(t2, _2 - 3, 2)) : _2 <= 10 ? (x(t2, 17, t2.bl_tree), k(t2, _2 - 3, 3)) : (x(t2, 18, t2.bl_tree), k(t2, _2 - 11, 7));
|
||||
_2 = 0, r2 = n2, 0 === i2 ? (l2 = 138, h2 = 3) : n2 === i2 ? (l2 = 6, h2 = 3) : (l2 = 7, h2 = 4);
|
||||
}
|
||||
};
|
||||
let D = false;
|
||||
const N = (t2, e2, a2, s2) => {
|
||||
k(t2, 0 + (s2 ? 1 : 0), 3), U(t2), z(t2, a2), z(t2, ~a2), a2 && t2.pending_buf.set(t2.window.subarray(e2, e2 + a2), t2.pending), t2.pending += a2;
|
||||
};
|
||||
var I = (t2, e2, s2, n2) => {
|
||||
let r2, i2, _2 = 0;
|
||||
t2.level > 0 ? (2 === t2.strm.data_type && (t2.strm.data_type = ((t3) => {
|
||||
let e3, s3 = 4093624447;
|
||||
for (e3 = 0; e3 <= 31; e3++, s3 >>>= 1)
|
||||
if (1 & s3 && 0 !== t3.dyn_ltree[2 * e3])
|
||||
return 0;
|
||||
if (0 !== t3.dyn_ltree[18] || 0 !== t3.dyn_ltree[20] || 0 !== t3.dyn_ltree[26])
|
||||
return 1;
|
||||
for (e3 = 32; e3 < a; e3++)
|
||||
if (0 !== t3.dyn_ltree[2 * e3])
|
||||
return 1;
|
||||
return 0;
|
||||
})(t2)), L(t2, t2.l_desc), L(t2, t2.d_desc), _2 = ((t3) => {
|
||||
let e3;
|
||||
for (F(t3, t3.dyn_ltree, t3.l_desc.max_code), F(t3, t3.dyn_dtree, t3.d_desc.max_code), L(t3, t3.bl_desc), e3 = 18; e3 >= 3 && 0 === t3.bl_tree[2 * h[e3] + 1]; e3--)
|
||||
;
|
||||
return t3.opt_len += 3 * (e3 + 1) + 5 + 5 + 4, e3;
|
||||
})(t2), r2 = t2.opt_len + 3 + 7 >>> 3, i2 = t2.static_len + 3 + 7 >>> 3, i2 <= r2 && (r2 = i2)) : r2 = i2 = s2 + 5, s2 + 4 <= r2 && -1 !== e2 ? N(t2, e2, s2, n2) : 4 === t2.strategy || i2 === r2 ? (k(t2, 2 + (n2 ? 1 : 0), 3), T(t2, o, d)) : (k(t2, 4 + (n2 ? 1 : 0), 3), ((t3, e3, a2, s3) => {
|
||||
let n3;
|
||||
for (k(t3, e3 - 257, 5), k(t3, a2 - 1, 5), k(t3, s3 - 4, 4), n3 = 0; n3 < s3; n3++)
|
||||
k(t3, t3.bl_tree[2 * h[n3] + 1], 3);
|
||||
O(t3, t3.dyn_ltree, e3 - 1), O(t3, t3.dyn_dtree, a2 - 1);
|
||||
})(t2, t2.l_desc.max_code + 1, t2.d_desc.max_code + 1, _2 + 1), T(t2, t2.dyn_ltree, t2.dyn_dtree)), Z(t2), n2 && U(t2);
|
||||
}, C = { _tr_init: (t2) => {
|
||||
D || ((() => {
|
||||
let t3, e2, a2, h2, y2;
|
||||
const v2 = new Array(16);
|
||||
for (a2 = 0, h2 = 0; h2 < 28; h2++)
|
||||
for (c[h2] = a2, t3 = 0; t3 < 1 << i[h2]; t3++)
|
||||
f[a2++] = h2;
|
||||
for (f[a2 - 1] = h2, y2 = 0, h2 = 0; h2 < 16; h2++)
|
||||
for (p[h2] = y2, t3 = 0; t3 < 1 << _[h2]; t3++)
|
||||
u[y2++] = h2;
|
||||
for (y2 >>= 7; h2 < n; h2++)
|
||||
for (p[h2] = y2 << 7, t3 = 0; t3 < 1 << _[h2] - 7; t3++)
|
||||
u[256 + y2++] = h2;
|
||||
for (e2 = 0; e2 <= r; e2++)
|
||||
v2[e2] = 0;
|
||||
for (t3 = 0; t3 <= 143; )
|
||||
o[2 * t3 + 1] = 8, t3++, v2[8]++;
|
||||
for (; t3 <= 255; )
|
||||
o[2 * t3 + 1] = 9, t3++, v2[9]++;
|
||||
for (; t3 <= 279; )
|
||||
o[2 * t3 + 1] = 7, t3++, v2[7]++;
|
||||
for (; t3 <= 287; )
|
||||
o[2 * t3 + 1] = 8, t3++, v2[8]++;
|
||||
for (E(o, 287, v2), t3 = 0; t3 < n; t3++)
|
||||
d[2 * t3 + 1] = 5, d[2 * t3] = A(t3, 5);
|
||||
w = new g(o, i, 257, s, r), m = new g(d, _, 0, n, r), b = new g(new Array(0), l, 0, 19, 7);
|
||||
})(), D = true), t2.l_desc = new y(t2.dyn_ltree, w), t2.d_desc = new y(t2.dyn_dtree, m), t2.bl_desc = new y(t2.bl_tree, b), t2.bi_buf = 0, t2.bi_valid = 0, Z(t2);
|
||||
}, _tr_stored_block: N, _tr_flush_block: I, _tr_tally: (t2, e2, s2) => (t2.pending_buf[t2.sym_buf + t2.sym_next++] = e2, t2.pending_buf[t2.sym_buf + t2.sym_next++] = e2 >> 8, t2.pending_buf[t2.sym_buf + t2.sym_next++] = s2, 0 === e2 ? t2.dyn_ltree[2 * s2]++ : (t2.matches++, e2--, t2.dyn_ltree[2 * (f[s2] + a + 1)]++, t2.dyn_dtree[2 * v(e2)]++), t2.sym_next === t2.sym_end), _tr_align: (t2) => {
|
||||
k(t2, 2, 3), x(t2, 256, o), ((t3) => {
|
||||
16 === t3.bi_valid ? (z(t3, t3.bi_buf), t3.bi_buf = 0, t3.bi_valid = 0) : t3.bi_valid >= 8 && (t3.pending_buf[t3.pending++] = 255 & t3.bi_buf, t3.bi_buf >>= 8, t3.bi_valid -= 8);
|
||||
})(t2);
|
||||
} };
|
||||
var B = (t2, e2, a2, s2) => {
|
||||
let n2 = 65535 & t2 | 0, r2 = t2 >>> 16 & 65535 | 0, i2 = 0;
|
||||
for (; 0 !== a2; ) {
|
||||
i2 = a2 > 2e3 ? 2e3 : a2, a2 -= i2;
|
||||
do {
|
||||
n2 = n2 + e2[s2++] | 0, r2 = r2 + n2 | 0;
|
||||
} while (--i2);
|
||||
n2 %= 65521, r2 %= 65521;
|
||||
}
|
||||
return n2 | r2 << 16 | 0;
|
||||
};
|
||||
const H = new Uint32Array((() => {
|
||||
let t2, e2 = [];
|
||||
for (var a2 = 0; a2 < 256; a2++) {
|
||||
t2 = a2;
|
||||
for (var s2 = 0; s2 < 8; s2++)
|
||||
t2 = 1 & t2 ? 3988292384 ^ t2 >>> 1 : t2 >>> 1;
|
||||
e2[a2] = t2;
|
||||
}
|
||||
return e2;
|
||||
})());
|
||||
var M = (t2, e2, a2, s2) => {
|
||||
const n2 = H, r2 = s2 + a2;
|
||||
t2 ^= -1;
|
||||
for (let a3 = s2; a3 < r2; a3++)
|
||||
t2 = t2 >>> 8 ^ n2[255 & (t2 ^ e2[a3])];
|
||||
return -1 ^ t2;
|
||||
}, P = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }, j = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
||||
const { _tr_init: K, _tr_stored_block: Y, _tr_flush_block: G, _tr_tally: X, _tr_align: W } = C, { Z_NO_FLUSH: q, Z_PARTIAL_FLUSH: J, Z_FULL_FLUSH: Q, Z_FINISH: V, Z_BLOCK: $, Z_OK: tt, Z_STREAM_END: et, Z_STREAM_ERROR: at, Z_DATA_ERROR: st, Z_BUF_ERROR: nt, Z_DEFAULT_COMPRESSION: rt, Z_FILTERED: it, Z_HUFFMAN_ONLY: _t, Z_RLE: lt, Z_FIXED: ht, Z_DEFAULT_STRATEGY: ot, Z_UNKNOWN: dt, Z_DEFLATED: ut } = j, ft = 258, ct = 262, pt = 42, gt = 113, wt = 666, mt = (t2, e2) => (t2.msg = P[e2], e2), bt = (t2) => 2 * t2 - (t2 > 4 ? 9 : 0), yt = (t2) => {
|
||||
let e2 = t2.length;
|
||||
for (; --e2 >= 0; )
|
||||
t2[e2] = 0;
|
||||
}, vt = (t2) => {
|
||||
let e2, a2, s2, n2 = t2.w_size;
|
||||
e2 = t2.hash_size, s2 = e2;
|
||||
do {
|
||||
a2 = t2.head[--s2], t2.head[s2] = a2 >= n2 ? a2 - n2 : 0;
|
||||
} while (--e2);
|
||||
e2 = n2, s2 = e2;
|
||||
do {
|
||||
a2 = t2.prev[--s2], t2.prev[s2] = a2 >= n2 ? a2 - n2 : 0;
|
||||
} while (--e2);
|
||||
};
|
||||
let zt = (t2, e2, a2) => (e2 << t2.hash_shift ^ a2) & t2.hash_mask;
|
||||
const kt = (t2) => {
|
||||
const e2 = t2.state;
|
||||
let a2 = e2.pending;
|
||||
a2 > t2.avail_out && (a2 = t2.avail_out), 0 !== a2 && (t2.output.set(e2.pending_buf.subarray(e2.pending_out, e2.pending_out + a2), t2.next_out), t2.next_out += a2, e2.pending_out += a2, t2.total_out += a2, t2.avail_out -= a2, e2.pending -= a2, 0 === e2.pending && (e2.pending_out = 0));
|
||||
}, xt = (t2, e2) => {
|
||||
G(t2, t2.block_start >= 0 ? t2.block_start : -1, t2.strstart - t2.block_start, e2), t2.block_start = t2.strstart, kt(t2.strm);
|
||||
}, At = (t2, e2) => {
|
||||
t2.pending_buf[t2.pending++] = e2;
|
||||
}, Et = (t2, e2) => {
|
||||
t2.pending_buf[t2.pending++] = e2 >>> 8 & 255, t2.pending_buf[t2.pending++] = 255 & e2;
|
||||
}, Zt = (t2, e2, a2, s2) => {
|
||||
let n2 = t2.avail_in;
|
||||
return n2 > s2 && (n2 = s2), 0 === n2 ? 0 : (t2.avail_in -= n2, e2.set(t2.input.subarray(t2.next_in, t2.next_in + n2), a2), 1 === t2.state.wrap ? t2.adler = B(t2.adler, e2, n2, a2) : 2 === t2.state.wrap && (t2.adler = M(t2.adler, e2, n2, a2)), t2.next_in += n2, t2.total_in += n2, n2);
|
||||
}, Ut = (t2, e2) => {
|
||||
let a2, s2, n2 = t2.max_chain_length, r2 = t2.strstart, i2 = t2.prev_length, _2 = t2.nice_match;
|
||||
const l2 = t2.strstart > t2.w_size - ct ? t2.strstart - (t2.w_size - ct) : 0, h2 = t2.window, o2 = t2.w_mask, d2 = t2.prev, u2 = t2.strstart + ft;
|
||||
let f2 = h2[r2 + i2 - 1], c2 = h2[r2 + i2];
|
||||
t2.prev_length >= t2.good_match && (n2 >>= 2), _2 > t2.lookahead && (_2 = t2.lookahead);
|
||||
do {
|
||||
if (a2 = e2, h2[a2 + i2] === c2 && h2[a2 + i2 - 1] === f2 && h2[a2] === h2[r2] && h2[++a2] === h2[r2 + 1]) {
|
||||
r2 += 2, a2++;
|
||||
do {
|
||||
} while (h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && h2[++r2] === h2[++a2] && r2 < u2);
|
||||
if (s2 = ft - (u2 - r2), r2 = u2 - ft, s2 > i2) {
|
||||
if (t2.match_start = e2, i2 = s2, s2 >= _2)
|
||||
break;
|
||||
f2 = h2[r2 + i2 - 1], c2 = h2[r2 + i2];
|
||||
}
|
||||
}
|
||||
} while ((e2 = d2[e2 & o2]) > l2 && 0 != --n2);
|
||||
return i2 <= t2.lookahead ? i2 : t2.lookahead;
|
||||
}, Rt = (t2) => {
|
||||
const e2 = t2.w_size;
|
||||
let a2, s2, n2;
|
||||
do {
|
||||
if (s2 = t2.window_size - t2.lookahead - t2.strstart, t2.strstart >= e2 + (e2 - ct) && (t2.window.set(t2.window.subarray(e2, e2 + e2 - s2), 0), t2.match_start -= e2, t2.strstart -= e2, t2.block_start -= e2, t2.insert > t2.strstart && (t2.insert = t2.strstart), vt(t2), s2 += e2), 0 === t2.strm.avail_in)
|
||||
break;
|
||||
if (a2 = Zt(t2.strm, t2.window, t2.strstart + t2.lookahead, s2), t2.lookahead += a2, t2.lookahead + t2.insert >= 3)
|
||||
for (n2 = t2.strstart - t2.insert, t2.ins_h = t2.window[n2], t2.ins_h = zt(t2, t2.ins_h, t2.window[n2 + 1]); t2.insert && (t2.ins_h = zt(t2, t2.ins_h, t2.window[n2 + 3 - 1]), t2.prev[n2 & t2.w_mask] = t2.head[t2.ins_h], t2.head[t2.ins_h] = n2, n2++, t2.insert--, !(t2.lookahead + t2.insert < 3)); )
|
||||
;
|
||||
} while (t2.lookahead < ct && 0 !== t2.strm.avail_in);
|
||||
}, St = (t2, e2) => {
|
||||
let a2, s2, n2, r2 = t2.pending_buf_size - 5 > t2.w_size ? t2.w_size : t2.pending_buf_size - 5, i2 = 0, _2 = t2.strm.avail_in;
|
||||
do {
|
||||
if (a2 = 65535, n2 = t2.bi_valid + 42 >> 3, t2.strm.avail_out < n2)
|
||||
break;
|
||||
if (n2 = t2.strm.avail_out - n2, s2 = t2.strstart - t2.block_start, a2 > s2 + t2.strm.avail_in && (a2 = s2 + t2.strm.avail_in), a2 > n2 && (a2 = n2), a2 < r2 && (0 === a2 && e2 !== V || e2 === q || a2 !== s2 + t2.strm.avail_in))
|
||||
break;
|
||||
i2 = e2 === V && a2 === s2 + t2.strm.avail_in ? 1 : 0, Y(t2, 0, 0, i2), t2.pending_buf[t2.pending - 4] = a2, t2.pending_buf[t2.pending - 3] = a2 >> 8, t2.pending_buf[t2.pending - 2] = ~a2, t2.pending_buf[t2.pending - 1] = ~a2 >> 8, kt(t2.strm), s2 && (s2 > a2 && (s2 = a2), t2.strm.output.set(t2.window.subarray(t2.block_start, t2.block_start + s2), t2.strm.next_out), t2.strm.next_out += s2, t2.strm.avail_out -= s2, t2.strm.total_out += s2, t2.block_start += s2, a2 -= s2), a2 && (Zt(t2.strm, t2.strm.output, t2.strm.next_out, a2), t2.strm.next_out += a2, t2.strm.avail_out -= a2, t2.strm.total_out += a2);
|
||||
} while (0 === i2);
|
||||
return _2 -= t2.strm.avail_in, _2 && (_2 >= t2.w_size ? (t2.matches = 2, t2.window.set(t2.strm.input.subarray(t2.strm.next_in - t2.w_size, t2.strm.next_in), 0), t2.strstart = t2.w_size, t2.insert = t2.strstart) : (t2.window_size - t2.strstart <= _2 && (t2.strstart -= t2.w_size, t2.window.set(t2.window.subarray(t2.w_size, t2.w_size + t2.strstart), 0), t2.matches < 2 && t2.matches++, t2.insert > t2.strstart && (t2.insert = t2.strstart)), t2.window.set(t2.strm.input.subarray(t2.strm.next_in - _2, t2.strm.next_in), t2.strstart), t2.strstart += _2, t2.insert += _2 > t2.w_size - t2.insert ? t2.w_size - t2.insert : _2), t2.block_start = t2.strstart), t2.high_water < t2.strstart && (t2.high_water = t2.strstart), i2 ? 4 : e2 !== q && e2 !== V && 0 === t2.strm.avail_in && t2.strstart === t2.block_start ? 2 : (n2 = t2.window_size - t2.strstart, t2.strm.avail_in > n2 && t2.block_start >= t2.w_size && (t2.block_start -= t2.w_size, t2.strstart -= t2.w_size, t2.window.set(t2.window.subarray(t2.w_size, t2.w_size + t2.strstart), 0), t2.matches < 2 && t2.matches++, n2 += t2.w_size, t2.insert > t2.strstart && (t2.insert = t2.strstart)), n2 > t2.strm.avail_in && (n2 = t2.strm.avail_in), n2 && (Zt(t2.strm, t2.window, t2.strstart, n2), t2.strstart += n2, t2.insert += n2 > t2.w_size - t2.insert ? t2.w_size - t2.insert : n2), t2.high_water < t2.strstart && (t2.high_water = t2.strstart), n2 = t2.bi_valid + 42 >> 3, n2 = t2.pending_buf_size - n2 > 65535 ? 65535 : t2.pending_buf_size - n2, r2 = n2 > t2.w_size ? t2.w_size : n2, s2 = t2.strstart - t2.block_start, (s2 >= r2 || (s2 || e2 === V) && e2 !== q && 0 === t2.strm.avail_in && s2 <= n2) && (a2 = s2 > n2 ? n2 : s2, i2 = e2 === V && 0 === t2.strm.avail_in && a2 === s2 ? 1 : 0, Y(t2, t2.block_start, a2, i2), t2.block_start += a2, kt(t2.strm)), i2 ? 3 : 1);
|
||||
}, Tt = (t2, e2) => {
|
||||
let a2, s2;
|
||||
for (; ; ) {
|
||||
if (t2.lookahead < ct) {
|
||||
if (Rt(t2), t2.lookahead < ct && e2 === q)
|
||||
return 1;
|
||||
if (0 === t2.lookahead)
|
||||
break;
|
||||
}
|
||||
if (a2 = 0, t2.lookahead >= 3 && (t2.ins_h = zt(t2, t2.ins_h, t2.window[t2.strstart + 3 - 1]), a2 = t2.prev[t2.strstart & t2.w_mask] = t2.head[t2.ins_h], t2.head[t2.ins_h] = t2.strstart), 0 !== a2 && t2.strstart - a2 <= t2.w_size - ct && (t2.match_length = Ut(t2, a2)), t2.match_length >= 3)
|
||||
if (s2 = X(t2, t2.strstart - t2.match_start, t2.match_length - 3), t2.lookahead -= t2.match_length, t2.match_length <= t2.max_lazy_match && t2.lookahead >= 3) {
|
||||
t2.match_length--;
|
||||
do {
|
||||
t2.strstart++, t2.ins_h = zt(t2, t2.ins_h, t2.window[t2.strstart + 3 - 1]), a2 = t2.prev[t2.strstart & t2.w_mask] = t2.head[t2.ins_h], t2.head[t2.ins_h] = t2.strstart;
|
||||
} while (0 != --t2.match_length);
|
||||
t2.strstart++;
|
||||
} else
|
||||
t2.strstart += t2.match_length, t2.match_length = 0, t2.ins_h = t2.window[t2.strstart], t2.ins_h = zt(t2, t2.ins_h, t2.window[t2.strstart + 1]);
|
||||
else
|
||||
s2 = X(t2, 0, t2.window[t2.strstart]), t2.lookahead--, t2.strstart++;
|
||||
if (s2 && (xt(t2, false), 0 === t2.strm.avail_out))
|
||||
return 1;
|
||||
}
|
||||
return t2.insert = t2.strstart < 2 ? t2.strstart : 2, e2 === V ? (xt(t2, true), 0 === t2.strm.avail_out ? 3 : 4) : t2.sym_next && (xt(t2, false), 0 === t2.strm.avail_out) ? 1 : 2;
|
||||
}, Lt = (t2, e2) => {
|
||||
let a2, s2, n2;
|
||||
for (; ; ) {
|
||||
if (t2.lookahead < ct) {
|
||||
if (Rt(t2), t2.lookahead < ct && e2 === q)
|
||||
return 1;
|
||||
if (0 === t2.lookahead)
|
||||
break;
|
||||
}
|
||||
if (a2 = 0, t2.lookahead >= 3 && (t2.ins_h = zt(t2, t2.ins_h, t2.window[t2.strstart + 3 - 1]), a2 = t2.prev[t2.strstart & t2.w_mask] = t2.head[t2.ins_h], t2.head[t2.ins_h] = t2.strstart), t2.prev_length = t2.match_length, t2.prev_match = t2.match_start, t2.match_length = 2, 0 !== a2 && t2.prev_length < t2.max_lazy_match && t2.strstart - a2 <= t2.w_size - ct && (t2.match_length = Ut(t2, a2), t2.match_length <= 5 && (t2.strategy === it || 3 === t2.match_length && t2.strstart - t2.match_start > 4096) && (t2.match_length = 2)), t2.prev_length >= 3 && t2.match_length <= t2.prev_length) {
|
||||
n2 = t2.strstart + t2.lookahead - 3, s2 = X(t2, t2.strstart - 1 - t2.prev_match, t2.prev_length - 3), t2.lookahead -= t2.prev_length - 1, t2.prev_length -= 2;
|
||||
do {
|
||||
++t2.strstart <= n2 && (t2.ins_h = zt(t2, t2.ins_h, t2.window[t2.strstart + 3 - 1]), a2 = t2.prev[t2.strstart & t2.w_mask] = t2.head[t2.ins_h], t2.head[t2.ins_h] = t2.strstart);
|
||||
} while (0 != --t2.prev_length);
|
||||
if (t2.match_available = 0, t2.match_length = 2, t2.strstart++, s2 && (xt(t2, false), 0 === t2.strm.avail_out))
|
||||
return 1;
|
||||
} else if (t2.match_available) {
|
||||
if (s2 = X(t2, 0, t2.window[t2.strstart - 1]), s2 && xt(t2, false), t2.strstart++, t2.lookahead--, 0 === t2.strm.avail_out)
|
||||
return 1;
|
||||
} else
|
||||
t2.match_available = 1, t2.strstart++, t2.lookahead--;
|
||||
}
|
||||
return t2.match_available && (s2 = X(t2, 0, t2.window[t2.strstart - 1]), t2.match_available = 0), t2.insert = t2.strstart < 2 ? t2.strstart : 2, e2 === V ? (xt(t2, true), 0 === t2.strm.avail_out ? 3 : 4) : t2.sym_next && (xt(t2, false), 0 === t2.strm.avail_out) ? 1 : 2;
|
||||
};
|
||||
function Ft(t2, e2, a2, s2, n2) {
|
||||
this.good_length = t2, this.max_lazy = e2, this.nice_length = a2, this.max_chain = s2, this.func = n2;
|
||||
}
|
||||
const Ot = [new Ft(0, 0, 0, 0, St), new Ft(4, 4, 8, 4, Tt), new Ft(4, 5, 16, 8, Tt), new Ft(4, 6, 32, 32, Tt), new Ft(4, 4, 16, 16, Lt), new Ft(8, 16, 32, 32, Lt), new Ft(8, 16, 128, 128, Lt), new Ft(8, 32, 128, 256, Lt), new Ft(32, 128, 258, 1024, Lt), new Ft(32, 258, 258, 4096, Lt)];
|
||||
function Dt() {
|
||||
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 = ut, 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 Uint16Array(1146), this.dyn_dtree = new Uint16Array(122), this.bl_tree = new Uint16Array(78), yt(this.dyn_ltree), yt(this.dyn_dtree), yt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(16), this.heap = new Uint16Array(573), yt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(573), yt(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
||||
}
|
||||
const Nt = (t2) => {
|
||||
if (!t2)
|
||||
return 1;
|
||||
const e2 = t2.state;
|
||||
return !e2 || e2.strm !== t2 || e2.status !== pt && 57 !== e2.status && 69 !== e2.status && 73 !== e2.status && 91 !== e2.status && 103 !== e2.status && e2.status !== gt && e2.status !== wt ? 1 : 0;
|
||||
}, It = (t2) => {
|
||||
if (Nt(t2))
|
||||
return mt(t2, at);
|
||||
t2.total_in = t2.total_out = 0, t2.data_type = dt;
|
||||
const e2 = t2.state;
|
||||
return e2.pending = 0, e2.pending_out = 0, e2.wrap < 0 && (e2.wrap = -e2.wrap), e2.status = 2 === e2.wrap ? 57 : e2.wrap ? pt : gt, t2.adler = 2 === e2.wrap ? 0 : 1, e2.last_flush = -2, K(e2), tt;
|
||||
}, Ct = (t2) => {
|
||||
const e2 = It(t2);
|
||||
var a2;
|
||||
return e2 === tt && ((a2 = t2.state).window_size = 2 * a2.w_size, yt(a2.head), a2.max_lazy_match = Ot[a2.level].max_lazy, a2.good_match = Ot[a2.level].good_length, a2.nice_match = Ot[a2.level].nice_length, a2.max_chain_length = Ot[a2.level].max_chain, a2.strstart = 0, a2.block_start = 0, a2.lookahead = 0, a2.insert = 0, a2.match_length = a2.prev_length = 2, a2.match_available = 0, a2.ins_h = 0), e2;
|
||||
}, Bt = (t2, e2, a2, s2, n2, r2) => {
|
||||
if (!t2)
|
||||
return at;
|
||||
let i2 = 1;
|
||||
if (e2 === rt && (e2 = 6), s2 < 0 ? (i2 = 0, s2 = -s2) : s2 > 15 && (i2 = 2, s2 -= 16), n2 < 1 || n2 > 9 || a2 !== ut || s2 < 8 || s2 > 15 || e2 < 0 || e2 > 9 || r2 < 0 || r2 > ht || 8 === s2 && 1 !== i2)
|
||||
return mt(t2, at);
|
||||
8 === s2 && (s2 = 9);
|
||||
const _2 = new Dt();
|
||||
return t2.state = _2, _2.strm = t2, _2.status = pt, _2.wrap = i2, _2.gzhead = null, _2.w_bits = s2, _2.w_size = 1 << _2.w_bits, _2.w_mask = _2.w_size - 1, _2.hash_bits = n2 + 7, _2.hash_size = 1 << _2.hash_bits, _2.hash_mask = _2.hash_size - 1, _2.hash_shift = ~~((_2.hash_bits + 3 - 1) / 3), _2.window = new Uint8Array(2 * _2.w_size), _2.head = new Uint16Array(_2.hash_size), _2.prev = new Uint16Array(_2.w_size), _2.lit_bufsize = 1 << n2 + 6, _2.pending_buf_size = 4 * _2.lit_bufsize, _2.pending_buf = new Uint8Array(_2.pending_buf_size), _2.sym_buf = _2.lit_bufsize, _2.sym_end = 3 * (_2.lit_bufsize - 1), _2.level = e2, _2.strategy = r2, _2.method = a2, Ct(t2);
|
||||
};
|
||||
var Ht = { deflateInit: (t2, e2) => Bt(t2, e2, ut, 15, 8, ot), deflateInit2: Bt, deflateReset: Ct, deflateResetKeep: It, deflateSetHeader: (t2, e2) => Nt(t2) || 2 !== t2.state.wrap ? at : (t2.state.gzhead = e2, tt), deflate: (t2, e2) => {
|
||||
if (Nt(t2) || e2 > $ || e2 < 0)
|
||||
return t2 ? mt(t2, at) : at;
|
||||
const a2 = t2.state;
|
||||
if (!t2.output || 0 !== t2.avail_in && !t2.input || a2.status === wt && e2 !== V)
|
||||
return mt(t2, 0 === t2.avail_out ? nt : at);
|
||||
const s2 = a2.last_flush;
|
||||
if (a2.last_flush = e2, 0 !== a2.pending) {
|
||||
if (kt(t2), 0 === t2.avail_out)
|
||||
return a2.last_flush = -1, tt;
|
||||
} else if (0 === t2.avail_in && bt(e2) <= bt(s2) && e2 !== V)
|
||||
return mt(t2, nt);
|
||||
if (a2.status === wt && 0 !== t2.avail_in)
|
||||
return mt(t2, nt);
|
||||
if (a2.status === pt && 0 === a2.wrap && (a2.status = gt), a2.status === pt) {
|
||||
let e3 = ut + (a2.w_bits - 8 << 4) << 8, s3 = -1;
|
||||
if (s3 = a2.strategy >= _t || a2.level < 2 ? 0 : a2.level < 6 ? 1 : 6 === a2.level ? 2 : 3, e3 |= s3 << 6, 0 !== a2.strstart && (e3 |= 32), e3 += 31 - e3 % 31, Et(a2, e3), 0 !== a2.strstart && (Et(a2, t2.adler >>> 16), Et(a2, 65535 & t2.adler)), t2.adler = 1, a2.status = gt, kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
}
|
||||
if (57 === a2.status) {
|
||||
if (t2.adler = 0, At(a2, 31), At(a2, 139), At(a2, 8), a2.gzhead)
|
||||
At(a2, (a2.gzhead.text ? 1 : 0) + (a2.gzhead.hcrc ? 2 : 0) + (a2.gzhead.extra ? 4 : 0) + (a2.gzhead.name ? 8 : 0) + (a2.gzhead.comment ? 16 : 0)), At(a2, 255 & a2.gzhead.time), At(a2, a2.gzhead.time >> 8 & 255), At(a2, a2.gzhead.time >> 16 & 255), At(a2, a2.gzhead.time >> 24 & 255), At(a2, 9 === a2.level ? 2 : a2.strategy >= _t || a2.level < 2 ? 4 : 0), At(a2, 255 & a2.gzhead.os), a2.gzhead.extra && a2.gzhead.extra.length && (At(a2, 255 & a2.gzhead.extra.length), At(a2, a2.gzhead.extra.length >> 8 & 255)), a2.gzhead.hcrc && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending, 0)), a2.gzindex = 0, a2.status = 69;
|
||||
else if (At(a2, 0), At(a2, 0), At(a2, 0), At(a2, 0), At(a2, 0), At(a2, 9 === a2.level ? 2 : a2.strategy >= _t || a2.level < 2 ? 4 : 0), At(a2, 3), a2.status = gt, kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
}
|
||||
if (69 === a2.status) {
|
||||
if (a2.gzhead.extra) {
|
||||
let e3 = a2.pending, s3 = (65535 & a2.gzhead.extra.length) - a2.gzindex;
|
||||
for (; a2.pending + s3 > a2.pending_buf_size; ) {
|
||||
let n3 = a2.pending_buf_size - a2.pending;
|
||||
if (a2.pending_buf.set(a2.gzhead.extra.subarray(a2.gzindex, a2.gzindex + n3), a2.pending), a2.pending = a2.pending_buf_size, a2.gzhead.hcrc && a2.pending > e3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - e3, e3)), a2.gzindex += n3, kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
e3 = 0, s3 -= n3;
|
||||
}
|
||||
let n2 = new Uint8Array(a2.gzhead.extra);
|
||||
a2.pending_buf.set(n2.subarray(a2.gzindex, a2.gzindex + s3), a2.pending), a2.pending += s3, a2.gzhead.hcrc && a2.pending > e3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - e3, e3)), a2.gzindex = 0;
|
||||
}
|
||||
a2.status = 73;
|
||||
}
|
||||
if (73 === a2.status) {
|
||||
if (a2.gzhead.name) {
|
||||
let e3, s3 = a2.pending;
|
||||
do {
|
||||
if (a2.pending === a2.pending_buf_size) {
|
||||
if (a2.gzhead.hcrc && a2.pending > s3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - s3, s3)), kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
s3 = 0;
|
||||
}
|
||||
e3 = a2.gzindex < a2.gzhead.name.length ? 255 & a2.gzhead.name.charCodeAt(a2.gzindex++) : 0, At(a2, e3);
|
||||
} while (0 !== e3);
|
||||
a2.gzhead.hcrc && a2.pending > s3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - s3, s3)), a2.gzindex = 0;
|
||||
}
|
||||
a2.status = 91;
|
||||
}
|
||||
if (91 === a2.status) {
|
||||
if (a2.gzhead.comment) {
|
||||
let e3, s3 = a2.pending;
|
||||
do {
|
||||
if (a2.pending === a2.pending_buf_size) {
|
||||
if (a2.gzhead.hcrc && a2.pending > s3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - s3, s3)), kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
s3 = 0;
|
||||
}
|
||||
e3 = a2.gzindex < a2.gzhead.comment.length ? 255 & a2.gzhead.comment.charCodeAt(a2.gzindex++) : 0, At(a2, e3);
|
||||
} while (0 !== e3);
|
||||
a2.gzhead.hcrc && a2.pending > s3 && (t2.adler = M(t2.adler, a2.pending_buf, a2.pending - s3, s3));
|
||||
}
|
||||
a2.status = 103;
|
||||
}
|
||||
if (103 === a2.status) {
|
||||
if (a2.gzhead.hcrc) {
|
||||
if (a2.pending + 2 > a2.pending_buf_size && (kt(t2), 0 !== a2.pending))
|
||||
return a2.last_flush = -1, tt;
|
||||
At(a2, 255 & t2.adler), At(a2, t2.adler >> 8 & 255), t2.adler = 0;
|
||||
}
|
||||
if (a2.status = gt, kt(t2), 0 !== a2.pending)
|
||||
return a2.last_flush = -1, tt;
|
||||
}
|
||||
if (0 !== t2.avail_in || 0 !== a2.lookahead || e2 !== q && a2.status !== wt) {
|
||||
let s3 = 0 === a2.level ? St(a2, e2) : a2.strategy === _t ? ((t3, e3) => {
|
||||
let a3;
|
||||
for (; ; ) {
|
||||
if (0 === t3.lookahead && (Rt(t3), 0 === t3.lookahead)) {
|
||||
if (e3 === q)
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
if (t3.match_length = 0, a3 = X(t3, 0, t3.window[t3.strstart]), t3.lookahead--, t3.strstart++, a3 && (xt(t3, false), 0 === t3.strm.avail_out))
|
||||
return 1;
|
||||
}
|
||||
return t3.insert = 0, e3 === V ? (xt(t3, true), 0 === t3.strm.avail_out ? 3 : 4) : t3.sym_next && (xt(t3, false), 0 === t3.strm.avail_out) ? 1 : 2;
|
||||
})(a2, e2) : a2.strategy === lt ? ((t3, e3) => {
|
||||
let a3, s4, n2, r2;
|
||||
const i2 = t3.window;
|
||||
for (; ; ) {
|
||||
if (t3.lookahead <= ft) {
|
||||
if (Rt(t3), t3.lookahead <= ft && e3 === q)
|
||||
return 1;
|
||||
if (0 === t3.lookahead)
|
||||
break;
|
||||
}
|
||||
if (t3.match_length = 0, t3.lookahead >= 3 && t3.strstart > 0 && (n2 = t3.strstart - 1, s4 = i2[n2], s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2])) {
|
||||
r2 = t3.strstart + ft;
|
||||
do {
|
||||
} while (s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && s4 === i2[++n2] && n2 < r2);
|
||||
t3.match_length = ft - (r2 - n2), t3.match_length > t3.lookahead && (t3.match_length = t3.lookahead);
|
||||
}
|
||||
if (t3.match_length >= 3 ? (a3 = X(t3, 1, t3.match_length - 3), t3.lookahead -= t3.match_length, t3.strstart += t3.match_length, t3.match_length = 0) : (a3 = X(t3, 0, t3.window[t3.strstart]), t3.lookahead--, t3.strstart++), a3 && (xt(t3, false), 0 === t3.strm.avail_out))
|
||||
return 1;
|
||||
}
|
||||
return t3.insert = 0, e3 === V ? (xt(t3, true), 0 === t3.strm.avail_out ? 3 : 4) : t3.sym_next && (xt(t3, false), 0 === t3.strm.avail_out) ? 1 : 2;
|
||||
})(a2, e2) : Ot[a2.level].func(a2, e2);
|
||||
if (3 !== s3 && 4 !== s3 || (a2.status = wt), 1 === s3 || 3 === s3)
|
||||
return 0 === t2.avail_out && (a2.last_flush = -1), tt;
|
||||
if (2 === s3 && (e2 === J ? W(a2) : e2 !== $ && (Y(a2, 0, 0, false), e2 === Q && (yt(a2.head), 0 === a2.lookahead && (a2.strstart = 0, a2.block_start = 0, a2.insert = 0))), kt(t2), 0 === t2.avail_out))
|
||||
return a2.last_flush = -1, tt;
|
||||
}
|
||||
return e2 !== V ? tt : a2.wrap <= 0 ? et : (2 === a2.wrap ? (At(a2, 255 & t2.adler), At(a2, t2.adler >> 8 & 255), At(a2, t2.adler >> 16 & 255), At(a2, t2.adler >> 24 & 255), At(a2, 255 & t2.total_in), At(a2, t2.total_in >> 8 & 255), At(a2, t2.total_in >> 16 & 255), At(a2, t2.total_in >> 24 & 255)) : (Et(a2, t2.adler >>> 16), Et(a2, 65535 & t2.adler)), kt(t2), a2.wrap > 0 && (a2.wrap = -a2.wrap), 0 !== a2.pending ? tt : et);
|
||||
}, deflateEnd: (t2) => {
|
||||
if (Nt(t2))
|
||||
return at;
|
||||
const e2 = t2.state.status;
|
||||
return t2.state = null, e2 === gt ? mt(t2, st) : tt;
|
||||
}, deflateSetDictionary: (t2, e2) => {
|
||||
let a2 = e2.length;
|
||||
if (Nt(t2))
|
||||
return at;
|
||||
const s2 = t2.state, n2 = s2.wrap;
|
||||
if (2 === n2 || 1 === n2 && s2.status !== pt || s2.lookahead)
|
||||
return at;
|
||||
if (1 === n2 && (t2.adler = B(t2.adler, e2, a2, 0)), s2.wrap = 0, a2 >= s2.w_size) {
|
||||
0 === n2 && (yt(s2.head), s2.strstart = 0, s2.block_start = 0, s2.insert = 0);
|
||||
let t3 = new Uint8Array(s2.w_size);
|
||||
t3.set(e2.subarray(a2 - s2.w_size, a2), 0), e2 = t3, a2 = s2.w_size;
|
||||
}
|
||||
const r2 = t2.avail_in, i2 = t2.next_in, _2 = t2.input;
|
||||
for (t2.avail_in = a2, t2.next_in = 0, t2.input = e2, Rt(s2); s2.lookahead >= 3; ) {
|
||||
let t3 = s2.strstart, e3 = s2.lookahead - 2;
|
||||
do {
|
||||
s2.ins_h = zt(s2, s2.ins_h, s2.window[t3 + 3 - 1]), s2.prev[t3 & s2.w_mask] = s2.head[s2.ins_h], s2.head[s2.ins_h] = t3, t3++;
|
||||
} while (--e3);
|
||||
s2.strstart = t3, s2.lookahead = 2, Rt(s2);
|
||||
}
|
||||
return s2.strstart += s2.lookahead, s2.block_start = s2.strstart, s2.insert = s2.lookahead, s2.lookahead = 0, s2.match_length = s2.prev_length = 2, s2.match_available = 0, t2.next_in = i2, t2.input = _2, t2.avail_in = r2, s2.wrap = n2, tt;
|
||||
}, deflateInfo: "pako deflate (from Nodeca project)" };
|
||||
const Mt = (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2);
|
||||
var Pt = function(t2) {
|
||||
const e2 = Array.prototype.slice.call(arguments, 1);
|
||||
for (; e2.length; ) {
|
||||
const a2 = e2.shift();
|
||||
if (a2) {
|
||||
if ("object" != typeof a2)
|
||||
throw new TypeError(a2 + "must be non-object");
|
||||
for (const e3 in a2)
|
||||
Mt(a2, e3) && (t2[e3] = a2[e3]);
|
||||
}
|
||||
}
|
||||
return t2;
|
||||
}, jt = (t2) => {
|
||||
let e2 = 0;
|
||||
for (let a3 = 0, s2 = t2.length; a3 < s2; a3++)
|
||||
e2 += t2[a3].length;
|
||||
const a2 = new Uint8Array(e2);
|
||||
for (let e3 = 0, s2 = 0, n2 = t2.length; e3 < n2; e3++) {
|
||||
let n3 = t2[e3];
|
||||
a2.set(n3, s2), s2 += n3.length;
|
||||
}
|
||||
return a2;
|
||||
};
|
||||
let Kt = true;
|
||||
try {
|
||||
String.fromCharCode.apply(null, new Uint8Array(1));
|
||||
} catch (t2) {
|
||||
Kt = false;
|
||||
}
|
||||
const Yt = new Uint8Array(256);
|
||||
for (let t2 = 0; t2 < 256; t2++)
|
||||
Yt[t2] = t2 >= 252 ? 6 : t2 >= 248 ? 5 : t2 >= 240 ? 4 : t2 >= 224 ? 3 : t2 >= 192 ? 2 : 1;
|
||||
Yt[254] = Yt[254] = 1;
|
||||
var Gt = (t2) => {
|
||||
if ("function" == typeof TextEncoder && TextEncoder.prototype.encode)
|
||||
return new TextEncoder().encode(t2);
|
||||
let e2, a2, s2, n2, r2, i2 = t2.length, _2 = 0;
|
||||
for (n2 = 0; n2 < i2; n2++)
|
||||
a2 = t2.charCodeAt(n2), 55296 == (64512 & a2) && n2 + 1 < i2 && (s2 = t2.charCodeAt(n2 + 1), 56320 == (64512 & s2) && (a2 = 65536 + (a2 - 55296 << 10) + (s2 - 56320), n2++)), _2 += a2 < 128 ? 1 : a2 < 2048 ? 2 : a2 < 65536 ? 3 : 4;
|
||||
for (e2 = new Uint8Array(_2), r2 = 0, n2 = 0; r2 < _2; n2++)
|
||||
a2 = t2.charCodeAt(n2), 55296 == (64512 & a2) && n2 + 1 < i2 && (s2 = t2.charCodeAt(n2 + 1), 56320 == (64512 & s2) && (a2 = 65536 + (a2 - 55296 << 10) + (s2 - 56320), n2++)), a2 < 128 ? e2[r2++] = a2 : a2 < 2048 ? (e2[r2++] = 192 | a2 >>> 6, e2[r2++] = 128 | 63 & a2) : a2 < 65536 ? (e2[r2++] = 224 | a2 >>> 12, e2[r2++] = 128 | a2 >>> 6 & 63, e2[r2++] = 128 | 63 & a2) : (e2[r2++] = 240 | a2 >>> 18, e2[r2++] = 128 | a2 >>> 12 & 63, e2[r2++] = 128 | a2 >>> 6 & 63, e2[r2++] = 128 | 63 & a2);
|
||||
return e2;
|
||||
};
|
||||
var Xt = function() {
|
||||
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;
|
||||
};
|
||||
const Wt = Object.prototype.toString, { Z_NO_FLUSH: qt, Z_SYNC_FLUSH: Jt, Z_FULL_FLUSH: Qt, Z_FINISH: Vt, Z_OK: $t, Z_STREAM_END: te, Z_DEFAULT_COMPRESSION: ee, Z_DEFAULT_STRATEGY: ae, Z_DEFLATED: se } = j;
|
||||
function ne(t2) {
|
||||
this.options = Pt({ level: ee, method: se, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: ae }, t2 || {});
|
||||
let e2 = this.options;
|
||||
e2.raw && e2.windowBits > 0 ? e2.windowBits = -e2.windowBits : e2.gzip && e2.windowBits > 0 && e2.windowBits < 16 && (e2.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new Xt(), this.strm.avail_out = 0;
|
||||
let a2 = Ht.deflateInit2(this.strm, e2.level, e2.method, e2.windowBits, e2.memLevel, e2.strategy);
|
||||
if (a2 !== $t)
|
||||
throw new Error(P[a2]);
|
||||
if (e2.header && Ht.deflateSetHeader(this.strm, e2.header), e2.dictionary) {
|
||||
let t3;
|
||||
if (t3 = "string" == typeof e2.dictionary ? Gt(e2.dictionary) : "[object ArrayBuffer]" === Wt.call(e2.dictionary) ? new Uint8Array(e2.dictionary) : e2.dictionary, a2 = Ht.deflateSetDictionary(this.strm, t3), a2 !== $t)
|
||||
throw new Error(P[a2]);
|
||||
this._dict_set = true;
|
||||
}
|
||||
}
|
||||
function re(t2, e2) {
|
||||
const a2 = new ne(e2);
|
||||
if (a2.push(t2, true), a2.err)
|
||||
throw a2.msg || P[a2.err];
|
||||
return a2.result;
|
||||
}
|
||||
ne.prototype.push = function(t2, e2) {
|
||||
const a2 = this.strm, s2 = this.options.chunkSize;
|
||||
let n2, r2;
|
||||
if (this.ended)
|
||||
return false;
|
||||
for (r2 = e2 === ~~e2 ? e2 : true === e2 ? Vt : qt, "string" == typeof t2 ? a2.input = Gt(t2) : "[object ArrayBuffer]" === Wt.call(t2) ? a2.input = new Uint8Array(t2) : a2.input = t2, a2.next_in = 0, a2.avail_in = a2.input.length; ; )
|
||||
if (0 === a2.avail_out && (a2.output = new Uint8Array(s2), a2.next_out = 0, a2.avail_out = s2), (r2 === Jt || r2 === Qt) && a2.avail_out <= 6)
|
||||
this.onData(a2.output.subarray(0, a2.next_out)), a2.avail_out = 0;
|
||||
else {
|
||||
if (n2 = Ht.deflate(a2, r2), n2 === te)
|
||||
return a2.next_out > 0 && this.onData(a2.output.subarray(0, a2.next_out)), n2 = Ht.deflateEnd(this.strm), this.onEnd(n2), this.ended = true, n2 === $t;
|
||||
if (0 !== a2.avail_out) {
|
||||
if (r2 > 0 && a2.next_out > 0)
|
||||
this.onData(a2.output.subarray(0, a2.next_out)), a2.avail_out = 0;
|
||||
else if (0 === a2.avail_in)
|
||||
break;
|
||||
} else
|
||||
this.onData(a2.output);
|
||||
}
|
||||
return true;
|
||||
}, ne.prototype.onData = function(t2) {
|
||||
this.chunks.push(t2);
|
||||
}, ne.prototype.onEnd = function(t2) {
|
||||
t2 === $t && (this.result = jt(this.chunks)), this.chunks = [], this.err = t2, this.msg = this.strm.msg;
|
||||
};
|
||||
var ie = ne, _e = re, le = function(t2, e2) {
|
||||
return (e2 = e2 || {}).raw = true, re(t2, e2);
|
||||
}, he = function(t2, e2) {
|
||||
return (e2 = e2 || {}).gzip = true, re(t2, e2);
|
||||
}, oe = j, de = { Deflate: ie, deflate: _e, deflateRaw: le, gzip: he, constants: oe };
|
||||
t.Deflate = ie, t.constants = oe, t.default = de, t.deflate = _e, t.deflateRaw = le, t.gzip = he, Object.defineProperty(t, "__esModule", { value: true });
|
||||
});
|
800
public/CesiumUnminified/ThirdParty/Workers/pako_inflate.min.js
vendored
Normal file
800
public/CesiumUnminified/ThirdParty/Workers/pako_inflate.min.js
vendored
Normal file
@ -0,0 +1,800 @@
|
||||
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
|
||||
!function(e, t) {
|
||||
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).pako = {});
|
||||
}(this, function(e) {
|
||||
"use strict";
|
||||
var t = (e2, t2, i2, n2) => {
|
||||
let a2 = 65535 & e2 | 0, r2 = e2 >>> 16 & 65535 | 0, o2 = 0;
|
||||
for (; 0 !== i2; ) {
|
||||
o2 = i2 > 2e3 ? 2e3 : i2, i2 -= o2;
|
||||
do {
|
||||
a2 = a2 + t2[n2++] | 0, r2 = r2 + a2 | 0;
|
||||
} while (--o2);
|
||||
a2 %= 65521, r2 %= 65521;
|
||||
}
|
||||
return a2 | r2 << 16 | 0;
|
||||
};
|
||||
const i = new Uint32Array((() => {
|
||||
let e2, t2 = [];
|
||||
for (var i2 = 0; i2 < 256; i2++) {
|
||||
e2 = i2;
|
||||
for (var n2 = 0; n2 < 8; n2++)
|
||||
e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
|
||||
t2[i2] = e2;
|
||||
}
|
||||
return t2;
|
||||
})());
|
||||
var n = (e2, t2, n2, a2) => {
|
||||
const r2 = i, o2 = a2 + n2;
|
||||
e2 ^= -1;
|
||||
for (let i2 = a2; i2 < o2; i2++)
|
||||
e2 = e2 >>> 8 ^ r2[255 & (e2 ^ t2[i2])];
|
||||
return -1 ^ e2;
|
||||
};
|
||||
const a = 16209;
|
||||
var r = function(e2, t2) {
|
||||
let i2, n2, r2, o2, s2, l2, d2, f2, c2, h2, u2, w2, b2, m2, k2, _2, g2, p2, v2, x2, y2, E2, R2, A2;
|
||||
const Z2 = e2.state;
|
||||
i2 = e2.next_in, R2 = e2.input, n2 = i2 + (e2.avail_in - 5), r2 = e2.next_out, A2 = e2.output, o2 = r2 - (t2 - e2.avail_out), s2 = r2 + (e2.avail_out - 257), l2 = Z2.dmax, d2 = Z2.wsize, f2 = Z2.whave, c2 = Z2.wnext, h2 = Z2.window, u2 = Z2.hold, w2 = Z2.bits, b2 = Z2.lencode, m2 = Z2.distcode, k2 = (1 << Z2.lenbits) - 1, _2 = (1 << Z2.distbits) - 1;
|
||||
e:
|
||||
do {
|
||||
w2 < 15 && (u2 += R2[i2++] << w2, w2 += 8, u2 += R2[i2++] << w2, w2 += 8), g2 = b2[u2 & k2];
|
||||
t:
|
||||
for (; ; ) {
|
||||
if (p2 = g2 >>> 24, u2 >>>= p2, w2 -= p2, p2 = g2 >>> 16 & 255, 0 === p2)
|
||||
A2[r2++] = 65535 & g2;
|
||||
else {
|
||||
if (!(16 & p2)) {
|
||||
if (0 == (64 & p2)) {
|
||||
g2 = b2[(65535 & g2) + (u2 & (1 << p2) - 1)];
|
||||
continue t;
|
||||
}
|
||||
if (32 & p2) {
|
||||
Z2.mode = 16191;
|
||||
break e;
|
||||
}
|
||||
e2.msg = "invalid literal/length code", Z2.mode = a;
|
||||
break e;
|
||||
}
|
||||
v2 = 65535 & g2, p2 &= 15, p2 && (w2 < p2 && (u2 += R2[i2++] << w2, w2 += 8), v2 += u2 & (1 << p2) - 1, u2 >>>= p2, w2 -= p2), w2 < 15 && (u2 += R2[i2++] << w2, w2 += 8, u2 += R2[i2++] << w2, w2 += 8), g2 = m2[u2 & _2];
|
||||
i:
|
||||
for (; ; ) {
|
||||
if (p2 = g2 >>> 24, u2 >>>= p2, w2 -= p2, p2 = g2 >>> 16 & 255, !(16 & p2)) {
|
||||
if (0 == (64 & p2)) {
|
||||
g2 = m2[(65535 & g2) + (u2 & (1 << p2) - 1)];
|
||||
continue i;
|
||||
}
|
||||
e2.msg = "invalid distance code", Z2.mode = a;
|
||||
break e;
|
||||
}
|
||||
if (x2 = 65535 & g2, p2 &= 15, w2 < p2 && (u2 += R2[i2++] << w2, w2 += 8, w2 < p2 && (u2 += R2[i2++] << w2, w2 += 8)), x2 += u2 & (1 << p2) - 1, x2 > l2) {
|
||||
e2.msg = "invalid distance too far back", Z2.mode = a;
|
||||
break e;
|
||||
}
|
||||
if (u2 >>>= p2, w2 -= p2, p2 = r2 - o2, x2 > p2) {
|
||||
if (p2 = x2 - p2, p2 > f2 && Z2.sane) {
|
||||
e2.msg = "invalid distance too far back", Z2.mode = a;
|
||||
break e;
|
||||
}
|
||||
if (y2 = 0, E2 = h2, 0 === c2) {
|
||||
if (y2 += d2 - p2, p2 < v2) {
|
||||
v2 -= p2;
|
||||
do {
|
||||
A2[r2++] = h2[y2++];
|
||||
} while (--p2);
|
||||
y2 = r2 - x2, E2 = A2;
|
||||
}
|
||||
} else if (c2 < p2) {
|
||||
if (y2 += d2 + c2 - p2, p2 -= c2, p2 < v2) {
|
||||
v2 -= p2;
|
||||
do {
|
||||
A2[r2++] = h2[y2++];
|
||||
} while (--p2);
|
||||
if (y2 = 0, c2 < v2) {
|
||||
p2 = c2, v2 -= p2;
|
||||
do {
|
||||
A2[r2++] = h2[y2++];
|
||||
} while (--p2);
|
||||
y2 = r2 - x2, E2 = A2;
|
||||
}
|
||||
}
|
||||
} else if (y2 += c2 - p2, p2 < v2) {
|
||||
v2 -= p2;
|
||||
do {
|
||||
A2[r2++] = h2[y2++];
|
||||
} while (--p2);
|
||||
y2 = r2 - x2, E2 = A2;
|
||||
}
|
||||
for (; v2 > 2; )
|
||||
A2[r2++] = E2[y2++], A2[r2++] = E2[y2++], A2[r2++] = E2[y2++], v2 -= 3;
|
||||
v2 && (A2[r2++] = E2[y2++], v2 > 1 && (A2[r2++] = E2[y2++]));
|
||||
} else {
|
||||
y2 = r2 - x2;
|
||||
do {
|
||||
A2[r2++] = A2[y2++], A2[r2++] = A2[y2++], A2[r2++] = A2[y2++], v2 -= 3;
|
||||
} while (v2 > 2);
|
||||
v2 && (A2[r2++] = A2[y2++], v2 > 1 && (A2[r2++] = A2[y2++]));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while (i2 < n2 && r2 < s2);
|
||||
v2 = w2 >> 3, i2 -= v2, w2 -= v2 << 3, u2 &= (1 << w2) - 1, e2.next_in = i2, e2.next_out = r2, e2.avail_in = i2 < n2 ? n2 - i2 + 5 : 5 - (i2 - n2), e2.avail_out = r2 < s2 ? s2 - r2 + 257 : 257 - (r2 - s2), Z2.hold = u2, Z2.bits = w2;
|
||||
};
|
||||
const o = 15, s = new Uint16Array([3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]), l = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]), d = new Uint16Array([1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]), f = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]);
|
||||
var c = (e2, t2, i2, n2, a2, r2, c2, h2) => {
|
||||
const u2 = h2.bits;
|
||||
let w2, b2, m2, k2, _2, g2, p2 = 0, v2 = 0, x2 = 0, y2 = 0, E2 = 0, R2 = 0, A2 = 0, Z2 = 0, S2 = 0, T2 = 0, O2 = null;
|
||||
const U2 = new Uint16Array(16), D2 = new Uint16Array(16);
|
||||
let I2, B2, N2, C2 = null;
|
||||
for (p2 = 0; p2 <= o; p2++)
|
||||
U2[p2] = 0;
|
||||
for (v2 = 0; v2 < n2; v2++)
|
||||
U2[t2[i2 + v2]]++;
|
||||
for (E2 = u2, y2 = o; y2 >= 1 && 0 === U2[y2]; y2--)
|
||||
;
|
||||
if (E2 > y2 && (E2 = y2), 0 === y2)
|
||||
return a2[r2++] = 20971520, a2[r2++] = 20971520, h2.bits = 1, 0;
|
||||
for (x2 = 1; x2 < y2 && 0 === U2[x2]; x2++)
|
||||
;
|
||||
for (E2 < x2 && (E2 = x2), Z2 = 1, p2 = 1; p2 <= o; p2++)
|
||||
if (Z2 <<= 1, Z2 -= U2[p2], Z2 < 0)
|
||||
return -1;
|
||||
if (Z2 > 0 && (0 === e2 || 1 !== y2))
|
||||
return -1;
|
||||
for (D2[1] = 0, p2 = 1; p2 < o; p2++)
|
||||
D2[p2 + 1] = D2[p2] + U2[p2];
|
||||
for (v2 = 0; v2 < n2; v2++)
|
||||
0 !== t2[i2 + v2] && (c2[D2[t2[i2 + v2]]++] = v2);
|
||||
if (0 === e2 ? (O2 = C2 = c2, g2 = 20) : 1 === e2 ? (O2 = s, C2 = l, g2 = 257) : (O2 = d, C2 = f, g2 = 0), T2 = 0, v2 = 0, p2 = x2, _2 = r2, R2 = E2, A2 = 0, m2 = -1, S2 = 1 << E2, k2 = S2 - 1, 1 === e2 && S2 > 852 || 2 === e2 && S2 > 592)
|
||||
return 1;
|
||||
for (; ; ) {
|
||||
I2 = p2 - A2, c2[v2] + 1 < g2 ? (B2 = 0, N2 = c2[v2]) : c2[v2] >= g2 ? (B2 = C2[c2[v2] - g2], N2 = O2[c2[v2] - g2]) : (B2 = 96, N2 = 0), w2 = 1 << p2 - A2, b2 = 1 << R2, x2 = b2;
|
||||
do {
|
||||
b2 -= w2, a2[_2 + (T2 >> A2) + b2] = I2 << 24 | B2 << 16 | N2 | 0;
|
||||
} while (0 !== b2);
|
||||
for (w2 = 1 << p2 - 1; T2 & w2; )
|
||||
w2 >>= 1;
|
||||
if (0 !== w2 ? (T2 &= w2 - 1, T2 += w2) : T2 = 0, v2++, 0 == --U2[p2]) {
|
||||
if (p2 === y2)
|
||||
break;
|
||||
p2 = t2[i2 + c2[v2]];
|
||||
}
|
||||
if (p2 > E2 && (T2 & k2) !== m2) {
|
||||
for (0 === A2 && (A2 = E2), _2 += x2, R2 = p2 - A2, Z2 = 1 << R2; R2 + A2 < y2 && (Z2 -= U2[R2 + A2], !(Z2 <= 0)); )
|
||||
R2++, Z2 <<= 1;
|
||||
if (S2 += 1 << R2, 1 === e2 && S2 > 852 || 2 === e2 && S2 > 592)
|
||||
return 1;
|
||||
m2 = T2 & k2, a2[m2] = E2 << 24 | R2 << 16 | _2 - r2 | 0;
|
||||
}
|
||||
}
|
||||
return 0 !== T2 && (a2[_2 + T2] = p2 - A2 << 24 | 64 << 16 | 0), h2.bits = E2, 0;
|
||||
}, h = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
||||
const { Z_FINISH: u, Z_BLOCK: w, Z_TREES: b, Z_OK: m, Z_STREAM_END: k, Z_NEED_DICT: _, Z_STREAM_ERROR: g, Z_DATA_ERROR: p, Z_MEM_ERROR: v, Z_BUF_ERROR: x, Z_DEFLATED: y } = h, E = 16180, R = 16190, A = 16191, Z = 16192, S = 16194, T = 16199, O = 16200, U = 16206, D = 16209, I = (e2) => (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
|
||||
function B() {
|
||||
this.strm = null, this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
||||
}
|
||||
const N = (e2) => {
|
||||
if (!e2)
|
||||
return 1;
|
||||
const t2 = e2.state;
|
||||
return !t2 || t2.strm !== e2 || t2.mode < E || t2.mode > 16211 ? 1 : 0;
|
||||
}, C = (e2) => {
|
||||
if (N(e2))
|
||||
return g;
|
||||
const t2 = e2.state;
|
||||
return e2.total_in = e2.total_out = t2.total = 0, e2.msg = "", t2.wrap && (e2.adler = 1 & t2.wrap), t2.mode = E, t2.last = 0, t2.havedict = 0, t2.flags = -1, t2.dmax = 32768, t2.head = null, t2.hold = 0, t2.bits = 0, t2.lencode = t2.lendyn = new Int32Array(852), t2.distcode = t2.distdyn = new Int32Array(592), t2.sane = 1, t2.back = -1, m;
|
||||
}, z = (e2) => {
|
||||
if (N(e2))
|
||||
return g;
|
||||
const t2 = e2.state;
|
||||
return t2.wsize = 0, t2.whave = 0, t2.wnext = 0, C(e2);
|
||||
}, F = (e2, t2) => {
|
||||
let i2;
|
||||
if (N(e2))
|
||||
return g;
|
||||
const n2 = e2.state;
|
||||
return t2 < 0 ? (i2 = 0, t2 = -t2) : (i2 = 5 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || t2 > 15) ? g : (null !== n2.window && n2.wbits !== t2 && (n2.window = null), n2.wrap = i2, n2.wbits = t2, z(e2));
|
||||
}, L = (e2, t2) => {
|
||||
if (!e2)
|
||||
return g;
|
||||
const i2 = new B();
|
||||
e2.state = i2, i2.strm = e2, i2.window = null, i2.mode = E;
|
||||
const n2 = F(e2, t2);
|
||||
return n2 !== m && (e2.state = null), n2;
|
||||
};
|
||||
let M, H, j = true;
|
||||
const K = (e2) => {
|
||||
if (j) {
|
||||
M = new Int32Array(512), H = new Int32Array(32);
|
||||
let t2 = 0;
|
||||
for (; t2 < 144; )
|
||||
e2.lens[t2++] = 8;
|
||||
for (; t2 < 256; )
|
||||
e2.lens[t2++] = 9;
|
||||
for (; t2 < 280; )
|
||||
e2.lens[t2++] = 7;
|
||||
for (; t2 < 288; )
|
||||
e2.lens[t2++] = 8;
|
||||
for (c(1, e2.lens, 0, 288, M, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; )
|
||||
e2.lens[t2++] = 5;
|
||||
c(2, e2.lens, 0, 32, H, 0, e2.work, { bits: 5 }), j = false;
|
||||
}
|
||||
e2.lencode = M, e2.lenbits = 9, e2.distcode = H, e2.distbits = 5;
|
||||
}, P = (e2, t2, i2, n2) => {
|
||||
let a2;
|
||||
const r2 = e2.state;
|
||||
return null === r2.window && (r2.wsize = 1 << r2.wbits, r2.wnext = 0, r2.whave = 0, r2.window = new Uint8Array(r2.wsize)), n2 >= r2.wsize ? (r2.window.set(t2.subarray(i2 - r2.wsize, i2), 0), r2.wnext = 0, r2.whave = r2.wsize) : (a2 = r2.wsize - r2.wnext, a2 > n2 && (a2 = n2), r2.window.set(t2.subarray(i2 - n2, i2 - n2 + a2), r2.wnext), (n2 -= a2) ? (r2.window.set(t2.subarray(i2 - n2, i2), 0), r2.wnext = n2, r2.whave = r2.wsize) : (r2.wnext += a2, r2.wnext === r2.wsize && (r2.wnext = 0), r2.whave < r2.wsize && (r2.whave += a2))), 0;
|
||||
};
|
||||
var Y = { inflateReset: z, inflateReset2: F, inflateResetKeep: C, inflateInit: (e2) => L(e2, 15), inflateInit2: L, inflate: (e2, i2) => {
|
||||
let a2, o2, s2, l2, d2, f2, h2, B2, C2, z2, F2, L2, M2, H2, j2, Y2, G2, X2, W2, q2, J2, Q2, V2 = 0;
|
||||
const $2 = new Uint8Array(4);
|
||||
let ee2, te2;
|
||||
const ie2 = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
||||
if (N(e2) || !e2.output || !e2.input && 0 !== e2.avail_in)
|
||||
return g;
|
||||
a2 = e2.state, a2.mode === A && (a2.mode = Z), d2 = e2.next_out, s2 = e2.output, h2 = e2.avail_out, l2 = e2.next_in, o2 = e2.input, f2 = e2.avail_in, B2 = a2.hold, C2 = a2.bits, z2 = f2, F2 = h2, Q2 = m;
|
||||
e:
|
||||
for (; ; )
|
||||
switch (a2.mode) {
|
||||
case E:
|
||||
if (0 === a2.wrap) {
|
||||
a2.mode = Z;
|
||||
break;
|
||||
}
|
||||
for (; C2 < 16; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (2 & a2.wrap && 35615 === B2) {
|
||||
0 === a2.wbits && (a2.wbits = 15), a2.check = 0, $2[0] = 255 & B2, $2[1] = B2 >>> 8 & 255, a2.check = n(a2.check, $2, 2, 0), B2 = 0, C2 = 0, a2.mode = 16181;
|
||||
break;
|
||||
}
|
||||
if (a2.head && (a2.head.done = false), !(1 & a2.wrap) || (((255 & B2) << 8) + (B2 >> 8)) % 31) {
|
||||
e2.msg = "incorrect header check", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if ((15 & B2) !== y) {
|
||||
e2.msg = "unknown compression method", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (B2 >>>= 4, C2 -= 4, J2 = 8 + (15 & B2), 0 === a2.wbits && (a2.wbits = J2), J2 > 15 || J2 > a2.wbits) {
|
||||
e2.msg = "invalid window size", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.dmax = 1 << a2.wbits, a2.flags = 0, e2.adler = a2.check = 1, a2.mode = 512 & B2 ? 16189 : A, B2 = 0, C2 = 0;
|
||||
break;
|
||||
case 16181:
|
||||
for (; C2 < 16; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (a2.flags = B2, (255 & a2.flags) !== y) {
|
||||
e2.msg = "unknown compression method", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (57344 & a2.flags) {
|
||||
e2.msg = "unknown header flags set", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.head && (a2.head.text = B2 >> 8 & 1), 512 & a2.flags && 4 & a2.wrap && ($2[0] = 255 & B2, $2[1] = B2 >>> 8 & 255, a2.check = n(a2.check, $2, 2, 0)), B2 = 0, C2 = 0, a2.mode = 16182;
|
||||
case 16182:
|
||||
for (; C2 < 32; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.head && (a2.head.time = B2), 512 & a2.flags && 4 & a2.wrap && ($2[0] = 255 & B2, $2[1] = B2 >>> 8 & 255, $2[2] = B2 >>> 16 & 255, $2[3] = B2 >>> 24 & 255, a2.check = n(a2.check, $2, 4, 0)), B2 = 0, C2 = 0, a2.mode = 16183;
|
||||
case 16183:
|
||||
for (; C2 < 16; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.head && (a2.head.xflags = 255 & B2, a2.head.os = B2 >> 8), 512 & a2.flags && 4 & a2.wrap && ($2[0] = 255 & B2, $2[1] = B2 >>> 8 & 255, a2.check = n(a2.check, $2, 2, 0)), B2 = 0, C2 = 0, a2.mode = 16184;
|
||||
case 16184:
|
||||
if (1024 & a2.flags) {
|
||||
for (; C2 < 16; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.length = B2, a2.head && (a2.head.extra_len = B2), 512 & a2.flags && 4 & a2.wrap && ($2[0] = 255 & B2, $2[1] = B2 >>> 8 & 255, a2.check = n(a2.check, $2, 2, 0)), B2 = 0, C2 = 0;
|
||||
} else
|
||||
a2.head && (a2.head.extra = null);
|
||||
a2.mode = 16185;
|
||||
case 16185:
|
||||
if (1024 & a2.flags && (L2 = a2.length, L2 > f2 && (L2 = f2), L2 && (a2.head && (J2 = a2.head.extra_len - a2.length, a2.head.extra || (a2.head.extra = new Uint8Array(a2.head.extra_len)), a2.head.extra.set(o2.subarray(l2, l2 + L2), J2)), 512 & a2.flags && 4 & a2.wrap && (a2.check = n(a2.check, o2, L2, l2)), f2 -= L2, l2 += L2, a2.length -= L2), a2.length))
|
||||
break e;
|
||||
a2.length = 0, a2.mode = 16186;
|
||||
case 16186:
|
||||
if (2048 & a2.flags) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
L2 = 0;
|
||||
do {
|
||||
J2 = o2[l2 + L2++], a2.head && J2 && a2.length < 65536 && (a2.head.name += String.fromCharCode(J2));
|
||||
} while (J2 && L2 < f2);
|
||||
if (512 & a2.flags && 4 & a2.wrap && (a2.check = n(a2.check, o2, L2, l2)), f2 -= L2, l2 += L2, J2)
|
||||
break e;
|
||||
} else
|
||||
a2.head && (a2.head.name = null);
|
||||
a2.length = 0, a2.mode = 16187;
|
||||
case 16187:
|
||||
if (4096 & a2.flags) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
L2 = 0;
|
||||
do {
|
||||
J2 = o2[l2 + L2++], a2.head && J2 && a2.length < 65536 && (a2.head.comment += String.fromCharCode(J2));
|
||||
} while (J2 && L2 < f2);
|
||||
if (512 & a2.flags && 4 & a2.wrap && (a2.check = n(a2.check, o2, L2, l2)), f2 -= L2, l2 += L2, J2)
|
||||
break e;
|
||||
} else
|
||||
a2.head && (a2.head.comment = null);
|
||||
a2.mode = 16188;
|
||||
case 16188:
|
||||
if (512 & a2.flags) {
|
||||
for (; C2 < 16; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (4 & a2.wrap && B2 !== (65535 & a2.check)) {
|
||||
e2.msg = "header crc mismatch", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
B2 = 0, C2 = 0;
|
||||
}
|
||||
a2.head && (a2.head.hcrc = a2.flags >> 9 & 1, a2.head.done = true), e2.adler = a2.check = 0, a2.mode = A;
|
||||
break;
|
||||
case 16189:
|
||||
for (; C2 < 32; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
e2.adler = a2.check = I(B2), B2 = 0, C2 = 0, a2.mode = R;
|
||||
case R:
|
||||
if (0 === a2.havedict)
|
||||
return e2.next_out = d2, e2.avail_out = h2, e2.next_in = l2, e2.avail_in = f2, a2.hold = B2, a2.bits = C2, _;
|
||||
e2.adler = a2.check = 1, a2.mode = A;
|
||||
case A:
|
||||
if (i2 === w || i2 === b)
|
||||
break e;
|
||||
case Z:
|
||||
if (a2.last) {
|
||||
B2 >>>= 7 & C2, C2 -= 7 & C2, a2.mode = U;
|
||||
break;
|
||||
}
|
||||
for (; C2 < 3; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
switch (a2.last = 1 & B2, B2 >>>= 1, C2 -= 1, 3 & B2) {
|
||||
case 0:
|
||||
a2.mode = 16193;
|
||||
break;
|
||||
case 1:
|
||||
if (K(a2), a2.mode = T, i2 === b) {
|
||||
B2 >>>= 2, C2 -= 2;
|
||||
break e;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
a2.mode = 16196;
|
||||
break;
|
||||
case 3:
|
||||
e2.msg = "invalid block type", a2.mode = D;
|
||||
}
|
||||
B2 >>>= 2, C2 -= 2;
|
||||
break;
|
||||
case 16193:
|
||||
for (B2 >>>= 7 & C2, C2 -= 7 & C2; C2 < 32; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if ((65535 & B2) != (B2 >>> 16 ^ 65535)) {
|
||||
e2.msg = "invalid stored block lengths", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (a2.length = 65535 & B2, B2 = 0, C2 = 0, a2.mode = S, i2 === b)
|
||||
break e;
|
||||
case S:
|
||||
a2.mode = 16195;
|
||||
case 16195:
|
||||
if (L2 = a2.length, L2) {
|
||||
if (L2 > f2 && (L2 = f2), L2 > h2 && (L2 = h2), 0 === L2)
|
||||
break e;
|
||||
s2.set(o2.subarray(l2, l2 + L2), d2), f2 -= L2, l2 += L2, h2 -= L2, d2 += L2, a2.length -= L2;
|
||||
break;
|
||||
}
|
||||
a2.mode = A;
|
||||
break;
|
||||
case 16196:
|
||||
for (; C2 < 14; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (a2.nlen = 257 + (31 & B2), B2 >>>= 5, C2 -= 5, a2.ndist = 1 + (31 & B2), B2 >>>= 5, C2 -= 5, a2.ncode = 4 + (15 & B2), B2 >>>= 4, C2 -= 4, a2.nlen > 286 || a2.ndist > 30) {
|
||||
e2.msg = "too many length or distance symbols", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.have = 0, a2.mode = 16197;
|
||||
case 16197:
|
||||
for (; a2.have < a2.ncode; ) {
|
||||
for (; C2 < 3; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.lens[ie2[a2.have++]] = 7 & B2, B2 >>>= 3, C2 -= 3;
|
||||
}
|
||||
for (; a2.have < 19; )
|
||||
a2.lens[ie2[a2.have++]] = 0;
|
||||
if (a2.lencode = a2.lendyn, a2.lenbits = 7, ee2 = { bits: a2.lenbits }, Q2 = c(0, a2.lens, 0, 19, a2.lencode, 0, a2.work, ee2), a2.lenbits = ee2.bits, Q2) {
|
||||
e2.msg = "invalid code lengths set", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.have = 0, a2.mode = 16198;
|
||||
case 16198:
|
||||
for (; a2.have < a2.nlen + a2.ndist; ) {
|
||||
for (; V2 = a2.lencode[B2 & (1 << a2.lenbits) - 1], j2 = V2 >>> 24, Y2 = V2 >>> 16 & 255, G2 = 65535 & V2, !(j2 <= C2); ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (G2 < 16)
|
||||
B2 >>>= j2, C2 -= j2, a2.lens[a2.have++] = G2;
|
||||
else {
|
||||
if (16 === G2) {
|
||||
for (te2 = j2 + 2; C2 < te2; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (B2 >>>= j2, C2 -= j2, 0 === a2.have) {
|
||||
e2.msg = "invalid bit length repeat", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
J2 = a2.lens[a2.have - 1], L2 = 3 + (3 & B2), B2 >>>= 2, C2 -= 2;
|
||||
} else if (17 === G2) {
|
||||
for (te2 = j2 + 3; C2 < te2; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
B2 >>>= j2, C2 -= j2, J2 = 0, L2 = 3 + (7 & B2), B2 >>>= 3, C2 -= 3;
|
||||
} else {
|
||||
for (te2 = j2 + 7; C2 < te2; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
B2 >>>= j2, C2 -= j2, J2 = 0, L2 = 11 + (127 & B2), B2 >>>= 7, C2 -= 7;
|
||||
}
|
||||
if (a2.have + L2 > a2.nlen + a2.ndist) {
|
||||
e2.msg = "invalid bit length repeat", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
for (; L2--; )
|
||||
a2.lens[a2.have++] = J2;
|
||||
}
|
||||
}
|
||||
if (a2.mode === D)
|
||||
break;
|
||||
if (0 === a2.lens[256]) {
|
||||
e2.msg = "invalid code -- missing end-of-block", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (a2.lenbits = 9, ee2 = { bits: a2.lenbits }, Q2 = c(1, a2.lens, 0, a2.nlen, a2.lencode, 0, a2.work, ee2), a2.lenbits = ee2.bits, Q2) {
|
||||
e2.msg = "invalid literal/lengths set", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (a2.distbits = 6, a2.distcode = a2.distdyn, ee2 = { bits: a2.distbits }, Q2 = c(2, a2.lens, a2.nlen, a2.ndist, a2.distcode, 0, a2.work, ee2), a2.distbits = ee2.bits, Q2) {
|
||||
e2.msg = "invalid distances set", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
if (a2.mode = T, i2 === b)
|
||||
break e;
|
||||
case T:
|
||||
a2.mode = O;
|
||||
case O:
|
||||
if (f2 >= 6 && h2 >= 258) {
|
||||
e2.next_out = d2, e2.avail_out = h2, e2.next_in = l2, e2.avail_in = f2, a2.hold = B2, a2.bits = C2, r(e2, F2), d2 = e2.next_out, s2 = e2.output, h2 = e2.avail_out, l2 = e2.next_in, o2 = e2.input, f2 = e2.avail_in, B2 = a2.hold, C2 = a2.bits, a2.mode === A && (a2.back = -1);
|
||||
break;
|
||||
}
|
||||
for (a2.back = 0; V2 = a2.lencode[B2 & (1 << a2.lenbits) - 1], j2 = V2 >>> 24, Y2 = V2 >>> 16 & 255, G2 = 65535 & V2, !(j2 <= C2); ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (Y2 && 0 == (240 & Y2)) {
|
||||
for (X2 = j2, W2 = Y2, q2 = G2; V2 = a2.lencode[q2 + ((B2 & (1 << X2 + W2) - 1) >> X2)], j2 = V2 >>> 24, Y2 = V2 >>> 16 & 255, G2 = 65535 & V2, !(X2 + j2 <= C2); ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
B2 >>>= X2, C2 -= X2, a2.back += X2;
|
||||
}
|
||||
if (B2 >>>= j2, C2 -= j2, a2.back += j2, a2.length = G2, 0 === Y2) {
|
||||
a2.mode = 16205;
|
||||
break;
|
||||
}
|
||||
if (32 & Y2) {
|
||||
a2.back = -1, a2.mode = A;
|
||||
break;
|
||||
}
|
||||
if (64 & Y2) {
|
||||
e2.msg = "invalid literal/length code", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.extra = 15 & Y2, a2.mode = 16201;
|
||||
case 16201:
|
||||
if (a2.extra) {
|
||||
for (te2 = a2.extra; C2 < te2; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.length += B2 & (1 << a2.extra) - 1, B2 >>>= a2.extra, C2 -= a2.extra, a2.back += a2.extra;
|
||||
}
|
||||
a2.was = a2.length, a2.mode = 16202;
|
||||
case 16202:
|
||||
for (; V2 = a2.distcode[B2 & (1 << a2.distbits) - 1], j2 = V2 >>> 24, Y2 = V2 >>> 16 & 255, G2 = 65535 & V2, !(j2 <= C2); ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (0 == (240 & Y2)) {
|
||||
for (X2 = j2, W2 = Y2, q2 = G2; V2 = a2.distcode[q2 + ((B2 & (1 << X2 + W2) - 1) >> X2)], j2 = V2 >>> 24, Y2 = V2 >>> 16 & 255, G2 = 65535 & V2, !(X2 + j2 <= C2); ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
B2 >>>= X2, C2 -= X2, a2.back += X2;
|
||||
}
|
||||
if (B2 >>>= j2, C2 -= j2, a2.back += j2, 64 & Y2) {
|
||||
e2.msg = "invalid distance code", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.offset = G2, a2.extra = 15 & Y2, a2.mode = 16203;
|
||||
case 16203:
|
||||
if (a2.extra) {
|
||||
for (te2 = a2.extra; C2 < te2; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
a2.offset += B2 & (1 << a2.extra) - 1, B2 >>>= a2.extra, C2 -= a2.extra, a2.back += a2.extra;
|
||||
}
|
||||
if (a2.offset > a2.dmax) {
|
||||
e2.msg = "invalid distance too far back", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
a2.mode = 16204;
|
||||
case 16204:
|
||||
if (0 === h2)
|
||||
break e;
|
||||
if (L2 = F2 - h2, a2.offset > L2) {
|
||||
if (L2 = a2.offset - L2, L2 > a2.whave && a2.sane) {
|
||||
e2.msg = "invalid distance too far back", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
L2 > a2.wnext ? (L2 -= a2.wnext, M2 = a2.wsize - L2) : M2 = a2.wnext - L2, L2 > a2.length && (L2 = a2.length), H2 = a2.window;
|
||||
} else
|
||||
H2 = s2, M2 = d2 - a2.offset, L2 = a2.length;
|
||||
L2 > h2 && (L2 = h2), h2 -= L2, a2.length -= L2;
|
||||
do {
|
||||
s2[d2++] = H2[M2++];
|
||||
} while (--L2);
|
||||
0 === a2.length && (a2.mode = O);
|
||||
break;
|
||||
case 16205:
|
||||
if (0 === h2)
|
||||
break e;
|
||||
s2[d2++] = a2.length, h2--, a2.mode = O;
|
||||
break;
|
||||
case U:
|
||||
if (a2.wrap) {
|
||||
for (; C2 < 32; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 |= o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (F2 -= h2, e2.total_out += F2, a2.total += F2, 4 & a2.wrap && F2 && (e2.adler = a2.check = a2.flags ? n(a2.check, s2, F2, d2 - F2) : t(a2.check, s2, F2, d2 - F2)), F2 = h2, 4 & a2.wrap && (a2.flags ? B2 : I(B2)) !== a2.check) {
|
||||
e2.msg = "incorrect data check", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
B2 = 0, C2 = 0;
|
||||
}
|
||||
a2.mode = 16207;
|
||||
case 16207:
|
||||
if (a2.wrap && a2.flags) {
|
||||
for (; C2 < 32; ) {
|
||||
if (0 === f2)
|
||||
break e;
|
||||
f2--, B2 += o2[l2++] << C2, C2 += 8;
|
||||
}
|
||||
if (4 & a2.wrap && B2 !== (4294967295 & a2.total)) {
|
||||
e2.msg = "incorrect length check", a2.mode = D;
|
||||
break;
|
||||
}
|
||||
B2 = 0, C2 = 0;
|
||||
}
|
||||
a2.mode = 16208;
|
||||
case 16208:
|
||||
Q2 = k;
|
||||
break e;
|
||||
case D:
|
||||
Q2 = p;
|
||||
break e;
|
||||
case 16210:
|
||||
return v;
|
||||
default:
|
||||
return g;
|
||||
}
|
||||
return e2.next_out = d2, e2.avail_out = h2, e2.next_in = l2, e2.avail_in = f2, a2.hold = B2, a2.bits = C2, (a2.wsize || F2 !== e2.avail_out && a2.mode < D && (a2.mode < U || i2 !== u)) && P(e2, e2.output, e2.next_out, F2 - e2.avail_out), z2 -= e2.avail_in, F2 -= e2.avail_out, e2.total_in += z2, e2.total_out += F2, a2.total += F2, 4 & a2.wrap && F2 && (e2.adler = a2.check = a2.flags ? n(a2.check, s2, F2, e2.next_out - F2) : t(a2.check, s2, F2, e2.next_out - F2)), e2.data_type = a2.bits + (a2.last ? 64 : 0) + (a2.mode === A ? 128 : 0) + (a2.mode === T || a2.mode === S ? 256 : 0), (0 === z2 && 0 === F2 || i2 === u) && Q2 === m && (Q2 = x), Q2;
|
||||
}, inflateEnd: (e2) => {
|
||||
if (N(e2))
|
||||
return g;
|
||||
let t2 = e2.state;
|
||||
return t2.window && (t2.window = null), e2.state = null, m;
|
||||
}, inflateGetHeader: (e2, t2) => {
|
||||
if (N(e2))
|
||||
return g;
|
||||
const i2 = e2.state;
|
||||
return 0 == (2 & i2.wrap) ? g : (i2.head = t2, t2.done = false, m);
|
||||
}, inflateSetDictionary: (e2, i2) => {
|
||||
const n2 = i2.length;
|
||||
let a2, r2, o2;
|
||||
return N(e2) ? g : (a2 = e2.state, 0 !== a2.wrap && a2.mode !== R ? g : a2.mode === R && (r2 = 1, r2 = t(r2, i2, n2, 0), r2 !== a2.check) ? p : (o2 = P(e2, i2, n2, n2), o2 ? (a2.mode = 16210, v) : (a2.havedict = 1, m)));
|
||||
}, inflateInfo: "pako inflate (from Nodeca project)" };
|
||||
const G = (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2);
|
||||
var X = function(e2) {
|
||||
const t2 = Array.prototype.slice.call(arguments, 1);
|
||||
for (; t2.length; ) {
|
||||
const i2 = t2.shift();
|
||||
if (i2) {
|
||||
if ("object" != typeof i2)
|
||||
throw new TypeError(i2 + "must be non-object");
|
||||
for (const t3 in i2)
|
||||
G(i2, t3) && (e2[t3] = i2[t3]);
|
||||
}
|
||||
}
|
||||
return e2;
|
||||
}, W = (e2) => {
|
||||
let t2 = 0;
|
||||
for (let i3 = 0, n2 = e2.length; i3 < n2; i3++)
|
||||
t2 += e2[i3].length;
|
||||
const i2 = new Uint8Array(t2);
|
||||
for (let t3 = 0, n2 = 0, a2 = e2.length; t3 < a2; t3++) {
|
||||
let a3 = e2[t3];
|
||||
i2.set(a3, n2), n2 += a3.length;
|
||||
}
|
||||
return i2;
|
||||
};
|
||||
let q = true;
|
||||
try {
|
||||
String.fromCharCode.apply(null, new Uint8Array(1));
|
||||
} catch (e2) {
|
||||
q = false;
|
||||
}
|
||||
const J = new Uint8Array(256);
|
||||
for (let e2 = 0; e2 < 256; e2++)
|
||||
J[e2] = e2 >= 252 ? 6 : e2 >= 248 ? 5 : e2 >= 240 ? 4 : e2 >= 224 ? 3 : e2 >= 192 ? 2 : 1;
|
||||
J[254] = J[254] = 1;
|
||||
var Q = (e2) => {
|
||||
if ("function" == typeof TextEncoder && TextEncoder.prototype.encode)
|
||||
return new TextEncoder().encode(e2);
|
||||
let t2, i2, n2, a2, r2, o2 = e2.length, s2 = 0;
|
||||
for (a2 = 0; a2 < o2; a2++)
|
||||
i2 = e2.charCodeAt(a2), 55296 == (64512 & i2) && a2 + 1 < o2 && (n2 = e2.charCodeAt(a2 + 1), 56320 == (64512 & n2) && (i2 = 65536 + (i2 - 55296 << 10) + (n2 - 56320), a2++)), s2 += i2 < 128 ? 1 : i2 < 2048 ? 2 : i2 < 65536 ? 3 : 4;
|
||||
for (t2 = new Uint8Array(s2), r2 = 0, a2 = 0; r2 < s2; a2++)
|
||||
i2 = e2.charCodeAt(a2), 55296 == (64512 & i2) && a2 + 1 < o2 && (n2 = e2.charCodeAt(a2 + 1), 56320 == (64512 & n2) && (i2 = 65536 + (i2 - 55296 << 10) + (n2 - 56320), a2++)), i2 < 128 ? t2[r2++] = i2 : i2 < 2048 ? (t2[r2++] = 192 | i2 >>> 6, t2[r2++] = 128 | 63 & i2) : i2 < 65536 ? (t2[r2++] = 224 | i2 >>> 12, t2[r2++] = 128 | i2 >>> 6 & 63, t2[r2++] = 128 | 63 & i2) : (t2[r2++] = 240 | i2 >>> 18, t2[r2++] = 128 | i2 >>> 12 & 63, t2[r2++] = 128 | i2 >>> 6 & 63, t2[r2++] = 128 | 63 & i2);
|
||||
return t2;
|
||||
}, V = (e2, t2) => {
|
||||
const i2 = t2 || e2.length;
|
||||
if ("function" == typeof TextDecoder && TextDecoder.prototype.decode)
|
||||
return new TextDecoder().decode(e2.subarray(0, t2));
|
||||
let n2, a2;
|
||||
const r2 = new Array(2 * i2);
|
||||
for (a2 = 0, n2 = 0; n2 < i2; ) {
|
||||
let t3 = e2[n2++];
|
||||
if (t3 < 128) {
|
||||
r2[a2++] = t3;
|
||||
continue;
|
||||
}
|
||||
let o2 = J[t3];
|
||||
if (o2 > 4)
|
||||
r2[a2++] = 65533, n2 += o2 - 1;
|
||||
else {
|
||||
for (t3 &= 2 === o2 ? 31 : 3 === o2 ? 15 : 7; o2 > 1 && n2 < i2; )
|
||||
t3 = t3 << 6 | 63 & e2[n2++], o2--;
|
||||
o2 > 1 ? r2[a2++] = 65533 : t3 < 65536 ? r2[a2++] = t3 : (t3 -= 65536, r2[a2++] = 55296 | t3 >> 10 & 1023, r2[a2++] = 56320 | 1023 & t3);
|
||||
}
|
||||
}
|
||||
return ((e3, t3) => {
|
||||
if (t3 < 65534 && e3.subarray && q)
|
||||
return String.fromCharCode.apply(null, e3.length === t3 ? e3 : e3.subarray(0, t3));
|
||||
let i3 = "";
|
||||
for (let n3 = 0; n3 < t3; n3++)
|
||||
i3 += String.fromCharCode(e3[n3]);
|
||||
return i3;
|
||||
})(r2, a2);
|
||||
}, $ = (e2, t2) => {
|
||||
(t2 = t2 || e2.length) > e2.length && (t2 = e2.length);
|
||||
let i2 = t2 - 1;
|
||||
for (; i2 >= 0 && 128 == (192 & e2[i2]); )
|
||||
i2--;
|
||||
return i2 < 0 || 0 === i2 ? t2 : i2 + J[e2[i2]] > t2 ? i2 : t2;
|
||||
}, ee = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
||||
var te = function() {
|
||||
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;
|
||||
};
|
||||
var ie = function() {
|
||||
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
|
||||
};
|
||||
const ne = Object.prototype.toString, { Z_NO_FLUSH: ae, Z_FINISH: re, Z_OK: oe, Z_STREAM_END: se, Z_NEED_DICT: le, Z_STREAM_ERROR: de, Z_DATA_ERROR: fe, Z_MEM_ERROR: ce } = h;
|
||||
function he(e2) {
|
||||
this.options = X({ chunkSize: 65536, windowBits: 15, to: "" }, e2 || {});
|
||||
const t2 = this.options;
|
||||
t2.raw && t2.windowBits >= 0 && t2.windowBits < 16 && (t2.windowBits = -t2.windowBits, 0 === t2.windowBits && (t2.windowBits = -15)), !(t2.windowBits >= 0 && t2.windowBits < 16) || e2 && e2.windowBits || (t2.windowBits += 32), t2.windowBits > 15 && t2.windowBits < 48 && 0 == (15 & t2.windowBits) && (t2.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new te(), this.strm.avail_out = 0;
|
||||
let i2 = Y.inflateInit2(this.strm, t2.windowBits);
|
||||
if (i2 !== oe)
|
||||
throw new Error(ee[i2]);
|
||||
if (this.header = new ie(), Y.inflateGetHeader(this.strm, this.header), t2.dictionary && ("string" == typeof t2.dictionary ? t2.dictionary = Q(t2.dictionary) : "[object ArrayBuffer]" === ne.call(t2.dictionary) && (t2.dictionary = new Uint8Array(t2.dictionary)), t2.raw && (i2 = Y.inflateSetDictionary(this.strm, t2.dictionary), i2 !== oe)))
|
||||
throw new Error(ee[i2]);
|
||||
}
|
||||
function ue(e2, t2) {
|
||||
const i2 = new he(t2);
|
||||
if (i2.push(e2), i2.err)
|
||||
throw i2.msg || ee[i2.err];
|
||||
return i2.result;
|
||||
}
|
||||
he.prototype.push = function(e2, t2) {
|
||||
const i2 = this.strm, n2 = this.options.chunkSize, a2 = this.options.dictionary;
|
||||
let r2, o2, s2;
|
||||
if (this.ended)
|
||||
return false;
|
||||
for (o2 = t2 === ~~t2 ? t2 : true === t2 ? re : ae, "[object ArrayBuffer]" === ne.call(e2) ? i2.input = new Uint8Array(e2) : i2.input = e2, i2.next_in = 0, i2.avail_in = i2.input.length; ; ) {
|
||||
for (0 === i2.avail_out && (i2.output = new Uint8Array(n2), i2.next_out = 0, i2.avail_out = n2), r2 = Y.inflate(i2, o2), r2 === le && a2 && (r2 = Y.inflateSetDictionary(i2, a2), r2 === oe ? r2 = Y.inflate(i2, o2) : r2 === fe && (r2 = le)); i2.avail_in > 0 && r2 === se && i2.state.wrap > 0 && 0 !== e2[i2.next_in]; )
|
||||
Y.inflateReset(i2), r2 = Y.inflate(i2, o2);
|
||||
switch (r2) {
|
||||
case de:
|
||||
case fe:
|
||||
case le:
|
||||
case ce:
|
||||
return this.onEnd(r2), this.ended = true, false;
|
||||
}
|
||||
if (s2 = i2.avail_out, i2.next_out && (0 === i2.avail_out || r2 === se))
|
||||
if ("string" === this.options.to) {
|
||||
let e3 = $(i2.output, i2.next_out), t3 = i2.next_out - e3, a3 = V(i2.output, e3);
|
||||
i2.next_out = t3, i2.avail_out = n2 - t3, t3 && i2.output.set(i2.output.subarray(e3, e3 + t3), 0), this.onData(a3);
|
||||
} else
|
||||
this.onData(i2.output.length === i2.next_out ? i2.output : i2.output.subarray(0, i2.next_out));
|
||||
if (r2 !== oe || 0 !== s2) {
|
||||
if (r2 === se)
|
||||
return r2 = Y.inflateEnd(this.strm), this.onEnd(r2), this.ended = true, true;
|
||||
if (0 === i2.avail_in)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}, he.prototype.onData = function(e2) {
|
||||
this.chunks.push(e2);
|
||||
}, he.prototype.onEnd = function(e2) {
|
||||
e2 === oe && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = W(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
||||
};
|
||||
var we = he, be = ue, me = function(e2, t2) {
|
||||
return (t2 = t2 || {}).raw = true, ue(e2, t2);
|
||||
}, ke = ue, _e = h, ge = { Inflate: we, inflate: be, inflateRaw: me, ungzip: ke, constants: _e };
|
||||
e.Inflate = we, e.constants = _e, e.default = ge, e.inflate = be, e.inflateRaw = me, e.ungzip = ke, Object.defineProperty(e, "__esModule", { value: true });
|
||||
});
|
660
public/CesiumUnminified/ThirdParty/Workers/z-worker-pako.js
vendored
Normal file
660
public/CesiumUnminified/ThirdParty/Workers/z-worker-pako.js
vendored
Normal file
@ -0,0 +1,660 @@
|
||||
!function() {
|
||||
"use strict";
|
||||
const { Array: e, Object: t, Number: n, Math: s, Error: r, Uint8Array: a, Uint16Array: o, Uint32Array: i, Int32Array: c, Map: l, DataView: u, Promise: h, TextEncoder: f, crypto: p, postMessage: d, TransformStream: g, ReadableStream: w, WritableStream: y, CompressionStream: m, DecompressionStream: _ } = self, b = void 0, S = "undefined", v = "function";
|
||||
class k {
|
||||
constructor(e2) {
|
||||
return class extends g {
|
||||
constructor(t2, n2) {
|
||||
const s2 = new e2(n2);
|
||||
super({ transform(e3, t3) {
|
||||
t3.enqueue(s2.append(e3));
|
||||
}, flush(e3) {
|
||||
const t3 = s2.flush();
|
||||
t3 && e3.enqueue(t3);
|
||||
} });
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
const z = [];
|
||||
for (let e2 = 0; 256 > e2; e2++) {
|
||||
let t2 = e2;
|
||||
for (let e3 = 0; 8 > e3; e3++)
|
||||
1 & t2 ? t2 = t2 >>> 1 ^ 3988292384 : t2 >>>= 1;
|
||||
z[e2] = t2;
|
||||
}
|
||||
class D {
|
||||
constructor(e2) {
|
||||
this.crc = e2 || -1;
|
||||
}
|
||||
append(e2) {
|
||||
let t2 = 0 | this.crc;
|
||||
for (let n2 = 0, s2 = 0 | e2.length; s2 > n2; n2++)
|
||||
t2 = t2 >>> 8 ^ z[255 & (t2 ^ e2[n2])];
|
||||
this.crc = t2;
|
||||
}
|
||||
get() {
|
||||
return ~this.crc;
|
||||
}
|
||||
}
|
||||
class C extends g {
|
||||
constructor() {
|
||||
let e2;
|
||||
const t2 = new D();
|
||||
super({ transform(e3, n2) {
|
||||
t2.append(e3), n2.enqueue(e3);
|
||||
}, flush() {
|
||||
const n2 = new a(4);
|
||||
new u(n2.buffer).setUint32(0, t2.get()), e2.value = n2;
|
||||
} }), e2 = this;
|
||||
}
|
||||
}
|
||||
const I = { concat(e2, t2) {
|
||||
if (0 === e2.length || 0 === t2.length)
|
||||
return e2.concat(t2);
|
||||
const n2 = e2[e2.length - 1], s2 = I.getPartial(n2);
|
||||
return 32 === s2 ? e2.concat(t2) : I._shiftRight(t2, s2, 0 | n2, e2.slice(0, e2.length - 1));
|
||||
}, bitLength(e2) {
|
||||
const t2 = e2.length;
|
||||
if (0 === t2)
|
||||
return 0;
|
||||
const n2 = e2[t2 - 1];
|
||||
return 32 * (t2 - 1) + I.getPartial(n2);
|
||||
}, clamp(e2, t2) {
|
||||
if (32 * e2.length < t2)
|
||||
return e2;
|
||||
const n2 = (e2 = e2.slice(0, s.ceil(t2 / 32))).length;
|
||||
return t2 &= 31, n2 > 0 && t2 && (e2[n2 - 1] = I.partial(t2, e2[n2 - 1] & 2147483648 >> t2 - 1, 1)), e2;
|
||||
}, partial: (e2, t2, n2) => 32 === e2 ? t2 : (n2 ? 0 | t2 : t2 << 32 - e2) + 1099511627776 * e2, getPartial: (e2) => s.round(e2 / 1099511627776) || 32, _shiftRight(e2, t2, n2, s2) {
|
||||
for (void 0 === s2 && (s2 = []); t2 >= 32; t2 -= 32)
|
||||
s2.push(n2), n2 = 0;
|
||||
if (0 === t2)
|
||||
return s2.concat(e2);
|
||||
for (let r3 = 0; r3 < e2.length; r3++)
|
||||
s2.push(n2 | e2[r3] >>> t2), n2 = e2[r3] << 32 - t2;
|
||||
const r2 = e2.length ? e2[e2.length - 1] : 0, a2 = I.getPartial(r2);
|
||||
return s2.push(I.partial(t2 + a2 & 31, t2 + a2 > 32 ? n2 : s2.pop(), 1)), s2;
|
||||
} }, A = { bytes: { fromBits(e2) {
|
||||
const t2 = I.bitLength(e2) / 8, n2 = new a(t2);
|
||||
let s2;
|
||||
for (let r2 = 0; t2 > r2; r2++)
|
||||
3 & r2 || (s2 = e2[r2 / 4]), n2[r2] = s2 >>> 24, s2 <<= 8;
|
||||
return n2;
|
||||
}, toBits(e2) {
|
||||
const t2 = [];
|
||||
let n2, s2 = 0;
|
||||
for (n2 = 0; n2 < e2.length; n2++)
|
||||
s2 = s2 << 8 | e2[n2], 3 & ~n2 || (t2.push(s2), s2 = 0);
|
||||
return 3 & n2 && t2.push(I.partial(8 * (3 & n2), s2)), t2;
|
||||
} } }, q = class {
|
||||
constructor(e2) {
|
||||
const t2 = this;
|
||||
t2.blockSize = 512, t2._init = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], t2._key = [1518500249, 1859775393, 2400959708, 3395469782], e2 ? (t2._h = e2._h.slice(0), t2._buffer = e2._buffer.slice(0), t2._length = e2._length) : t2.reset();
|
||||
}
|
||||
reset() {
|
||||
const e2 = this;
|
||||
return e2._h = e2._init.slice(0), e2._buffer = [], e2._length = 0, e2;
|
||||
}
|
||||
update(e2) {
|
||||
const t2 = this;
|
||||
"string" == typeof e2 && (e2 = A.utf8String.toBits(e2));
|
||||
const n2 = t2._buffer = I.concat(t2._buffer, e2), s2 = t2._length, a2 = t2._length = s2 + I.bitLength(e2);
|
||||
if (a2 > 9007199254740991)
|
||||
throw new r("Cannot hash more than 2^53 - 1 bits");
|
||||
const o2 = new i(n2);
|
||||
let c2 = 0;
|
||||
for (let e3 = t2.blockSize + s2 - (t2.blockSize + s2 & t2.blockSize - 1); a2 >= e3; e3 += t2.blockSize)
|
||||
t2._block(o2.subarray(16 * c2, 16 * (c2 + 1))), c2 += 1;
|
||||
return n2.splice(0, 16 * c2), t2;
|
||||
}
|
||||
finalize() {
|
||||
const e2 = this;
|
||||
let t2 = e2._buffer;
|
||||
const n2 = e2._h;
|
||||
t2 = I.concat(t2, [I.partial(1, 1)]);
|
||||
for (let e3 = t2.length + 2; 15 & e3; e3++)
|
||||
t2.push(0);
|
||||
for (t2.push(s.floor(e2._length / 4294967296)), t2.push(0 | e2._length); t2.length; )
|
||||
e2._block(t2.splice(0, 16));
|
||||
return e2.reset(), n2;
|
||||
}
|
||||
_f(e2, t2, n2, s2) {
|
||||
return e2 > 19 ? e2 > 39 ? e2 > 59 ? e2 > 79 ? void 0 : t2 ^ n2 ^ s2 : t2 & n2 | t2 & s2 | n2 & s2 : t2 ^ n2 ^ s2 : t2 & n2 | ~t2 & s2;
|
||||
}
|
||||
_S(e2, t2) {
|
||||
return t2 << e2 | t2 >>> 32 - e2;
|
||||
}
|
||||
_block(t2) {
|
||||
const n2 = this, r2 = n2._h, a2 = e(80);
|
||||
for (let e2 = 0; 16 > e2; e2++)
|
||||
a2[e2] = t2[e2];
|
||||
let o2 = r2[0], i2 = r2[1], c2 = r2[2], l2 = r2[3], u2 = r2[4];
|
||||
for (let e2 = 0; 79 >= e2; e2++) {
|
||||
16 > e2 || (a2[e2] = n2._S(1, a2[e2 - 3] ^ a2[e2 - 8] ^ a2[e2 - 14] ^ a2[e2 - 16]));
|
||||
const t3 = n2._S(5, o2) + n2._f(e2, i2, c2, l2) + u2 + a2[e2] + n2._key[s.floor(e2 / 20)] | 0;
|
||||
u2 = l2, l2 = c2, c2 = n2._S(30, i2), i2 = o2, o2 = t3;
|
||||
}
|
||||
r2[0] = r2[0] + o2 | 0, r2[1] = r2[1] + i2 | 0, r2[2] = r2[2] + c2 | 0, r2[3] = r2[3] + l2 | 0, r2[4] = r2[4] + u2 | 0;
|
||||
}
|
||||
}, R = { getRandomValues(e2) {
|
||||
const t2 = new i(e2.buffer), n2 = (e3) => {
|
||||
let t3 = 987654321;
|
||||
const n3 = 4294967295;
|
||||
return () => (t3 = 36969 * (65535 & t3) + (t3 >> 16) & n3, (((t3 << 16) + (e3 = 18e3 * (65535 & e3) + (e3 >> 16) & n3) & n3) / 4294967296 + 0.5) * (s.random() > 0.5 ? 1 : -1));
|
||||
};
|
||||
for (let r2, a2 = 0; a2 < e2.length; a2 += 4) {
|
||||
const e3 = n2(4294967296 * (r2 || s.random()));
|
||||
r2 = 987654071 * e3(), t2[a2 / 4] = 4294967296 * e3() | 0;
|
||||
}
|
||||
return e2;
|
||||
} }, H = { importKey: (e2) => new H.hmacSha1(A.bytes.toBits(e2)), pbkdf2(e2, t2, n2, s2) {
|
||||
if (n2 = n2 || 1e4, 0 > s2 || 0 > n2)
|
||||
throw new r("invalid params to pbkdf2");
|
||||
const a2 = 1 + (s2 >> 5) << 2;
|
||||
let o2, i2, c2, l2, h2;
|
||||
const f2 = new ArrayBuffer(a2), p2 = new u(f2);
|
||||
let d2 = 0;
|
||||
const g2 = I;
|
||||
for (t2 = A.bytes.toBits(t2), h2 = 1; (a2 || 1) > d2; h2++) {
|
||||
for (o2 = i2 = e2.encrypt(g2.concat(t2, [h2])), c2 = 1; n2 > c2; c2++)
|
||||
for (i2 = e2.encrypt(i2), l2 = 0; l2 < i2.length; l2++)
|
||||
o2[l2] ^= i2[l2];
|
||||
for (c2 = 0; (a2 || 1) > d2 && c2 < o2.length; c2++)
|
||||
p2.setInt32(d2, o2[c2]), d2 += 4;
|
||||
}
|
||||
return f2.slice(0, s2 / 8);
|
||||
}, hmacSha1: class {
|
||||
constructor(e2) {
|
||||
const t2 = this, n2 = t2._hash = q, s2 = [[], []];
|
||||
t2._baseHash = [new n2(), new n2()];
|
||||
const r2 = t2._baseHash[0].blockSize / 32;
|
||||
e2.length > r2 && (e2 = new n2().update(e2).finalize());
|
||||
for (let t3 = 0; r2 > t3; t3++)
|
||||
s2[0][t3] = 909522486 ^ e2[t3], s2[1][t3] = 1549556828 ^ e2[t3];
|
||||
t2._baseHash[0].update(s2[0]), t2._baseHash[1].update(s2[1]), t2._resultHash = new n2(t2._baseHash[0]);
|
||||
}
|
||||
reset() {
|
||||
const e2 = this;
|
||||
e2._resultHash = new e2._hash(e2._baseHash[0]), e2._updated = false;
|
||||
}
|
||||
update(e2) {
|
||||
this._updated = true, this._resultHash.update(e2);
|
||||
}
|
||||
digest() {
|
||||
const e2 = this, t2 = e2._resultHash.finalize(), n2 = new e2._hash(e2._baseHash[1]).update(t2).finalize();
|
||||
return e2.reset(), n2;
|
||||
}
|
||||
encrypt(e2) {
|
||||
if (this._updated)
|
||||
throw new r("encrypt on already updated hmac called!");
|
||||
return this.update(e2), this.digest(e2);
|
||||
}
|
||||
} }, P = typeof p != S && typeof p.getRandomValues == v, B = "Invalid password", K = "Invalid signature", T = "zipjs-abort-check-password";
|
||||
function V(e2) {
|
||||
return P ? p.getRandomValues(e2) : R.getRandomValues(e2);
|
||||
}
|
||||
const x = 16, E = { name: "PBKDF2" }, U = t.assign({ hash: { name: "HMAC" } }, E), W = t.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, E), M = ["deriveBits"], N = [8, 12, 16], O = [16, 24, 32], L = 10, F = [0, 0, 0, 0], j = typeof p != S, G = j && p.subtle, X = j && typeof G != S, J = A.bytes, Q = class {
|
||||
constructor(e2) {
|
||||
const t2 = this;
|
||||
t2._tables = [[[], [], [], [], []], [[], [], [], [], []]], t2._tables[0][0][0] || t2._precompute();
|
||||
const n2 = t2._tables[0][4], s2 = t2._tables[1], a2 = e2.length;
|
||||
let o2, i2, c2, l2 = 1;
|
||||
if (4 !== a2 && 6 !== a2 && 8 !== a2)
|
||||
throw new r("invalid aes key size");
|
||||
for (t2._key = [i2 = e2.slice(0), c2 = []], o2 = a2; 4 * a2 + 28 > o2; o2++) {
|
||||
let e3 = i2[o2 - 1];
|
||||
(o2 % a2 == 0 || 8 === a2 && o2 % a2 == 4) && (e3 = n2[e3 >>> 24] << 24 ^ n2[e3 >> 16 & 255] << 16 ^ n2[e3 >> 8 & 255] << 8 ^ n2[255 & e3], o2 % a2 == 0 && (e3 = e3 << 8 ^ e3 >>> 24 ^ l2 << 24, l2 = l2 << 1 ^ 283 * (l2 >> 7))), i2[o2] = i2[o2 - a2] ^ e3;
|
||||
}
|
||||
for (let e3 = 0; o2; e3++, o2--) {
|
||||
const t3 = i2[3 & e3 ? o2 : o2 - 4];
|
||||
c2[e3] = 4 >= o2 || 4 > e3 ? t3 : s2[0][n2[t3 >>> 24]] ^ s2[1][n2[t3 >> 16 & 255]] ^ s2[2][n2[t3 >> 8 & 255]] ^ s2[3][n2[255 & t3]];
|
||||
}
|
||||
}
|
||||
encrypt(e2) {
|
||||
return this._crypt(e2, 0);
|
||||
}
|
||||
decrypt(e2) {
|
||||
return this._crypt(e2, 1);
|
||||
}
|
||||
_precompute() {
|
||||
const e2 = this._tables[0], t2 = this._tables[1], n2 = e2[4], s2 = t2[4], r2 = [], a2 = [];
|
||||
let o2, i2, c2, l2;
|
||||
for (let e3 = 0; 256 > e3; e3++)
|
||||
a2[(r2[e3] = e3 << 1 ^ 283 * (e3 >> 7)) ^ e3] = e3;
|
||||
for (let u2 = o2 = 0; !n2[u2]; u2 ^= i2 || 1, o2 = a2[o2] || 1) {
|
||||
let a3 = o2 ^ o2 << 1 ^ o2 << 2 ^ o2 << 3 ^ o2 << 4;
|
||||
a3 = a3 >> 8 ^ 255 & a3 ^ 99, n2[u2] = a3, s2[a3] = u2, l2 = r2[c2 = r2[i2 = r2[u2]]];
|
||||
let h2 = 16843009 * l2 ^ 65537 * c2 ^ 257 * i2 ^ 16843008 * u2, f2 = 257 * r2[a3] ^ 16843008 * a3;
|
||||
for (let n3 = 0; 4 > n3; n3++)
|
||||
e2[n3][u2] = f2 = f2 << 24 ^ f2 >>> 8, t2[n3][a3] = h2 = h2 << 24 ^ h2 >>> 8;
|
||||
}
|
||||
for (let n3 = 0; 5 > n3; n3++)
|
||||
e2[n3] = e2[n3].slice(0), t2[n3] = t2[n3].slice(0);
|
||||
}
|
||||
_crypt(e2, t2) {
|
||||
if (4 !== e2.length)
|
||||
throw new r("invalid aes block size");
|
||||
const n2 = this._key[t2], s2 = n2.length / 4 - 2, a2 = [0, 0, 0, 0], o2 = this._tables[t2], i2 = o2[0], c2 = o2[1], l2 = o2[2], u2 = o2[3], h2 = o2[4];
|
||||
let f2, p2, d2, g2 = e2[0] ^ n2[0], w2 = e2[t2 ? 3 : 1] ^ n2[1], y2 = e2[2] ^ n2[2], m2 = e2[t2 ? 1 : 3] ^ n2[3], _2 = 4;
|
||||
for (let e3 = 0; s2 > e3; e3++)
|
||||
f2 = i2[g2 >>> 24] ^ c2[w2 >> 16 & 255] ^ l2[y2 >> 8 & 255] ^ u2[255 & m2] ^ n2[_2], p2 = i2[w2 >>> 24] ^ c2[y2 >> 16 & 255] ^ l2[m2 >> 8 & 255] ^ u2[255 & g2] ^ n2[_2 + 1], d2 = i2[y2 >>> 24] ^ c2[m2 >> 16 & 255] ^ l2[g2 >> 8 & 255] ^ u2[255 & w2] ^ n2[_2 + 2], m2 = i2[m2 >>> 24] ^ c2[g2 >> 16 & 255] ^ l2[w2 >> 8 & 255] ^ u2[255 & y2] ^ n2[_2 + 3], _2 += 4, g2 = f2, w2 = p2, y2 = d2;
|
||||
for (let e3 = 0; 4 > e3; e3++)
|
||||
a2[t2 ? 3 & -e3 : e3] = h2[g2 >>> 24] << 24 ^ h2[w2 >> 16 & 255] << 16 ^ h2[y2 >> 8 & 255] << 8 ^ h2[255 & m2] ^ n2[_2++], f2 = g2, g2 = w2, w2 = y2, y2 = m2, m2 = f2;
|
||||
return a2;
|
||||
}
|
||||
}, Y = class {
|
||||
constructor(e2, t2) {
|
||||
this._prf = e2, this._initIv = t2, this._iv = t2;
|
||||
}
|
||||
reset() {
|
||||
this._iv = this._initIv;
|
||||
}
|
||||
update(e2) {
|
||||
return this.calculate(this._prf, e2, this._iv);
|
||||
}
|
||||
incWord(e2) {
|
||||
if (255 & ~(e2 >> 24))
|
||||
e2 += 1 << 24;
|
||||
else {
|
||||
let t2 = e2 >> 16 & 255, n2 = e2 >> 8 & 255, s2 = 255 & e2;
|
||||
255 === t2 ? (t2 = 0, 255 === n2 ? (n2 = 0, 255 === s2 ? s2 = 0 : ++s2) : ++n2) : ++t2, e2 = 0, e2 += t2 << 16, e2 += n2 << 8, e2 += s2;
|
||||
}
|
||||
return e2;
|
||||
}
|
||||
incCounter(e2) {
|
||||
0 === (e2[0] = this.incWord(e2[0])) && (e2[1] = this.incWord(e2[1]));
|
||||
}
|
||||
calculate(e2, t2, n2) {
|
||||
let s2;
|
||||
if (!(s2 = t2.length))
|
||||
return [];
|
||||
const r2 = I.bitLength(t2);
|
||||
for (let r3 = 0; s2 > r3; r3 += 4) {
|
||||
this.incCounter(n2);
|
||||
const s3 = e2.encrypt(n2);
|
||||
t2[r3] ^= s3[0], t2[r3 + 1] ^= s3[1], t2[r3 + 2] ^= s3[2], t2[r3 + 3] ^= s3[3];
|
||||
}
|
||||
return I.clamp(t2, r2);
|
||||
}
|
||||
}, Z = H.hmacSha1;
|
||||
let $ = j && X && typeof G.importKey == v, ee = j && X && typeof G.deriveBits == v;
|
||||
class te extends g {
|
||||
constructor({ password: e2, rawPassword: n2, signed: s2, encryptionStrength: o2, checkPasswordOnly: i2 }) {
|
||||
super({ start() {
|
||||
t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: ae(e2, n2), signed: s2, strength: o2 - 1, pending: new a() });
|
||||
}, async transform(e3, t2) {
|
||||
const n3 = this, { password: s3, strength: o3, resolveReady: c2, ready: l2 } = n3;
|
||||
s3 ? (await (async (e4, t3, n4, s4) => {
|
||||
const a2 = await re(e4, t3, n4, ie(s4, 0, N[t3])), o4 = ie(s4, N[t3]);
|
||||
if (a2[0] != o4[0] || a2[1] != o4[1])
|
||||
throw new r(B);
|
||||
})(n3, o3, s3, ie(e3, 0, N[o3] + 2)), e3 = ie(e3, N[o3] + 2), i2 ? t2.error(new r(T)) : c2()) : await l2;
|
||||
const u2 = new a(e3.length - L - (e3.length - L) % x);
|
||||
t2.enqueue(se(n3, e3, u2, 0, L, true));
|
||||
}, async flush(e3) {
|
||||
const { signed: t2, ctr: n3, hmac: s3, pending: o3, ready: i3 } = this;
|
||||
if (s3 && n3) {
|
||||
await i3;
|
||||
const c2 = ie(o3, 0, o3.length - L), l2 = ie(o3, o3.length - L);
|
||||
let u2 = new a();
|
||||
if (c2.length) {
|
||||
const e4 = le(J, c2);
|
||||
s3.update(e4);
|
||||
const t3 = n3.update(e4);
|
||||
u2 = ce(J, t3);
|
||||
}
|
||||
if (t2) {
|
||||
const e4 = ie(ce(J, s3.digest()), 0, L);
|
||||
for (let t3 = 0; L > t3; t3++)
|
||||
if (e4[t3] != l2[t3])
|
||||
throw new r(K);
|
||||
}
|
||||
e3.enqueue(u2);
|
||||
}
|
||||
} });
|
||||
}
|
||||
}
|
||||
class ne extends g {
|
||||
constructor({ password: e2, rawPassword: n2, encryptionStrength: s2 }) {
|
||||
let r2;
|
||||
super({ start() {
|
||||
t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: ae(e2, n2), strength: s2 - 1, pending: new a() });
|
||||
}, async transform(e3, t2) {
|
||||
const n3 = this, { password: s3, strength: r3, resolveReady: o2, ready: i2 } = n3;
|
||||
let c2 = new a();
|
||||
s3 ? (c2 = await (async (e4, t3, n4) => {
|
||||
const s4 = V(new a(N[t3]));
|
||||
return oe(s4, await re(e4, t3, n4, s4));
|
||||
})(n3, r3, s3), o2()) : await i2;
|
||||
const l2 = new a(c2.length + e3.length - e3.length % x);
|
||||
l2.set(c2, 0), t2.enqueue(se(n3, e3, l2, c2.length, 0));
|
||||
}, async flush(e3) {
|
||||
const { ctr: t2, hmac: n3, pending: s3, ready: o2 } = this;
|
||||
if (n3 && t2) {
|
||||
await o2;
|
||||
let i2 = new a();
|
||||
if (s3.length) {
|
||||
const e4 = t2.update(le(J, s3));
|
||||
n3.update(e4), i2 = ce(J, e4);
|
||||
}
|
||||
r2.signature = ce(J, n3.digest()).slice(0, L), e3.enqueue(oe(i2, r2.signature));
|
||||
}
|
||||
} }), r2 = this;
|
||||
}
|
||||
}
|
||||
function se(e2, t2, n2, s2, r2, o2) {
|
||||
const { ctr: i2, hmac: c2, pending: l2 } = e2, u2 = t2.length - r2;
|
||||
let h2;
|
||||
for (l2.length && (t2 = oe(l2, t2), n2 = ((e3, t3) => {
|
||||
if (t3 && t3 > e3.length) {
|
||||
const n3 = e3;
|
||||
(e3 = new a(t3)).set(n3, 0);
|
||||
}
|
||||
return e3;
|
||||
})(n2, u2 - u2 % x)), h2 = 0; u2 - x >= h2; h2 += x) {
|
||||
const e3 = le(J, ie(t2, h2, h2 + x));
|
||||
o2 && c2.update(e3);
|
||||
const r3 = i2.update(e3);
|
||||
o2 || c2.update(r3), n2.set(ce(J, r3), h2 + s2);
|
||||
}
|
||||
return e2.pending = ie(t2, h2), n2;
|
||||
}
|
||||
async function re(n2, s2, r2, o2) {
|
||||
n2.password = null;
|
||||
const i2 = await (async (e2, t2, n3, s3, r3) => {
|
||||
if (!$)
|
||||
return H.importKey(t2);
|
||||
try {
|
||||
return await G.importKey("raw", t2, n3, false, r3);
|
||||
} catch (e3) {
|
||||
return $ = false, H.importKey(t2);
|
||||
}
|
||||
})(0, r2, U, 0, M), c2 = await (async (e2, t2, n3) => {
|
||||
if (!ee)
|
||||
return H.pbkdf2(t2, e2.salt, W.iterations, n3);
|
||||
try {
|
||||
return await G.deriveBits(e2, t2, n3);
|
||||
} catch (s3) {
|
||||
return ee = false, H.pbkdf2(t2, e2.salt, W.iterations, n3);
|
||||
}
|
||||
})(t.assign({ salt: o2 }, W), i2, 8 * (2 * O[s2] + 2)), l2 = new a(c2), u2 = le(J, ie(l2, 0, O[s2])), h2 = le(J, ie(l2, O[s2], 2 * O[s2])), f2 = ie(l2, 2 * O[s2]);
|
||||
return t.assign(n2, { keys: { key: u2, authentication: h2, passwordVerification: f2 }, ctr: new Y(new Q(u2), e.from(F)), hmac: new Z(h2) }), f2;
|
||||
}
|
||||
function ae(e2, t2) {
|
||||
return t2 === b ? ((e3) => {
|
||||
if (typeof f == S) {
|
||||
const t3 = new a((e3 = unescape(encodeURIComponent(e3))).length);
|
||||
for (let n2 = 0; n2 < t3.length; n2++)
|
||||
t3[n2] = e3.charCodeAt(n2);
|
||||
return t3;
|
||||
}
|
||||
return new f().encode(e3);
|
||||
})(e2) : t2;
|
||||
}
|
||||
function oe(e2, t2) {
|
||||
let n2 = e2;
|
||||
return e2.length + t2.length && (n2 = new a(e2.length + t2.length), n2.set(e2, 0), n2.set(t2, e2.length)), n2;
|
||||
}
|
||||
function ie(e2, t2, n2) {
|
||||
return e2.subarray(t2, n2);
|
||||
}
|
||||
function ce(e2, t2) {
|
||||
return e2.fromBits(t2);
|
||||
}
|
||||
function le(e2, t2) {
|
||||
return e2.toBits(t2);
|
||||
}
|
||||
class ue extends g {
|
||||
constructor({ password: e2, passwordVerification: n2, checkPasswordOnly: s2 }) {
|
||||
super({ start() {
|
||||
t.assign(this, { password: e2, passwordVerification: n2 }), de(this, e2);
|
||||
}, transform(e3, t2) {
|
||||
const n3 = this;
|
||||
if (n3.password) {
|
||||
const t3 = fe(n3, e3.subarray(0, 12));
|
||||
if (n3.password = null, t3[11] != n3.passwordVerification)
|
||||
throw new r(B);
|
||||
e3 = e3.subarray(12);
|
||||
}
|
||||
s2 ? t2.error(new r(T)) : t2.enqueue(fe(n3, e3));
|
||||
} });
|
||||
}
|
||||
}
|
||||
class he extends g {
|
||||
constructor({ password: e2, passwordVerification: n2 }) {
|
||||
super({ start() {
|
||||
t.assign(this, { password: e2, passwordVerification: n2 }), de(this, e2);
|
||||
}, transform(e3, t2) {
|
||||
const n3 = this;
|
||||
let s2, r2;
|
||||
if (n3.password) {
|
||||
n3.password = null;
|
||||
const t3 = V(new a(12));
|
||||
t3[11] = n3.passwordVerification, s2 = new a(e3.length + t3.length), s2.set(pe(n3, t3), 0), r2 = 12;
|
||||
} else
|
||||
s2 = new a(e3.length), r2 = 0;
|
||||
s2.set(pe(n3, e3), r2), t2.enqueue(s2);
|
||||
} });
|
||||
}
|
||||
}
|
||||
function fe(e2, t2) {
|
||||
const n2 = new a(t2.length);
|
||||
for (let s2 = 0; s2 < t2.length; s2++)
|
||||
n2[s2] = we(e2) ^ t2[s2], ge(e2, n2[s2]);
|
||||
return n2;
|
||||
}
|
||||
function pe(e2, t2) {
|
||||
const n2 = new a(t2.length);
|
||||
for (let s2 = 0; s2 < t2.length; s2++)
|
||||
n2[s2] = we(e2) ^ t2[s2], ge(e2, t2[s2]);
|
||||
return n2;
|
||||
}
|
||||
function de(e2, n2) {
|
||||
const s2 = [305419896, 591751049, 878082192];
|
||||
t.assign(e2, { keys: s2, crcKey0: new D(s2[0]), crcKey2: new D(s2[2]) });
|
||||
for (let t2 = 0; t2 < n2.length; t2++)
|
||||
ge(e2, n2.charCodeAt(t2));
|
||||
}
|
||||
function ge(e2, t2) {
|
||||
let [n2, r2, a2] = e2.keys;
|
||||
e2.crcKey0.append([t2]), n2 = ~e2.crcKey0.get(), r2 = me(s.imul(me(r2 + ye(n2)), 134775813) + 1), e2.crcKey2.append([r2 >>> 24]), a2 = ~e2.crcKey2.get(), e2.keys = [n2, r2, a2];
|
||||
}
|
||||
function we(e2) {
|
||||
const t2 = 2 | e2.keys[2];
|
||||
return ye(s.imul(t2, 1 ^ t2) >>> 8);
|
||||
}
|
||||
function ye(e2) {
|
||||
return 255 & e2;
|
||||
}
|
||||
function me(e2) {
|
||||
return 4294967295 & e2;
|
||||
}
|
||||
const _e = "deflate-raw";
|
||||
class be extends g {
|
||||
constructor(e2, { chunkSize: t2, CompressionStream: n2, CompressionStreamNative: s2 }) {
|
||||
super({});
|
||||
const { compressed: r2, encrypted: a2, useCompressionStream: o2, zipCrypto: i2, signed: c2, level: l2 } = e2, h2 = this;
|
||||
let f2, p2, d2 = ve(super.readable);
|
||||
a2 && !i2 || !c2 || (f2 = new C(), d2 = De(d2, f2)), r2 && (d2 = ze(d2, o2, { level: l2, chunkSize: t2 }, s2, n2)), a2 && (i2 ? d2 = De(d2, new he(e2)) : (p2 = new ne(e2), d2 = De(d2, p2))), ke(h2, d2, () => {
|
||||
let e3;
|
||||
a2 && !i2 && (e3 = p2.signature), a2 && !i2 || !c2 || (e3 = new u(f2.value.buffer).getUint32(0)), h2.signature = e3;
|
||||
});
|
||||
}
|
||||
}
|
||||
class Se extends g {
|
||||
constructor(e2, { chunkSize: t2, DecompressionStream: n2, DecompressionStreamNative: s2 }) {
|
||||
super({});
|
||||
const { zipCrypto: a2, encrypted: o2, signed: i2, signature: c2, compressed: l2, useCompressionStream: h2 } = e2;
|
||||
let f2, p2, d2 = ve(super.readable);
|
||||
o2 && (a2 ? d2 = De(d2, new ue(e2)) : (p2 = new te(e2), d2 = De(d2, p2))), l2 && (d2 = ze(d2, h2, { chunkSize: t2 }, s2, n2)), o2 && !a2 || !i2 || (f2 = new C(), d2 = De(d2, f2)), ke(this, d2, () => {
|
||||
if ((!o2 || a2) && i2) {
|
||||
const e3 = new u(f2.value.buffer);
|
||||
if (c2 != e3.getUint32(0, false))
|
||||
throw new r(K);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function ve(e2) {
|
||||
return De(e2, new g({ transform(e3, t2) {
|
||||
e3 && e3.length && t2.enqueue(e3);
|
||||
} }));
|
||||
}
|
||||
function ke(e2, n2, s2) {
|
||||
n2 = De(n2, new g({ flush: s2 })), t.defineProperty(e2, "readable", { get: () => n2 });
|
||||
}
|
||||
function ze(e2, t2, n2, s2, r2) {
|
||||
try {
|
||||
e2 = De(e2, new (t2 && s2 ? s2 : r2)(_e, n2));
|
||||
} catch (s3) {
|
||||
if (!t2)
|
||||
return e2;
|
||||
try {
|
||||
e2 = De(e2, new r2(_e, n2));
|
||||
} catch (t3) {
|
||||
return e2;
|
||||
}
|
||||
}
|
||||
return e2;
|
||||
}
|
||||
function De(e2, t2) {
|
||||
return e2.pipeThrough(t2);
|
||||
}
|
||||
const Ce = "data", Ie = "close";
|
||||
class Ae extends g {
|
||||
constructor(e2, n2) {
|
||||
super({});
|
||||
const s2 = this, { codecType: r2 } = e2;
|
||||
let a2;
|
||||
r2.startsWith("deflate") ? a2 = be : r2.startsWith("inflate") && (a2 = Se);
|
||||
let o2 = 0, i2 = 0;
|
||||
const c2 = new a2(e2, n2), l2 = super.readable, u2 = new g({ transform(e3, t2) {
|
||||
e3 && e3.length && (i2 += e3.length, t2.enqueue(e3));
|
||||
}, flush() {
|
||||
t.assign(s2, { inputSize: i2 });
|
||||
} }), h2 = new g({ transform(e3, t2) {
|
||||
e3 && e3.length && (o2 += e3.length, t2.enqueue(e3));
|
||||
}, flush() {
|
||||
const { signature: e3 } = c2;
|
||||
t.assign(s2, { signature: e3, outputSize: o2, inputSize: i2 });
|
||||
} });
|
||||
t.defineProperty(s2, "readable", { get: () => l2.pipeThrough(u2).pipeThrough(c2).pipeThrough(h2) });
|
||||
}
|
||||
}
|
||||
class qe extends g {
|
||||
constructor(e2) {
|
||||
let t2;
|
||||
super({ transform: function n2(s2, r2) {
|
||||
if (t2) {
|
||||
const e3 = new a(t2.length + s2.length);
|
||||
e3.set(t2), e3.set(s2, t2.length), s2 = e3, t2 = null;
|
||||
}
|
||||
s2.length > e2 ? (r2.enqueue(s2.slice(0, e2)), n2(s2.slice(e2), r2)) : t2 = s2;
|
||||
}, flush(e3) {
|
||||
t2 && t2.length && e3.enqueue(t2);
|
||||
} });
|
||||
}
|
||||
}
|
||||
const Re = new l(), He = new l();
|
||||
let Pe, Be = 0, Ke = true;
|
||||
async function Te(e2) {
|
||||
try {
|
||||
const { options: t2, scripts: s2, config: r2 } = e2;
|
||||
if (s2 && s2.length)
|
||||
try {
|
||||
Ke ? importScripts.apply(b, s2) : await Ve(s2);
|
||||
} catch (e3) {
|
||||
Ke = false, await Ve(s2);
|
||||
}
|
||||
self.initCodec && self.initCodec(), r2.CompressionStreamNative = self.CompressionStream, r2.DecompressionStreamNative = self.DecompressionStream, self.Deflate && (r2.CompressionStream = new k(self.Deflate)), self.Inflate && (r2.DecompressionStream = new k(self.Inflate));
|
||||
const a2 = { highWaterMark: 1 }, o2 = e2.readable || new w({ async pull(e3) {
|
||||
const t3 = new h((e4) => Re.set(Be, e4));
|
||||
xe({ type: "pull", messageId: Be }), Be = (Be + 1) % n.MAX_SAFE_INTEGER;
|
||||
const { value: s3, done: r3 } = await t3;
|
||||
e3.enqueue(s3), r3 && e3.close();
|
||||
} }, a2), i2 = e2.writable || new y({ async write(e3) {
|
||||
let t3;
|
||||
const s3 = new h((e4) => t3 = e4);
|
||||
He.set(Be, t3), xe({ type: Ce, value: e3, messageId: Be }), Be = (Be + 1) % n.MAX_SAFE_INTEGER, await s3;
|
||||
} }, a2), c2 = new Ae(t2, r2);
|
||||
Pe = new AbortController();
|
||||
const { signal: l2 } = Pe;
|
||||
await o2.pipeThrough(c2).pipeThrough(new qe(r2.chunkSize)).pipeTo(i2, { signal: l2, preventClose: true, preventAbort: true }), await i2.getWriter().close();
|
||||
const { signature: u2, inputSize: f2, outputSize: p2 } = c2;
|
||||
xe({ type: Ie, result: { signature: u2, inputSize: f2, outputSize: p2 } });
|
||||
} catch (e3) {
|
||||
Ee(e3);
|
||||
}
|
||||
}
|
||||
async function Ve(e2) {
|
||||
for (const t2 of e2)
|
||||
await import(t2);
|
||||
}
|
||||
function xe(e2) {
|
||||
let { value: t2 } = e2;
|
||||
if (t2)
|
||||
if (t2.length)
|
||||
try {
|
||||
t2 = new a(t2), e2.value = t2.buffer, d(e2, [e2.value]);
|
||||
} catch (t3) {
|
||||
d(e2);
|
||||
}
|
||||
else
|
||||
d(e2);
|
||||
else
|
||||
d(e2);
|
||||
}
|
||||
function Ee(e2 = new r("Unknown error")) {
|
||||
const { message: t2, stack: n2, code: s2, name: a2 } = e2;
|
||||
d({ error: { message: t2, stack: n2, code: s2, name: a2 } });
|
||||
}
|
||||
function Ue(e2, n2, s2) {
|
||||
return class {
|
||||
constructor(r3) {
|
||||
const o2 = this;
|
||||
var i2, c2;
|
||||
i2 = r3, c2 = "level", (typeof t.hasOwn === v ? t.hasOwn(i2, c2) : i2.hasOwnProperty(c2)) && r3.level === b && delete r3.level, o2.codec = new e2(t.assign({}, n2, r3)), s2(o2.codec, (e3) => {
|
||||
if (o2.pendingData) {
|
||||
const t2 = o2.pendingData;
|
||||
o2.pendingData = new a(t2.length + e3.length);
|
||||
const { pendingData: n3 } = o2;
|
||||
n3.set(t2, 0), n3.set(e3, t2.length);
|
||||
} else
|
||||
o2.pendingData = new a(e3);
|
||||
});
|
||||
}
|
||||
append(e3) {
|
||||
return this.codec.push(e3), r2(this);
|
||||
}
|
||||
flush() {
|
||||
return this.codec.push(new a(), true), r2(this);
|
||||
}
|
||||
};
|
||||
function r2(e3) {
|
||||
if (e3.pendingData) {
|
||||
const t2 = e3.pendingData;
|
||||
return e3.pendingData = null, t2;
|
||||
}
|
||||
return new a();
|
||||
}
|
||||
}
|
||||
addEventListener("message", ({ data: e2 }) => {
|
||||
const { type: t2, messageId: n2, value: s2, done: r2 } = e2;
|
||||
try {
|
||||
if ("start" == t2 && Te(e2), t2 == Ce) {
|
||||
const e3 = Re.get(n2);
|
||||
Re.delete(n2), e3({ value: new a(s2), done: r2 });
|
||||
}
|
||||
if ("ack" == t2) {
|
||||
const e3 = He.get(n2);
|
||||
He.delete(n2), e3();
|
||||
}
|
||||
t2 == Ie && Pe.abort();
|
||||
} catch (e3) {
|
||||
Ee(e3);
|
||||
}
|
||||
}), self.initCodec = () => {
|
||||
const { Deflate: e2, Inflate: t2 } = ((e3, t3 = {}, n2) => ({ Deflate: Ue(e3.Deflate, t3.deflate, n2), Inflate: Ue(e3.Inflate, t3.inflate, n2) }))(pako, { deflate: { raw: true }, inflate: { raw: true } }, (e3, t3) => e3.onData = t3);
|
||||
self.Deflate = e2, self.Inflate = t2;
|
||||
};
|
||||
}();
|
Reference in New Issue
Block a user