npm-pkg-lint 4.6.5 → 4.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7656,85 +7656,85 @@ function isBlacklisted(filename2) {
7656
7656
  import fs3 from "node:fs";
7657
7657
 
7658
7658
  // node_modules/tar/dist/esm/index.min.js
7659
- import Kr from "events";
7659
+ import Vr from "events";
7660
7660
  import I from "fs";
7661
- import { EventEmitter as Ti } from "node:events";
7662
- import Ns from "node:stream";
7663
- import { StringDecoder as Mr } from "node:string_decoder";
7664
- import nr from "node:path";
7661
+ import { EventEmitter as Li } from "node:events";
7662
+ import Ds from "node:stream";
7663
+ import { StringDecoder as Br } from "node:string_decoder";
7664
+ import or from "node:path";
7665
7665
  import Vt from "node:fs";
7666
- import { dirname as xn, parse as Ln } from "path";
7666
+ import { dirname as Ln, parse as Nn } from "path";
7667
7667
  import { EventEmitter as _n } from "events";
7668
- import Mi from "assert";
7669
- import { Buffer as gt } from "buffer";
7670
- import * as ks from "zlib";
7671
- import qr from "zlib";
7668
+ import Pi from "assert";
7669
+ import { Buffer as Ot } from "buffer";
7670
+ import * as vs from "zlib";
7671
+ import Qr from "zlib";
7672
7672
  import { posix as Zt } from "node:path";
7673
- import { basename as wn } from "node:path";
7674
- import fi from "fs";
7673
+ import { basename as Sn } from "node:path";
7674
+ import ui from "fs";
7675
7675
  import $ from "fs";
7676
- import $s from "path";
7677
- import { win32 as In } from "node:path";
7678
- import sr from "path";
7679
- import Cr from "node:fs";
7680
- import so from "node:assert";
7681
- import { randomBytes as Ir } from "node:crypto";
7676
+ import Xs from "path";
7677
+ import { win32 as Cn } from "node:path";
7678
+ import rr from "path";
7679
+ import kr from "node:fs";
7680
+ import ro from "node:assert";
7681
+ import { randomBytes as Cr } from "node:crypto";
7682
7682
  import u from "node:fs";
7683
7683
  import R from "node:path";
7684
- import cr from "fs";
7685
- import mi from "node:fs";
7686
- import Ee from "node:path";
7687
- import k from "node:fs";
7688
- import jn from "node:fs/promises";
7689
- import pi from "node:path";
7684
+ import fr from "fs";
7685
+ import Ei from "node:fs";
7686
+ import we from "node:path";
7687
+ import F from "node:fs";
7688
+ import Jn from "node:fs/promises";
7689
+ import wi from "node:path";
7690
7690
  import { join as br } from "node:path";
7691
7691
  import v from "node:fs";
7692
7692
  import Fr from "node:path";
7693
- var kr = Object.defineProperty;
7694
- var vr = (s3, t) => {
7695
- for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
7693
+ var vr = Object.defineProperty;
7694
+ var Mr = (s3, t) => {
7695
+ for (var e in t) vr(s3, e, { get: t[e], enumerable: true });
7696
7696
  };
7697
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7698
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
7699
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
7700
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
7697
+ var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7698
+ var Pr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Ds || zr(s3) || Ur(s3));
7699
+ var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
7700
+ var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
7701
7701
  var q = /* @__PURE__ */ Symbol("EOF");
7702
- var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
7702
+ var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
7703
7703
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
7704
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
7705
- var jt = /* @__PURE__ */ Symbol("emittedError");
7706
- var Ne = /* @__PURE__ */ Symbol("closed");
7707
- var Ts = /* @__PURE__ */ Symbol("read");
7704
+ var Ne = /* @__PURE__ */ Symbol("emittingEnd");
7705
+ var Qt = /* @__PURE__ */ Symbol("emittedError");
7706
+ var De = /* @__PURE__ */ Symbol("closed");
7707
+ var xs = /* @__PURE__ */ Symbol("read");
7708
7708
  var Ae = /* @__PURE__ */ Symbol("flush");
7709
- var xs = /* @__PURE__ */ Symbol("flushChunk");
7709
+ var Ls = /* @__PURE__ */ Symbol("flushChunk");
7710
7710
  var z = /* @__PURE__ */ Symbol("encoding");
7711
7711
  var Mt = /* @__PURE__ */ Symbol("decoder");
7712
- var b = /* @__PURE__ */ Symbol("flowing");
7713
- var Qt = /* @__PURE__ */ Symbol("paused");
7712
+ var g = /* @__PURE__ */ Symbol("flowing");
7713
+ var Jt = /* @__PURE__ */ Symbol("paused");
7714
7714
  var Bt = /* @__PURE__ */ Symbol("resume");
7715
- var _ = /* @__PURE__ */ Symbol("buffer");
7716
- var A = /* @__PURE__ */ Symbol("pipes");
7717
- var g = /* @__PURE__ */ Symbol("bufferLength");
7718
- var yi = /* @__PURE__ */ Symbol("bufferPush");
7719
- var De = /* @__PURE__ */ Symbol("bufferShift");
7715
+ var b = /* @__PURE__ */ Symbol("buffer");
7716
+ var D = /* @__PURE__ */ Symbol("pipes");
7717
+ var _ = /* @__PURE__ */ Symbol("bufferLength");
7718
+ var gi = /* @__PURE__ */ Symbol("bufferPush");
7719
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
7720
7720
  var L = /* @__PURE__ */ Symbol("objectMode");
7721
7721
  var w = /* @__PURE__ */ Symbol("destroyed");
7722
- var Ri = /* @__PURE__ */ Symbol("error");
7723
- var bi = /* @__PURE__ */ Symbol("emitData");
7724
- var Ls = /* @__PURE__ */ Symbol("emitEnd");
7725
- var _i = /* @__PURE__ */ Symbol("emitEnd2");
7722
+ var bi = /* @__PURE__ */ Symbol("error");
7723
+ var _i = /* @__PURE__ */ Symbol("emitData");
7724
+ var Ns = /* @__PURE__ */ Symbol("emitEnd");
7725
+ var Oi = /* @__PURE__ */ Symbol("emitEnd2");
7726
7726
  var Z = /* @__PURE__ */ Symbol("async");
7727
- var gi = /* @__PURE__ */ Symbol("abort");
7728
- var Ie = /* @__PURE__ */ Symbol("aborted");
7729
- var Jt = /* @__PURE__ */ Symbol("signal");
7730
- var yt = /* @__PURE__ */ Symbol("dataListeners");
7727
+ var Ti = /* @__PURE__ */ Symbol("abort");
7728
+ var Ce = /* @__PURE__ */ Symbol("aborted");
7729
+ var jt = /* @__PURE__ */ Symbol("signal");
7730
+ var Rt = /* @__PURE__ */ Symbol("dataListeners");
7731
7731
  var C = /* @__PURE__ */ Symbol("discarded");
7732
7732
  var te = (s3) => Promise.resolve().then(s3);
7733
- var Ur = (s3) => s3();
7734
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7735
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7736
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7737
- var Ce = class {
7733
+ var Hr = (s3) => s3();
7734
+ var Wr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7735
+ var Gr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7736
+ var Zr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7737
+ var ke = class {
7738
7738
  src;
7739
7739
  dest;
7740
7740
  opts;
@@ -7751,7 +7751,7 @@ var Ce = class {
7751
7751
  this.unpipe(), this.opts.end && this.dest.end();
7752
7752
  }
7753
7753
  };
7754
- var Oi = class extends Ce {
7754
+ var xi = class extends ke {
7755
7755
  unpipe() {
7756
7756
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
7757
7757
  }
@@ -7759,39 +7759,39 @@ var Oi = class extends Ce {
7759
7759
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
7760
7760
  }
7761
7761
  };
7762
- var Zr = (s3) => !!s3.objectMode;
7763
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7764
- var D = class extends Ti {
7765
- [b] = false;
7766
- [Qt] = false;
7767
- [A] = [];
7768
- [_] = [];
7762
+ var Yr = (s3) => !!s3.objectMode;
7763
+ var Kr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7764
+ var A = class extends Li {
7765
+ [g] = false;
7766
+ [Jt] = false;
7767
+ [D] = [];
7768
+ [b] = [];
7769
7769
  [L];
7770
7770
  [z];
7771
7771
  [Z];
7772
7772
  [Mt];
7773
7773
  [q] = false;
7774
7774
  [rt] = false;
7775
- [Le] = false;
7776
7775
  [Ne] = false;
7777
- [jt] = null;
7778
- [g] = 0;
7776
+ [De] = false;
7777
+ [Qt] = null;
7778
+ [_] = 0;
7779
7779
  [w] = false;
7780
- [Jt];
7781
- [Ie] = false;
7782
- [yt] = 0;
7780
+ [jt];
7781
+ [Ce] = false;
7782
+ [Rt] = 0;
7783
7783
  [C] = false;
7784
7784
  writable = true;
7785
7785
  readable = true;
7786
7786
  constructor(...t) {
7787
7787
  let e = t[0] || {};
7788
7788
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
7789
- Zr(e) ? (this[L] = true, this[z] = null) : Yr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Mr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
7789
+ Yr(e) ? (this[L] = true, this[z] = null) : Kr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Br(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
7790
7790
  let { signal: i } = e;
7791
- i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
7791
+ i && (this[jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
7792
7792
  }
7793
7793
  get bufferLength() {
7794
- return this[g];
7794
+ return this[_];
7795
7795
  }
7796
7796
  get encoding() {
7797
7797
  return this[z];
@@ -7814,99 +7814,99 @@ var D = class extends Ti {
7814
7814
  set async(t) {
7815
7815
  this[Z] = this[Z] || !!t;
7816
7816
  }
7817
- [gi]() {
7818
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7817
+ [Ti]() {
7818
+ this[Ce] = true, this.emit("abort", this[jt]?.reason), this.destroy(this[jt]?.reason);
7819
7819
  }
7820
7820
  get aborted() {
7821
- return this[Ie];
7821
+ return this[Ce];
7822
7822
  }
7823
7823
  set aborted(t) {
7824
7824
  }
7825
7825
  write(t, e, i) {
7826
- if (this[Ie]) return false;
7826
+ if (this[Ce]) return false;
7827
7827
  if (this[q]) throw new Error("write after end");
7828
7828
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
7829
7829
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
7830
- let r = this[Z] ? te : Ur;
7830
+ let r = this[Z] ? te : Hr;
7831
7831
  if (!this[L] && !Buffer.isBuffer(t)) {
7832
- if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7833
- else if (Wr(t)) t = Buffer.from(t);
7832
+ if (Zr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7833
+ else if (Gr(t)) t = Buffer.from(t);
7834
7834
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
7835
7835
  }
7836
- return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
7836
+ return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
7837
7837
  }
7838
7838
  read(t) {
7839
7839
  if (this[w]) return null;
7840
- if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
7841
- this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
7842
- let e = this[Ts](t || null, this[_][0]);
7843
- return this[j](), e;
7840
+ if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
7841
+ this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
7842
+ let e = this[xs](t || null, this[b][0]);
7843
+ return this[Q](), e;
7844
7844
  }
7845
- [Ts](t, e) {
7846
- if (this[L]) this[De]();
7845
+ [xs](t, e) {
7846
+ if (this[L]) this[Ie]();
7847
7847
  else {
7848
7848
  let i = e;
7849
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
7849
+ t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7850
7850
  }
7851
- return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
7851
+ return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
7852
7852
  }
7853
7853
  end(t, e, i) {
7854
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
7854
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[g] || !this[Jt]) && this[Q](), this;
7855
7855
  }
7856
7856
  [Bt]() {
7857
- this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
7857
+ this[w] || (!this[Rt] && !this[D].length && (this[C] = true), this[Jt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[q] ? this[Q]() : this.emit("drain"));
7858
7858
  }
7859
7859
  resume() {
7860
7860
  return this[Bt]();
7861
7861
  }
7862
7862
  pause() {
7863
- this[b] = false, this[Qt] = true, this[C] = false;
7863
+ this[g] = false, this[Jt] = true, this[C] = false;
7864
7864
  }
7865
7865
  get destroyed() {
7866
7866
  return this[w];
7867
7867
  }
7868
7868
  get flowing() {
7869
- return this[b];
7869
+ return this[g];
7870
7870
  }
7871
7871
  get paused() {
7872
- return this[Qt];
7872
+ return this[Jt];
7873
7873
  }
7874
- [yi](t) {
7875
- this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
7874
+ [gi](t) {
7875
+ this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
7876
7876
  }
7877
- [De]() {
7878
- return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
7877
+ [Ie]() {
7878
+ return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
7879
7879
  }
7880
7880
  [Ae](t = false) {
7881
7881
  do
7882
7882
  ;
7883
- while (this[xs](this[De]()) && this[_].length);
7884
- !t && !this[_].length && !this[q] && this.emit("drain");
7883
+ while (this[Ls](this[Ie]()) && this[b].length);
7884
+ !t && !this[b].length && !this[q] && this.emit("drain");
7885
7885
  }
7886
- [xs](t) {
7887
- return this.emit("data", t), this[b];
7886
+ [Ls](t) {
7887
+ return this.emit("data", t), this[g];
7888
7888
  }
7889
7889
  pipe(t, e) {
7890
7890
  if (this[w]) return t;
7891
7891
  this[C] = false;
7892
7892
  let i = this[rt];
7893
- return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7893
+ return e = e || {}, t === Ts.stdout || t === Ts.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new xi(this, t, e) : new ke(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7894
7894
  }
7895
7895
  unpipe(t) {
7896
- let e = this[A].find((i) => i.dest === t);
7897
- e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
7896
+ let e = this[D].find((i) => i.dest === t);
7897
+ e && (this[D].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
7898
7898
  }
7899
7899
  addListener(t, e) {
7900
7900
  return this.on(t, e);
7901
7901
  }
7902
7902
  on(t, e) {
7903
7903
  let i = super.on(t, e);
7904
- if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
7905
- else if (t === "readable" && this[g] !== 0) super.emit("readable");
7906
- else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7907
- else if (t === "error" && this[jt]) {
7904
+ if (t === "data") this[C] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
7905
+ else if (t === "readable" && this[_] !== 0) super.emit("readable");
7906
+ else if (Wr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7907
+ else if (t === "error" && this[Qt]) {
7908
7908
  let r = e;
7909
- this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
7909
+ this[Z] ? te(() => r.call(this, this[Qt])) : r.call(this, this[Qt]);
7910
7910
  }
7911
7911
  return i;
7912
7912
  }
@@ -7915,58 +7915,58 @@ var D = class extends Ti {
7915
7915
  }
7916
7916
  off(t, e) {
7917
7917
  let i = super.off(t, e);
7918
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
7918
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[D].length && (this[g] = false)), i;
7919
7919
  }
7920
7920
  removeAllListeners(t) {
7921
7921
  let e = super.removeAllListeners(t);
7922
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
7922
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[D].length && (this[g] = false)), e;
7923
7923
  }
7924
7924
  get emittedEnd() {
7925
7925
  return this[rt];
7926
7926
  }
7927
- [j]() {
7928
- !this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
7927
+ [Q]() {
7928
+ !this[Ne] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Ne] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[De] && this.emit("close"), this[Ne] = false);
7929
7929
  }
7930
7930
  emit(t, ...e) {
7931
7931
  let i = e[0];
7932
7932
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
7933
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
7934
- if (t === "end") return this[Ls]();
7933
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[_i](i)), true) : this[_i](i);
7934
+ if (t === "end") return this[Ns]();
7935
7935
  if (t === "close") {
7936
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
7936
+ if (this[De] = true, !this[rt] && !this[w]) return false;
7937
7937
  let n = super.emit("close");
7938
7938
  return this.removeAllListeners("close"), n;
7939
7939
  } else if (t === "error") {
7940
- this[jt] = i, super.emit(Ri, i);
7941
- let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
7942
- return this[j](), n;
7940
+ this[Qt] = i, super.emit(bi, i);
7941
+ let n = !this[jt] || this.listeners("error").length ? super.emit("error", i) : false;
7942
+ return this[Q](), n;
7943
7943
  } else if (t === "resume") {
7944
7944
  let n = super.emit("resume");
7945
- return this[j](), n;
7945
+ return this[Q](), n;
7946
7946
  } else if (t === "finish" || t === "prefinish") {
7947
7947
  let n = super.emit(t);
7948
7948
  return this.removeAllListeners(t), n;
7949
7949
  }
7950
7950
  let r = super.emit(t, ...e);
7951
- return this[j](), r;
7951
+ return this[Q](), r;
7952
7952
  }
7953
- [bi](t) {
7954
- for (let i of this[A]) i.dest.write(t) === false && this.pause();
7953
+ [_i](t) {
7954
+ for (let i of this[D]) i.dest.write(t) === false && this.pause();
7955
7955
  let e = this[C] ? false : super.emit("data", t);
7956
- return this[j](), e;
7956
+ return this[Q](), e;
7957
7957
  }
7958
- [Ls]() {
7959
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
7958
+ [Ns]() {
7959
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[Oi]()), true) : this[Oi]());
7960
7960
  }
7961
- [_i]() {
7961
+ [Oi]() {
7962
7962
  if (this[Mt]) {
7963
7963
  let e = this[Mt].end();
7964
7964
  if (e) {
7965
- for (let i of this[A]) i.dest.write(e);
7965
+ for (let i of this[D]) i.dest.write(e);
7966
7966
  this[C] || super.emit("data", e);
7967
7967
  }
7968
7968
  }
7969
- for (let e of this[A]) e.end();
7969
+ for (let e of this[D]) e.end();
7970
7970
  let t = super.emit("end");
7971
7971
  return this.removeAllListeners("end"), t;
7972
7972
  }
@@ -8013,67 +8013,67 @@ var D = class extends Ti {
8013
8013
  }
8014
8014
  [Symbol.iterator]() {
8015
8015
  this[C] = false;
8016
- let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8016
+ let t = false, e = () => (this.pause(), this.off(bi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8017
8017
  if (t) return e();
8018
8018
  let r = this.read();
8019
8019
  return r === null ? e() : { done: false, value: r };
8020
8020
  };
8021
- return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8021
+ return this.once("end", e), this.once(bi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8022
8022
  return this;
8023
8023
  }, [Symbol.dispose]: () => {
8024
8024
  } };
8025
8025
  }
8026
8026
  destroy(t) {
8027
8027
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
8028
- this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
8028
+ this[w] = true, this[C] = true, this[b].length = 0, this[_] = 0;
8029
8029
  let e = this;
8030
- return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8030
+ return typeof e.close == "function" && !this[De] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8031
8031
  }
8032
8032
  static get isStream() {
8033
- return Br;
8033
+ return Pr;
8034
8034
  }
8035
8035
  };
8036
- var Vr = I.writev;
8036
+ var $r = I.writev;
8037
8037
  var ot = /* @__PURE__ */ Symbol("_autoClose");
8038
8038
  var H = /* @__PURE__ */ Symbol("_close");
8039
8039
  var ee = /* @__PURE__ */ Symbol("_ended");
8040
8040
  var m = /* @__PURE__ */ Symbol("_fd");
8041
- var xi = /* @__PURE__ */ Symbol("_finished");
8042
- var J = /* @__PURE__ */ Symbol("_flags");
8043
- var Li = /* @__PURE__ */ Symbol("_flush");
8044
- var Ii = /* @__PURE__ */ Symbol("_handleChunk");
8045
- var Ci = /* @__PURE__ */ Symbol("_makeBuf");
8041
+ var Ni = /* @__PURE__ */ Symbol("_finished");
8042
+ var j = /* @__PURE__ */ Symbol("_flags");
8043
+ var Di = /* @__PURE__ */ Symbol("_flush");
8044
+ var ki = /* @__PURE__ */ Symbol("_handleChunk");
8045
+ var Fi = /* @__PURE__ */ Symbol("_makeBuf");
8046
8046
  var se = /* @__PURE__ */ Symbol("_mode");
8047
8047
  var Fe = /* @__PURE__ */ Symbol("_needDrain");
8048
8048
  var Ut = /* @__PURE__ */ Symbol("_onerror");
8049
8049
  var Ht = /* @__PURE__ */ Symbol("_onopen");
8050
- var Ni = /* @__PURE__ */ Symbol("_onread");
8050
+ var Ai = /* @__PURE__ */ Symbol("_onread");
8051
8051
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
8052
8052
  var ht = /* @__PURE__ */ Symbol("_open");
8053
8053
  var U = /* @__PURE__ */ Symbol("_path");
8054
8054
  var nt = /* @__PURE__ */ Symbol("_pos");
8055
8055
  var Y = /* @__PURE__ */ Symbol("_queue");
8056
8056
  var zt = /* @__PURE__ */ Symbol("_read");
8057
- var Ai = /* @__PURE__ */ Symbol("_readSize");
8058
- var Q = /* @__PURE__ */ Symbol("_reading");
8057
+ var Ii = /* @__PURE__ */ Symbol("_readSize");
8058
+ var J = /* @__PURE__ */ Symbol("_reading");
8059
8059
  var ie = /* @__PURE__ */ Symbol("_remain");
8060
- var Di = /* @__PURE__ */ Symbol("_size");
8061
- var ke = /* @__PURE__ */ Symbol("_write");
8062
- var Rt = /* @__PURE__ */ Symbol("_writing");
8063
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
8060
+ var Ci = /* @__PURE__ */ Symbol("_size");
8061
+ var ve = /* @__PURE__ */ Symbol("_write");
8062
+ var gt = /* @__PURE__ */ Symbol("_writing");
8063
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
8064
8064
  var bt = /* @__PURE__ */ Symbol("_errored");
8065
- var _t = class extends D {
8065
+ var _t = class extends A {
8066
8066
  [bt] = false;
8067
8067
  [m];
8068
8068
  [U];
8069
- [Ai];
8070
- [Q] = false;
8071
- [Di];
8069
+ [Ii];
8070
+ [J] = false;
8071
+ [Ci];
8072
8072
  [ie];
8073
8073
  [ot];
8074
8074
  constructor(t, e) {
8075
8075
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
8076
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
8076
+ this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[J] = false, this[Ci] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Ci], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
8077
8077
  }
8078
8078
  get fd() {
8079
8079
  return this[m];
@@ -8093,19 +8093,19 @@ var _t = class extends D {
8093
8093
  [Ht](t, e) {
8094
8094
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
8095
8095
  }
8096
- [Ci]() {
8097
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
8096
+ [Fi]() {
8097
+ return Buffer.allocUnsafe(Math.min(this[Ii], this[ie]));
8098
8098
  }
8099
8099
  [zt]() {
8100
- if (!this[Q]) {
8101
- this[Q] = true;
8102
- let t = this[Ci]();
8103
- if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
8104
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
8100
+ if (!this[J]) {
8101
+ this[J] = true;
8102
+ let t = this[Fi]();
8103
+ if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
8104
+ I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
8105
8105
  }
8106
8106
  }
8107
- [Ni](t, e, i) {
8108
- this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
8107
+ [Ai](t, e, i) {
8108
+ this[J] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
8109
8109
  }
8110
8110
  [H]() {
8111
8111
  if (this[ot] && typeof this[m] == "number") {
@@ -8114,9 +8114,9 @@ var _t = class extends D {
8114
8114
  }
8115
8115
  }
8116
8116
  [Ut](t) {
8117
- this[Q] = true, this[H](), this.emit("error", t);
8117
+ this[J] = true, this[H](), this.emit("error", t);
8118
8118
  }
8119
- [Ii](t, e) {
8119
+ [ki](t, e) {
8120
8120
  let i = false;
8121
8121
  return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
8122
8122
  }
@@ -8134,7 +8134,7 @@ var _t = class extends D {
8134
8134
  }
8135
8135
  }
8136
8136
  };
8137
- var Me = class extends _t {
8137
+ var Be = class extends _t {
8138
8138
  [ht]() {
8139
8139
  let t = true;
8140
8140
  try {
@@ -8146,13 +8146,13 @@ var Me = class extends _t {
8146
8146
  [zt]() {
8147
8147
  let t = true;
8148
8148
  try {
8149
- if (!this[Q]) {
8150
- this[Q] = true;
8149
+ if (!this[J]) {
8150
+ this[J] = true;
8151
8151
  do {
8152
- let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8153
- if (!this[Ii](i, e)) break;
8152
+ let e = this[Fi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8153
+ if (!this[ki](i, e)) break;
8154
8154
  } while (true);
8155
- this[Q] = false;
8155
+ this[J] = false;
8156
8156
  }
8157
8157
  t = false;
8158
8158
  } finally {
@@ -8166,11 +8166,11 @@ var Me = class extends _t {
8166
8166
  }
8167
8167
  }
8168
8168
  };
8169
- var tt2 = class extends Kr {
8169
+ var tt2 = class extends Vr {
8170
8170
  readable = false;
8171
8171
  writable = true;
8172
8172
  [bt] = false;
8173
- [Rt] = false;
8173
+ [gt] = false;
8174
8174
  [ee] = false;
8175
8175
  [Y] = [];
8176
8176
  [Fe] = false;
@@ -8178,14 +8178,14 @@ var tt2 = class extends Kr {
8178
8178
  [se];
8179
8179
  [ot];
8180
8180
  [m];
8181
- [ve];
8182
- [J];
8183
- [xi] = false;
8181
+ [Me];
8182
+ [j];
8183
+ [Ni] = false;
8184
8184
  [nt];
8185
8185
  constructor(t, e) {
8186
8186
  e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
8187
8187
  let i = this[nt] !== void 0 ? "r+" : "w";
8188
- this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8188
+ this[Me] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8189
8189
  }
8190
8190
  emit(t, ...e) {
8191
8191
  if (t === "error") {
@@ -8201,32 +8201,32 @@ var tt2 = class extends Kr {
8201
8201
  return this[U];
8202
8202
  }
8203
8203
  [Ut](t) {
8204
- this[H](), this[Rt] = true, this.emit("error", t);
8204
+ this[H](), this[gt] = true, this.emit("error", t);
8205
8205
  }
8206
8206
  [ht]() {
8207
- I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
8207
+ I.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
8208
8208
  }
8209
8209
  [Ht](t, e) {
8210
- this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
8210
+ this[Me] && this[j] === "r+" && t && t.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Di]());
8211
8211
  }
8212
8212
  end(t, e) {
8213
- return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8213
+ return t && this.write(t, e), this[ee] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8214
8214
  }
8215
8215
  write(t, e) {
8216
- return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
8216
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[gt] = true, this[ve](t), true);
8217
8217
  }
8218
- [ke](t) {
8218
+ [ve](t) {
8219
8219
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
8220
8220
  }
8221
8221
  [Pt](t, e) {
8222
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
8222
+ t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[ee] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
8223
8223
  }
8224
- [Li]() {
8224
+ [Di]() {
8225
8225
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
8226
- else if (this[Y].length === 1) this[ke](this[Y].pop());
8226
+ else if (this[Y].length === 1) this[ve](this[Y].pop());
8227
8227
  else {
8228
8228
  let t = this[Y];
8229
- this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8229
+ this[Y] = [], $r(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8230
8230
  }
8231
8231
  }
8232
8232
  [H]() {
@@ -8239,13 +8239,13 @@ var tt2 = class extends Kr {
8239
8239
  var Wt = class extends tt2 {
8240
8240
  [ht]() {
8241
8241
  let t;
8242
- if (this[ve] && this[J] === "r+") try {
8243
- t = I.openSync(this[U], this[J], this[se]);
8242
+ if (this[Me] && this[j] === "r+") try {
8243
+ t = I.openSync(this[U], this[j], this[se]);
8244
8244
  } catch (e) {
8245
- if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
8245
+ if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
8246
8246
  throw e;
8247
8247
  }
8248
- else t = I.openSync(this[U], this[J], this[se]);
8248
+ else t = I.openSync(this[U], this[j], this[se]);
8249
8249
  this[Ht](null, t);
8250
8250
  }
8251
8251
  [H]() {
@@ -8254,7 +8254,7 @@ var Wt = class extends tt2 {
8254
8254
  this[m] = void 0, I.closeSync(t), this.emit("close");
8255
8255
  }
8256
8256
  }
8257
- [ke](t) {
8257
+ [ve](t) {
8258
8258
  let e = true;
8259
8259
  try {
8260
8260
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -8266,21 +8266,21 @@ var Wt = class extends tt2 {
8266
8266
  }
8267
8267
  }
8268
8268
  };
8269
- var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
8269
+ var Xr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
8270
8270
  var As = (s3) => !!s3.sync && !!s3.file;
8271
- var Ds = (s3) => !s3.sync && !!s3.file;
8272
- var Is = (s3) => !!s3.sync && !s3.file;
8273
- var Cs = (s3) => !s3.sync && !s3.file;
8271
+ var Is = (s3) => !s3.sync && !!s3.file;
8272
+ var Cs = (s3) => !!s3.sync && !s3.file;
8273
+ var ks = (s3) => !s3.sync && !s3.file;
8274
8274
  var Fs = (s3) => !!s3.file;
8275
- var Xr = (s3) => {
8276
- let t = $r.get(s3);
8275
+ var qr = (s3) => {
8276
+ let t = Xr.get(s3);
8277
8277
  return t || s3;
8278
8278
  };
8279
8279
  var re = (s3 = {}) => {
8280
8280
  if (!s3) return {};
8281
8281
  let t = {};
8282
8282
  for (let [e, i] of Object.entries(s3)) {
8283
- let r = Xr(e);
8283
+ let r = qr(e);
8284
8284
  t[r] = i;
8285
8285
  }
8286
8286
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
@@ -8291,28 +8291,28 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
8291
8291
  if (r?.(a, o), As(a)) {
8292
8292
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8293
8293
  return s3(a, o);
8294
- } else if (Ds(a)) {
8294
+ } else if (Is(a)) {
8295
8295
  let l = t(a, o);
8296
8296
  return h ? l.then(() => h(), h) : l;
8297
- } else if (Is(a)) {
8297
+ } else if (Cs(a)) {
8298
8298
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8299
8299
  return e(a, o);
8300
- } else if (Cs(a)) {
8300
+ } else if (ks(a)) {
8301
8301
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
8302
8302
  return i(a, o);
8303
8303
  }
8304
8304
  throw new Error("impossible options??");
8305
8305
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
8306
- var jr = qr.constants || { ZLIB_VERNUM: 4736 };
8307
- var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
8308
- var Qr = gt.concat;
8309
- var vs = Object.getOwnPropertyDescriptor(gt, "concat");
8310
- var Jr = (s3) => s3;
8311
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
8312
- gt.concat = s3 ? Jr : Qr;
8306
+ var Jr = Qr.constants || { ZLIB_VERNUM: 4736 };
8307
+ var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, Jr));
8308
+ var jr = Ot.concat;
8309
+ var Ms = Object.getOwnPropertyDescriptor(Ot, "concat");
8310
+ var tn = (s3) => s3;
8311
+ var Mi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
8312
+ Ot.concat = s3 ? tn : jr;
8313
8313
  } : (s3) => {
8314
8314
  };
8315
- var Ot = /* @__PURE__ */ Symbol("_superWrite");
8315
+ var Tt = /* @__PURE__ */ Symbol("_superWrite");
8316
8316
  var Gt = class extends Error {
8317
8317
  code;
8318
8318
  errno;
@@ -8323,8 +8323,8 @@ var Gt = class extends Error {
8323
8323
  return "ZlibError";
8324
8324
  }
8325
8325
  };
8326
- var vi = /* @__PURE__ */ Symbol("flushFlag");
8327
- var ne = class extends D {
8326
+ var Bi = /* @__PURE__ */ Symbol("flushFlag");
8327
+ var ne = class extends A {
8328
8328
  #t = false;
8329
8329
  #i = false;
8330
8330
  #s;
@@ -8343,9 +8343,9 @@ var ne = class extends D {
8343
8343
  }
8344
8344
  constructor(t, e) {
8345
8345
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
8346
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
8346
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof vs[e] != "function") throw new TypeError("Compression method not supported: " + e);
8347
8347
  try {
8348
- this.#e = new ks[e](t);
8348
+ this.#e = new vs[e](t);
8349
8349
  } catch (i) {
8350
8350
  throw new Gt(i, this.constructor);
8351
8351
  }
@@ -8357,10 +8357,10 @@ var ne = class extends D {
8357
8357
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
8358
8358
  }
8359
8359
  reset() {
8360
- if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
8360
+ if (!this.#t) return Pi(this.#e, "zlib binding closed"), this.#e.reset?.();
8361
8361
  }
8362
8362
  flush(t) {
8363
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
8363
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Bi]: t })));
8364
8364
  }
8365
8365
  end(t, e, i) {
8366
8366
  return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -8368,24 +8368,24 @@ var ne = class extends D {
8368
8368
  get ended() {
8369
8369
  return this.#i;
8370
8370
  }
8371
- [Ot](t) {
8371
+ [Tt](t) {
8372
8372
  return super.write(t);
8373
8373
  }
8374
8374
  write(t, e, i) {
8375
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
8376
- Mi(this.#e, "zlib binding closed");
8375
+ if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Ot.from(t, e)), this.#t) return;
8376
+ Pi(this.#e, "zlib binding closed");
8377
8377
  let r = this.#e._handle, n = r.close;
8378
8378
  r.close = () => {
8379
8379
  };
8380
8380
  let o = this.#e.close;
8381
8381
  this.#e.close = () => {
8382
- }, ki(true);
8382
+ }, Mi(true);
8383
8383
  let h;
8384
8384
  try {
8385
- let l = typeof t[vi] == "number" ? t[vi] : this.#s;
8386
- h = this.#e._processChunk(t, l), ki(false);
8385
+ let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
8386
+ h = this.#e._processChunk(t, l), Mi(false);
8387
8387
  } catch (l) {
8388
- ki(false), this.#o(new Gt(l, this.write));
8388
+ Mi(false), this.#o(new Gt(l, this.write));
8389
8389
  } finally {
8390
8390
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
8391
8391
  }
@@ -8393,13 +8393,13 @@ var ne = class extends D {
8393
8393
  let a;
8394
8394
  if (h) if (Array.isArray(h) && h.length > 0) {
8395
8395
  let l = h[0];
8396
- a = this[Ot](gt.from(l));
8397
- for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
8398
- } else a = this[Ot](gt.from(h));
8396
+ a = this[Tt](Ot.from(l));
8397
+ for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
8398
+ } else a = this[Tt](Ot.from(h));
8399
8399
  return i && i(), a;
8400
8400
  }
8401
8401
  };
8402
- var Be = class extends ne {
8402
+ var Pe = class extends ne {
8403
8403
  #t;
8404
8404
  #i;
8405
8405
  constructor(t, e) {
@@ -8410,7 +8410,7 @@ var Be = class extends ne {
8410
8410
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
8411
8411
  if (!this.handle.params) throw new Error("not supported in this implementation");
8412
8412
  if (this.#t !== t || this.#i !== e) {
8413
- this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
8413
+ this.flush(M.Z_SYNC_FLUSH), Pi(this.handle, "zlib binding closed");
8414
8414
  let i = this.handle.flush;
8415
8415
  this.handle.flush = (r, n) => {
8416
8416
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -8425,97 +8425,97 @@ var Be = class extends ne {
8425
8425
  }
8426
8426
  }
8427
8427
  };
8428
- var Pe = class extends Be {
8428
+ var ze = class extends Pe {
8429
8429
  #t;
8430
8430
  constructor(t) {
8431
8431
  super(t, "Gzip"), this.#t = t && !!t.portable;
8432
8432
  }
8433
- [Ot](t) {
8434
- return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
8433
+ [Tt](t) {
8434
+ return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
8435
8435
  }
8436
8436
  };
8437
- var ze = class extends Be {
8437
+ var Ue = class extends Pe {
8438
8438
  constructor(t) {
8439
8439
  super(t, "Unzip");
8440
8440
  }
8441
8441
  };
8442
- var Ue = class extends ne {
8442
+ var He = class extends ne {
8443
8443
  constructor(t, e) {
8444
8444
  t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
8445
8445
  }
8446
8446
  };
8447
- var He = class extends Ue {
8447
+ var We = class extends He {
8448
8448
  constructor(t) {
8449
8449
  super(t, "BrotliCompress");
8450
8450
  }
8451
8451
  };
8452
- var We = class extends Ue {
8452
+ var Ge = class extends He {
8453
8453
  constructor(t) {
8454
8454
  super(t, "BrotliDecompress");
8455
8455
  }
8456
8456
  };
8457
- var Ge = class extends ne {
8457
+ var Ze = class extends ne {
8458
8458
  constructor(t, e) {
8459
8459
  t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
8460
8460
  }
8461
8461
  };
8462
- var Ze = class extends Ge {
8462
+ var Ye = class extends Ze {
8463
8463
  constructor(t) {
8464
8464
  super(t, "ZstdCompress");
8465
8465
  }
8466
8466
  };
8467
- var Ye = class extends Ge {
8467
+ var Ke = class extends Ze {
8468
8468
  constructor(t) {
8469
8469
  super(t, "ZstdDecompress");
8470
8470
  }
8471
8471
  };
8472
- var Ms = (s3, t) => {
8473
- if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
8472
+ var Bs = (s3, t) => {
8473
+ if (Number.isSafeInteger(s3)) s3 < 0 ? rn(s3, t) : sn(s3, t);
8474
8474
  else throw Error("cannot encode number outside of javascript safe integer range");
8475
8475
  return t;
8476
8476
  };
8477
- var en = (s3, t) => {
8477
+ var sn = (s3, t) => {
8478
8478
  t[0] = 128;
8479
8479
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
8480
8480
  };
8481
- var sn = (s3, t) => {
8481
+ var rn = (s3, t) => {
8482
8482
  t[0] = 255;
8483
8483
  var e = false;
8484
8484
  s3 = s3 * -1;
8485
8485
  for (var i = t.length; i > 1; i--) {
8486
8486
  var r = s3 & 255;
8487
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
8487
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
8488
8488
  }
8489
8489
  };
8490
- var Bs = (s3) => {
8491
- let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
8490
+ var Ps = (s3) => {
8491
+ let t = s3[0], e = t === 128 ? on(s3.subarray(1, s3.length)) : t === 255 ? nn(s3) : null;
8492
8492
  if (e === null) throw Error("invalid base256 encoding");
8493
8493
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
8494
8494
  return e;
8495
8495
  };
8496
- var rn = (s3) => {
8496
+ var nn = (s3) => {
8497
8497
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
8498
8498
  var n = Number(s3[r]), o;
8499
- i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8499
+ i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8500
8500
  }
8501
8501
  return e;
8502
8502
  };
8503
- var nn = (s3) => {
8503
+ var on = (s3) => {
8504
8504
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
8505
8505
  var r = Number(s3[i]);
8506
8506
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
8507
8507
  }
8508
8508
  return e;
8509
8509
  };
8510
- var Ps = (s3) => (255 ^ s3) & 255;
8511
- var zs = (s3) => (255 ^ s3) + 1 & 255;
8512
- var Bi = {};
8513
- vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
8510
+ var zs = (s3) => (255 ^ s3) & 255;
8511
+ var Us = (s3) => (255 ^ s3) + 1 & 255;
8512
+ var zi = {};
8513
+ Mr(zi, { code: () => Ve, isCode: () => oe, isName: () => an, name: () => he });
8514
8514
  var oe = (s3) => he.has(s3);
8515
- var hn = (s3) => Ke.has(s3);
8515
+ var an = (s3) => Ve.has(s3);
8516
8516
  var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
8517
- var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8518
- var F = class {
8517
+ var Ve = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8518
+ var k = class {
8519
8519
  cksumValid = false;
8520
8520
  needPax = false;
8521
8521
  nullBlock = false;
@@ -8542,14 +8542,14 @@ var F = class {
8542
8542
  }
8543
8543
  decode(t, e, i, r) {
8544
8544
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8545
- this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8546
- let n = Tt(t, e + 156, 1);
8547
- if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
8548
- let h = Tt(t, e + 345, 155);
8545
+ this.path = i?.path ?? xt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Ui(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8546
+ let n = xt(t, e + 156, 1);
8547
+ if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? xt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? xt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
8548
+ let h = xt(t, e + 345, 155);
8549
8549
  this.path = h + "/" + this.path;
8550
8550
  } else {
8551
- let h = Tt(t, e + 345, 130);
8552
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
8551
+ let h = xt(t, e + 345, 130);
8552
+ h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Ui(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Ui(t, e + 488, 12);
8553
8553
  }
8554
8554
  let o = 256;
8555
8555
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -8561,8 +8561,8 @@ var F = class {
8561
8561
  }
8562
8562
  encode(t, e = 0) {
8563
8563
  if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8564
- let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
8565
- this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
8564
+ let i = this.ctime || this.atime ? 130 : 155, r = ln(this.path || "", i), n = r[0], o = r[1];
8565
+ this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = Hi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Hi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Hi(t, e + 488, 12, this.ctime) || this.needPax);
8566
8566
  let h = 256;
8567
8567
  for (let a = e; a < e + 148; a++) h += t[a];
8568
8568
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -8575,13 +8575,13 @@ var F = class {
8575
8575
  return this.#t;
8576
8576
  }
8577
8577
  set type(t) {
8578
- let e = String(Ke.get(t));
8578
+ let e = String(Ve.get(t));
8579
8579
  if (oe(e) || e === "Unsupported") this.#t = e;
8580
8580
  else if (oe(t)) this.#t = t;
8581
8581
  else throw new TypeError("invalid entry type: " + t);
8582
8582
  }
8583
8583
  };
8584
- var an = (s3, t) => {
8584
+ var ln = (s3, t) => {
8585
8585
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
8586
8586
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
8587
8587
  else {
@@ -8593,20 +8593,20 @@ var an = (s3, t) => {
8593
8593
  }
8594
8594
  return n;
8595
8595
  };
8596
- var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8597
- var Pi = (s3, t, e) => ln(at(s3, t, e));
8598
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8599
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
8600
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
8601
- var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8602
- var dn = { 12: 8589934591, 8: 2097151 };
8603
- var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
8604
- var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
8605
- var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
8606
- var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8607
- var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8608
- var En = new Array(156).join("\0");
8609
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8596
+ var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8597
+ var Ui = (s3, t, e) => cn(at(s3, t, e));
8598
+ var cn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8599
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : dn(s3, t, e);
8600
+ var fn = (s3) => isNaN(s3) ? void 0 : s3;
8601
+ var dn = (s3, t, e) => fn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8602
+ var un = { 12: 8589934591, 8: 2097151 };
8603
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > un[e] || i < 0 ? (Bs(i, s3.subarray(t, t + e)), true) : (mn(s3, t, e, i), false);
8604
+ var mn = (s3, t, e, i) => s3.write(pn(i, e), t, e, "ascii");
8605
+ var pn = (s3, t) => En(Math.floor(s3).toString(8), t);
8606
+ var En = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8607
+ var Hi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8608
+ var wn = new Array(156).join("\0");
8609
+ var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + wn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8610
8610
  var ct = class s {
8611
8611
  atime;
8612
8612
  mtime;
@@ -8633,7 +8633,7 @@ var ct = class s {
8633
8633
  if (t === "") return Buffer.allocUnsafe(0);
8634
8634
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
8635
8635
  for (let n = 0; n < 512; n++) r[n] = 0;
8636
- new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
8636
+ new k({ path: ("PaxHeader/" + Sn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
8637
8637
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
8638
8638
  return r;
8639
8639
  }
@@ -8647,13 +8647,13 @@ var ct = class s {
8647
8647
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
8648
8648
  }
8649
8649
  static parse(t, e, i = false) {
8650
- return new s(Sn(yn(t), e), i);
8650
+ return new s(yn(Rn(t), e), i);
8651
8651
  }
8652
8652
  };
8653
- var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8654
- var yn = (s3) => s3.replace(/\n$/, "").split(`
8655
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
8656
- var Rn = (s3, t) => {
8653
+ var yn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8654
+ var Rn = (s3) => s3.replace(/\n$/, "").split(`
8655
+ `).reduce(gn, /* @__PURE__ */ Object.create(null));
8656
+ var gn = (s3, t) => {
8657
8657
  let e = parseInt(t, 10);
8658
8658
  if (e !== Buffer.byteLength(t) + 1) return s3;
8659
8659
  t = t.slice((e + " ").length);
@@ -8664,7 +8664,7 @@ var Rn = (s3, t) => {
8664
8664
  };
8665
8665
  var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8666
8666
  var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8667
- var Yt = class extends D {
8667
+ var Yt = class extends A {
8668
8668
  extended;
8669
8669
  globalExtended;
8670
8670
  header;
@@ -8728,44 +8728,44 @@ var Yt = class extends D {
8728
8728
  t.path && (t.path = f(t.path)), t.linkpath && (t.linkpath = f(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e))));
8729
8729
  }
8730
8730
  };
8731
- var Lt = (s3, t, e, i = {}) => {
8731
+ var Nt = (s3, t, e, i = {}) => {
8732
8732
  s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
8733
8733
  };
8734
- var gn = 1024 * 1024;
8735
- var Zi = Buffer.from([31, 139]);
8736
- var Yi = Buffer.from([40, 181, 47, 253]);
8737
- var On = Math.max(Zi.length, Yi.length);
8734
+ var On = 1024 * 1024;
8735
+ var Ki = Buffer.from([31, 139]);
8736
+ var Vi = Buffer.from([40, 181, 47, 253]);
8737
+ var Tn = Math.max(Ki.length, Vi.length);
8738
8738
  var B = /* @__PURE__ */ Symbol("state");
8739
- var Nt = /* @__PURE__ */ Symbol("writeEntry");
8739
+ var Dt = /* @__PURE__ */ Symbol("writeEntry");
8740
8740
  var et = /* @__PURE__ */ Symbol("readEntry");
8741
- var Ui = /* @__PURE__ */ Symbol("nextEntry");
8742
- var Us = /* @__PURE__ */ Symbol("processEntry");
8741
+ var Wi = /* @__PURE__ */ Symbol("nextEntry");
8742
+ var Hs = /* @__PURE__ */ Symbol("processEntry");
8743
8743
  var V = /* @__PURE__ */ Symbol("extendedHeader");
8744
8744
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
8745
8745
  var ft = /* @__PURE__ */ Symbol("meta");
8746
- var Hs = /* @__PURE__ */ Symbol("emitMeta");
8746
+ var Ws = /* @__PURE__ */ Symbol("emitMeta");
8747
8747
  var p = /* @__PURE__ */ Symbol("buffer");
8748
8748
  var it = /* @__PURE__ */ Symbol("queue");
8749
8749
  var dt = /* @__PURE__ */ Symbol("ended");
8750
- var Hi = /* @__PURE__ */ Symbol("emittedEnd");
8750
+ var Gi = /* @__PURE__ */ Symbol("emittedEnd");
8751
8751
  var At = /* @__PURE__ */ Symbol("emit");
8752
8752
  var y = /* @__PURE__ */ Symbol("unzip");
8753
- var Ve = /* @__PURE__ */ Symbol("consumeChunk");
8754
- var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
8755
- var Wi = /* @__PURE__ */ Symbol("consumeBody");
8756
- var Ws = /* @__PURE__ */ Symbol("consumeMeta");
8757
- var Gs = /* @__PURE__ */ Symbol("consumeHeader");
8753
+ var $e = /* @__PURE__ */ Symbol("consumeChunk");
8754
+ var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
8755
+ var Zi = /* @__PURE__ */ Symbol("consumeBody");
8756
+ var Gs = /* @__PURE__ */ Symbol("consumeMeta");
8757
+ var Zs = /* @__PURE__ */ Symbol("consumeHeader");
8758
8758
  var le = /* @__PURE__ */ Symbol("consuming");
8759
- var Gi = /* @__PURE__ */ Symbol("bufferConcat");
8760
- var Xe = /* @__PURE__ */ Symbol("maybeEnd");
8759
+ var Yi = /* @__PURE__ */ Symbol("bufferConcat");
8760
+ var qe = /* @__PURE__ */ Symbol("maybeEnd");
8761
8761
  var Kt = /* @__PURE__ */ Symbol("writing");
8762
8762
  var ut = /* @__PURE__ */ Symbol("aborted");
8763
- var qe = /* @__PURE__ */ Symbol("onDone");
8764
- var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
8765
- var je = /* @__PURE__ */ Symbol("sawNullBlock");
8766
- var Qe = /* @__PURE__ */ Symbol("sawEOF");
8767
- var Zs = /* @__PURE__ */ Symbol("closeStream");
8768
- var Tn = () => true;
8763
+ var Qe = /* @__PURE__ */ Symbol("onDone");
8764
+ var It = /* @__PURE__ */ Symbol("sawValidEntry");
8765
+ var Je = /* @__PURE__ */ Symbol("sawNullBlock");
8766
+ var je = /* @__PURE__ */ Symbol("sawEOF");
8767
+ var Ys = /* @__PURE__ */ Symbol("closeStream");
8768
+ var xn = () => true;
8769
8769
  var st = class extends _n {
8770
8770
  file;
8771
8771
  strict;
@@ -8778,7 +8778,7 @@ var st = class extends _n {
8778
8778
  [it] = [];
8779
8779
  [p];
8780
8780
  [et];
8781
- [Nt];
8781
+ [Dt];
8782
8782
  [B] = "begin";
8783
8783
  [ft] = "";
8784
8784
  [V];
@@ -8786,88 +8786,88 @@ var st = class extends _n {
8786
8786
  [dt] = false;
8787
8787
  [y];
8788
8788
  [ut] = false;
8789
- [Dt];
8789
+ [It];
8790
+ [Je] = false;
8790
8791
  [je] = false;
8791
- [Qe] = false;
8792
8792
  [Kt] = false;
8793
8793
  [le] = false;
8794
- [Hi] = false;
8794
+ [Gi] = false;
8795
8795
  constructor(t = {}) {
8796
- super(), this.file = t.file || "", this.on(qe, () => {
8797
- (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8798
- }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
8796
+ super(), this.file = t.file || "", this.on(Qe, () => {
8797
+ (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8798
+ }), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
8799
8799
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
8800
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
8800
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || On, this.filter = typeof t.filter == "function" ? t.filter : xn;
8801
8801
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
8802
8802
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
8803
8803
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
8804
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
8804
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ys]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
8805
8805
  }
8806
8806
  warn(t, e, i = {}) {
8807
- Lt(this, t, e, i);
8807
+ Nt(this, t, e, i);
8808
8808
  }
8809
- [Gs](t, e) {
8810
- this[Dt] === void 0 && (this[Dt] = false);
8809
+ [Zs](t, e) {
8810
+ this[It] === void 0 && (this[It] = false);
8811
8811
  let i;
8812
8812
  try {
8813
- i = new F(t, e, this[V], this[ae]);
8813
+ i = new k(t, e, this[V], this[ae]);
8814
8814
  } catch (r) {
8815
8815
  return this.warn("TAR_ENTRY_INVALID", r);
8816
8816
  }
8817
- if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
8818
- else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8817
+ if (i.nullBlock) this[Je] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[Je] = true, this[At]("nullBlock"));
8818
+ else if (this[Je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8819
8819
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
8820
8820
  else {
8821
8821
  let r = i.type;
8822
8822
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
8823
8823
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
8824
8824
  else {
8825
- let n = this[Nt] = new Yt(i, this[V], this[ae]);
8826
- if (!this[Dt]) if (n.remain) {
8825
+ let n = this[Dt] = new Yt(i, this[V], this[ae]);
8826
+ if (!this[It]) if (n.remain) {
8827
8827
  let o = () => {
8828
- n.invalid || (this[Dt] = true);
8828
+ n.invalid || (this[It] = true);
8829
8829
  };
8830
8830
  n.on("end", o);
8831
- } else this[Dt] = true;
8832
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
8831
+ } else this[It] = true;
8832
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Wi]())));
8833
8833
  }
8834
8834
  }
8835
8835
  }
8836
- [Zs]() {
8836
+ [Ys]() {
8837
8837
  queueMicrotask(() => this.emit("close"));
8838
8838
  }
8839
- [Us](t) {
8839
+ [Hs](t) {
8840
8840
  let e = true;
8841
8841
  if (!t) this[et] = void 0, e = false;
8842
8842
  else if (Array.isArray(t)) {
8843
8843
  let [i, ...r] = t;
8844
8844
  this.emit(i, ...r);
8845
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
8845
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Wi]()), e = false);
8846
8846
  return e;
8847
8847
  }
8848
- [Ui]() {
8848
+ [Wi]() {
8849
8849
  do
8850
8850
  ;
8851
- while (this[Us](this[it].shift()));
8851
+ while (this[Hs](this[it].shift()));
8852
8852
  if (this[it].length === 0) {
8853
8853
  let t = this[et];
8854
8854
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8855
8855
  }
8856
8856
  }
8857
- [Wi](t, e) {
8858
- let i = this[Nt];
8857
+ [Zi](t, e) {
8858
+ let i = this[Dt];
8859
8859
  if (!i) throw new Error("attempt to consume body without entry??");
8860
8860
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
8861
- return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
8861
+ return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
8862
8862
  }
8863
- [Ws](t, e) {
8864
- let i = this[Nt], r = this[Wi](t, e);
8865
- return !this[Nt] && i && this[Hs](i), r;
8863
+ [Gs](t, e) {
8864
+ let i = this[Dt], r = this[Zi](t, e);
8865
+ return !this[Dt] && i && this[Ws](i), r;
8866
8866
  }
8867
8867
  [At](t, e, i) {
8868
8868
  this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
8869
8869
  }
8870
- [Hs](t) {
8870
+ [Ws](t) {
8871
8871
  switch (this[At]("meta", this[ft]), t.type) {
8872
8872
  case "ExtendedHeader":
8873
8873
  case "OldExtendedHeader":
@@ -8897,12 +8897,12 @@ var st = class extends _n {
8897
8897
  write(t, e, i) {
8898
8898
  if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
8899
8899
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
8900
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
8901
- for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
8900
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Tn) return this[p] = t, i?.(), true;
8901
+ for (let a = 0; this[y] === void 0 && a < Ki.length; a++) t[a] !== Ki[a] && (this[y] = false);
8902
8902
  let o = false;
8903
8903
  if (this[y] === false && this.zstd !== false) {
8904
8904
  o = true;
8905
- for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
8905
+ for (let a = 0; a < Vi.length; a++) if (t[a] !== Vi[a]) {
8906
8906
  o = false;
8907
8907
  break;
8908
8908
  }
@@ -8911,67 +8911,67 @@ var st = class extends _n {
8911
8911
  if (this[y] === false && h) if (t.length < 512) if (this[dt]) this.brotli = true;
8912
8912
  else return this[p] = t, i?.(), true;
8913
8913
  else try {
8914
- new F(t.subarray(0, 512)), this.brotli = false;
8914
+ new k(t.subarray(0, 512)), this.brotli = false;
8915
8915
  } catch {
8916
8916
  this.brotli = true;
8917
8917
  }
8918
8918
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
8919
8919
  let a = this[dt];
8920
- this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
8921
- this[dt] = true, this[Ve]();
8920
+ this[dt] = false, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
8921
+ this[dt] = true, this[$e]();
8922
8922
  }), this[Kt] = true;
8923
8923
  let l = !!this[y][a ? "end" : "write"](t);
8924
8924
  return this[Kt] = false, i?.(), l;
8925
8925
  }
8926
8926
  }
8927
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
8927
+ this[Kt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Kt] = false;
8928
8928
  let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
8929
8929
  return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
8930
8930
  }
8931
- [Gi](t) {
8931
+ [Yi](t) {
8932
8932
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
8933
8933
  }
8934
- [Xe]() {
8935
- if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
8936
- this[Hi] = true;
8937
- let t = this[Nt];
8934
+ [qe]() {
8935
+ if (this[dt] && !this[Gi] && !this[ut] && !this[le]) {
8936
+ this[Gi] = true;
8937
+ let t = this[Dt];
8938
8938
  if (t && t.blockRemain) {
8939
8939
  let e = this[p] ? this[p].length : 0;
8940
8940
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
8941
8941
  }
8942
- this[At](qe);
8942
+ this[At](Qe);
8943
8943
  }
8944
8944
  }
8945
- [Ve](t) {
8946
- if (this[le] && t) this[Gi](t);
8947
- else if (!t && !this[p]) this[Xe]();
8945
+ [$e](t) {
8946
+ if (this[le] && t) this[Yi](t);
8947
+ else if (!t && !this[p]) this[qe]();
8948
8948
  else if (t) {
8949
8949
  if (this[le] = true, this[p]) {
8950
- this[Gi](t);
8950
+ this[Yi](t);
8951
8951
  let e = this[p];
8952
- this[p] = void 0, this[$e](e);
8953
- } else this[$e](t);
8954
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
8952
+ this[p] = void 0, this[Xe](e);
8953
+ } else this[Xe](t);
8954
+ for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
8955
8955
  let e = this[p];
8956
- this[p] = void 0, this[$e](e);
8956
+ this[p] = void 0, this[Xe](e);
8957
8957
  }
8958
8958
  this[le] = false;
8959
8959
  }
8960
- (!this[p] || this[dt]) && this[Xe]();
8960
+ (!this[p] || this[dt]) && this[qe]();
8961
8961
  }
8962
- [$e](t) {
8962
+ [Xe](t) {
8963
8963
  let e = 0, i = t.length;
8964
- for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
8964
+ for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
8965
8965
  case "begin":
8966
8966
  case "header":
8967
- this[Gs](t, e), e += 512;
8967
+ this[Zs](t, e), e += 512;
8968
8968
  break;
8969
8969
  case "ignore":
8970
8970
  case "body":
8971
- e += this[Wi](t, e);
8971
+ e += this[Zi](t, e);
8972
8972
  break;
8973
8973
  case "meta":
8974
- e += this[Ws](t, e);
8974
+ e += this[Gs](t, e);
8975
8975
  break;
8976
8976
  default:
8977
8977
  throw new Error("invalid state: " + this[B]);
@@ -8979,7 +8979,7 @@ var st = class extends _n {
8979
8979
  e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
8980
8980
  }
8981
8981
  end(t, e, i) {
8982
- return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
8982
+ return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[qe]())), this;
8983
8983
  }
8984
8984
  };
8985
8985
  var mt = (s3) => {
@@ -8987,19 +8987,19 @@ var mt = (s3) => {
8987
8987
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
8988
8988
  return e === -1 ? s3 : s3.slice(0, e);
8989
8989
  };
8990
- var Nn = (s3) => {
8990
+ var Dn = (s3) => {
8991
8991
  let t = s3.onReadEntry;
8992
8992
  s3.onReadEntry = t ? (e) => {
8993
8993
  t(e), e.resume();
8994
8994
  } : (e) => e.resume();
8995
8995
  };
8996
- var Ki = (s3, t) => {
8996
+ var $i = (s3, t) => {
8997
8997
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
8998
- let h = o || Ln(n).root || ".", a;
8998
+ let h = o || Nn(n).root || ".", a;
8999
8999
  if (n === h) a = false;
9000
9000
  else {
9001
9001
  let l = e.get(n);
9002
- a = l !== void 0 ? l : r(xn(n), h);
9002
+ a = l !== void 0 ? l : r(Ln(n), h);
9003
9003
  }
9004
9004
  return e.set(n, a), a;
9005
9005
  };
@@ -9029,7 +9029,7 @@ var An = (s3) => {
9029
9029
  }
9030
9030
  }
9031
9031
  };
9032
- var Dn = (s3, t) => {
9032
+ var In = (s3, t) => {
9033
9033
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9034
9034
  return new Promise((o, h) => {
9035
9035
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
@@ -9041,46 +9041,46 @@ var Dn = (s3, t) => {
9041
9041
  });
9042
9042
  });
9043
9043
  };
9044
- var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9045
- t?.length && Ki(s3, t), s3.noResume || Nn(s3);
9044
+ var Ct = K(An, In, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9045
+ t?.length && $i(s3, t), s3.noResume || Dn(s3);
9046
9046
  });
9047
- var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9048
- var { isAbsolute: Cn, parse: Ys } = In;
9047
+ var Xi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9048
+ var { isAbsolute: kn, parse: Ks } = Cn;
9049
9049
  var ce = (s3) => {
9050
- let t = "", e = Ys(s3);
9051
- for (; Cn(s3) || e.root; ) {
9050
+ let t = "", e = Ks(s3);
9051
+ for (; kn(s3) || e.root; ) {
9052
9052
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
9053
- s3 = s3.slice(i.length), t += i, e = Ys(s3);
9053
+ s3 = s3.slice(i.length), t += i, e = Ks(s3);
9054
9054
  }
9055
9055
  return [t, s3];
9056
9056
  };
9057
- var Je = ["|", "<", ">", "?", ":"];
9058
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9059
- var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
9060
- var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
9061
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
9062
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
9063
- var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9064
- var vn = 16 * 1024 * 1024;
9065
- var Xs = /* @__PURE__ */ Symbol("process");
9066
- var qs = /* @__PURE__ */ Symbol("file");
9067
- var js = /* @__PURE__ */ Symbol("directory");
9057
+ var ti = ["|", "<", ">", "?", ":"];
9058
+ var qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9059
+ var Fn = new Map(ti.map((s3, t) => [s3, qi[t]]));
9060
+ var vn = new Map(qi.map((s3, t) => [s3, ti[t]]));
9061
+ var Qi = (s3) => ti.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
9062
+ var Vs = (s3) => qi.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
9063
+ var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9064
+ var Mn = 16 * 1024 * 1024;
9065
+ var qs = /* @__PURE__ */ Symbol("process");
9066
+ var Qs = /* @__PURE__ */ Symbol("file");
9067
+ var Js = /* @__PURE__ */ Symbol("directory");
9068
9068
  var ji = /* @__PURE__ */ Symbol("symlink");
9069
- var Qs = /* @__PURE__ */ Symbol("hardlink");
9069
+ var js = /* @__PURE__ */ Symbol("hardlink");
9070
9070
  var fe = /* @__PURE__ */ Symbol("header");
9071
- var ti = /* @__PURE__ */ Symbol("read");
9072
- var Qi = /* @__PURE__ */ Symbol("lstat");
9073
- var ei = /* @__PURE__ */ Symbol("onlstat");
9074
- var Ji = /* @__PURE__ */ Symbol("onread");
9075
- var ts = /* @__PURE__ */ Symbol("onreadlink");
9076
- var es = /* @__PURE__ */ Symbol("openfile");
9077
- var is = /* @__PURE__ */ Symbol("onopenfile");
9071
+ var ei = /* @__PURE__ */ Symbol("read");
9072
+ var ts = /* @__PURE__ */ Symbol("lstat");
9073
+ var ii = /* @__PURE__ */ Symbol("onlstat");
9074
+ var es = /* @__PURE__ */ Symbol("onread");
9075
+ var is = /* @__PURE__ */ Symbol("onreadlink");
9076
+ var ss = /* @__PURE__ */ Symbol("openfile");
9077
+ var rs = /* @__PURE__ */ Symbol("onopenfile");
9078
9078
  var pt = /* @__PURE__ */ Symbol("close");
9079
- var ii = /* @__PURE__ */ Symbol("mode");
9080
- var ss = /* @__PURE__ */ Symbol("awaitDrain");
9081
- var qi = /* @__PURE__ */ Symbol("ondrain");
9079
+ var si = /* @__PURE__ */ Symbol("mode");
9080
+ var ns = /* @__PURE__ */ Symbol("awaitDrain");
9081
+ var Ji = /* @__PURE__ */ Symbol("ondrain");
9082
9082
  var X = /* @__PURE__ */ Symbol("prefix");
9083
- var de = class extends D {
9083
+ var de = class extends A {
9084
9084
  path;
9085
9085
  portable;
9086
9086
  myuid = process.getuid && process.getuid() || 0;
@@ -9113,109 +9113,109 @@ var de = class extends D {
9113
9113
  #t = false;
9114
9114
  constructor(t, e = {}) {
9115
9115
  let i = re(e);
9116
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9116
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Mn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9117
9117
  let r = false;
9118
9118
  if (!this.preservePaths) {
9119
9119
  let [o, h] = ce(this.path);
9120
9120
  o && typeof h == "string" && (this.path = h, r = o);
9121
9121
  }
9122
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || $s.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
9122
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || Xs.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
9123
9123
  let n = this.statCache.get(this.absolute);
9124
- n ? this[ei](n) : this[Qi]();
9124
+ n ? this[ii](n) : this[ts]();
9125
9125
  }
9126
9126
  warn(t, e, i = {}) {
9127
- return Lt(this, t, e, i);
9127
+ return Nt(this, t, e, i);
9128
9128
  }
9129
9129
  emit(t, ...e) {
9130
9130
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9131
9131
  }
9132
- [Qi]() {
9132
+ [ts]() {
9133
9133
  $.lstat(this.absolute, (t, e) => {
9134
9134
  if (t) return this.emit("error", t);
9135
- this[ei](e);
9135
+ this[ii](e);
9136
9136
  });
9137
9137
  }
9138
- [ei](t) {
9139
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
9138
+ [ii](t) {
9139
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Bn(t), this.emit("stat", t), this[qs]();
9140
9140
  }
9141
- [Xs]() {
9141
+ [qs]() {
9142
9142
  switch (this.type) {
9143
9143
  case "File":
9144
- return this[qs]();
9144
+ return this[Qs]();
9145
9145
  case "Directory":
9146
- return this[js]();
9146
+ return this[Js]();
9147
9147
  case "SymbolicLink":
9148
9148
  return this[ji]();
9149
9149
  default:
9150
9150
  return this.end();
9151
9151
  }
9152
9152
  }
9153
- [ii](t) {
9154
- return Vi(t, this.type === "Directory", this.portable);
9153
+ [si](t) {
9154
+ return Xi(t, this.type === "Directory", this.portable);
9155
9155
  }
9156
9156
  [X](t) {
9157
- return Js(t, this.prefix);
9157
+ return tr(t, this.prefix);
9158
9158
  }
9159
9159
  [fe]() {
9160
9160
  if (!this.stat) throw new Error("cannot write header before stat");
9161
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
9161
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new k({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[si](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
9162
9162
  let t = this.header?.block;
9163
9163
  if (!t) throw new Error("failed to encode header");
9164
9164
  super.write(t);
9165
9165
  }
9166
- [js]() {
9166
+ [Js]() {
9167
9167
  if (!this.stat) throw new Error("cannot create directory entry without stat");
9168
9168
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9169
9169
  }
9170
9170
  [ji]() {
9171
9171
  $.readlink(this.absolute, (t, e) => {
9172
9172
  if (t) return this.emit("error", t);
9173
- this[ts](e);
9173
+ this[is](e);
9174
9174
  });
9175
9175
  }
9176
- [ts](t) {
9176
+ [is](t) {
9177
9177
  this.linkpath = f(t), this[fe](), this.end();
9178
9178
  }
9179
- [Qs](t) {
9179
+ [js](t) {
9180
9180
  if (!this.stat) throw new Error("cannot create link entry without stat");
9181
- this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9181
+ this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9182
9182
  }
9183
- [qs]() {
9183
+ [Qs]() {
9184
9184
  if (!this.stat) throw new Error("cannot create file entry without stat");
9185
9185
  if (this.stat.nlink > 1) {
9186
9186
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
9187
- if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
9187
+ if (e?.indexOf(this.cwd) === 0) return this[js](e);
9188
9188
  this.linkCache.set(t, this.absolute);
9189
9189
  }
9190
9190
  if (this[fe](), this.stat.size === 0) return this.end();
9191
- this[es]();
9191
+ this[ss]();
9192
9192
  }
9193
- [es]() {
9193
+ [ss]() {
9194
9194
  $.open(this.absolute, "r", (t, e) => {
9195
9195
  if (t) return this.emit("error", t);
9196
- this[is](e);
9196
+ this[rs](e);
9197
9197
  });
9198
9198
  }
9199
- [is](t) {
9199
+ [rs](t) {
9200
9200
  if (this.fd = t, this.#t) return this[pt]();
9201
9201
  if (!this.stat) throw new Error("should stat before calling onopenfile");
9202
9202
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
9203
9203
  let e = Math.min(this.blockLen, this.maxReadSize);
9204
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
9204
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ei]();
9205
9205
  }
9206
- [ti]() {
9206
+ [ei]() {
9207
9207
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9208
9208
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9209
9209
  $.read(t, e, i, r, n, (o, h) => {
9210
9210
  if (o) return this[pt](() => this.emit("error", o));
9211
- this[Ji](h);
9211
+ this[es](h);
9212
9212
  });
9213
9213
  }
9214
9214
  [pt](t = () => {
9215
9215
  }) {
9216
9216
  this.fd !== void 0 && $.close(this.fd, t);
9217
9217
  }
9218
- [Ji](t) {
9218
+ [es](t) {
9219
9219
  if (t <= 0 && this.remain > 0) {
9220
9220
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
9221
9221
  return this[pt](() => this.emit("error", r));
@@ -9227,9 +9227,9 @@ var de = class extends D {
9227
9227
  if (!this.buf) throw new Error("should have created buffer prior to reading");
9228
9228
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
9229
9229
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
9230
- this.write(e) ? this[qi]() : this[ss](() => this[qi]());
9230
+ this.write(e) ? this[Ji]() : this[ns](() => this[Ji]());
9231
9231
  }
9232
- [ss](t) {
9232
+ [ns](t) {
9233
9233
  this.once("drain", t);
9234
9234
  }
9235
9235
  write(t, e, i) {
@@ -9239,30 +9239,30 @@ var de = class extends D {
9239
9239
  }
9240
9240
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
9241
9241
  }
9242
- [qi]() {
9242
+ [Ji]() {
9243
9243
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
9244
9244
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
9245
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
9245
+ this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ei]();
9246
9246
  }
9247
9247
  };
9248
- var si = class extends de {
9248
+ var ri = class extends de {
9249
9249
  sync = true;
9250
- [Qi]() {
9251
- this[ei]($.lstatSync(this.absolute));
9250
+ [ts]() {
9251
+ this[ii]($.lstatSync(this.absolute));
9252
9252
  }
9253
9253
  [ji]() {
9254
- this[ts]($.readlinkSync(this.absolute));
9254
+ this[is]($.readlinkSync(this.absolute));
9255
9255
  }
9256
- [es]() {
9257
- this[is]($.openSync(this.absolute, "r"));
9256
+ [ss]() {
9257
+ this[rs]($.openSync(this.absolute, "r"));
9258
9258
  }
9259
- [ti]() {
9259
+ [ei]() {
9260
9260
  let t = true;
9261
9261
  try {
9262
9262
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9263
9263
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9264
9264
  let h = $.readSync(e, i, r, n, o);
9265
- this[Ji](h), t = false;
9265
+ this[es](h), t = false;
9266
9266
  } finally {
9267
9267
  if (t) try {
9268
9268
  this[pt](() => {
@@ -9271,7 +9271,7 @@ var si = class extends de {
9271
9271
  }
9272
9272
  }
9273
9273
  }
9274
- [ss](t) {
9274
+ [ns](t) {
9275
9275
  t();
9276
9276
  }
9277
9277
  [pt](t = () => {
@@ -9279,7 +9279,7 @@ var si = class extends de {
9279
9279
  this.fd !== void 0 && $.closeSync(this.fd), t();
9280
9280
  }
9281
9281
  };
9282
- var ri = class extends D {
9282
+ var ni = class extends A {
9283
9283
  blockLen = 0;
9284
9284
  blockRemain = 0;
9285
9285
  buf = 0;
@@ -9308,29 +9308,29 @@ var ri = class extends D {
9308
9308
  size;
9309
9309
  onWriteEntry;
9310
9310
  warn(t, e, i = {}) {
9311
- return Lt(this, t, e, i);
9311
+ return Nt(this, t, e, i);
9312
9312
  }
9313
9313
  constructor(t, e = {}) {
9314
9314
  let i = re(e);
9315
9315
  super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
9316
9316
  let { type: r } = t;
9317
9317
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
9318
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9318
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[si](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9319
9319
  let n = false;
9320
9320
  if (!this.preservePaths) {
9321
9321
  let [h, a] = ce(this.path);
9322
9322
  h && typeof a == "string" && (this.path = a, n = h);
9323
9323
  }
9324
- this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
9324
+ this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new k({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
9325
9325
  let o = this.header?.block;
9326
9326
  if (!o) throw new Error("failed to encode header");
9327
9327
  super.write(o), t.pipe(this);
9328
9328
  }
9329
9329
  [X](t) {
9330
- return Js(t, this.prefix);
9330
+ return tr(t, this.prefix);
9331
9331
  }
9332
- [ii](t) {
9333
- return Vi(t, this.type === "Directory", this.portable);
9332
+ [si](t) {
9333
+ return Xi(t, this.type === "Directory", this.portable);
9334
9334
  }
9335
9335
  write(t, e, i) {
9336
9336
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -9342,8 +9342,8 @@ var ri = class extends D {
9342
9342
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
9343
9343
  }
9344
9344
  };
9345
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9346
- var ni = class s2 {
9345
+ var Bn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9346
+ var oi = class s2 {
9347
9347
  tail;
9348
9348
  head;
9349
9349
  length = 0;
@@ -9374,11 +9374,11 @@ var ni = class s2 {
9374
9374
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
9375
9375
  }
9376
9376
  push(...t) {
9377
- for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
9377
+ for (let e = 0, i = t.length; e < i; e++) zn(this, t[e]);
9378
9378
  return this.length;
9379
9379
  }
9380
9380
  unshift(...t) {
9381
- for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
9381
+ for (var e = 0, i = t.length; e < i; e++) Un(this, t[e]);
9382
9382
  return this.length;
9383
9383
  }
9384
9384
  pop() {
@@ -9474,7 +9474,7 @@ var ni = class s2 {
9474
9474
  let n = [];
9475
9475
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
9476
9476
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
9477
- for (let o of i) r = Bn(this, r, o);
9477
+ for (let o of i) r = Pn(this, r, o);
9478
9478
  return n;
9479
9479
  }
9480
9480
  reverse() {
@@ -9486,14 +9486,14 @@ var ni = class s2 {
9486
9486
  return this.head = e, this.tail = t, this;
9487
9487
  }
9488
9488
  };
9489
- function Bn(s3, t, e) {
9489
+ function Pn(s3, t, e) {
9490
9490
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
9491
9491
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
9492
9492
  }
9493
- function Pn(s3, t) {
9493
+ function zn(s3, t) {
9494
9494
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9495
9495
  }
9496
- function zn(s3, t) {
9496
+ function Un(s3, t) {
9497
9497
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9498
9498
  }
9499
9499
  var ue = class {
@@ -9505,41 +9505,43 @@ var ue = class {
9505
9505
  this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
9506
9506
  }
9507
9507
  };
9508
- var di = class {
9508
+ var mi = class {
9509
9509
  path;
9510
9510
  absolute;
9511
9511
  entry;
9512
9512
  stat;
9513
9513
  readdir;
9514
9514
  pending = false;
9515
+ pendingLink = false;
9515
9516
  ignore = false;
9516
9517
  piped = false;
9517
9518
  constructor(t, e) {
9518
9519
  this.path = t || "./", this.absolute = e;
9519
9520
  }
9520
9521
  };
9521
- var tr = Buffer.alloc(1024);
9522
- var oi = /* @__PURE__ */ Symbol("onStat");
9522
+ var er = Buffer.alloc(1024);
9523
+ var ai = /* @__PURE__ */ Symbol("onStat");
9523
9524
  var me = /* @__PURE__ */ Symbol("ended");
9524
9525
  var W = /* @__PURE__ */ Symbol("queue");
9525
- var Ct = /* @__PURE__ */ Symbol("current");
9526
- var Ft = /* @__PURE__ */ Symbol("process");
9527
- var pe = /* @__PURE__ */ Symbol("processing");
9528
- var rs = /* @__PURE__ */ Symbol("processJob");
9526
+ var pe = /* @__PURE__ */ Symbol("queue");
9527
+ var Et = /* @__PURE__ */ Symbol("current");
9528
+ var kt = /* @__PURE__ */ Symbol("process");
9529
+ var Ee = /* @__PURE__ */ Symbol("processing");
9530
+ var hi = /* @__PURE__ */ Symbol("processJob");
9529
9531
  var G = /* @__PURE__ */ Symbol("jobs");
9530
- var ns = /* @__PURE__ */ Symbol("jobDone");
9531
- var hi = /* @__PURE__ */ Symbol("addFSEntry");
9532
- var er = /* @__PURE__ */ Symbol("addTarEntry");
9533
- var as = /* @__PURE__ */ Symbol("stat");
9534
- var ls = /* @__PURE__ */ Symbol("readdir");
9535
- var ai = /* @__PURE__ */ Symbol("onreaddir");
9536
- var li = /* @__PURE__ */ Symbol("pipe");
9537
- var ir = /* @__PURE__ */ Symbol("entry");
9538
- var os = /* @__PURE__ */ Symbol("entryOpt");
9539
- var ci = /* @__PURE__ */ Symbol("writeEntryClass");
9540
- var rr = /* @__PURE__ */ Symbol("write");
9541
- var hs = /* @__PURE__ */ Symbol("ondrain");
9542
- var Et = class extends D {
9532
+ var os = /* @__PURE__ */ Symbol("jobDone");
9533
+ var li = /* @__PURE__ */ Symbol("addFSEntry");
9534
+ var ir = /* @__PURE__ */ Symbol("addTarEntry");
9535
+ var ls = /* @__PURE__ */ Symbol("stat");
9536
+ var cs = /* @__PURE__ */ Symbol("readdir");
9537
+ var ci = /* @__PURE__ */ Symbol("onreaddir");
9538
+ var fi = /* @__PURE__ */ Symbol("pipe");
9539
+ var sr = /* @__PURE__ */ Symbol("entry");
9540
+ var hs = /* @__PURE__ */ Symbol("entryOpt");
9541
+ var di = /* @__PURE__ */ Symbol("writeEntryClass");
9542
+ var nr = /* @__PURE__ */ Symbol("write");
9543
+ var as = /* @__PURE__ */ Symbol("ondrain");
9544
+ var wt = class extends A {
9543
9545
  sync = false;
9544
9546
  opt;
9545
9547
  cwd;
@@ -9560,123 +9562,139 @@ var Et = class extends D {
9560
9562
  mtime;
9561
9563
  filter;
9562
9564
  jobs;
9563
- [ci];
9565
+ [di];
9564
9566
  onWriteEntry;
9565
9567
  [W];
9568
+ [pe] = /* @__PURE__ */ new Map();
9566
9569
  [G] = 0;
9567
- [pe] = false;
9570
+ [Ee] = false;
9568
9571
  [me] = false;
9569
9572
  constructor(t = {}) {
9570
- if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9573
+ if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[di] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9571
9574
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
9572
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
9575
+ if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
9573
9576
  let e = this.zip;
9574
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
9575
- } else this.on("drain", this[hs]);
9576
- this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
9577
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[as]()), this.on("resume", () => e.resume());
9578
+ } else this.on("drain", this[as]);
9579
+ this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new oi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[me] = false;
9577
9580
  }
9578
- [rr](t) {
9581
+ [nr](t) {
9579
9582
  return super.write(t);
9580
9583
  }
9581
9584
  add(t) {
9582
9585
  return this.write(t), this;
9583
9586
  }
9584
9587
  end(t, e, i) {
9585
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[Ft](), i && i(), this;
9588
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[kt](), i && i(), this;
9586
9589
  }
9587
9590
  write(t) {
9588
9591
  if (this[me]) throw new Error("write after end");
9589
- return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
9592
+ return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
9590
9593
  }
9591
- [er](t) {
9592
- let e = f(sr.resolve(this.cwd, t.path));
9594
+ [ir](t) {
9595
+ let e = f(rr.resolve(this.cwd, t.path));
9593
9596
  if (!this.filter(t.path, t)) t.resume();
9594
9597
  else {
9595
- let i = new di(t.path, e);
9596
- i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
9598
+ let i = new mi(t.path, e);
9599
+ i.entry = new ni(t, this[hs](i)), i.entry.on("end", () => this[os](i)), this[G] += 1, this[W].push(i);
9597
9600
  }
9598
- this[Ft]();
9601
+ this[kt]();
9599
9602
  }
9600
- [hi](t) {
9601
- let e = f(sr.resolve(this.cwd, t));
9602
- this[W].push(new di(t, e)), this[Ft]();
9603
+ [li](t) {
9604
+ let e = f(rr.resolve(this.cwd, t));
9605
+ this[W].push(new mi(t, e)), this[kt]();
9603
9606
  }
9604
- [as](t) {
9607
+ [ls](t) {
9605
9608
  t.pending = true, this[G] += 1;
9606
9609
  let e = this.follow ? "stat" : "lstat";
9607
- fi[e](t.absolute, (i, r) => {
9608
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
9610
+ ui[e](t.absolute, (i, r) => {
9611
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
9609
9612
  });
9610
9613
  }
9611
- [oi](t, e) {
9612
- this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
9614
+ [ai](t, e) {
9615
+ if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
9616
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
9617
+ else {
9618
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9619
+ r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
9620
+ }
9621
+ this[kt]();
9613
9622
  }
9614
- [ls](t) {
9615
- t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
9623
+ [cs](t) {
9624
+ t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
9616
9625
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
9617
- this[ai](t, i);
9626
+ this[ci](t, i);
9618
9627
  });
9619
9628
  }
9620
- [ai](t, e) {
9621
- this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
9629
+ [ci](t, e) {
9630
+ this.readdirCache.set(t.absolute, e), t.readdir = e, this[kt]();
9622
9631
  }
9623
- [Ft]() {
9624
- if (!this[pe]) {
9625
- this[pe] = true;
9626
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
9632
+ [kt]() {
9633
+ if (!this[Ee]) {
9634
+ this[Ee] = true;
9635
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
9627
9636
  let e = t.next;
9628
9637
  this[W].removeNode(t), t.next = e;
9629
9638
  }
9630
- this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
9639
+ this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
9631
9640
  }
9632
9641
  }
9633
- get [Ct]() {
9642
+ get [Et]() {
9634
9643
  return this[W] && this[W].head && this[W].head.value;
9635
9644
  }
9636
- [ns](t) {
9637
- this[W].shift(), this[G] -= 1, this[Ft]();
9645
+ [os](t) {
9646
+ this[W].shift(), this[G] -= 1;
9647
+ let { stat: e } = t;
9648
+ if (e && e.isFile() && e.nlink > 1) {
9649
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9650
+ if (r) {
9651
+ this[pe].delete(i);
9652
+ for (let n of r) n.pending = false, this[hi](n);
9653
+ }
9654
+ }
9655
+ this[kt]();
9638
9656
  }
9639
- [rs](t) {
9640
- if (!t.pending) {
9657
+ [hi](t) {
9658
+ if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
9641
9659
  if (t.entry) {
9642
- t === this[Ct] && !t.piped && this[li](t);
9660
+ t === this[Et] && !t.piped && this[fi](t);
9643
9661
  return;
9644
9662
  }
9645
9663
  if (!t.stat) {
9646
9664
  let e = this.statCache.get(t.absolute);
9647
- e ? this[oi](t, e) : this[as](t);
9665
+ e ? this[ai](t, e) : this[ls](t);
9648
9666
  }
9649
9667
  if (t.stat && !t.ignore) {
9650
9668
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
9651
9669
  let e = this.readdirCache.get(t.absolute);
9652
- if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
9670
+ if (e ? this[ci](t, e) : this[cs](t), !t.readdir) return;
9653
9671
  }
9654
- if (t.entry = this[ir](t), !t.entry) {
9672
+ if (t.entry = this[sr](t), !t.entry) {
9655
9673
  t.ignore = true;
9656
9674
  return;
9657
9675
  }
9658
- t === this[Ct] && !t.piped && this[li](t);
9676
+ t === this[Et] && !t.piped && this[fi](t);
9659
9677
  }
9660
9678
  }
9661
9679
  }
9662
- [os](t) {
9680
+ [hs](t) {
9663
9681
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
9664
9682
  }
9665
- [ir](t) {
9683
+ [sr](t) {
9666
9684
  this[G] += 1;
9667
9685
  try {
9668
- return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
9686
+ return new this[di](t.path, this[hs](t)).on("end", () => this[os](t)).on("error", (i) => this.emit("error", i));
9669
9687
  } catch (e) {
9670
9688
  this.emit("error", e);
9671
9689
  }
9672
9690
  }
9673
- [hs]() {
9674
- this[Ct] && this[Ct].entry && this[Ct].entry.resume();
9691
+ [as]() {
9692
+ this[Et] && this[Et].entry && this[Et].entry.resume();
9675
9693
  }
9676
- [li](t) {
9694
+ [fi](t) {
9677
9695
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
9678
9696
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9679
- this[hi](o + r);
9697
+ this[li](o + r);
9680
9698
  });
9681
9699
  let e = t.entry, i = this.zip;
9682
9700
  if (!e) throw new Error("cannot pipe without source");
@@ -9690,137 +9708,137 @@ var Et = class extends D {
9690
9708
  return this.zip && this.zip.pause(), super.pause();
9691
9709
  }
9692
9710
  warn(t, e, i = {}) {
9693
- Lt(this, t, e, i);
9711
+ Nt(this, t, e, i);
9694
9712
  }
9695
9713
  };
9696
- var kt = class extends Et {
9714
+ var Ft = class extends wt {
9697
9715
  sync = true;
9698
9716
  constructor(t) {
9699
- super(t), this[ci] = si;
9717
+ super(t), this[di] = ri;
9700
9718
  }
9701
9719
  pause() {
9702
9720
  }
9703
9721
  resume() {
9704
9722
  }
9705
- [as](t) {
9723
+ [ls](t) {
9706
9724
  let e = this.follow ? "statSync" : "lstatSync";
9707
- this[oi](t, fi[e](t.absolute));
9725
+ this[ai](t, ui[e](t.absolute));
9708
9726
  }
9709
- [ls](t) {
9710
- this[ai](t, fi.readdirSync(t.absolute));
9727
+ [cs](t) {
9728
+ this[ci](t, ui.readdirSync(t.absolute));
9711
9729
  }
9712
- [li](t) {
9730
+ [fi](t) {
9713
9731
  let e = t.entry, i = this.zip;
9714
9732
  if (t.readdir && t.readdir.forEach((r) => {
9715
9733
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9716
- this[hi](o + r);
9734
+ this[li](o + r);
9717
9735
  }), !e) throw new Error("Cannot pipe without source");
9718
9736
  i ? e.on("data", (r) => {
9719
9737
  i.write(r);
9720
9738
  }) : e.on("data", (r) => {
9721
- super[rr](r);
9739
+ super[nr](r);
9722
9740
  });
9723
9741
  }
9724
9742
  };
9725
- var Un = (s3, t) => {
9726
- let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9727
- e.pipe(i), or(e, t);
9728
- };
9729
9743
  var Hn = (s3, t) => {
9730
- let e = new Et(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9744
+ let e = new Ft(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9745
+ e.pipe(i), hr(e, t);
9746
+ };
9747
+ var Wn = (s3, t) => {
9748
+ let e = new wt(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9731
9749
  e.pipe(i);
9732
9750
  let r = new Promise((n, o) => {
9733
9751
  i.on("error", o), i.on("close", n), e.on("error", o);
9734
9752
  });
9735
- return hr(e, t).catch((n) => e.emit("error", n)), r;
9753
+ return ar(e, t).catch((n) => e.emit("error", n)), r;
9736
9754
  };
9737
- var or = (s3, t) => {
9755
+ var hr = (s3, t) => {
9738
9756
  t.forEach((e) => {
9739
- e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9757
+ e.charAt(0) === "@" ? Ct({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9740
9758
  }), s3.end();
9741
9759
  };
9742
- var hr = async (s3, t) => {
9743
- for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9760
+ var ar = async (s3, t) => {
9761
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: or.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9744
9762
  s3.add(i);
9745
9763
  } }) : s3.add(e);
9746
9764
  s3.end();
9747
9765
  };
9748
- var Wn = (s3, t) => {
9749
- let e = new kt(s3);
9750
- return or(e, t), e;
9751
- };
9752
9766
  var Gn = (s3, t) => {
9753
- let e = new Et(s3);
9754
- return hr(e, t).catch((i) => e.emit("error", i)), e;
9767
+ let e = new Ft(s3);
9768
+ return hr(e, t), e;
9755
9769
  };
9756
- var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
9770
+ var Zn = (s3, t) => {
9771
+ let e = new wt(s3);
9772
+ return ar(e, t).catch((i) => e.emit("error", i)), e;
9773
+ };
9774
+ var Yn = K(Hn, Wn, Gn, Zn, (s3, t) => {
9757
9775
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
9758
9776
  });
9759
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
9760
- var fr = Yn === "win32";
9761
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
9762
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
9763
- var Kn = fr && !!pr;
9764
- var Vn = 512 * 1024;
9765
- var $n = pr | ur | dr | mr;
9766
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
9767
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
9768
- var fs2 = (s3, t, e) => {
9777
+ var Kn = process.env.__FAKE_PLATFORM__ || process.platform;
9778
+ var dr = Kn === "win32";
9779
+ var { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = fr.constants;
9780
+ var Er = Number(process.env.__FAKE_FS_O_FILENAME__) || fr.constants.UV_FS_O_FILEMAP || 0;
9781
+ var Vn = dr && !!Er;
9782
+ var $n = 512 * 1024;
9783
+ var Xn = Er | mr | ur | pr;
9784
+ var cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null;
9785
+ var fs2 = cr !== null ? () => cr : Vn ? (s3) => s3 < $n ? Xn : "w" : () => "w";
9786
+ var ds = (s3, t, e) => {
9769
9787
  try {
9770
- return mi.lchownSync(s3, t, e);
9788
+ return Ei.lchownSync(s3, t, e);
9771
9789
  } catch (i) {
9772
9790
  if (i?.code !== "ENOENT") throw i;
9773
9791
  }
9774
9792
  };
9775
- var ui = (s3, t, e, i) => {
9776
- mi.lchown(s3, t, e, (r) => {
9793
+ var pi = (s3, t, e, i) => {
9794
+ Ei.lchown(s3, t, e, (r) => {
9777
9795
  i(r && r?.code !== "ENOENT" ? r : null);
9778
9796
  });
9779
9797
  };
9780
- var Xn = (s3, t, e, i, r) => {
9781
- if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
9798
+ var qn = (s3, t, e, i, r) => {
9799
+ if (t.isDirectory()) us(we.resolve(s3, t.name), e, i, (n) => {
9782
9800
  if (n) return r(n);
9783
- let o = Ee.resolve(s3, t.name);
9784
- ui(o, e, i, r);
9801
+ let o = we.resolve(s3, t.name);
9802
+ pi(o, e, i, r);
9785
9803
  });
9786
9804
  else {
9787
- let n = Ee.resolve(s3, t.name);
9788
- ui(n, e, i, r);
9805
+ let n = we.resolve(s3, t.name);
9806
+ pi(n, e, i, r);
9789
9807
  }
9790
9808
  };
9791
- var ds = (s3, t, e, i) => {
9792
- mi.readdir(s3, { withFileTypes: true }, (r, n) => {
9809
+ var us = (s3, t, e, i) => {
9810
+ Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
9793
9811
  if (r) {
9794
9812
  if (r.code === "ENOENT") return i();
9795
9813
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
9796
9814
  }
9797
- if (r || !n.length) return ui(s3, t, e, i);
9815
+ if (r || !n.length) return pi(s3, t, e, i);
9798
9816
  let o = n.length, h = null, a = (l) => {
9799
9817
  if (!h) {
9800
9818
  if (l) return i(h = l);
9801
- if (--o === 0) return ui(s3, t, e, i);
9819
+ if (--o === 0) return pi(s3, t, e, i);
9802
9820
  }
9803
9821
  };
9804
- for (let l of n) Xn(s3, l, t, e, a);
9822
+ for (let l of n) qn(s3, l, t, e, a);
9805
9823
  });
9806
9824
  };
9807
- var qn = (s3, t, e, i) => {
9808
- t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs2(Ee.resolve(s3, t.name), e, i);
9825
+ var Qn = (s3, t, e, i) => {
9826
+ t.isDirectory() && ms(we.resolve(s3, t.name), e, i), ds(we.resolve(s3, t.name), e, i);
9809
9827
  };
9810
- var us = (s3, t, e) => {
9828
+ var ms = (s3, t, e) => {
9811
9829
  let i;
9812
9830
  try {
9813
- i = mi.readdirSync(s3, { withFileTypes: true });
9831
+ i = Ei.readdirSync(s3, { withFileTypes: true });
9814
9832
  } catch (r) {
9815
9833
  let n = r;
9816
9834
  if (n?.code === "ENOENT") return;
9817
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
9835
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ds(s3, t, e);
9818
9836
  throw n;
9819
9837
  }
9820
- for (let r of i) qn(s3, r, t, e);
9821
- return fs2(s3, t, e);
9838
+ for (let r of i) Qn(s3, r, t, e);
9839
+ return ds(s3, t, e);
9822
9840
  };
9823
- var we = class extends Error {
9841
+ var Se = class extends Error {
9824
9842
  path;
9825
9843
  code;
9826
9844
  syscall = "chdir";
@@ -9831,7 +9849,7 @@ var we = class extends Error {
9831
9849
  return "CwdError";
9832
9850
  }
9833
9851
  };
9834
- var wt = class extends Error {
9852
+ var St = class extends Error {
9835
9853
  path;
9836
9854
  symlink;
9837
9855
  syscall = "symlink";
@@ -9843,97 +9861,97 @@ var wt = class extends Error {
9843
9861
  return "SymlinkError";
9844
9862
  }
9845
9863
  };
9846
- var Qn = (s3, t) => {
9847
- k.stat(s3, (e, i) => {
9848
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
9864
+ var jn = (s3, t) => {
9865
+ F.stat(s3, (e, i) => {
9866
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
9849
9867
  });
9850
9868
  };
9851
- var Er = (s3, t, e) => {
9869
+ var wr = (s3, t, e) => {
9852
9870
  s3 = f(s3);
9853
9871
  let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
9854
- E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
9872
+ E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? F.chmod(s3, r, e) : e();
9855
9873
  };
9856
- if (s3 === d) return Qn(s3, S);
9857
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9858
- let N = f(pi.relative(d, s3)).split("/");
9859
- ms(d, N, r, c, d, void 0, S);
9874
+ if (s3 === d) return jn(s3, S);
9875
+ if (l) return Jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9876
+ let N = f(wi.relative(d, s3)).split("/");
9877
+ ps(d, N, r, c, d, void 0, S);
9860
9878
  };
9861
- var ms = (s3, t, e, i, r, n, o) => {
9879
+ var ps = (s3, t, e, i, r, n, o) => {
9862
9880
  if (t.length === 0) return o(null, n);
9863
- let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
9864
- k.mkdir(a, e, wr(a, t, e, i, r, n, o));
9881
+ let h = t.shift(), a = f(wi.resolve(s3 + "/" + h));
9882
+ F.mkdir(a, e, Sr(a, t, e, i, r, n, o));
9865
9883
  };
9866
- var wr = (s3, t, e, i, r, n, o) => (h) => {
9867
- h ? k.lstat(s3, (a, l) => {
9884
+ var Sr = (s3, t, e, i, r, n, o) => (h) => {
9885
+ h ? F.lstat(s3, (a, l) => {
9868
9886
  if (a) a.path = a.path && f(a.path), o(a);
9869
- else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
9870
- else if (i) k.unlink(s3, (c) => {
9887
+ else if (l.isDirectory()) ps(s3, t, e, i, r, n, o);
9888
+ else if (i) F.unlink(s3, (c) => {
9871
9889
  if (c) return o(c);
9872
- k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
9890
+ F.mkdir(s3, e, Sr(s3, t, e, i, r, n, o));
9873
9891
  });
9874
9892
  else {
9875
- if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
9893
+ if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
9876
9894
  o(h);
9877
9895
  }
9878
- }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
9896
+ }) : (n = n || s3, ps(s3, t, e, i, r, n, o));
9879
9897
  };
9880
- var Jn = (s3) => {
9898
+ var to = (s3) => {
9881
9899
  let t = false, e;
9882
9900
  try {
9883
- t = k.statSync(s3).isDirectory();
9901
+ t = F.statSync(s3).isDirectory();
9884
9902
  } catch (i) {
9885
9903
  e = i?.code;
9886
9904
  } finally {
9887
- if (!t) throw new we(s3, e ?? "ENOTDIR");
9905
+ if (!t) throw new Se(s3, e ?? "ENOTDIR");
9888
9906
  }
9889
9907
  };
9890
- var Sr = (s3, t) => {
9908
+ var yr = (s3, t) => {
9891
9909
  s3 = f(s3);
9892
9910
  let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
9893
- E && h && us(E, n, o), r && k.chmodSync(s3, i);
9911
+ E && h && ms(E, n, o), r && F.chmodSync(s3, i);
9894
9912
  };
9895
- if (s3 === c) return Jn(c), d();
9896
- if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9897
- let T = f(pi.relative(c, s3)).split("/"), N;
9913
+ if (s3 === c) return to(c), d();
9914
+ if (a) return d(F.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9915
+ let T = f(wi.relative(c, s3)).split("/"), N;
9898
9916
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
9899
- x = f(pi.resolve(x));
9917
+ x = f(wi.resolve(x));
9900
9918
  try {
9901
- k.mkdirSync(x, i), N = N || x;
9919
+ F.mkdirSync(x, i), N = N || x;
9902
9920
  } catch {
9903
- let xe = k.lstatSync(x);
9904
- if (xe.isDirectory()) continue;
9921
+ let Le = F.lstatSync(x);
9922
+ if (Le.isDirectory()) continue;
9905
9923
  if (l) {
9906
- k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
9924
+ F.unlinkSync(x), F.mkdirSync(x, i), N = N || x;
9907
9925
  continue;
9908
- } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
9926
+ } else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
9909
9927
  }
9910
9928
  }
9911
9929
  return d(N);
9912
9930
  };
9913
- var ps = /* @__PURE__ */ Object.create(null);
9914
- var yr = 1e4;
9931
+ var Es = /* @__PURE__ */ Object.create(null);
9932
+ var Rr = 1e4;
9915
9933
  var $t = /* @__PURE__ */ new Set();
9916
- var Rr = (s3) => {
9917
- $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9918
- let t = ps[s3], e = $t.size - yr;
9919
- if (e > yr / 10) {
9920
- for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
9934
+ var gr = (s3) => {
9935
+ $t.has(s3) ? $t.delete(s3) : Es[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9936
+ let t = Es[s3], e = $t.size - Rr;
9937
+ if (e > Rr / 10) {
9938
+ for (let i of $t) if ($t.delete(i), delete Es[i], --e <= 0) break;
9921
9939
  }
9922
9940
  return t;
9923
9941
  };
9924
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9925
- var eo = to === "win32";
9926
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9942
+ var eo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9943
+ var io = eo === "win32";
9944
+ var so = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9927
9945
  let r = e.at(-1);
9928
9946
  return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
9929
9947
  }, []);
9930
- var Ei = class {
9948
+ var Si = class {
9931
9949
  #t = /* @__PURE__ */ new Map();
9932
9950
  #i = /* @__PURE__ */ new Map();
9933
9951
  #s = /* @__PURE__ */ new Set();
9934
9952
  reserve(t, e) {
9935
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
9936
- let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
9953
+ t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(br(gr(r))));
9954
+ let i = new Set(t.map((r) => so(r)).reduce((r, n) => r.concat(n)));
9937
9955
  this.#i.set(e, { dirs: i, paths: t });
9938
9956
  for (let r of t) {
9939
9957
  let n = this.#t.get(r);
@@ -9992,54 +10010,54 @@ var Ei = class {
9992
10010
  }
9993
10011
  };
9994
10012
  var _r = () => process.umask();
9995
- var gr = /* @__PURE__ */ Symbol("onEntry");
9996
- var ys = /* @__PURE__ */ Symbol("checkFs");
9997
- var Or = /* @__PURE__ */ Symbol("checkFs2");
9998
- var Rs = /* @__PURE__ */ Symbol("isReusable");
10013
+ var Or = /* @__PURE__ */ Symbol("onEntry");
10014
+ var Rs = /* @__PURE__ */ Symbol("checkFs");
10015
+ var Tr = /* @__PURE__ */ Symbol("checkFs2");
10016
+ var gs = /* @__PURE__ */ Symbol("isReusable");
9999
10017
  var P = /* @__PURE__ */ Symbol("makeFs");
10000
10018
  var bs = /* @__PURE__ */ Symbol("file");
10001
10019
  var _s = /* @__PURE__ */ Symbol("directory");
10002
- var Si = /* @__PURE__ */ Symbol("link");
10003
- var Tr = /* @__PURE__ */ Symbol("symlink");
10004
- var xr = /* @__PURE__ */ Symbol("hardlink");
10005
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
10006
- var Lr = /* @__PURE__ */ Symbol("unsupported");
10007
- var Nr = /* @__PURE__ */ Symbol("checkPath");
10008
- var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
10009
- var St = /* @__PURE__ */ Symbol("mkdir");
10020
+ var Ri = /* @__PURE__ */ Symbol("link");
10021
+ var xr = /* @__PURE__ */ Symbol("symlink");
10022
+ var Lr = /* @__PURE__ */ Symbol("hardlink");
10023
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
10024
+ var Nr = /* @__PURE__ */ Symbol("unsupported");
10025
+ var Dr = /* @__PURE__ */ Symbol("checkPath");
10026
+ var ws = /* @__PURE__ */ Symbol("stripAbsolutePath");
10027
+ var yt = /* @__PURE__ */ Symbol("mkdir");
10010
10028
  var O = /* @__PURE__ */ Symbol("onError");
10011
- var wi = /* @__PURE__ */ Symbol("pending");
10029
+ var yi = /* @__PURE__ */ Symbol("pending");
10012
10030
  var Ar = /* @__PURE__ */ Symbol("pend");
10013
10031
  var Xt = /* @__PURE__ */ Symbol("unpend");
10014
- var ws = /* @__PURE__ */ Symbol("ended");
10015
- var Ss = /* @__PURE__ */ Symbol("maybeClose");
10016
- var gs = /* @__PURE__ */ Symbol("skip");
10017
- var Re = /* @__PURE__ */ Symbol("doChown");
10032
+ var Ss = /* @__PURE__ */ Symbol("ended");
10033
+ var ys = /* @__PURE__ */ Symbol("maybeClose");
10034
+ var Os = /* @__PURE__ */ Symbol("skip");
10035
+ var ge = /* @__PURE__ */ Symbol("doChown");
10018
10036
  var be = /* @__PURE__ */ Symbol("uid");
10019
10037
  var _e = /* @__PURE__ */ Symbol("gid");
10020
- var ge = /* @__PURE__ */ Symbol("checkedCwd");
10021
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10022
- var Oe = ro === "win32";
10023
- var no = 1024;
10024
- var oo = (s3, t) => {
10025
- if (!Oe) return u.unlink(s3, t);
10026
- let e = s3 + ".DELETE." + Ir(16).toString("hex");
10038
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
10039
+ var no = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10040
+ var Te = no === "win32";
10041
+ var oo = 1024;
10042
+ var ho = (s3, t) => {
10043
+ if (!Te) return u.unlink(s3, t);
10044
+ let e = s3 + ".DELETE." + Cr(16).toString("hex");
10027
10045
  u.rename(s3, e, (i) => {
10028
10046
  if (i) return t(i);
10029
10047
  u.unlink(e, t);
10030
10048
  });
10031
10049
  };
10032
- var ho = (s3) => {
10033
- if (!Oe) return u.unlinkSync(s3);
10034
- let t = s3 + ".DELETE." + Ir(16).toString("hex");
10050
+ var ao = (s3) => {
10051
+ if (!Te) return u.unlinkSync(s3);
10052
+ let t = s3 + ".DELETE." + Cr(16).toString("hex");
10035
10053
  u.renameSync(s3, t), u.unlinkSync(t);
10036
10054
  };
10037
- var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10055
+ var Ir = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10038
10056
  var qt = class extends st {
10039
- [ws] = false;
10040
- [ge] = false;
10041
- [wi] = 0;
10042
- reservations = new Ei();
10057
+ [Ss] = false;
10058
+ [Oe] = false;
10059
+ [yi] = 0;
10060
+ reservations = new Si();
10043
10061
  transform;
10044
10062
  writable = true;
10045
10063
  readable = false;
@@ -10066,32 +10084,32 @@ var qt = class extends st {
10066
10084
  chmod;
10067
10085
  constructor(t = {}) {
10068
10086
  if (t.ondone = () => {
10069
- this[ws] = true, this[Ss]();
10087
+ this[Ss] = true, this[ys]();
10070
10088
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
10071
10089
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
10072
10090
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
10073
10091
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
10074
10092
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
10075
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
10093
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : oo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Or](e));
10076
10094
  }
10077
10095
  warn(t, e, i = {}) {
10078
10096
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
10079
10097
  }
10080
- [Ss]() {
10081
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10098
+ [ys]() {
10099
+ this[Ss] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10082
10100
  }
10083
- [Es](t, e) {
10101
+ [ws](t, e) {
10084
10102
  let i = t[e], { type: r } = t;
10085
10103
  if (!i || this.preservePaths) return true;
10086
10104
  let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
10087
- if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10105
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10088
10106
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
10089
10107
  let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
10090
10108
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
10091
10109
  }
10092
10110
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
10093
10111
  }
10094
- [Nr](t) {
10112
+ [Dr](t) {
10095
10113
  let e = f(t.path), i = e.split("/");
10096
10114
  if (this.strip) {
10097
10115
  if (i.length < this.strip) return false;
@@ -10103,20 +10121,20 @@ var qt = class extends st {
10103
10121
  i.splice(0, this.strip), t.path = i.join("/");
10104
10122
  }
10105
10123
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
10106
- if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
10124
+ if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return false;
10107
10125
  if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
10108
10126
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
10109
10127
  if (this.win32) {
10110
10128
  let { root: r } = R.win32.parse(String(t.absolute));
10111
- t.absolute = r + Xi(String(t.absolute).slice(r.length));
10129
+ t.absolute = r + Qi(String(t.absolute).slice(r.length));
10112
10130
  let { root: n } = R.win32.parse(t.path);
10113
- t.path = n + Xi(t.path.slice(n.length));
10131
+ t.path = n + Qi(t.path.slice(n.length));
10114
10132
  }
10115
10133
  return true;
10116
10134
  }
10117
- [gr](t) {
10118
- if (!this[Nr](t)) return t.resume();
10119
- switch (so.equal(typeof t.absolute, "string"), t.type) {
10135
+ [Or](t) {
10136
+ if (!this[Dr](t)) return t.resume();
10137
+ switch (ro.equal(typeof t.absolute, "string"), t.type) {
10120
10138
  case "Directory":
10121
10139
  case "GNUDumpDir":
10122
10140
  t.mode && (t.mode = t.mode | 448);
@@ -10125,28 +10143,28 @@ var qt = class extends st {
10125
10143
  case "ContiguousFile":
10126
10144
  case "Link":
10127
10145
  case "SymbolicLink":
10128
- return this[ys](t);
10146
+ return this[Rs](t);
10129
10147
  default:
10130
- return this[Lr](t);
10148
+ return this[Nr](t);
10131
10149
  }
10132
10150
  }
10133
10151
  [O](t, e) {
10134
10152
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
10135
10153
  }
10136
- [St](t, e, i) {
10137
- Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
10154
+ [yt](t, e, i) {
10155
+ wr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
10138
10156
  }
10139
- [Re](t) {
10157
+ [ge](t) {
10140
10158
  return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
10141
10159
  }
10142
10160
  [be](t) {
10143
- return Dr(this.uid, t.uid, this.processUid);
10161
+ return Ir(this.uid, t.uid, this.processUid);
10144
10162
  }
10145
10163
  [_e](t) {
10146
- return Dr(this.gid, t.gid, this.processGid);
10164
+ return Ir(this.gid, t.gid, this.processGid);
10147
10165
  }
10148
10166
  [bs](t, e) {
10149
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
10167
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: fs2(t.size), mode: i, autoClose: false });
10150
10168
  r.on("error", (a) => {
10151
10169
  r.fd && u.close(r.fd, () => {
10152
10170
  }), r.write = () => true, this[O](a, t), e();
@@ -10168,7 +10186,7 @@ var qt = class extends st {
10168
10186
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
10169
10187
  u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
10170
10188
  }
10171
- if (typeof l == "number" && this[Re](t)) {
10189
+ if (typeof l == "number" && this[ge](t)) {
10172
10190
  n++;
10173
10191
  let c = this[be](t), d = this[_e](t);
10174
10192
  typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
@@ -10182,7 +10200,7 @@ var qt = class extends st {
10182
10200
  }
10183
10201
  [_s](t, e) {
10184
10202
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
10185
- this[St](String(t.absolute), i, (r) => {
10203
+ this[yt](String(t.absolute), i, (r) => {
10186
10204
  if (r) {
10187
10205
  this[O](r, t), e();
10188
10206
  return;
@@ -10190,66 +10208,66 @@ var qt = class extends st {
10190
10208
  let n = 1, o = () => {
10191
10209
  --n === 0 && (e(), this[Xt](), t.resume());
10192
10210
  };
10193
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
10211
+ t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
10194
10212
  });
10195
10213
  }
10196
- [Lr](t) {
10214
+ [Nr](t) {
10197
10215
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
10198
10216
  }
10199
- [Tr](t, e) {
10217
+ [xr](t, e) {
10200
10218
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
10201
- this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
10219
+ this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10202
10220
  this[O](r, t), e();
10203
10221
  });
10204
10222
  }
10205
- [xr](t, e) {
10223
+ [Lr](t, e) {
10206
10224
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
10207
- this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
10225
+ this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10208
10226
  this[O](n, t), e();
10209
10227
  });
10210
10228
  }
10211
- [ye](t, e, i, r, n) {
10229
+ [Re](t, e, i, r, n) {
10212
10230
  let o = i.shift();
10213
10231
  if (this.preservePaths || o === void 0) return r();
10214
10232
  let h = R.resolve(e, o);
10215
10233
  u.lstat(h, (a, l) => {
10216
10234
  if (a) return r();
10217
- if (l?.isSymbolicLink()) return n(new wt(h, R.resolve(h, i.join("/"))));
10218
- this[ye](t, h, i, r, n);
10235
+ if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
10236
+ this[Re](t, h, i, r, n);
10219
10237
  });
10220
10238
  }
10221
10239
  [Ar]() {
10222
- this[wi]++;
10240
+ this[yi]++;
10223
10241
  }
10224
10242
  [Xt]() {
10225
- this[wi]--, this[Ss]();
10243
+ this[yi]--, this[ys]();
10226
10244
  }
10227
- [gs](t) {
10245
+ [Os](t) {
10228
10246
  this[Xt](), t.resume();
10229
10247
  }
10230
- [Rs](t, e) {
10231
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
10248
+ [gs](t, e) {
10249
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
10232
10250
  }
10233
- [ys](t) {
10251
+ [Rs](t) {
10234
10252
  this[Ar]();
10235
10253
  let e = [t.path];
10236
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
10254
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Tr](t, i));
10237
10255
  }
10238
- [Or](t, e) {
10256
+ [Tr](t, e) {
10239
10257
  let i = (h) => {
10240
10258
  e(h);
10241
10259
  }, r = () => {
10242
- this[St](this.cwd, this.dmode, (h) => {
10260
+ this[yt](this.cwd, this.dmode, (h) => {
10243
10261
  if (h) {
10244
10262
  this[O](h, t), i();
10245
10263
  return;
10246
10264
  }
10247
- this[ge] = true, n();
10265
+ this[Oe] = true, n();
10248
10266
  });
10249
10267
  }, n = () => {
10250
10268
  if (t.absolute !== this.cwd) {
10251
10269
  let h = f(R.dirname(String(t.absolute)));
10252
- if (h !== this.cwd) return this[St](h, this.dmode, (a) => {
10270
+ if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
10253
10271
  if (a) {
10254
10272
  this[O](a, t), i();
10255
10273
  return;
@@ -10261,10 +10279,10 @@ var qt = class extends st {
10261
10279
  }, o = () => {
10262
10280
  u.lstat(String(t.absolute), (h, a) => {
10263
10281
  if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
10264
- this[gs](t), i();
10282
+ this[Os](t), i();
10265
10283
  return;
10266
10284
  }
10267
- if (h || this[Rs](t, a)) return this[P](null, t, i);
10285
+ if (h || this[gs](t, a)) return this[P](null, t, i);
10268
10286
  if (a.isDirectory()) {
10269
10287
  if (t.type === "Directory") {
10270
10288
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -10273,10 +10291,10 @@ var qt = class extends st {
10273
10291
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10274
10292
  }
10275
10293
  if (t.absolute === this.cwd) return this[P](null, t, i);
10276
- oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
10294
+ ho(String(t.absolute), (l) => this[P](l ?? null, t, i));
10277
10295
  });
10278
10296
  };
10279
- this[ge] ? n() : r();
10297
+ this[Oe] ? n() : r();
10280
10298
  }
10281
10299
  [P](t, e, i) {
10282
10300
  if (t) {
@@ -10289,60 +10307,60 @@ var qt = class extends st {
10289
10307
  case "ContiguousFile":
10290
10308
  return this[bs](e, i);
10291
10309
  case "Link":
10292
- return this[xr](e, i);
10310
+ return this[Lr](e, i);
10293
10311
  case "SymbolicLink":
10294
- return this[Tr](e, i);
10312
+ return this[xr](e, i);
10295
10313
  case "Directory":
10296
10314
  case "GNUDumpDir":
10297
10315
  return this[_s](e, i);
10298
10316
  }
10299
10317
  }
10300
- [Si](t, e, i, r) {
10318
+ [Ri](t, e, i, r) {
10301
10319
  u[i](e, String(t.absolute), (n) => {
10302
10320
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
10303
10321
  });
10304
10322
  }
10305
10323
  };
10306
- var Se = (s3) => {
10324
+ var ye = (s3) => {
10307
10325
  try {
10308
10326
  return [null, s3()];
10309
10327
  } catch (t) {
10310
10328
  return [t, null];
10311
10329
  }
10312
10330
  };
10313
- var Te = class extends qt {
10331
+ var xe = class extends qt {
10314
10332
  sync = true;
10315
10333
  [P](t, e) {
10316
10334
  return super[P](t, e, () => {
10317
10335
  });
10318
10336
  }
10319
- [ys](t) {
10320
- if (!this[ge]) {
10321
- let n = this[St](this.cwd, this.dmode);
10337
+ [Rs](t) {
10338
+ if (!this[Oe]) {
10339
+ let n = this[yt](this.cwd, this.dmode);
10322
10340
  if (n) return this[O](n, t);
10323
- this[ge] = true;
10341
+ this[Oe] = true;
10324
10342
  }
10325
10343
  if (t.absolute !== this.cwd) {
10326
10344
  let n = f(R.dirname(String(t.absolute)));
10327
10345
  if (n !== this.cwd) {
10328
- let o = this[St](n, this.dmode);
10346
+ let o = this[yt](n, this.dmode);
10329
10347
  if (o) return this[O](o, t);
10330
10348
  }
10331
10349
  }
10332
- let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
10333
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
10334
- if (e || this[Rs](t, i)) return this[P](null, t);
10350
+ let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
10351
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
10352
+ if (e || this[gs](t, i)) return this[P](null, t);
10335
10353
  if (i.isDirectory()) {
10336
10354
  if (t.type === "Directory") {
10337
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
10355
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
10338
10356
  u.chmodSync(String(t.absolute), Number(t.mode));
10339
10357
  }) : [];
10340
10358
  return this[P](h, t);
10341
10359
  }
10342
- let [n] = Se(() => u.rmdirSync(String(t.absolute)));
10360
+ let [n] = ye(() => u.rmdirSync(String(t.absolute)));
10343
10361
  this[P](n, t);
10344
10362
  }
10345
- let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
10363
+ let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
10346
10364
  this[P](r, t);
10347
10365
  }
10348
10366
  [bs](t, e) {
@@ -10356,7 +10374,7 @@ var Te = class extends qt {
10356
10374
  (h || a) && this[O](h || a, t), e();
10357
10375
  }, n;
10358
10376
  try {
10359
- n = u.openSync(String(t.absolute), cs(t.size), i);
10377
+ n = u.openSync(String(t.absolute), fs2(t.size), i);
10360
10378
  } catch (h) {
10361
10379
  return r(h);
10362
10380
  }
@@ -10381,7 +10399,7 @@ var Te = class extends qt {
10381
10399
  }
10382
10400
  }
10383
10401
  }
10384
- if (this[Re](t)) {
10402
+ if (this[ge](t)) {
10385
10403
  let a = this[be](t), l = this[_e](t);
10386
10404
  try {
10387
10405
  u.fchownSync(n, Number(a), Number(l));
@@ -10397,7 +10415,7 @@ var Te = class extends qt {
10397
10415
  });
10398
10416
  }
10399
10417
  [_s](t, e) {
10400
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
10418
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
10401
10419
  if (r) {
10402
10420
  this[O](r, t), e();
10403
10421
  return;
@@ -10406,31 +10424,31 @@ var Te = class extends qt {
10406
10424
  u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10407
10425
  } catch {
10408
10426
  }
10409
- if (this[Re](t)) try {
10427
+ if (this[ge](t)) try {
10410
10428
  u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
10411
10429
  } catch {
10412
10430
  }
10413
10431
  e(), t.resume();
10414
10432
  }
10415
- [St](t, e) {
10433
+ [yt](t, e) {
10416
10434
  try {
10417
- return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
10435
+ return yr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
10418
10436
  } catch (i) {
10419
10437
  return i;
10420
10438
  }
10421
10439
  }
10422
- [ye](t, e, i, r, n) {
10440
+ [Re](t, e, i, r, n) {
10423
10441
  if (this.preservePaths || i.length === 0) return r();
10424
10442
  let o = e;
10425
10443
  for (let h of i) {
10426
10444
  o = R.resolve(o, h);
10427
- let [a, l] = Se(() => u.lstatSync(o));
10445
+ let [a, l] = ye(() => u.lstatSync(o));
10428
10446
  if (a) return r();
10429
- if (l.isSymbolicLink()) return n(new wt(o, R.resolve(e, i.join("/"))));
10447
+ if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
10430
10448
  }
10431
10449
  r();
10432
10450
  }
10433
- [Si](t, e, i, r) {
10451
+ [Ri](t, e, i, r) {
10434
10452
  let n = `${i}Sync`;
10435
10453
  try {
10436
10454
  u[n](e, String(t.absolute)), r(), t.resume();
@@ -10439,14 +10457,14 @@ var Te = class extends qt {
10439
10457
  }
10440
10458
  }
10441
10459
  };
10442
- var ao = (s3) => {
10443
- let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10444
- new Me(e, { readSize: r, size: i.size }).pipe(t);
10460
+ var lo = (s3) => {
10461
+ let t = new xe(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10462
+ new Be(e, { readSize: r, size: i.size }).pipe(t);
10445
10463
  };
10446
- var lo = (s3, t) => {
10464
+ var co = (s3, t) => {
10447
10465
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10448
10466
  return new Promise((o, h) => {
10449
- e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
10467
+ e.on("error", h), e.on("close", o), kr.stat(r, (a, l) => {
10450
10468
  if (a) h(a);
10451
10469
  else {
10452
10470
  let c = new _t(r, { readSize: i, size: l.size });
@@ -10455,11 +10473,11 @@ var lo = (s3, t) => {
10455
10473
  });
10456
10474
  });
10457
10475
  };
10458
- var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
10459
- t?.length && Ki(s3, t);
10476
+ var fo = K(lo, co, (s3) => new xe(s3), (s3) => new qt(s3), (s3, t) => {
10477
+ t?.length && $i(s3, t);
10460
10478
  });
10461
- var fo = (s3, t) => {
10462
- let e = new kt(s3), i = true, r, n;
10479
+ var uo = (s3, t) => {
10480
+ let e = new Ft(s3), i = true, r, n;
10463
10481
  try {
10464
10482
  try {
10465
10483
  r = v.openSync(s3.file, "r+");
@@ -10473,13 +10491,13 @@ var fo = (s3, t) => {
10473
10491
  if (d = v.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
10474
10492
  if (!d) break t;
10475
10493
  }
10476
- let a = new F(h);
10494
+ let a = new k(h);
10477
10495
  if (!a.cksumValid) break;
10478
10496
  let l = 512 * Math.ceil((a.size || 0) / 512);
10479
10497
  if (n + l + 512 > o.size) break;
10480
10498
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
10481
10499
  }
10482
- i = false, uo(s3, e, n, r, t);
10500
+ i = false, mo(s3, e, n, r, t);
10483
10501
  } finally {
10484
10502
  if (i) try {
10485
10503
  v.closeSync(r);
@@ -10487,13 +10505,13 @@ var fo = (s3, t) => {
10487
10505
  }
10488
10506
  }
10489
10507
  };
10490
- var uo = (s3, t, e, i, r) => {
10508
+ var mo = (s3, t, e, i, r) => {
10491
10509
  let n = new Wt(s3.file, { fd: i, start: e });
10492
- t.pipe(n), po(t, r);
10510
+ t.pipe(n), Eo(t, r);
10493
10511
  };
10494
- var mo = (s3, t) => {
10512
+ var po = (s3, t) => {
10495
10513
  t = Array.from(t);
10496
- let e = new Et(s3), i = (n, o, h) => {
10514
+ let e = new wt(s3), i = (n, o, h) => {
10497
10515
  let a = (T, N) => {
10498
10516
  T ? v.close(n, (E) => h(T)) : h(null, N);
10499
10517
  }, l = 0;
@@ -10503,7 +10521,7 @@ var mo = (s3, t) => {
10503
10521
  if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
10504
10522
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
10505
10523
  if (c < 512) return a(null, l);
10506
- let E = new F(d);
10524
+ let E = new k(d);
10507
10525
  if (!E.cksumValid) return a(null, l);
10508
10526
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
10509
10527
  if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
@@ -10521,23 +10539,23 @@ var mo = (s3, t) => {
10521
10539
  i(c, S.size, (T, N) => {
10522
10540
  if (T) return o(T);
10523
10541
  let E = new tt2(s3.file, { fd: c, start: N });
10524
- e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
10542
+ e.pipe(E), E.on("error", o), E.on("close", n), wo(e, t);
10525
10543
  });
10526
10544
  });
10527
10545
  };
10528
10546
  v.open(s3.file, h, a);
10529
10547
  });
10530
10548
  };
10531
- var po = (s3, t) => {
10549
+ var Eo = (s3, t) => {
10532
10550
  t.forEach((e) => {
10533
- e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10551
+ e.charAt(0) === "@" ? Ct({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10534
10552
  }), s3.end();
10535
10553
  };
10536
- var Eo = async (s3, t) => {
10537
- for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10554
+ var wo = async (s3, t) => {
10555
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10538
10556
  s3.end();
10539
10557
  };
10540
- var vt = K(fo, mo, () => {
10558
+ var vt = K(uo, po, () => {
10541
10559
  throw new TypeError("file is required");
10542
10560
  }, () => {
10543
10561
  throw new TypeError("file is required");
@@ -10546,10 +10564,10 @@ var vt = K(fo, mo, () => {
10546
10564
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
10547
10565
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
10548
10566
  });
10549
- var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10550
- vt.validate?.(s3, t), So(s3);
10567
+ var So = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10568
+ vt.validate?.(s3, t), yo(s3);
10551
10569
  });
10552
- var So = (s3) => {
10570
+ var yo = (s3) => {
10553
10571
  let t = s3.filter;
10554
10572
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
10555
10573
  };
@@ -10561,7 +10579,7 @@ function normalize(filename2) {
10561
10579
  }
10562
10580
  async function getFileList(filename2) {
10563
10581
  const entries = [];
10564
- await It({
10582
+ await Ct({
10565
10583
  file: filename2,
10566
10584
  strict: true,
10567
10585
  onentry: (entry) => entries.push(entry)
@@ -10889,7 +10907,7 @@ var escapeArgument = (argument) => escapeFile(escapeFile(`"${argument.replaceAll
10889
10907
  var escapeFile = (file) => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, "^$1");
10890
10908
 
10891
10909
  // node_modules/nano-spawn/source/result.js
10892
- import { once, on } from "node:events";
10910
+ import { once, on as on2 } from "node:events";
10893
10911
  import process6 from "node:process";
10894
10912
  var getResult = async (nodeChildProcess, options, context) => {
10895
10913
  const instance = await nodeChildProcess;
@@ -10910,7 +10928,7 @@ var getResult = async (nodeChildProcess, options, context) => {
10910
10928
  }
10911
10929
  };
10912
10930
  var onStreamError = async (stream) => {
10913
- for await (const [error] of on(stream, "error")) {
10931
+ for await (const [error] of on2(stream, "error")) {
10914
10932
  if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE"].includes(error?.code)) {
10915
10933
  throw error;
10916
10934
  }