vitessce
Version:
This package is the main `vitessce` package on NPM. It exports the `<Vitessce/>` from `@vitessce/all` for backwards compatibility.
1,168 lines • 66.7 kB
JavaScript
/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */
function oe(e) {
let i = e.length;
for (; --i >= 0; )
e[i] = 0;
}
const Ui = 0, ii = 1, Ci = 2, $i = 3, Fi = 258, ht = 29, Se = 256, we = Se + 1 + ht, re = 30, dt = 19, ni = 2 * we + 1, Q = 15, Ye = 16, Mi = 7, ct = 256, ai = 16, li = 17, ri = 18, rt = 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]), Ue = 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]), Hi = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]), fi = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Bi = 512, B = new Array((we + 2) * 2);
oe(B);
const se = new Array(re * 2);
oe(se);
const ge = new Array(Bi);
oe(ge);
const pe = new Array(Fi - $i + 1);
oe(pe);
const st = new Array(ht);
oe(st);
const Me = new Array(re);
oe(Me);
function Ge(e, i, t, a, n) {
this.static_tree = e, this.extra_bits = i, this.extra_base = t, this.elems = a, this.max_length = n, this.has_stree = e && e.length;
}
let oi, _i, hi;
function je(e, i) {
this.dyn_tree = e, this.max_code = 0, this.stat_desc = i;
}
const di = (e) => e < 256 ? ge[e] : ge[256 + (e >>> 7)], xe = (e, i) => {
e.pending_buf[e.pending++] = i & 255, e.pending_buf[e.pending++] = i >>> 8 & 255;
}, N = (e, i, t) => {
e.bi_valid > Ye - t ? (e.bi_buf |= i << e.bi_valid & 65535, xe(e, e.bi_buf), e.bi_buf = i >> Ye - e.bi_valid, e.bi_valid += t - Ye) : (e.bi_buf |= i << e.bi_valid & 65535, e.bi_valid += t);
}, F = (e, i, t) => {
N(e, t[i * 2], t[i * 2 + 1]);
}, ci = (e, i) => {
let t = 0;
do
t |= e & 1, e >>>= 1, t <<= 1;
while (--i > 0);
return t >>> 1;
}, Ki = (e) => {
e.bi_valid === 16 ? (xe(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
}, Pi = (e, i) => {
const t = i.dyn_tree, a = i.max_code, n = i.stat_desc.static_tree, l = i.stat_desc.has_stree, o = i.stat_desc.extra_bits, f = i.stat_desc.extra_base, s = i.stat_desc.max_length;
let r, _, E, c, h, u, m = 0;
for (c = 0; c <= Q; c++)
e.bl_count[c] = 0;
for (t[e.heap[e.heap_max] * 2 + 1] = 0, r = e.heap_max + 1; r < ni; r++)
_ = e.heap[r], c = t[t[_ * 2 + 1] * 2 + 1] + 1, c > s && (c = s, m++), t[_ * 2 + 1] = c, !(_ > a) && (e.bl_count[c]++, h = 0, _ >= f && (h = o[_ - f]), u = t[_ * 2], e.opt_len += u * (c + h), l && (e.static_len += u * (n[_ * 2 + 1] + h)));
if (m !== 0) {
do {
for (c = s - 1; e.bl_count[c] === 0; )
c--;
e.bl_count[c]--, e.bl_count[c + 1] += 2, e.bl_count[s]--, m -= 2;
} while (m > 0);
for (c = s; c !== 0; c--)
for (_ = e.bl_count[c]; _ !== 0; )
E = e.heap[--r], !(E > a) && (t[E * 2 + 1] !== c && (e.opt_len += (c - t[E * 2 + 1]) * t[E * 2], t[E * 2 + 1] = c), _--);
}
}, si = (e, i, t) => {
const a = new Array(Q + 1);
let n = 0, l, o;
for (l = 1; l <= Q; l++)
a[l] = n = n + t[l - 1] << 1;
for (o = 0; o <= i; o++) {
let f = e[o * 2 + 1];
f !== 0 && (e[o * 2] = ci(a[f]++, f));
}
}, Xi = () => {
let e, i, t, a, n;
const l = new Array(Q + 1);
for (t = 0, a = 0; a < ht - 1; a++)
for (st[a] = t, e = 0; e < 1 << rt[a]; e++)
pe[t++] = a;
for (pe[t - 1] = a, n = 0, a = 0; a < 16; a++)
for (Me[a] = n, e = 0; e < 1 << Ue[a]; e++)
ge[n++] = a;
for (n >>= 7; a < re; a++)
for (Me[a] = n << 7, e = 0; e < 1 << Ue[a] - 7; e++)
ge[256 + n++] = a;
for (i = 0; i <= Q; i++)
l[i] = 0;
for (e = 0; e <= 143; )
B[e * 2 + 1] = 8, e++, l[8]++;
for (; e <= 255; )
B[e * 2 + 1] = 9, e++, l[9]++;
for (; e <= 279; )
B[e * 2 + 1] = 7, e++, l[7]++;
for (; e <= 287; )
B[e * 2 + 1] = 8, e++, l[8]++;
for (si(B, we + 1, l), e = 0; e < re; e++)
se[e * 2 + 1] = 5, se[e * 2] = ci(e, 5);
oi = new Ge(B, rt, Se + 1, we, Q), _i = new Ge(se, Ue, 0, re, Q), hi = new Ge(new Array(0), Hi, 0, dt, Mi);
}, ui = (e) => {
let i;
for (i = 0; i < we; i++)
e.dyn_ltree[i * 2] = 0;
for (i = 0; i < re; i++)
e.dyn_dtree[i * 2] = 0;
for (i = 0; i < dt; i++)
e.bl_tree[i * 2] = 0;
e.dyn_ltree[ct * 2] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
}, bi = (e) => {
e.bi_valid > 8 ? xe(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
}, Yi = (e, i, t, a) => {
bi(e), a && (xe(e, t), xe(e, ~t)), e.pending_buf.set(e.window.subarray(i, i + t), e.pending), e.pending += t;
}, pt = (e, i, t, a) => {
const n = i * 2, l = t * 2;
return e[n] < e[l] || e[n] === e[l] && a[i] <= a[t];
}, We = (e, i, t) => {
const a = e.heap[t];
let n = t << 1;
for (; n <= e.heap_len && (n < e.heap_len && pt(i, e.heap[n + 1], e.heap[n], e.depth) && n++, !pt(i, a, e.heap[n], e.depth)); )
e.heap[t] = e.heap[n], t = n, n <<= 1;
e.heap[t] = a;
}, xt = (e, i, t) => {
let a, n, l = 0, o, f;
if (e.last_lit !== 0)
do
a = e.pending_buf[e.d_buf + l * 2] << 8 | e.pending_buf[e.d_buf + l * 2 + 1], n = e.pending_buf[e.l_buf + l], l++, a === 0 ? F(e, n, i) : (o = pe[n], F(e, o + Se + 1, i), f = rt[o], f !== 0 && (n -= st[o], N(e, n, f)), a--, o = di(a), F(e, o, t), f = Ue[o], f !== 0 && (a -= Me[o], N(e, a, f)));
while (l < e.last_lit);
F(e, ct, i);
}, ft = (e, i) => {
const t = i.dyn_tree, a = i.stat_desc.static_tree, n = i.stat_desc.has_stree, l = i.stat_desc.elems;
let o, f, s = -1, r;
for (e.heap_len = 0, e.heap_max = ni, o = 0; o < l; o++)
t[o * 2] !== 0 ? (e.heap[++e.heap_len] = s = o, e.depth[o] = 0) : t[o * 2 + 1] = 0;
for (; e.heap_len < 2; )
r = e.heap[++e.heap_len] = s < 2 ? ++s : 0, t[r * 2] = 1, e.depth[r] = 0, e.opt_len--, n && (e.static_len -= a[r * 2 + 1]);
for (i.max_code = s, o = e.heap_len >> 1; o >= 1; o--)
We(e, t, o);
r = l;
do
o = e.heap[1], e.heap[1] = e.heap[e.heap_len--], We(e, t, 1), f = e.heap[1], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = f, t[r * 2] = t[o * 2] + t[f * 2], e.depth[r] = (e.depth[o] >= e.depth[f] ? e.depth[o] : e.depth[f]) + 1, t[o * 2 + 1] = t[f * 2 + 1] = r, e.heap[1] = r++, We(e, t, 1);
while (e.heap_len >= 2);
e.heap[--e.heap_max] = e.heap[1], Pi(e, i), si(t, s, e.bl_count);
}, kt = (e, i, t) => {
let a, n = -1, l, o = i[0 * 2 + 1], f = 0, s = 7, r = 4;
for (o === 0 && (s = 138, r = 3), i[(t + 1) * 2 + 1] = 65535, a = 0; a <= t; a++)
l = o, o = i[(a + 1) * 2 + 1], !(++f < s && l === o) && (f < r ? e.bl_tree[l * 2] += f : l !== 0 ? (l !== n && e.bl_tree[l * 2]++, e.bl_tree[ai * 2]++) : f <= 10 ? e.bl_tree[li * 2]++ : e.bl_tree[ri * 2]++, f = 0, n = l, o === 0 ? (s = 138, r = 3) : l === o ? (s = 6, r = 3) : (s = 7, r = 4));
}, vt = (e, i, t) => {
let a, n = -1, l, o = i[0 * 2 + 1], f = 0, s = 7, r = 4;
for (o === 0 && (s = 138, r = 3), a = 0; a <= t; a++)
if (l = o, o = i[(a + 1) * 2 + 1], !(++f < s && l === o)) {
if (f < r)
do
F(e, l, e.bl_tree);
while (--f !== 0);
else
l !== 0 ? (l !== n && (F(e, l, e.bl_tree), f--), F(e, ai, e.bl_tree), N(e, f - 3, 2)) : f <= 10 ? (F(e, li, e.bl_tree), N(e, f - 3, 3)) : (F(e, ri, e.bl_tree), N(e, f - 11, 7));
f = 0, n = l, o === 0 ? (s = 138, r = 3) : l === o ? (s = 6, r = 3) : (s = 7, r = 4);
}
}, Gi = (e) => {
let i;
for (kt(e, e.dyn_ltree, e.l_desc.max_code), kt(e, e.dyn_dtree, e.d_desc.max_code), ft(e, e.bl_desc), i = dt - 1; i >= 3 && e.bl_tree[fi[i] * 2 + 1] === 0; i--)
;
return e.opt_len += 3 * (i + 1) + 5 + 5 + 4, i;
}, ji = (e, i, t, a) => {
let n;
for (N(e, i - 257, 5), N(e, t - 1, 5), N(e, a - 4, 4), n = 0; n < a; n++)
N(e, e.bl_tree[fi[n] * 2 + 1], 3);
vt(e, e.dyn_ltree, i - 1), vt(e, e.dyn_dtree, t - 1);
}, Wi = (e) => {
let i = 4093624447, t;
for (t = 0; t <= 31; t++, i >>>= 1)
if (i & 1 && e.dyn_ltree[t * 2] !== 0)
return 0;
if (e.dyn_ltree[9 * 2] !== 0 || e.dyn_ltree[10 * 2] !== 0 || e.dyn_ltree[13 * 2] !== 0)
return 1;
for (t = 32; t < Se; t++)
if (e.dyn_ltree[t * 2] !== 0)
return 1;
return 0;
};
let Et = !1;
const Vi = (e) => {
Et || (Xi(), Et = !0), e.l_desc = new je(e.dyn_ltree, oi), e.d_desc = new je(e.dyn_dtree, _i), e.bl_desc = new je(e.bl_tree, hi), e.bi_buf = 0, e.bi_valid = 0, ui(e);
}, wi = (e, i, t, a) => {
N(e, (Ui << 1) + (a ? 1 : 0), 3), Yi(e, i, t, !0);
}, Ji = (e) => {
N(e, ii << 1, 3), F(e, ct, B), Ki(e);
}, Qi = (e, i, t, a) => {
let n, l, o = 0;
e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = Wi(e)), ft(e, e.l_desc), ft(e, e.d_desc), o = Gi(e), n = e.opt_len + 3 + 7 >>> 3, l = e.static_len + 3 + 7 >>> 3, l <= n && (n = l)) : n = l = t + 5, t + 4 <= n && i !== -1 ? wi(e, i, t, a) : e.strategy === 4 || l === n ? (N(e, (ii << 1) + (a ? 1 : 0), 3), xt(e, B, se)) : (N(e, (Ci << 1) + (a ? 1 : 0), 3), ji(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), xt(e, e.dyn_ltree, e.dyn_dtree)), ui(e), a && bi(e);
}, qi = (e, i, t) => (e.pending_buf[e.d_buf + e.last_lit * 2] = i >>> 8 & 255, e.pending_buf[e.d_buf + e.last_lit * 2 + 1] = i & 255, e.pending_buf[e.l_buf + e.last_lit] = t & 255, e.last_lit++, i === 0 ? e.dyn_ltree[t * 2]++ : (e.matches++, i--, e.dyn_ltree[(pe[t] + Se + 1) * 2]++, e.dyn_dtree[di(i) * 2]++), e.last_lit === e.lit_bufsize - 1);
var en = Vi, tn = wi, nn = Qi, an = qi, ln = Ji, rn = {
_tr_init: en,
_tr_stored_block: tn,
_tr_flush_block: nn,
_tr_tally: an,
_tr_align: ln
};
const fn = (e, i, t, a) => {
let n = e & 65535 | 0, l = e >>> 16 & 65535 | 0, o = 0;
for (; t !== 0; ) {
o = t > 2e3 ? 2e3 : t, t -= o;
do
n = n + i[a++] | 0, l = l + n | 0;
while (--o);
n %= 65521, l %= 65521;
}
return n | l << 16 | 0;
};
var ke = fn;
const on = () => {
let e, i = [];
for (var t = 0; t < 256; t++) {
e = t;
for (var a = 0; a < 8; a++)
e = e & 1 ? 3988292384 ^ e >>> 1 : e >>> 1;
i[t] = e;
}
return i;
}, _n = new Uint32Array(on()), hn = (e, i, t, a) => {
const n = _n, l = a + t;
e ^= -1;
for (let o = a; o < l; o++)
e = e >>> 8 ^ n[(e ^ i[o]) & 255];
return e ^ -1;
};
var I = hn, fe = {
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"
}, Ae = {
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: dn, _tr_stored_block: cn, _tr_flush_block: sn, _tr_tally: j, _tr_align: un } = rn, {
Z_NO_FLUSH: ne,
Z_PARTIAL_FLUSH: bn,
Z_FULL_FLUSH: wn,
Z_FINISH: W,
Z_BLOCK: yt,
Z_OK: M,
Z_STREAM_END: St,
Z_STREAM_ERROR: L,
Z_DATA_ERROR: gn,
Z_BUF_ERROR: Ve,
Z_DEFAULT_COMPRESSION: pn,
Z_FILTERED: xn,
Z_HUFFMAN_ONLY: Ze,
Z_RLE: kn,
Z_FIXED: vn,
Z_DEFAULT_STRATEGY: En,
Z_UNKNOWN: yn,
Z_DEFLATED: Ke
} = Ae, Sn = 9, An = 15, Tn = 8, Rn = 29, zn = 256, ot = zn + 1 + Rn, mn = 30, Dn = 19, Zn = 2 * ot + 1, In = 15, k = 3, Y = 258, C = Y + k + 1, On = 32, Pe = 42, _t = 69, Ce = 73, $e = 91, Fe = 103, q = 113, de = 666, D = 1, Te = 2, ee = 3, _e = 4, Nn = 3, G = (e, i) => (e.msg = fe[i], i), At = (e) => (e << 1) - (e > 4 ? 9 : 0), X = (e) => {
let i = e.length;
for (; --i >= 0; )
e[i] = 0;
};
let Ln = (e, i, t) => (i << e.hash_shift ^ t) & e.hash_mask, V = Ln;
const P = (e) => {
const i = e.state;
let t = i.pending;
t > e.avail_out && (t = e.avail_out), t !== 0 && (e.output.set(i.pending_buf.subarray(i.pending_out, i.pending_out + t), e.next_out), e.next_out += t, i.pending_out += t, e.total_out += t, e.avail_out -= t, i.pending -= t, i.pending === 0 && (i.pending_out = 0));
}, O = (e, i) => {
sn(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, i), e.block_start = e.strstart, P(e.strm);
}, y = (e, i) => {
e.pending_buf[e.pending++] = i;
}, he = (e, i) => {
e.pending_buf[e.pending++] = i >>> 8 & 255, e.pending_buf[e.pending++] = i & 255;
}, Un = (e, i, t, a) => {
let n = e.avail_in;
return n > a && (n = a), n === 0 ? 0 : (e.avail_in -= n, i.set(e.input.subarray(e.next_in, e.next_in + n), t), e.state.wrap === 1 ? e.adler = ke(e.adler, i, n, t) : e.state.wrap === 2 && (e.adler = I(e.adler, i, n, t)), e.next_in += n, e.total_in += n, n);
}, gi = (e, i) => {
let t = e.max_chain_length, a = e.strstart, n, l, o = e.prev_length, f = e.nice_match;
const s = e.strstart > e.w_size - C ? e.strstart - (e.w_size - C) : 0, r = e.window, _ = e.w_mask, E = e.prev, c = e.strstart + Y;
let h = r[a + o - 1], u = r[a + o];
e.prev_length >= e.good_match && (t >>= 2), f > e.lookahead && (f = e.lookahead);
do
if (n = i, !(r[n + o] !== u || r[n + o - 1] !== h || r[n] !== r[a] || r[++n] !== r[a + 1])) {
a += 2, n++;
do
;
while (r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && r[++a] === r[++n] && a < c);
if (l = Y - (c - a), a = c - Y, l > o) {
if (e.match_start = i, o = l, l >= f)
break;
h = r[a + o - 1], u = r[a + o];
}
}
while ((i = E[i & _]) > s && --t !== 0);
return o <= e.lookahead ? o : e.lookahead;
}, te = (e) => {
const i = e.w_size;
let t, a, n, l, o;
do {
if (l = e.window_size - e.lookahead - e.strstart, e.strstart >= i + (i - C)) {
e.window.set(e.window.subarray(i, i + i), 0), e.match_start -= i, e.strstart -= i, e.block_start -= i, a = e.hash_size, t = a;
do
n = e.head[--t], e.head[t] = n >= i ? n - i : 0;
while (--a);
a = i, t = a;
do
n = e.prev[--t], e.prev[t] = n >= i ? n - i : 0;
while (--a);
l += i;
}
if (e.strm.avail_in === 0)
break;
if (a = Un(e.strm, e.window, e.strstart + e.lookahead, l), e.lookahead += a, e.lookahead + e.insert >= k)
for (o = e.strstart - e.insert, e.ins_h = e.window[o], e.ins_h = V(e, e.ins_h, e.window[o + 1]); e.insert && (e.ins_h = V(e, e.ins_h, e.window[o + k - 1]), e.prev[o & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = o, o++, e.insert--, !(e.lookahead + e.insert < k)); )
;
} while (e.lookahead < C && e.strm.avail_in !== 0);
}, Cn = (e, i) => {
let t = 65535;
for (t > e.pending_buf_size - 5 && (t = e.pending_buf_size - 5); ; ) {
if (e.lookahead <= 1) {
if (te(e), e.lookahead === 0 && i === ne)
return D;
if (e.lookahead === 0)
break;
}
e.strstart += e.lookahead, e.lookahead = 0;
const a = e.block_start + t;
if ((e.strstart === 0 || e.strstart >= a) && (e.lookahead = e.strstart - a, e.strstart = a, O(e, !1), e.strm.avail_out === 0) || e.strstart - e.block_start >= e.w_size - C && (O(e, !1), e.strm.avail_out === 0))
return D;
}
return e.insert = 0, i === W ? (O(e, !0), e.strm.avail_out === 0 ? ee : _e) : (e.strstart > e.block_start && (O(e, !1), e.strm.avail_out === 0), D);
}, Je = (e, i) => {
let t, a;
for (; ; ) {
if (e.lookahead < C) {
if (te(e), e.lookahead < C && i === ne)
return D;
if (e.lookahead === 0)
break;
}
if (t = 0, e.lookahead >= k && (e.ins_h = V(e, e.ins_h, e.window[e.strstart + k - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), t !== 0 && e.strstart - t <= e.w_size - C && (e.match_length = gi(e, t)), e.match_length >= k)
if (a = j(e, e.strstart - e.match_start, e.match_length - k), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= k) {
e.match_length--;
do
e.strstart++, e.ins_h = V(e, e.ins_h, e.window[e.strstart + k - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart;
while (--e.match_length !== 0);
e.strstart++;
} else
e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = V(e, e.ins_h, e.window[e.strstart + 1]);
else
a = j(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
if (a && (O(e, !1), e.strm.avail_out === 0))
return D;
}
return e.insert = e.strstart < k - 1 ? e.strstart : k - 1, i === W ? (O(e, !0), e.strm.avail_out === 0 ? ee : _e) : e.last_lit && (O(e, !1), e.strm.avail_out === 0) ? D : Te;
}, ae = (e, i) => {
let t, a, n;
for (; ; ) {
if (e.lookahead < C) {
if (te(e), e.lookahead < C && i === ne)
return D;
if (e.lookahead === 0)
break;
}
if (t = 0, e.lookahead >= k && (e.ins_h = V(e, e.ins_h, e.window[e.strstart + k - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = k - 1, t !== 0 && e.prev_length < e.max_lazy_match && e.strstart - t <= e.w_size - C && (e.match_length = gi(e, t), e.match_length <= 5 && (e.strategy === xn || e.match_length === k && e.strstart - e.match_start > 4096) && (e.match_length = k - 1)), e.prev_length >= k && e.match_length <= e.prev_length) {
n = e.strstart + e.lookahead - k, a = j(e, e.strstart - 1 - e.prev_match, e.prev_length - k), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
do
++e.strstart <= n && (e.ins_h = V(e, e.ins_h, e.window[e.strstart + k - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
while (--e.prev_length !== 0);
if (e.match_available = 0, e.match_length = k - 1, e.strstart++, a && (O(e, !1), e.strm.avail_out === 0))
return D;
} else if (e.match_available) {
if (a = j(e, 0, e.window[e.strstart - 1]), a && O(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
return D;
} else
e.match_available = 1, e.strstart++, e.lookahead--;
}
return e.match_available && (a = j(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < k - 1 ? e.strstart : k - 1, i === W ? (O(e, !0), e.strm.avail_out === 0 ? ee : _e) : e.last_lit && (O(e, !1), e.strm.avail_out === 0) ? D : Te;
}, $n = (e, i) => {
let t, a, n, l;
const o = e.window;
for (; ; ) {
if (e.lookahead <= Y) {
if (te(e), e.lookahead <= Y && i === ne)
return D;
if (e.lookahead === 0)
break;
}
if (e.match_length = 0, e.lookahead >= k && e.strstart > 0 && (n = e.strstart - 1, a = o[n], a === o[++n] && a === o[++n] && a === o[++n])) {
l = e.strstart + Y;
do
;
while (a === o[++n] && a === o[++n] && a === o[++n] && a === o[++n] && a === o[++n] && a === o[++n] && a === o[++n] && a === o[++n] && n < l);
e.match_length = Y - (l - n), e.match_length > e.lookahead && (e.match_length = e.lookahead);
}
if (e.match_length >= k ? (t = j(e, 1, e.match_length - k), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (t = j(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), t && (O(e, !1), e.strm.avail_out === 0))
return D;
}
return e.insert = 0, i === W ? (O(e, !0), e.strm.avail_out === 0 ? ee : _e) : e.last_lit && (O(e, !1), e.strm.avail_out === 0) ? D : Te;
}, Fn = (e, i) => {
let t;
for (; ; ) {
if (e.lookahead === 0 && (te(e), e.lookahead === 0)) {
if (i === ne)
return D;
break;
}
if (e.match_length = 0, t = j(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, t && (O(e, !1), e.strm.avail_out === 0))
return D;
}
return e.insert = 0, i === W ? (O(e, !0), e.strm.avail_out === 0 ? ee : _e) : e.last_lit && (O(e, !1), e.strm.avail_out === 0) ? D : Te;
};
function $(e, i, t, a, n) {
this.good_length = e, this.max_lazy = i, this.nice_length = t, this.max_chain = a, this.func = n;
}
const ce = [
new $(0, 0, 0, 0, Cn),
new $(4, 4, 8, 4, Je),
new $(4, 5, 16, 8, Je),
new $(4, 6, 32, 32, Je),
new $(4, 4, 16, 16, ae),
new $(8, 16, 32, 32, ae),
new $(8, 16, 128, 128, ae),
new $(8, 32, 128, 256, ae),
new $(32, 128, 258, 1024, ae),
new $(32, 258, 258, 4096, ae)
], Mn = (e) => {
e.window_size = 2 * e.w_size, X(e.head), e.max_lazy_match = ce[e.level].max_lazy, e.good_match = ce[e.level].good_length, e.nice_match = ce[e.level].nice_length, e.max_chain_length = ce[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = k - 1, e.match_available = 0, e.ins_h = 0;
};
function Hn() {
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 = Ke, 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(Zn * 2), this.dyn_dtree = new Uint16Array((2 * mn + 1) * 2), this.bl_tree = new Uint16Array((2 * Dn + 1) * 2), X(this.dyn_ltree), X(this.dyn_dtree), X(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(In + 1), this.heap = new Uint16Array(2 * ot + 1), X(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * ot + 1), X(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
}
const pi = (e) => {
if (!e || !e.state)
return G(e, L);
e.total_in = e.total_out = 0, e.data_type = yn;
const i = e.state;
return i.pending = 0, i.pending_out = 0, i.wrap < 0 && (i.wrap = -i.wrap), i.status = i.wrap ? Pe : q, e.adler = i.wrap === 2 ? 0 : 1, i.last_flush = ne, dn(i), M;
}, xi = (e) => {
const i = pi(e);
return i === M && Mn(e.state), i;
}, Bn = (e, i) => !e || !e.state || e.state.wrap !== 2 ? L : (e.state.gzhead = i, M), ki = (e, i, t, a, n, l) => {
if (!e)
return L;
let o = 1;
if (i === pn && (i = 6), a < 0 ? (o = 0, a = -a) : a > 15 && (o = 2, a -= 16), n < 1 || n > Sn || t !== Ke || a < 8 || a > 15 || i < 0 || i > 9 || l < 0 || l > vn)
return G(e, L);
a === 8 && (a = 9);
const f = new Hn();
return e.state = f, f.strm = e, f.wrap = o, f.gzhead = null, f.w_bits = a, f.w_size = 1 << f.w_bits, f.w_mask = f.w_size - 1, f.hash_bits = n + 7, f.hash_size = 1 << f.hash_bits, f.hash_mask = f.hash_size - 1, f.hash_shift = ~~((f.hash_bits + k - 1) / k), f.window = new Uint8Array(f.w_size * 2), f.head = new Uint16Array(f.hash_size), f.prev = new Uint16Array(f.w_size), f.lit_bufsize = 1 << n + 6, f.pending_buf_size = f.lit_bufsize * 4, f.pending_buf = new Uint8Array(f.pending_buf_size), f.d_buf = 1 * f.lit_bufsize, f.l_buf = (1 + 2) * f.lit_bufsize, f.level = i, f.strategy = l, f.method = t, xi(e);
}, Kn = (e, i) => ki(e, i, Ke, An, Tn, En), Pn = (e, i) => {
let t, a;
if (!e || !e.state || i > yt || i < 0)
return e ? G(e, L) : L;
const n = e.state;
if (!e.output || !e.input && e.avail_in !== 0 || n.status === de && i !== W)
return G(e, e.avail_out === 0 ? Ve : L);
n.strm = e;
const l = n.last_flush;
if (n.last_flush = i, n.status === Pe)
if (n.wrap === 2)
e.adler = 0, y(n, 31), y(n, 139), y(n, 8), n.gzhead ? (y(
n,
(n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)
), y(n, n.gzhead.time & 255), y(n, n.gzhead.time >> 8 & 255), y(n, n.gzhead.time >> 16 & 255), y(n, n.gzhead.time >> 24 & 255), y(n, n.level === 9 ? 2 : n.strategy >= Ze || n.level < 2 ? 4 : 0), y(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (y(n, n.gzhead.extra.length & 255), y(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = I(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = _t) : (y(n, 0), y(n, 0), y(n, 0), y(n, 0), y(n, 0), y(n, n.level === 9 ? 2 : n.strategy >= Ze || n.level < 2 ? 4 : 0), y(n, Nn), n.status = q);
else {
let o = Ke + (n.w_bits - 8 << 4) << 8, f = -1;
n.strategy >= Ze || n.level < 2 ? f = 0 : n.level < 6 ? f = 1 : n.level === 6 ? f = 2 : f = 3, o |= f << 6, n.strstart !== 0 && (o |= On), o += 31 - o % 31, n.status = q, he(n, o), n.strstart !== 0 && (he(n, e.adler >>> 16), he(n, e.adler & 65535)), e.adler = 1;
}
if (n.status === _t)
if (n.gzhead.extra) {
for (t = n.pending; n.gzindex < (n.gzhead.extra.length & 65535) && !(n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), P(e), t = n.pending, n.pending === n.pending_buf_size)); )
y(n, n.gzhead.extra[n.gzindex] & 255), n.gzindex++;
n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex === n.gzhead.extra.length && (n.gzindex = 0, n.status = Ce);
} else
n.status = Ce;
if (n.status === Ce)
if (n.gzhead.name) {
t = n.pending;
do {
if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), P(e), t = n.pending, n.pending === n.pending_buf_size)) {
a = 1;
break;
}
n.gzindex < n.gzhead.name.length ? a = n.gzhead.name.charCodeAt(n.gzindex++) & 255 : a = 0, y(n, a);
} while (a !== 0);
n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), a === 0 && (n.gzindex = 0, n.status = $e);
} else
n.status = $e;
if (n.status === $e)
if (n.gzhead.comment) {
t = n.pending;
do {
if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), P(e), t = n.pending, n.pending === n.pending_buf_size)) {
a = 1;
break;
}
n.gzindex < n.gzhead.comment.length ? a = n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : a = 0, y(n, a);
} while (a !== 0);
n.gzhead.hcrc && n.pending > t && (e.adler = I(e.adler, n.pending_buf, n.pending - t, t)), a === 0 && (n.status = Fe);
} else
n.status = Fe;
if (n.status === Fe && (n.gzhead.hcrc ? (n.pending + 2 > n.pending_buf_size && P(e), n.pending + 2 <= n.pending_buf_size && (y(n, e.adler & 255), y(n, e.adler >> 8 & 255), e.adler = 0, n.status = q)) : n.status = q), n.pending !== 0) {
if (P(e), e.avail_out === 0)
return n.last_flush = -1, M;
} else if (e.avail_in === 0 && At(i) <= At(l) && i !== W)
return G(e, Ve);
if (n.status === de && e.avail_in !== 0)
return G(e, Ve);
if (e.avail_in !== 0 || n.lookahead !== 0 || i !== ne && n.status !== de) {
let o = n.strategy === Ze ? Fn(n, i) : n.strategy === kn ? $n(n, i) : ce[n.level].func(n, i);
if ((o === ee || o === _e) && (n.status = de), o === D || o === ee)
return e.avail_out === 0 && (n.last_flush = -1), M;
if (o === Te && (i === bn ? un(n) : i !== yt && (cn(n, 0, 0, !1), i === wn && (X(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), P(e), e.avail_out === 0))
return n.last_flush = -1, M;
}
return i !== W ? M : n.wrap <= 0 ? St : (n.wrap === 2 ? (y(n, e.adler & 255), y(n, e.adler >> 8 & 255), y(n, e.adler >> 16 & 255), y(n, e.adler >> 24 & 255), y(n, e.total_in & 255), y(n, e.total_in >> 8 & 255), y(n, e.total_in >> 16 & 255), y(n, e.total_in >> 24 & 255)) : (he(n, e.adler >>> 16), he(n, e.adler & 65535)), P(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? M : St);
}, Xn = (e) => {
if (!e || !e.state)
return L;
const i = e.state.status;
return i !== Pe && i !== _t && i !== Ce && i !== $e && i !== Fe && i !== q && i !== de ? G(e, L) : (e.state = null, i === q ? G(e, gn) : M);
}, Yn = (e, i) => {
let t = i.length;
if (!e || !e.state)
return L;
const a = e.state, n = a.wrap;
if (n === 2 || n === 1 && a.status !== Pe || a.lookahead)
return L;
if (n === 1 && (e.adler = ke(e.adler, i, t, 0)), a.wrap = 0, t >= a.w_size) {
n === 0 && (X(a.head), a.strstart = 0, a.block_start = 0, a.insert = 0);
let s = new Uint8Array(a.w_size);
s.set(i.subarray(t - a.w_size, t), 0), i = s, t = a.w_size;
}
const l = e.avail_in, o = e.next_in, f = e.input;
for (e.avail_in = t, e.next_in = 0, e.input = i, te(a); a.lookahead >= k; ) {
let s = a.strstart, r = a.lookahead - (k - 1);
do
a.ins_h = V(a, a.ins_h, a.window[s + k - 1]), a.prev[s & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = s, s++;
while (--r);
a.strstart = s, a.lookahead = k - 1, te(a);
}
return a.strstart += a.lookahead, a.block_start = a.strstart, a.insert = a.lookahead, a.lookahead = 0, a.match_length = a.prev_length = k - 1, a.match_available = 0, e.next_in = o, e.input = f, e.avail_in = l, a.wrap = n, M;
};
var Gn = Kn, jn = ki, Wn = xi, Vn = pi, Jn = Bn, Qn = Pn, qn = Xn, ea = Yn, ta = "pako deflate (from Nodeca project)", ue = {
deflateInit: Gn,
deflateInit2: jn,
deflateReset: Wn,
deflateResetKeep: Vn,
deflateSetHeader: Jn,
deflate: Qn,
deflateEnd: qn,
deflateSetDictionary: ea,
deflateInfo: ta
};
const ia = (e, i) => Object.prototype.hasOwnProperty.call(e, i);
var na = function(e) {
const i = Array.prototype.slice.call(arguments, 1);
for (; i.length; ) {
const t = i.shift();
if (!!t) {
if (typeof t != "object")
throw new TypeError(t + "must be non-object");
for (const a in t)
ia(t, a) && (e[a] = t[a]);
}
}
return e;
}, aa = (e) => {
let i = 0;
for (let a = 0, n = e.length; a < n; a++)
i += e[a].length;
const t = new Uint8Array(i);
for (let a = 0, n = 0, l = e.length; a < l; a++) {
let o = e[a];
t.set(o, n), n += o.length;
}
return t;
}, Xe = {
assign: na,
flattenChunks: aa
};
let vi = !0;
try {
String.fromCharCode.apply(null, new Uint8Array(1));
} catch {
vi = !1;
}
const ve = new Uint8Array(256);
for (let e = 0; e < 256; e++)
ve[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
ve[254] = ve[254] = 1;
var la = (e) => {
if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
return new TextEncoder().encode(e);
let i, t, a, n, l, o = e.length, f = 0;
for (n = 0; n < o; n++)
t = e.charCodeAt(n), (t & 64512) === 55296 && n + 1 < o && (a = e.charCodeAt(n + 1), (a & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (a - 56320), n++)), f += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
for (i = new Uint8Array(f), l = 0, n = 0; l < f; n++)
t = e.charCodeAt(n), (t & 64512) === 55296 && n + 1 < o && (a = e.charCodeAt(n + 1), (a & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (a - 56320), n++)), t < 128 ? i[l++] = t : t < 2048 ? (i[l++] = 192 | t >>> 6, i[l++] = 128 | t & 63) : t < 65536 ? (i[l++] = 224 | t >>> 12, i[l++] = 128 | t >>> 6 & 63, i[l++] = 128 | t & 63) : (i[l++] = 240 | t >>> 18, i[l++] = 128 | t >>> 12 & 63, i[l++] = 128 | t >>> 6 & 63, i[l++] = 128 | t & 63);
return i;
};
const ra = (e, i) => {
if (i < 65534 && e.subarray && vi)
return String.fromCharCode.apply(null, e.length === i ? e : e.subarray(0, i));
let t = "";
for (let a = 0; a < i; a++)
t += String.fromCharCode(e[a]);
return t;
};
var fa = (e, i) => {
const t = i || e.length;
if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
return new TextDecoder().decode(e.subarray(0, i));
let a, n;
const l = new Array(t * 2);
for (n = 0, a = 0; a < t; ) {
let o = e[a++];
if (o < 128) {
l[n++] = o;
continue;
}
let f = ve[o];
if (f > 4) {
l[n++] = 65533, a += f - 1;
continue;
}
for (o &= f === 2 ? 31 : f === 3 ? 15 : 7; f > 1 && a < t; )
o = o << 6 | e[a++] & 63, f--;
if (f > 1) {
l[n++] = 65533;
continue;
}
o < 65536 ? l[n++] = o : (o -= 65536, l[n++] = 55296 | o >> 10 & 1023, l[n++] = 56320 | o & 1023);
}
return ra(l, n);
}, oa = (e, i) => {
i = i || e.length, i > e.length && (i = e.length);
let t = i - 1;
for (; t >= 0 && (e[t] & 192) === 128; )
t--;
return t < 0 || t === 0 ? i : t + ve[e[t]] > i ? t : i;
}, Ee = {
string2buf: la,
buf2string: fa,
utf8border: oa
};
function _a() {
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 Ei = _a;
const yi = Object.prototype.toString, {
Z_NO_FLUSH: ha,
Z_SYNC_FLUSH: da,
Z_FULL_FLUSH: ca,
Z_FINISH: sa,
Z_OK: He,
Z_STREAM_END: ua,
Z_DEFAULT_COMPRESSION: ba,
Z_DEFAULT_STRATEGY: wa,
Z_DEFLATED: ga
} = Ae;
function ut(e) {
this.options = Xe.assign({
level: ba,
method: ga,
chunkSize: 16384,
windowBits: 15,
memLevel: 8,
strategy: wa
}, e || {});
let i = this.options;
i.raw && i.windowBits > 0 ? i.windowBits = -i.windowBits : i.gzip && i.windowBits > 0 && i.windowBits < 16 && (i.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new Ei(), this.strm.avail_out = 0;
let t = ue.deflateInit2(
this.strm,
i.level,
i.method,
i.windowBits,
i.memLevel,
i.strategy
);
if (t !== He)
throw new Error(fe[t]);
if (i.header && ue.deflateSetHeader(this.strm, i.header), i.dictionary) {
let a;
if (typeof i.dictionary == "string" ? a = Ee.string2buf(i.dictionary) : yi.call(i.dictionary) === "[object ArrayBuffer]" ? a = new Uint8Array(i.dictionary) : a = i.dictionary, t = ue.deflateSetDictionary(this.strm, a), t !== He)
throw new Error(fe[t]);
this._dict_set = !0;
}
}
ut.prototype.push = function(e, i) {
const t = this.strm, a = this.options.chunkSize;
let n, l;
if (this.ended)
return !1;
for (i === ~~i ? l = i : l = i === !0 ? sa : ha, typeof e == "string" ? t.input = Ee.string2buf(e) : yi.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
if (t.avail_out === 0 && (t.output = new Uint8Array(a), t.next_out = 0, t.avail_out = a), (l === da || l === ca) && t.avail_out <= 6) {
this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
continue;
}
if (n = ue.deflate(t, l), n === ua)
return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), n = ue.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === He;
if (t.avail_out === 0) {
this.onData(t.output);
continue;
}
if (l > 0 && t.next_out > 0) {
this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
continue;
}
if (t.avail_in === 0)
break;
}
return !0;
};
ut.prototype.onData = function(e) {
this.chunks.push(e);
};
ut.prototype.onEnd = function(e) {
e === He && (this.result = Xe.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
};
const Ie = 30, pa = 12;
var xa = function(i, t) {
let a, n, l, o, f, s, r, _, E, c, h, u, m, v, w, A, x, d, S, Z, b, R, T, g;
const p = i.state;
a = i.next_in, T = i.input, n = a + (i.avail_in - 5), l = i.next_out, g = i.output, o = l - (t - i.avail_out), f = l + (i.avail_out - 257), s = p.dmax, r = p.wsize, _ = p.whave, E = p.wnext, c = p.window, h = p.hold, u = p.bits, m = p.lencode, v = p.distcode, w = (1 << p.lenbits) - 1, A = (1 << p.distbits) - 1;
e:
do {
u < 15 && (h += T[a++] << u, u += 8, h += T[a++] << u, u += 8), x = m[h & w];
t:
for (; ; ) {
if (d = x >>> 24, h >>>= d, u -= d, d = x >>> 16 & 255, d === 0)
g[l++] = x & 65535;
else if (d & 16) {
S = x & 65535, d &= 15, d && (u < d && (h += T[a++] << u, u += 8), S += h & (1 << d) - 1, h >>>= d, u -= d), u < 15 && (h += T[a++] << u, u += 8, h += T[a++] << u, u += 8), x = v[h & A];
i:
for (; ; ) {
if (d = x >>> 24, h >>>= d, u -= d, d = x >>> 16 & 255, d & 16) {
if (Z = x & 65535, d &= 15, u < d && (h += T[a++] << u, u += 8, u < d && (h += T[a++] << u, u += 8)), Z += h & (1 << d) - 1, Z > s) {
i.msg = "invalid distance too far back", p.mode = Ie;
break e;
}
if (h >>>= d, u -= d, d = l - o, Z > d) {
if (d = Z - d, d > _ && p.sane) {
i.msg = "invalid distance too far back", p.mode = Ie;
break e;
}
if (b = 0, R = c, E === 0) {
if (b += r - d, d < S) {
S -= d;
do
g[l++] = c[b++];
while (--d);
b = l - Z, R = g;
}
} else if (E < d) {
if (b += r + E - d, d -= E, d < S) {
S -= d;
do
g[l++] = c[b++];
while (--d);
if (b = 0, E < S) {
d = E, S -= d;
do
g[l++] = c[b++];
while (--d);
b = l - Z, R = g;
}
}
} else if (b += E - d, d < S) {
S -= d;
do
g[l++] = c[b++];
while (--d);
b = l - Z, R = g;
}
for (; S > 2; )
g[l++] = R[b++], g[l++] = R[b++], g[l++] = R[b++], S -= 3;
S && (g[l++] = R[b++], S > 1 && (g[l++] = R[b++]));
} else {
b = l - Z;
do
g[l++] = g[b++], g[l++] = g[b++], g[l++] = g[b++], S -= 3;
while (S > 2);
S && (g[l++] = g[b++], S > 1 && (g[l++] = g[b++]));
}
} else if ((d & 64) === 0) {
x = v[(x & 65535) + (h & (1 << d) - 1)];
continue i;
} else {
i.msg = "invalid distance code", p.mode = Ie;
break e;
}
break;
}
} else if ((d & 64) === 0) {
x = m[(x & 65535) + (h & (1 << d) - 1)];
continue t;
} else if (d & 32) {
p.mode = pa;
break e;
} else {
i.msg = "invalid literal/length code", p.mode = Ie;
break e;
}
break;
}
} while (a < n && l < f);
S = u >> 3, a -= S, u -= S << 3, h &= (1 << u) - 1, i.next_in = a, i.next_out = l, i.avail_in = a < n ? 5 + (n - a) : 5 - (a - n), i.avail_out = l < f ? 257 + (f - l) : 257 - (l - f), p.hold = h, p.bits = u;
};
const le = 15, Tt = 852, Rt = 592, zt = 0, Qe = 1, mt = 2, ka = 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
]), va = 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
]), Ea = 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
]), ya = 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
]), Sa = (e, i, t, a, n, l, o, f) => {
const s = f.bits;
let r = 0, _ = 0, E = 0, c = 0, h = 0, u = 0, m = 0, v = 0, w = 0, A = 0, x, d, S, Z, b, R = null, T = 0, g;
const p = new Uint16Array(le + 1), J = new Uint16Array(le + 1);
let ze = null, wt = 0, gt, me, De;
for (r = 0; r <= le; r++)
p[r] = 0;
for (_ = 0; _ < a; _++)
p[i[t + _]]++;
for (h = s, c = le; c >= 1 && p[c] === 0; c--)
;
if (h > c && (h = c), c === 0)
return n[l++] = 1 << 24 | 64 << 16 | 0, n[l++] = 1 << 24 | 64 << 16 | 0, f.bits = 1, 0;
for (E = 1; E < c && p[E] === 0; E++)
;
for (h < E && (h = E), v = 1, r = 1; r <= le; r++)
if (v <<= 1, v -= p[r], v < 0)
return -1;
if (v > 0 && (e === zt || c !== 1))
return -1;
for (J[1] = 0, r = 1; r < le; r++)
J[r + 1] = J[r] + p[r];
for (_ = 0; _ < a; _++)
i[t + _] !== 0 && (o[J[i[t + _]]++] = _);
if (e === zt ? (R = ze = o, g = 19) : e === Qe ? (R = ka, T -= 257, ze = va, wt -= 257, g = 256) : (R = Ea, ze = ya, g = -1), A = 0, _ = 0, r = E, b = l, u = h, m = 0, S = -1, w = 1 << h, Z = w - 1, e === Qe && w > Tt || e === mt && w > Rt)
return 1;
for (; ; ) {
gt = r - m, o[_] < g ? (me = 0, De = o[_]) : o[_] > g ? (me = ze[wt + o[_]], De = R[T + o[_]]) : (me = 32 + 64, De = 0), x = 1 << r - m, d = 1 << u, E = d;
do
d -= x, n[b + (A >> m) + d] = gt << 24 | me << 16 | De | 0;
while (d !== 0);
for (x = 1 << r - 1; A & x; )
x >>= 1;
if (x !== 0 ? (A &= x - 1, A += x) : A = 0, _++, --p[r] === 0) {
if (r === c)
break;
r = i[t + o[_]];
}
if (r > h && (A & Z) !== S) {
for (m === 0 && (m = h), b += E, u = r - m, v = 1 << u; u + m < c && (v -= p[u + m], !(v <= 0)); )
u++, v <<= 1;
if (w += 1 << u, e === Qe && w > Tt || e === mt && w > Rt)
return 1;
S = A & Z, n[S] = h << 24 | u << 16 | b - l | 0;
}
}
return A !== 0 && (n[b + A] = r - m << 24 | 64 << 16 | 0), f.bits = h, 0;
};
var be = Sa;
const Aa = 0, Si = 1, Ai = 2, {
Z_FINISH: Dt,
Z_BLOCK: Ta,
Z_TREES: Oe,
Z_OK: ie,
Z_STREAM_END: Ra,
Z_NEED_DICT: za,
Z_STREAM_ERROR: U,
Z_DATA_ERROR: Ti,
Z_MEM_ERROR: Ri,
Z_BUF_ERROR: ma,
Z_DEFLATED: Zt
} = Ae, zi = 1, It = 2, Ot = 3, Nt = 4, Lt = 5, Ut = 6, Ct = 7, $t = 8, Ft = 9, Mt = 10, Be = 11, H = 12, qe = 13, Ht = 14, et = 15, Bt = 16, Kt = 17, Pt = 18, Xt = 19, Ne = 20, Le = 21, Yt = 22, Gt = 23, jt = 24, Wt = 25, Vt = 26, tt = 27, Jt = 28, Qt = 29, z = 30, mi = 31, Da = 32, Za = 852, Ia = 592, Oa = 15, Na = Oa, qt = (e) => (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24);
function La() {
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
}
const Di = (e) => {
if (!e || !e.state)
return U;
const i = e.state;
return e.total_in = e.total_out = i.total = 0, e.msg = "", i.wrap && (e.adler = i.wrap & 1), i.mode = zi, i.last = 0, i.havedict = 0, i.dmax = 32768, i.head = null, i.hold = 0, i.bits = 0, i.lencode = i.lendyn = new Int32Array(Za), i.distcode = i.distdyn = new Int32Array(Ia), i.sane = 1, i.back = -1, ie;
}, Zi = (e) => {
if (!e || !e.state)
return U;
const i = e.state;
return i.wsize = 0, i.whave = 0, i.wnext = 0, Di(e);
}, Ii = (e, i) => {
let t;
if (!e || !e.state)
return U;
const a = e.state;
return i < 0 ? (t = 0, i = -i) : (t = (i >> 4) + 1, i < 48 && (i &= 15)), i && (i < 8 || i > 15) ? U : (a.window !== null && a.wbits !== i && (a.window = null), a.wrap = t, a.wbits = i, Zi(e));
}, Oi = (e, i) => {
if (!e)
return U;
const t = new La();
e.state = t, t.window = null;
const a = Ii(e, i);
return a !== ie && (e.state = null), a;
}, Ua = (e) => Oi(e, Na);
let ei = !0, it, nt;
const Ca = (e) => {
if (ei) {
it = new Int32Array(512), nt = new Int32Array(32);
let i = 0;
for (; i < 144; )
e.lens[i++] = 8;
for (; i < 256; )
e.lens[i++] = 9;
for (; i < 280; )
e.lens[i++] = 7;
for (; i < 288; )
e.lens[i++] = 8;
for (be(Si, e.lens, 0, 288, it, 0, e.work, { bits: 9 }), i = 0; i < 32; )
e.lens[i++] = 5;
be(Ai, e.lens, 0, 32, nt, 0, e.work, { bits: 5 }), ei = !1;
}
e.lencode = it, e.lenbits = 9, e.distcode = nt, e.distbits = 5;
}, Ni = (e, i, t, a) => {
let n;
const l = e.state;
return l.window === null && (l.wsize = 1 << l.wbits, l.wnext = 0, l.whave = 0, l.window = new Uint8Array(l.wsize)), a >= l.wsize ? (l.window.set(i.subarray(t - l.wsize, t), 0), l.wnext = 0, l.whave = l.wsize) : (n = l.wsize - l.wnext, n > a && (n = a), l.window.set(i.subarray(t - a, t - a + n), l.wnext), a -= n, a ? (l.window.set(i.subarray(t - a, t), 0), l.wnext = a, l.whave = l.wsize) : (l.wnext += n, l.wnext === l.wsize && (l.wnext = 0), l.whave < l.wsize && (l.whave += n))), 0;
}, $a = (e, i) => {
let t, a, n, l, o, f, s, r, _, E, c, h, u, m, v = 0, w, A, x, d, S, Z, b, R;
const T = new Uint8Array(4);
let g, p;
const J = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
if (!e || !e.state || !e.output || !e.input && e.avail_in !== 0)
return U;
t = e.state, t.mode === H && (t.mode = qe), o = e.next_out, n = e.output, s = e.avail_out, l = e.next_in, a = e.input, f = e.avail_in, r = t.hold, _ = t.bits, E = f, c = s, R = ie;
e:
for (; ; )
switch (t.mode) {
case zi:
if (t.wrap === 0) {
t.mode = qe;
break;
}
for (; _ < 16; ) {
if (f === 0)
break e;
f--, r += a[l++] << _, _ += 8;
}
if (t.wrap & 2 && r === 35615) {
t.check = 0, T[0] = r & 255, T[1] = r >>> 8 & 255, t.check = I(t.check, T, 2, 0), r = 0, _ = 0, t.mode = It;
break;
}
if (t.flags = 0, t.head && (t.head.done = !1), !(t.wrap & 1) || (((r & 255) << 8) + (r >> 8)) % 31) {
e.msg = "incorrect header check", t.mode = z;
break;
}
if ((r & 15) !== Zt) {
e.msg = "unknown compression method", t.mode = z;
break;
}
if (r >>>= 4, _ -= 4, b = (r & 15) + 8, t.wbits === 0)
t.wbits = b;
else if (b > t.wbits) {
e.msg = "invalid window size", t.mode = z;
break;
}
t.dmax = 1 << t.wbits, e.adler = t.check = 1, t.mode = r & 512 ? Mt : H, r = 0, _ = 0;
break;
case It:
for (; _ < 16; ) {
if (f === 0)
break e;
f--, r += a[l++] << _, _ += 8;
}
if (t.flags = r, (t.flags & 255) !== Zt) {
e.msg = "unknown compression method", t.mode = z;
break;
}
if (t.flags & 57344) {
e.msg = "unknown header flags set", t.mode = z;
break;
}
t.head && (t.head.text = r >> 8 & 1), t.flags & 512 && (T[0] = r & 255, T[1] = r >>> 8 & 255, t.check = I(t.check, T, 2, 0)), r = 0, _ = 0, t.mode = Ot;
case Ot:
for (; _ < 32; ) {
if (f === 0)
break e;
f--, r += a[l++] << _, _ += 8;
}
t.head && (t.head.time = r), t.flags & 512 && (T[0] = r & 255, T[1] = r >>> 8 & 255, T[2] = r >>> 16 & 255, T[3] = r >>> 24 & 255, t.check = I(t.check, T, 4, 0)), r = 0, _ = 0, t.mode = Nt;
case Nt:
for (; _ < 16; ) {
if (f === 0)
break e;
f--, r += a[l++] << _, _ += 8;
}
t.head && (t.head.xflags = r & 255, t.head.os = r >> 8), t.flags & 512 && (T[0] = r & 255, T[1] = r >>> 8 & 255, t.check = I(t.check, T, 2, 0)), r = 0, _ = 0, t.mode = Lt;
case Lt:
if (t.flags & 1024) {
for (; _ < 16; ) {
if (f === 0)
break e;
f--, r += a[l++] << _, _ += 8;
}
t.length = r, t.head && (t.head.extra_len = r), t.flags & 512 && (T[0] = r & 255, T[1] = r >>> 8 & 255, t.check = I(t.check, T, 2, 0)), r = 0, _ = 0;
} else
t.head && (t.head.extra = null);
t.mode = Ut;
case Ut:
if (t.flags & 1024 && (h = t.length, h > f && (h = f), h && (t.head && (b = t.head.extra_len - t.length, t.head.extra || (t.head.extra = new Uint8Array(t.head.extra_len)), t.head.extra.set(
a.subarray(
l,
l + h
),
b
)), t.flags & 512 && (t.check = I(t.check, a, h, l)), f -= h, l += h, t.length -= h), t.length))
break e;
t.length = 0, t.mode = Ct;
case Ct:
if (t.flags & 2048) {
if (f === 0)
break e;
h = 0;
do
b = a[l +