@genome-spy/app 0.52.0 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,23 @@
1
- import { b as Q } from "./index-C8lYPtq_.js";
2
- import { _ as Gn, L as Yn } from "./index-mihmTLo-.js";
1
+ import { b as J } from "./index-B5cesONJ.js";
2
+ import { _ as Gn, L as Yn } from "./index-uO0O4Uv-.js";
3
3
  import { L as nr } from "./__vite-browser-external-C--ziKoh.js";
4
- import { R as ir } from "./remoteFile-1_eCK3VV.js";
5
- import "./_commonjsHelpers-BIiJCwQW.js";
4
+ import { R as ir } from "./remoteFile-BkTxwFub.js";
6
5
  const st = BigInt(32);
7
6
  function rr(e, n, t) {
8
- const i = +!!t, r = +!t;
9
- return BigInt(e.getInt32(n, t) * r + e.getInt32(n + 4, t) * i) << st | BigInt(e.getUint32(n, t) * i + e.getUint32(n + 4, t) * r);
7
+ const i = +!!t, a = +!t;
8
+ return BigInt(e.getInt32(n, t) * a + e.getInt32(n + 4, t) * i) << st | BigInt(e.getUint32(n, t) * i + e.getUint32(n + 4, t) * a);
10
9
  }
11
10
  function ar(e, n, t) {
12
- const i = e.getUint32(n, t), r = e.getUint32(n + 4, t), a = +!!t, o = +!t;
13
- return BigInt(i * o + r * a) << st | BigInt(i * a + r * o);
11
+ const i = e.getUint32(n, t), a = e.getUint32(n + 4, t), r = +!!t, o = +!t;
12
+ return BigInt(i * o + a * r) << st | BigInt(i * r + a * o);
14
13
  }
15
14
  function or(e, n, t, i) {
16
- const r = Number(t >> st), a = Number(t & BigInt(4294967295));
17
- i ? (e.setInt32(n + 4, r, i), e.setUint32(n, a, i)) : (e.setInt32(n, r, i), e.setUint32(n + 4, a, i));
15
+ const a = Number(t >> st), r = Number(t & BigInt(4294967295));
16
+ i ? (e.setInt32(n + 4, a, i), e.setUint32(n, r, i)) : (e.setInt32(n, a, i), e.setUint32(n + 4, r, i));
18
17
  }
19
18
  function sr(e, n, t, i) {
20
- const r = Number(t >> st), a = Number(t & BigInt(4294967295));
21
- i ? (e.setUint32(n + 4, r, i), e.setUint32(n, a, i)) : (e.setUint32(n, r, i), e.setUint32(n + 4, a, i));
19
+ const a = Number(t >> st), r = Number(t & BigInt(4294967295));
20
+ i ? (e.setUint32(n + 4, a, i), e.setUint32(n, r, i)) : (e.setUint32(n, a, i), e.setUint32(n + 4, r, i));
22
21
  }
23
22
  "getBigInt64" in DataView || (DataView.prototype.getBigInt64 = function(e, n) {
24
23
  return rr(this, e, n);
@@ -95,7 +94,7 @@ class lr {
95
94
  return Array.from(this.references).filter(([n, t]) => !t.resolved && !t.requested).map(([n, t]) => n);
96
95
  }
97
96
  }
98
- const x = /* @__PURE__ */ new Map(), oe = "___parser_", M = {
97
+ const x = /* @__PURE__ */ new Map(), re = "___parser_", M = {
99
98
  uint8: 1,
100
99
  uint16le: 2,
101
100
  uint16be: 2,
@@ -161,8 +160,8 @@ class N {
161
160
  return new N();
162
161
  }
163
162
  primitiveGenerateN(n, t) {
164
- const i = Ye[n], r = Ke[n];
165
- t.pushCode(`${t.generateVariable(this.varName)} = dataView.get${i}(offset, ${r});`), t.pushCode(`offset += ${M[n]};`);
163
+ const i = Ye[n], a = Ke[n];
164
+ t.pushCode(`${t.generateVariable(this.varName)} = dataView.get${i}(offset, ${a});`), t.pushCode(`offset += ${M[n]};`);
166
165
  }
167
166
  primitiveN(n, t, i) {
168
167
  return this.setNextParser(n, t, i);
@@ -394,11 +393,11 @@ class N {
394
393
  if (!t.choices)
395
394
  throw new Error("choices is required for choice.");
396
395
  for (const i in t.choices) {
397
- const r = parseInt(i, 10), a = t.choices[r];
398
- if (isNaN(r))
396
+ const a = parseInt(i, 10), r = t.choices[a];
397
+ if (isNaN(a))
399
398
  throw new Error(`Choice key "${i}" is not a number.`);
400
- if (typeof a == "string" && !x.has(a) && !(a in M))
401
- throw new Error(`Choice type "${a}" is unkown.`);
399
+ if (typeof r == "string" && !x.has(r) && !(r in M))
400
+ throw new Error(`Choice type "${r}" is unkown.`);
402
401
  }
403
402
  return this.setNextParser("choice", n, t);
404
403
  }
@@ -449,23 +448,22 @@ class N {
449
448
  }
450
449
  getContext(n) {
451
450
  const t = new lr(n, this.useContextVariables);
452
- return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"), this.alias ? (this.addAliasedCode(t), t.pushCode(`return ${oe + this.alias}(0).result;`)) : this.addRawCode(t), t;
451
+ return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"), this.alias ? (this.addAliasedCode(t), t.pushCode(`return ${re + this.alias}(0).result;`)) : this.addRawCode(t), t;
453
452
  }
454
453
  getCode() {
455
- const n = "imports";
456
- return this.getContext(n).code;
454
+ return this.getContext("imports").code;
457
455
  }
458
456
  addRawCode(n) {
459
457
  n.pushCode("var offset = 0;"), n.pushCode(`var vars = ${this.constructorFn ? "new constructorFn()" : "{}"};`), n.pushCode("vars.$parent = null;"), n.pushCode("vars.$root = vars;"), this.generate(n), this.resolveReferences(n), n.pushCode("delete vars.$parent;"), n.pushCode("delete vars.$root;"), n.pushCode("return vars;");
460
458
  }
461
459
  addAliasedCode(n) {
462
- return n.pushCode(`function ${oe + this.alias}(offset, context) {`), n.pushCode(`var vars = ${this.constructorFn ? "new constructorFn()" : "{}"};`), n.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"), n.pushCode("vars = Object.assign(vars, ctx);"), this.generate(n), n.markResolved(this.alias), this.resolveReferences(n), n.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"), n.pushCode("return { offset: offset, result: vars };"), n.pushCode("}"), n;
460
+ return n.pushCode(`function ${re + this.alias}(offset, context) {`), n.pushCode(`var vars = ${this.constructorFn ? "new constructorFn()" : "{}"};`), n.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"), n.pushCode("vars = Object.assign(vars, ctx);"), this.generate(n), n.markResolved(this.alias), this.resolveReferences(n), n.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"), n.pushCode("return { offset: offset, result: vars };"), n.pushCode("}"), n;
463
461
  }
464
462
  resolveReferences(n) {
465
463
  const t = n.getUnresolvedReferences();
466
464
  n.markRequested(t), t.forEach((i) => {
467
- var r;
468
- (r = x.get(i)) === null || r === void 0 || r.addAliasedCode(n);
465
+ var a;
466
+ (a = x.get(i)) === null || a === void 0 || a.addAliasedCode(n);
469
467
  });
470
468
  }
471
469
  compile() {
@@ -492,8 +490,8 @@ class N {
492
490
  return this.compiled || this.compile(), this.compiled(n, this.constructorFn);
493
491
  }
494
492
  setNextParser(n, t, i) {
495
- const r = new N();
496
- return r.type = n, r.varName = t, r.options = i, r.endian = this.endian, this.head ? this.head.next = r : this.next = r, this.head = r, this;
493
+ const a = new N();
494
+ return a.type = n, a.varName = t, a.options = i, a.endian = this.endian, this.head ? this.head.next = a : this.next = a, this.head = a, this;
497
495
  }
498
496
  // Call code generator for this parser
499
497
  generate(n) {
@@ -586,30 +584,30 @@ class N {
586
584
  if (t.options = this.options, t.generateAssert = this.generateAssert.bind(this), t.generateFormatter = this.generateFormatter.bind(this), t.varName = n.generateVariable(t.varName), n.bitFields.push(t), !this.next || this.next && ["bit", "nest"].indexOf(this.next.type) < 0) {
587
585
  const i = n.generateTmpVariable();
588
586
  n.pushCode(`var ${i} = 0;`);
589
- const r = (f = 0) => {
590
- let d = 0;
587
+ const a = (f = 0) => {
588
+ let p = 0;
591
589
  for (let c = f; c < n.bitFields.length; c++) {
592
590
  const h = n.bitFields[c].options.length;
593
- if (d + h > 32)
591
+ if (p + h > 32)
594
592
  break;
595
- d += h;
593
+ p += h;
596
594
  }
597
- return d;
598
- }, a = (f) => (f <= 8 ? (n.pushCode(`${i} = dataView.getUint8(offset);`), f = 8) : f <= 16 ? (n.pushCode(`${i} = dataView.getUint16(offset);`), f = 16) : f <= 24 ? (n.pushCode(`${i} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`), f = 24) : (n.pushCode(`${i} = dataView.getUint32(offset);`), f = 32), n.pushCode(`offset += ${f / 8};`), f);
595
+ return p;
596
+ }, r = (f) => (f <= 8 ? (n.pushCode(`${i} = dataView.getUint8(offset);`), f = 8) : f <= 16 ? (n.pushCode(`${i} = dataView.getUint16(offset);`), f = 16) : f <= 24 ? (n.pushCode(`${i} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`), f = 24) : (n.pushCode(`${i} = dataView.getUint32(offset);`), f = 32), n.pushCode(`offset += ${f / 8};`), f);
599
597
  let o = 0;
600
- const s = this.endian === "be";
601
- let u = 0, l = 0;
602
- n.bitFields.forEach((f, d) => {
598
+ const l = this.endian === "be";
599
+ let u = 0, s = 0;
600
+ n.bitFields.forEach((f, p) => {
603
601
  let c = f.options.length;
604
- if (c > l) {
605
- if (l) {
606
- const g = -1 >>> 32 - l;
607
- n.pushCode(`${f.varName} = (${i} & 0x${g.toString(16)}) << ${c - l};`), c -= l;
602
+ if (c > s) {
603
+ if (s) {
604
+ const g = -1 >>> 32 - s;
605
+ n.pushCode(`${f.varName} = (${i} & 0x${g.toString(16)}) << ${c - s};`), c -= s;
608
606
  }
609
- o = 0, l = u = a(r(d) - l);
607
+ o = 0, s = u = r(a(p) - s);
610
608
  }
611
- const h = s ? u - o - c : o, _ = -1 >>> 32 - c;
612
- n.pushCode(`${f.varName} ${c < f.options.length ? "|=" : "="} ${i} >> ${h} & 0x${_.toString(16)};`), f.options.length === 32 && n.pushCode(`${f.varName} >>>= 0`), f.options.assert && f.generateAssert(n), f.options.formatter && f.generateFormatter(n, f.varName, f.options.formatter), o += c, l -= c;
609
+ const h = l ? u - o - c : o, _ = -1 >>> 32 - c;
610
+ n.pushCode(`${f.varName} ${c < f.options.length ? "|=" : "="} ${i} >> ${h} & 0x${_.toString(16)};`), f.options.length === 32 && n.pushCode(`${f.varName} >>>= 0`), f.options.assert && f.generateAssert(n), f.options.formatter && f.generateFormatter(n, f.varName, f.options.formatter), o += c, s -= c;
613
611
  }), n.bitFields = [];
614
612
  }
615
613
  }
@@ -618,26 +616,26 @@ class N {
618
616
  n.pushCode(`offset += ${t};`);
619
617
  }
620
618
  generateString(n) {
621
- const t = n.generateVariable(this.varName), i = n.generateTmpVariable(), r = this.options.encoding, a = r.toLowerCase() === "hex", o = 'b => b.toString(16).padStart(2, "0")';
619
+ const t = n.generateVariable(this.varName), i = n.generateTmpVariable(), a = this.options.encoding, r = a.toLowerCase() === "hex", o = 'b => b.toString(16).padStart(2, "0")';
622
620
  if (this.options.length && this.options.zeroTerminated) {
623
- const s = this.options.length;
624
- n.pushCode(`var ${i} = offset;`), n.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${i} < ${s});`);
625
- const u = `offset - ${i} < ${s} ? offset - 1 : offset`;
626
- n.pushCode(a ? `${t} = Array.from(buffer.subarray(${i}, ${u}), ${o}).join('');` : `${t} = new TextDecoder('${r}').decode(buffer.subarray(${i}, ${u}));`);
621
+ const l = this.options.length;
622
+ n.pushCode(`var ${i} = offset;`), n.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${i} < ${l});`);
623
+ const u = `offset - ${i} < ${l} ? offset - 1 : offset`;
624
+ n.pushCode(r ? `${t} = Array.from(buffer.subarray(${i}, ${u}), ${o}).join('');` : `${t} = new TextDecoder('${a}').decode(buffer.subarray(${i}, ${u}));`);
627
625
  } else if (this.options.length) {
628
- const s = n.generateOption(this.options.length);
629
- n.pushCode(a ? `${t} = Array.from(buffer.subarray(offset, offset + ${s}), ${o}).join('');` : `${t} = new TextDecoder('${r}').decode(buffer.subarray(offset, offset + ${s}));`), n.pushCode(`offset += ${s};`);
626
+ const l = n.generateOption(this.options.length);
627
+ n.pushCode(r ? `${t} = Array.from(buffer.subarray(offset, offset + ${l}), ${o}).join('');` : `${t} = new TextDecoder('${a}').decode(buffer.subarray(offset, offset + ${l}));`), n.pushCode(`offset += ${l};`);
630
628
  } else
631
- this.options.zeroTerminated ? (n.pushCode(`var ${i} = offset;`), n.pushCode("while(dataView.getUint8(offset++) !== 0);"), n.pushCode(a ? `${t} = Array.from(buffer.subarray(${i}, offset - 1), ${o}).join('');` : `${t} = new TextDecoder('${r}').decode(buffer.subarray(${i}, offset - 1));`)) : this.options.greedy && (n.pushCode(`var ${i} = offset;`), n.pushCode("while(buffer.length > offset++);"), n.pushCode(a ? `${t} = Array.from(buffer.subarray(${i}, offset), ${o}).join('');` : `${t} = new TextDecoder('${r}').decode(buffer.subarray(${i}, offset));`));
629
+ this.options.zeroTerminated ? (n.pushCode(`var ${i} = offset;`), n.pushCode("while(dataView.getUint8(offset++) !== 0);"), n.pushCode(r ? `${t} = Array.from(buffer.subarray(${i}, offset - 1), ${o}).join('');` : `${t} = new TextDecoder('${a}').decode(buffer.subarray(${i}, offset - 1));`)) : this.options.greedy && (n.pushCode(`var ${i} = offset;`), n.pushCode("while(buffer.length > offset++);"), n.pushCode(r ? `${t} = Array.from(buffer.subarray(${i}, offset), ${o}).join('');` : `${t} = new TextDecoder('${a}').decode(buffer.subarray(${i}, offset));`));
632
630
  this.options.stripNull && n.pushCode(`${t} = ${t}.replace(/\\x00+$/g, '')`);
633
631
  }
634
632
  generateBuffer(n) {
635
633
  const t = n.generateVariable(this.varName);
636
634
  if (typeof this.options.readUntil == "function") {
637
- const i = this.options.readUntil, r = n.generateTmpVariable(), a = n.generateTmpVariable();
638
- n.pushCode(`var ${r} = offset;`), n.pushCode(`var ${a} = 0;`), n.pushCode("while (offset < buffer.length) {"), n.pushCode(`${a} = dataView.getUint8(offset);`);
635
+ const i = this.options.readUntil, a = n.generateTmpVariable(), r = n.generateTmpVariable();
636
+ n.pushCode(`var ${a} = offset;`), n.pushCode(`var ${r} = 0;`), n.pushCode("while (offset < buffer.length) {"), n.pushCode(`${r} = dataView.getUint8(offset);`);
639
637
  const o = n.addImport(i);
640
- n.pushCode(`if (${o}.call(${n.generateVariable()}, ${a}, buffer.subarray(offset))) break;`), n.pushCode("offset += 1;"), n.pushCode("}"), n.pushCode(`${t} = buffer.subarray(${r}, offset);`);
638
+ n.pushCode(`if (${o}.call(${n.generateVariable()}, ${r}, buffer.subarray(offset))) break;`), n.pushCode("offset += 1;"), n.pushCode("}"), n.pushCode(`${t} = buffer.subarray(${a}, offset);`);
641
639
  } else if (this.options.readUntil === "eof")
642
640
  n.pushCode(`${t} = buffer.subarray(offset);`);
643
641
  else {
@@ -647,38 +645,38 @@ class N {
647
645
  this.options.clone && n.pushCode(`${t} = buffer.constructor.from(${t});`);
648
646
  }
649
647
  generateArray(n) {
650
- const t = n.generateOption(this.options.length), i = n.generateOption(this.options.lengthInBytes), r = this.options.type, a = n.generateTmpVariable(), o = n.generateVariable(this.varName), s = n.generateTmpVariable(), u = this.options.key, l = typeof u == "string";
651
- if (l ? n.pushCode(`${o} = {};`) : n.pushCode(`${o} = [];`), typeof this.options.readUntil == "function" ? n.pushCode("do {") : this.options.readUntil === "eof" ? n.pushCode(`for (var ${a} = 0; offset < buffer.length; ${a}++) {`) : i !== void 0 ? n.pushCode(`for (var ${a} = offset + ${i}; offset < ${a}; ) {`) : n.pushCode(`for (var ${a} = ${t}; ${a} > 0; ${a}--) {`), typeof r == "string")
652
- if (x.get(r)) {
648
+ const t = n.generateOption(this.options.length), i = n.generateOption(this.options.lengthInBytes), a = this.options.type, r = n.generateTmpVariable(), o = n.generateVariable(this.varName), l = n.generateTmpVariable(), u = this.options.key, s = typeof u == "string";
649
+ if (s ? n.pushCode(`${o} = {};`) : n.pushCode(`${o} = [];`), typeof this.options.readUntil == "function" ? n.pushCode("do {") : this.options.readUntil === "eof" ? n.pushCode(`for (var ${r} = 0; offset < buffer.length; ${r}++) {`) : i !== void 0 ? n.pushCode(`for (var ${r} = offset + ${i}; offset < ${r}; ) {`) : n.pushCode(`for (var ${r} = ${t}; ${r} > 0; ${r}--) {`), typeof a == "string")
650
+ if (x.get(a)) {
653
651
  const f = n.generateTmpVariable();
654
- if (n.pushCode(`var ${f} = ${oe + r}(offset, {`), n.useContextVariables) {
655
- const d = n.generateVariable();
656
- n.pushCode(`$parent: ${d},`), n.pushCode(`$root: ${d}.$root,`), !this.options.readUntil && i === void 0 && n.pushCode(`$index: ${t} - ${a},`);
652
+ if (n.pushCode(`var ${f} = ${re + a}(offset, {`), n.useContextVariables) {
653
+ const p = n.generateVariable();
654
+ n.pushCode(`$parent: ${p},`), n.pushCode(`$root: ${p}.$root,`), !this.options.readUntil && i === void 0 && n.pushCode(`$index: ${t} - ${r},`);
657
655
  }
658
- n.pushCode("});"), n.pushCode(`var ${s} = ${f}.result; offset = ${f}.offset;`), r !== this.alias && n.addReference(r);
656
+ n.pushCode("});"), n.pushCode(`var ${l} = ${f}.result; offset = ${f}.offset;`), a !== this.alias && n.addReference(a);
659
657
  } else {
660
- const f = Ye[r], d = Ke[r];
661
- n.pushCode(`var ${s} = dataView.get${f}(offset, ${d});`), n.pushCode(`offset += ${M[r]};`);
658
+ const f = Ye[a], p = Ke[a];
659
+ n.pushCode(`var ${l} = dataView.get${f}(offset, ${p});`), n.pushCode(`offset += ${M[a]};`);
662
660
  }
663
- else if (r instanceof N) {
664
- n.pushCode(`var ${s} = {};`);
661
+ else if (a instanceof N) {
662
+ n.pushCode(`var ${l} = {};`);
665
663
  const f = n.generateVariable();
666
- n.pushScope(s), n.useContextVariables && (n.pushCode(`${s}.$parent = ${f};`), n.pushCode(`${s}.$root = ${f}.$root;`), !this.options.readUntil && i === void 0 && n.pushCode(`${s}.$index = ${t} - ${a};`)), r.generate(n), n.useContextVariables && (n.pushCode(`delete ${s}.$parent;`), n.pushCode(`delete ${s}.$root;`), n.pushCode(`delete ${s}.$index;`)), n.popScope();
664
+ n.pushScope(l), n.useContextVariables && (n.pushCode(`${l}.$parent = ${f};`), n.pushCode(`${l}.$root = ${f}.$root;`), !this.options.readUntil && i === void 0 && n.pushCode(`${l}.$index = ${t} - ${r};`)), a.generate(n), n.useContextVariables && (n.pushCode(`delete ${l}.$parent;`), n.pushCode(`delete ${l}.$root;`), n.pushCode(`delete ${l}.$index;`)), n.popScope();
667
665
  }
668
- if (l ? n.pushCode(`${o}[${s}.${u}] = ${s};`) : n.pushCode(`${o}.push(${s});`), n.pushCode("}"), typeof this.options.readUntil == "function") {
669
- const f = this.options.readUntil, d = n.addImport(f);
670
- n.pushCode(`while (!${d}.call(${n.generateVariable()}, ${s}, buffer.subarray(offset)));`);
666
+ if (s ? n.pushCode(`${o}[${l}.${u}] = ${l};`) : n.pushCode(`${o}.push(${l});`), n.pushCode("}"), typeof this.options.readUntil == "function") {
667
+ const f = this.options.readUntil, p = n.addImport(f);
668
+ n.pushCode(`while (!${p}.call(${n.generateVariable()}, ${l}, buffer.subarray(offset)));`);
671
669
  }
672
670
  }
673
671
  generateChoiceCase(n, t, i) {
674
672
  if (typeof i == "string") {
675
- const r = n.generateVariable(this.varName);
673
+ const a = n.generateVariable(this.varName);
676
674
  if (x.has(i)) {
677
- const a = n.generateTmpVariable();
678
- n.pushCode(`var ${a} = ${oe + i}(offset, {`), n.useContextVariables && (n.pushCode(`$parent: ${r}.$parent,`), n.pushCode(`$root: ${r}.$root,`)), n.pushCode("});"), n.pushCode(`${r} = ${a}.result; offset = ${a}.offset;`), i !== this.alias && n.addReference(i);
675
+ const r = n.generateTmpVariable();
676
+ n.pushCode(`var ${r} = ${re + i}(offset, {`), n.useContextVariables && (n.pushCode(`$parent: ${a}.$parent,`), n.pushCode(`$root: ${a}.$root,`)), n.pushCode("});"), n.pushCode(`${a} = ${r}.result; offset = ${r}.offset;`), i !== this.alias && n.addReference(i);
679
677
  } else {
680
- const a = Ye[i], o = Ke[i];
681
- n.pushCode(`${r} = dataView.get${a}(offset, ${o});`), n.pushCode(`offset += ${M[i]}`);
678
+ const r = Ye[i], o = Ke[i];
679
+ n.pushCode(`${a} = dataView.get${r}(offset, ${o});`), n.pushCode(`offset += ${M[i]}`);
682
680
  }
683
681
  } else
684
682
  i instanceof N && (n.pushPath(t), i.generate(n), n.popPath(t));
@@ -686,13 +684,13 @@ class N {
686
684
  generateChoice(n) {
687
685
  const t = n.generateOption(this.options.tag), i = n.generateVariable(this.varName);
688
686
  if (this.varName && (n.pushCode(`${i} = {};`), n.useContextVariables)) {
689
- const r = n.generateVariable();
690
- n.pushCode(`${i}.$parent = ${r};`), n.pushCode(`${i}.$root = ${r}.$root;`);
687
+ const a = n.generateVariable();
688
+ n.pushCode(`${i}.$parent = ${a};`), n.pushCode(`${i}.$root = ${a}.$root;`);
691
689
  }
692
690
  n.pushCode(`switch(${t}) {`);
693
- for (const r in this.options.choices) {
694
- const a = parseInt(r, 10), o = this.options.choices[a];
695
- n.pushCode(`case ${a}:`), this.generateChoiceCase(n, this.varName, o), n.pushCode("break;");
691
+ for (const a in this.options.choices) {
692
+ const r = parseInt(a, 10), o = this.options.choices[r];
693
+ n.pushCode(`case ${r}:`), this.generateChoiceCase(n, this.varName, o), n.pushCode("break;");
696
694
  }
697
695
  n.pushCode("default:"), this.options.defaultChoice ? this.generateChoiceCase(n, this.varName, this.options.defaultChoice) : n.generateError(`"Met undefined tag value " + ${t} + " at choice"`), n.pushCode("}"), this.varName && n.useContextVariables && (n.pushCode(`delete ${i}.$parent;`), n.pushCode(`delete ${i}.$root;`));
698
696
  }
@@ -706,9 +704,9 @@ class N {
706
704
  n.pushPath(this.varName), this.options.type.generate(n), n.popPath(this.varName), this.varName && n.useContextVariables && n.useContextVariables && (n.pushCode(`delete ${t}.$parent;`), n.pushCode(`delete ${t}.$root;`));
707
705
  } else if (x.has(this.options.type)) {
708
706
  const i = n.generateTmpVariable();
709
- if (n.pushCode(`var ${i} = ${oe + this.options.type}(offset, {`), n.useContextVariables) {
710
- const r = n.generateVariable();
711
- n.pushCode(`$parent: ${r},`), n.pushCode(`$root: ${r}.$root,`);
707
+ if (n.pushCode(`var ${i} = ${re + this.options.type}(offset, {`), n.useContextVariables) {
708
+ const a = n.generateVariable();
709
+ n.pushCode(`$parent: ${a},`), n.pushCode(`$root: ${a}.$root,`);
712
710
  }
713
711
  n.pushCode("});"), n.pushCode(`${t} = ${i}.result; offset = ${i}.offset;`), this.options.type !== this.alias && n.addReference(this.options.type);
714
712
  }
@@ -716,10 +714,10 @@ class N {
716
714
  generateWrapper(n) {
717
715
  const t = n.generateVariable(this.varName), i = n.generateTmpVariable();
718
716
  if (typeof this.options.readUntil == "function") {
719
- const u = this.options.readUntil, l = n.generateTmpVariable(), f = n.generateTmpVariable();
720
- n.pushCode(`var ${l} = offset;`), n.pushCode(`var ${f} = 0;`), n.pushCode("while (offset < buffer.length) {"), n.pushCode(`${f} = dataView.getUint8(offset);`);
721
- const d = n.addImport(u);
722
- n.pushCode(`if (${d}.call(${n.generateVariable()}, ${f}, buffer.subarray(offset))) break;`), n.pushCode("offset += 1;"), n.pushCode("}"), n.pushCode(`${i} = buffer.subarray(${l}, offset);`);
717
+ const u = this.options.readUntil, s = n.generateTmpVariable(), f = n.generateTmpVariable();
718
+ n.pushCode(`var ${s} = offset;`), n.pushCode(`var ${f} = 0;`), n.pushCode("while (offset < buffer.length) {"), n.pushCode(`${f} = dataView.getUint8(offset);`);
719
+ const p = n.addImport(u);
720
+ n.pushCode(`if (${p}.call(${n.generateVariable()}, ${f}, buffer.subarray(offset))) break;`), n.pushCode("offset += 1;"), n.pushCode("}"), n.pushCode(`${i} = buffer.subarray(${s}, offset);`);
723
721
  } else if (this.options.readUntil === "eof")
724
722
  n.pushCode(`${i} = buffer.subarray(offset);`);
725
723
  else {
@@ -727,107 +725,80 @@ class N {
727
725
  n.pushCode(`${i} = buffer.subarray(offset, offset + ${u});`), n.pushCode(`offset += ${u};`);
728
726
  }
729
727
  this.options.clone && n.pushCode(`${i} = buffer.constructor.from(${i});`);
730
- const r = n.generateTmpVariable(), a = n.generateTmpVariable(), o = n.generateTmpVariable(), s = n.addImport(this.options.wrapper);
731
- if (n.pushCode(`${i} = ${s}.call(this, ${i}).subarray(0);`), n.pushCode(`var ${r} = buffer;`), n.pushCode(`var ${a} = offset;`), n.pushCode(`var ${o} = dataView;`), n.pushCode(`buffer = ${i};`), n.pushCode("offset = 0;"), n.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"), this.options.type instanceof N)
728
+ const a = n.generateTmpVariable(), r = n.generateTmpVariable(), o = n.generateTmpVariable(), l = n.addImport(this.options.wrapper);
729
+ if (n.pushCode(`${i} = ${l}.call(this, ${i}).subarray(0);`), n.pushCode(`var ${a} = buffer;`), n.pushCode(`var ${r} = offset;`), n.pushCode(`var ${o} = dataView;`), n.pushCode(`buffer = ${i};`), n.pushCode("offset = 0;"), n.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"), this.options.type instanceof N)
732
730
  this.varName && n.pushCode(`${t} = {};`), n.pushPath(this.varName), this.options.type.generate(n), n.popPath(this.varName);
733
731
  else if (x.has(this.options.type)) {
734
732
  const u = n.generateTmpVariable();
735
- n.pushCode(`var ${u} = ${oe + this.options.type}(0);`), n.pushCode(`${t} = ${u}.result;`), this.options.type !== this.alias && n.addReference(this.options.type);
733
+ n.pushCode(`var ${u} = ${re + this.options.type}(0);`), n.pushCode(`${t} = ${u}.result;`), this.options.type !== this.alias && n.addReference(this.options.type);
736
734
  }
737
- n.pushCode(`buffer = ${r};`), n.pushCode(`dataView = ${o};`), n.pushCode(`offset = ${a};`);
735
+ n.pushCode(`buffer = ${a};`), n.pushCode(`dataView = ${o};`), n.pushCode(`offset = ${r};`);
738
736
  }
739
737
  generateFormatter(n, t, i) {
740
738
  if (typeof i == "function") {
741
- const r = n.addImport(i);
742
- n.pushCode(`${t} = ${r}.call(${n.generateVariable()}, ${t});`);
739
+ const a = n.addImport(i);
740
+ n.pushCode(`${t} = ${a}.call(${n.generateVariable()}, ${t});`);
743
741
  }
744
742
  }
745
743
  generatePointer(n) {
746
- const t = this.options.type, i = n.generateOption(this.options.offset), r = n.generateTmpVariable(), a = n.generateVariable(this.varName);
747
- if (n.pushCode(`var ${r} = offset;`), n.pushCode(`offset = ${i};`), this.options.type instanceof N) {
748
- if (n.pushCode(`${a} = {};`), n.useContextVariables) {
744
+ const t = this.options.type, i = n.generateOption(this.options.offset), a = n.generateTmpVariable(), r = n.generateVariable(this.varName);
745
+ if (n.pushCode(`var ${a} = offset;`), n.pushCode(`offset = ${i};`), this.options.type instanceof N) {
746
+ if (n.pushCode(`${r} = {};`), n.useContextVariables) {
749
747
  const o = n.generateVariable();
750
- n.pushCode(`${a}.$parent = ${o};`), n.pushCode(`${a}.$root = ${o}.$root;`);
748
+ n.pushCode(`${r}.$parent = ${o};`), n.pushCode(`${r}.$root = ${o}.$root;`);
751
749
  }
752
- n.pushPath(this.varName), this.options.type.generate(n), n.popPath(this.varName), n.useContextVariables && (n.pushCode(`delete ${a}.$parent;`), n.pushCode(`delete ${a}.$root;`));
750
+ n.pushPath(this.varName), this.options.type.generate(n), n.popPath(this.varName), n.useContextVariables && (n.pushCode(`delete ${r}.$parent;`), n.pushCode(`delete ${r}.$root;`));
753
751
  } else if (x.has(this.options.type)) {
754
752
  const o = n.generateTmpVariable();
755
- if (n.pushCode(`var ${o} = ${oe + this.options.type}(offset, {`), n.useContextVariables) {
756
- const s = n.generateVariable();
757
- n.pushCode(`$parent: ${s},`), n.pushCode(`$root: ${s}.$root,`);
753
+ if (n.pushCode(`var ${o} = ${re + this.options.type}(offset, {`), n.useContextVariables) {
754
+ const l = n.generateVariable();
755
+ n.pushCode(`$parent: ${l},`), n.pushCode(`$root: ${l}.$root,`);
758
756
  }
759
- n.pushCode("});"), n.pushCode(`${a} = ${o}.result; offset = ${o}.offset;`), this.options.type !== this.alias && n.addReference(this.options.type);
757
+ n.pushCode("});"), n.pushCode(`${r} = ${o}.result; offset = ${o}.offset;`), this.options.type !== this.alias && n.addReference(this.options.type);
760
758
  } else if (Object.keys(M).indexOf(this.options.type) >= 0) {
761
- const o = Ye[t], s = Ke[t];
762
- n.pushCode(`${a} = dataView.get${o}(offset, ${s});`), n.pushCode(`offset += ${M[t]};`);
759
+ const o = Ye[t], l = Ke[t];
760
+ n.pushCode(`${r} = dataView.get${o}(offset, ${l});`), n.pushCode(`offset += ${M[t]};`);
763
761
  }
764
- n.pushCode(`offset = ${r};`);
762
+ n.pushCode(`offset = ${a};`);
765
763
  }
766
764
  generateSaveOffset(n) {
767
765
  const t = n.generateVariable(this.varName);
768
766
  n.pushCode(`${t} = offset`);
769
767
  }
770
768
  }
771
- class q {
772
- constructor(n, t) {
773
- this.ranges = arguments.length === 2 ? [{ min: n, max: t }] : 0 in n ? Object.assign({}, n) : [n];
769
+ class pe {
770
+ constructor(n) {
771
+ this.ranges = n;
774
772
  }
775
- min() {
773
+ get min() {
776
774
  return this.ranges[0].min;
777
775
  }
778
- max() {
776
+ get max() {
779
777
  return this.ranges[this.ranges.length - 1].max;
780
778
  }
781
779
  contains(n) {
782
- for (let t = 0; t < this.ranges.length; t += 1) {
783
- const i = this.ranges[t];
784
- if (i.min <= n && i.max >= n)
780
+ for (const t of this.ranges)
781
+ if (t.min <= n && t.max >= n)
785
782
  return !0;
786
- }
787
783
  return !1;
788
784
  }
789
785
  isContiguous() {
790
786
  return this.ranges.length > 1;
791
787
  }
792
788
  getRanges() {
793
- return this.ranges.map((n) => new q(n.min, n.max));
789
+ return this.ranges.map((n) => new pe([{ min: n.min, max: n.max }]));
794
790
  }
795
791
  toString() {
796
792
  return this.ranges.map((n) => `[${n.min}-${n.max}]`).join(",");
797
793
  }
798
794
  union(n) {
799
- const t = this.getRanges().concat(n.getRanges()).sort(this.rangeOrder), i = [];
800
- let r = t[0];
801
- for (let a = 1; a < t.length; a += 1) {
802
- const o = t[a];
803
- o.min() > r.max() + 1 ? (i.push(r), r = o) : o.max() > r.max() && (r = new q(r.min(), o.max()));
795
+ const t = [...this.getRanges(), ...n.getRanges()].sort((r, o) => r.min < o.min ? -1 : r.min > o.min ? 1 : r.max < o.max ? -1 : o.max > r.max ? 1 : 0), i = [];
796
+ let a = t[0];
797
+ for (let r = 1; r < t.length; r += 1) {
798
+ const o = t[r];
799
+ o.min > a.max + 1 ? (i.push(a), a = o) : o.max > a.max && (a = new pe([{ min: a.min, max: o.max }]));
804
800
  }
805
- return i.push(r), i.length === 1 ? i[0] : new q(i);
806
- }
807
- intersection(n) {
808
- let t = this, i = n;
809
- const r = this.ranges(), a = i.ranges(), o = r.length, s = a.length;
810
- let u = 0, l = 0;
811
- const f = [];
812
- for (; u < o && l < s; ) {
813
- t = r[u], i = a[l];
814
- const d = Math.max(t.min(), i.min()), c = Math.min(t.max(), i.max());
815
- c >= d && f.push(new q(d, c)), t.max() > i.max() ? l += 1 : u += 1;
816
- }
817
- if (f.length === 0)
818
- throw new Error("found range of length 0");
819
- return f.length === 1 ? f[0] : new q(f);
820
- }
821
- coverage() {
822
- let n = 0;
823
- const t = this.ranges();
824
- for (const i of t)
825
- n += i.max() - i.min() + 1;
826
- return n;
827
- }
828
- rangeOrder(n, t) {
829
- let i = n, r = t;
830
- return arguments.length < 2 && (r = i, i = this), i.min() < r.min() ? -1 : i.min() > r.min() ? 1 : i.max() < r.max() ? -1 : r.max() > i.max() ? 1 : 0;
801
+ return i.push(a), i.length === 1 ? i[0] : new pe(i);
831
802
  }
832
803
  }
833
804
  /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
@@ -837,7 +808,7 @@ function ye(e) {
837
808
  for (; --n >= 0; )
838
809
  e[n] = 0;
839
810
  }
840
- const hr = 0, Kn = 1, cr = 2, dr = 3, pr = 258, Zt = 29, Ze = 256, Oe = Ze + 1 + Zt, _e = 30, xt = 19, Wn = 2 * Oe + 1, se = 15, ht = 16, _r = 7, Mt = 256, Xn = 16, qn = 17, Jn = 18, Tt = (
811
+ const hr = 0, Kn = 1, cr = 2, dr = 3, pr = 258, Zt = 29, Ze = 256, Oe = Ze + 1 + Zt, _e = 30, xt = 19, Wn = 2 * Oe + 1, ae = 15, ht = 16, _r = 7, Mt = 256, Xn = 16, qn = 17, Jn = 18, Tt = (
841
812
  /* extra bits for each length code */
842
813
  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])
843
814
  ), nt = (
@@ -858,8 +829,8 @@ const Ht = new Array(Zt);
858
829
  ye(Ht);
859
830
  const it = new Array(_e);
860
831
  ye(it);
861
- function ct(e, n, t, i, r) {
862
- this.static_tree = e, this.extra_bits = n, this.extra_base = t, this.elems = i, this.max_length = r, this.has_stree = e && e.length;
832
+ function ct(e, n, t, i, a) {
833
+ this.static_tree = e, this.extra_bits = n, this.extra_base = t, this.elems = i, this.max_length = a, this.has_stree = e && e.length;
863
834
  }
864
835
  let ei, ti, ni;
865
836
  function dt(e, n) {
@@ -885,12 +856,12 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
885
856
  }, wr = (e) => {
886
857
  e.bi_valid === 16 ? (Be(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);
887
858
  }, mr = (e, n) => {
888
- const t = n.dyn_tree, i = n.max_code, r = n.stat_desc.static_tree, a = n.stat_desc.has_stree, o = n.stat_desc.extra_bits, s = n.stat_desc.extra_base, u = n.stat_desc.max_length;
889
- let l, f, d, c, h, _, g = 0;
890
- for (c = 0; c <= se; c++)
859
+ const t = n.dyn_tree, i = n.max_code, a = n.stat_desc.static_tree, r = n.stat_desc.has_stree, o = n.stat_desc.extra_bits, l = n.stat_desc.extra_base, u = n.stat_desc.max_length;
860
+ let s, f, p, c, h, _, g = 0;
861
+ for (c = 0; c <= ae; c++)
891
862
  e.bl_count[c] = 0;
892
- for (t[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < Wn; l++)
893
- f = e.heap[l], c = t[t[f * 2 + 1] * 2 + 1] + 1, c > u && (c = u, g++), t[f * 2 + 1] = c, !(f > i) && (e.bl_count[c]++, h = 0, f >= s && (h = o[f - s]), _ = t[f * 2], e.opt_len += _ * (c + h), a && (e.static_len += _ * (r[f * 2 + 1] + h)));
863
+ for (t[e.heap[e.heap_max] * 2 + 1] = 0, s = e.heap_max + 1; s < Wn; s++)
864
+ f = e.heap[s], c = t[t[f * 2 + 1] * 2 + 1] + 1, c > u && (c = u, g++), t[f * 2 + 1] = c, !(f > i) && (e.bl_count[c]++, h = 0, f >= l && (h = o[f - l]), _ = t[f * 2], e.opt_len += _ * (c + h), r && (e.static_len += _ * (a[f * 2 + 1] + h)));
894
865
  if (g !== 0) {
895
866
  do {
896
867
  for (c = u - 1; e.bl_count[c] === 0; )
@@ -899,42 +870,42 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
899
870
  } while (g > 0);
900
871
  for (c = u; c !== 0; c--)
901
872
  for (f = e.bl_count[c]; f !== 0; )
902
- d = e.heap[--l], !(d > i) && (t[d * 2 + 1] !== c && (e.opt_len += (c - t[d * 2 + 1]) * t[d * 2], t[d * 2 + 1] = c), f--);
873
+ p = e.heap[--s], !(p > i) && (t[p * 2 + 1] !== c && (e.opt_len += (c - t[p * 2 + 1]) * t[p * 2], t[p * 2 + 1] = c), f--);
903
874
  }
904
875
  }, ai = (e, n, t) => {
905
- const i = new Array(se + 1);
906
- let r = 0, a, o;
907
- for (a = 1; a <= se; a++)
908
- r = r + t[a - 1] << 1, i[a] = r;
876
+ const i = new Array(ae + 1);
877
+ let a = 0, r, o;
878
+ for (r = 1; r <= ae; r++)
879
+ a = a + t[r - 1] << 1, i[r] = a;
909
880
  for (o = 0; o <= n; o++) {
910
- let s = e[o * 2 + 1];
911
- s !== 0 && (e[o * 2] = ri(i[s]++, s));
881
+ let l = e[o * 2 + 1];
882
+ l !== 0 && (e[o * 2] = ri(i[l]++, l));
912
883
  }
913
884
  }, yr = () => {
914
- let e, n, t, i, r;
915
- const a = new Array(se + 1);
885
+ let e, n, t, i, a;
886
+ const r = new Array(ae + 1);
916
887
  for (t = 0, i = 0; i < Zt - 1; i++)
917
888
  for (Ht[i] = t, e = 0; e < 1 << Tt[i]; e++)
918
889
  Re[t++] = i;
919
- for (Re[t - 1] = i, r = 0, i = 0; i < 16; i++)
920
- for (it[i] = r, e = 0; e < 1 << nt[i]; e++)
921
- ze[r++] = i;
922
- for (r >>= 7; i < _e; i++)
923
- for (it[i] = r << 7, e = 0; e < 1 << nt[i] - 7; e++)
924
- ze[256 + r++] = i;
925
- for (n = 0; n <= se; n++)
926
- a[n] = 0;
890
+ for (Re[t - 1] = i, a = 0, i = 0; i < 16; i++)
891
+ for (it[i] = a, e = 0; e < 1 << nt[i]; e++)
892
+ ze[a++] = i;
893
+ for (a >>= 7; i < _e; i++)
894
+ for (it[i] = a << 7, e = 0; e < 1 << nt[i] - 7; e++)
895
+ ze[256 + a++] = i;
896
+ for (n = 0; n <= ae; n++)
897
+ r[n] = 0;
927
898
  for (e = 0; e <= 143; )
928
- W[e * 2 + 1] = 8, e++, a[8]++;
899
+ W[e * 2 + 1] = 8, e++, r[8]++;
929
900
  for (; e <= 255; )
930
- W[e * 2 + 1] = 9, e++, a[9]++;
901
+ W[e * 2 + 1] = 9, e++, r[9]++;
931
902
  for (; e <= 279; )
932
- W[e * 2 + 1] = 7, e++, a[7]++;
903
+ W[e * 2 + 1] = 7, e++, r[7]++;
933
904
  for (; e <= 287; )
934
- W[e * 2 + 1] = 8, e++, a[8]++;
935
- for (ai(W, Oe + 1, a), e = 0; e < _e; e++)
905
+ W[e * 2 + 1] = 8, e++, r[8]++;
906
+ for (ai(W, Oe + 1, r), e = 0; e < _e; e++)
936
907
  Ie[e * 2 + 1] = 5, Ie[e * 2] = ri(e, 5);
937
- ei = new ct(W, Tt, Ze + 1, Oe, se), ti = new ct(Ie, nt, 0, _e, se), ni = new ct(new Array(0), br, 0, xt, _r);
908
+ ei = new ct(W, Tt, Ze + 1, Oe, ae), ti = new ct(Ie, nt, 0, _e, ae), ni = new ct(new Array(0), br, 0, xt, _r);
938
909
  }, oi = (e) => {
939
910
  let n;
940
911
  for (n = 0; n < Oe; n++)
@@ -947,31 +918,31 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
947
918
  }, si = (e) => {
948
919
  e.bi_valid > 8 ? Be(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
949
920
  }, tn = (e, n, t, i) => {
950
- const r = n * 2, a = t * 2;
951
- return e[r] < e[a] || e[r] === e[a] && i[n] <= i[t];
921
+ const a = n * 2, r = t * 2;
922
+ return e[a] < e[r] || e[a] === e[r] && i[n] <= i[t];
952
923
  }, pt = (e, n, t) => {
953
924
  const i = e.heap[t];
954
- let r = t << 1;
955
- for (; r <= e.heap_len && (r < e.heap_len && tn(n, e.heap[r + 1], e.heap[r], e.depth) && r++, !tn(n, i, e.heap[r], e.depth)); )
956
- e.heap[t] = e.heap[r], t = r, r <<= 1;
925
+ let a = t << 1;
926
+ for (; a <= e.heap_len && (a < e.heap_len && tn(n, e.heap[a + 1], e.heap[a], e.depth) && a++, !tn(n, i, e.heap[a], e.depth)); )
927
+ e.heap[t] = e.heap[a], t = a, a <<= 1;
957
928
  e.heap[t] = i;
958
929
  }, nn = (e, n, t) => {
959
- let i, r, a = 0, o, s;
930
+ let i, a, r = 0, o, l;
960
931
  if (e.sym_next !== 0)
961
932
  do
962
- i = e.pending_buf[e.sym_buf + a++] & 255, i += (e.pending_buf[e.sym_buf + a++] & 255) << 8, r = e.pending_buf[e.sym_buf + a++], i === 0 ? j(e, r, n) : (o = Re[r], j(e, o + Ze + 1, n), s = Tt[o], s !== 0 && (r -= Ht[o], D(e, r, s)), i--, o = ii(i), j(e, o, t), s = nt[o], s !== 0 && (i -= it[o], D(e, i, s)));
963
- while (a < e.sym_next);
933
+ i = e.pending_buf[e.sym_buf + r++] & 255, i += (e.pending_buf[e.sym_buf + r++] & 255) << 8, a = e.pending_buf[e.sym_buf + r++], i === 0 ? j(e, a, n) : (o = Re[a], j(e, o + Ze + 1, n), l = Tt[o], l !== 0 && (a -= Ht[o], D(e, a, l)), i--, o = ii(i), j(e, o, t), l = nt[o], l !== 0 && (i -= it[o], D(e, i, l)));
934
+ while (r < e.sym_next);
964
935
  j(e, Mt, n);
965
936
  }, At = (e, n) => {
966
- const t = n.dyn_tree, i = n.stat_desc.static_tree, r = n.stat_desc.has_stree, a = n.stat_desc.elems;
967
- let o, s, u = -1, l;
968
- for (e.heap_len = 0, e.heap_max = Wn, o = 0; o < a; o++)
937
+ const t = n.dyn_tree, i = n.stat_desc.static_tree, a = n.stat_desc.has_stree, r = n.stat_desc.elems;
938
+ let o, l, u = -1, s;
939
+ for (e.heap_len = 0, e.heap_max = Wn, o = 0; o < r; o++)
969
940
  t[o * 2] !== 0 ? (e.heap[++e.heap_len] = u = o, e.depth[o] = 0) : t[o * 2 + 1] = 0;
970
941
  for (; e.heap_len < 2; )
971
- l = e.heap[++e.heap_len] = u < 2 ? ++u : 0, t[l * 2] = 1, e.depth[l] = 0, e.opt_len--, r && (e.static_len -= i[l * 2 + 1]);
942
+ s = e.heap[++e.heap_len] = u < 2 ? ++u : 0, t[s * 2] = 1, e.depth[s] = 0, e.opt_len--, a && (e.static_len -= i[s * 2 + 1]);
972
943
  for (n.max_code = u, o = e.heap_len >> 1; o >= 1; o--)
973
944
  pt(e, t, o);
974
- l = a;
945
+ s = r;
975
946
  do
976
947
  o = e.heap[
977
948
  1
@@ -984,13 +955,13 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
984
955
  t,
985
956
  1
986
957
  /*SMALLEST*/
987
- ), s = e.heap[
958
+ ), l = e.heap[
988
959
  1
989
960
  /*SMALLEST*/
990
- ], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = s, t[l * 2] = t[o * 2] + t[s * 2], e.depth[l] = (e.depth[o] >= e.depth[s] ? e.depth[o] : e.depth[s]) + 1, t[o * 2 + 1] = t[s * 2 + 1] = l, e.heap[
961
+ ], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = l, t[s * 2] = t[o * 2] + t[l * 2], e.depth[s] = (e.depth[o] >= e.depth[l] ? e.depth[o] : e.depth[l]) + 1, t[o * 2 + 1] = t[l * 2 + 1] = s, e.heap[
991
962
  1
992
963
  /*SMALLEST*/
993
- ] = l++, pt(
964
+ ] = s++, pt(
994
965
  e,
995
966
  t,
996
967
  1
@@ -1002,20 +973,20 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
1002
973
  /*SMALLEST*/
1003
974
  ], mr(e, n), ai(t, u, e.bl_count);
1004
975
  }, rn = (e, n, t) => {
1005
- let i, r = -1, a, o = n[0 * 2 + 1], s = 0, u = 7, l = 4;
1006
- for (o === 0 && (u = 138, l = 3), n[(t + 1) * 2 + 1] = 65535, i = 0; i <= t; i++)
1007
- a = o, o = n[(i + 1) * 2 + 1], !(++s < u && a === o) && (s < l ? e.bl_tree[a * 2] += s : a !== 0 ? (a !== r && e.bl_tree[a * 2]++, e.bl_tree[Xn * 2]++) : s <= 10 ? e.bl_tree[qn * 2]++ : e.bl_tree[Jn * 2]++, s = 0, r = a, o === 0 ? (u = 138, l = 3) : a === o ? (u = 6, l = 3) : (u = 7, l = 4));
976
+ let i, a = -1, r, o = n[0 * 2 + 1], l = 0, u = 7, s = 4;
977
+ for (o === 0 && (u = 138, s = 3), n[(t + 1) * 2 + 1] = 65535, i = 0; i <= t; i++)
978
+ r = o, o = n[(i + 1) * 2 + 1], !(++l < u && r === o) && (l < s ? e.bl_tree[r * 2] += l : r !== 0 ? (r !== a && e.bl_tree[r * 2]++, e.bl_tree[Xn * 2]++) : l <= 10 ? e.bl_tree[qn * 2]++ : e.bl_tree[Jn * 2]++, l = 0, a = r, o === 0 ? (u = 138, s = 3) : r === o ? (u = 6, s = 3) : (u = 7, s = 4));
1008
979
  }, an = (e, n, t) => {
1009
- let i, r = -1, a, o = n[0 * 2 + 1], s = 0, u = 7, l = 4;
1010
- for (o === 0 && (u = 138, l = 3), i = 0; i <= t; i++)
1011
- if (a = o, o = n[(i + 1) * 2 + 1], !(++s < u && a === o)) {
1012
- if (s < l)
980
+ let i, a = -1, r, o = n[0 * 2 + 1], l = 0, u = 7, s = 4;
981
+ for (o === 0 && (u = 138, s = 3), i = 0; i <= t; i++)
982
+ if (r = o, o = n[(i + 1) * 2 + 1], !(++l < u && r === o)) {
983
+ if (l < s)
1013
984
  do
1014
- j(e, a, e.bl_tree);
1015
- while (--s !== 0);
985
+ j(e, r, e.bl_tree);
986
+ while (--l !== 0);
1016
987
  else
1017
- a !== 0 ? (a !== r && (j(e, a, e.bl_tree), s--), j(e, Xn, e.bl_tree), D(e, s - 3, 2)) : s <= 10 ? (j(e, qn, e.bl_tree), D(e, s - 3, 3)) : (j(e, Jn, e.bl_tree), D(e, s - 11, 7));
1018
- s = 0, r = a, o === 0 ? (u = 138, l = 3) : a === o ? (u = 6, l = 3) : (u = 7, l = 4);
988
+ r !== 0 ? (r !== a && (j(e, r, e.bl_tree), l--), j(e, Xn, e.bl_tree), D(e, l - 3, 2)) : l <= 10 ? (j(e, qn, e.bl_tree), D(e, l - 3, 3)) : (j(e, Jn, e.bl_tree), D(e, l - 11, 7));
989
+ l = 0, a = r, o === 0 ? (u = 138, s = 3) : r === o ? (u = 6, s = 3) : (u = 7, s = 4);
1019
990
  }
1020
991
  }, vr = (e) => {
1021
992
  let n;
@@ -1023,9 +994,9 @@ const ii = (e) => e < 256 ? ze[e] : ze[256 + (e >>> 7)], Be = (e, n) => {
1023
994
  ;
1024
995
  return e.opt_len += 3 * (n + 1) + 5 + 5 + 4, n;
1025
996
  }, kr = (e, n, t, i) => {
1026
- let r;
1027
- for (D(e, n - 257, 5), D(e, t - 1, 5), D(e, i - 4, 4), r = 0; r < i; r++)
1028
- D(e, e.bl_tree[Qn[r] * 2 + 1], 3);
997
+ let a;
998
+ for (D(e, n - 257, 5), D(e, t - 1, 5), D(e, i - 4, 4), a = 0; a < i; a++)
999
+ D(e, e.bl_tree[Qn[a] * 2 + 1], 3);
1029
1000
  an(e, e.dyn_ltree, n - 1), an(e, e.dyn_dtree, t - 1);
1030
1001
  }, $r = (e) => {
1031
1002
  let n = 4093624447, t;
@@ -1047,8 +1018,8 @@ const Er = (e) => {
1047
1018
  }, Cr = (e) => {
1048
1019
  D(e, Kn << 1, 3), j(e, Mt, W), wr(e);
1049
1020
  }, Sr = (e, n, t, i) => {
1050
- let r, a, o = 0;
1051
- e.level > 0 ? (e.strm.data_type === ur && (e.strm.data_type = $r(e)), At(e, e.l_desc), At(e, e.d_desc), o = vr(e), r = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, a <= r && (r = a)) : r = a = t + 5, t + 4 <= r && n !== -1 ? li(e, n, t, i) : e.strategy === fr || a === r ? (D(e, (Kn << 1) + (i ? 1 : 0), 3), nn(e, W, Ie)) : (D(e, (cr << 1) + (i ? 1 : 0), 3), kr(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), nn(e, e.dyn_ltree, e.dyn_dtree)), oi(e), i && si(e);
1021
+ let a, r, o = 0;
1022
+ e.level > 0 ? (e.strm.data_type === ur && (e.strm.data_type = $r(e)), At(e, e.l_desc), At(e, e.d_desc), o = vr(e), a = e.opt_len + 3 + 7 >>> 3, r = e.static_len + 3 + 7 >>> 3, r <= a && (a = r)) : a = r = t + 5, t + 4 <= a && n !== -1 ? li(e, n, t, i) : e.strategy === fr || r === a ? (D(e, (Kn << 1) + (i ? 1 : 0), 3), nn(e, W, Ie)) : (D(e, (cr << 1) + (i ? 1 : 0), 3), kr(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), nn(e, e.dyn_ltree, e.dyn_dtree)), oi(e), i && si(e);
1052
1023
  }, Nr = (e, n, t) => (e.pending_buf[e.sym_buf + e.sym_next++] = n, e.pending_buf[e.sym_buf + e.sym_next++] = n >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = t, n === 0 ? e.dyn_ltree[t * 2]++ : (e.matches++, n--, e.dyn_ltree[(Re[t] + Ze + 1) * 2]++, e.dyn_dtree[ii(n) * 2]++), e.sym_next === e.sym_end);
1053
1024
  var Ir = Er, Tr = li, Ar = Sr, Or = Nr, zr = Cr, Rr = {
1054
1025
  _tr_init: Ir,
@@ -1058,15 +1029,15 @@ var Ir = Er, Tr = li, Ar = Sr, Or = Nr, zr = Cr, Rr = {
1058
1029
  _tr_align: zr
1059
1030
  };
1060
1031
  const Br = (e, n, t, i) => {
1061
- let r = e & 65535 | 0, a = e >>> 16 & 65535 | 0, o = 0;
1032
+ let a = e & 65535 | 0, r = e >>> 16 & 65535 | 0, o = 0;
1062
1033
  for (; t !== 0; ) {
1063
1034
  o = t > 2e3 ? 2e3 : t, t -= o;
1064
1035
  do
1065
- r = r + n[i++] | 0, a = a + r | 0;
1036
+ a = a + n[i++] | 0, r = r + a | 0;
1066
1037
  while (--o);
1067
- r %= 65521, a %= 65521;
1038
+ a %= 65521, r %= 65521;
1068
1039
  }
1069
- return r | a << 16 | 0;
1040
+ return a | r << 16 | 0;
1070
1041
  };
1071
1042
  var Ue = Br;
1072
1043
  const Ur = () => {
@@ -1079,10 +1050,10 @@ const Ur = () => {
1079
1050
  }
1080
1051
  return n;
1081
1052
  }, Dr = new Uint32Array(Ur()), Vr = (e, n, t, i) => {
1082
- const r = Dr, a = i + t;
1053
+ const a = Dr, r = i + t;
1083
1054
  e ^= -1;
1084
- for (let o = i; o < a; o++)
1085
- e = e >>> 8 ^ r[(e ^ n[o]) & 255];
1055
+ for (let o = i; o < r; o++)
1056
+ e = e >>> 8 ^ a[(e ^ n[o]) & 255];
1086
1057
  return e ^ -1;
1087
1058
  };
1088
1059
  var R = Vr, ge = {
@@ -1144,11 +1115,11 @@ var R = Vr, ge = {
1144
1115
  Z_DEFLATED: 8
1145
1116
  //Z_NULL: null // Use -1 or null inline, depending on var type
1146
1117
  };
1147
- const { _tr_init: Lr, _tr_stored_block: Ot, _tr_flush_block: Fr, _tr_tally: te, _tr_align: Pr } = Rr, {
1148
- Z_NO_FLUSH: ne,
1118
+ const { _tr_init: Fr, _tr_stored_block: Ot, _tr_flush_block: Lr, _tr_tally: ee, _tr_align: Pr } = Rr, {
1119
+ Z_NO_FLUSH: te,
1149
1120
  Z_PARTIAL_FLUSH: Zr,
1150
1121
  Z_FULL_FLUSH: xr,
1151
- Z_FINISH: F,
1122
+ Z_FINISH: L,
1152
1123
  Z_BLOCK: sn,
1153
1124
  Z_OK: B,
1154
1125
  Z_STREAM_END: ln,
@@ -1163,155 +1134,155 @@ const { _tr_init: Lr, _tr_stored_block: Ot, _tr_flush_block: Fr, _tr_tally: te,
1163
1134
  Z_DEFAULT_STRATEGY: Kr,
1164
1135
  Z_UNKNOWN: Wr,
1165
1136
  Z_DEFLATED: lt
1166
- } = xe, Xr = 9, qr = 15, Jr = 8, Qr = 29, ea = 256, zt = ea + 1 + Qr, ta = 30, na = 19, ia = 2 * zt + 1, ra = 15, T = 3, ee = 258, Y = ee + T + 1, aa = 32, we = 42, jt = 57, Rt = 69, Bt = 73, Ut = 91, Dt = 103, le = 113, Se = 666, U = 1, ve = 2, ue = 3, ke = 4, oa = 3, fe = (e, n) => (e.msg = ge[n], n), fn = (e) => e * 2 - (e > 4 ? 9 : 0), J = (e) => {
1137
+ } = xe, Xr = 9, qr = 15, Jr = 8, Qr = 29, ea = 256, zt = ea + 1 + Qr, ta = 30, na = 19, ia = 2 * zt + 1, ra = 15, T = 3, Q = 258, Y = Q + T + 1, aa = 32, we = 42, jt = 57, Rt = 69, Bt = 73, Ut = 91, Dt = 103, oe = 113, Se = 666, U = 1, ve = 2, fe = 3, ke = 4, oa = 3, se = (e, n) => (e.msg = ge[n], n), fn = (e) => e * 2 - (e > 4 ? 9 : 0), q = (e) => {
1167
1138
  let n = e.length;
1168
1139
  for (; --n >= 0; )
1169
1140
  e[n] = 0;
1170
1141
  }, sa = (e) => {
1171
- let n, t, i, r = e.w_size;
1142
+ let n, t, i, a = e.w_size;
1172
1143
  n = e.hash_size, i = n;
1173
1144
  do
1174
- t = e.head[--i], e.head[i] = t >= r ? t - r : 0;
1145
+ t = e.head[--i], e.head[i] = t >= a ? t - a : 0;
1175
1146
  while (--n);
1176
- n = r, i = n;
1147
+ n = a, i = n;
1177
1148
  do
1178
- t = e.prev[--i], e.prev[i] = t >= r ? t - r : 0;
1149
+ t = e.prev[--i], e.prev[i] = t >= a ? t - a : 0;
1179
1150
  while (--n);
1180
1151
  };
1181
- let la = (e, n, t) => (n << e.hash_shift ^ t) & e.hash_mask, ie = la;
1152
+ let la = (e, n, t) => (n << e.hash_shift ^ t) & e.hash_mask, ne = la;
1182
1153
  const V = (e) => {
1183
1154
  const n = e.state;
1184
1155
  let t = n.pending;
1185
1156
  t > e.avail_out && (t = e.avail_out), t !== 0 && (e.output.set(n.pending_buf.subarray(n.pending_out, n.pending_out + t), e.next_out), e.next_out += t, n.pending_out += t, e.total_out += t, e.avail_out -= t, n.pending -= t, n.pending === 0 && (n.pending_out = 0));
1186
- }, L = (e, n) => {
1187
- Fr(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, n), e.block_start = e.strstart, V(e.strm);
1157
+ }, F = (e, n) => {
1158
+ Lr(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, n), e.block_start = e.strstart, V(e.strm);
1188
1159
  }, A = (e, n) => {
1189
1160
  e.pending_buf[e.pending++] = n;
1190
1161
  }, Ce = (e, n) => {
1191
1162
  e.pending_buf[e.pending++] = n >>> 8 & 255, e.pending_buf[e.pending++] = n & 255;
1192
1163
  }, Vt = (e, n, t, i) => {
1193
- let r = e.avail_in;
1194
- return r > i && (r = i), r === 0 ? 0 : (e.avail_in -= r, n.set(e.input.subarray(e.next_in, e.next_in + r), t), e.state.wrap === 1 ? e.adler = Ue(e.adler, n, r, t) : e.state.wrap === 2 && (e.adler = R(e.adler, n, r, t)), e.next_in += r, e.total_in += r, r);
1164
+ let a = e.avail_in;
1165
+ return a > i && (a = i), a === 0 ? 0 : (e.avail_in -= a, n.set(e.input.subarray(e.next_in, e.next_in + a), t), e.state.wrap === 1 ? e.adler = Ue(e.adler, n, a, t) : e.state.wrap === 2 && (e.adler = R(e.adler, n, a, t)), e.next_in += a, e.total_in += a, a);
1195
1166
  }, fi = (e, n) => {
1196
- let t = e.max_chain_length, i = e.strstart, r, a, o = e.prev_length, s = e.nice_match;
1197
- const u = e.strstart > e.w_size - Y ? e.strstart - (e.w_size - Y) : 0, l = e.window, f = e.w_mask, d = e.prev, c = e.strstart + ee;
1198
- let h = l[i + o - 1], _ = l[i + o];
1199
- e.prev_length >= e.good_match && (t >>= 2), s > e.lookahead && (s = e.lookahead);
1167
+ let t = e.max_chain_length, i = e.strstart, a, r, o = e.prev_length, l = e.nice_match;
1168
+ const u = e.strstart > e.w_size - Y ? e.strstart - (e.w_size - Y) : 0, s = e.window, f = e.w_mask, p = e.prev, c = e.strstart + Q;
1169
+ let h = s[i + o - 1], _ = s[i + o];
1170
+ e.prev_length >= e.good_match && (t >>= 2), l > e.lookahead && (l = e.lookahead);
1200
1171
  do
1201
- if (r = n, !(l[r + o] !== _ || l[r + o - 1] !== h || l[r] !== l[i] || l[++r] !== l[i + 1])) {
1202
- i += 2, r++;
1172
+ if (a = n, !(s[a + o] !== _ || s[a + o - 1] !== h || s[a] !== s[i] || s[++a] !== s[i + 1])) {
1173
+ i += 2, a++;
1203
1174
  do
1204
1175
  ;
1205
- while (l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && l[++i] === l[++r] && i < c);
1206
- if (a = ee - (c - i), i = c - ee, a > o) {
1207
- if (e.match_start = n, o = a, a >= s)
1176
+ while (s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && s[++i] === s[++a] && i < c);
1177
+ if (r = Q - (c - i), i = c - Q, r > o) {
1178
+ if (e.match_start = n, o = r, r >= l)
1208
1179
  break;
1209
- h = l[i + o - 1], _ = l[i + o];
1180
+ h = s[i + o - 1], _ = s[i + o];
1210
1181
  }
1211
1182
  }
1212
- while ((n = d[n & f]) > u && --t !== 0);
1183
+ while ((n = p[n & f]) > u && --t !== 0);
1213
1184
  return o <= e.lookahead ? o : e.lookahead;
1214
1185
  }, me = (e) => {
1215
1186
  const n = e.w_size;
1216
- let t, i, r;
1187
+ let t, i, a;
1217
1188
  do {
1218
1189
  if (i = e.window_size - e.lookahead - e.strstart, e.strstart >= n + (n - Y) && (e.window.set(e.window.subarray(n, n + n - i), 0), e.match_start -= n, e.strstart -= n, e.block_start -= n, e.insert > e.strstart && (e.insert = e.strstart), sa(e), i += n), e.strm.avail_in === 0)
1219
1190
  break;
1220
1191
  if (t = Vt(e.strm, e.window, e.strstart + e.lookahead, i), e.lookahead += t, e.lookahead + e.insert >= T)
1221
- for (r = e.strstart - e.insert, e.ins_h = e.window[r], e.ins_h = ie(e, e.ins_h, e.window[r + 1]); e.insert && (e.ins_h = ie(e, e.ins_h, e.window[r + T - 1]), e.prev[r & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = r, r++, e.insert--, !(e.lookahead + e.insert < T)); )
1192
+ for (a = e.strstart - e.insert, e.ins_h = e.window[a], e.ins_h = ne(e, e.ins_h, e.window[a + 1]); e.insert && (e.ins_h = ne(e, e.ins_h, e.window[a + T - 1]), e.prev[a & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = a, a++, e.insert--, !(e.lookahead + e.insert < T)); )
1222
1193
  ;
1223
1194
  } while (e.lookahead < Y && e.strm.avail_in !== 0);
1224
1195
  }, ui = (e, n) => {
1225
- let t = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, i, r, a, o = 0, s = e.strm.avail_in;
1196
+ let t = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, i, a, r, o = 0, l = e.strm.avail_in;
1226
1197
  do {
1227
- if (i = 65535, a = e.bi_valid + 42 >> 3, e.strm.avail_out < a || (a = e.strm.avail_out - a, r = e.strstart - e.block_start, i > r + e.strm.avail_in && (i = r + e.strm.avail_in), i > a && (i = a), i < t && (i === 0 && n !== F || n === ne || i !== r + e.strm.avail_in)))
1198
+ if (i = 65535, r = e.bi_valid + 42 >> 3, e.strm.avail_out < r || (r = e.strm.avail_out - r, a = e.strstart - e.block_start, i > a + e.strm.avail_in && (i = a + e.strm.avail_in), i > r && (i = r), i < t && (i === 0 && n !== L || n === te || i !== a + e.strm.avail_in)))
1228
1199
  break;
1229
- o = n === F && i === r + e.strm.avail_in ? 1 : 0, Ot(e, 0, 0, o), e.pending_buf[e.pending - 4] = i, e.pending_buf[e.pending - 3] = i >> 8, e.pending_buf[e.pending - 2] = ~i, e.pending_buf[e.pending - 1] = ~i >> 8, V(e.strm), r && (r > i && (r = i), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + r), e.strm.next_out), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r, e.block_start += r, i -= r), i && (Vt(e.strm, e.strm.output, e.strm.next_out, i), e.strm.next_out += i, e.strm.avail_out -= i, e.strm.total_out += i);
1200
+ o = n === L && i === a + e.strm.avail_in ? 1 : 0, Ot(e, 0, 0, o), e.pending_buf[e.pending - 4] = i, e.pending_buf[e.pending - 3] = i >> 8, e.pending_buf[e.pending - 2] = ~i, e.pending_buf[e.pending - 1] = ~i >> 8, V(e.strm), a && (a > i && (a = i), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + a), e.strm.next_out), e.strm.next_out += a, e.strm.avail_out -= a, e.strm.total_out += a, e.block_start += a, i -= a), i && (Vt(e.strm, e.strm.output, e.strm.next_out, i), e.strm.next_out += i, e.strm.avail_out -= i, e.strm.total_out += i);
1230
1201
  } while (o === 0);
1231
- return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ? ke : n !== ne && n !== F && e.strm.avail_in === 0 && e.strstart === e.block_start ? ve : (a = e.window_size - e.strstart, e.strm.avail_in > a && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, a += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), a > e.strm.avail_in && (a = e.strm.avail_in), a && (Vt(e.strm, e.window, e.strstart, a), e.strstart += a, e.insert += a > e.w_size - e.insert ? e.w_size - e.insert : a), e.high_water < e.strstart && (e.high_water = e.strstart), a = e.bi_valid + 42 >> 3, a = e.pending_buf_size - a > 65535 ? 65535 : e.pending_buf_size - a, t = a > e.w_size ? e.w_size : a, r = e.strstart - e.block_start, (r >= t || (r || n === F) && n !== ne && e.strm.avail_in === 0 && r <= a) && (i = r > a ? a : r, o = n === F && e.strm.avail_in === 0 && i === r ? 1 : 0, Ot(e, e.block_start, i, o), e.block_start += i, V(e.strm)), o ? ue : U);
1202
+ return l -= e.strm.avail_in, l && (l >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= l && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - l, e.strm.next_in), e.strstart), e.strstart += l, e.insert += l > e.w_size - e.insert ? e.w_size - e.insert : l), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ? ke : n !== te && n !== L && e.strm.avail_in === 0 && e.strstart === e.block_start ? ve : (r = e.window_size - e.strstart, e.strm.avail_in > r && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, r += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), r > e.strm.avail_in && (r = e.strm.avail_in), r && (Vt(e.strm, e.window, e.strstart, r), e.strstart += r, e.insert += r > e.w_size - e.insert ? e.w_size - e.insert : r), e.high_water < e.strstart && (e.high_water = e.strstart), r = e.bi_valid + 42 >> 3, r = e.pending_buf_size - r > 65535 ? 65535 : e.pending_buf_size - r, t = r > e.w_size ? e.w_size : r, a = e.strstart - e.block_start, (a >= t || (a || n === L) && n !== te && e.strm.avail_in === 0 && a <= r) && (i = a > r ? r : a, o = n === L && e.strm.avail_in === 0 && i === a ? 1 : 0, Ot(e, e.block_start, i, o), e.block_start += i, V(e.strm)), o ? fe : U);
1232
1203
  }, bt = (e, n) => {
1233
1204
  let t, i;
1234
1205
  for (; ; ) {
1235
1206
  if (e.lookahead < Y) {
1236
- if (me(e), e.lookahead < Y && n === ne)
1207
+ if (me(e), e.lookahead < Y && n === te)
1237
1208
  return U;
1238
1209
  if (e.lookahead === 0)
1239
1210
  break;
1240
1211
  }
1241
- if (t = 0, e.lookahead >= T && (e.ins_h = ie(e, e.ins_h, e.window[e.strstart + T - 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 - Y && (e.match_length = fi(e, t)), e.match_length >= T)
1242
- if (i = te(e, e.strstart - e.match_start, e.match_length - T), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= T) {
1212
+ if (t = 0, e.lookahead >= T && (e.ins_h = ne(e, e.ins_h, e.window[e.strstart + T - 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 - Y && (e.match_length = fi(e, t)), e.match_length >= T)
1213
+ if (i = ee(e, e.strstart - e.match_start, e.match_length - T), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= T) {
1243
1214
  e.match_length--;
1244
1215
  do
1245
- e.strstart++, e.ins_h = ie(e, e.ins_h, e.window[e.strstart + T - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart;
1216
+ e.strstart++, e.ins_h = ne(e, e.ins_h, e.window[e.strstart + T - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart;
1246
1217
  while (--e.match_length !== 0);
1247
1218
  e.strstart++;
1248
1219
  } else
1249
- e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = ie(e, e.ins_h, e.window[e.strstart + 1]);
1220
+ e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = ne(e, e.ins_h, e.window[e.strstart + 1]);
1250
1221
  else
1251
- i = te(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
1252
- if (i && (L(e, !1), e.strm.avail_out === 0))
1222
+ i = ee(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
1223
+ if (i && (F(e, !1), e.strm.avail_out === 0))
1253
1224
  return U;
1254
1225
  }
1255
- return e.insert = e.strstart < T - 1 ? e.strstart : T - 1, n === F ? (L(e, !0), e.strm.avail_out === 0 ? ue : ke) : e.sym_next && (L(e, !1), e.strm.avail_out === 0) ? U : ve;
1256
- }, de = (e, n) => {
1257
- let t, i, r;
1226
+ return e.insert = e.strstart < T - 1 ? e.strstart : T - 1, n === L ? (F(e, !0), e.strm.avail_out === 0 ? fe : ke) : e.sym_next && (F(e, !1), e.strm.avail_out === 0) ? U : ve;
1227
+ }, ce = (e, n) => {
1228
+ let t, i, a;
1258
1229
  for (; ; ) {
1259
1230
  if (e.lookahead < Y) {
1260
- if (me(e), e.lookahead < Y && n === ne)
1231
+ if (me(e), e.lookahead < Y && n === te)
1261
1232
  return U;
1262
1233
  if (e.lookahead === 0)
1263
1234
  break;
1264
1235
  }
1265
- if (t = 0, e.lookahead >= T && (e.ins_h = ie(e, e.ins_h, e.window[e.strstart + T - 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 = T - 1, t !== 0 && e.prev_length < e.max_lazy_match && e.strstart - t <= e.w_size - Y && (e.match_length = fi(e, t), e.match_length <= 5 && (e.strategy === jr || e.match_length === T && e.strstart - e.match_start > 4096) && (e.match_length = T - 1)), e.prev_length >= T && e.match_length <= e.prev_length) {
1266
- r = e.strstart + e.lookahead - T, i = te(e, e.strstart - 1 - e.prev_match, e.prev_length - T), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
1236
+ if (t = 0, e.lookahead >= T && (e.ins_h = ne(e, e.ins_h, e.window[e.strstart + T - 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 = T - 1, t !== 0 && e.prev_length < e.max_lazy_match && e.strstart - t <= e.w_size - Y && (e.match_length = fi(e, t), e.match_length <= 5 && (e.strategy === jr || e.match_length === T && e.strstart - e.match_start > 4096) && (e.match_length = T - 1)), e.prev_length >= T && e.match_length <= e.prev_length) {
1237
+ a = e.strstart + e.lookahead - T, i = ee(e, e.strstart - 1 - e.prev_match, e.prev_length - T), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
1267
1238
  do
1268
- ++e.strstart <= r && (e.ins_h = ie(e, e.ins_h, e.window[e.strstart + T - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
1239
+ ++e.strstart <= a && (e.ins_h = ne(e, e.ins_h, e.window[e.strstart + T - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
1269
1240
  while (--e.prev_length !== 0);
1270
- if (e.match_available = 0, e.match_length = T - 1, e.strstart++, i && (L(e, !1), e.strm.avail_out === 0))
1241
+ if (e.match_available = 0, e.match_length = T - 1, e.strstart++, i && (F(e, !1), e.strm.avail_out === 0))
1271
1242
  return U;
1272
1243
  } else if (e.match_available) {
1273
- if (i = te(e, 0, e.window[e.strstart - 1]), i && L(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
1244
+ if (i = ee(e, 0, e.window[e.strstart - 1]), i && F(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
1274
1245
  return U;
1275
1246
  } else
1276
1247
  e.match_available = 1, e.strstart++, e.lookahead--;
1277
1248
  }
1278
- return e.match_available && (i = te(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < T - 1 ? e.strstart : T - 1, n === F ? (L(e, !0), e.strm.avail_out === 0 ? ue : ke) : e.sym_next && (L(e, !1), e.strm.avail_out === 0) ? U : ve;
1249
+ return e.match_available && (i = ee(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < T - 1 ? e.strstart : T - 1, n === L ? (F(e, !0), e.strm.avail_out === 0 ? fe : ke) : e.sym_next && (F(e, !1), e.strm.avail_out === 0) ? U : ve;
1279
1250
  }, fa = (e, n) => {
1280
- let t, i, r, a;
1251
+ let t, i, a, r;
1281
1252
  const o = e.window;
1282
1253
  for (; ; ) {
1283
- if (e.lookahead <= ee) {
1284
- if (me(e), e.lookahead <= ee && n === ne)
1254
+ if (e.lookahead <= Q) {
1255
+ if (me(e), e.lookahead <= Q && n === te)
1285
1256
  return U;
1286
1257
  if (e.lookahead === 0)
1287
1258
  break;
1288
1259
  }
1289
- if (e.match_length = 0, e.lookahead >= T && e.strstart > 0 && (r = e.strstart - 1, i = o[r], i === o[++r] && i === o[++r] && i === o[++r])) {
1290
- a = e.strstart + ee;
1260
+ if (e.match_length = 0, e.lookahead >= T && e.strstart > 0 && (a = e.strstart - 1, i = o[a], i === o[++a] && i === o[++a] && i === o[++a])) {
1261
+ r = e.strstart + Q;
1291
1262
  do
1292
1263
  ;
1293
- while (i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && r < a);
1294
- e.match_length = ee - (a - r), e.match_length > e.lookahead && (e.match_length = e.lookahead);
1264
+ while (i === o[++a] && i === o[++a] && i === o[++a] && i === o[++a] && i === o[++a] && i === o[++a] && i === o[++a] && i === o[++a] && a < r);
1265
+ e.match_length = Q - (r - a), e.match_length > e.lookahead && (e.match_length = e.lookahead);
1295
1266
  }
1296
- if (e.match_length >= T ? (t = te(e, 1, e.match_length - T), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (t = te(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), t && (L(e, !1), e.strm.avail_out === 0))
1267
+ if (e.match_length >= T ? (t = ee(e, 1, e.match_length - T), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (t = ee(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), t && (F(e, !1), e.strm.avail_out === 0))
1297
1268
  return U;
1298
1269
  }
1299
- return e.insert = 0, n === F ? (L(e, !0), e.strm.avail_out === 0 ? ue : ke) : e.sym_next && (L(e, !1), e.strm.avail_out === 0) ? U : ve;
1270
+ return e.insert = 0, n === L ? (F(e, !0), e.strm.avail_out === 0 ? fe : ke) : e.sym_next && (F(e, !1), e.strm.avail_out === 0) ? U : ve;
1300
1271
  }, ua = (e, n) => {
1301
1272
  let t;
1302
1273
  for (; ; ) {
1303
1274
  if (e.lookahead === 0 && (me(e), e.lookahead === 0)) {
1304
- if (n === ne)
1275
+ if (n === te)
1305
1276
  return U;
1306
1277
  break;
1307
1278
  }
1308
- if (e.match_length = 0, t = te(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, t && (L(e, !1), e.strm.avail_out === 0))
1279
+ if (e.match_length = 0, t = ee(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, t && (F(e, !1), e.strm.avail_out === 0))
1309
1280
  return U;
1310
1281
  }
1311
- return e.insert = 0, n === F ? (L(e, !0), e.strm.avail_out === 0 ? ue : ke) : e.sym_next && (L(e, !1), e.strm.avail_out === 0) ? U : ve;
1282
+ return e.insert = 0, n === L ? (F(e, !0), e.strm.avail_out === 0 ? fe : ke) : e.sym_next && (F(e, !1), e.strm.avail_out === 0) ? U : ve;
1312
1283
  };
1313
- function H(e, n, t, i, r) {
1314
- this.good_length = e, this.max_lazy = n, this.nice_length = t, this.max_chain = i, this.func = r;
1284
+ function H(e, n, t, i, a) {
1285
+ this.good_length = e, this.max_lazy = n, this.nice_length = t, this.max_chain = i, this.func = a;
1315
1286
  }
1316
1287
  const Ne = [
1317
1288
  /* good lazy nice chain */
@@ -1323,23 +1294,23 @@ const Ne = [
1323
1294
  /* 2 */
1324
1295
  new H(4, 6, 32, 32, bt),
1325
1296
  /* 3 */
1326
- new H(4, 4, 16, 16, de),
1297
+ new H(4, 4, 16, 16, ce),
1327
1298
  /* 4 lazy matches */
1328
- new H(8, 16, 32, 32, de),
1299
+ new H(8, 16, 32, 32, ce),
1329
1300
  /* 5 */
1330
- new H(8, 16, 128, 128, de),
1301
+ new H(8, 16, 128, 128, ce),
1331
1302
  /* 6 */
1332
- new H(8, 32, 128, 256, de),
1303
+ new H(8, 32, 128, 256, ce),
1333
1304
  /* 7 */
1334
- new H(32, 128, 258, 1024, de),
1305
+ new H(32, 128, 258, 1024, ce),
1335
1306
  /* 8 */
1336
- new H(32, 258, 258, 4096, de)
1307
+ new H(32, 258, 258, 4096, ce)
1337
1308
  /* 9 max compression */
1338
1309
  ], ha = (e) => {
1339
- e.window_size = 2 * e.w_size, J(e.head), e.max_lazy_match = Ne[e.level].max_lazy, e.good_match = Ne[e.level].good_length, e.nice_match = Ne[e.level].nice_length, e.max_chain_length = Ne[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = T - 1, e.match_available = 0, e.ins_h = 0;
1310
+ e.window_size = 2 * e.w_size, q(e.head), e.max_lazy_match = Ne[e.level].max_lazy, e.good_match = Ne[e.level].good_length, e.nice_match = Ne[e.level].nice_length, e.max_chain_length = Ne[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = T - 1, e.match_available = 0, e.ins_h = 0;
1340
1311
  };
1341
1312
  function ca() {
1342
- 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 = lt, 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(ia * 2), this.dyn_dtree = new Uint16Array((2 * ta + 1) * 2), this.bl_tree = new Uint16Array((2 * na + 1) * 2), J(this.dyn_ltree), J(this.dyn_dtree), J(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(ra + 1), this.heap = new Uint16Array(2 * zt + 1), J(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * zt + 1), J(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;
1313
+ 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 = lt, 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(ia * 2), this.dyn_dtree = new Uint16Array((2 * ta + 1) * 2), this.bl_tree = new Uint16Array((2 * na + 1) * 2), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(ra + 1), this.heap = new Uint16Array(2 * zt + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * zt + 1), q(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;
1343
1314
  }
1344
1315
  const Me = (e) => {
1345
1316
  if (!e)
@@ -1347,46 +1318,46 @@ const Me = (e) => {
1347
1318
  const n = e.state;
1348
1319
  return !n || n.strm !== e || n.status !== we && //#ifdef GZIP
1349
1320
  n.status !== jt && //#endif
1350
- n.status !== Rt && n.status !== Bt && n.status !== Ut && n.status !== Dt && n.status !== le && n.status !== Se ? 1 : 0;
1321
+ n.status !== Rt && n.status !== Bt && n.status !== Ut && n.status !== Dt && n.status !== oe && n.status !== Se ? 1 : 0;
1351
1322
  }, hi = (e) => {
1352
1323
  if (Me(e))
1353
- return fe(e, G);
1324
+ return se(e, G);
1354
1325
  e.total_in = e.total_out = 0, e.data_type = Wr;
1355
1326
  const n = e.state;
1356
1327
  return n.pending = 0, n.pending_out = 0, n.wrap < 0 && (n.wrap = -n.wrap), n.status = //#ifdef GZIP
1357
1328
  n.wrap === 2 ? jt : (
1358
1329
  //#endif
1359
- n.wrap ? we : le
1360
- ), e.adler = n.wrap === 2 ? 0 : 1, n.last_flush = -2, Lr(n), B;
1330
+ n.wrap ? we : oe
1331
+ ), e.adler = n.wrap === 2 ? 0 : 1, n.last_flush = -2, Fr(n), B;
1361
1332
  }, ci = (e) => {
1362
1333
  const n = hi(e);
1363
1334
  return n === B && ha(e.state), n;
1364
- }, da = (e, n) => Me(e) || e.state.wrap !== 2 ? G : (e.state.gzhead = n, B), di = (e, n, t, i, r, a) => {
1335
+ }, da = (e, n) => Me(e) || e.state.wrap !== 2 ? G : (e.state.gzhead = n, B), di = (e, n, t, i, a, r) => {
1365
1336
  if (!e)
1366
1337
  return G;
1367
1338
  let o = 1;
1368
- if (n === Hr && (n = 6), i < 0 ? (o = 0, i = -i) : i > 15 && (o = 2, i -= 16), r < 1 || r > Xr || t !== lt || i < 8 || i > 15 || n < 0 || n > 9 || a < 0 || a > Yr || i === 8 && o !== 1)
1369
- return fe(e, G);
1339
+ if (n === Hr && (n = 6), i < 0 ? (o = 0, i = -i) : i > 15 && (o = 2, i -= 16), a < 1 || a > Xr || t !== lt || i < 8 || i > 15 || n < 0 || n > 9 || r < 0 || r > Yr || i === 8 && o !== 1)
1340
+ return se(e, G);
1370
1341
  i === 8 && (i = 9);
1371
- const s = new ca();
1372
- return e.state = s, s.strm = e, s.status = we, s.wrap = o, s.gzhead = null, s.w_bits = i, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = r + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + T - 1) / T), s.window = new Uint8Array(s.w_size * 2), s.head = new Uint16Array(s.hash_size), s.prev = new Uint16Array(s.w_size), s.lit_bufsize = 1 << r + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new Uint8Array(s.pending_buf_size), s.sym_buf = s.lit_bufsize, s.sym_end = (s.lit_bufsize - 1) * 3, s.level = n, s.strategy = a, s.method = t, ci(e);
1342
+ const l = new ca();
1343
+ return e.state = l, l.strm = e, l.status = we, l.wrap = o, l.gzhead = null, l.w_bits = i, l.w_size = 1 << l.w_bits, l.w_mask = l.w_size - 1, l.hash_bits = a + 7, l.hash_size = 1 << l.hash_bits, l.hash_mask = l.hash_size - 1, l.hash_shift = ~~((l.hash_bits + T - 1) / T), l.window = new Uint8Array(l.w_size * 2), l.head = new Uint16Array(l.hash_size), l.prev = new Uint16Array(l.w_size), l.lit_bufsize = 1 << a + 6, l.pending_buf_size = l.lit_bufsize * 4, l.pending_buf = new Uint8Array(l.pending_buf_size), l.sym_buf = l.lit_bufsize, l.sym_end = (l.lit_bufsize - 1) * 3, l.level = n, l.strategy = r, l.method = t, ci(e);
1373
1344
  }, pa = (e, n) => di(e, n, lt, qr, Jr, Kr), _a = (e, n) => {
1374
1345
  if (Me(e) || n > sn || n < 0)
1375
- return e ? fe(e, G) : G;
1346
+ return e ? se(e, G) : G;
1376
1347
  const t = e.state;
1377
- if (!e.output || e.avail_in !== 0 && !e.input || t.status === Se && n !== F)
1378
- return fe(e, e.avail_out === 0 ? _t : G);
1348
+ if (!e.output || e.avail_in !== 0 && !e.input || t.status === Se && n !== L)
1349
+ return se(e, e.avail_out === 0 ? _t : G);
1379
1350
  const i = t.last_flush;
1380
1351
  if (t.last_flush = n, t.pending !== 0) {
1381
1352
  if (V(e), e.avail_out === 0)
1382
1353
  return t.last_flush = -1, B;
1383
- } else if (e.avail_in === 0 && fn(n) <= fn(i) && n !== F)
1384
- return fe(e, _t);
1354
+ } else if (e.avail_in === 0 && fn(n) <= fn(i) && n !== L)
1355
+ return se(e, _t);
1385
1356
  if (t.status === Se && e.avail_in !== 0)
1386
- return fe(e, _t);
1387
- if (t.status === we && t.wrap === 0 && (t.status = le), t.status === we) {
1388
- let r = lt + (t.w_bits - 8 << 4) << 8, a = -1;
1389
- if (t.strategy >= We || t.level < 2 ? a = 0 : t.level < 6 ? a = 1 : t.level === 6 ? a = 2 : a = 3, r |= a << 6, t.strstart !== 0 && (r |= aa), r += 31 - r % 31, Ce(t, r), t.strstart !== 0 && (Ce(t, e.adler >>> 16), Ce(t, e.adler & 65535)), e.adler = 1, t.status = le, V(e), t.pending !== 0)
1357
+ return se(e, _t);
1358
+ if (t.status === we && t.wrap === 0 && (t.status = oe), t.status === we) {
1359
+ let a = lt + (t.w_bits - 8 << 4) << 8, r = -1;
1360
+ if (t.strategy >= We || t.level < 2 ? r = 0 : t.level < 6 ? r = 1 : t.level === 6 ? r = 2 : r = 3, a |= r << 6, t.strstart !== 0 && (a |= aa), a += 31 - a % 31, Ce(t, a), t.strstart !== 0 && (Ce(t, e.adler >>> 16), Ce(t, e.adler & 65535)), e.adler = 1, t.status = oe, V(e), t.pending !== 0)
1390
1361
  return t.last_flush = -1, B;
1391
1362
  }
1392
1363
  if (t.status === jt) {
@@ -1395,50 +1366,50 @@ const Me = (e) => {
1395
1366
  t,
1396
1367
  (t.gzhead.text ? 1 : 0) + (t.gzhead.hcrc ? 2 : 0) + (t.gzhead.extra ? 4 : 0) + (t.gzhead.name ? 8 : 0) + (t.gzhead.comment ? 16 : 0)
1397
1368
  ), A(t, t.gzhead.time & 255), A(t, t.gzhead.time >> 8 & 255), A(t, t.gzhead.time >> 16 & 255), A(t, t.gzhead.time >> 24 & 255), A(t, t.level === 9 ? 2 : t.strategy >= We || t.level < 2 ? 4 : 0), A(t, t.gzhead.os & 255), t.gzhead.extra && t.gzhead.extra.length && (A(t, t.gzhead.extra.length & 255), A(t, t.gzhead.extra.length >> 8 & 255)), t.gzhead.hcrc && (e.adler = R(e.adler, t.pending_buf, t.pending, 0)), t.gzindex = 0, t.status = Rt;
1398
- else if (A(t, 0), A(t, 0), A(t, 0), A(t, 0), A(t, 0), A(t, t.level === 9 ? 2 : t.strategy >= We || t.level < 2 ? 4 : 0), A(t, oa), t.status = le, V(e), t.pending !== 0)
1369
+ else if (A(t, 0), A(t, 0), A(t, 0), A(t, 0), A(t, 0), A(t, t.level === 9 ? 2 : t.strategy >= We || t.level < 2 ? 4 : 0), A(t, oa), t.status = oe, V(e), t.pending !== 0)
1399
1370
  return t.last_flush = -1, B;
1400
1371
  }
1401
1372
  if (t.status === Rt) {
1402
1373
  if (t.gzhead.extra) {
1403
- let r = t.pending, a = (t.gzhead.extra.length & 65535) - t.gzindex;
1404
- for (; t.pending + a > t.pending_buf_size; ) {
1405
- let s = t.pending_buf_size - t.pending;
1406
- if (t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex, t.gzindex + s), t.pending), t.pending = t.pending_buf_size, t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex += s, V(e), t.pending !== 0)
1374
+ let a = t.pending, r = (t.gzhead.extra.length & 65535) - t.gzindex;
1375
+ for (; t.pending + r > t.pending_buf_size; ) {
1376
+ let l = t.pending_buf_size - t.pending;
1377
+ if (t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex, t.gzindex + l), t.pending), t.pending = t.pending_buf_size, t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a)), t.gzindex += l, V(e), t.pending !== 0)
1407
1378
  return t.last_flush = -1, B;
1408
- r = 0, a -= s;
1379
+ a = 0, r -= l;
1409
1380
  }
1410
1381
  let o = new Uint8Array(t.gzhead.extra);
1411
- t.pending_buf.set(o.subarray(t.gzindex, t.gzindex + a), t.pending), t.pending += a, t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex = 0;
1382
+ t.pending_buf.set(o.subarray(t.gzindex, t.gzindex + r), t.pending), t.pending += r, t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a)), t.gzindex = 0;
1412
1383
  }
1413
1384
  t.status = Bt;
1414
1385
  }
1415
1386
  if (t.status === Bt) {
1416
1387
  if (t.gzhead.name) {
1417
- let r = t.pending, a;
1388
+ let a = t.pending, r;
1418
1389
  do {
1419
1390
  if (t.pending === t.pending_buf_size) {
1420
- if (t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), V(e), t.pending !== 0)
1391
+ if (t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a)), V(e), t.pending !== 0)
1421
1392
  return t.last_flush = -1, B;
1422
- r = 0;
1393
+ a = 0;
1423
1394
  }
1424
- t.gzindex < t.gzhead.name.length ? a = t.gzhead.name.charCodeAt(t.gzindex++) & 255 : a = 0, A(t, a);
1425
- } while (a !== 0);
1426
- t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex = 0;
1395
+ t.gzindex < t.gzhead.name.length ? r = t.gzhead.name.charCodeAt(t.gzindex++) & 255 : r = 0, A(t, r);
1396
+ } while (r !== 0);
1397
+ t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a)), t.gzindex = 0;
1427
1398
  }
1428
1399
  t.status = Ut;
1429
1400
  }
1430
1401
  if (t.status === Ut) {
1431
1402
  if (t.gzhead.comment) {
1432
- let r = t.pending, a;
1403
+ let a = t.pending, r;
1433
1404
  do {
1434
1405
  if (t.pending === t.pending_buf_size) {
1435
- if (t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), V(e), t.pending !== 0)
1406
+ if (t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a)), V(e), t.pending !== 0)
1436
1407
  return t.last_flush = -1, B;
1437
- r = 0;
1408
+ a = 0;
1438
1409
  }
1439
- t.gzindex < t.gzhead.comment.length ? a = t.gzhead.comment.charCodeAt(t.gzindex++) & 255 : a = 0, A(t, a);
1440
- } while (a !== 0);
1441
- t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r));
1410
+ t.gzindex < t.gzhead.comment.length ? r = t.gzhead.comment.charCodeAt(t.gzindex++) & 255 : r = 0, A(t, r);
1411
+ } while (r !== 0);
1412
+ t.gzhead.hcrc && t.pending > a && (e.adler = R(e.adler, t.pending_buf, t.pending - a, a));
1442
1413
  }
1443
1414
  t.status = Dt;
1444
1415
  }
@@ -1448,43 +1419,43 @@ const Me = (e) => {
1448
1419
  return t.last_flush = -1, B;
1449
1420
  A(t, e.adler & 255), A(t, e.adler >> 8 & 255), e.adler = 0;
1450
1421
  }
1451
- if (t.status = le, V(e), t.pending !== 0)
1422
+ if (t.status = oe, V(e), t.pending !== 0)
1452
1423
  return t.last_flush = -1, B;
1453
1424
  }
1454
- if (e.avail_in !== 0 || t.lookahead !== 0 || n !== ne && t.status !== Se) {
1455
- let r = t.level === 0 ? ui(t, n) : t.strategy === We ? ua(t, n) : t.strategy === Gr ? fa(t, n) : Ne[t.level].func(t, n);
1456
- if ((r === ue || r === ke) && (t.status = Se), r === U || r === ue)
1425
+ if (e.avail_in !== 0 || t.lookahead !== 0 || n !== te && t.status !== Se) {
1426
+ let a = t.level === 0 ? ui(t, n) : t.strategy === We ? ua(t, n) : t.strategy === Gr ? fa(t, n) : Ne[t.level].func(t, n);
1427
+ if ((a === fe || a === ke) && (t.status = Se), a === U || a === fe)
1457
1428
  return e.avail_out === 0 && (t.last_flush = -1), B;
1458
- if (r === ve && (n === Zr ? Pr(t) : n !== sn && (Ot(t, 0, 0, !1), n === xr && (J(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), V(e), e.avail_out === 0))
1429
+ if (a === ve && (n === Zr ? Pr(t) : n !== sn && (Ot(t, 0, 0, !1), n === xr && (q(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), V(e), e.avail_out === 0))
1459
1430
  return t.last_flush = -1, B;
1460
1431
  }
1461
- return n !== F ? B : t.wrap <= 0 ? ln : (t.wrap === 2 ? (A(t, e.adler & 255), A(t, e.adler >> 8 & 255), A(t, e.adler >> 16 & 255), A(t, e.adler >> 24 & 255), A(t, e.total_in & 255), A(t, e.total_in >> 8 & 255), A(t, e.total_in >> 16 & 255), A(t, e.total_in >> 24 & 255)) : (Ce(t, e.adler >>> 16), Ce(t, e.adler & 65535)), V(e), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? B : ln);
1432
+ return n !== L ? B : t.wrap <= 0 ? ln : (t.wrap === 2 ? (A(t, e.adler & 255), A(t, e.adler >> 8 & 255), A(t, e.adler >> 16 & 255), A(t, e.adler >> 24 & 255), A(t, e.total_in & 255), A(t, e.total_in >> 8 & 255), A(t, e.total_in >> 16 & 255), A(t, e.total_in >> 24 & 255)) : (Ce(t, e.adler >>> 16), Ce(t, e.adler & 65535)), V(e), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? B : ln);
1462
1433
  }, ba = (e) => {
1463
1434
  if (Me(e))
1464
1435
  return G;
1465
1436
  const n = e.state.status;
1466
- return e.state = null, n === le ? fe(e, Mr) : B;
1437
+ return e.state = null, n === oe ? se(e, Mr) : B;
1467
1438
  }, ga = (e, n) => {
1468
1439
  let t = n.length;
1469
1440
  if (Me(e))
1470
1441
  return G;
1471
- const i = e.state, r = i.wrap;
1472
- if (r === 2 || r === 1 && i.status !== we || i.lookahead)
1442
+ const i = e.state, a = i.wrap;
1443
+ if (a === 2 || a === 1 && i.status !== we || i.lookahead)
1473
1444
  return G;
1474
- if (r === 1 && (e.adler = Ue(e.adler, n, t, 0)), i.wrap = 0, t >= i.w_size) {
1475
- r === 0 && (J(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
1445
+ if (a === 1 && (e.adler = Ue(e.adler, n, t, 0)), i.wrap = 0, t >= i.w_size) {
1446
+ a === 0 && (q(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
1476
1447
  let u = new Uint8Array(i.w_size);
1477
1448
  u.set(n.subarray(t - i.w_size, t), 0), n = u, t = i.w_size;
1478
1449
  }
1479
- const a = e.avail_in, o = e.next_in, s = e.input;
1450
+ const r = e.avail_in, o = e.next_in, l = e.input;
1480
1451
  for (e.avail_in = t, e.next_in = 0, e.input = n, me(i); i.lookahead >= T; ) {
1481
- let u = i.strstart, l = i.lookahead - (T - 1);
1452
+ let u = i.strstart, s = i.lookahead - (T - 1);
1482
1453
  do
1483
- i.ins_h = ie(i, i.ins_h, i.window[u + T - 1]), i.prev[u & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = u, u++;
1484
- while (--l);
1454
+ i.ins_h = ne(i, i.ins_h, i.window[u + T - 1]), i.prev[u & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = u, u++;
1455
+ while (--s);
1485
1456
  i.strstart = u, i.lookahead = T - 1, me(i);
1486
1457
  }
1487
- return i.strstart += i.lookahead, i.block_start = i.strstart, i.insert = i.lookahead, i.lookahead = 0, i.match_length = i.prev_length = T - 1, i.match_available = 0, e.next_in = o, e.input = s, e.avail_in = a, i.wrap = r, B;
1458
+ return i.strstart += i.lookahead, i.block_start = i.strstart, i.insert = i.lookahead, i.lookahead = 0, i.match_length = i.prev_length = T - 1, i.match_available = 0, e.next_in = o, e.input = l, e.avail_in = r, i.wrap = a, B;
1488
1459
  };
1489
1460
  var wa = pa, ma = di, ya = ci, va = hi, ka = da, $a = _a, Ea = ba, Ca = ga, Sa = "pako deflate (from Nodeca project)", Te = {
1490
1461
  deflateInit: wa,
@@ -1512,12 +1483,12 @@ var Ia = function(e) {
1512
1483
  return e;
1513
1484
  }, Ta = (e) => {
1514
1485
  let n = 0;
1515
- for (let i = 0, r = e.length; i < r; i++)
1486
+ for (let i = 0, a = e.length; i < a; i++)
1516
1487
  n += e[i].length;
1517
1488
  const t = new Uint8Array(n);
1518
- for (let i = 0, r = 0, a = e.length; i < a; i++) {
1489
+ for (let i = 0, a = 0, r = e.length; i < r; i++) {
1519
1490
  let o = e[i];
1520
- t.set(o, r), r += o.length;
1491
+ t.set(o, a), a += o.length;
1521
1492
  }
1522
1493
  return t;
1523
1494
  }, ft = {
@@ -1537,11 +1508,11 @@ De[254] = De[254] = 1;
1537
1508
  var Aa = (e) => {
1538
1509
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
1539
1510
  return new TextEncoder().encode(e);
1540
- let n, t, i, r, a, o = e.length, s = 0;
1541
- for (r = 0; r < o; r++)
1542
- t = e.charCodeAt(r), (t & 64512) === 55296 && r + 1 < o && (i = e.charCodeAt(r + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), r++)), s += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
1543
- for (n = new Uint8Array(s), a = 0, r = 0; a < s; r++)
1544
- t = e.charCodeAt(r), (t & 64512) === 55296 && r + 1 < o && (i = e.charCodeAt(r + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), r++)), t < 128 ? n[a++] = t : t < 2048 ? (n[a++] = 192 | t >>> 6, n[a++] = 128 | t & 63) : t < 65536 ? (n[a++] = 224 | t >>> 12, n[a++] = 128 | t >>> 6 & 63, n[a++] = 128 | t & 63) : (n[a++] = 240 | t >>> 18, n[a++] = 128 | t >>> 12 & 63, n[a++] = 128 | t >>> 6 & 63, n[a++] = 128 | t & 63);
1511
+ let n, t, i, a, r, o = e.length, l = 0;
1512
+ for (a = 0; a < o; a++)
1513
+ t = e.charCodeAt(a), (t & 64512) === 55296 && a + 1 < o && (i = e.charCodeAt(a + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), a++)), l += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
1514
+ for (n = new Uint8Array(l), r = 0, a = 0; r < l; a++)
1515
+ t = e.charCodeAt(a), (t & 64512) === 55296 && a + 1 < o && (i = e.charCodeAt(a + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), a++)), t < 128 ? n[r++] = t : t < 2048 ? (n[r++] = 192 | t >>> 6, n[r++] = 128 | t & 63) : t < 65536 ? (n[r++] = 224 | t >>> 12, n[r++] = 128 | t >>> 6 & 63, n[r++] = 128 | t & 63) : (n[r++] = 240 | t >>> 18, n[r++] = 128 | t >>> 12 & 63, n[r++] = 128 | t >>> 6 & 63, n[r++] = 128 | t & 63);
1545
1516
  return n;
1546
1517
  };
1547
1518
  const Oa = (e, n) => {
@@ -1556,28 +1527,28 @@ var za = (e, n) => {
1556
1527
  const t = n || e.length;
1557
1528
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
1558
1529
  return new TextDecoder().decode(e.subarray(0, n));
1559
- let i, r;
1560
- const a = new Array(t * 2);
1561
- for (r = 0, i = 0; i < t; ) {
1530
+ let i, a;
1531
+ const r = new Array(t * 2);
1532
+ for (a = 0, i = 0; i < t; ) {
1562
1533
  let o = e[i++];
1563
1534
  if (o < 128) {
1564
- a[r++] = o;
1535
+ r[a++] = o;
1565
1536
  continue;
1566
1537
  }
1567
- let s = De[o];
1568
- if (s > 4) {
1569
- a[r++] = 65533, i += s - 1;
1538
+ let l = De[o];
1539
+ if (l > 4) {
1540
+ r[a++] = 65533, i += l - 1;
1570
1541
  continue;
1571
1542
  }
1572
- for (o &= s === 2 ? 31 : s === 3 ? 15 : 7; s > 1 && i < t; )
1573
- o = o << 6 | e[i++] & 63, s--;
1574
- if (s > 1) {
1575
- a[r++] = 65533;
1543
+ for (o &= l === 2 ? 31 : l === 3 ? 15 : 7; l > 1 && i < t; )
1544
+ o = o << 6 | e[i++] & 63, l--;
1545
+ if (l > 1) {
1546
+ r[a++] = 65533;
1576
1547
  continue;
1577
1548
  }
1578
- o < 65536 ? a[r++] = o : (o -= 65536, a[r++] = 55296 | o >> 10 & 1023, a[r++] = 56320 | o & 1023);
1549
+ o < 65536 ? r[a++] = o : (o -= 65536, r[a++] = 55296 | o >> 10 & 1023, r[a++] = 56320 | o & 1023);
1579
1550
  }
1580
- return Oa(a, r);
1551
+ return Oa(r, a);
1581
1552
  }, Ra = (e, n) => {
1582
1553
  n = n || e.length, n > e.length && (n = e.length);
1583
1554
  let t = n - 1;
@@ -1597,9 +1568,9 @@ const bi = Object.prototype.toString, {
1597
1568
  Z_NO_FLUSH: Ua,
1598
1569
  Z_SYNC_FLUSH: Da,
1599
1570
  Z_FULL_FLUSH: Va,
1600
- Z_FINISH: La,
1571
+ Z_FINISH: Fa,
1601
1572
  Z_OK: rt,
1602
- Z_STREAM_END: Fa,
1573
+ Z_STREAM_END: La,
1603
1574
  Z_DEFAULT_COMPRESSION: Pa,
1604
1575
  Z_DEFAULT_STRATEGY: Za,
1605
1576
  Z_DEFLATED: xa
@@ -1634,21 +1605,21 @@ function Gt(e) {
1634
1605
  }
1635
1606
  Gt.prototype.push = function(e, n) {
1636
1607
  const t = this.strm, i = this.options.chunkSize;
1637
- let r, a;
1608
+ let a, r;
1638
1609
  if (this.ended)
1639
1610
  return !1;
1640
- for (n === ~~n ? a = n : a = n === !0 ? La : Ua, typeof e == "string" ? t.input = Ve.string2buf(e) : bi.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
1641
- if (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), (a === Da || a === Va) && t.avail_out <= 6) {
1611
+ for (n === ~~n ? r = n : r = n === !0 ? Fa : Ua, typeof e == "string" ? t.input = Ve.string2buf(e) : bi.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
1612
+ if (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), (r === Da || r === Va) && t.avail_out <= 6) {
1642
1613
  this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
1643
1614
  continue;
1644
1615
  }
1645
- if (r = Te.deflate(t, a), r === Fa)
1646
- return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), r = Te.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === rt;
1616
+ if (a = Te.deflate(t, r), a === La)
1617
+ return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), a = Te.deflateEnd(this.strm), this.onEnd(a), this.ended = !0, a === rt;
1647
1618
  if (t.avail_out === 0) {
1648
1619
  this.onData(t.output);
1649
1620
  continue;
1650
1621
  }
1651
- if (a > 0 && t.next_out > 0) {
1622
+ if (r > 0 && t.next_out > 0) {
1652
1623
  this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
1653
1624
  continue;
1654
1625
  }
@@ -1665,80 +1636,80 @@ Gt.prototype.onEnd = function(e) {
1665
1636
  };
1666
1637
  const Xe = 16209, Ma = 16191;
1667
1638
  var Ha = function(n, t) {
1668
- let i, r, a, o, s, u, l, f, d, c, h, _, g, k, y, E, C, p, $, S, b, w, m, v;
1639
+ let i, a, r, o, l, u, s, f, p, c, h, _, g, k, v, E, C, d, $, S, b, w, m, y;
1669
1640
  const I = n.state;
1670
- i = n.next_in, m = n.input, r = i + (n.avail_in - 5), a = n.next_out, v = n.output, o = a - (t - n.avail_out), s = a + (n.avail_out - 257), u = I.dmax, l = I.wsize, f = I.whave, d = I.wnext, c = I.window, h = I.hold, _ = I.bits, g = I.lencode, k = I.distcode, y = (1 << I.lenbits) - 1, E = (1 << I.distbits) - 1;
1641
+ i = n.next_in, m = n.input, a = i + (n.avail_in - 5), r = n.next_out, y = n.output, o = r - (t - n.avail_out), l = r + (n.avail_out - 257), u = I.dmax, s = I.wsize, f = I.whave, p = I.wnext, c = I.window, h = I.hold, _ = I.bits, g = I.lencode, k = I.distcode, v = (1 << I.lenbits) - 1, E = (1 << I.distbits) - 1;
1671
1642
  e:
1672
1643
  do {
1673
- _ < 15 && (h += m[i++] << _, _ += 8, h += m[i++] << _, _ += 8), C = g[h & y];
1644
+ _ < 15 && (h += m[i++] << _, _ += 8, h += m[i++] << _, _ += 8), C = g[h & v];
1674
1645
  t:
1675
1646
  for (; ; ) {
1676
- if (p = C >>> 24, h >>>= p, _ -= p, p = C >>> 16 & 255, p === 0)
1677
- v[a++] = C & 65535;
1678
- else if (p & 16) {
1679
- $ = C & 65535, p &= 15, p && (_ < p && (h += m[i++] << _, _ += 8), $ += h & (1 << p) - 1, h >>>= p, _ -= p), _ < 15 && (h += m[i++] << _, _ += 8, h += m[i++] << _, _ += 8), C = k[h & E];
1647
+ if (d = C >>> 24, h >>>= d, _ -= d, d = C >>> 16 & 255, d === 0)
1648
+ y[r++] = C & 65535;
1649
+ else if (d & 16) {
1650
+ $ = C & 65535, d &= 15, d && (_ < d && (h += m[i++] << _, _ += 8), $ += h & (1 << d) - 1, h >>>= d, _ -= d), _ < 15 && (h += m[i++] << _, _ += 8, h += m[i++] << _, _ += 8), C = k[h & E];
1680
1651
  n:
1681
1652
  for (; ; ) {
1682
- if (p = C >>> 24, h >>>= p, _ -= p, p = C >>> 16 & 255, p & 16) {
1683
- if (S = C & 65535, p &= 15, _ < p && (h += m[i++] << _, _ += 8, _ < p && (h += m[i++] << _, _ += 8)), S += h & (1 << p) - 1, S > u) {
1653
+ if (d = C >>> 24, h >>>= d, _ -= d, d = C >>> 16 & 255, d & 16) {
1654
+ if (S = C & 65535, d &= 15, _ < d && (h += m[i++] << _, _ += 8, _ < d && (h += m[i++] << _, _ += 8)), S += h & (1 << d) - 1, S > u) {
1684
1655
  n.msg = "invalid distance too far back", I.mode = Xe;
1685
1656
  break e;
1686
1657
  }
1687
- if (h >>>= p, _ -= p, p = a - o, S > p) {
1688
- if (p = S - p, p > f && I.sane) {
1658
+ if (h >>>= d, _ -= d, d = r - o, S > d) {
1659
+ if (d = S - d, d > f && I.sane) {
1689
1660
  n.msg = "invalid distance too far back", I.mode = Xe;
1690
1661
  break e;
1691
1662
  }
1692
- if (b = 0, w = c, d === 0) {
1693
- if (b += l - p, p < $) {
1694
- $ -= p;
1663
+ if (b = 0, w = c, p === 0) {
1664
+ if (b += s - d, d < $) {
1665
+ $ -= d;
1695
1666
  do
1696
- v[a++] = c[b++];
1697
- while (--p);
1698
- b = a - S, w = v;
1667
+ y[r++] = c[b++];
1668
+ while (--d);
1669
+ b = r - S, w = y;
1699
1670
  }
1700
- } else if (d < p) {
1701
- if (b += l + d - p, p -= d, p < $) {
1702
- $ -= p;
1671
+ } else if (p < d) {
1672
+ if (b += s + p - d, d -= p, d < $) {
1673
+ $ -= d;
1703
1674
  do
1704
- v[a++] = c[b++];
1705
- while (--p);
1706
- if (b = 0, d < $) {
1707
- p = d, $ -= p;
1675
+ y[r++] = c[b++];
1676
+ while (--d);
1677
+ if (b = 0, p < $) {
1678
+ d = p, $ -= d;
1708
1679
  do
1709
- v[a++] = c[b++];
1710
- while (--p);
1711
- b = a - S, w = v;
1680
+ y[r++] = c[b++];
1681
+ while (--d);
1682
+ b = r - S, w = y;
1712
1683
  }
1713
1684
  }
1714
- } else if (b += d - p, p < $) {
1715
- $ -= p;
1685
+ } else if (b += p - d, d < $) {
1686
+ $ -= d;
1716
1687
  do
1717
- v[a++] = c[b++];
1718
- while (--p);
1719
- b = a - S, w = v;
1688
+ y[r++] = c[b++];
1689
+ while (--d);
1690
+ b = r - S, w = y;
1720
1691
  }
1721
1692
  for (; $ > 2; )
1722
- v[a++] = w[b++], v[a++] = w[b++], v[a++] = w[b++], $ -= 3;
1723
- $ && (v[a++] = w[b++], $ > 1 && (v[a++] = w[b++]));
1693
+ y[r++] = w[b++], y[r++] = w[b++], y[r++] = w[b++], $ -= 3;
1694
+ $ && (y[r++] = w[b++], $ > 1 && (y[r++] = w[b++]));
1724
1695
  } else {
1725
- b = a - S;
1696
+ b = r - S;
1726
1697
  do
1727
- v[a++] = v[b++], v[a++] = v[b++], v[a++] = v[b++], $ -= 3;
1698
+ y[r++] = y[b++], y[r++] = y[b++], y[r++] = y[b++], $ -= 3;
1728
1699
  while ($ > 2);
1729
- $ && (v[a++] = v[b++], $ > 1 && (v[a++] = v[b++]));
1700
+ $ && (y[r++] = y[b++], $ > 1 && (y[r++] = y[b++]));
1730
1701
  }
1731
- } else if (p & 64) {
1702
+ } else if (d & 64) {
1732
1703
  n.msg = "invalid distance code", I.mode = Xe;
1733
1704
  break e;
1734
1705
  } else {
1735
- C = k[(C & 65535) + (h & (1 << p) - 1)];
1706
+ C = k[(C & 65535) + (h & (1 << d) - 1)];
1736
1707
  continue n;
1737
1708
  }
1738
1709
  break;
1739
1710
  }
1740
- } else if (p & 64)
1741
- if (p & 32) {
1711
+ } else if (d & 64)
1712
+ if (d & 32) {
1742
1713
  I.mode = Ma;
1743
1714
  break e;
1744
1715
  } else {
@@ -1746,15 +1717,15 @@ var Ha = function(n, t) {
1746
1717
  break e;
1747
1718
  }
1748
1719
  else {
1749
- C = g[(C & 65535) + (h & (1 << p) - 1)];
1720
+ C = g[(C & 65535) + (h & (1 << d) - 1)];
1750
1721
  continue t;
1751
1722
  }
1752
1723
  break;
1753
1724
  }
1754
- } while (i < r && a < s);
1755
- $ = _ >> 3, i -= $, _ -= $ << 3, h &= (1 << _) - 1, n.next_in = i, n.next_out = a, n.avail_in = i < r ? 5 + (r - i) : 5 - (i - r), n.avail_out = a < s ? 257 + (s - a) : 257 - (a - s), I.hold = h, I.bits = _;
1725
+ } while (i < a && r < l);
1726
+ $ = _ >> 3, i -= $, _ -= $ << 3, h &= (1 << _) - 1, n.next_in = i, n.next_out = r, n.avail_in = i < a ? 5 + (a - i) : 5 - (i - a), n.avail_out = r < l ? 257 + (l - r) : 257 - (r - l), I.hold = h, I.bits = _;
1756
1727
  };
1757
- const pe = 15, un = 852, hn = 592, cn = 0, gt = 1, dn = 2, ja = new Uint16Array([
1728
+ const de = 15, un = 852, hn = 592, cn = 0, gt = 1, dn = 2, ja = new Uint16Array([
1758
1729
  /* Length codes 257..285 base */
1759
1730
  3,
1760
1731
  4,
@@ -1888,60 +1859,60 @@ const pe = 15, un = 852, hn = 592, cn = 0, gt = 1, dn = 2, ja = new Uint16Array(
1888
1859
  29,
1889
1860
  64,
1890
1861
  64
1891
- ]), Wa = (e, n, t, i, r, a, o, s) => {
1892
- const u = s.bits;
1893
- let l = 0, f = 0, d = 0, c = 0, h = 0, _ = 0, g = 0, k = 0, y = 0, E = 0, C, p, $, S, b, w = null, m;
1894
- const v = new Uint16Array(pe + 1), I = new Uint16Array(pe + 1);
1895
- let ae = null, Jt, je, Ge;
1896
- for (l = 0; l <= pe; l++)
1897
- v[l] = 0;
1862
+ ]), Wa = (e, n, t, i, a, r, o, l) => {
1863
+ const u = l.bits;
1864
+ let s = 0, f = 0, p = 0, c = 0, h = 0, _ = 0, g = 0, k = 0, v = 0, E = 0, C, d, $, S, b, w = null, m;
1865
+ const y = new Uint16Array(de + 1), I = new Uint16Array(de + 1);
1866
+ let ie = null, Jt, je, Ge;
1867
+ for (s = 0; s <= de; s++)
1868
+ y[s] = 0;
1898
1869
  for (f = 0; f < i; f++)
1899
- v[n[t + f]]++;
1900
- for (h = u, c = pe; c >= 1 && v[c] === 0; c--)
1870
+ y[n[t + f]]++;
1871
+ for (h = u, c = de; c >= 1 && y[c] === 0; c--)
1901
1872
  ;
1902
1873
  if (h > c && (h = c), c === 0)
1903
- return r[a++] = 1 << 24 | 64 << 16 | 0, r[a++] = 1 << 24 | 64 << 16 | 0, s.bits = 1, 0;
1904
- for (d = 1; d < c && v[d] === 0; d++)
1874
+ return a[r++] = 1 << 24 | 64 << 16 | 0, a[r++] = 1 << 24 | 64 << 16 | 0, l.bits = 1, 0;
1875
+ for (p = 1; p < c && y[p] === 0; p++)
1905
1876
  ;
1906
- for (h < d && (h = d), k = 1, l = 1; l <= pe; l++)
1907
- if (k <<= 1, k -= v[l], k < 0)
1877
+ for (h < p && (h = p), k = 1, s = 1; s <= de; s++)
1878
+ if (k <<= 1, k -= y[s], k < 0)
1908
1879
  return -1;
1909
1880
  if (k > 0 && (e === cn || c !== 1))
1910
1881
  return -1;
1911
- for (I[1] = 0, l = 1; l < pe; l++)
1912
- I[l + 1] = I[l] + v[l];
1882
+ for (I[1] = 0, s = 1; s < de; s++)
1883
+ I[s + 1] = I[s] + y[s];
1913
1884
  for (f = 0; f < i; f++)
1914
1885
  n[t + f] !== 0 && (o[I[n[t + f]]++] = f);
1915
- if (e === cn ? (w = ae = o, m = 20) : e === gt ? (w = ja, ae = Ga, m = 257) : (w = Ya, ae = Ka, m = 0), E = 0, f = 0, l = d, b = a, _ = h, g = 0, $ = -1, y = 1 << h, S = y - 1, e === gt && y > un || e === dn && y > hn)
1886
+ if (e === cn ? (w = ie = o, m = 20) : e === gt ? (w = ja, ie = Ga, m = 257) : (w = Ya, ie = Ka, m = 0), E = 0, f = 0, s = p, b = r, _ = h, g = 0, $ = -1, v = 1 << h, S = v - 1, e === gt && v > un || e === dn && v > hn)
1916
1887
  return 1;
1917
1888
  for (; ; ) {
1918
- Jt = l - g, o[f] + 1 < m ? (je = 0, Ge = o[f]) : o[f] >= m ? (je = ae[o[f] - m], Ge = w[o[f] - m]) : (je = 32 + 64, Ge = 0), C = 1 << l - g, p = 1 << _, d = p;
1889
+ Jt = s - g, o[f] + 1 < m ? (je = 0, Ge = o[f]) : o[f] >= m ? (je = ie[o[f] - m], Ge = w[o[f] - m]) : (je = 96, Ge = 0), C = 1 << s - g, d = 1 << _, p = d;
1919
1890
  do
1920
- p -= C, r[b + (E >> g) + p] = Jt << 24 | je << 16 | Ge | 0;
1921
- while (p !== 0);
1922
- for (C = 1 << l - 1; E & C; )
1891
+ d -= C, a[b + (E >> g) + d] = Jt << 24 | je << 16 | Ge | 0;
1892
+ while (d !== 0);
1893
+ for (C = 1 << s - 1; E & C; )
1923
1894
  C >>= 1;
1924
- if (C !== 0 ? (E &= C - 1, E += C) : E = 0, f++, --v[l] === 0) {
1925
- if (l === c)
1895
+ if (C !== 0 ? (E &= C - 1, E += C) : E = 0, f++, --y[s] === 0) {
1896
+ if (s === c)
1926
1897
  break;
1927
- l = n[t + o[f]];
1898
+ s = n[t + o[f]];
1928
1899
  }
1929
- if (l > h && (E & S) !== $) {
1930
- for (g === 0 && (g = h), b += d, _ = l - g, k = 1 << _; _ + g < c && (k -= v[_ + g], !(k <= 0)); )
1900
+ if (s > h && (E & S) !== $) {
1901
+ for (g === 0 && (g = h), b += p, _ = s - g, k = 1 << _; _ + g < c && (k -= y[_ + g], !(k <= 0)); )
1931
1902
  _++, k <<= 1;
1932
- if (y += 1 << _, e === gt && y > un || e === dn && y > hn)
1903
+ if (v += 1 << _, e === gt && v > un || e === dn && v > hn)
1933
1904
  return 1;
1934
- $ = E & S, r[$] = h << 24 | _ << 16 | b - a | 0;
1905
+ $ = E & S, a[$] = h << 24 | _ << 16 | b - r | 0;
1935
1906
  }
1936
1907
  }
1937
- return E !== 0 && (r[b + E] = l - g << 24 | 64 << 16 | 0), s.bits = h, 0;
1908
+ return E !== 0 && (a[b + E] = s - g << 24 | 64 << 16 | 0), l.bits = h, 0;
1938
1909
  };
1939
1910
  var Ae = Wa;
1940
1911
  const Xa = 0, gi = 1, wi = 2, {
1941
1912
  Z_FINISH: pn,
1942
1913
  Z_BLOCK: qa,
1943
1914
  Z_TREES: qe,
1944
- Z_OK: he,
1915
+ Z_OK: ue,
1945
1916
  Z_STREAM_END: Ja,
1946
1917
  Z_NEED_DICT: Qa,
1947
1918
  Z_STREAM_ERROR: P,
@@ -1953,24 +1924,24 @@ const Xa = 0, gi = 1, wi = 2, {
1953
1924
  function ao() {
1954
1925
  this.strm = null, 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;
1955
1926
  }
1956
- const ce = (e) => {
1927
+ const he = (e) => {
1957
1928
  if (!e)
1958
1929
  return 1;
1959
1930
  const n = e.state;
1960
1931
  return !n || n.strm !== e || n.mode < ut || n.mode > ki ? 1 : 0;
1961
1932
  }, $i = (e) => {
1962
- if (ce(e))
1933
+ if (he(e))
1963
1934
  return P;
1964
1935
  const n = e.state;
1965
- return e.total_in = e.total_out = n.total = 0, e.msg = "", n.wrap && (e.adler = n.wrap & 1), n.mode = ut, n.last = 0, n.havedict = 0, n.flags = -1, n.dmax = 32768, n.head = null, n.hold = 0, n.bits = 0, n.lencode = n.lendyn = new Int32Array(to), n.distcode = n.distdyn = new Int32Array(no), n.sane = 1, n.back = -1, he;
1936
+ return e.total_in = e.total_out = n.total = 0, e.msg = "", n.wrap && (e.adler = n.wrap & 1), n.mode = ut, n.last = 0, n.havedict = 0, n.flags = -1, n.dmax = 32768, n.head = null, n.hold = 0, n.bits = 0, n.lencode = n.lendyn = new Int32Array(to), n.distcode = n.distdyn = new Int32Array(no), n.sane = 1, n.back = -1, ue;
1966
1937
  }, Ei = (e) => {
1967
- if (ce(e))
1938
+ if (he(e))
1968
1939
  return P;
1969
1940
  const n = e.state;
1970
1941
  return n.wsize = 0, n.whave = 0, n.wnext = 0, $i(e);
1971
1942
  }, Ci = (e, n) => {
1972
1943
  let t;
1973
- if (ce(e))
1944
+ if (he(e))
1974
1945
  return P;
1975
1946
  const i = e.state;
1976
1947
  return n < 0 ? (t = 0, n = -n) : (t = (n >> 4) + 5, n < 48 && (n &= 15)), n && (n < 8 || n > 15) ? P : (i.window !== null && i.wbits !== n && (i.window = null), i.wrap = t, i.wbits = n, Ei(e));
@@ -1980,11 +1951,11 @@ const ce = (e) => {
1980
1951
  const t = new ao();
1981
1952
  e.state = t, t.strm = e, t.window = null, t.mode = ut;
1982
1953
  const i = Ci(e, n);
1983
- return i !== he && (e.state = null), i;
1954
+ return i !== ue && (e.state = null), i;
1984
1955
  }, oo = (e) => Si(e, ro);
1985
- let Ln = !0, vt, kt;
1956
+ let Fn = !0, vt, kt;
1986
1957
  const so = (e) => {
1987
- if (Ln) {
1958
+ if (Fn) {
1988
1959
  vt = new Int32Array(512), kt = new Int32Array(32);
1989
1960
  let n = 0;
1990
1961
  for (; n < 144; )
@@ -1997,24 +1968,24 @@ const so = (e) => {
1997
1968
  e.lens[n++] = 8;
1998
1969
  for (Ae(gi, e.lens, 0, 288, vt, 0, e.work, { bits: 9 }), n = 0; n < 32; )
1999
1970
  e.lens[n++] = 5;
2000
- Ae(wi, e.lens, 0, 32, kt, 0, e.work, { bits: 5 }), Ln = !1;
1971
+ Ae(wi, e.lens, 0, 32, kt, 0, e.work, { bits: 5 }), Fn = !1;
2001
1972
  }
2002
1973
  e.lencode = vt, e.lenbits = 9, e.distcode = kt, e.distbits = 5;
2003
1974
  }, Ni = (e, n, t, i) => {
2004
- let r;
2005
- const a = e.state;
2006
- return a.window === null && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new Uint8Array(a.wsize)), i >= a.wsize ? (a.window.set(n.subarray(t - a.wsize, t), 0), a.wnext = 0, a.whave = a.wsize) : (r = a.wsize - a.wnext, r > i && (r = i), a.window.set(n.subarray(t - i, t - i + r), a.wnext), i -= r, i ? (a.window.set(n.subarray(t - i, t), 0), a.wnext = i, a.whave = a.wsize) : (a.wnext += r, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += r))), 0;
1975
+ let a;
1976
+ const r = e.state;
1977
+ return r.window === null && (r.wsize = 1 << r.wbits, r.wnext = 0, r.whave = 0, r.window = new Uint8Array(r.wsize)), i >= r.wsize ? (r.window.set(n.subarray(t - r.wsize, t), 0), r.wnext = 0, r.whave = r.wsize) : (a = r.wsize - r.wnext, a > i && (a = i), r.window.set(n.subarray(t - i, t - i + a), r.wnext), i -= a, i ? (r.window.set(n.subarray(t - i, t), 0), r.wnext = i, r.whave = r.wsize) : (r.wnext += a, r.wnext === r.wsize && (r.wnext = 0), r.whave < r.wsize && (r.whave += a))), 0;
2007
1978
  }, lo = (e, n) => {
2008
- let t, i, r, a, o, s, u, l, f, d, c, h, _, g, k = 0, y, E, C, p, $, S, b, w;
1979
+ let t, i, a, r, o, l, u, s, f, p, c, h, _, g, k = 0, v, E, C, d, $, S, b, w;
2009
1980
  const m = new Uint8Array(4);
2010
- let v, I;
2011
- const ae = (
1981
+ let y, I;
1982
+ const ie = (
2012
1983
  /* permutation of code lengths */
2013
1984
  new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
2014
1985
  );
2015
- if (ce(e) || !e.output || !e.input && e.avail_in !== 0)
1986
+ if (he(e) || !e.output || !e.input && e.avail_in !== 0)
2016
1987
  return P;
2017
- t = e.state, t.mode === K && (t.mode = wt), o = e.next_out, r = e.output, u = e.avail_out, a = e.next_in, i = e.input, s = e.avail_in, l = t.hold, f = t.bits, d = s, c = u, w = he;
1988
+ t = e.state, t.mode === K && (t.mode = wt), o = e.next_out, a = e.output, u = e.avail_out, r = e.next_in, i = e.input, l = e.avail_in, s = t.hold, f = t.bits, p = l, c = u, w = ue;
2018
1989
  e:
2019
1990
  for (; ; )
2020
1991
  switch (t.mode) {
@@ -2024,36 +1995,36 @@ const so = (e) => {
2024
1995
  break;
2025
1996
  }
2026
1997
  for (; f < 16; ) {
2027
- if (s === 0)
1998
+ if (l === 0)
2028
1999
  break e;
2029
- s--, l += i[a++] << f, f += 8;
2000
+ l--, s += i[r++] << f, f += 8;
2030
2001
  }
2031
- if (t.wrap & 2 && l === 35615) {
2032
- t.wbits === 0 && (t.wbits = 15), t.check = 0, m[0] = l & 255, m[1] = l >>> 8 & 255, t.check = R(t.check, m, 2, 0), l = 0, f = 0, t.mode = bn;
2002
+ if (t.wrap & 2 && s === 35615) {
2003
+ t.wbits === 0 && (t.wbits = 15), t.check = 0, m[0] = s & 255, m[1] = s >>> 8 & 255, t.check = R(t.check, m, 2, 0), s = 0, f = 0, t.mode = bn;
2033
2004
  break;
2034
2005
  }
2035
2006
  if (t.head && (t.head.done = !1), !(t.wrap & 1) || /* check if zlib header allowed */
2036
- (((l & 255) << 8) + (l >> 8)) % 31) {
2007
+ (((s & 255) << 8) + (s >> 8)) % 31) {
2037
2008
  e.msg = "incorrect header check", t.mode = O;
2038
2009
  break;
2039
2010
  }
2040
- if ((l & 15) !== _n) {
2011
+ if ((s & 15) !== _n) {
2041
2012
  e.msg = "unknown compression method", t.mode = O;
2042
2013
  break;
2043
2014
  }
2044
- if (l >>>= 4, f -= 4, b = (l & 15) + 8, t.wbits === 0 && (t.wbits = b), b > 15 || b > t.wbits) {
2015
+ if (s >>>= 4, f -= 4, b = (s & 15) + 8, t.wbits === 0 && (t.wbits = b), b > 15 || b > t.wbits) {
2045
2016
  e.msg = "invalid window size", t.mode = O;
2046
2017
  break;
2047
2018
  }
2048
- t.dmax = 1 << t.wbits, t.flags = 0, e.adler = t.check = 1, t.mode = l & 512 ? En : K, l = 0, f = 0;
2019
+ t.dmax = 1 << t.wbits, t.flags = 0, e.adler = t.check = 1, t.mode = s & 512 ? En : K, s = 0, f = 0;
2049
2020
  break;
2050
2021
  case bn:
2051
2022
  for (; f < 16; ) {
2052
- if (s === 0)
2023
+ if (l === 0)
2053
2024
  break e;
2054
- s--, l += i[a++] << f, f += 8;
2025
+ l--, s += i[r++] << f, f += 8;
2055
2026
  }
2056
- if (t.flags = l, (t.flags & 255) !== _n) {
2027
+ if (t.flags = s, (t.flags & 255) !== _n) {
2057
2028
  e.msg = "unknown compression method", t.mode = O;
2058
2029
  break;
2059
2030
  }
@@ -2061,67 +2032,67 @@ const so = (e) => {
2061
2032
  e.msg = "unknown header flags set", t.mode = O;
2062
2033
  break;
2063
2034
  }
2064
- t.head && (t.head.text = l >> 8 & 1), t.flags & 512 && t.wrap & 4 && (m[0] = l & 255, m[1] = l >>> 8 & 255, t.check = R(t.check, m, 2, 0)), l = 0, f = 0, t.mode = gn;
2035
+ t.head && (t.head.text = s >> 8 & 1), t.flags & 512 && t.wrap & 4 && (m[0] = s & 255, m[1] = s >>> 8 & 255, t.check = R(t.check, m, 2, 0)), s = 0, f = 0, t.mode = gn;
2065
2036
  case gn:
2066
2037
  for (; f < 32; ) {
2067
- if (s === 0)
2038
+ if (l === 0)
2068
2039
  break e;
2069
- s--, l += i[a++] << f, f += 8;
2040
+ l--, s += i[r++] << f, f += 8;
2070
2041
  }
2071
- t.head && (t.head.time = l), t.flags & 512 && t.wrap & 4 && (m[0] = l & 255, m[1] = l >>> 8 & 255, m[2] = l >>> 16 & 255, m[3] = l >>> 24 & 255, t.check = R(t.check, m, 4, 0)), l = 0, f = 0, t.mode = wn;
2042
+ t.head && (t.head.time = s), t.flags & 512 && t.wrap & 4 && (m[0] = s & 255, m[1] = s >>> 8 & 255, m[2] = s >>> 16 & 255, m[3] = s >>> 24 & 255, t.check = R(t.check, m, 4, 0)), s = 0, f = 0, t.mode = wn;
2072
2043
  case wn:
2073
2044
  for (; f < 16; ) {
2074
- if (s === 0)
2045
+ if (l === 0)
2075
2046
  break e;
2076
- s--, l += i[a++] << f, f += 8;
2047
+ l--, s += i[r++] << f, f += 8;
2077
2048
  }
2078
- t.head && (t.head.xflags = l & 255, t.head.os = l >> 8), t.flags & 512 && t.wrap & 4 && (m[0] = l & 255, m[1] = l >>> 8 & 255, t.check = R(t.check, m, 2, 0)), l = 0, f = 0, t.mode = mn;
2049
+ t.head && (t.head.xflags = s & 255, t.head.os = s >> 8), t.flags & 512 && t.wrap & 4 && (m[0] = s & 255, m[1] = s >>> 8 & 255, t.check = R(t.check, m, 2, 0)), s = 0, f = 0, t.mode = mn;
2079
2050
  case mn:
2080
2051
  if (t.flags & 1024) {
2081
2052
  for (; f < 16; ) {
2082
- if (s === 0)
2053
+ if (l === 0)
2083
2054
  break e;
2084
- s--, l += i[a++] << f, f += 8;
2055
+ l--, s += i[r++] << f, f += 8;
2085
2056
  }
2086
- t.length = l, t.head && (t.head.extra_len = l), t.flags & 512 && t.wrap & 4 && (m[0] = l & 255, m[1] = l >>> 8 & 255, t.check = R(t.check, m, 2, 0)), l = 0, f = 0;
2057
+ t.length = s, t.head && (t.head.extra_len = s), t.flags & 512 && t.wrap & 4 && (m[0] = s & 255, m[1] = s >>> 8 & 255, t.check = R(t.check, m, 2, 0)), s = 0, f = 0;
2087
2058
  } else
2088
2059
  t.head && (t.head.extra = null);
2089
2060
  t.mode = yn;
2090
2061
  case yn:
2091
- if (t.flags & 1024 && (h = t.length, h > s && (h = s), 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(
2062
+ if (t.flags & 1024 && (h = t.length, h > l && (h = l), 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(
2092
2063
  i.subarray(
2093
- a,
2064
+ r,
2094
2065
  // extra field is limited to 65536 bytes
2095
2066
  // - no need for additional size check
2096
- a + h
2067
+ r + h
2097
2068
  ),
2098
2069
  /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
2099
2070
  b
2100
- )), t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, a)), s -= h, a += h, t.length -= h), t.length))
2071
+ )), t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, r)), l -= h, r += h, t.length -= h), t.length))
2101
2072
  break e;
2102
2073
  t.length = 0, t.mode = vn;
2103
2074
  case vn:
2104
2075
  if (t.flags & 2048) {
2105
- if (s === 0)
2076
+ if (l === 0)
2106
2077
  break e;
2107
2078
  h = 0;
2108
2079
  do
2109
- b = i[a + h++], t.head && b && t.length < 65536 && (t.head.name += String.fromCharCode(b));
2110
- while (b && h < s);
2111
- if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, a)), s -= h, a += h, b)
2080
+ b = i[r + h++], t.head && b && t.length < 65536 && (t.head.name += String.fromCharCode(b));
2081
+ while (b && h < l);
2082
+ if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, r)), l -= h, r += h, b)
2112
2083
  break e;
2113
2084
  } else
2114
2085
  t.head && (t.head.name = null);
2115
2086
  t.length = 0, t.mode = kn;
2116
2087
  case kn:
2117
2088
  if (t.flags & 4096) {
2118
- if (s === 0)
2089
+ if (l === 0)
2119
2090
  break e;
2120
2091
  h = 0;
2121
2092
  do
2122
- b = i[a + h++], t.head && b && t.length < 65536 && (t.head.comment += String.fromCharCode(b));
2123
- while (b && h < s);
2124
- if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, a)), s -= h, a += h, b)
2093
+ b = i[r + h++], t.head && b && t.length < 65536 && (t.head.comment += String.fromCharCode(b));
2094
+ while (b && h < l);
2095
+ if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, i, h, r)), l -= h, r += h, b)
2125
2096
  break e;
2126
2097
  } else
2127
2098
  t.head && (t.head.comment = null);
@@ -2129,49 +2100,49 @@ const so = (e) => {
2129
2100
  case $n:
2130
2101
  if (t.flags & 512) {
2131
2102
  for (; f < 16; ) {
2132
- if (s === 0)
2103
+ if (l === 0)
2133
2104
  break e;
2134
- s--, l += i[a++] << f, f += 8;
2105
+ l--, s += i[r++] << f, f += 8;
2135
2106
  }
2136
- if (t.wrap & 4 && l !== (t.check & 65535)) {
2107
+ if (t.wrap & 4 && s !== (t.check & 65535)) {
2137
2108
  e.msg = "header crc mismatch", t.mode = O;
2138
2109
  break;
2139
2110
  }
2140
- l = 0, f = 0;
2111
+ s = 0, f = 0;
2141
2112
  }
2142
2113
  t.head && (t.head.hcrc = t.flags >> 9 & 1, t.head.done = !0), e.adler = t.check = 0, t.mode = K;
2143
2114
  break;
2144
2115
  case En:
2145
2116
  for (; f < 32; ) {
2146
- if (s === 0)
2117
+ if (l === 0)
2147
2118
  break e;
2148
- s--, l += i[a++] << f, f += 8;
2119
+ l--, s += i[r++] << f, f += 8;
2149
2120
  }
2150
- e.adler = t.check = Vn(l), l = 0, f = 0, t.mode = at;
2121
+ e.adler = t.check = Vn(s), s = 0, f = 0, t.mode = at;
2151
2122
  case at:
2152
2123
  if (t.havedict === 0)
2153
- return e.next_out = o, e.avail_out = u, e.next_in = a, e.avail_in = s, t.hold = l, t.bits = f, Qa;
2124
+ return e.next_out = o, e.avail_out = u, e.next_in = r, e.avail_in = l, t.hold = s, t.bits = f, Qa;
2154
2125
  e.adler = t.check = 1, t.mode = K;
2155
2126
  case K:
2156
2127
  if (n === qa || n === qe)
2157
2128
  break e;
2158
2129
  case wt:
2159
2130
  if (t.last) {
2160
- l >>>= f & 7, f -= f & 7, t.mode = yt;
2131
+ s >>>= f & 7, f -= f & 7, t.mode = yt;
2161
2132
  break;
2162
2133
  }
2163
2134
  for (; f < 3; ) {
2164
- if (s === 0)
2135
+ if (l === 0)
2165
2136
  break e;
2166
- s--, l += i[a++] << f, f += 8;
2137
+ l--, s += i[r++] << f, f += 8;
2167
2138
  }
2168
- switch (t.last = l & 1, l >>>= 1, f -= 1, l & 3) {
2139
+ switch (t.last = s & 1, s >>>= 1, f -= 1, s & 3) {
2169
2140
  case 0:
2170
2141
  t.mode = Cn;
2171
2142
  break;
2172
2143
  case 1:
2173
2144
  if (so(t), t.mode = Je, n === qe) {
2174
- l >>>= 2, f -= 2;
2145
+ s >>>= 2, f -= 2;
2175
2146
  break e;
2176
2147
  }
2177
2148
  break;
@@ -2181,38 +2152,38 @@ const so = (e) => {
2181
2152
  case 3:
2182
2153
  e.msg = "invalid block type", t.mode = O;
2183
2154
  }
2184
- l >>>= 2, f -= 2;
2155
+ s >>>= 2, f -= 2;
2185
2156
  break;
2186
2157
  case Cn:
2187
- for (l >>>= f & 7, f -= f & 7; f < 32; ) {
2188
- if (s === 0)
2158
+ for (s >>>= f & 7, f -= f & 7; f < 32; ) {
2159
+ if (l === 0)
2189
2160
  break e;
2190
- s--, l += i[a++] << f, f += 8;
2161
+ l--, s += i[r++] << f, f += 8;
2191
2162
  }
2192
- if ((l & 65535) !== (l >>> 16 ^ 65535)) {
2163
+ if ((s & 65535) !== (s >>> 16 ^ 65535)) {
2193
2164
  e.msg = "invalid stored block lengths", t.mode = O;
2194
2165
  break;
2195
2166
  }
2196
- if (t.length = l & 65535, l = 0, f = 0, t.mode = mt, n === qe)
2167
+ if (t.length = s & 65535, s = 0, f = 0, t.mode = mt, n === qe)
2197
2168
  break e;
2198
2169
  case mt:
2199
2170
  t.mode = Sn;
2200
2171
  case Sn:
2201
2172
  if (h = t.length, h) {
2202
- if (h > s && (h = s), h > u && (h = u), h === 0)
2173
+ if (h > l && (h = l), h > u && (h = u), h === 0)
2203
2174
  break e;
2204
- r.set(i.subarray(a, a + h), o), s -= h, a += h, u -= h, o += h, t.length -= h;
2175
+ a.set(i.subarray(r, r + h), o), l -= h, r += h, u -= h, o += h, t.length -= h;
2205
2176
  break;
2206
2177
  }
2207
2178
  t.mode = K;
2208
2179
  break;
2209
2180
  case Nn:
2210
2181
  for (; f < 14; ) {
2211
- if (s === 0)
2182
+ if (l === 0)
2212
2183
  break e;
2213
- s--, l += i[a++] << f, f += 8;
2184
+ l--, s += i[r++] << f, f += 8;
2214
2185
  }
2215
- if (t.nlen = (l & 31) + 257, l >>>= 5, f -= 5, t.ndist = (l & 31) + 1, l >>>= 5, f -= 5, t.ncode = (l & 15) + 4, l >>>= 4, f -= 4, t.nlen > 286 || t.ndist > 30) {
2186
+ if (t.nlen = (s & 31) + 257, s >>>= 5, f -= 5, t.ndist = (s & 31) + 1, s >>>= 5, f -= 5, t.ncode = (s & 15) + 4, s >>>= 4, f -= 4, t.nlen > 286 || t.ndist > 30) {
2216
2187
  e.msg = "too many length or distance symbols", t.mode = O;
2217
2188
  break;
2218
2189
  }
@@ -2220,54 +2191,54 @@ const so = (e) => {
2220
2191
  case In:
2221
2192
  for (; t.have < t.ncode; ) {
2222
2193
  for (; f < 3; ) {
2223
- if (s === 0)
2194
+ if (l === 0)
2224
2195
  break e;
2225
- s--, l += i[a++] << f, f += 8;
2196
+ l--, s += i[r++] << f, f += 8;
2226
2197
  }
2227
- t.lens[ae[t.have++]] = l & 7, l >>>= 3, f -= 3;
2198
+ t.lens[ie[t.have++]] = s & 7, s >>>= 3, f -= 3;
2228
2199
  }
2229
2200
  for (; t.have < 19; )
2230
- t.lens[ae[t.have++]] = 0;
2231
- if (t.lencode = t.lendyn, t.lenbits = 7, v = { bits: t.lenbits }, w = Ae(Xa, t.lens, 0, 19, t.lencode, 0, t.work, v), t.lenbits = v.bits, w) {
2201
+ t.lens[ie[t.have++]] = 0;
2202
+ if (t.lencode = t.lendyn, t.lenbits = 7, y = { bits: t.lenbits }, w = Ae(Xa, t.lens, 0, 19, t.lencode, 0, t.work, y), t.lenbits = y.bits, w) {
2232
2203
  e.msg = "invalid code lengths set", t.mode = O;
2233
2204
  break;
2234
2205
  }
2235
2206
  t.have = 0, t.mode = Tn;
2236
2207
  case Tn:
2237
2208
  for (; t.have < t.nlen + t.ndist; ) {
2238
- for (; k = t.lencode[l & (1 << t.lenbits) - 1], y = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(y <= f); ) {
2239
- if (s === 0)
2209
+ for (; k = t.lencode[s & (1 << t.lenbits) - 1], v = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(v <= f); ) {
2210
+ if (l === 0)
2240
2211
  break e;
2241
- s--, l += i[a++] << f, f += 8;
2212
+ l--, s += i[r++] << f, f += 8;
2242
2213
  }
2243
2214
  if (C < 16)
2244
- l >>>= y, f -= y, t.lens[t.have++] = C;
2215
+ s >>>= v, f -= v, t.lens[t.have++] = C;
2245
2216
  else {
2246
2217
  if (C === 16) {
2247
- for (I = y + 2; f < I; ) {
2248
- if (s === 0)
2218
+ for (I = v + 2; f < I; ) {
2219
+ if (l === 0)
2249
2220
  break e;
2250
- s--, l += i[a++] << f, f += 8;
2221
+ l--, s += i[r++] << f, f += 8;
2251
2222
  }
2252
- if (l >>>= y, f -= y, t.have === 0) {
2223
+ if (s >>>= v, f -= v, t.have === 0) {
2253
2224
  e.msg = "invalid bit length repeat", t.mode = O;
2254
2225
  break;
2255
2226
  }
2256
- b = t.lens[t.have - 1], h = 3 + (l & 3), l >>>= 2, f -= 2;
2227
+ b = t.lens[t.have - 1], h = 3 + (s & 3), s >>>= 2, f -= 2;
2257
2228
  } else if (C === 17) {
2258
- for (I = y + 3; f < I; ) {
2259
- if (s === 0)
2229
+ for (I = v + 3; f < I; ) {
2230
+ if (l === 0)
2260
2231
  break e;
2261
- s--, l += i[a++] << f, f += 8;
2232
+ l--, s += i[r++] << f, f += 8;
2262
2233
  }
2263
- l >>>= y, f -= y, b = 0, h = 3 + (l & 7), l >>>= 3, f -= 3;
2234
+ s >>>= v, f -= v, b = 0, h = 3 + (s & 7), s >>>= 3, f -= 3;
2264
2235
  } else {
2265
- for (I = y + 7; f < I; ) {
2266
- if (s === 0)
2236
+ for (I = v + 7; f < I; ) {
2237
+ if (l === 0)
2267
2238
  break e;
2268
- s--, l += i[a++] << f, f += 8;
2239
+ l--, s += i[r++] << f, f += 8;
2269
2240
  }
2270
- l >>>= y, f -= y, b = 0, h = 11 + (l & 127), l >>>= 7, f -= 7;
2241
+ s >>>= v, f -= v, b = 0, h = 11 + (s & 127), s >>>= 7, f -= 7;
2271
2242
  }
2272
2243
  if (t.have + h > t.nlen + t.ndist) {
2273
2244
  e.msg = "invalid bit length repeat", t.mode = O;
@@ -2283,11 +2254,11 @@ const so = (e) => {
2283
2254
  e.msg = "invalid code -- missing end-of-block", t.mode = O;
2284
2255
  break;
2285
2256
  }
2286
- if (t.lenbits = 9, v = { bits: t.lenbits }, w = Ae(gi, t.lens, 0, t.nlen, t.lencode, 0, t.work, v), t.lenbits = v.bits, w) {
2257
+ if (t.lenbits = 9, y = { bits: t.lenbits }, w = Ae(gi, t.lens, 0, t.nlen, t.lencode, 0, t.work, y), t.lenbits = y.bits, w) {
2287
2258
  e.msg = "invalid literal/lengths set", t.mode = O;
2288
2259
  break;
2289
2260
  }
2290
- if (t.distbits = 6, t.distcode = t.distdyn, v = { bits: t.distbits }, w = Ae(wi, t.lens, t.nlen, t.ndist, t.distcode, 0, t.work, v), t.distbits = v.bits, w) {
2261
+ if (t.distbits = 6, t.distcode = t.distdyn, y = { bits: t.distbits }, w = Ae(wi, t.lens, t.nlen, t.ndist, t.distcode, 0, t.work, y), t.distbits = y.bits, w) {
2291
2262
  e.msg = "invalid distances set", t.mode = O;
2292
2263
  break;
2293
2264
  }
@@ -2296,24 +2267,24 @@ const so = (e) => {
2296
2267
  case Je:
2297
2268
  t.mode = Qe;
2298
2269
  case Qe:
2299
- if (s >= 6 && u >= 258) {
2300
- e.next_out = o, e.avail_out = u, e.next_in = a, e.avail_in = s, t.hold = l, t.bits = f, Ha(e, c), o = e.next_out, r = e.output, u = e.avail_out, a = e.next_in, i = e.input, s = e.avail_in, l = t.hold, f = t.bits, t.mode === K && (t.back = -1);
2270
+ if (l >= 6 && u >= 258) {
2271
+ e.next_out = o, e.avail_out = u, e.next_in = r, e.avail_in = l, t.hold = s, t.bits = f, Ha(e, c), o = e.next_out, a = e.output, u = e.avail_out, r = e.next_in, i = e.input, l = e.avail_in, s = t.hold, f = t.bits, t.mode === K && (t.back = -1);
2301
2272
  break;
2302
2273
  }
2303
- for (t.back = 0; k = t.lencode[l & (1 << t.lenbits) - 1], y = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(y <= f); ) {
2304
- if (s === 0)
2274
+ for (t.back = 0; k = t.lencode[s & (1 << t.lenbits) - 1], v = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(v <= f); ) {
2275
+ if (l === 0)
2305
2276
  break e;
2306
- s--, l += i[a++] << f, f += 8;
2277
+ l--, s += i[r++] << f, f += 8;
2307
2278
  }
2308
2279
  if (E && !(E & 240)) {
2309
- for (p = y, $ = E, S = C; k = t.lencode[S + ((l & (1 << p + $) - 1) >> p)], y = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(p + y <= f); ) {
2310
- if (s === 0)
2280
+ for (d = v, $ = E, S = C; k = t.lencode[S + ((s & (1 << d + $) - 1) >> d)], v = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(d + v <= f); ) {
2281
+ if (l === 0)
2311
2282
  break e;
2312
- s--, l += i[a++] << f, f += 8;
2283
+ l--, s += i[r++] << f, f += 8;
2313
2284
  }
2314
- l >>>= p, f -= p, t.back += p;
2285
+ s >>>= d, f -= d, t.back += d;
2315
2286
  }
2316
- if (l >>>= y, f -= y, t.back += y, t.length = C, E === 0) {
2287
+ if (s >>>= v, f -= v, t.back += v, t.length = C, E === 0) {
2317
2288
  t.mode = Bn;
2318
2289
  break;
2319
2290
  }
@@ -2329,28 +2300,28 @@ const so = (e) => {
2329
2300
  case An:
2330
2301
  if (t.extra) {
2331
2302
  for (I = t.extra; f < I; ) {
2332
- if (s === 0)
2303
+ if (l === 0)
2333
2304
  break e;
2334
- s--, l += i[a++] << f, f += 8;
2305
+ l--, s += i[r++] << f, f += 8;
2335
2306
  }
2336
- t.length += l & (1 << t.extra) - 1, l >>>= t.extra, f -= t.extra, t.back += t.extra;
2307
+ t.length += s & (1 << t.extra) - 1, s >>>= t.extra, f -= t.extra, t.back += t.extra;
2337
2308
  }
2338
2309
  t.was = t.length, t.mode = On;
2339
2310
  case On:
2340
- for (; k = t.distcode[l & (1 << t.distbits) - 1], y = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(y <= f); ) {
2341
- if (s === 0)
2311
+ for (; k = t.distcode[s & (1 << t.distbits) - 1], v = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(v <= f); ) {
2312
+ if (l === 0)
2342
2313
  break e;
2343
- s--, l += i[a++] << f, f += 8;
2314
+ l--, s += i[r++] << f, f += 8;
2344
2315
  }
2345
2316
  if (!(E & 240)) {
2346
- for (p = y, $ = E, S = C; k = t.distcode[S + ((l & (1 << p + $) - 1) >> p)], y = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(p + y <= f); ) {
2347
- if (s === 0)
2317
+ for (d = v, $ = E, S = C; k = t.distcode[S + ((s & (1 << d + $) - 1) >> d)], v = k >>> 24, E = k >>> 16 & 255, C = k & 65535, !(d + v <= f); ) {
2318
+ if (l === 0)
2348
2319
  break e;
2349
- s--, l += i[a++] << f, f += 8;
2320
+ l--, s += i[r++] << f, f += 8;
2350
2321
  }
2351
- l >>>= p, f -= p, t.back += p;
2322
+ s >>>= d, f -= d, t.back += d;
2352
2323
  }
2353
- if (l >>>= y, f -= y, t.back += y, E & 64) {
2324
+ if (s >>>= v, f -= v, t.back += v, E & 64) {
2354
2325
  e.msg = "invalid distance code", t.mode = O;
2355
2326
  break;
2356
2327
  }
@@ -2358,11 +2329,11 @@ const so = (e) => {
2358
2329
  case zn:
2359
2330
  if (t.extra) {
2360
2331
  for (I = t.extra; f < I; ) {
2361
- if (s === 0)
2332
+ if (l === 0)
2362
2333
  break e;
2363
- s--, l += i[a++] << f, f += 8;
2334
+ l--, s += i[r++] << f, f += 8;
2364
2335
  }
2365
- t.offset += l & (1 << t.extra) - 1, l >>>= t.extra, f -= t.extra, t.back += t.extra;
2336
+ t.offset += s & (1 << t.extra) - 1, s >>>= t.extra, f -= t.extra, t.back += t.extra;
2366
2337
  }
2367
2338
  if (t.offset > t.dmax) {
2368
2339
  e.msg = "invalid distance too far back", t.mode = O;
@@ -2379,45 +2350,45 @@ const so = (e) => {
2379
2350
  }
2380
2351
  h > t.wnext ? (h -= t.wnext, _ = t.wsize - h) : _ = t.wnext - h, h > t.length && (h = t.length), g = t.window;
2381
2352
  } else
2382
- g = r, _ = o - t.offset, h = t.length;
2353
+ g = a, _ = o - t.offset, h = t.length;
2383
2354
  h > u && (h = u), u -= h, t.length -= h;
2384
2355
  do
2385
- r[o++] = g[_++];
2356
+ a[o++] = g[_++];
2386
2357
  while (--h);
2387
2358
  t.length === 0 && (t.mode = Qe);
2388
2359
  break;
2389
2360
  case Bn:
2390
2361
  if (u === 0)
2391
2362
  break e;
2392
- r[o++] = t.length, u--, t.mode = Qe;
2363
+ a[o++] = t.length, u--, t.mode = Qe;
2393
2364
  break;
2394
2365
  case yt:
2395
2366
  if (t.wrap) {
2396
2367
  for (; f < 32; ) {
2397
- if (s === 0)
2368
+ if (l === 0)
2398
2369
  break e;
2399
- s--, l |= i[a++] << f, f += 8;
2370
+ l--, s |= i[r++] << f, f += 8;
2400
2371
  }
2401
2372
  if (c -= u, e.total_out += c, t.total += c, t.wrap & 4 && c && (e.adler = t.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
2402
- t.flags ? R(t.check, r, c, o - c) : Ue(t.check, r, c, o - c)), c = u, t.wrap & 4 && (t.flags ? l : Vn(l)) !== t.check) {
2373
+ t.flags ? R(t.check, a, c, o - c) : Ue(t.check, a, c, o - c)), c = u, t.wrap & 4 && (t.flags ? s : Vn(s)) !== t.check) {
2403
2374
  e.msg = "incorrect data check", t.mode = O;
2404
2375
  break;
2405
2376
  }
2406
- l = 0, f = 0;
2377
+ s = 0, f = 0;
2407
2378
  }
2408
2379
  t.mode = Un;
2409
2380
  case Un:
2410
2381
  if (t.wrap && t.flags) {
2411
2382
  for (; f < 32; ) {
2412
- if (s === 0)
2383
+ if (l === 0)
2413
2384
  break e;
2414
- s--, l += i[a++] << f, f += 8;
2385
+ l--, s += i[r++] << f, f += 8;
2415
2386
  }
2416
- if (t.wrap & 4 && l !== (t.total & 4294967295)) {
2387
+ if (t.wrap & 4 && s !== (t.total & 4294967295)) {
2417
2388
  e.msg = "incorrect length check", t.mode = O;
2418
2389
  break;
2419
2390
  }
2420
- l = 0, f = 0;
2391
+ s = 0, f = 0;
2421
2392
  }
2422
2393
  t.mode = Dn;
2423
2394
  case Dn:
@@ -2432,22 +2403,22 @@ const so = (e) => {
2432
2403
  default:
2433
2404
  return P;
2434
2405
  }
2435
- return e.next_out = o, e.avail_out = u, e.next_in = a, e.avail_in = s, t.hold = l, t.bits = f, (t.wsize || c !== e.avail_out && t.mode < O && (t.mode < yt || n !== pn)) && Ni(e, e.output, e.next_out, c - e.avail_out), d -= e.avail_in, c -= e.avail_out, e.total_in += d, e.total_out += c, t.total += c, t.wrap & 4 && c && (e.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
2436
- t.flags ? R(t.check, r, c, e.next_out - c) : Ue(t.check, r, c, e.next_out - c)), e.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === K ? 128 : 0) + (t.mode === Je || t.mode === mt ? 256 : 0), (d === 0 && c === 0 || n === pn) && w === he && (w = eo), w;
2406
+ return e.next_out = o, e.avail_out = u, e.next_in = r, e.avail_in = l, t.hold = s, t.bits = f, (t.wsize || c !== e.avail_out && t.mode < O && (t.mode < yt || n !== pn)) && Ni(e, e.output, e.next_out, c - e.avail_out), p -= e.avail_in, c -= e.avail_out, e.total_in += p, e.total_out += c, t.total += c, t.wrap & 4 && c && (e.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
2407
+ t.flags ? R(t.check, a, c, e.next_out - c) : Ue(t.check, a, c, e.next_out - c)), e.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === K ? 128 : 0) + (t.mode === Je || t.mode === mt ? 256 : 0), (p === 0 && c === 0 || n === pn) && w === ue && (w = eo), w;
2437
2408
  }, fo = (e) => {
2438
- if (ce(e))
2409
+ if (he(e))
2439
2410
  return P;
2440
2411
  let n = e.state;
2441
- return n.window && (n.window = null), e.state = null, he;
2412
+ return n.window && (n.window = null), e.state = null, ue;
2442
2413
  }, uo = (e, n) => {
2443
- if (ce(e))
2414
+ if (he(e))
2444
2415
  return P;
2445
2416
  const t = e.state;
2446
- return t.wrap & 2 ? (t.head = n, n.done = !1, he) : P;
2417
+ return t.wrap & 2 ? (t.head = n, n.done = !1, ue) : P;
2447
2418
  }, ho = (e, n) => {
2448
2419
  const t = n.length;
2449
- let i, r, a;
2450
- return ce(e) || (i = e.state, i.wrap !== 0 && i.mode !== at) ? P : i.mode === at && (r = 1, r = Ue(r, n, t, 0), r !== i.check) ? mi : (a = Ni(e, n, t, t), a ? (i.mode = vi, yi) : (i.havedict = 1, he));
2420
+ let i, a, r;
2421
+ return he(e) || (i = e.state, i.wrap !== 0 && i.mode !== at) ? P : i.mode === at && (a = 1, a = Ue(a, n, t, 0), a !== i.check) ? mi : (r = Ni(e, n, t, t), r ? (i.mode = vi, yi) : (i.havedict = 1, ue));
2451
2422
  };
2452
2423
  var co = Ei, po = Ci, _o = $i, bo = oo, go = Si, wo = lo, mo = fo, yo = uo, vo = ho, ko = "pako inflate (from Nodeca project)", X = {
2453
2424
  inflateReset: co,
@@ -2468,11 +2439,11 @@ var Eo = $o;
2468
2439
  const Ii = Object.prototype.toString, {
2469
2440
  Z_NO_FLUSH: Co,
2470
2441
  Z_FINISH: So,
2471
- Z_OK: Le,
2442
+ Z_OK: Fe,
2472
2443
  Z_STREAM_END: $t,
2473
2444
  Z_NEED_DICT: Et,
2474
2445
  Z_STREAM_ERROR: No,
2475
- Z_DATA_ERROR: Fn,
2446
+ Z_DATA_ERROR: Ln,
2476
2447
  Z_MEM_ERROR: Io
2477
2448
  } = xe;
2478
2449
  function He(e) {
@@ -2487,35 +2458,35 @@ function He(e) {
2487
2458
  this.strm,
2488
2459
  n.windowBits
2489
2460
  );
2490
- if (t !== Le)
2461
+ if (t !== Fe)
2491
2462
  throw new Error(ge[t]);
2492
- if (this.header = new Eo(), X.inflateGetHeader(this.strm, this.header), n.dictionary && (typeof n.dictionary == "string" ? n.dictionary = Ve.string2buf(n.dictionary) : Ii.call(n.dictionary) === "[object ArrayBuffer]" && (n.dictionary = new Uint8Array(n.dictionary)), n.raw && (t = X.inflateSetDictionary(this.strm, n.dictionary), t !== Le)))
2463
+ if (this.header = new Eo(), X.inflateGetHeader(this.strm, this.header), n.dictionary && (typeof n.dictionary == "string" ? n.dictionary = Ve.string2buf(n.dictionary) : Ii.call(n.dictionary) === "[object ArrayBuffer]" && (n.dictionary = new Uint8Array(n.dictionary)), n.raw && (t = X.inflateSetDictionary(this.strm, n.dictionary), t !== Fe)))
2493
2464
  throw new Error(ge[t]);
2494
2465
  }
2495
2466
  He.prototype.push = function(e, n) {
2496
- const t = this.strm, i = this.options.chunkSize, r = this.options.dictionary;
2497
- let a, o, s;
2467
+ const t = this.strm, i = this.options.chunkSize, a = this.options.dictionary;
2468
+ let r, o, l;
2498
2469
  if (this.ended)
2499
2470
  return !1;
2500
2471
  for (n === ~~n ? o = n : o = n === !0 ? So : Co, Ii.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
2501
- for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), a = X.inflate(t, o), a === Et && r && (a = X.inflateSetDictionary(t, r), a === Le ? a = X.inflate(t, o) : a === Fn && (a = Et)); t.avail_in > 0 && a === $t && t.state.wrap > 0 && e[t.next_in] !== 0; )
2502
- X.inflateReset(t), a = X.inflate(t, o);
2503
- switch (a) {
2472
+ for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), r = X.inflate(t, o), r === Et && a && (r = X.inflateSetDictionary(t, a), r === Fe ? r = X.inflate(t, o) : r === Ln && (r = Et)); t.avail_in > 0 && r === $t && t.state.wrap > 0 && e[t.next_in] !== 0; )
2473
+ X.inflateReset(t), r = X.inflate(t, o);
2474
+ switch (r) {
2504
2475
  case No:
2505
- case Fn:
2476
+ case Ln:
2506
2477
  case Et:
2507
2478
  case Io:
2508
- return this.onEnd(a), this.ended = !0, !1;
2479
+ return this.onEnd(r), this.ended = !0, !1;
2509
2480
  }
2510
- if (s = t.avail_out, t.next_out && (t.avail_out === 0 || a === $t))
2481
+ if (l = t.avail_out, t.next_out && (t.avail_out === 0 || r === $t))
2511
2482
  if (this.options.to === "string") {
2512
- let u = Ve.utf8border(t.output, t.next_out), l = t.next_out - u, f = Ve.buf2string(t.output, u);
2513
- t.next_out = l, t.avail_out = i - l, l && t.output.set(t.output.subarray(u, u + l), 0), this.onData(f);
2483
+ let u = Ve.utf8border(t.output, t.next_out), s = t.next_out - u, f = Ve.buf2string(t.output, u);
2484
+ t.next_out = s, t.avail_out = i - s, s && t.output.set(t.output.subarray(u, u + s), 0), this.onData(f);
2514
2485
  } else
2515
2486
  this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out));
2516
- if (!(a === Le && s === 0)) {
2517
- if (a === $t)
2518
- return a = X.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, !0;
2487
+ if (!(r === Fe && l === 0)) {
2488
+ if (r === $t)
2489
+ return r = X.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, !0;
2519
2490
  if (t.avail_in === 0)
2520
2491
  break;
2521
2492
  }
@@ -2526,7 +2497,7 @@ He.prototype.onData = function(e) {
2526
2497
  this.chunks.push(e);
2527
2498
  };
2528
2499
  He.prototype.onEnd = function(e) {
2529
- e === Le && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = ft.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
2500
+ e === Fe && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = ft.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
2530
2501
  };
2531
2502
  function Yt(e, n) {
2532
2503
  const t = new He(n);
@@ -2544,32 +2515,32 @@ var Ao = He, Oo = Yt, zo = To, Ro = Yt, Bo = xe, Uo = {
2544
2515
  ungzip: Ro,
2545
2516
  constants: Bo
2546
2517
  };
2547
- const { Inflate: Ds, inflate: Vs, inflateRaw: Do, ungzip: Ls } = Uo;
2518
+ const { Inflate: Us, inflate: Ds, inflateRaw: Do, ungzip: Vs } = Uo;
2548
2519
  var Vo = Do;
2549
- function Lo(e) {
2520
+ function Fo(e) {
2550
2521
  return Vo(e.subarray(2));
2551
2522
  }
2552
- class Fo extends Error {
2523
+ class Lo extends Error {
2553
2524
  constructor(n) {
2554
2525
  super(n), this.code = "ERR_ABORTED";
2555
2526
  }
2556
2527
  }
2557
2528
  function Po(e) {
2558
- e.sort((r, a) => Number(r.offset) - Number(a.offset));
2529
+ e.sort((a, r) => Number(a.offset) - Number(r.offset));
2559
2530
  const n = [];
2560
2531
  let t, i;
2561
- for (const r of e)
2562
- t && i && Number(r.offset) - i <= 2e3 ? (t.length = BigInt(Number(t.length) + Number(r.length) - i + Number(r.offset)), t.blocks.push(r)) : n.push(t = {
2563
- blocks: [r],
2564
- length: r.length,
2565
- offset: r.offset
2532
+ for (const a of e)
2533
+ t && i && Number(a.offset) - i <= 2e3 ? (t.length = BigInt(Number(t.length) + Number(a.length) - i + Number(a.offset)), t.blocks.push(a)) : n.push(t = {
2534
+ blocks: [a],
2535
+ length: a.length,
2536
+ offset: a.offset
2566
2537
  }), i = Number(t.offset) + Number(t.length);
2567
2538
  return n;
2568
2539
  }
2569
2540
  function et(e) {
2570
2541
  if (e && e.aborted)
2571
2542
  if (typeof DOMException > "u") {
2572
- const n = new Fo("aborted");
2543
+ const n = new Lo("aborted");
2573
2544
  throw n.code = "ERR_ABORTED", n;
2574
2545
  } else
2575
2546
  throw new DOMException("aborted", "AbortError");
@@ -2591,7 +2562,7 @@ function Ho(e) {
2591
2562
  type: new N().endianess(n).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")
2592
2563
  })
2593
2564
  }
2594
- }), r = new N().endianess(n).uint32("chromId").int32("start").int32("end").string("rest", {
2565
+ }), a = new N().endianess(n).uint32("chromId").int32("start").int32("end").string("rest", {
2595
2566
  zeroTerminated: !0
2596
2567
  }).saveOffset("offset");
2597
2568
  return {
@@ -2612,157 +2583,164 @@ function Ho(e) {
2612
2583
  })
2613
2584
  }
2614
2585
  }),
2615
- bigBedParser: r,
2586
+ bigBedParser: a,
2616
2587
  summaryParser: t,
2617
2588
  leafParser: i
2618
2589
  };
2619
2590
  }
2620
2591
  class Ti {
2621
- constructor(n, t, i, r, a, o) {
2622
- if (this.bbi = n, this.refsByName = t, this.cirTreeOffset = i, this.isBigEndian = r, this.isCompressed = a, this.blockType = o, this.featureCache = new Gn({
2592
+ constructor(n, t, i, a, r, o) {
2593
+ if (this.bbi = n, this.refsByName = t, this.cirTreeOffset = i, this.isBigEndian = a, this.isCompressed = r, this.blockType = o, this.featureCache = new Gn({
2623
2594
  cache: new Yn({ maxSize: 1e3 }),
2624
- fill: async (u, l) => {
2625
- const f = Number(u.length), d = Number(u.offset), { buffer: c } = await this.bbi.read(Q.Buffer.alloc(f), 0, f, d, {
2626
- signal: l
2595
+ fill: async (u, s) => {
2596
+ const f = Number(u.length), p = Number(u.offset), { buffer: c } = await this.bbi.read(J.Buffer.alloc(f), 0, f, p, {
2597
+ signal: s
2627
2598
  });
2628
2599
  return c;
2629
2600
  }
2630
2601
  }), !(i >= 0))
2631
2602
  throw new Error("invalid cirTreeOffset!");
2632
- const s = Ho(r);
2633
- this.leafParser = s.leafParser, this.bigBedParser = s.bigBedParser;
2603
+ const l = Ho(a);
2604
+ this.leafParser = l.leafParser, this.bigBedParser = l.bigBedParser;
2634
2605
  }
2635
- async readWigData(n, t, i, r, a) {
2606
+ async readWigData(n, t, i, a, r) {
2636
2607
  try {
2637
- const { refsByName: o, bbi: s, cirTreeOffset: u, isBigEndian: l } = this, f = o[n];
2638
- f === void 0 && r.complete();
2639
- const d = { chrId: f, start: t, end: i };
2640
- this.cirTreePromise || (this.cirTreePromise = s.read(Q.Buffer.alloc(48), 0, 48, Number(u), a));
2641
- const { buffer: c } = await this.cirTreePromise, h = l ? c.readUInt32BE(4) : c.readUInt32LE(4);
2608
+ const { refsByName: o, bbi: l, cirTreeOffset: u, isBigEndian: s } = this, f = o[n];
2609
+ f === void 0 && a.complete();
2610
+ const p = { chrId: f, start: t, end: i };
2611
+ this.cirTreePromise || (this.cirTreePromise = l.read(J.Buffer.alloc(48), 0, 48, Number(u), r));
2612
+ const { buffer: c } = await this.cirTreePromise, h = s ? c.readUInt32BE(4) : c.readUInt32LE(4);
2642
2613
  let _ = [], g = 0;
2643
- const k = (p, $, S) => {
2614
+ const k = (d, $, S) => {
2644
2615
  try {
2645
- const b = p.subarray($), w = this.leafParser.parse(b);
2646
- if (w.blocksToFetch && (_ = _.concat(w.blocksToFetch.filter((m) => y(m)).map((m) => ({
2616
+ const b = d.subarray($), w = this.leafParser.parse(b);
2617
+ if (w.blocksToFetch && (_ = _.concat(w.blocksToFetch.filter((m) => v(m)).map((m) => ({
2647
2618
  offset: m.blockOffset,
2648
2619
  length: m.blockSize
2649
2620
  })))), w.recurOffsets) {
2650
- const m = w.recurOffsets.filter((v) => y(v)).map((v) => Number(v.blockOffset));
2621
+ const m = w.recurOffsets.filter((y) => v(y)).map((y) => Number(y.blockOffset));
2651
2622
  m.length > 0 && C(m, S + 1);
2652
2623
  }
2653
2624
  } catch (b) {
2654
- r.error(b);
2625
+ a.error(b);
2655
2626
  }
2656
- }, y = (p) => {
2657
- const { startChrom: $, startBase: S, endChrom: b, endBase: w } = p;
2627
+ }, v = (d) => {
2628
+ const { startChrom: $, startBase: S, endChrom: b, endBase: w } = d;
2658
2629
  return ($ < f || $ === f && S <= i) && (b > f || b === f && w >= t);
2659
- }, E = async (p, $, S) => {
2630
+ }, E = async (d, $, S) => {
2660
2631
  try {
2661
- const b = $.max() - $.min(), w = $.min(), m = await this.featureCache.get(`${b}_${w}`, { length: b, offset: w }, a == null ? void 0 : a.signal);
2662
- for (const v of p)
2663
- $.contains(v) && (k(m, v - w, S), g -= 1, g === 0 && this.readFeatures(r, _, { ...a, request: d }));
2632
+ const b = $.max - $.min, w = $.min, m = await this.featureCache.get(`${b}_${w}`, { length: b, offset: w }, r == null ? void 0 : r.signal);
2633
+ for (const y of d)
2634
+ $.contains(y) && (k(m, y - w, S), g -= 1, g === 0 && this.readFeatures(a, _, {
2635
+ ...r,
2636
+ request: p
2637
+ }).catch((I) => a.error(I)));
2664
2638
  } catch (b) {
2665
- r.error(b);
2639
+ a.error(b);
2666
2640
  }
2667
- }, C = (p, $) => {
2641
+ }, C = (d, $) => {
2668
2642
  try {
2669
- g += p.length;
2643
+ g += d.length;
2670
2644
  const S = 4 + Number(h) * 32;
2671
- let b = new q(p[0], p[0] + S);
2672
- for (let w = 1; w < p.length; w += 1) {
2673
- const m = new q(p[w], p[w] + S);
2645
+ let b = new pe([
2646
+ { min: d[0], max: d[0] + S }
2647
+ ]);
2648
+ for (let w = 1; w < d.length; w += 1) {
2649
+ const m = new pe([
2650
+ { min: d[w], max: d[w] + S }
2651
+ ]);
2674
2652
  b = b.union(m);
2675
2653
  }
2676
- b.getRanges().map((w) => E(p, w, $));
2654
+ b.getRanges().map((w) => E(d, w, $));
2677
2655
  } catch (S) {
2678
- r.error(S);
2656
+ a.error(S);
2679
2657
  }
2680
2658
  };
2681
2659
  return C([Number(u) + 48], 1);
2682
2660
  } catch (o) {
2683
- r.error(o);
2661
+ a.error(o);
2684
2662
  }
2685
2663
  }
2686
2664
  parseSummaryBlock(n, t, i) {
2687
- const r = [];
2688
- let a = t;
2665
+ const a = [];
2666
+ let r = t;
2689
2667
  const o = new DataView(n.buffer, n.byteOffset, n.length);
2690
- for (; a < n.byteLength; ) {
2691
- const s = o.getUint32(a, !0);
2692
- a += 4;
2693
- const u = o.getUint32(a, !0);
2694
- a += 4;
2695
- const l = o.getUint32(a, !0);
2696
- a += 4;
2697
- const f = o.getUint32(a, !0);
2698
- a += 4;
2699
- const d = o.getFloat32(a, !0);
2700
- a += 4;
2701
- const c = o.getFloat32(a, !0);
2702
- a += 4;
2703
- const h = o.getFloat32(a, !0);
2704
- a += 4, a += 4, (!i || s === i.chrId && Ct(u, l, i.start, i.end)) && r.push({
2668
+ for (; r < n.byteLength; ) {
2669
+ const l = o.getUint32(r, !0);
2670
+ r += 4;
2671
+ const u = o.getUint32(r, !0);
2672
+ r += 4;
2673
+ const s = o.getUint32(r, !0);
2674
+ r += 4;
2675
+ const f = o.getUint32(r, !0);
2676
+ r += 4;
2677
+ const p = o.getFloat32(r, !0);
2678
+ r += 4;
2679
+ const c = o.getFloat32(r, !0);
2680
+ r += 4;
2681
+ const h = o.getFloat32(r, !0);
2682
+ r += 4, r += 4, (!i || l === i.chrId && Ct(u, s, i.start, i.end)) && a.push({
2705
2683
  start: u,
2706
- end: l,
2684
+ end: s,
2707
2685
  maxScore: c,
2708
- minScore: d,
2686
+ minScore: p,
2709
2687
  summary: !0,
2710
2688
  score: h / (f || 1)
2711
2689
  });
2712
2690
  }
2713
- return r;
2691
+ return a;
2714
2692
  }
2715
- parseBigBedBlock(n, t, i, r) {
2716
- const a = [];
2693
+ parseBigBedBlock(n, t, i, a) {
2694
+ const r = [];
2717
2695
  let o = t;
2718
2696
  for (; o < n.byteLength; ) {
2719
- const s = this.bigBedParser.parse(n.subarray(o));
2720
- s.uniqueId = `bb-${i + o}`, a.push(s), o += s.offset;
2697
+ const l = this.bigBedParser.parse(n.subarray(o));
2698
+ l.uniqueId = `bb-${i + o}`, r.push(l), o += l.offset;
2721
2699
  }
2722
- return r ? a.filter((s) => Ct(s.start, s.end, r.start, r.end)) : a;
2700
+ return a ? r.filter((l) => Ct(l.start, l.end, a.start, a.end)) : r;
2723
2701
  }
2724
2702
  parseBigWigBlock(n, t, i) {
2725
- const r = n.subarray(t), a = new DataView(r.buffer, r.byteOffset, r.length);
2703
+ const a = n.subarray(t), r = new DataView(a.buffer, a.byteOffset, a.length);
2726
2704
  let o = 0;
2727
2705
  o += 4;
2728
- const s = a.getInt32(o, !0);
2706
+ const l = r.getInt32(o, !0);
2729
2707
  o += 8;
2730
- const u = a.getUint32(o, !0);
2708
+ const u = r.getUint32(o, !0);
2731
2709
  o += 4;
2732
- const l = a.getUint32(o, !0);
2710
+ const s = r.getUint32(o, !0);
2733
2711
  o += 4;
2734
- const f = a.getUint8(o);
2712
+ const f = r.getUint8(o);
2735
2713
  o += 2;
2736
- const d = a.getUint16(o, !0);
2714
+ const p = r.getUint16(o, !0);
2737
2715
  o += 2;
2738
- const c = new Array(d);
2716
+ const c = new Array(p);
2739
2717
  switch (f) {
2740
2718
  case 1: {
2741
- for (let h = 0; h < d; h++) {
2742
- const _ = a.getInt32(o, !0);
2719
+ for (let h = 0; h < p; h++) {
2720
+ const _ = r.getInt32(o, !0);
2743
2721
  o += 4;
2744
- const g = a.getInt32(o, !0);
2722
+ const g = r.getInt32(o, !0);
2745
2723
  o += 4;
2746
- const k = a.getFloat32(o, !0);
2724
+ const k = r.getFloat32(o, !0);
2747
2725
  o += 4, c[h] = { start: _, end: g, score: k };
2748
2726
  }
2749
2727
  break;
2750
2728
  }
2751
2729
  case 2: {
2752
- for (let h = 0; h < d; h++) {
2753
- const _ = a.getInt32(o, !0);
2730
+ for (let h = 0; h < p; h++) {
2731
+ const _ = r.getInt32(o, !0);
2754
2732
  o += 4;
2755
- const g = a.getFloat32(o, !0);
2756
- o += 4, c[h] = { score: g, start: _, end: _ + l };
2733
+ const g = r.getFloat32(o, !0);
2734
+ o += 4, c[h] = { score: g, start: _, end: _ + s };
2757
2735
  }
2758
2736
  break;
2759
2737
  }
2760
2738
  case 3: {
2761
- for (let h = 0; h < d; h++) {
2762
- const _ = a.getFloat32(o, !0);
2739
+ for (let h = 0; h < p; h++) {
2740
+ const _ = r.getFloat32(o, !0);
2763
2741
  o += 4;
2764
- const g = s + h * u;
2765
- c[h] = { score: _, start: g, end: g + l };
2742
+ const g = l + h * u;
2743
+ c[h] = { score: _, start: g, end: g + s };
2766
2744
  }
2767
2745
  break;
2768
2746
  }
@@ -2771,146 +2749,146 @@ class Ti {
2771
2749
  }
2772
2750
  async readFeatures(n, t, i = {}) {
2773
2751
  try {
2774
- const { blockType: r, isCompressed: a } = this, { signal: o, request: s } = i, u = Po(t);
2775
- et(o), await Promise.all(u.map(async (l) => {
2752
+ const { blockType: a, isCompressed: r } = this, { signal: o, request: l } = i, u = Po(t);
2753
+ et(o), await Promise.all(u.map(async (s) => {
2776
2754
  et(o);
2777
- const { length: f, offset: d } = l, c = await this.featureCache.get(`${f}_${d}`, l, o);
2778
- for (const h of l.blocks) {
2755
+ const { length: f, offset: p } = s, c = await this.featureCache.get(`${f}_${p}`, s, o);
2756
+ for (const h of s.blocks) {
2779
2757
  et(o);
2780
- let _ = Number(h.offset) - Number(l.offset), g = c;
2781
- switch (a && (g = Lo(c.subarray(_)), _ = 0), et(o), r) {
2758
+ let _ = Number(h.offset) - Number(s.offset), g = c;
2759
+ switch (r && (g = Fo(c.subarray(_)), _ = 0), et(o), a) {
2782
2760
  case "summary": {
2783
- n.next(this.parseSummaryBlock(g, _, s));
2761
+ n.next(this.parseSummaryBlock(g, _, l));
2784
2762
  break;
2785
2763
  }
2786
2764
  case "bigwig": {
2787
- n.next(this.parseBigWigBlock(g, _, s));
2765
+ n.next(this.parseBigWigBlock(g, _, l));
2788
2766
  break;
2789
2767
  }
2790
2768
  case "bigbed": {
2791
- n.next(this.parseBigBedBlock(g, _, Number(h.offset) * 256, s));
2769
+ n.next(this.parseBigBedBlock(g, _, Number(h.offset) * 256, l));
2792
2770
  break;
2793
2771
  }
2794
2772
  default:
2795
- console.warn(`Don't know what to do with ${r}`);
2773
+ console.warn(`Don't know what to do with ${a}`);
2796
2774
  }
2797
2775
  }
2798
2776
  })), n.complete();
2799
- } catch (r) {
2800
- n.error(r);
2777
+ } catch (a) {
2778
+ n.error(a);
2801
2779
  }
2802
2780
  }
2803
2781
  }
2804
- var Lt = function(e, n) {
2805
- return Lt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
2782
+ var Ft = function(e, n) {
2783
+ return Ft = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
2806
2784
  t.__proto__ = i;
2807
2785
  } || function(t, i) {
2808
- for (var r in i)
2809
- Object.prototype.hasOwnProperty.call(i, r) && (t[r] = i[r]);
2810
- }, Lt(e, n);
2786
+ for (var a in i)
2787
+ Object.prototype.hasOwnProperty.call(i, a) && (t[a] = i[a]);
2788
+ }, Ft(e, n);
2811
2789
  };
2812
2790
  function Kt(e, n) {
2813
2791
  if (typeof n != "function" && n !== null)
2814
2792
  throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2815
- Lt(e, n);
2793
+ Ft(e, n);
2816
2794
  function t() {
2817
2795
  this.constructor = e;
2818
2796
  }
2819
2797
  e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
2820
2798
  }
2821
2799
  function jo(e, n, t, i) {
2822
- function r(a) {
2823
- return a instanceof t ? a : new t(function(o) {
2824
- o(a);
2800
+ function a(r) {
2801
+ return r instanceof t ? r : new t(function(o) {
2802
+ o(r);
2825
2803
  });
2826
2804
  }
2827
- return new (t || (t = Promise))(function(a, o) {
2828
- function s(f) {
2805
+ return new (t || (t = Promise))(function(r, o) {
2806
+ function l(f) {
2829
2807
  try {
2830
- l(i.next(f));
2831
- } catch (d) {
2832
- o(d);
2808
+ s(i.next(f));
2809
+ } catch (p) {
2810
+ o(p);
2833
2811
  }
2834
2812
  }
2835
2813
  function u(f) {
2836
2814
  try {
2837
- l(i.throw(f));
2838
- } catch (d) {
2839
- o(d);
2815
+ s(i.throw(f));
2816
+ } catch (p) {
2817
+ o(p);
2840
2818
  }
2841
2819
  }
2842
- function l(f) {
2843
- f.done ? a(f.value) : r(f.value).then(s, u);
2820
+ function s(f) {
2821
+ f.done ? r(f.value) : a(f.value).then(l, u);
2844
2822
  }
2845
- l((i = i.apply(e, n || [])).next());
2823
+ s((i = i.apply(e, n || [])).next());
2846
2824
  });
2847
2825
  }
2848
2826
  function Ai(e, n) {
2849
2827
  var t = { label: 0, sent: function() {
2850
- if (a[0] & 1)
2851
- throw a[1];
2852
- return a[1];
2853
- }, trys: [], ops: [] }, i, r, a, o;
2854
- return o = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
2828
+ if (r[0] & 1)
2829
+ throw r[1];
2830
+ return r[1];
2831
+ }, trys: [], ops: [] }, i, a, r, o;
2832
+ return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
2855
2833
  return this;
2856
2834
  }), o;
2857
- function s(l) {
2835
+ function l(s) {
2858
2836
  return function(f) {
2859
- return u([l, f]);
2837
+ return u([s, f]);
2860
2838
  };
2861
2839
  }
2862
- function u(l) {
2840
+ function u(s) {
2863
2841
  if (i)
2864
2842
  throw new TypeError("Generator is already executing.");
2865
- for (; o && (o = 0, l[0] && (t = 0)), t; )
2843
+ for (; o && (o = 0, s[0] && (t = 0)), t; )
2866
2844
  try {
2867
- if (i = 1, r && (a = l[0] & 2 ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done)
2868
- return a;
2869
- switch (r = 0, a && (l = [l[0] & 2, a.value]), l[0]) {
2845
+ if (i = 1, a && (r = s[0] & 2 ? a.return : s[0] ? a.throw || ((r = a.return) && r.call(a), 0) : a.next) && !(r = r.call(a, s[1])).done)
2846
+ return r;
2847
+ switch (a = 0, r && (s = [s[0] & 2, r.value]), s[0]) {
2870
2848
  case 0:
2871
2849
  case 1:
2872
- a = l;
2850
+ r = s;
2873
2851
  break;
2874
2852
  case 4:
2875
- return t.label++, { value: l[1], done: !1 };
2853
+ return t.label++, { value: s[1], done: !1 };
2876
2854
  case 5:
2877
- t.label++, r = l[1], l = [0];
2855
+ t.label++, a = s[1], s = [0];
2878
2856
  continue;
2879
2857
  case 7:
2880
- l = t.ops.pop(), t.trys.pop();
2858
+ s = t.ops.pop(), t.trys.pop();
2881
2859
  continue;
2882
2860
  default:
2883
- if (a = t.trys, !(a = a.length > 0 && a[a.length - 1]) && (l[0] === 6 || l[0] === 2)) {
2861
+ if (r = t.trys, !(r = r.length > 0 && r[r.length - 1]) && (s[0] === 6 || s[0] === 2)) {
2884
2862
  t = 0;
2885
2863
  continue;
2886
2864
  }
2887
- if (l[0] === 3 && (!a || l[1] > a[0] && l[1] < a[3])) {
2888
- t.label = l[1];
2865
+ if (s[0] === 3 && (!r || s[1] > r[0] && s[1] < r[3])) {
2866
+ t.label = s[1];
2889
2867
  break;
2890
2868
  }
2891
- if (l[0] === 6 && t.label < a[1]) {
2892
- t.label = a[1], a = l;
2869
+ if (s[0] === 6 && t.label < r[1]) {
2870
+ t.label = r[1], r = s;
2893
2871
  break;
2894
2872
  }
2895
- if (a && t.label < a[2]) {
2896
- t.label = a[2], t.ops.push(l);
2873
+ if (r && t.label < r[2]) {
2874
+ t.label = r[2], t.ops.push(s);
2897
2875
  break;
2898
2876
  }
2899
- a[2] && t.ops.pop(), t.trys.pop();
2877
+ r[2] && t.ops.pop(), t.trys.pop();
2900
2878
  continue;
2901
2879
  }
2902
- l = n.call(e, t);
2880
+ s = n.call(e, t);
2903
2881
  } catch (f) {
2904
- l = [6, f], r = 0;
2882
+ s = [6, f], a = 0;
2905
2883
  } finally {
2906
- i = a = 0;
2884
+ i = r = 0;
2907
2885
  }
2908
- if (l[0] & 5)
2909
- throw l[1];
2910
- return { value: l[0] ? l[1] : void 0, done: !0 };
2886
+ if (s[0] & 5)
2887
+ throw s[1];
2888
+ return { value: s[0] ? s[1] : void 0, done: !0 };
2911
2889
  }
2912
2890
  }
2913
- function Fe(e) {
2891
+ function Le(e) {
2914
2892
  var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], i = 0;
2915
2893
  if (t)
2916
2894
  return t.call(e);
@@ -2922,31 +2900,31 @@ function Fe(e) {
2922
2900
  };
2923
2901
  throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
2924
2902
  }
2925
- function Ft(e, n) {
2903
+ function Lt(e, n) {
2926
2904
  var t = typeof Symbol == "function" && e[Symbol.iterator];
2927
2905
  if (!t)
2928
2906
  return e;
2929
- var i = t.call(e), r, a = [], o;
2907
+ var i = t.call(e), a, r = [], o;
2930
2908
  try {
2931
- for (; (n === void 0 || n-- > 0) && !(r = i.next()).done; )
2932
- a.push(r.value);
2933
- } catch (s) {
2934
- o = { error: s };
2909
+ for (; (n === void 0 || n-- > 0) && !(a = i.next()).done; )
2910
+ r.push(a.value);
2911
+ } catch (l) {
2912
+ o = { error: l };
2935
2913
  } finally {
2936
2914
  try {
2937
- r && !r.done && (t = i.return) && t.call(i);
2915
+ a && !a.done && (t = i.return) && t.call(i);
2938
2916
  } finally {
2939
2917
  if (o)
2940
2918
  throw o.error;
2941
2919
  }
2942
2920
  }
2943
- return a;
2921
+ return r;
2944
2922
  }
2945
2923
  function Pt(e, n, t) {
2946
2924
  if (t || arguments.length === 2)
2947
- for (var i = 0, r = n.length, a; i < r; i++)
2948
- (a || !(i in n)) && (a || (a = Array.prototype.slice.call(n, 0, i)), a[i] = n[i]);
2949
- return e.concat(a || Array.prototype.slice.call(n));
2925
+ for (var i = 0, a = n.length, r; i < a; i++)
2926
+ (r || !(i in n)) && (r || (r = Array.prototype.slice.call(n, 0, i)), r[i] = n[i]);
2927
+ return e.concat(r || Array.prototype.slice.call(n));
2950
2928
  }
2951
2929
  function be(e) {
2952
2930
  return this instanceof be ? (this.v = e, this) : new be(e);
@@ -2954,54 +2932,54 @@ function be(e) {
2954
2932
  function Go(e, n, t) {
2955
2933
  if (!Symbol.asyncIterator)
2956
2934
  throw new TypeError("Symbol.asyncIterator is not defined.");
2957
- var i = t.apply(e, n || []), r, a = [];
2958
- return r = {}, o("next"), o("throw"), o("return"), r[Symbol.asyncIterator] = function() {
2935
+ var i = t.apply(e, n || []), a, r = [];
2936
+ return a = {}, o("next"), o("throw"), o("return"), a[Symbol.asyncIterator] = function() {
2959
2937
  return this;
2960
- }, r;
2938
+ }, a;
2961
2939
  function o(c) {
2962
- i[c] && (r[c] = function(h) {
2940
+ i[c] && (a[c] = function(h) {
2963
2941
  return new Promise(function(_, g) {
2964
- a.push([c, h, _, g]) > 1 || s(c, h);
2942
+ r.push([c, h, _, g]) > 1 || l(c, h);
2965
2943
  });
2966
2944
  });
2967
2945
  }
2968
- function s(c, h) {
2946
+ function l(c, h) {
2969
2947
  try {
2970
2948
  u(i[c](h));
2971
2949
  } catch (_) {
2972
- d(a[0][3], _);
2950
+ p(r[0][3], _);
2973
2951
  }
2974
2952
  }
2975
2953
  function u(c) {
2976
- c.value instanceof be ? Promise.resolve(c.value.v).then(l, f) : d(a[0][2], c);
2954
+ c.value instanceof be ? Promise.resolve(c.value.v).then(s, f) : p(r[0][2], c);
2977
2955
  }
2978
- function l(c) {
2979
- s("next", c);
2956
+ function s(c) {
2957
+ l("next", c);
2980
2958
  }
2981
2959
  function f(c) {
2982
- s("throw", c);
2960
+ l("throw", c);
2983
2961
  }
2984
- function d(c, h) {
2985
- c(h), a.shift(), a.length && s(a[0][0], a[0][1]);
2962
+ function p(c, h) {
2963
+ c(h), r.shift(), r.length && l(r[0][0], r[0][1]);
2986
2964
  }
2987
2965
  }
2988
2966
  function Yo(e) {
2989
2967
  if (!Symbol.asyncIterator)
2990
2968
  throw new TypeError("Symbol.asyncIterator is not defined.");
2991
2969
  var n = e[Symbol.asyncIterator], t;
2992
- return n ? n.call(e) : (e = typeof Fe == "function" ? Fe(e) : e[Symbol.iterator](), t = {}, i("next"), i("throw"), i("return"), t[Symbol.asyncIterator] = function() {
2970
+ return n ? n.call(e) : (e = typeof Le == "function" ? Le(e) : e[Symbol.iterator](), t = {}, i("next"), i("throw"), i("return"), t[Symbol.asyncIterator] = function() {
2993
2971
  return this;
2994
2972
  }, t);
2995
- function i(a) {
2996
- t[a] = e[a] && function(o) {
2997
- return new Promise(function(s, u) {
2998
- o = e[a](o), r(s, u, o.done, o.value);
2973
+ function i(r) {
2974
+ t[r] = e[r] && function(o) {
2975
+ return new Promise(function(l, u) {
2976
+ o = e[r](o), a(l, u, o.done, o.value);
2999
2977
  });
3000
2978
  };
3001
2979
  }
3002
- function r(a, o, s, u) {
3003
- Promise.resolve(u).then(function(l) {
3004
- a({ value: l, done: s });
2980
+ function a(r, o, l, u) {
2981
+ Promise.resolve(u).then(function(s) {
2982
+ r({ value: s, done: l });
3005
2983
  }, o);
3006
2984
  }
3007
2985
  }
@@ -3017,8 +2995,8 @@ function Oi(e) {
3017
2995
  var St = Oi(function(e) {
3018
2996
  return function(t) {
3019
2997
  e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
3020
- ` + t.map(function(i, r) {
3021
- return r + 1 + ") " + i.toString();
2998
+ ` + t.map(function(i, a) {
2999
+ return a + 1 + ") " + i.toString();
3022
3000
  }).join(`
3023
3001
  `) : "", this.name = "UnsubscriptionError", this.errors = t;
3024
3002
  };
@@ -3034,22 +3012,22 @@ var Wt = function() {
3034
3012
  this.initialTeardown = n, this.closed = !1, this._parentage = null, this._finalizers = null;
3035
3013
  }
3036
3014
  return e.prototype.unsubscribe = function() {
3037
- var n, t, i, r, a;
3015
+ var n, t, i, a, r;
3038
3016
  if (!this.closed) {
3039
3017
  this.closed = !0;
3040
3018
  var o = this._parentage;
3041
3019
  if (o)
3042
3020
  if (this._parentage = null, Array.isArray(o))
3043
3021
  try {
3044
- for (var s = Fe(o), u = s.next(); !u.done; u = s.next()) {
3045
- var l = u.value;
3046
- l.remove(this);
3022
+ for (var l = Le(o), u = l.next(); !u.done; u = l.next()) {
3023
+ var s = u.value;
3024
+ s.remove(this);
3047
3025
  }
3048
3026
  } catch (g) {
3049
3027
  n = { error: g };
3050
3028
  } finally {
3051
3029
  try {
3052
- u && !u.done && (t = s.return) && t.call(s);
3030
+ u && !u.done && (t = l.return) && t.call(l);
3053
3031
  } finally {
3054
3032
  if (n)
3055
3033
  throw n.error;
@@ -3062,33 +3040,33 @@ var Wt = function() {
3062
3040
  try {
3063
3041
  f();
3064
3042
  } catch (g) {
3065
- a = g instanceof St ? g.errors : [g];
3043
+ r = g instanceof St ? g.errors : [g];
3066
3044
  }
3067
- var d = this._finalizers;
3068
- if (d) {
3045
+ var p = this._finalizers;
3046
+ if (p) {
3069
3047
  this._finalizers = null;
3070
3048
  try {
3071
- for (var c = Fe(d), h = c.next(); !h.done; h = c.next()) {
3049
+ for (var c = Le(p), h = c.next(); !h.done; h = c.next()) {
3072
3050
  var _ = h.value;
3073
3051
  try {
3074
3052
  Zn(_);
3075
3053
  } catch (g) {
3076
- a = a ?? [], g instanceof St ? a = Pt(Pt([], Ft(a)), Ft(g.errors)) : a.push(g);
3054
+ r = r ?? [], g instanceof St ? r = Pt(Pt([], Lt(r)), Lt(g.errors)) : r.push(g);
3077
3055
  }
3078
3056
  }
3079
3057
  } catch (g) {
3080
3058
  i = { error: g };
3081
3059
  } finally {
3082
3060
  try {
3083
- h && !h.done && (r = c.return) && r.call(c);
3061
+ h && !h.done && (a = c.return) && a.call(c);
3084
3062
  } finally {
3085
3063
  if (i)
3086
3064
  throw i.error;
3087
3065
  }
3088
3066
  }
3089
3067
  }
3090
- if (a)
3091
- throw new St(a);
3068
+ if (r)
3069
+ throw new St(r);
3092
3070
  }
3093
3071
  }, e.prototype.add = function(n) {
3094
3072
  var t;
@@ -3137,7 +3115,7 @@ var Ri = {
3137
3115
  setTimeout: function(e, n) {
3138
3116
  for (var t = [], i = 2; i < arguments.length; i++)
3139
3117
  t[i - 2] = arguments[i];
3140
- return setTimeout.apply(void 0, Pt([e, n], Ft(t)));
3118
+ return setTimeout.apply(void 0, Pt([e, n], Lt(t)));
3141
3119
  },
3142
3120
  clearTimeout: function(e) {
3143
3121
  var n = Bi.delegate;
@@ -3161,8 +3139,8 @@ var Xt = function(e) {
3161
3139
  var i = e.call(this) || this;
3162
3140
  return i.isStopped = !1, t ? (i.destination = t, zi(t) && t.add(i)) : i.destination = Jo, i;
3163
3141
  }
3164
- return n.create = function(t, i, r) {
3165
- return new ot(t, i, r);
3142
+ return n.create = function(t, i, a) {
3143
+ return new ot(t, i, a);
3166
3144
  }, n.prototype.next = function(t) {
3167
3145
  this.isStopped || this._next(t);
3168
3146
  }, n.prototype.error = function(t) {
@@ -3223,25 +3201,25 @@ var Xo = function() {
3223
3201
  }, e;
3224
3202
  }(), ot = function(e) {
3225
3203
  Kt(n, e);
3226
- function n(t, i, r) {
3227
- var a = e.call(this) || this, o;
3204
+ function n(t, i, a) {
3205
+ var r = e.call(this) || this, o;
3228
3206
  if (z(t) || !t)
3229
3207
  o = {
3230
3208
  next: t ?? void 0,
3231
3209
  error: i ?? void 0,
3232
- complete: r ?? void 0
3210
+ complete: a ?? void 0
3233
3211
  };
3234
3212
  else {
3235
- var s;
3236
- a && Ri.useDeprecatedNextContext ? (s = Object.create(t), s.unsubscribe = function() {
3237
- return a.unsubscribe();
3213
+ var l;
3214
+ r && Ri.useDeprecatedNextContext ? (l = Object.create(t), l.unsubscribe = function() {
3215
+ return r.unsubscribe();
3238
3216
  }, o = {
3239
- next: t.next && Nt(t.next, s),
3240
- error: t.error && Nt(t.error, s),
3241
- complete: t.complete && Nt(t.complete, s)
3217
+ next: t.next && Nt(t.next, l),
3218
+ error: t.error && Nt(t.error, l),
3219
+ complete: t.complete && Nt(t.complete, l)
3242
3220
  }) : o = t;
3243
3221
  }
3244
- return a.destination = new Xo(o), a;
3222
+ return r.destination = new Xo(o), r;
3245
3223
  }
3246
3224
  return n;
3247
3225
  }(Xt);
@@ -3264,8 +3242,8 @@ function Di(e) {
3264
3242
  }
3265
3243
  function Qo(e) {
3266
3244
  return e.length === 0 ? Di : e.length === 1 ? e[0] : function(t) {
3267
- return e.reduce(function(i, r) {
3268
- return r(i);
3245
+ return e.reduce(function(i, a) {
3246
+ return a(i);
3269
3247
  }, t);
3270
3248
  };
3271
3249
  }
@@ -3277,11 +3255,11 @@ var Z = function() {
3277
3255
  var t = new e();
3278
3256
  return t.source = this, t.operator = n, t;
3279
3257
  }, e.prototype.subscribe = function(n, t, i) {
3280
- var r = this, a = ts(n) ? n : new ot(n, t, i);
3258
+ var a = this, r = ts(n) ? n : new ot(n, t, i);
3281
3259
  return Ko(function() {
3282
- var o = r, s = o.operator, u = o.source;
3283
- a.add(s ? s.call(a, u) : u ? r._subscribe(a) : r._trySubscribe(a));
3284
- }), a;
3260
+ var o = a, l = o.operator, u = o.source;
3261
+ r.add(l ? l.call(r, u) : u ? a._subscribe(r) : a._trySubscribe(r));
3262
+ }), r;
3285
3263
  }, e.prototype._trySubscribe = function(n) {
3286
3264
  try {
3287
3265
  return this._subscribe(n);
@@ -3290,17 +3268,17 @@ var Z = function() {
3290
3268
  }
3291
3269
  }, e.prototype.forEach = function(n, t) {
3292
3270
  var i = this;
3293
- return t = Mn(t), new t(function(r, a) {
3271
+ return t = Mn(t), new t(function(a, r) {
3294
3272
  var o = new ot({
3295
- next: function(s) {
3273
+ next: function(l) {
3296
3274
  try {
3297
- n(s);
3275
+ n(l);
3298
3276
  } catch (u) {
3299
- a(u), o.unsubscribe();
3277
+ r(u), o.unsubscribe();
3300
3278
  }
3301
3279
  },
3302
- error: a,
3303
- complete: r
3280
+ error: r,
3281
+ complete: a
3304
3282
  });
3305
3283
  i.subscribe(o);
3306
3284
  });
@@ -3315,14 +3293,14 @@ var Z = function() {
3315
3293
  return Qo(n)(this);
3316
3294
  }, e.prototype.toPromise = function(n) {
3317
3295
  var t = this;
3318
- return n = Mn(n), new n(function(i, r) {
3319
- var a;
3296
+ return n = Mn(n), new n(function(i, a) {
3297
+ var r;
3320
3298
  t.subscribe(function(o) {
3321
- return a = o;
3299
+ return r = o;
3322
3300
  }, function(o) {
3323
- return r(o);
3301
+ return a(o);
3324
3302
  }, function() {
3325
- return i(a);
3303
+ return i(r);
3326
3304
  });
3327
3305
  });
3328
3306
  }, e.create = function(n) {
@@ -3355,32 +3333,32 @@ function $e(e) {
3355
3333
  throw new TypeError("Unable to lift unknown Observable type");
3356
3334
  };
3357
3335
  }
3358
- function Pe(e, n, t, i, r) {
3359
- return new is(e, n, t, i, r);
3336
+ function Pe(e, n, t, i, a) {
3337
+ return new is(e, n, t, i, a);
3360
3338
  }
3361
3339
  var is = function(e) {
3362
3340
  Kt(n, e);
3363
- function n(t, i, r, a, o, s) {
3341
+ function n(t, i, a, r, o, l) {
3364
3342
  var u = e.call(this, t) || this;
3365
- return u.onFinalize = o, u.shouldUnsubscribe = s, u._next = i ? function(l) {
3343
+ return u.onFinalize = o, u.shouldUnsubscribe = l, u._next = i ? function(s) {
3366
3344
  try {
3367
- i(l);
3345
+ i(s);
3368
3346
  } catch (f) {
3369
3347
  t.error(f);
3370
3348
  }
3371
- } : e.prototype._next, u._error = a ? function(l) {
3349
+ } : e.prototype._next, u._error = r ? function(s) {
3372
3350
  try {
3373
- a(l);
3351
+ r(s);
3374
3352
  } catch (f) {
3375
3353
  t.error(f);
3376
3354
  } finally {
3377
3355
  this.unsubscribe();
3378
3356
  }
3379
- } : e.prototype._error, u._complete = r ? function() {
3357
+ } : e.prototype._error, u._complete = a ? function() {
3380
3358
  try {
3381
- r();
3382
- } catch (l) {
3383
- t.error(l);
3359
+ a();
3360
+ } catch (s) {
3361
+ t.error(s);
3384
3362
  } finally {
3385
3363
  this.unsubscribe();
3386
3364
  }
@@ -3408,10 +3386,10 @@ function os(e) {
3408
3386
  function ss(e, n) {
3409
3387
  return typeof Vi(e) == "number" ? e.pop() : n;
3410
3388
  }
3411
- var Li = function(e) {
3389
+ var Fi = function(e) {
3412
3390
  return e && typeof e.length == "number" && typeof e != "function";
3413
3391
  };
3414
- function Fi(e) {
3392
+ function Li(e) {
3415
3393
  return z(e == null ? void 0 : e.then);
3416
3394
  }
3417
3395
  function Pi(e) {
@@ -3432,7 +3410,7 @@ function Hi(e) {
3432
3410
  }
3433
3411
  function ji(e) {
3434
3412
  return Go(this, arguments, function() {
3435
- var t, i, r, a;
3413
+ var t, i, a, r;
3436
3414
  return Ai(this, function(o) {
3437
3415
  switch (o.label) {
3438
3416
  case 0:
@@ -3442,11 +3420,11 @@ function ji(e) {
3442
3420
  case 2:
3443
3421
  return [4, be(t.read())];
3444
3422
  case 3:
3445
- return i = o.sent(), r = i.value, a = i.done, a ? [4, be(void 0)] : [3, 5];
3423
+ return i = o.sent(), a = i.value, r = i.done, r ? [4, be(void 0)] : [3, 5];
3446
3424
  case 4:
3447
3425
  return [2, o.sent()];
3448
3426
  case 5:
3449
- return [4, be(r)];
3427
+ return [4, be(a)];
3450
3428
  case 6:
3451
3429
  return [4, o.sent()];
3452
3430
  case 7:
@@ -3470,9 +3448,9 @@ function Ee(e) {
3470
3448
  if (e != null) {
3471
3449
  if (Pi(e))
3472
3450
  return fs(e);
3473
- if (Li(e))
3474
- return us(e);
3475
3451
  if (Fi(e))
3452
+ return us(e);
3453
+ if (Li(e))
3476
3454
  return hs(e);
3477
3455
  if (Zi(e))
3478
3456
  return Yi(e);
@@ -3511,16 +3489,16 @@ function cs(e) {
3511
3489
  return new Z(function(n) {
3512
3490
  var t, i;
3513
3491
  try {
3514
- for (var r = Fe(e), a = r.next(); !a.done; a = r.next()) {
3515
- var o = a.value;
3492
+ for (var a = Le(e), r = a.next(); !r.done; r = a.next()) {
3493
+ var o = r.value;
3516
3494
  if (n.next(o), n.closed)
3517
3495
  return;
3518
3496
  }
3519
- } catch (s) {
3520
- t = { error: s };
3497
+ } catch (l) {
3498
+ t = { error: l };
3521
3499
  } finally {
3522
3500
  try {
3523
- a && !a.done && (i = r.return) && i.call(r);
3501
+ r && !r.done && (i = a.return) && i.call(a);
3524
3502
  } finally {
3525
3503
  if (t)
3526
3504
  throw t.error;
@@ -3540,9 +3518,9 @@ function ds(e) {
3540
3518
  return Yi(ji(e));
3541
3519
  }
3542
3520
  function ps(e, n) {
3543
- var t, i, r, a;
3521
+ var t, i, a, r;
3544
3522
  return jo(this, void 0, void 0, function() {
3545
- var o, s;
3523
+ var o, l;
3546
3524
  return Ai(this, function(u) {
3547
3525
  switch (u.label) {
3548
3526
  case 0:
@@ -3560,16 +3538,16 @@ function ps(e, n) {
3560
3538
  case 4:
3561
3539
  return [3, 11];
3562
3540
  case 5:
3563
- return s = u.sent(), r = { error: s }, [3, 11];
3541
+ return l = u.sent(), a = { error: l }, [3, 11];
3564
3542
  case 6:
3565
- return u.trys.push([6, , 9, 10]), i && !i.done && (a = t.return) ? [4, a.call(t)] : [3, 8];
3543
+ return u.trys.push([6, , 9, 10]), i && !i.done && (r = t.return) ? [4, r.call(t)] : [3, 8];
3566
3544
  case 7:
3567
3545
  u.sent(), u.label = 8;
3568
3546
  case 8:
3569
3547
  return [3, 10];
3570
3548
  case 9:
3571
- if (r)
3572
- throw r.error;
3549
+ if (a)
3550
+ throw a.error;
3573
3551
  return [7];
3574
3552
  case 10:
3575
3553
  return [7];
@@ -3579,27 +3557,27 @@ function ps(e, n) {
3579
3557
  });
3580
3558
  });
3581
3559
  }
3582
- function re(e, n, t, i, r) {
3583
- i === void 0 && (i = 0), r === void 0 && (r = !1);
3584
- var a = n.schedule(function() {
3585
- t(), r ? e.add(this.schedule(null, i)) : this.unsubscribe();
3560
+ function le(e, n, t, i, a) {
3561
+ i === void 0 && (i = 0), a === void 0 && (a = !1);
3562
+ var r = n.schedule(function() {
3563
+ t(), a ? e.add(this.schedule(null, i)) : this.unsubscribe();
3586
3564
  }, i);
3587
- if (e.add(a), !r)
3588
- return a;
3565
+ if (e.add(r), !a)
3566
+ return r;
3589
3567
  }
3590
3568
  function Ki(e, n) {
3591
3569
  return n === void 0 && (n = 0), $e(function(t, i) {
3592
- t.subscribe(Pe(i, function(r) {
3593
- return re(i, e, function() {
3594
- return i.next(r);
3570
+ t.subscribe(Pe(i, function(a) {
3571
+ return le(i, e, function() {
3572
+ return i.next(a);
3595
3573
  }, n);
3596
3574
  }, function() {
3597
- return re(i, e, function() {
3575
+ return le(i, e, function() {
3598
3576
  return i.complete();
3599
3577
  }, n);
3600
- }, function(r) {
3601
- return re(i, e, function() {
3602
- return i.error(r);
3578
+ }, function(a) {
3579
+ return le(i, e, function() {
3580
+ return i.error(a);
3603
3581
  }, n);
3604
3582
  }));
3605
3583
  });
@@ -3628,16 +3606,16 @@ function gs(e, n) {
3628
3606
  function ws(e, n) {
3629
3607
  return new Z(function(t) {
3630
3608
  var i;
3631
- return re(t, n, function() {
3632
- i = e[Mi](), re(t, n, function() {
3633
- var r, a, o;
3609
+ return le(t, n, function() {
3610
+ i = e[Mi](), le(t, n, function() {
3611
+ var a, r, o;
3634
3612
  try {
3635
- r = i.next(), a = r.value, o = r.done;
3636
- } catch (s) {
3637
- t.error(s);
3613
+ a = i.next(), r = a.value, o = a.done;
3614
+ } catch (l) {
3615
+ t.error(l);
3638
3616
  return;
3639
3617
  }
3640
- o ? t.complete() : t.next(a);
3618
+ o ? t.complete() : t.next(r);
3641
3619
  }, 0, !0);
3642
3620
  }), function() {
3643
3621
  return z(i == null ? void 0 : i.return) && i.return();
@@ -3648,11 +3626,11 @@ function Xi(e, n) {
3648
3626
  if (!e)
3649
3627
  throw new Error("Iterable cannot be null");
3650
3628
  return new Z(function(t) {
3651
- re(t, n, function() {
3629
+ le(t, n, function() {
3652
3630
  var i = e[Symbol.asyncIterator]();
3653
- re(t, n, function() {
3654
- i.next().then(function(r) {
3655
- r.done ? t.complete() : t.next(r.value);
3631
+ le(t, n, function() {
3632
+ i.next().then(function(a) {
3633
+ a.done ? t.complete() : t.next(a.value);
3656
3634
  });
3657
3635
  }, 0, !0);
3658
3636
  });
@@ -3665,9 +3643,9 @@ function ys(e, n) {
3665
3643
  if (e != null) {
3666
3644
  if (Pi(e))
3667
3645
  return _s(e, n);
3668
- if (Li(e))
3669
- return gs(e, n);
3670
3646
  if (Fi(e))
3647
+ return gs(e, n);
3648
+ if (Li(e))
3671
3649
  return bs(e, n);
3672
3650
  if (Zi(e))
3673
3651
  return Xi(e, n);
@@ -3687,15 +3665,14 @@ var ks = Oi(function(e) {
3687
3665
  };
3688
3666
  });
3689
3667
  function qi(e, n) {
3690
- var t = typeof n == "object";
3691
- return new Promise(function(i, r) {
3668
+ return new Promise(function(t, i) {
3692
3669
  var a = new ot({
3693
- next: function(o) {
3694
- i(o), a.unsubscribe();
3670
+ next: function(r) {
3671
+ t(r), a.unsubscribe();
3695
3672
  },
3696
- error: r,
3673
+ error: i,
3697
3674
  complete: function() {
3698
- t ? i(n.defaultValue) : r(new ks());
3675
+ i(new ks());
3699
3676
  }
3700
3677
  });
3701
3678
  e.subscribe(a);
@@ -3703,35 +3680,33 @@ function qi(e, n) {
3703
3680
  }
3704
3681
  function Ji(e, n) {
3705
3682
  return $e(function(t, i) {
3706
- var r = 0;
3707
- t.subscribe(Pe(i, function(a) {
3708
- i.next(e.call(n, a, r++));
3683
+ var a = 0;
3684
+ t.subscribe(Pe(i, function(r) {
3685
+ i.next(e.call(n, r, a++));
3709
3686
  }));
3710
3687
  });
3711
3688
  }
3712
- function $s(e, n, t, i, r, a, o, s) {
3713
- var u = [], l = 0, f = 0, d = !1, c = function() {
3714
- d && !u.length && !l && n.complete();
3689
+ function $s(e, n, t, i, a, r, o, l) {
3690
+ var u = [], s = 0, f = 0, p = !1, c = function() {
3691
+ p && !u.length && !s && n.complete();
3715
3692
  }, h = function(g) {
3716
- return l < i ? _(g) : u.push(g);
3693
+ return s < i ? _(g) : u.push(g);
3717
3694
  }, _ = function(g) {
3718
- a && n.next(g), l++;
3695
+ s++;
3719
3696
  var k = !1;
3720
- Ee(t(g, f++)).subscribe(Pe(n, function(y) {
3721
- r == null || r(y), a ? h(y) : n.next(y);
3697
+ Ee(t(g, f++)).subscribe(Pe(n, function(v) {
3698
+ n.next(v);
3722
3699
  }, function() {
3723
3700
  k = !0;
3724
3701
  }, void 0, function() {
3725
3702
  if (k)
3726
3703
  try {
3727
- l--;
3728
- for (var y = function() {
3704
+ s--;
3705
+ for (var v = function() {
3729
3706
  var E = u.shift();
3730
- o ? re(n, o, function() {
3731
- return _(E);
3732
- }) : _(E);
3733
- }; u.length && l < i; )
3734
- y();
3707
+ o || _(E);
3708
+ }; u.length && s < i; )
3709
+ v();
3735
3710
  c();
3736
3711
  } catch (E) {
3737
3712
  n.error(E);
@@ -3739,18 +3714,17 @@ function $s(e, n, t, i, r, a, o, s) {
3739
3714
  }));
3740
3715
  };
3741
3716
  return e.subscribe(Pe(n, h, function() {
3742
- d = !0, c();
3717
+ p = !0, c();
3743
3718
  })), function() {
3744
- s == null || s();
3745
3719
  };
3746
3720
  }
3747
3721
  function Qi(e, n, t) {
3748
- return t === void 0 && (t = 1 / 0), z(n) ? Qi(function(i, r) {
3749
- return Ji(function(a, o) {
3750
- return n(i, a, r, o);
3751
- })(Ee(e(i, r)));
3752
- }, t) : (typeof n == "number" && (t = n), $e(function(i, r) {
3753
- return $s(i, r, e, t);
3722
+ return t === void 0 && (t = 1 / 0), z(n) ? Qi(function(i, a) {
3723
+ return Ji(function(r, o) {
3724
+ return n(i, r, a, o);
3725
+ })(Ee(e(i, a)));
3726
+ }, t) : (typeof n == "number" && (t = n), $e(function(i, a) {
3727
+ return $s(i, a, e, t);
3754
3728
  }));
3755
3729
  }
3756
3730
  function Es(e) {
@@ -3759,17 +3733,17 @@ function Es(e) {
3759
3733
  function Cs() {
3760
3734
  for (var e = [], n = 0; n < arguments.length; n++)
3761
3735
  e[n] = arguments[n];
3762
- var t = os(e), i = ss(e, 1 / 0), r = e;
3763
- return r.length ? r.length === 1 ? Ee(r[0]) : Es(i)(vs(r, t)) : rs;
3764
- }
3765
- function Ss(e, n, t, i, r) {
3766
- return function(a, o) {
3767
- var s = t, u = n, l = 0;
3768
- a.subscribe(Pe(o, function(f) {
3769
- var d = l++;
3770
- u = s ? e(u, f, d) : (s = !0, f), i && o.next(u);
3771
- }, r && function() {
3772
- s && o.next(u), o.complete();
3736
+ var t = os(e), i = ss(e, 1 / 0), a = e;
3737
+ return a.length ? a.length === 1 ? Ee(a[0]) : Es(i)(vs(a, t)) : rs;
3738
+ }
3739
+ function Ss(e, n, t, i, a) {
3740
+ return function(r, o) {
3741
+ var l = t, u = n, s = 0;
3742
+ r.subscribe(Pe(o, function(f) {
3743
+ var p = s++;
3744
+ u = l ? e(u, f, p) : (l = !0, f);
3745
+ }, function() {
3746
+ l && o.next(u), o.complete();
3773
3747
  }));
3774
3748
  };
3775
3749
  }
@@ -3792,12 +3766,12 @@ function jn(e) {
3792
3766
  const n = e ? "big" : "little", t = new N().endianess(n).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels", {
3793
3767
  length: "numZoomLevels",
3794
3768
  type: new N().endianess(n).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")
3795
- }), i = new N().endianess(n).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"), r = new N().endianess(n).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"), a = new N().endianess(n).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");
3769
+ }), i = new N().endianess(n).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"), a = new N().endianess(n).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"), r = new N().endianess(n).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");
3796
3770
  return {
3797
- chromTreeParser: r,
3771
+ chromTreeParser: a,
3798
3772
  totalSummaryParser: i,
3799
3773
  headerParser: t,
3800
- isLeafNode: a
3774
+ isLeafNode: r
3801
3775
  };
3802
3776
  }
3803
3777
  class tr {
@@ -3821,13 +3795,13 @@ class tr {
3821
3795
  * sequences using a mapping function
3822
3796
  */
3823
3797
  constructor(n) {
3824
- const { filehandle: t, renameRefSeqs: i = (o) => o, path: r, url: a } = n;
3798
+ const { filehandle: t, renameRefSeqs: i = (o) => o, path: a, url: r } = n;
3825
3799
  if (this.renameRefSeqs = i, t)
3826
3800
  this.bbi = t;
3827
- else if (a)
3828
- this.bbi = new ir(a);
3829
3801
  else if (r)
3830
- this.bbi = new nr(r);
3802
+ this.bbi = new ir(r);
3803
+ else if (a)
3804
+ this.bbi = new nr(a);
3831
3805
  else
3832
3806
  throw new Error("no file given");
3833
3807
  }
@@ -3836,8 +3810,8 @@ class tr {
3836
3810
  return { ...t, ...i };
3837
3811
  }
3838
3812
  async _getMainHeader(n, t = 2e3) {
3839
- const { buffer: i } = await this.bbi.read(Q.Buffer.alloc(t), 0, t, 0, n), r = this._isBigEndian(i), a = jn(r), o = a.headerParser.parse(i), { magic: s, asOffset: u, totalSummaryOffset: l } = o;
3840
- if (o.fileType = s === It ? "bigbed" : "bigwig", u > t || l > t)
3813
+ const { buffer: i } = await this.bbi.read(J.Buffer.alloc(t), 0, t, 0, n), a = this._isBigEndian(i), r = jn(a), o = r.headerParser.parse(i), { magic: l, asOffset: u, totalSummaryOffset: s } = o;
3814
+ if (o.fileType = l === It ? "bigbed" : "bigwig", u > t || s > t)
3841
3815
  return this._getMainHeader(n, t * 2);
3842
3816
  if (u) {
3843
3817
  const f = Number(o.asOffset);
@@ -3846,10 +3820,10 @@ class tr {
3846
3820
  if (o.totalSummaryOffset > t - 8 * 5)
3847
3821
  return this._getMainHeader(n, t * 2);
3848
3822
  if (o.totalSummaryOffset) {
3849
- const f = i.subarray(Number(o.totalSummaryOffset)), d = a.totalSummaryParser.parse(f);
3850
- o.totalSummary = { ...d, basesCovered: Number(d.basesCovered) };
3823
+ const f = i.subarray(Number(o.totalSummaryOffset)), p = r.totalSummaryParser.parse(f);
3824
+ o.totalSummary = { ...p, basesCovered: Number(p.basesCovered) };
3851
3825
  }
3852
- return { ...o, isBigEndian: r };
3826
+ return { ...o, isBigEndian: a };
3853
3827
  }
3854
3828
  _isBigEndian(n) {
3855
3829
  let t = n.readInt32LE(0);
@@ -3861,22 +3835,22 @@ class tr {
3861
3835
  }
3862
3836
  // todo: add progress if long running
3863
3837
  async _readChromTree(n, t) {
3864
- const i = n.isBigEndian, r = i ? "big" : "little", a = [], o = {};
3865
- let s = Number(n.unzoomedDataOffset);
3838
+ const i = n.isBigEndian, a = i ? "big" : "little", r = [], o = {};
3839
+ let l = Number(n.unzoomedDataOffset);
3866
3840
  const u = Number(n.chromTreeOffset);
3867
- for (; s % 4 !== 0; )
3868
- s += 1;
3869
- const l = s - u, { buffer: f } = await this.bbi.read(Q.Buffer.alloc(l), 0, l, Number(u), t), d = jn(i), { keySize: c } = d.chromTreeParser.parse(f), h = new N().endianess(r).string("key", { stripNull: !0, length: c }).uint32("refId").uint32("refSize").saveOffset("offset"), _ = new N().endianess(r).skip(c).uint64("childOffset").saveOffset("offset"), g = 32, k = async (y) => {
3870
- let E = y;
3841
+ for (; l % 4 !== 0; )
3842
+ l += 1;
3843
+ const s = l - u, { buffer: f } = await this.bbi.read(J.Buffer.alloc(s), 0, s, Number(u), t), p = jn(i), { keySize: c } = p.chromTreeParser.parse(f), h = new N().endianess(a).string("key", { stripNull: !0, length: c }).uint32("refId").uint32("refSize").saveOffset("offset"), _ = new N().endianess(a).skip(c).uint64("childOffset").saveOffset("offset"), g = 32, k = async (v) => {
3844
+ let E = v;
3871
3845
  if (E >= f.length)
3872
3846
  throw new Error("reading beyond end of buffer");
3873
- const C = d.isLeafNode.parse(f.subarray(E)), { isLeafNode: p, cnt: $ } = C;
3874
- if (E += C.offset, p)
3847
+ const C = p.isLeafNode.parse(f.subarray(E)), { isLeafNode: d, cnt: $ } = C;
3848
+ if (E += C.offset, d)
3875
3849
  for (let S = 0; S < $; S += 1) {
3876
3850
  const b = h.parse(f.subarray(E));
3877
3851
  E += b.offset;
3878
- const { key: w, refId: m, refSize: v } = b, I = { name: w, id: m, length: v };
3879
- o[this.renameRefSeqs(w)] = m, a[m] = I;
3852
+ const { key: w, refId: m, refSize: y } = b, I = { name: w, id: m, length: y };
3853
+ o[this.renameRefSeqs(w)] = m, r[m] = I;
3880
3854
  }
3881
3855
  else {
3882
3856
  const S = [];
@@ -3889,7 +3863,7 @@ class tr {
3889
3863
  };
3890
3864
  return await k(g), {
3891
3865
  refsByName: o,
3892
- refsByNumber: a
3866
+ refsByNumber: r
3893
3867
  };
3894
3868
  }
3895
3869
  /*
@@ -3897,8 +3871,8 @@ class tr {
3897
3871
  * @param abortSignal - a signal to optionally abort this operation
3898
3872
  */
3899
3873
  async getUnzoomedView(n) {
3900
- const { unzoomedIndexOffset: t, refsByName: i, uncompressBufSize: r, isBigEndian: a, fileType: o } = await this.getHeader(n);
3901
- return new Ti(this.bbi, i, t, a, r > 0, o);
3874
+ const { unzoomedIndexOffset: t, refsByName: i, uncompressBufSize: a, isBigEndian: r, fileType: o } = await this.getHeader(n);
3875
+ return new Ti(this.bbi, i, t, r, a > 0, o);
3902
3876
  }
3903
3877
  /**
3904
3878
  * Gets features from a BigWig file
@@ -3908,18 +3882,18 @@ class tr {
3908
3882
  * @param end - The end of a region
3909
3883
  * @param opts - An object containing basesPerSpan (e.g. pixels per basepair) or scale used to infer the zoomLevel to use
3910
3884
  */
3911
- async getFeatureStream(n, t, i, r) {
3912
- await this.getHeader(r);
3913
- const a = this.renameRefSeqs(n);
3885
+ async getFeatureStream(n, t, i, a) {
3886
+ await this.getHeader(a);
3887
+ const r = this.renameRefSeqs(n);
3914
3888
  let o;
3915
- const { basesPerSpan: s, scale: u } = r || {};
3916
- return s ? o = await this.getView(1 / s, r) : u ? o = await this.getView(u, r) : o = await this.getView(1, r), new Z((l) => {
3917
- o.readWigData(a, t, i, l, r);
3889
+ const { basesPerSpan: l, scale: u } = a || {};
3890
+ return l ? o = await this.getView(1 / l, a) : u ? o = await this.getView(u, a) : o = await this.getView(1, a), new Z((s) => {
3891
+ o.readWigData(r, t, i, s, a);
3918
3892
  });
3919
3893
  }
3920
- async getFeatures(n, t, i, r) {
3921
- const a = await this.getFeatureStream(n, t, i, r);
3922
- return (await qi(a.pipe(Is()))).flat();
3894
+ async getFeatures(n, t, i, a) {
3895
+ const r = await this.getFeatureStream(n, t, i, a);
3896
+ return (await qi(r.pipe(Is()))).flat();
3923
3897
  }
3924
3898
  }
3925
3899
  class Fs extends tr {
@@ -3930,14 +3904,14 @@ class Fs extends tr {
3930
3904
  * @param opts - An object containing basesPerSpan (e.g. pixels per basepair) or scale used to infer the zoomLevel to use
3931
3905
  */
3932
3906
  async getView(n, t) {
3933
- const { zoomLevels: i, refsByName: r, fileSize: a, isBigEndian: o, uncompressBufSize: s } = await this.getHeader(t), u = 1 / n;
3934
- let l = i.length;
3935
- a || (l -= 1);
3936
- for (let f = l; f >= 0; f -= 1) {
3937
- const d = i[f];
3938
- if (d && d.reductionLevel <= 2 * u) {
3939
- const c = Number(d.indexOffset);
3940
- return new Ti(this.bbi, r, c, o, s > 0, "summary");
3907
+ const { zoomLevels: i, refsByName: a, fileSize: r, isBigEndian: o, uncompressBufSize: l } = await this.getHeader(t), u = 1 / n;
3908
+ let s = i.length;
3909
+ r || (s -= 1);
3910
+ for (let f = s; f >= 0; f -= 1) {
3911
+ const p = i[f];
3912
+ if (p && p.reductionLevel <= 2 * u) {
3913
+ const c = Number(p.indexOffset);
3914
+ return new Ti(this.bbi, a, c, o, l > 0, "summary");
3941
3915
  }
3942
3916
  }
3943
3917
  return this.getUnzoomedView(t);
@@ -3946,7 +3920,7 @@ class Fs extends tr {
3946
3920
  function As(e) {
3947
3921
  return e.filter((n) => !!n);
3948
3922
  }
3949
- class Ps extends tr {
3923
+ class Ls extends tr {
3950
3924
  constructor() {
3951
3925
  super(...arguments), this.readIndicesCache = new Gn({
3952
3926
  cache: new Yn({ maxSize: 1 }),
@@ -3969,12 +3943,12 @@ class Ps extends tr {
3969
3943
  * @return a Promise for an array of Index data structure since there can be multiple extraIndexes in a bigbed, see bedToBigBed documentation
3970
3944
  */
3971
3945
  async _readIndices(n) {
3972
- const { extHeaderOffset: t, isBigEndian: i } = await this.getHeader(n), { buffer: r } = await this.bbi.read(Q.Buffer.alloc(64), 0, 64, Number(t)), a = i ? "big" : "little", o = new N().endianess(a).uint16("size").uint16("count").uint64("offset").parse(r), { count: s, offset: u } = o;
3973
- if (s === 0)
3946
+ const { extHeaderOffset: t, isBigEndian: i } = await this.getHeader(n), { buffer: a } = await this.bbi.read(J.Buffer.alloc(64), 0, 64, Number(t)), r = i ? "big" : "little", o = new N().endianess(r).uint16("size").uint16("count").uint64("offset").parse(a), { count: l, offset: u } = o;
3947
+ if (l === 0)
3974
3948
  return [];
3975
- const l = 20, f = l * s, { buffer: d } = await this.bbi.read(Q.Buffer.alloc(f), 0, f, Number(u)), c = new N().endianess(a).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"), h = [];
3976
- for (let _ = 0; _ < s; _ += 1)
3977
- h.push(c.parse(d.subarray(_ * l)));
3949
+ const s = 20, f = s * l, { buffer: p } = await this.bbi.read(J.Buffer.alloc(f), 0, f, Number(u)), c = new N().endianess(r).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"), h = [];
3950
+ for (let _ = 0; _ < l; _ += 1)
3951
+ h.push(c.parse(p.subarray(_ * s)));
3978
3952
  return h;
3979
3953
  }
3980
3954
  /*
@@ -3986,11 +3960,11 @@ class Ps extends tr {
3986
3960
  * @return a Promise for an array of bigbed block Loc entries
3987
3961
  */
3988
3962
  async searchExtraIndexBlocks(n, t = {}) {
3989
- const { isBigEndian: i } = await this.getHeader(t), r = await this.readIndices(t);
3990
- if (r.length === 0)
3963
+ const { isBigEndian: i } = await this.getHeader(t), a = await this.readIndices(t);
3964
+ if (a.length === 0)
3991
3965
  return [];
3992
- const a = r.map(async (o) => {
3993
- const { offset: s, field: u } = o, { buffer: l } = await this.bbi.read(Q.Buffer.alloc(32), 0, 32, Number(s), t), f = i ? "big" : "little", d = new N().endianess(f).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"), { blockSize: c, keySize: h, valSize: _ } = d.parse(l), g = new N().endianess(f).int8("nodeType").skip(1).int16("cnt").choice({
3966
+ const r = a.map(async (o) => {
3967
+ const { offset: l, field: u } = o, { buffer: s } = await this.bbi.read(J.Buffer.alloc(32), 0, 32, Number(l), t), f = i ? "big" : "little", p = new N().endianess(f).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"), { blockSize: c, keySize: h, valSize: _ } = p.parse(s), g = new N().endianess(f).int8("nodeType").skip(1).int16("cnt").choice({
3994
3968
  tag: "nodeType",
3995
3969
  choices: {
3996
3970
  0: new N().array("leafkeys", {
@@ -4003,7 +3977,7 @@ class Ps extends tr {
4003
3977
  })
4004
3978
  }
4005
3979
  }), k = async (E) => {
4006
- const C = Number(E), p = 4 + c * (h + _), { buffer: $ } = await this.bbi.read(Q.Buffer.alloc(p), 0, p, C, t), S = g.parse($);
3980
+ const C = Number(E), d = 4 + c * (h + _), { buffer: $ } = await this.bbi.read(J.Buffer.alloc(d), 0, d, C, t), S = g.parse($);
4007
3981
  if (S.leafkeys) {
4008
3982
  let b;
4009
3983
  for (let w = 0; w < S.leafkeys.length; w += 1) {
@@ -4017,10 +3991,10 @@ class Ps extends tr {
4017
3991
  for (let b = 0; b < S.keys.length; b += 1)
4018
3992
  if (S.keys[b].key === n)
4019
3993
  return { ...S.keys[b], field: u };
4020
- }, y = 32;
4021
- return k(Number(s) + y);
3994
+ };
3995
+ return k(Number(l) + 32);
4022
3996
  });
4023
- return As(await Promise.all(a));
3997
+ return As(await Promise.all(r));
4024
3998
  }
4025
3999
  /*
4026
4000
  * retrieve the features from the bigbed data that were found through the lookup of the extraIndex
@@ -4034,20 +4008,20 @@ class Ps extends tr {
4034
4008
  const i = await this.searchExtraIndexBlocks(n, t);
4035
4009
  if (i.length === 0)
4036
4010
  return [];
4037
- const r = await this.getUnzoomedView(t), a = i.map((s) => new Z((u) => {
4038
- r.readFeatures(u, [s], t);
4039
- }).pipe(er((u, l) => u.concat(l)), Ji((u) => {
4040
- for (const l of u)
4041
- l.field = s.field;
4011
+ const a = await this.getUnzoomedView(t), r = i.map((l) => new Z((u) => {
4012
+ a.readFeatures(u, [l], t);
4013
+ }).pipe(er((u, s) => u.concat(s)), Ji((u) => {
4014
+ for (const s of u)
4015
+ s.field = l.field;
4042
4016
  return u;
4043
4017
  })));
4044
- return (await qi(Cs(...a))).filter((s) => {
4018
+ return (await qi(Cs(...r))).filter((l) => {
4045
4019
  var u;
4046
- return ((u = s.rest) === null || u === void 0 ? void 0 : u.split(" ")[(s.field || 0) - 3]) === n;
4020
+ return ((u = l.rest) === null || u === void 0 ? void 0 : u.split(" ")[(l.field || 0) - 3]) === n;
4047
4021
  });
4048
4022
  }
4049
4023
  }
4050
4024
  export {
4051
- Ps as BigBed,
4025
+ Ls as BigBed,
4052
4026
  Fs as BigWig
4053
4027
  };