npm-pkg-lint 4.6.4 → 4.6.6

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
@@ -5493,55 +5493,8 @@ import { createWriteStream, existsSync, promises as fs7, readFileSync } from "no
5493
5493
  import path7 from "node:path";
5494
5494
  import { fileURLToPath as fileURLToPath4 } from "node:url";
5495
5495
 
5496
- // node_modules/kleur/colors.mjs
5497
- var FORCE_COLOR;
5498
- var NODE_DISABLE_COLORS;
5499
- var NO_COLOR;
5500
- var TERM;
5501
- var isTTY = true;
5502
- if (typeof process !== "undefined") {
5503
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
5504
- isTTY = process.stdout && process.stdout.isTTY;
5505
- }
5506
- var $ = {
5507
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
5508
- };
5509
- function init(x, y2) {
5510
- let rgx = new RegExp(`\\x1b\\[${y2}m`, "g");
5511
- let open = `\x1B[${x}m`, close = `\x1B[${y2}m`;
5512
- return function(txt) {
5513
- if (!$.enabled || txt == null) return txt;
5514
- return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
5515
- };
5516
- }
5517
- var reset = init(0, 0);
5518
- var bold = init(1, 22);
5519
- var dim = init(2, 22);
5520
- var italic = init(3, 23);
5521
- var underline = init(4, 24);
5522
- var inverse = init(7, 27);
5523
- var hidden = init(8, 28);
5524
- var strikethrough = init(9, 29);
5525
- var black = init(30, 39);
5526
- var red = init(31, 39);
5527
- var green = init(32, 39);
5528
- var yellow = init(33, 39);
5529
- var blue = init(34, 39);
5530
- var magenta = init(35, 39);
5531
- var cyan = init(36, 39);
5532
- var white = init(37, 39);
5533
- var gray = init(90, 39);
5534
- var grey = init(90, 39);
5535
- var bgBlack = init(40, 49);
5536
- var bgRed = init(41, 49);
5537
- var bgGreen = init(42, 49);
5538
- var bgYellow = init(43, 49);
5539
- var bgBlue = init(44, 49);
5540
- var bgMagenta = init(45, 49);
5541
- var bgCyan = init(46, 49);
5542
- var bgWhite = init(47, 49);
5543
-
5544
5496
  // node_modules/@html-validate/stylish/dist/esm/node.js
5497
+ import { styleText } from "node:util";
5545
5498
  var __create2 = Object.create;
5546
5499
  var __defProp2 = Object.defineProperty;
5547
5500
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -5618,10 +5571,10 @@ var require_text_table = __commonJS2({
5618
5571
  var m2 = /\.[^.]*$/.exec(c);
5619
5572
  return m2 ? m2.index + 1 : c.length;
5620
5573
  }
5621
- function reduce(xs2, f2, init2) {
5622
- if (xs2.reduce) return xs2.reduce(f2, init2);
5574
+ function reduce(xs2, f2, init) {
5575
+ if (xs2.reduce) return xs2.reduce(f2, init);
5623
5576
  var i = 0;
5624
- var acc = arguments.length >= 3 ? init2 : xs2[i++];
5577
+ var acc = arguments.length >= 3 ? init : xs2[i++];
5625
5578
  for (; i < xs2.length; i++) {
5626
5579
  f2(acc, xs2[i], i);
5627
5580
  }
@@ -5644,12 +5597,24 @@ var require_text_table = __commonJS2({
5644
5597
  }
5645
5598
  });
5646
5599
  var import_text_table = __toESM2(require_text_table());
5647
- var reset2 = reset;
5648
- var bold2 = bold;
5649
- var dim2 = dim;
5650
- var underline2 = underline;
5651
- var yellow2 = yellow;
5652
- var red2 = red;
5600
+ function reset(value) {
5601
+ return styleText("reset", value);
5602
+ }
5603
+ function bold(value) {
5604
+ return styleText("bold", value);
5605
+ }
5606
+ function dim(value) {
5607
+ return styleText("dim", value);
5608
+ }
5609
+ function underline(value) {
5610
+ return styleText("underline", value);
5611
+ }
5612
+ function yellow(value) {
5613
+ return styleText("yellow", value);
5614
+ }
5615
+ function red(value) {
5616
+ return styleText("red", value);
5617
+ }
5653
5618
  var Severity = /* @__PURE__ */ ((Severity2) => {
5654
5619
  Severity2[Severity2["OFF"] = 0] = "OFF";
5655
5620
  Severity2[Severity2["WARN"] = 1] = "WARN";
@@ -5660,7 +5625,7 @@ function pluralize(word, count) {
5660
5625
  return count === 1 ? word : `${word}s`;
5661
5626
  }
5662
5627
  function centerLineColumn(el) {
5663
- return el.replace(/(\d+)\s+(\d+)/u, (_m, p1, p2) => dim2(`${p1}:${p2}`));
5628
+ return el.replace(/(\d+)\s+(\d+)/u, (_m, p1, p2) => dim(`${p1}:${p2}`));
5664
5629
  }
5665
5630
  function stripAnsi(text) {
5666
5631
  return text.replaceAll(/\u001B\[[\d;]*m/g, "");
@@ -5671,7 +5636,7 @@ function stylish(results) {
5671
5636
  let warningCount = 0;
5672
5637
  let fixableErrorCount = 0;
5673
5638
  let fixableWarningCount = 0;
5674
- let summaryColor = yellow2;
5639
+ let summaryColor = yellow;
5675
5640
  for (const result of results) {
5676
5641
  const messages = result.messages;
5677
5642
  if (messages.length === 0) {
@@ -5684,10 +5649,10 @@ function stylish(results) {
5684
5649
  const rows = messages.map((message) => {
5685
5650
  let messageType;
5686
5651
  if (Boolean(message.fatal) || message.severity === 2) {
5687
- messageType = red2("error");
5688
- summaryColor = red2;
5652
+ messageType = red("error");
5653
+ summaryColor = red;
5689
5654
  } else {
5690
- messageType = yellow2("warning");
5655
+ messageType = yellow("warning");
5691
5656
  }
5692
5657
  return [
5693
5658
  "",
@@ -5695,7 +5660,7 @@ function stylish(results) {
5695
5660
  message.column ?? 0,
5696
5661
  messageType,
5697
5662
  message.message.replace(/([^ ])\.$/u, "$1"),
5698
- message.ruleId ? dim2(message.ruleId) : ""
5663
+ message.ruleId ? dim(message.ruleId) : ""
5699
5664
  ];
5700
5665
  });
5701
5666
  const options = {
@@ -5705,7 +5670,7 @@ function stylish(results) {
5705
5670
  }
5706
5671
  };
5707
5672
  const formattedTable = (0, import_text_table.default)(rows, options).split("\n").map(centerLineColumn).join("\n");
5708
- output += `${underline2(result.filePath)}
5673
+ output += `${underline(result.filePath)}
5709
5674
  `;
5710
5675
  output += `${formattedTable}
5711
5676
 
@@ -5714,7 +5679,7 @@ function stylish(results) {
5714
5679
  const total = errorCount + warningCount;
5715
5680
  if (total > 0) {
5716
5681
  output += summaryColor(
5717
- bold2(
5682
+ bold(
5718
5683
  [
5719
5684
  "\u2716 ",
5720
5685
  total,
@@ -5731,7 +5696,7 @@ function stylish(results) {
5731
5696
  );
5732
5697
  if (fixableErrorCount > 0 || fixableWarningCount > 0) {
5733
5698
  output += summaryColor(
5734
- bold2(
5699
+ bold(
5735
5700
  [
5736
5701
  " ",
5737
5702
  fixableErrorCount,
@@ -5745,7 +5710,7 @@ function stylish(results) {
5745
5710
  );
5746
5711
  }
5747
5712
  }
5748
- return total > 0 ? reset2(output) : "";
5713
+ return total > 0 ? reset(output) : "";
5749
5714
  }
5750
5715
 
5751
5716
  // node_modules/@humanwhocodes/momoa/dist/momoa.js
@@ -7691,85 +7656,85 @@ function isBlacklisted(filename2) {
7691
7656
  import fs3 from "node:fs";
7692
7657
 
7693
7658
  // node_modules/tar/dist/esm/index.min.js
7694
- import Kr from "events";
7659
+ import Vr from "events";
7695
7660
  import I from "fs";
7696
- import { EventEmitter as Ti } from "node:events";
7697
- import Ns from "node:stream";
7698
- import { StringDecoder as Mr } from "node:string_decoder";
7699
- 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";
7700
7665
  import Vt from "node:fs";
7701
- import { dirname as xn, parse as Ln } from "path";
7666
+ import { dirname as Ln, parse as Nn } from "path";
7702
7667
  import { EventEmitter as _n } from "events";
7703
- import Mi from "assert";
7704
- import { Buffer as gt } from "buffer";
7705
- import * as ks from "zlib";
7706
- import qr from "zlib";
7668
+ import Pi from "assert";
7669
+ import { Buffer as _t } from "buffer";
7670
+ import * as vs from "zlib";
7671
+ import jr from "zlib";
7707
7672
  import { posix as Zt } from "node:path";
7708
- import { basename as wn } from "node:path";
7709
- import fi from "fs";
7710
- import $2 from "fs";
7711
- import $s from "path";
7712
- import { win32 as In } from "node:path";
7713
- import sr from "path";
7714
- import Cr from "node:fs";
7715
- import so from "node:assert";
7716
- import { randomBytes as Ir } from "node:crypto";
7673
+ import { basename as Sn } from "node:path";
7674
+ import ui from "fs";
7675
+ import $ from "fs";
7676
+ import Xs from "path";
7677
+ import { win32 as Cn } from "node:path";
7678
+ import rr from "path";
7679
+ import Fr from "node:fs";
7680
+ import ro from "node:assert";
7681
+ import { randomBytes as Cr } from "node:crypto";
7717
7682
  import u from "node:fs";
7718
7683
  import R from "node:path";
7719
- import cr from "fs";
7720
- import mi from "node:fs";
7721
- import Ee from "node:path";
7684
+ import fr from "fs";
7685
+ import Ei from "node:fs";
7686
+ import we from "node:path";
7722
7687
  import k from "node:fs";
7723
- import jn from "node:fs/promises";
7724
- import pi from "node:path";
7725
- import { join as br } from "node:path";
7688
+ import Qn from "node:fs/promises";
7689
+ import wi from "node:path";
7690
+ import { join as gr } from "node:path";
7726
7691
  import v from "node:fs";
7727
- import Fr from "node:path";
7728
- var kr = Object.defineProperty;
7729
- var vr = (s3, t) => {
7730
- for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
7692
+ import kr from "node:path";
7693
+ var vr = Object.defineProperty;
7694
+ var Mr = (s3, t) => {
7695
+ for (var e in t) vr(s3, e, { get: t[e], enumerable: true });
7731
7696
  };
7732
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7733
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
7734
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
7735
- 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";
7736
7701
  var q = /* @__PURE__ */ Symbol("EOF");
7737
7702
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
7738
7703
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
7739
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
7704
+ var Ne = /* @__PURE__ */ Symbol("emittingEnd");
7740
7705
  var jt = /* @__PURE__ */ Symbol("emittedError");
7741
- var Ne = /* @__PURE__ */ Symbol("closed");
7742
- var Ts = /* @__PURE__ */ Symbol("read");
7706
+ var De = /* @__PURE__ */ Symbol("closed");
7707
+ var xs = /* @__PURE__ */ Symbol("read");
7743
7708
  var Ae = /* @__PURE__ */ Symbol("flush");
7744
- var xs = /* @__PURE__ */ Symbol("flushChunk");
7709
+ var Ls = /* @__PURE__ */ Symbol("flushChunk");
7745
7710
  var z = /* @__PURE__ */ Symbol("encoding");
7746
7711
  var Mt = /* @__PURE__ */ Symbol("decoder");
7747
7712
  var b = /* @__PURE__ */ Symbol("flowing");
7748
7713
  var Qt = /* @__PURE__ */ Symbol("paused");
7749
7714
  var Bt = /* @__PURE__ */ Symbol("resume");
7750
- var _ = /* @__PURE__ */ Symbol("buffer");
7751
- var A = /* @__PURE__ */ Symbol("pipes");
7752
- var g = /* @__PURE__ */ Symbol("bufferLength");
7753
- var yi = /* @__PURE__ */ Symbol("bufferPush");
7754
- var De = /* @__PURE__ */ Symbol("bufferShift");
7715
+ var g = /* @__PURE__ */ Symbol("buffer");
7716
+ var D = /* @__PURE__ */ Symbol("pipes");
7717
+ var _ = /* @__PURE__ */ Symbol("bufferLength");
7718
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
7719
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
7755
7720
  var L = /* @__PURE__ */ Symbol("objectMode");
7756
7721
  var w = /* @__PURE__ */ Symbol("destroyed");
7757
- var Ri = /* @__PURE__ */ Symbol("error");
7758
- var bi = /* @__PURE__ */ Symbol("emitData");
7759
- var Ls = /* @__PURE__ */ Symbol("emitEnd");
7760
- var _i = /* @__PURE__ */ Symbol("emitEnd2");
7722
+ var gi = /* @__PURE__ */ Symbol("error");
7723
+ var _i = /* @__PURE__ */ Symbol("emitData");
7724
+ var Ns = /* @__PURE__ */ Symbol("emitEnd");
7725
+ var Oi = /* @__PURE__ */ Symbol("emitEnd2");
7761
7726
  var Z = /* @__PURE__ */ Symbol("async");
7762
- var gi = /* @__PURE__ */ Symbol("abort");
7763
- var Ie = /* @__PURE__ */ Symbol("aborted");
7727
+ var Ti = /* @__PURE__ */ Symbol("abort");
7728
+ var Ce = /* @__PURE__ */ Symbol("aborted");
7764
7729
  var Jt = /* @__PURE__ */ Symbol("signal");
7765
7730
  var yt = /* @__PURE__ */ Symbol("dataListeners");
7766
7731
  var C = /* @__PURE__ */ Symbol("discarded");
7767
7732
  var te = (s3) => Promise.resolve().then(s3);
7768
- var Ur = (s3) => s3();
7769
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7770
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7771
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7772
- 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 Fe = class {
7773
7738
  src;
7774
7739
  dest;
7775
7740
  opts;
@@ -7786,7 +7751,7 @@ var Ce = class {
7786
7751
  this.unpipe(), this.opts.end && this.dest.end();
7787
7752
  }
7788
7753
  };
7789
- var Oi = class extends Ce {
7754
+ var xi = class extends Fe {
7790
7755
  unpipe() {
7791
7756
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
7792
7757
  }
@@ -7794,26 +7759,26 @@ var Oi = class extends Ce {
7794
7759
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
7795
7760
  }
7796
7761
  };
7797
- var Zr = (s3) => !!s3.objectMode;
7798
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7799
- var D = class extends Ti {
7762
+ var Yr = (s3) => !!s3.objectMode;
7763
+ var Kr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7764
+ var A = class extends Li {
7800
7765
  [b] = false;
7801
7766
  [Qt] = false;
7802
- [A] = [];
7803
- [_] = [];
7767
+ [D] = [];
7768
+ [g] = [];
7804
7769
  [L];
7805
7770
  [z];
7806
7771
  [Z];
7807
7772
  [Mt];
7808
7773
  [q] = false;
7809
7774
  [rt] = false;
7810
- [Le] = false;
7811
7775
  [Ne] = false;
7776
+ [De] = false;
7812
7777
  [jt] = null;
7813
- [g] = 0;
7778
+ [_] = 0;
7814
7779
  [w] = false;
7815
7780
  [Jt];
7816
- [Ie] = false;
7781
+ [Ce] = false;
7817
7782
  [yt] = 0;
7818
7783
  [C] = false;
7819
7784
  writable = true;
@@ -7821,12 +7786,12 @@ var D = class extends Ti {
7821
7786
  constructor(...t) {
7822
7787
  let e = t[0] || {};
7823
7788
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
7824
- 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[g] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
7825
7790
  let { signal: i } = e;
7826
- 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]()));
7827
7792
  }
7828
7793
  get bufferLength() {
7829
- return this[g];
7794
+ return this[_];
7830
7795
  }
7831
7796
  get encoding() {
7832
7797
  return this[z];
@@ -7849,47 +7814,47 @@ var D = class extends Ti {
7849
7814
  set async(t) {
7850
7815
  this[Z] = this[Z] || !!t;
7851
7816
  }
7852
- [gi]() {
7853
- 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);
7854
7819
  }
7855
7820
  get aborted() {
7856
- return this[Ie];
7821
+ return this[Ce];
7857
7822
  }
7858
7823
  set aborted(t) {
7859
7824
  }
7860
7825
  write(t, e, i) {
7861
- if (this[Ie]) return false;
7826
+ if (this[Ce]) return false;
7862
7827
  if (this[q]) throw new Error("write after end");
7863
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;
7864
7829
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
7865
- let r = this[Z] ? te : Ur;
7830
+ let r = this[Z] ? te : Hr;
7866
7831
  if (!this[L] && !Buffer.isBuffer(t)) {
7867
- if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7868
- 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);
7869
7834
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
7870
7835
  }
7871
- 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[b] && this[_] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[bi](t), this[_] !== 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[_] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[b]);
7872
7837
  }
7873
7838
  read(t) {
7874
7839
  if (this[w]) return null;
7875
- if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
7876
- this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
7877
- let e = this[Ts](t || null, this[_][0]);
7840
+ if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
7841
+ this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
7842
+ let e = this[xs](t || null, this[g][0]);
7878
7843
  return this[j](), e;
7879
7844
  }
7880
- [Ts](t, e) {
7881
- if (this[L]) this[De]();
7845
+ [xs](t, e) {
7846
+ if (this[L]) this[Ie]();
7882
7847
  else {
7883
7848
  let i = e;
7884
- 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[g][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[g][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7885
7850
  }
7886
- return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
7851
+ return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
7887
7852
  }
7888
7853
  end(t, e, i) {
7889
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;
7890
7855
  }
7891
7856
  [Bt]() {
7892
- 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[yt] && !this[D].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[g].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
7893
7858
  }
7894
7859
  resume() {
7895
7860
  return this[Bt]();
@@ -7906,39 +7871,39 @@ var D = class extends Ti {
7906
7871
  get paused() {
7907
7872
  return this[Qt];
7908
7873
  }
7909
- [yi](t) {
7910
- this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
7874
+ [bi](t) {
7875
+ this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
7911
7876
  }
7912
- [De]() {
7913
- return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
7877
+ [Ie]() {
7878
+ return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
7914
7879
  }
7915
7880
  [Ae](t = false) {
7916
7881
  do
7917
7882
  ;
7918
- while (this[xs](this[De]()) && this[_].length);
7919
- !t && !this[_].length && !this[q] && this.emit("drain");
7883
+ while (this[Ls](this[Ie]()) && this[g].length);
7884
+ !t && !this[g].length && !this[q] && this.emit("drain");
7920
7885
  }
7921
- [xs](t) {
7886
+ [Ls](t) {
7922
7887
  return this.emit("data", t), this[b];
7923
7888
  }
7924
7889
  pipe(t, e) {
7925
7890
  if (this[w]) return t;
7926
7891
  this[C] = false;
7927
7892
  let i = this[rt];
7928
- 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 Fe(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7929
7894
  }
7930
7895
  unpipe(t) {
7931
- let e = this[A].find((i) => i.dest === t);
7932
- 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[b] && this[yt] === 0 && (this[b] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
7933
7898
  }
7934
7899
  addListener(t, e) {
7935
7900
  return this.on(t, e);
7936
7901
  }
7937
7902
  on(t, e) {
7938
7903
  let i = super.on(t, e);
7939
- if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
7940
- else if (t === "readable" && this[g] !== 0) super.emit("readable");
7941
- else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7904
+ if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && 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);
7942
7907
  else if (t === "error" && this[jt]) {
7943
7908
  let r = e;
7944
7909
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -7950,29 +7915,29 @@ var D = class extends Ti {
7950
7915
  }
7951
7916
  off(t, e) {
7952
7917
  let i = super.off(t, e);
7953
- 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[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
7954
7919
  }
7955
7920
  removeAllListeners(t) {
7956
7921
  let e = super.removeAllListeners(t);
7957
- 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[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
7958
7923
  }
7959
7924
  get emittedEnd() {
7960
7925
  return this[rt];
7961
7926
  }
7962
7927
  [j]() {
7963
- !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);
7928
+ !this[Ne] && !this[rt] && !this[w] && this[g].length === 0 && this[q] && (this[Ne] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[De] && this.emit("close"), this[Ne] = false);
7964
7929
  }
7965
7930
  emit(t, ...e) {
7966
7931
  let i = e[0];
7967
7932
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
7968
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
7969
- 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]();
7970
7935
  if (t === "close") {
7971
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
7936
+ if (this[De] = true, !this[rt] && !this[w]) return false;
7972
7937
  let n = super.emit("close");
7973
7938
  return this.removeAllListeners("close"), n;
7974
7939
  } else if (t === "error") {
7975
- this[jt] = i, super.emit(Ri, i);
7940
+ this[jt] = i, super.emit(gi, i);
7976
7941
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
7977
7942
  return this[j](), n;
7978
7943
  } else if (t === "resume") {
@@ -7985,23 +7950,23 @@ var D = class extends Ti {
7985
7950
  let r = super.emit(t, ...e);
7986
7951
  return this[j](), r;
7987
7952
  }
7988
- [bi](t) {
7989
- 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();
7990
7955
  let e = this[C] ? false : super.emit("data", t);
7991
7956
  return this[j](), e;
7992
7957
  }
7993
- [Ls]() {
7994
- 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]());
7995
7960
  }
7996
- [_i]() {
7961
+ [Oi]() {
7997
7962
  if (this[Mt]) {
7998
7963
  let e = this[Mt].end();
7999
7964
  if (e) {
8000
- for (let i of this[A]) i.dest.write(e);
7965
+ for (let i of this[D]) i.dest.write(e);
8001
7966
  this[C] || super.emit("data", e);
8002
7967
  }
8003
7968
  }
8004
- for (let e of this[A]) e.end();
7969
+ for (let e of this[D]) e.end();
8005
7970
  let t = super.emit("end");
8006
7971
  return this.removeAllListeners("end"), t;
8007
7972
  }
@@ -8048,67 +8013,67 @@ var D = class extends Ti {
8048
8013
  }
8049
8014
  [Symbol.iterator]() {
8050
8015
  this[C] = false;
8051
- 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(gi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8052
8017
  if (t) return e();
8053
8018
  let r = this.read();
8054
8019
  return r === null ? e() : { done: false, value: r };
8055
8020
  };
8056
- 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(gi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8057
8022
  return this;
8058
8023
  }, [Symbol.dispose]: () => {
8059
8024
  } };
8060
8025
  }
8061
8026
  destroy(t) {
8062
8027
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
8063
- this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
8028
+ this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
8064
8029
  let e = this;
8065
- 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;
8066
8031
  }
8067
8032
  static get isStream() {
8068
- return Br;
8033
+ return Pr;
8069
8034
  }
8070
8035
  };
8071
- var Vr = I.writev;
8036
+ var $r = I.writev;
8072
8037
  var ot = /* @__PURE__ */ Symbol("_autoClose");
8073
8038
  var H = /* @__PURE__ */ Symbol("_close");
8074
8039
  var ee = /* @__PURE__ */ Symbol("_ended");
8075
8040
  var m = /* @__PURE__ */ Symbol("_fd");
8076
- var xi = /* @__PURE__ */ Symbol("_finished");
8041
+ var Ni = /* @__PURE__ */ Symbol("_finished");
8077
8042
  var J = /* @__PURE__ */ Symbol("_flags");
8078
- var Li = /* @__PURE__ */ Symbol("_flush");
8079
- var Ii = /* @__PURE__ */ Symbol("_handleChunk");
8080
- var Ci = /* @__PURE__ */ Symbol("_makeBuf");
8043
+ var Di = /* @__PURE__ */ Symbol("_flush");
8044
+ var Fi = /* @__PURE__ */ Symbol("_handleChunk");
8045
+ var ki = /* @__PURE__ */ Symbol("_makeBuf");
8081
8046
  var se = /* @__PURE__ */ Symbol("_mode");
8082
- var Fe = /* @__PURE__ */ Symbol("_needDrain");
8047
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
8083
8048
  var Ut = /* @__PURE__ */ Symbol("_onerror");
8084
8049
  var Ht = /* @__PURE__ */ Symbol("_onopen");
8085
- var Ni = /* @__PURE__ */ Symbol("_onread");
8050
+ var Ai = /* @__PURE__ */ Symbol("_onread");
8086
8051
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
8087
8052
  var ht = /* @__PURE__ */ Symbol("_open");
8088
8053
  var U = /* @__PURE__ */ Symbol("_path");
8089
8054
  var nt = /* @__PURE__ */ Symbol("_pos");
8090
8055
  var Y = /* @__PURE__ */ Symbol("_queue");
8091
8056
  var zt = /* @__PURE__ */ Symbol("_read");
8092
- var Ai = /* @__PURE__ */ Symbol("_readSize");
8057
+ var Ii = /* @__PURE__ */ Symbol("_readSize");
8093
8058
  var Q = /* @__PURE__ */ Symbol("_reading");
8094
8059
  var ie = /* @__PURE__ */ Symbol("_remain");
8095
- var Di = /* @__PURE__ */ Symbol("_size");
8096
- var ke = /* @__PURE__ */ Symbol("_write");
8060
+ var Ci = /* @__PURE__ */ Symbol("_size");
8061
+ var ve = /* @__PURE__ */ Symbol("_write");
8097
8062
  var Rt = /* @__PURE__ */ Symbol("_writing");
8098
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
8063
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
8099
8064
  var bt = /* @__PURE__ */ Symbol("_errored");
8100
- var _t = class extends D {
8065
+ var gt = class extends A {
8101
8066
  [bt] = false;
8102
8067
  [m];
8103
8068
  [U];
8104
- [Ai];
8069
+ [Ii];
8105
8070
  [Q] = false;
8106
- [Di];
8071
+ [Ci];
8107
8072
  [ie];
8108
8073
  [ot];
8109
8074
  constructor(t, e) {
8110
8075
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
8111
- 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[Q] = 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]();
8112
8077
  }
8113
8078
  get fd() {
8114
8079
  return this[m];
@@ -8128,19 +8093,19 @@ var _t = class extends D {
8128
8093
  [Ht](t, e) {
8129
8094
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
8130
8095
  }
8131
- [Ci]() {
8132
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
8096
+ [ki]() {
8097
+ return Buffer.allocUnsafe(Math.min(this[Ii], this[ie]));
8133
8098
  }
8134
8099
  [zt]() {
8135
8100
  if (!this[Q]) {
8136
8101
  this[Q] = true;
8137
- let t = this[Ci]();
8138
- if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
8139
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
8102
+ let t = this[ki]();
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));
8140
8105
  }
8141
8106
  }
8142
- [Ni](t, e, i) {
8143
- this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
8107
+ [Ai](t, e, i) {
8108
+ this[Q] = false, t ? this[Ut](t) : this[Fi](e, i) && this[zt]();
8144
8109
  }
8145
8110
  [H]() {
8146
8111
  if (this[ot] && typeof this[m] == "number") {
@@ -8151,7 +8116,7 @@ var _t = class extends D {
8151
8116
  [Ut](t) {
8152
8117
  this[Q] = true, this[H](), this.emit("error", t);
8153
8118
  }
8154
- [Ii](t, e) {
8119
+ [Fi](t, e) {
8155
8120
  let i = false;
8156
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;
8157
8122
  }
@@ -8169,7 +8134,7 @@ var _t = class extends D {
8169
8134
  }
8170
8135
  }
8171
8136
  };
8172
- var Me = class extends _t {
8137
+ var Be = class extends gt {
8173
8138
  [ht]() {
8174
8139
  let t = true;
8175
8140
  try {
@@ -8184,8 +8149,8 @@ var Me = class extends _t {
8184
8149
  if (!this[Q]) {
8185
8150
  this[Q] = true;
8186
8151
  do {
8187
- let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8188
- if (!this[Ii](i, e)) break;
8152
+ let e = this[ki](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8153
+ if (!this[Fi](i, e)) break;
8189
8154
  } while (true);
8190
8155
  this[Q] = false;
8191
8156
  }
@@ -8201,26 +8166,26 @@ var Me = class extends _t {
8201
8166
  }
8202
8167
  }
8203
8168
  };
8204
- var tt2 = class extends Kr {
8169
+ var tt2 = class extends Vr {
8205
8170
  readable = false;
8206
8171
  writable = true;
8207
8172
  [bt] = false;
8208
8173
  [Rt] = false;
8209
8174
  [ee] = false;
8210
8175
  [Y] = [];
8211
- [Fe] = false;
8176
+ [ke] = false;
8212
8177
  [U];
8213
8178
  [se];
8214
8179
  [ot];
8215
8180
  [m];
8216
- [ve];
8181
+ [Me];
8217
8182
  [J];
8218
- [xi] = false;
8183
+ [Ni] = false;
8219
8184
  [nt];
8220
8185
  constructor(t, e) {
8221
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;
8222
8187
  let i = this[nt] !== void 0 ? "r+" : "w";
8223
- 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]();
8224
8189
  }
8225
8190
  emit(t, ...e) {
8226
8191
  if (t === "error") {
@@ -8242,26 +8207,26 @@ var tt2 = class extends Kr {
8242
8207
  I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
8243
8208
  }
8244
8209
  [Ht](t, e) {
8245
- 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[Rt] || this[Di]());
8246
8211
  }
8247
8212
  end(t, e) {
8248
8213
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8249
8214
  }
8250
8215
  write(t, e) {
8251
- 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[Rt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[Rt] = true, this[ve](t), true);
8252
8217
  }
8253
- [ke](t) {
8218
+ [ve](t) {
8254
8219
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
8255
8220
  }
8256
8221
  [Pt](t, e) {
8257
- 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[Rt] = false, this[ee] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
8258
8223
  }
8259
- [Li]() {
8224
+ [Di]() {
8260
8225
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
8261
- else if (this[Y].length === 1) this[ke](this[Y].pop());
8226
+ else if (this[Y].length === 1) this[ve](this[Y].pop());
8262
8227
  else {
8263
8228
  let t = this[Y];
8264
- 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));
8265
8230
  }
8266
8231
  }
8267
8232
  [H]() {
@@ -8274,7 +8239,7 @@ var tt2 = class extends Kr {
8274
8239
  var Wt = class extends tt2 {
8275
8240
  [ht]() {
8276
8241
  let t;
8277
- if (this[ve] && this[J] === "r+") try {
8242
+ if (this[Me] && this[J] === "r+") try {
8278
8243
  t = I.openSync(this[U], this[J], this[se]);
8279
8244
  } catch (e) {
8280
8245
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -8289,7 +8254,7 @@ var Wt = class extends tt2 {
8289
8254
  this[m] = void 0, I.closeSync(t), this.emit("close");
8290
8255
  }
8291
8256
  }
8292
- [ke](t) {
8257
+ [ve](t) {
8293
8258
  let e = true;
8294
8259
  try {
8295
8260
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -8301,21 +8266,21 @@ var Wt = class extends tt2 {
8301
8266
  }
8302
8267
  }
8303
8268
  };
8304
- 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"]]);
8305
8270
  var As = (s3) => !!s3.sync && !!s3.file;
8306
- var Ds = (s3) => !s3.sync && !!s3.file;
8307
- var Is = (s3) => !!s3.sync && !s3.file;
8308
- var Cs = (s3) => !s3.sync && !s3.file;
8309
- var Fs = (s3) => !!s3.file;
8310
- var Xr = (s3) => {
8311
- let t = $r.get(s3);
8271
+ var Is = (s3) => !s3.sync && !!s3.file;
8272
+ var Cs = (s3) => !!s3.sync && !s3.file;
8273
+ var Fs = (s3) => !s3.sync && !s3.file;
8274
+ var ks = (s3) => !!s3.file;
8275
+ var qr = (s3) => {
8276
+ let t = Xr.get(s3);
8312
8277
  return t || s3;
8313
8278
  };
8314
8279
  var re = (s3 = {}) => {
8315
8280
  if (!s3) return {};
8316
8281
  let t = {};
8317
8282
  for (let [e, i] of Object.entries(s3)) {
8318
- let r = Xr(e);
8283
+ let r = qr(e);
8319
8284
  t[r] = i;
8320
8285
  }
8321
8286
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
@@ -8326,25 +8291,25 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
8326
8291
  if (r?.(a, o), As(a)) {
8327
8292
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8328
8293
  return s3(a, o);
8329
- } else if (Ds(a)) {
8294
+ } else if (Is(a)) {
8330
8295
  let l = t(a, o);
8331
8296
  return h ? l.then(() => h(), h) : l;
8332
- } else if (Is(a)) {
8297
+ } else if (Cs(a)) {
8333
8298
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8334
8299
  return e(a, o);
8335
- } else if (Cs(a)) {
8300
+ } else if (Fs(a)) {
8336
8301
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
8337
8302
  return i(a, o);
8338
8303
  }
8339
8304
  throw new Error("impossible options??");
8340
8305
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
8341
- var jr = qr.constants || { ZLIB_VERNUM: 4736 };
8342
- 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));
8343
- var Qr = gt.concat;
8344
- var vs = Object.getOwnPropertyDescriptor(gt, "concat");
8345
- var Jr = (s3) => s3;
8346
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
8347
- gt.concat = s3 ? Jr : Qr;
8306
+ var Qr = jr.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 }, Qr));
8308
+ var Jr = _t.concat;
8309
+ var Ms = Object.getOwnPropertyDescriptor(_t, "concat");
8310
+ var tn = (s3) => s3;
8311
+ var Mi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
8312
+ _t.concat = s3 ? tn : Jr;
8348
8313
  } : (s3) => {
8349
8314
  };
8350
8315
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -8358,8 +8323,8 @@ var Gt = class extends Error {
8358
8323
  return "ZlibError";
8359
8324
  }
8360
8325
  };
8361
- var vi = /* @__PURE__ */ Symbol("flushFlag");
8362
- var ne = class extends D {
8326
+ var Bi = /* @__PURE__ */ Symbol("flushFlag");
8327
+ var ne = class extends A {
8363
8328
  #t = false;
8364
8329
  #i = false;
8365
8330
  #s;
@@ -8378,9 +8343,9 @@ var ne = class extends D {
8378
8343
  }
8379
8344
  constructor(t, e) {
8380
8345
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
8381
- 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);
8382
8347
  try {
8383
- this.#e = new ks[e](t);
8348
+ this.#e = new vs[e](t);
8384
8349
  } catch (i) {
8385
8350
  throw new Gt(i, this.constructor);
8386
8351
  }
@@ -8392,10 +8357,10 @@ var ne = class extends D {
8392
8357
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
8393
8358
  }
8394
8359
  reset() {
8395
- 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?.();
8396
8361
  }
8397
8362
  flush(t) {
8398
- 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(_t.alloc(0), { [Bi]: t })));
8399
8364
  }
8400
8365
  end(t, e, i) {
8401
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);
@@ -8407,20 +8372,20 @@ var ne = class extends D {
8407
8372
  return super.write(t);
8408
8373
  }
8409
8374
  write(t, e, i) {
8410
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
8411
- Mi(this.#e, "zlib binding closed");
8375
+ if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = _t.from(t, e)), this.#t) return;
8376
+ Pi(this.#e, "zlib binding closed");
8412
8377
  let r = this.#e._handle, n = r.close;
8413
8378
  r.close = () => {
8414
8379
  };
8415
8380
  let o = this.#e.close;
8416
8381
  this.#e.close = () => {
8417
- }, ki(true);
8382
+ }, Mi(true);
8418
8383
  let h;
8419
8384
  try {
8420
- let l = typeof t[vi] == "number" ? t[vi] : this.#s;
8421
- 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);
8422
8387
  } catch (l) {
8423
- ki(false), this.#o(new Gt(l, this.write));
8388
+ Mi(false), this.#o(new Gt(l, this.write));
8424
8389
  } finally {
8425
8390
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
8426
8391
  }
@@ -8428,13 +8393,13 @@ var ne = class extends D {
8428
8393
  let a;
8429
8394
  if (h) if (Array.isArray(h) && h.length > 0) {
8430
8395
  let l = h[0];
8431
- a = this[Ot](gt.from(l));
8396
+ a = this[Ot](_t.from(l));
8432
8397
  for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
8433
- } else a = this[Ot](gt.from(h));
8398
+ } else a = this[Ot](_t.from(h));
8434
8399
  return i && i(), a;
8435
8400
  }
8436
8401
  };
8437
- var Be = class extends ne {
8402
+ var Pe = class extends ne {
8438
8403
  #t;
8439
8404
  #i;
8440
8405
  constructor(t, e) {
@@ -8445,7 +8410,7 @@ var Be = class extends ne {
8445
8410
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
8446
8411
  if (!this.handle.params) throw new Error("not supported in this implementation");
8447
8412
  if (this.#t !== t || this.#i !== e) {
8448
- 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");
8449
8414
  let i = this.handle.flush;
8450
8415
  this.handle.flush = (r, n) => {
8451
8416
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -8460,7 +8425,7 @@ var Be = class extends ne {
8460
8425
  }
8461
8426
  }
8462
8427
  };
8463
- var Pe = class extends Be {
8428
+ var ze = class extends Pe {
8464
8429
  #t;
8465
8430
  constructor(t) {
8466
8431
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -8469,87 +8434,87 @@ var Pe = class extends Be {
8469
8434
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
8470
8435
  }
8471
8436
  };
8472
- var ze = class extends Be {
8437
+ var Ue = class extends Pe {
8473
8438
  constructor(t) {
8474
8439
  super(t, "Unzip");
8475
8440
  }
8476
8441
  };
8477
- var Ue = class extends ne {
8442
+ var He = class extends ne {
8478
8443
  constructor(t, e) {
8479
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);
8480
8445
  }
8481
8446
  };
8482
- var He = class extends Ue {
8447
+ var We = class extends He {
8483
8448
  constructor(t) {
8484
8449
  super(t, "BrotliCompress");
8485
8450
  }
8486
8451
  };
8487
- var We = class extends Ue {
8452
+ var Ge = class extends He {
8488
8453
  constructor(t) {
8489
8454
  super(t, "BrotliDecompress");
8490
8455
  }
8491
8456
  };
8492
- var Ge = class extends ne {
8457
+ var Ze = class extends ne {
8493
8458
  constructor(t, e) {
8494
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);
8495
8460
  }
8496
8461
  };
8497
- var Ze = class extends Ge {
8462
+ var Ye = class extends Ze {
8498
8463
  constructor(t) {
8499
8464
  super(t, "ZstdCompress");
8500
8465
  }
8501
8466
  };
8502
- var Ye = class extends Ge {
8467
+ var Ke = class extends Ze {
8503
8468
  constructor(t) {
8504
8469
  super(t, "ZstdDecompress");
8505
8470
  }
8506
8471
  };
8507
- var Ms = (s3, t) => {
8508
- 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);
8509
8474
  else throw Error("cannot encode number outside of javascript safe integer range");
8510
8475
  return t;
8511
8476
  };
8512
- var en = (s3, t) => {
8477
+ var sn = (s3, t) => {
8513
8478
  t[0] = 128;
8514
8479
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
8515
8480
  };
8516
- var sn = (s3, t) => {
8481
+ var rn = (s3, t) => {
8517
8482
  t[0] = 255;
8518
8483
  var e = false;
8519
8484
  s3 = s3 * -1;
8520
8485
  for (var i = t.length; i > 1; i--) {
8521
8486
  var r = s3 & 255;
8522
- 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));
8523
8488
  }
8524
8489
  };
8525
- var Bs = (s3) => {
8526
- 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;
8527
8492
  if (e === null) throw Error("invalid base256 encoding");
8528
8493
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
8529
8494
  return e;
8530
8495
  };
8531
- var rn = (s3) => {
8496
+ var nn = (s3) => {
8532
8497
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
8533
8498
  var n = Number(s3[r]), o;
8534
- 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));
8535
8500
  }
8536
8501
  return e;
8537
8502
  };
8538
- var nn = (s3) => {
8503
+ var on = (s3) => {
8539
8504
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
8540
8505
  var r = Number(s3[i]);
8541
8506
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
8542
8507
  }
8543
8508
  return e;
8544
8509
  };
8545
- var Ps = (s3) => (255 ^ s3) & 255;
8546
- var zs = (s3) => (255 ^ s3) + 1 & 255;
8547
- var Bi = {};
8548
- 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 });
8549
8514
  var oe = (s3) => he.has(s3);
8550
- var hn = (s3) => Ke.has(s3);
8515
+ var an = (s3) => Ve.has(s3);
8551
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"]]);
8552
- var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8517
+ var Ve = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8553
8518
  var F = class {
8554
8519
  cksumValid = false;
8555
8520
  needPax = false;
@@ -8577,14 +8542,14 @@ var F = class {
8577
8542
  }
8578
8543
  decode(t, e, i, r) {
8579
8544
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8580
- 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);
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 ?? Ui(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8581
8546
  let n = Tt(t, e + 156, 1);
8582
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) {
8583
8548
  let h = Tt(t, e + 345, 155);
8584
8549
  this.path = h + "/" + this.path;
8585
8550
  } else {
8586
8551
  let h = Tt(t, e + 345, 130);
8587
- 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);
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);
8588
8553
  }
8589
8554
  let o = 256;
8590
8555
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -8596,8 +8561,8 @@ var F = class {
8596
8561
  }
8597
8562
  encode(t, e = 0) {
8598
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");
8599
- let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
8600
- 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 = 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 = Hi(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 = Hi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Hi(t, e + 488, 12, this.ctime) || this.needPax);
8601
8566
  let h = 256;
8602
8567
  for (let a = e; a < e + 148; a++) h += t[a];
8603
8568
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -8610,13 +8575,13 @@ var F = class {
8610
8575
  return this.#t;
8611
8576
  }
8612
8577
  set type(t) {
8613
- let e = String(Ke.get(t));
8578
+ let e = String(Ve.get(t));
8614
8579
  if (oe(e) || e === "Unsupported") this.#t = e;
8615
8580
  else if (oe(t)) this.#t = t;
8616
8581
  else throw new TypeError("invalid entry type: " + t);
8617
8582
  }
8618
8583
  };
8619
- var an = (s3, t) => {
8584
+ var ln = (s3, t) => {
8620
8585
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
8621
8586
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
8622
8587
  else {
@@ -8629,19 +8594,19 @@ var an = (s3, t) => {
8629
8594
  return n;
8630
8595
  };
8631
8596
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8632
- var Pi = (s3, t, e) => ln(at(s3, t, e));
8633
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8634
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
8635
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
8636
- var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8637
- var dn = { 12: 8589934591, 8: 2097151 };
8638
- 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);
8639
- var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
8640
- var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
8641
- var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8642
- var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8643
- var En = new Array(156).join("\0");
8644
- 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);
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 xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + wn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8645
8610
  var ct = class s {
8646
8611
  atime;
8647
8612
  mtime;
@@ -8668,7 +8633,7 @@ var ct = class s {
8668
8633
  if (t === "") return Buffer.allocUnsafe(0);
8669
8634
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
8670
8635
  for (let n = 0; n < 512; n++) r[n] = 0;
8671
- 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 F({ 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");
8672
8637
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
8673
8638
  return r;
8674
8639
  }
@@ -8682,13 +8647,13 @@ var ct = class s {
8682
8647
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
8683
8648
  }
8684
8649
  static parse(t, e, i = false) {
8685
- return new s(Sn(yn(t), e), i);
8650
+ return new s(yn(Rn(t), e), i);
8686
8651
  }
8687
8652
  };
8688
- var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8689
- var yn = (s3) => s3.replace(/\n$/, "").split(`
8690
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
8691
- 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(bn, /* @__PURE__ */ Object.create(null));
8656
+ var bn = (s3, t) => {
8692
8657
  let e = parseInt(t, 10);
8693
8658
  if (e !== Buffer.byteLength(t) + 1) return s3;
8694
8659
  t = t.slice((e + " ").length);
@@ -8697,9 +8662,9 @@ var Rn = (s3, t) => {
8697
8662
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
8698
8663
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
8699
8664
  };
8700
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8701
- var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8702
- var Yt = class extends D {
8665
+ var gn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8666
+ var f = gn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8667
+ var Yt = class extends A {
8703
8668
  extended;
8704
8669
  globalExtended;
8705
8670
  header;
@@ -8766,41 +8731,41 @@ var Yt = class extends D {
8766
8731
  var Lt = (s3, t, e, i = {}) => {
8767
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));
8768
8733
  };
8769
- var gn = 1024 * 1024;
8770
- var Zi = Buffer.from([31, 139]);
8771
- var Yi = Buffer.from([40, 181, 47, 253]);
8772
- 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);
8773
8738
  var B = /* @__PURE__ */ Symbol("state");
8774
8739
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
8775
8740
  var et = /* @__PURE__ */ Symbol("readEntry");
8776
- var Ui = /* @__PURE__ */ Symbol("nextEntry");
8777
- var Us = /* @__PURE__ */ Symbol("processEntry");
8741
+ var Wi = /* @__PURE__ */ Symbol("nextEntry");
8742
+ var Hs = /* @__PURE__ */ Symbol("processEntry");
8778
8743
  var V = /* @__PURE__ */ Symbol("extendedHeader");
8779
8744
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
8780
8745
  var ft = /* @__PURE__ */ Symbol("meta");
8781
- var Hs = /* @__PURE__ */ Symbol("emitMeta");
8746
+ var Ws = /* @__PURE__ */ Symbol("emitMeta");
8782
8747
  var p = /* @__PURE__ */ Symbol("buffer");
8783
8748
  var it = /* @__PURE__ */ Symbol("queue");
8784
8749
  var dt = /* @__PURE__ */ Symbol("ended");
8785
- var Hi = /* @__PURE__ */ Symbol("emittedEnd");
8786
- var At = /* @__PURE__ */ Symbol("emit");
8750
+ var Gi = /* @__PURE__ */ Symbol("emittedEnd");
8751
+ var Dt = /* @__PURE__ */ Symbol("emit");
8787
8752
  var y = /* @__PURE__ */ Symbol("unzip");
8788
- var Ve = /* @__PURE__ */ Symbol("consumeChunk");
8789
- var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
8790
- var Wi = /* @__PURE__ */ Symbol("consumeBody");
8791
- var Ws = /* @__PURE__ */ Symbol("consumeMeta");
8792
- 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");
8793
8758
  var le = /* @__PURE__ */ Symbol("consuming");
8794
- var Gi = /* @__PURE__ */ Symbol("bufferConcat");
8795
- var Xe = /* @__PURE__ */ Symbol("maybeEnd");
8759
+ var Yi = /* @__PURE__ */ Symbol("bufferConcat");
8760
+ var qe = /* @__PURE__ */ Symbol("maybeEnd");
8796
8761
  var Kt = /* @__PURE__ */ Symbol("writing");
8797
8762
  var ut = /* @__PURE__ */ Symbol("aborted");
8798
- var qe = /* @__PURE__ */ Symbol("onDone");
8799
- var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
8800
- var je = /* @__PURE__ */ Symbol("sawNullBlock");
8801
- var Qe = /* @__PURE__ */ Symbol("sawEOF");
8802
- var Zs = /* @__PURE__ */ Symbol("closeStream");
8803
- var Tn = () => true;
8763
+ var je = /* @__PURE__ */ Symbol("onDone");
8764
+ var At = /* @__PURE__ */ Symbol("sawValidEntry");
8765
+ var Qe = /* @__PURE__ */ Symbol("sawNullBlock");
8766
+ var Je = /* @__PURE__ */ Symbol("sawEOF");
8767
+ var Ys = /* @__PURE__ */ Symbol("closeStream");
8768
+ var xn = () => true;
8804
8769
  var st = class extends _n {
8805
8770
  file;
8806
8771
  strict;
@@ -8821,36 +8786,36 @@ var st = class extends _n {
8821
8786
  [dt] = false;
8822
8787
  [y];
8823
8788
  [ut] = false;
8824
- [Dt];
8825
- [je] = false;
8789
+ [At];
8826
8790
  [Qe] = false;
8791
+ [Je] = false;
8827
8792
  [Kt] = false;
8828
8793
  [le] = false;
8829
- [Hi] = false;
8794
+ [Gi] = false;
8830
8795
  constructor(t = {}) {
8831
- super(), this.file = t.file || "", this.on(qe, () => {
8832
- (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8833
- }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
8796
+ super(), this.file = t.file || "", this.on(je, () => {
8797
+ (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8798
+ }), t.ondone ? this.on(je, t.ondone) : this.on(je, () => {
8834
8799
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
8835
- }), 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;
8836
8801
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
8837
8802
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
8838
8803
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
8839
- 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);
8840
8805
  }
8841
8806
  warn(t, e, i = {}) {
8842
8807
  Lt(this, t, e, i);
8843
8808
  }
8844
- [Gs](t, e) {
8845
- this[Dt] === void 0 && (this[Dt] = false);
8809
+ [Zs](t, e) {
8810
+ this[At] === void 0 && (this[At] = false);
8846
8811
  let i;
8847
8812
  try {
8848
8813
  i = new F(t, e, this[V], this[ae]);
8849
8814
  } catch (r) {
8850
8815
  return this.warn("TAR_ENTRY_INVALID", r);
8851
8816
  }
8852
- if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
8853
- else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8817
+ if (i.nullBlock) this[Qe] ? (this[Je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[Qe] = true, this[Dt]("nullBlock"));
8818
+ else if (this[Qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8854
8819
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
8855
8820
  else {
8856
8821
  let r = i.type;
@@ -8858,52 +8823,52 @@ var st = class extends _n {
8858
8823
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
8859
8824
  else {
8860
8825
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
8861
- if (!this[Dt]) if (n.remain) {
8826
+ if (!this[At]) if (n.remain) {
8862
8827
  let o = () => {
8863
- n.invalid || (this[Dt] = true);
8828
+ n.invalid || (this[At] = true);
8864
8829
  };
8865
8830
  n.on("end", o);
8866
- } else this[Dt] = true;
8867
- 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[At] = true;
8832
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[Dt]("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[Dt]("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]())));
8868
8833
  }
8869
8834
  }
8870
8835
  }
8871
- [Zs]() {
8836
+ [Ys]() {
8872
8837
  queueMicrotask(() => this.emit("close"));
8873
8838
  }
8874
- [Us](t) {
8839
+ [Hs](t) {
8875
8840
  let e = true;
8876
8841
  if (!t) this[et] = void 0, e = false;
8877
8842
  else if (Array.isArray(t)) {
8878
8843
  let [i, ...r] = t;
8879
8844
  this.emit(i, ...r);
8880
- } 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);
8881
8846
  return e;
8882
8847
  }
8883
- [Ui]() {
8848
+ [Wi]() {
8884
8849
  do
8885
8850
  ;
8886
- while (this[Us](this[it].shift()));
8851
+ while (this[Hs](this[it].shift()));
8887
8852
  if (this[it].length === 0) {
8888
8853
  let t = this[et];
8889
8854
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8890
8855
  }
8891
8856
  }
8892
- [Wi](t, e) {
8857
+ [Zi](t, e) {
8893
8858
  let i = this[Nt];
8894
8859
  if (!i) throw new Error("attempt to consume body without entry??");
8895
8860
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
8896
8861
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
8897
8862
  }
8898
- [Ws](t, e) {
8899
- let i = this[Nt], r = this[Wi](t, e);
8900
- return !this[Nt] && i && this[Hs](i), r;
8863
+ [Gs](t, e) {
8864
+ let i = this[Nt], r = this[Zi](t, e);
8865
+ return !this[Nt] && i && this[Ws](i), r;
8901
8866
  }
8902
- [At](t, e, i) {
8867
+ [Dt](t, e, i) {
8903
8868
  this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
8904
8869
  }
8905
- [Hs](t) {
8906
- switch (this[At]("meta", this[ft]), t.type) {
8870
+ [Ws](t) {
8871
+ switch (this[Dt]("meta", this[ft]), t.type) {
8907
8872
  case "ExtendedHeader":
8908
8873
  case "OldExtendedHeader":
8909
8874
  this[V] = ct.parse(this[ft], this[V], false);
@@ -8932,12 +8897,12 @@ var st = class extends _n {
8932
8897
  write(t, e, i) {
8933
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;
8934
8899
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
8935
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
8936
- 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);
8937
8902
  let o = false;
8938
8903
  if (this[y] === false && this.zstd !== false) {
8939
8904
  o = true;
8940
- 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]) {
8941
8906
  o = false;
8942
8907
  break;
8943
8908
  }
@@ -8952,61 +8917,61 @@ var st = class extends _n {
8952
8917
  }
8953
8918
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
8954
8919
  let a = this[dt];
8955
- 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", () => {
8956
- 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]();
8957
8922
  }), this[Kt] = true;
8958
8923
  let l = !!this[y][a ? "end" : "write"](t);
8959
8924
  return this[Kt] = false, i?.(), l;
8960
8925
  }
8961
8926
  }
8962
- 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;
8963
8928
  let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
8964
8929
  return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
8965
8930
  }
8966
- [Gi](t) {
8931
+ [Yi](t) {
8967
8932
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
8968
8933
  }
8969
- [Xe]() {
8970
- if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
8971
- this[Hi] = true;
8934
+ [qe]() {
8935
+ if (this[dt] && !this[Gi] && !this[ut] && !this[le]) {
8936
+ this[Gi] = true;
8972
8937
  let t = this[Nt];
8973
8938
  if (t && t.blockRemain) {
8974
8939
  let e = this[p] ? this[p].length : 0;
8975
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();
8976
8941
  }
8977
- this[At](qe);
8942
+ this[Dt](je);
8978
8943
  }
8979
8944
  }
8980
- [Ve](t) {
8981
- if (this[le] && t) this[Gi](t);
8982
- 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]();
8983
8948
  else if (t) {
8984
8949
  if (this[le] = true, this[p]) {
8985
- this[Gi](t);
8950
+ this[Yi](t);
8986
8951
  let e = this[p];
8987
- this[p] = void 0, this[$e](e);
8988
- } else this[$e](t);
8989
- 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]; ) {
8990
8955
  let e = this[p];
8991
- this[p] = void 0, this[$e](e);
8956
+ this[p] = void 0, this[Xe](e);
8992
8957
  }
8993
8958
  this[le] = false;
8994
8959
  }
8995
- (!this[p] || this[dt]) && this[Xe]();
8960
+ (!this[p] || this[dt]) && this[qe]();
8996
8961
  }
8997
- [$e](t) {
8962
+ [Xe](t) {
8998
8963
  let e = 0, i = t.length;
8999
- for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
8964
+ for (; e + 512 <= i && !this[ut] && !this[Je]; ) switch (this[B]) {
9000
8965
  case "begin":
9001
8966
  case "header":
9002
- this[Gs](t, e), e += 512;
8967
+ this[Zs](t, e), e += 512;
9003
8968
  break;
9004
8969
  case "ignore":
9005
8970
  case "body":
9006
- e += this[Wi](t, e);
8971
+ e += this[Zi](t, e);
9007
8972
  break;
9008
8973
  case "meta":
9009
- e += this[Ws](t, e);
8974
+ e += this[Gs](t, e);
9010
8975
  break;
9011
8976
  default:
9012
8977
  throw new Error("invalid state: " + this[B]);
@@ -9014,7 +8979,7 @@ var st = class extends _n {
9014
8979
  e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
9015
8980
  }
9016
8981
  end(t, e, i) {
9017
- 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;
9018
8983
  }
9019
8984
  };
9020
8985
  var mt = (s3) => {
@@ -9022,19 +8987,19 @@ var mt = (s3) => {
9022
8987
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
9023
8988
  return e === -1 ? s3 : s3.slice(0, e);
9024
8989
  };
9025
- var Nn = (s3) => {
8990
+ var Dn = (s3) => {
9026
8991
  let t = s3.onReadEntry;
9027
8992
  s3.onReadEntry = t ? (e) => {
9028
8993
  t(e), e.resume();
9029
8994
  } : (e) => e.resume();
9030
8995
  };
9031
- var Ki = (s3, t) => {
8996
+ var $i = (s3, t) => {
9032
8997
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
9033
- let h = o || Ln(n).root || ".", a;
8998
+ let h = o || Nn(n).root || ".", a;
9034
8999
  if (n === h) a = false;
9035
9000
  else {
9036
9001
  let l = e.get(n);
9037
- a = l !== void 0 ? l : r(xn(n), h);
9002
+ a = l !== void 0 ? l : r(Ln(n), h);
9038
9003
  }
9039
9004
  return e.set(n, a), a;
9040
9005
  };
@@ -9064,58 +9029,58 @@ var An = (s3) => {
9064
9029
  }
9065
9030
  }
9066
9031
  };
9067
- var Dn = (s3, t) => {
9032
+ var In = (s3, t) => {
9068
9033
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9069
9034
  return new Promise((o, h) => {
9070
9035
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
9071
9036
  if (a) h(a);
9072
9037
  else {
9073
- let c = new _t(r, { readSize: i, size: l.size });
9038
+ let c = new gt(r, { readSize: i, size: l.size });
9074
9039
  c.on("error", h), c.pipe(e);
9075
9040
  }
9076
9041
  });
9077
9042
  });
9078
9043
  };
9079
- var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9080
- t?.length && Ki(s3, t), s3.noResume || Nn(s3);
9044
+ var It = K(An, In, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9045
+ t?.length && $i(s3, t), s3.noResume || Dn(s3);
9081
9046
  });
9082
- 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);
9083
- 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: Fn, parse: Ks } = Cn;
9084
9049
  var ce = (s3) => {
9085
- let t = "", e = Ys(s3);
9086
- for (; Cn(s3) || e.root; ) {
9050
+ let t = "", e = Ks(s3);
9051
+ for (; Fn(s3) || e.root; ) {
9087
9052
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
9088
- s3 = s3.slice(i.length), t += i, e = Ys(s3);
9053
+ s3 = s3.slice(i.length), t += i, e = Ks(s3);
9089
9054
  }
9090
9055
  return [t, s3];
9091
9056
  };
9092
- var Je = ["|", "<", ">", "?", ":"];
9093
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9094
- var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
9095
- var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
9096
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
9097
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
9098
- var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9099
- var vn = 16 * 1024 * 1024;
9100
- var Xs = /* @__PURE__ */ Symbol("process");
9101
- var qs = /* @__PURE__ */ Symbol("file");
9102
- var js = /* @__PURE__ */ Symbol("directory");
9103
- var ji = /* @__PURE__ */ Symbol("symlink");
9104
- var Qs = /* @__PURE__ */ Symbol("hardlink");
9057
+ var ti = ["|", "<", ">", "?", ":"];
9058
+ var qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9059
+ var kn = new Map(ti.map((s3, t) => [s3, qi[t]]));
9060
+ var vn = new Map(qi.map((s3, t) => [s3, ti[t]]));
9061
+ var ji = (s3) => ti.reduce((t, e) => t.split(e).join(kn.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 js = /* @__PURE__ */ Symbol("file");
9067
+ var Qs = /* @__PURE__ */ Symbol("directory");
9068
+ var Ji = /* @__PURE__ */ Symbol("symlink");
9069
+ var Js = /* @__PURE__ */ Symbol("hardlink");
9105
9070
  var fe = /* @__PURE__ */ Symbol("header");
9106
- var ti = /* @__PURE__ */ Symbol("read");
9107
- var Qi = /* @__PURE__ */ Symbol("lstat");
9108
- var ei = /* @__PURE__ */ Symbol("onlstat");
9109
- var Ji = /* @__PURE__ */ Symbol("onread");
9110
- var ts = /* @__PURE__ */ Symbol("onreadlink");
9111
- var es = /* @__PURE__ */ Symbol("openfile");
9112
- 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");
9113
9078
  var pt = /* @__PURE__ */ Symbol("close");
9114
- var ii = /* @__PURE__ */ Symbol("mode");
9115
- var ss = /* @__PURE__ */ Symbol("awaitDrain");
9116
- var qi = /* @__PURE__ */ Symbol("ondrain");
9079
+ var si = /* @__PURE__ */ Symbol("mode");
9080
+ var ns = /* @__PURE__ */ Symbol("awaitDrain");
9081
+ var Qi = /* @__PURE__ */ Symbol("ondrain");
9117
9082
  var X = /* @__PURE__ */ Symbol("prefix");
9118
- var de = class extends D {
9083
+ var de = class extends A {
9119
9084
  path;
9120
9085
  portable;
9121
9086
  myuid = process.getuid && process.getuid() || 0;
@@ -9148,15 +9113,15 @@ var de = class extends D {
9148
9113
  #t = false;
9149
9114
  constructor(t, e = {}) {
9150
9115
  let i = re(e);
9151
- 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);
9152
9117
  let r = false;
9153
9118
  if (!this.preservePaths) {
9154
9119
  let [o, h] = ce(this.path);
9155
9120
  o && typeof h == "string" && (this.path = h, r = o);
9156
9121
  }
9157
- 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 });
9158
9123
  let n = this.statCache.get(this.absolute);
9159
- n ? this[ei](n) : this[Qi]();
9124
+ n ? this[ii](n) : this[ts]();
9160
9125
  }
9161
9126
  warn(t, e, i = {}) {
9162
9127
  return Lt(this, t, e, i);
@@ -9164,93 +9129,93 @@ var de = class extends D {
9164
9129
  emit(t, ...e) {
9165
9130
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9166
9131
  }
9167
- [Qi]() {
9168
- $2.lstat(this.absolute, (t, e) => {
9132
+ [ts]() {
9133
+ $.lstat(this.absolute, (t, e) => {
9169
9134
  if (t) return this.emit("error", t);
9170
- this[ei](e);
9135
+ this[ii](e);
9171
9136
  });
9172
9137
  }
9173
- [ei](t) {
9174
- 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]();
9175
9140
  }
9176
- [Xs]() {
9141
+ [qs]() {
9177
9142
  switch (this.type) {
9178
9143
  case "File":
9179
- return this[qs]();
9180
- case "Directory":
9181
9144
  return this[js]();
9145
+ case "Directory":
9146
+ return this[Qs]();
9182
9147
  case "SymbolicLink":
9183
- return this[ji]();
9148
+ return this[Ji]();
9184
9149
  default:
9185
9150
  return this.end();
9186
9151
  }
9187
9152
  }
9188
- [ii](t) {
9189
- return Vi(t, this.type === "Directory", this.portable);
9153
+ [si](t) {
9154
+ return Xi(t, this.type === "Directory", this.portable);
9190
9155
  }
9191
9156
  [X](t) {
9192
- return Js(t, this.prefix);
9157
+ return tr(t, this.prefix);
9193
9158
  }
9194
9159
  [fe]() {
9195
9160
  if (!this.stat) throw new Error("cannot write header before stat");
9196
- 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 F({ 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());
9197
9162
  let t = this.header?.block;
9198
9163
  if (!t) throw new Error("failed to encode header");
9199
9164
  super.write(t);
9200
9165
  }
9201
- [js]() {
9166
+ [Qs]() {
9202
9167
  if (!this.stat) throw new Error("cannot create directory entry without stat");
9203
9168
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9204
9169
  }
9205
- [ji]() {
9206
- $2.readlink(this.absolute, (t, e) => {
9170
+ [Ji]() {
9171
+ $.readlink(this.absolute, (t, e) => {
9207
9172
  if (t) return this.emit("error", t);
9208
- this[ts](e);
9173
+ this[is](e);
9209
9174
  });
9210
9175
  }
9211
- [ts](t) {
9176
+ [is](t) {
9212
9177
  this.linkpath = f(t), this[fe](), this.end();
9213
9178
  }
9214
- [Qs](t) {
9179
+ [Js](t) {
9215
9180
  if (!this.stat) throw new Error("cannot create link entry without stat");
9216
- 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();
9217
9182
  }
9218
- [qs]() {
9183
+ [js]() {
9219
9184
  if (!this.stat) throw new Error("cannot create file entry without stat");
9220
9185
  if (this.stat.nlink > 1) {
9221
9186
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
9222
- if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
9187
+ if (e?.indexOf(this.cwd) === 0) return this[Js](e);
9223
9188
  this.linkCache.set(t, this.absolute);
9224
9189
  }
9225
9190
  if (this[fe](), this.stat.size === 0) return this.end();
9226
- this[es]();
9191
+ this[ss]();
9227
9192
  }
9228
- [es]() {
9229
- $2.open(this.absolute, "r", (t, e) => {
9193
+ [ss]() {
9194
+ $.open(this.absolute, "r", (t, e) => {
9230
9195
  if (t) return this.emit("error", t);
9231
- this[is](e);
9196
+ this[rs](e);
9232
9197
  });
9233
9198
  }
9234
- [is](t) {
9199
+ [rs](t) {
9235
9200
  if (this.fd = t, this.#t) return this[pt]();
9236
9201
  if (!this.stat) throw new Error("should stat before calling onopenfile");
9237
9202
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
9238
9203
  let e = Math.min(this.blockLen, this.maxReadSize);
9239
- 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]();
9240
9205
  }
9241
- [ti]() {
9206
+ [ei]() {
9242
9207
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9243
9208
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9244
- $2.read(t, e, i, r, n, (o, h) => {
9209
+ $.read(t, e, i, r, n, (o, h) => {
9245
9210
  if (o) return this[pt](() => this.emit("error", o));
9246
- this[Ji](h);
9211
+ this[es](h);
9247
9212
  });
9248
9213
  }
9249
9214
  [pt](t = () => {
9250
9215
  }) {
9251
- this.fd !== void 0 && $2.close(this.fd, t);
9216
+ this.fd !== void 0 && $.close(this.fd, t);
9252
9217
  }
9253
- [Ji](t) {
9218
+ [es](t) {
9254
9219
  if (t <= 0 && this.remain > 0) {
9255
9220
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
9256
9221
  return this[pt](() => this.emit("error", r));
@@ -9262,9 +9227,9 @@ var de = class extends D {
9262
9227
  if (!this.buf) throw new Error("should have created buffer prior to reading");
9263
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++;
9264
9229
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
9265
- this.write(e) ? this[qi]() : this[ss](() => this[qi]());
9230
+ this.write(e) ? this[Qi]() : this[ns](() => this[Qi]());
9266
9231
  }
9267
- [ss](t) {
9232
+ [ns](t) {
9268
9233
  this.once("drain", t);
9269
9234
  }
9270
9235
  write(t, e, i) {
@@ -9274,30 +9239,30 @@ var de = class extends D {
9274
9239
  }
9275
9240
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
9276
9241
  }
9277
- [qi]() {
9242
+ [Qi]() {
9278
9243
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
9279
9244
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
9280
- 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]();
9281
9246
  }
9282
9247
  };
9283
- var si = class extends de {
9248
+ var ri = class extends de {
9284
9249
  sync = true;
9285
- [Qi]() {
9286
- this[ei]($2.lstatSync(this.absolute));
9250
+ [ts]() {
9251
+ this[ii]($.lstatSync(this.absolute));
9287
9252
  }
9288
- [ji]() {
9289
- this[ts]($2.readlinkSync(this.absolute));
9253
+ [Ji]() {
9254
+ this[is]($.readlinkSync(this.absolute));
9290
9255
  }
9291
- [es]() {
9292
- this[is]($2.openSync(this.absolute, "r"));
9256
+ [ss]() {
9257
+ this[rs]($.openSync(this.absolute, "r"));
9293
9258
  }
9294
- [ti]() {
9259
+ [ei]() {
9295
9260
  let t = true;
9296
9261
  try {
9297
9262
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9298
9263
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9299
- let h = $2.readSync(e, i, r, n, o);
9300
- this[Ji](h), t = false;
9264
+ let h = $.readSync(e, i, r, n, o);
9265
+ this[es](h), t = false;
9301
9266
  } finally {
9302
9267
  if (t) try {
9303
9268
  this[pt](() => {
@@ -9306,15 +9271,15 @@ var si = class extends de {
9306
9271
  }
9307
9272
  }
9308
9273
  }
9309
- [ss](t) {
9274
+ [ns](t) {
9310
9275
  t();
9311
9276
  }
9312
9277
  [pt](t = () => {
9313
9278
  }) {
9314
- this.fd !== void 0 && $2.closeSync(this.fd), t();
9279
+ this.fd !== void 0 && $.closeSync(this.fd), t();
9315
9280
  }
9316
9281
  };
9317
- var ri = class extends D {
9282
+ var ni = class extends A {
9318
9283
  blockLen = 0;
9319
9284
  blockRemain = 0;
9320
9285
  buf = 0;
@@ -9350,7 +9315,7 @@ var ri = class extends D {
9350
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;
9351
9316
  let { type: r } = t;
9352
9317
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
9353
- 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);
9354
9319
  let n = false;
9355
9320
  if (!this.preservePaths) {
9356
9321
  let [h, a] = ce(this.path);
@@ -9362,10 +9327,10 @@ var ri = class extends D {
9362
9327
  super.write(o), t.pipe(this);
9363
9328
  }
9364
9329
  [X](t) {
9365
- return Js(t, this.prefix);
9330
+ return tr(t, this.prefix);
9366
9331
  }
9367
- [ii](t) {
9368
- return Vi(t, this.type === "Directory", this.portable);
9332
+ [si](t) {
9333
+ return Xi(t, this.type === "Directory", this.portable);
9369
9334
  }
9370
9335
  write(t, e, i) {
9371
9336
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -9377,8 +9342,8 @@ var ri = class extends D {
9377
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;
9378
9343
  }
9379
9344
  };
9380
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9381
- var ni = class s2 {
9345
+ var Bn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9346
+ var oi = class s2 {
9382
9347
  tail;
9383
9348
  head;
9384
9349
  length = 0;
@@ -9409,11 +9374,11 @@ var ni = class s2 {
9409
9374
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
9410
9375
  }
9411
9376
  push(...t) {
9412
- 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]);
9413
9378
  return this.length;
9414
9379
  }
9415
9380
  unshift(...t) {
9416
- 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]);
9417
9382
  return this.length;
9418
9383
  }
9419
9384
  pop() {
@@ -9509,7 +9474,7 @@ var ni = class s2 {
9509
9474
  let n = [];
9510
9475
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
9511
9476
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
9512
- for (let o of i) r = Bn(this, r, o);
9477
+ for (let o of i) r = Pn(this, r, o);
9513
9478
  return n;
9514
9479
  }
9515
9480
  reverse() {
@@ -9521,14 +9486,14 @@ var ni = class s2 {
9521
9486
  return this.head = e, this.tail = t, this;
9522
9487
  }
9523
9488
  };
9524
- function Bn(s3, t, e) {
9489
+ function Pn(s3, t, e) {
9525
9490
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
9526
9491
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
9527
9492
  }
9528
- function Pn(s3, t) {
9493
+ function zn(s3, t) {
9529
9494
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9530
9495
  }
9531
- function zn(s3, t) {
9496
+ function Un(s3, t) {
9532
9497
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9533
9498
  }
9534
9499
  var ue = class {
@@ -9540,7 +9505,7 @@ var ue = class {
9540
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;
9541
9506
  }
9542
9507
  };
9543
- var di = class {
9508
+ var mi = class {
9544
9509
  path;
9545
9510
  absolute;
9546
9511
  entry;
@@ -9553,28 +9518,29 @@ var di = class {
9553
9518
  this.path = t || "./", this.absolute = e;
9554
9519
  }
9555
9520
  };
9556
- var tr = Buffer.alloc(1024);
9557
- var oi = /* @__PURE__ */ Symbol("onStat");
9521
+ var er = Buffer.alloc(1024);
9522
+ var ai = /* @__PURE__ */ Symbol("onStat");
9558
9523
  var me = /* @__PURE__ */ Symbol("ended");
9559
9524
  var W = /* @__PURE__ */ Symbol("queue");
9525
+ var pe = /* @__PURE__ */ Symbol("queue");
9560
9526
  var Ct = /* @__PURE__ */ Symbol("current");
9561
9527
  var Ft = /* @__PURE__ */ Symbol("process");
9562
- var pe = /* @__PURE__ */ Symbol("processing");
9563
- var rs = /* @__PURE__ */ Symbol("processJob");
9528
+ var Ee = /* @__PURE__ */ Symbol("processing");
9529
+ var hi = /* @__PURE__ */ Symbol("processJob");
9564
9530
  var G = /* @__PURE__ */ Symbol("jobs");
9565
- var ns = /* @__PURE__ */ Symbol("jobDone");
9566
- var hi = /* @__PURE__ */ Symbol("addFSEntry");
9567
- var er = /* @__PURE__ */ Symbol("addTarEntry");
9568
- var as = /* @__PURE__ */ Symbol("stat");
9569
- var ls = /* @__PURE__ */ Symbol("readdir");
9570
- var ai = /* @__PURE__ */ Symbol("onreaddir");
9571
- var li = /* @__PURE__ */ Symbol("pipe");
9572
- var ir = /* @__PURE__ */ Symbol("entry");
9573
- var os = /* @__PURE__ */ Symbol("entryOpt");
9574
- var ci = /* @__PURE__ */ Symbol("writeEntryClass");
9575
- var rr = /* @__PURE__ */ Symbol("write");
9576
- var hs = /* @__PURE__ */ Symbol("ondrain");
9577
- var Et = class extends D {
9531
+ var os = /* @__PURE__ */ Symbol("jobDone");
9532
+ var li = /* @__PURE__ */ Symbol("addFSEntry");
9533
+ var ir = /* @__PURE__ */ Symbol("addTarEntry");
9534
+ var ls = /* @__PURE__ */ Symbol("stat");
9535
+ var cs = /* @__PURE__ */ Symbol("readdir");
9536
+ var ci = /* @__PURE__ */ Symbol("onreaddir");
9537
+ var fi = /* @__PURE__ */ Symbol("pipe");
9538
+ var sr = /* @__PURE__ */ Symbol("entry");
9539
+ var hs = /* @__PURE__ */ Symbol("entryOpt");
9540
+ var di = /* @__PURE__ */ Symbol("writeEntryClass");
9541
+ var nr = /* @__PURE__ */ Symbol("write");
9542
+ var as = /* @__PURE__ */ Symbol("ondrain");
9543
+ var Et = class extends A {
9578
9544
  sync = false;
9579
9545
  opt;
9580
9546
  cwd;
@@ -9595,22 +9561,23 @@ var Et = class extends D {
9595
9561
  mtime;
9596
9562
  filter;
9597
9563
  jobs;
9598
- [ci];
9564
+ [di];
9599
9565
  onWriteEntry;
9600
9566
  [W];
9567
+ [pe] = /* @__PURE__ */ new Map();
9601
9568
  [G] = 0;
9602
- [pe] = false;
9569
+ [Ee] = false;
9603
9570
  [me] = false;
9604
9571
  constructor(t = {}) {
9605
- 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) {
9572
+ 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) {
9606
9573
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
9607
- 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");
9574
+ 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");
9608
9575
  let e = this.zip;
9609
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
9610
- } else this.on("drain", this[hs]);
9611
- 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;
9576
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[as]()), this.on("resume", () => e.resume());
9577
+ } else this.on("drain", this[as]);
9578
+ 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;
9612
9579
  }
9613
- [rr](t) {
9580
+ [nr](t) {
9614
9581
  return super.write(t);
9615
9582
  }
9616
9583
  add(t) {
@@ -9621,97 +9588,109 @@ var Et = class extends D {
9621
9588
  }
9622
9589
  write(t) {
9623
9590
  if (this[me]) throw new Error("write after end");
9624
- return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
9591
+ return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
9625
9592
  }
9626
- [er](t) {
9627
- let e = f(sr.resolve(this.cwd, t.path));
9593
+ [ir](t) {
9594
+ let e = f(rr.resolve(this.cwd, t.path));
9628
9595
  if (!this.filter(t.path, t)) t.resume();
9629
9596
  else {
9630
- let i = new di(t.path, e);
9631
- i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
9597
+ let i = new mi(t.path, e);
9598
+ i.entry = new ni(t, this[hs](i)), i.entry.on("end", () => this[os](i)), this[G] += 1, this[W].push(i);
9632
9599
  }
9633
9600
  this[Ft]();
9634
9601
  }
9635
- [hi](t) {
9636
- let e = f(sr.resolve(this.cwd, t));
9637
- this[W].push(new di(t, e)), this[Ft]();
9602
+ [li](t) {
9603
+ let e = f(rr.resolve(this.cwd, t));
9604
+ this[W].push(new mi(t, e)), this[Ft]();
9638
9605
  }
9639
- [as](t) {
9606
+ [ls](t) {
9640
9607
  t.pending = true, this[G] += 1;
9641
9608
  let e = this.follow ? "stat" : "lstat";
9642
- fi[e](t.absolute, (i, r) => {
9643
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
9609
+ ui[e](t.absolute, (i, r) => {
9610
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
9644
9611
  });
9645
9612
  }
9646
- [oi](t, e) {
9647
- 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]();
9613
+ [ai](t, e) {
9614
+ if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
9615
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Ct]) this[hi](t);
9616
+ else {
9617
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9618
+ r ? r.push(t) : this[pe].set(i, [t]), t.pending = true;
9619
+ }
9620
+ this[Ft]();
9648
9621
  }
9649
- [ls](t) {
9650
- t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
9622
+ [cs](t) {
9623
+ t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
9651
9624
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
9652
- this[ai](t, i);
9625
+ this[ci](t, i);
9653
9626
  });
9654
9627
  }
9655
- [ai](t, e) {
9628
+ [ci](t, e) {
9656
9629
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
9657
9630
  }
9658
9631
  [Ft]() {
9659
- if (!this[pe]) {
9660
- this[pe] = true;
9661
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
9632
+ if (!this[Ee]) {
9633
+ this[Ee] = true;
9634
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
9662
9635
  let e = t.next;
9663
9636
  this[W].removeNode(t), t.next = e;
9664
9637
  }
9665
- this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
9638
+ this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
9666
9639
  }
9667
9640
  }
9668
9641
  get [Ct]() {
9669
9642
  return this[W] && this[W].head && this[W].head.value;
9670
9643
  }
9671
- [ns](t) {
9672
- this[W].shift(), this[G] -= 1, this[Ft]();
9644
+ [os](t) {
9645
+ this[W].shift(), this[G] -= 1;
9646
+ let { stat: e } = t;
9647
+ if (e && e.isFile() && e.nlink > 1) {
9648
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9649
+ if (this[pe].delete(i), r) for (let n of r) n.pending = false, this[hi](n);
9650
+ }
9651
+ this[Ft]();
9673
9652
  }
9674
- [rs](t) {
9653
+ [hi](t) {
9675
9654
  if (!t.pending) {
9676
9655
  if (t.entry) {
9677
- t === this[Ct] && !t.piped && this[li](t);
9656
+ t === this[Ct] && !t.piped && this[fi](t);
9678
9657
  return;
9679
9658
  }
9680
9659
  if (!t.stat) {
9681
9660
  let e = this.statCache.get(t.absolute);
9682
- e ? this[oi](t, e) : this[as](t);
9661
+ e ? this[ai](t, e) : this[ls](t);
9683
9662
  }
9684
9663
  if (t.stat && !t.ignore) {
9685
9664
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
9686
9665
  let e = this.readdirCache.get(t.absolute);
9687
- if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
9666
+ if (e ? this[ci](t, e) : this[cs](t), !t.readdir) return;
9688
9667
  }
9689
- if (t.entry = this[ir](t), !t.entry) {
9668
+ if (t.entry = this[sr](t), !t.entry) {
9690
9669
  t.ignore = true;
9691
9670
  return;
9692
9671
  }
9693
- t === this[Ct] && !t.piped && this[li](t);
9672
+ t === this[Ct] && !t.piped && this[fi](t);
9694
9673
  }
9695
9674
  }
9696
9675
  }
9697
- [os](t) {
9676
+ [hs](t) {
9698
9677
  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 };
9699
9678
  }
9700
- [ir](t) {
9679
+ [sr](t) {
9701
9680
  this[G] += 1;
9702
9681
  try {
9703
- return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
9682
+ return new this[di](t.path, this[hs](t)).on("end", () => this[os](t)).on("error", (i) => this.emit("error", i));
9704
9683
  } catch (e) {
9705
9684
  this.emit("error", e);
9706
9685
  }
9707
9686
  }
9708
- [hs]() {
9687
+ [as]() {
9709
9688
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
9710
9689
  }
9711
- [li](t) {
9690
+ [fi](t) {
9712
9691
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
9713
9692
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9714
- this[hi](o + r);
9693
+ this[li](o + r);
9715
9694
  });
9716
9695
  let e = t.entry, i = this.zip;
9717
9696
  if (!e) throw new Error("cannot pipe without source");
@@ -9731,131 +9710,131 @@ var Et = class extends D {
9731
9710
  var kt = class extends Et {
9732
9711
  sync = true;
9733
9712
  constructor(t) {
9734
- super(t), this[ci] = si;
9713
+ super(t), this[di] = ri;
9735
9714
  }
9736
9715
  pause() {
9737
9716
  }
9738
9717
  resume() {
9739
9718
  }
9740
- [as](t) {
9719
+ [ls](t) {
9741
9720
  let e = this.follow ? "statSync" : "lstatSync";
9742
- this[oi](t, fi[e](t.absolute));
9721
+ this[ai](t, ui[e](t.absolute));
9743
9722
  }
9744
- [ls](t) {
9745
- this[ai](t, fi.readdirSync(t.absolute));
9723
+ [cs](t) {
9724
+ this[ci](t, ui.readdirSync(t.absolute));
9746
9725
  }
9747
- [li](t) {
9726
+ [fi](t) {
9748
9727
  let e = t.entry, i = this.zip;
9749
9728
  if (t.readdir && t.readdir.forEach((r) => {
9750
9729
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9751
- this[hi](o + r);
9730
+ this[li](o + r);
9752
9731
  }), !e) throw new Error("Cannot pipe without source");
9753
9732
  i ? e.on("data", (r) => {
9754
9733
  i.write(r);
9755
9734
  }) : e.on("data", (r) => {
9756
- super[rr](r);
9735
+ super[nr](r);
9757
9736
  });
9758
9737
  }
9759
9738
  };
9760
- var Un = (s3, t) => {
9739
+ var Hn = (s3, t) => {
9761
9740
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9762
- e.pipe(i), or(e, t);
9741
+ e.pipe(i), hr(e, t);
9763
9742
  };
9764
- var Hn = (s3, t) => {
9743
+ var Wn = (s3, t) => {
9765
9744
  let e = new Et(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9766
9745
  e.pipe(i);
9767
9746
  let r = new Promise((n, o) => {
9768
9747
  i.on("error", o), i.on("close", n), e.on("error", o);
9769
9748
  });
9770
- return hr(e, t).catch((n) => e.emit("error", n)), r;
9749
+ return ar(e, t).catch((n) => e.emit("error", n)), r;
9771
9750
  };
9772
- var or = (s3, t) => {
9751
+ var hr = (s3, t) => {
9773
9752
  t.forEach((e) => {
9774
- e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9753
+ e.charAt(0) === "@" ? It({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9775
9754
  }), s3.end();
9776
9755
  };
9777
- var hr = async (s3, t) => {
9778
- for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9756
+ var ar = async (s3, t) => {
9757
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: or.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9779
9758
  s3.add(i);
9780
9759
  } }) : s3.add(e);
9781
9760
  s3.end();
9782
9761
  };
9783
- var Wn = (s3, t) => {
9762
+ var Gn = (s3, t) => {
9784
9763
  let e = new kt(s3);
9785
- return or(e, t), e;
9764
+ return hr(e, t), e;
9786
9765
  };
9787
- var Gn = (s3, t) => {
9766
+ var Zn = (s3, t) => {
9788
9767
  let e = new Et(s3);
9789
- return hr(e, t).catch((i) => e.emit("error", i)), e;
9768
+ return ar(e, t).catch((i) => e.emit("error", i)), e;
9790
9769
  };
9791
- var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
9770
+ var Yn = K(Hn, Wn, Gn, Zn, (s3, t) => {
9792
9771
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
9793
9772
  });
9794
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
9795
- var fr = Yn === "win32";
9796
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
9797
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
9798
- var Kn = fr && !!pr;
9799
- var Vn = 512 * 1024;
9800
- var $n = pr | ur | dr | mr;
9801
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
9802
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
9803
- var fs2 = (s3, t, e) => {
9773
+ var Kn = process.env.__FAKE_PLATFORM__ || process.platform;
9774
+ var dr = Kn === "win32";
9775
+ var { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = fr.constants;
9776
+ var Er = Number(process.env.__FAKE_FS_O_FILENAME__) || fr.constants.UV_FS_O_FILEMAP || 0;
9777
+ var Vn = dr && !!Er;
9778
+ var $n = 512 * 1024;
9779
+ var Xn = Er | mr | ur | pr;
9780
+ var cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null;
9781
+ var fs2 = cr !== null ? () => cr : Vn ? (s3) => s3 < $n ? Xn : "w" : () => "w";
9782
+ var ds = (s3, t, e) => {
9804
9783
  try {
9805
- return mi.lchownSync(s3, t, e);
9784
+ return Ei.lchownSync(s3, t, e);
9806
9785
  } catch (i) {
9807
9786
  if (i?.code !== "ENOENT") throw i;
9808
9787
  }
9809
9788
  };
9810
- var ui = (s3, t, e, i) => {
9811
- mi.lchown(s3, t, e, (r) => {
9789
+ var pi = (s3, t, e, i) => {
9790
+ Ei.lchown(s3, t, e, (r) => {
9812
9791
  i(r && r?.code !== "ENOENT" ? r : null);
9813
9792
  });
9814
9793
  };
9815
- var Xn = (s3, t, e, i, r) => {
9816
- if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
9794
+ var qn = (s3, t, e, i, r) => {
9795
+ if (t.isDirectory()) us(we.resolve(s3, t.name), e, i, (n) => {
9817
9796
  if (n) return r(n);
9818
- let o = Ee.resolve(s3, t.name);
9819
- ui(o, e, i, r);
9797
+ let o = we.resolve(s3, t.name);
9798
+ pi(o, e, i, r);
9820
9799
  });
9821
9800
  else {
9822
- let n = Ee.resolve(s3, t.name);
9823
- ui(n, e, i, r);
9801
+ let n = we.resolve(s3, t.name);
9802
+ pi(n, e, i, r);
9824
9803
  }
9825
9804
  };
9826
- var ds = (s3, t, e, i) => {
9827
- mi.readdir(s3, { withFileTypes: true }, (r, n) => {
9805
+ var us = (s3, t, e, i) => {
9806
+ Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
9828
9807
  if (r) {
9829
9808
  if (r.code === "ENOENT") return i();
9830
9809
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
9831
9810
  }
9832
- if (r || !n.length) return ui(s3, t, e, i);
9811
+ if (r || !n.length) return pi(s3, t, e, i);
9833
9812
  let o = n.length, h = null, a = (l) => {
9834
9813
  if (!h) {
9835
9814
  if (l) return i(h = l);
9836
- if (--o === 0) return ui(s3, t, e, i);
9815
+ if (--o === 0) return pi(s3, t, e, i);
9837
9816
  }
9838
9817
  };
9839
- for (let l of n) Xn(s3, l, t, e, a);
9818
+ for (let l of n) qn(s3, l, t, e, a);
9840
9819
  });
9841
9820
  };
9842
- var qn = (s3, t, e, i) => {
9843
- t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs2(Ee.resolve(s3, t.name), e, i);
9821
+ var jn = (s3, t, e, i) => {
9822
+ t.isDirectory() && ms(we.resolve(s3, t.name), e, i), ds(we.resolve(s3, t.name), e, i);
9844
9823
  };
9845
- var us = (s3, t, e) => {
9824
+ var ms = (s3, t, e) => {
9846
9825
  let i;
9847
9826
  try {
9848
- i = mi.readdirSync(s3, { withFileTypes: true });
9827
+ i = Ei.readdirSync(s3, { withFileTypes: true });
9849
9828
  } catch (r) {
9850
9829
  let n = r;
9851
9830
  if (n?.code === "ENOENT") return;
9852
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
9831
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ds(s3, t, e);
9853
9832
  throw n;
9854
9833
  }
9855
- for (let r of i) qn(s3, r, t, e);
9856
- return fs2(s3, t, e);
9834
+ for (let r of i) jn(s3, r, t, e);
9835
+ return ds(s3, t, e);
9857
9836
  };
9858
- var we = class extends Error {
9837
+ var Se = class extends Error {
9859
9838
  path;
9860
9839
  code;
9861
9840
  syscall = "chdir";
@@ -9878,97 +9857,97 @@ var wt = class extends Error {
9878
9857
  return "SymlinkError";
9879
9858
  }
9880
9859
  };
9881
- var Qn = (s3, t) => {
9860
+ var Jn = (s3, t) => {
9882
9861
  k.stat(s3, (e, i) => {
9883
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
9862
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
9884
9863
  });
9885
9864
  };
9886
- var Er = (s3, t, e) => {
9865
+ var wr = (s3, t, e) => {
9887
9866
  s3 = f(s3);
9888
9867
  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) => {
9889
- E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
9868
+ E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? k.chmod(s3, r, e) : e();
9890
9869
  };
9891
- if (s3 === d) return Qn(s3, S);
9892
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9893
- let N = f(pi.relative(d, s3)).split("/");
9894
- ms(d, N, r, c, d, void 0, S);
9870
+ if (s3 === d) return Jn(s3, S);
9871
+ if (l) return Qn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9872
+ let N = f(wi.relative(d, s3)).split("/");
9873
+ ps(d, N, r, c, d, void 0, S);
9895
9874
  };
9896
- var ms = (s3, t, e, i, r, n, o) => {
9875
+ var ps = (s3, t, e, i, r, n, o) => {
9897
9876
  if (t.length === 0) return o(null, n);
9898
- let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
9899
- k.mkdir(a, e, wr(a, t, e, i, r, n, o));
9877
+ let h = t.shift(), a = f(wi.resolve(s3 + "/" + h));
9878
+ k.mkdir(a, e, Sr(a, t, e, i, r, n, o));
9900
9879
  };
9901
- var wr = (s3, t, e, i, r, n, o) => (h) => {
9880
+ var Sr = (s3, t, e, i, r, n, o) => (h) => {
9902
9881
  h ? k.lstat(s3, (a, l) => {
9903
9882
  if (a) a.path = a.path && f(a.path), o(a);
9904
- else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
9883
+ else if (l.isDirectory()) ps(s3, t, e, i, r, n, o);
9905
9884
  else if (i) k.unlink(s3, (c) => {
9906
9885
  if (c) return o(c);
9907
- k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
9886
+ k.mkdir(s3, e, Sr(s3, t, e, i, r, n, o));
9908
9887
  });
9909
9888
  else {
9910
9889
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
9911
9890
  o(h);
9912
9891
  }
9913
- }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
9892
+ }) : (n = n || s3, ps(s3, t, e, i, r, n, o));
9914
9893
  };
9915
- var Jn = (s3) => {
9894
+ var to = (s3) => {
9916
9895
  let t = false, e;
9917
9896
  try {
9918
9897
  t = k.statSync(s3).isDirectory();
9919
9898
  } catch (i) {
9920
9899
  e = i?.code;
9921
9900
  } finally {
9922
- if (!t) throw new we(s3, e ?? "ENOTDIR");
9901
+ if (!t) throw new Se(s3, e ?? "ENOTDIR");
9923
9902
  }
9924
9903
  };
9925
- var Sr = (s3, t) => {
9904
+ var yr = (s3, t) => {
9926
9905
  s3 = f(s3);
9927
9906
  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) => {
9928
- E && h && us(E, n, o), r && k.chmodSync(s3, i);
9907
+ E && h && ms(E, n, o), r && k.chmodSync(s3, i);
9929
9908
  };
9930
- if (s3 === c) return Jn(c), d();
9909
+ if (s3 === c) return to(c), d();
9931
9910
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9932
- let T = f(pi.relative(c, s3)).split("/"), N;
9911
+ let T = f(wi.relative(c, s3)).split("/"), N;
9933
9912
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
9934
- x = f(pi.resolve(x));
9913
+ x = f(wi.resolve(x));
9935
9914
  try {
9936
9915
  k.mkdirSync(x, i), N = N || x;
9937
9916
  } catch {
9938
- let xe = k.lstatSync(x);
9939
- if (xe.isDirectory()) continue;
9917
+ let Le = k.lstatSync(x);
9918
+ if (Le.isDirectory()) continue;
9940
9919
  if (l) {
9941
9920
  k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
9942
9921
  continue;
9943
- } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
9922
+ } else if (Le.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
9944
9923
  }
9945
9924
  }
9946
9925
  return d(N);
9947
9926
  };
9948
- var ps = /* @__PURE__ */ Object.create(null);
9949
- var yr = 1e4;
9927
+ var Es = /* @__PURE__ */ Object.create(null);
9928
+ var Rr = 1e4;
9950
9929
  var $t = /* @__PURE__ */ new Set();
9951
- var Rr = (s3) => {
9952
- $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9953
- let t = ps[s3], e = $t.size - yr;
9954
- if (e > yr / 10) {
9955
- for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
9930
+ var br = (s3) => {
9931
+ $t.has(s3) ? $t.delete(s3) : Es[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9932
+ let t = Es[s3], e = $t.size - Rr;
9933
+ if (e > Rr / 10) {
9934
+ for (let i of $t) if ($t.delete(i), delete Es[i], --e <= 0) break;
9956
9935
  }
9957
9936
  return t;
9958
9937
  };
9959
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9960
- var eo = to === "win32";
9961
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9938
+ var eo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9939
+ var io = eo === "win32";
9940
+ var so = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9962
9941
  let r = e.at(-1);
9963
- return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
9942
+ return r !== void 0 && (i = gr(r, i)), e.push(i || "/"), e;
9964
9943
  }, []);
9965
- var Ei = class {
9944
+ var Si = class {
9966
9945
  #t = /* @__PURE__ */ new Map();
9967
9946
  #i = /* @__PURE__ */ new Map();
9968
9947
  #s = /* @__PURE__ */ new Set();
9969
9948
  reserve(t, e) {
9970
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
9971
- let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
9949
+ t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(gr(br(r))));
9950
+ let i = new Set(t.map((r) => so(r)).reduce((r, n) => r.concat(n)));
9972
9951
  this.#i.set(e, { dirs: i, paths: t });
9973
9952
  for (let r of t) {
9974
9953
  let n = this.#t.get(r);
@@ -10027,54 +10006,54 @@ var Ei = class {
10027
10006
  }
10028
10007
  };
10029
10008
  var _r = () => process.umask();
10030
- var gr = /* @__PURE__ */ Symbol("onEntry");
10031
- var ys = /* @__PURE__ */ Symbol("checkFs");
10032
- var Or = /* @__PURE__ */ Symbol("checkFs2");
10033
- var Rs = /* @__PURE__ */ Symbol("isReusable");
10009
+ var Or = /* @__PURE__ */ Symbol("onEntry");
10010
+ var Rs = /* @__PURE__ */ Symbol("checkFs");
10011
+ var Tr = /* @__PURE__ */ Symbol("checkFs2");
10012
+ var bs = /* @__PURE__ */ Symbol("isReusable");
10034
10013
  var P = /* @__PURE__ */ Symbol("makeFs");
10035
- var bs = /* @__PURE__ */ Symbol("file");
10014
+ var gs = /* @__PURE__ */ Symbol("file");
10036
10015
  var _s = /* @__PURE__ */ Symbol("directory");
10037
- var Si = /* @__PURE__ */ Symbol("link");
10038
- var Tr = /* @__PURE__ */ Symbol("symlink");
10039
- var xr = /* @__PURE__ */ Symbol("hardlink");
10040
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
10041
- var Lr = /* @__PURE__ */ Symbol("unsupported");
10042
- var Nr = /* @__PURE__ */ Symbol("checkPath");
10043
- var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
10016
+ var Ri = /* @__PURE__ */ Symbol("link");
10017
+ var xr = /* @__PURE__ */ Symbol("symlink");
10018
+ var Lr = /* @__PURE__ */ Symbol("hardlink");
10019
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
10020
+ var Nr = /* @__PURE__ */ Symbol("unsupported");
10021
+ var Dr = /* @__PURE__ */ Symbol("checkPath");
10022
+ var ws = /* @__PURE__ */ Symbol("stripAbsolutePath");
10044
10023
  var St = /* @__PURE__ */ Symbol("mkdir");
10045
10024
  var O = /* @__PURE__ */ Symbol("onError");
10046
- var wi = /* @__PURE__ */ Symbol("pending");
10025
+ var yi = /* @__PURE__ */ Symbol("pending");
10047
10026
  var Ar = /* @__PURE__ */ Symbol("pend");
10048
10027
  var Xt = /* @__PURE__ */ Symbol("unpend");
10049
- var ws = /* @__PURE__ */ Symbol("ended");
10050
- var Ss = /* @__PURE__ */ Symbol("maybeClose");
10051
- var gs = /* @__PURE__ */ Symbol("skip");
10052
- var Re = /* @__PURE__ */ Symbol("doChown");
10053
- var be = /* @__PURE__ */ Symbol("uid");
10028
+ var Ss = /* @__PURE__ */ Symbol("ended");
10029
+ var ys = /* @__PURE__ */ Symbol("maybeClose");
10030
+ var Os = /* @__PURE__ */ Symbol("skip");
10031
+ var be = /* @__PURE__ */ Symbol("doChown");
10032
+ var ge = /* @__PURE__ */ Symbol("uid");
10054
10033
  var _e = /* @__PURE__ */ Symbol("gid");
10055
- var ge = /* @__PURE__ */ Symbol("checkedCwd");
10056
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10057
- var Oe = ro === "win32";
10058
- var no = 1024;
10059
- var oo = (s3, t) => {
10060
- if (!Oe) return u.unlink(s3, t);
10061
- let e = s3 + ".DELETE." + Ir(16).toString("hex");
10034
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
10035
+ var no = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10036
+ var Te = no === "win32";
10037
+ var oo = 1024;
10038
+ var ho = (s3, t) => {
10039
+ if (!Te) return u.unlink(s3, t);
10040
+ let e = s3 + ".DELETE." + Cr(16).toString("hex");
10062
10041
  u.rename(s3, e, (i) => {
10063
10042
  if (i) return t(i);
10064
10043
  u.unlink(e, t);
10065
10044
  });
10066
10045
  };
10067
- var ho = (s3) => {
10068
- if (!Oe) return u.unlinkSync(s3);
10069
- let t = s3 + ".DELETE." + Ir(16).toString("hex");
10046
+ var ao = (s3) => {
10047
+ if (!Te) return u.unlinkSync(s3);
10048
+ let t = s3 + ".DELETE." + Cr(16).toString("hex");
10070
10049
  u.renameSync(s3, t), u.unlinkSync(t);
10071
10050
  };
10072
- var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10051
+ var Ir = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10073
10052
  var qt = class extends st {
10074
- [ws] = false;
10075
- [ge] = false;
10076
- [wi] = 0;
10077
- reservations = new Ei();
10053
+ [Ss] = false;
10054
+ [Oe] = false;
10055
+ [yi] = 0;
10056
+ reservations = new Si();
10078
10057
  transform;
10079
10058
  writable = true;
10080
10059
  readable = false;
@@ -10101,32 +10080,32 @@ var qt = class extends st {
10101
10080
  chmod;
10102
10081
  constructor(t = {}) {
10103
10082
  if (t.ondone = () => {
10104
- this[ws] = true, this[Ss]();
10083
+ this[Ss] = true, this[ys]();
10105
10084
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
10106
10085
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
10107
10086
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
10108
10087
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
10109
10088
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
10110
- 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));
10089
+ 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));
10111
10090
  }
10112
10091
  warn(t, e, i = {}) {
10113
10092
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
10114
10093
  }
10115
- [Ss]() {
10116
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10094
+ [ys]() {
10095
+ this[Ss] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10117
10096
  }
10118
- [Es](t, e) {
10097
+ [ws](t, e) {
10119
10098
  let i = t[e], { type: r } = t;
10120
10099
  if (!i || this.preservePaths) return true;
10121
10100
  let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
10122
- if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10101
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10123
10102
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
10124
10103
  let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
10125
10104
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
10126
10105
  }
10127
10106
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
10128
10107
  }
10129
- [Nr](t) {
10108
+ [Dr](t) {
10130
10109
  let e = f(t.path), i = e.split("/");
10131
10110
  if (this.strip) {
10132
10111
  if (i.length < this.strip) return false;
@@ -10138,20 +10117,20 @@ var qt = class extends st {
10138
10117
  i.splice(0, this.strip), t.path = i.join("/");
10139
10118
  }
10140
10119
  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;
10141
- if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
10120
+ if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return false;
10142
10121
  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;
10143
10122
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
10144
10123
  if (this.win32) {
10145
10124
  let { root: r } = R.win32.parse(String(t.absolute));
10146
- t.absolute = r + Xi(String(t.absolute).slice(r.length));
10125
+ t.absolute = r + ji(String(t.absolute).slice(r.length));
10147
10126
  let { root: n } = R.win32.parse(t.path);
10148
- t.path = n + Xi(t.path.slice(n.length));
10127
+ t.path = n + ji(t.path.slice(n.length));
10149
10128
  }
10150
10129
  return true;
10151
10130
  }
10152
- [gr](t) {
10153
- if (!this[Nr](t)) return t.resume();
10154
- switch (so.equal(typeof t.absolute, "string"), t.type) {
10131
+ [Or](t) {
10132
+ if (!this[Dr](t)) return t.resume();
10133
+ switch (ro.equal(typeof t.absolute, "string"), t.type) {
10155
10134
  case "Directory":
10156
10135
  case "GNUDumpDir":
10157
10136
  t.mode && (t.mode = t.mode | 448);
@@ -10160,28 +10139,28 @@ var qt = class extends st {
10160
10139
  case "ContiguousFile":
10161
10140
  case "Link":
10162
10141
  case "SymbolicLink":
10163
- return this[ys](t);
10142
+ return this[Rs](t);
10164
10143
  default:
10165
- return this[Lr](t);
10144
+ return this[Nr](t);
10166
10145
  }
10167
10146
  }
10168
10147
  [O](t, e) {
10169
10148
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
10170
10149
  }
10171
10150
  [St](t, e, i) {
10172
- 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);
10151
+ 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);
10173
10152
  }
10174
- [Re](t) {
10153
+ [be](t) {
10175
10154
  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;
10176
10155
  }
10177
- [be](t) {
10178
- return Dr(this.uid, t.uid, this.processUid);
10156
+ [ge](t) {
10157
+ return Ir(this.uid, t.uid, this.processUid);
10179
10158
  }
10180
10159
  [_e](t) {
10181
- return Dr(this.gid, t.gid, this.processGid);
10160
+ return Ir(this.gid, t.gid, this.processGid);
10182
10161
  }
10183
- [bs](t, e) {
10184
- 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 });
10162
+ [gs](t, e) {
10163
+ 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 });
10185
10164
  r.on("error", (a) => {
10186
10165
  r.fd && u.close(r.fd, () => {
10187
10166
  }), r.write = () => true, this[O](a, t), e();
@@ -10203,9 +10182,9 @@ var qt = class extends st {
10203
10182
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
10204
10183
  u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
10205
10184
  }
10206
- if (typeof l == "number" && this[Re](t)) {
10185
+ if (typeof l == "number" && this[be](t)) {
10207
10186
  n++;
10208
- let c = this[be](t), d = this[_e](t);
10187
+ let c = this[ge](t), d = this[_e](t);
10209
10188
  typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
10210
10189
  }
10211
10190
  o();
@@ -10225,52 +10204,52 @@ var qt = class extends st {
10225
10204
  let n = 1, o = () => {
10226
10205
  --n === 0 && (e(), this[Xt](), t.resume());
10227
10206
  };
10228
- 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();
10207
+ t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[be](t) && (n++, u.chown(String(t.absolute), Number(this[ge](t)), Number(this[_e](t)), o)), o();
10229
10208
  });
10230
10209
  }
10231
- [Lr](t) {
10210
+ [Nr](t) {
10232
10211
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
10233
10212
  }
10234
- [Tr](t, e) {
10213
+ [xr](t, e) {
10235
10214
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
10236
- this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
10215
+ this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10237
10216
  this[O](r, t), e();
10238
10217
  });
10239
10218
  }
10240
- [xr](t, e) {
10219
+ [Lr](t, e) {
10241
10220
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
10242
- this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
10221
+ this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10243
10222
  this[O](n, t), e();
10244
10223
  });
10245
10224
  }
10246
- [ye](t, e, i, r, n) {
10225
+ [Re](t, e, i, r, n) {
10247
10226
  let o = i.shift();
10248
10227
  if (this.preservePaths || o === void 0) return r();
10249
10228
  let h = R.resolve(e, o);
10250
10229
  u.lstat(h, (a, l) => {
10251
10230
  if (a) return r();
10252
10231
  if (l?.isSymbolicLink()) return n(new wt(h, R.resolve(h, i.join("/"))));
10253
- this[ye](t, h, i, r, n);
10232
+ this[Re](t, h, i, r, n);
10254
10233
  });
10255
10234
  }
10256
10235
  [Ar]() {
10257
- this[wi]++;
10236
+ this[yi]++;
10258
10237
  }
10259
10238
  [Xt]() {
10260
- this[wi]--, this[Ss]();
10239
+ this[yi]--, this[ys]();
10261
10240
  }
10262
- [gs](t) {
10241
+ [Os](t) {
10263
10242
  this[Xt](), t.resume();
10264
10243
  }
10265
- [Rs](t, e) {
10266
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
10244
+ [bs](t, e) {
10245
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
10267
10246
  }
10268
- [ys](t) {
10247
+ [Rs](t) {
10269
10248
  this[Ar]();
10270
10249
  let e = [t.path];
10271
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
10250
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Tr](t, i));
10272
10251
  }
10273
- [Or](t, e) {
10252
+ [Tr](t, e) {
10274
10253
  let i = (h) => {
10275
10254
  e(h);
10276
10255
  }, r = () => {
@@ -10279,7 +10258,7 @@ var qt = class extends st {
10279
10258
  this[O](h, t), i();
10280
10259
  return;
10281
10260
  }
10282
- this[ge] = true, n();
10261
+ this[Oe] = true, n();
10283
10262
  });
10284
10263
  }, n = () => {
10285
10264
  if (t.absolute !== this.cwd) {
@@ -10296,10 +10275,10 @@ var qt = class extends st {
10296
10275
  }, o = () => {
10297
10276
  u.lstat(String(t.absolute), (h, a) => {
10298
10277
  if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
10299
- this[gs](t), i();
10278
+ this[Os](t), i();
10300
10279
  return;
10301
10280
  }
10302
- if (h || this[Rs](t, a)) return this[P](null, t, i);
10281
+ if (h || this[bs](t, a)) return this[P](null, t, i);
10303
10282
  if (a.isDirectory()) {
10304
10283
  if (t.type === "Directory") {
10305
10284
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -10308,10 +10287,10 @@ var qt = class extends st {
10308
10287
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10309
10288
  }
10310
10289
  if (t.absolute === this.cwd) return this[P](null, t, i);
10311
- oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
10290
+ ho(String(t.absolute), (l) => this[P](l ?? null, t, i));
10312
10291
  });
10313
10292
  };
10314
- this[ge] ? n() : r();
10293
+ this[Oe] ? n() : r();
10315
10294
  }
10316
10295
  [P](t, e, i) {
10317
10296
  if (t) {
@@ -10322,40 +10301,40 @@ var qt = class extends st {
10322
10301
  case "File":
10323
10302
  case "OldFile":
10324
10303
  case "ContiguousFile":
10325
- return this[bs](e, i);
10304
+ return this[gs](e, i);
10326
10305
  case "Link":
10327
- return this[xr](e, i);
10306
+ return this[Lr](e, i);
10328
10307
  case "SymbolicLink":
10329
- return this[Tr](e, i);
10308
+ return this[xr](e, i);
10330
10309
  case "Directory":
10331
10310
  case "GNUDumpDir":
10332
10311
  return this[_s](e, i);
10333
10312
  }
10334
10313
  }
10335
- [Si](t, e, i, r) {
10314
+ [Ri](t, e, i, r) {
10336
10315
  u[i](e, String(t.absolute), (n) => {
10337
10316
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
10338
10317
  });
10339
10318
  }
10340
10319
  };
10341
- var Se = (s3) => {
10320
+ var ye = (s3) => {
10342
10321
  try {
10343
10322
  return [null, s3()];
10344
10323
  } catch (t) {
10345
10324
  return [t, null];
10346
10325
  }
10347
10326
  };
10348
- var Te = class extends qt {
10327
+ var xe = class extends qt {
10349
10328
  sync = true;
10350
10329
  [P](t, e) {
10351
10330
  return super[P](t, e, () => {
10352
10331
  });
10353
10332
  }
10354
- [ys](t) {
10355
- if (!this[ge]) {
10333
+ [Rs](t) {
10334
+ if (!this[Oe]) {
10356
10335
  let n = this[St](this.cwd, this.dmode);
10357
10336
  if (n) return this[O](n, t);
10358
- this[ge] = true;
10337
+ this[Oe] = true;
10359
10338
  }
10360
10339
  if (t.absolute !== this.cwd) {
10361
10340
  let n = f(R.dirname(String(t.absolute)));
@@ -10364,23 +10343,23 @@ var Te = class extends qt {
10364
10343
  if (o) return this[O](o, t);
10365
10344
  }
10366
10345
  }
10367
- let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
10368
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
10369
- if (e || this[Rs](t, i)) return this[P](null, t);
10346
+ let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
10347
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
10348
+ if (e || this[bs](t, i)) return this[P](null, t);
10370
10349
  if (i.isDirectory()) {
10371
10350
  if (t.type === "Directory") {
10372
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
10351
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
10373
10352
  u.chmodSync(String(t.absolute), Number(t.mode));
10374
10353
  }) : [];
10375
10354
  return this[P](h, t);
10376
10355
  }
10377
- let [n] = Se(() => u.rmdirSync(String(t.absolute)));
10356
+ let [n] = ye(() => u.rmdirSync(String(t.absolute)));
10378
10357
  this[P](n, t);
10379
10358
  }
10380
- let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
10359
+ let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
10381
10360
  this[P](r, t);
10382
10361
  }
10383
- [bs](t, e) {
10362
+ [gs](t, e) {
10384
10363
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
10385
10364
  let a;
10386
10365
  try {
@@ -10391,7 +10370,7 @@ var Te = class extends qt {
10391
10370
  (h || a) && this[O](h || a, t), e();
10392
10371
  }, n;
10393
10372
  try {
10394
- n = u.openSync(String(t.absolute), cs(t.size), i);
10373
+ n = u.openSync(String(t.absolute), fs2(t.size), i);
10395
10374
  } catch (h) {
10396
10375
  return r(h);
10397
10376
  }
@@ -10416,8 +10395,8 @@ var Te = class extends qt {
10416
10395
  }
10417
10396
  }
10418
10397
  }
10419
- if (this[Re](t)) {
10420
- let a = this[be](t), l = this[_e](t);
10398
+ if (this[be](t)) {
10399
+ let a = this[ge](t), l = this[_e](t);
10421
10400
  try {
10422
10401
  u.fchownSync(n, Number(a), Number(l));
10423
10402
  } catch (c) {
@@ -10441,31 +10420,31 @@ var Te = class extends qt {
10441
10420
  u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10442
10421
  } catch {
10443
10422
  }
10444
- if (this[Re](t)) try {
10445
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
10423
+ if (this[be](t)) try {
10424
+ u.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[_e](t)));
10446
10425
  } catch {
10447
10426
  }
10448
10427
  e(), t.resume();
10449
10428
  }
10450
10429
  [St](t, e) {
10451
10430
  try {
10452
- 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 });
10431
+ 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 });
10453
10432
  } catch (i) {
10454
10433
  return i;
10455
10434
  }
10456
10435
  }
10457
- [ye](t, e, i, r, n) {
10436
+ [Re](t, e, i, r, n) {
10458
10437
  if (this.preservePaths || i.length === 0) return r();
10459
10438
  let o = e;
10460
10439
  for (let h of i) {
10461
10440
  o = R.resolve(o, h);
10462
- let [a, l] = Se(() => u.lstatSync(o));
10441
+ let [a, l] = ye(() => u.lstatSync(o));
10463
10442
  if (a) return r();
10464
10443
  if (l.isSymbolicLink()) return n(new wt(o, R.resolve(e, i.join("/"))));
10465
10444
  }
10466
10445
  r();
10467
10446
  }
10468
- [Si](t, e, i, r) {
10447
+ [Ri](t, e, i, r) {
10469
10448
  let n = `${i}Sync`;
10470
10449
  try {
10471
10450
  u[n](e, String(t.absolute)), r(), t.resume();
@@ -10474,26 +10453,26 @@ var Te = class extends qt {
10474
10453
  }
10475
10454
  }
10476
10455
  };
10477
- var ao = (s3) => {
10478
- let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10479
- new Me(e, { readSize: r, size: i.size }).pipe(t);
10456
+ var lo = (s3) => {
10457
+ let t = new xe(s3), e = s3.file, i = Fr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10458
+ new Be(e, { readSize: r, size: i.size }).pipe(t);
10480
10459
  };
10481
- var lo = (s3, t) => {
10460
+ var co = (s3, t) => {
10482
10461
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10483
10462
  return new Promise((o, h) => {
10484
- e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
10463
+ e.on("error", h), e.on("close", o), Fr.stat(r, (a, l) => {
10485
10464
  if (a) h(a);
10486
10465
  else {
10487
- let c = new _t(r, { readSize: i, size: l.size });
10466
+ let c = new gt(r, { readSize: i, size: l.size });
10488
10467
  c.on("error", h), c.pipe(e);
10489
10468
  }
10490
10469
  });
10491
10470
  });
10492
10471
  };
10493
- var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
10494
- t?.length && Ki(s3, t);
10472
+ var fo = K(lo, co, (s3) => new xe(s3), (s3) => new qt(s3), (s3, t) => {
10473
+ t?.length && $i(s3, t);
10495
10474
  });
10496
- var fo = (s3, t) => {
10475
+ var uo = (s3, t) => {
10497
10476
  let e = new kt(s3), i = true, r, n;
10498
10477
  try {
10499
10478
  try {
@@ -10514,7 +10493,7 @@ var fo = (s3, t) => {
10514
10493
  if (n + l + 512 > o.size) break;
10515
10494
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
10516
10495
  }
10517
- i = false, uo(s3, e, n, r, t);
10496
+ i = false, mo(s3, e, n, r, t);
10518
10497
  } finally {
10519
10498
  if (i) try {
10520
10499
  v.closeSync(r);
@@ -10522,11 +10501,11 @@ var fo = (s3, t) => {
10522
10501
  }
10523
10502
  }
10524
10503
  };
10525
- var uo = (s3, t, e, i, r) => {
10504
+ var mo = (s3, t, e, i, r) => {
10526
10505
  let n = new Wt(s3.file, { fd: i, start: e });
10527
- t.pipe(n), po(t, r);
10506
+ t.pipe(n), Eo(t, r);
10528
10507
  };
10529
- var mo = (s3, t) => {
10508
+ var po = (s3, t) => {
10530
10509
  t = Array.from(t);
10531
10510
  let e = new Et(s3), i = (n, o, h) => {
10532
10511
  let a = (T, N) => {
@@ -10556,35 +10535,35 @@ var mo = (s3, t) => {
10556
10535
  i(c, S.size, (T, N) => {
10557
10536
  if (T) return o(T);
10558
10537
  let E = new tt2(s3.file, { fd: c, start: N });
10559
- e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
10538
+ e.pipe(E), E.on("error", o), E.on("close", n), wo(e, t);
10560
10539
  });
10561
10540
  });
10562
10541
  };
10563
10542
  v.open(s3.file, h, a);
10564
10543
  });
10565
10544
  };
10566
- var po = (s3, t) => {
10545
+ var Eo = (s3, t) => {
10567
10546
  t.forEach((e) => {
10568
- e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10547
+ e.charAt(0) === "@" ? It({ file: kr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10569
10548
  }), s3.end();
10570
10549
  };
10571
- var Eo = async (s3, t) => {
10572
- 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);
10550
+ var wo = async (s3, t) => {
10551
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: kr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10573
10552
  s3.end();
10574
10553
  };
10575
- var vt = K(fo, mo, () => {
10554
+ var vt = K(uo, po, () => {
10576
10555
  throw new TypeError("file is required");
10577
10556
  }, () => {
10578
10557
  throw new TypeError("file is required");
10579
10558
  }, (s3, t) => {
10580
- if (!Fs(s3)) throw new TypeError("file is required");
10559
+ if (!ks(s3)) throw new TypeError("file is required");
10581
10560
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
10582
10561
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
10583
10562
  });
10584
- var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10585
- vt.validate?.(s3, t), So(s3);
10563
+ var So = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10564
+ vt.validate?.(s3, t), yo(s3);
10586
10565
  });
10587
- var So = (s3) => {
10566
+ var yo = (s3) => {
10588
10567
  let t = s3.filter;
10589
10568
  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));
10590
10569
  };
@@ -10924,7 +10903,7 @@ var escapeArgument = (argument) => escapeFile(escapeFile(`"${argument.replaceAll
10924
10903
  var escapeFile = (file) => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, "^$1");
10925
10904
 
10926
10905
  // node_modules/nano-spawn/source/result.js
10927
- import { once, on } from "node:events";
10906
+ import { once, on as on2 } from "node:events";
10928
10907
  import process6 from "node:process";
10929
10908
  var getResult = async (nodeChildProcess, options, context) => {
10930
10909
  const instance = await nodeChildProcess;
@@ -10945,7 +10924,7 @@ var getResult = async (nodeChildProcess, options, context) => {
10945
10924
  }
10946
10925
  };
10947
10926
  var onStreamError = async (stream) => {
10948
- for await (const [error] of on(stream, "error")) {
10927
+ for await (const [error] of on2(stream, "error")) {
10949
10928
  if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE"].includes(error?.code)) {
10950
10929
  throw error;
10951
10930
  }