@lousy-agents/mcp 5.17.15 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/316.js CHANGED
@@ -36,27 +36,27 @@ var zlib__rspack_import_11_namespace_cache;
36
36
 
37
37
  var ce = (0,_rolldown_runtime_mjs__rspack_import_14/* .__exportAll */.I)({
38
38
  Header: () => I,
39
- Pack: () => ii,
40
- PackJob: () => Lr,
41
- PackSync: () => ai,
42
- Parser: () => Jn,
43
- Pax: () => gn,
44
- ReadEntry: () => bn,
45
- Unpack: () => ya,
46
- UnpackSync: () => xa,
47
- WriteEntry: () => Or,
48
- WriteEntrySync: () => kr,
49
- WriteEntryTar: () => Ar,
50
- c: () => ui,
51
- create: () => ui,
52
- extract: () => Sa,
53
- filesFilter: () => Zn,
54
- list: () => Qn,
55
- r: () => Oa,
56
- replace: () => Oa,
57
- t: () => Qn,
39
+ Pack: () => li,
40
+ PackJob: () => Ur,
41
+ PackSync: () => ui,
42
+ Parser: () => tr,
43
+ Pax: () => yn,
44
+ ReadEntry: () => Cn,
45
+ Unpack: () => wa,
46
+ UnpackSync: () => Ea,
47
+ WriteEntry: () => Pr,
48
+ WriteEntrySync: () => Fr,
49
+ WriteEntryTar: () => Ir,
50
+ c: () => hi,
51
+ create: () => hi,
52
+ extract: () => Da,
53
+ filesFilter: () => ir,
54
+ list: () => ar,
55
+ r: () => Na,
56
+ replace: () => Na,
57
+ t: () => ar,
58
58
  types: () => Xt,
59
- x: () => Sa
59
+ x: () => Da
60
60
  }), le = Object.defineProperty, ue = (e, t) => {
61
61
  for (var n in t) le(e, n, {
62
62
  get: t[n],
@@ -276,7 +276,7 @@ while (this[be](this[Te]()) && this[b].length);
276
276
  }
277
277
  [De](e) {
278
278
  for (let t of this[x]) t.dest.write(e) === !1 && this.pause();
279
- let t = this[E] ? !1 : super.emit(`data`, e);
279
+ let t = !this[E] && super.emit(`data`, e);
280
280
  return this[g](), t;
281
281
  }
282
282
  [Oe]() {
@@ -384,10 +384,10 @@ while (this[be](this[Te]()) && this[b].length);
384
384
  static get isStream() {
385
385
  return fe;
386
386
  }
387
- }, We = fs__rspack_import_5.writev, D = Symbol(`_autoClose`), O = Symbol(`_close`), Ge = Symbol(`_ended`), k = Symbol(`_fd`), Ke = Symbol(`_finished`), A = Symbol(`_flags`), qe = Symbol(`_flush`), Je = Symbol(`_handleChunk`), Ye = Symbol(`_makeBuf`), Xe = Symbol(`_mode`), Ze = Symbol(`_needDrain`), Qe = Symbol(`_onerror`), $e = Symbol(`_onopen`), et = Symbol(`_onread`), tt = Symbol(`_onwrite`), j = Symbol(`_open`), M = Symbol(`_path`), nt = Symbol(`_pos`), N = Symbol(`_queue`), rt = Symbol(`_read`), it = Symbol(`_readSize`), P = Symbol(`_reading`), at = Symbol(`_remain`), ot = Symbol(`_size`), st = Symbol(`_write`), ct = Symbol(`_writing`), lt = Symbol(`_defaultFlag`), ut = Symbol(`_errored`), dt = class extends Ue {
387
+ }, We = fs__rspack_import_5.writev, D = Symbol(`_autoClose`), O = Symbol(`_close`), Ge = Symbol(`_ended`), k = Symbol(`_fd`), Ke = Symbol(`_finished`), A = Symbol(`_flags`), qe = Symbol(`_flush`), Je = Symbol(`_handleChunk`), Ye = Symbol(`_makeBuf`), Xe = Symbol(`_mode`), Ze = Symbol(`_needDrain`), Qe = Symbol(`_onerror`), $e = Symbol(`_onopen`), et = Symbol(`_onread`), tt = Symbol(`_onwrite`), nt = Symbol(`_open`), j = Symbol(`_path`), M = Symbol(`_pos`), N = Symbol(`_queue`), rt = Symbol(`_read`), it = Symbol(`_readSize`), P = Symbol(`_reading`), at = Symbol(`_remain`), ot = Symbol(`_size`), st = Symbol(`_write`), ct = Symbol(`_writing`), lt = Symbol(`_defaultFlag`), ut = Symbol(`_errored`), dt = class extends Ue {
388
388
  [ut] = !1;
389
389
  [k];
390
- [M];
390
+ [j];
391
391
  [it];
392
392
  [P] = !1;
393
393
  [ot];
@@ -395,13 +395,13 @@ while (this[be](this[Te]()) && this[b].length);
395
395
  [D];
396
396
  constructor(e, t) {
397
397
  if (t ||= {}, super(t), this.readable = !0, this.writable = !1, typeof e != `string`) throw TypeError(`path must be a string`);
398
- this[ut] = !1, this[k] = typeof t.fd == `number` ? t.fd : void 0, this[M] = e, this[it] = t.readSize || 16 * 1024 * 1024, this[P] = !1, this[ot] = typeof t.size == `number` ? t.size : Infinity, this[at] = this[ot], this[D] = typeof t.autoClose == `boolean` ? t.autoClose : !0, typeof this[k] == `number` ? this[rt]() : this[j]();
398
+ this[ut] = !1, this[k] = typeof t.fd == `number` ? t.fd : void 0, this[j] = e, this[it] = t.readSize || 16 * 1024 * 1024, this[P] = !1, this[ot] = typeof t.size == `number` ? t.size : Infinity, this[at] = this[ot], this[D] = typeof t.autoClose != `boolean` || t.autoClose, typeof this[k] == `number` ? this[rt]() : this[nt]();
399
399
  }
400
400
  get fd() {
401
401
  return this[k];
402
402
  }
403
403
  get path() {
404
- return this[M];
404
+ return this[j];
405
405
  }
406
406
  write() {
407
407
  throw TypeError(`this is a readable stream`);
@@ -409,8 +409,8 @@ while (this[be](this[Te]()) && this[b].length);
409
409
  end() {
410
410
  throw TypeError(`this is a readable stream`);
411
411
  }
412
- [j]() {
413
- fs__rspack_import_5.open(this[M], `r`, (e, t) => this[$e](e, t));
412
+ [nt]() {
413
+ fs__rspack_import_5.open(this[j], `r`, (e, t) => this[$e](e, t));
414
414
  }
415
415
  [$e](e, t) {
416
416
  e ? this[Qe](e) : (this[k] = t, this.emit(`open`, t), this[rt]());
@@ -452,10 +452,10 @@ while (this[be](this[Te]()) && this[b].length);
452
452
  }
453
453
  }
454
454
  }, ft = class extends dt {
455
- [j]() {
455
+ [nt]() {
456
456
  let e = !0;
457
457
  try {
458
- this[$e](null, fs__rspack_import_5.openSync(this[M], `r`)), e = !1;
458
+ this[$e](null, fs__rspack_import_5.openSync(this[j], `r`)), e = !1;
459
459
  } finally {
460
460
  e && this[O]();
461
461
  }
@@ -490,18 +490,18 @@ while (this[be](this[Te]()) && this[b].length);
490
490
  [Ge] = !1;
491
491
  [N] = [];
492
492
  [Ze] = !1;
493
- [M];
493
+ [j];
494
494
  [Xe];
495
495
  [D];
496
496
  [k];
497
497
  [lt];
498
498
  [A];
499
499
  [Ke] = !1;
500
- [nt];
500
+ [M];
501
501
  constructor(e, t) {
502
- t ||= {}, super(t), this[M] = e, this[k] = typeof t.fd == `number` ? t.fd : void 0, this[Xe] = t.mode === void 0 ? 438 : t.mode, this[nt] = typeof t.start == `number` ? t.start : void 0, this[D] = typeof t.autoClose == `boolean` ? t.autoClose : !0;
503
- let n = this[nt] === void 0 ? `w` : `r+`;
504
- this[lt] = t.flags === void 0, this[A] = t.flags === void 0 ? n : t.flags, this[k] === void 0 && this[j]();
502
+ t ||= {}, super(t), this[j] = e, this[k] = typeof t.fd == `number` ? t.fd : void 0, this[Xe] = t.mode === void 0 ? 438 : t.mode, this[M] = typeof t.start == `number` ? t.start : void 0, this[D] = typeof t.autoClose != `boolean` || t.autoClose;
503
+ let n = this[M] === void 0 ? `w` : `r+`;
504
+ this[lt] = t.flags === void 0, this[A] = t.flags === void 0 ? n : t.flags, this[k] === void 0 && this[nt]();
505
505
  }
506
506
  emit(e, ...t) {
507
507
  if (e === `error`) {
@@ -514,16 +514,16 @@ while (this[be](this[Te]()) && this[b].length);
514
514
  return this[k];
515
515
  }
516
516
  get path() {
517
- return this[M];
517
+ return this[j];
518
518
  }
519
519
  [Qe](e) {
520
520
  this[O](), this[ct] = !0, this.emit(`error`, e);
521
521
  }
522
- [j]() {
523
- fs__rspack_import_5.open(this[M], this[A], this[Xe], (e, t) => this[$e](e, t));
522
+ [nt]() {
523
+ fs__rspack_import_5.open(this[j], this[A], this[Xe], (e, t) => this[$e](e, t));
524
524
  }
525
525
  [$e](e, t) {
526
- this[lt] && this[A] === `r+` && e && e.code === `ENOENT` ? (this[A] = `w`, this[j]()) : e ? this[Qe](e) : (this[k] = t, this.emit(`open`, t), this[ct] || this[qe]());
526
+ this[lt] && this[A] === `r+` && e && e.code === `ENOENT` ? (this[A] = `w`, this[nt]()) : e ? this[Qe](e) : (this[k] = t, this.emit(`open`, t), this[ct] || this[qe]());
527
527
  }
528
528
  end(e, t) {
529
529
  return e && this.write(e, t), this[Ge] = !0, !this[ct] && !this[N].length && typeof this[k] == `number` && this[tt](null, 0), this;
@@ -532,17 +532,17 @@ while (this[be](this[Te]()) && this[b].length);
532
532
  return typeof e == `string` && (e = Buffer.from(e, t)), this[Ge] ? (this.emit(`error`, Error(`write() after end()`)), !1) : this[k] === void 0 || this[ct] || this[N].length ? (this[N].push(e), this[Ze] = !0, !1) : (this[ct] = !0, this[st](e), !0);
533
533
  }
534
534
  [st](e) {
535
- fs__rspack_import_5.write(this[k], e, 0, e.length, this[nt], (e, t) => this[tt](e, t));
535
+ fs__rspack_import_5.write(this[k], e, 0, e.length, this[M], (e, t) => this[tt](e, t));
536
536
  }
537
537
  [tt](e, t) {
538
- e ? this[Qe](e) : (this[nt] !== void 0 && typeof t == `number` && (this[nt] += t), this[N].length ? this[qe]() : (this[ct] = !1, this[Ge] && !this[Ke] ? (this[Ke] = !0, this[O](), this.emit(`finish`)) : this[Ze] && (this[Ze] = !1, this.emit(`drain`))));
538
+ e ? this[Qe](e) : (this[M] !== void 0 && typeof t == `number` && (this[M] += t), this[N].length ? this[qe]() : (this[ct] = !1, this[Ge] && !this[Ke] ? (this[Ke] = !0, this[O](), this.emit(`finish`)) : this[Ze] && (this[Ze] = !1, this.emit(`drain`))));
539
539
  }
540
540
  [qe]() {
541
541
  if (this[N].length === 0) this[Ge] && this[tt](null, 0);
542
542
  else if (this[N].length === 1) this[st](this[N].pop());
543
543
  else {
544
544
  let e = this[N];
545
- this[N] = [], We(this[k], e, this[nt], (e, t) => this[tt](e, t));
545
+ this[N] = [], We(this[k], e, this[M], (e, t) => this[tt](e, t));
546
546
  }
547
547
  }
548
548
  [O]() {
@@ -552,15 +552,15 @@ while (this[be](this[Te]()) && this[b].length);
552
552
  }
553
553
  }
554
554
  }, mt = class extends pt {
555
- [j]() {
555
+ [nt]() {
556
556
  let e;
557
557
  if (this[lt] && this[A] === `r+`) try {
558
- e = fs__rspack_import_5.openSync(this[M], this[A], this[Xe]);
558
+ e = fs__rspack_import_5.openSync(this[j], this[A], this[Xe]);
559
559
  } catch (e) {
560
- if (e?.code === `ENOENT`) return this[A] = `w`, this[j]();
560
+ if (e?.code === `ENOENT`) return this[A] = `w`, this[nt]();
561
561
  throw e;
562
562
  }
563
- else e = fs__rspack_import_5.openSync(this[M], this[A], this[Xe]);
563
+ else e = fs__rspack_import_5.openSync(this[j], this[A], this[Xe]);
564
564
  this[$e](null, e);
565
565
  }
566
566
  [O]() {
@@ -572,14 +572,14 @@ while (this[be](this[Te]()) && this[b].length);
572
572
  [st](e) {
573
573
  let t = !0;
574
574
  try {
575
- this[tt](null, fs__rspack_import_5.writeSync(this[k], e, 0, e.length, this[nt])), t = !1;
575
+ this[tt](null, fs__rspack_import_5.writeSync(this[k], e, 0, e.length, this[M])), t = !1;
576
576
  } finally {
577
577
  if (t) try {
578
578
  this[O]();
579
579
  } catch {}
580
580
  }
581
581
  }
582
- }, ht = new Map([
582
+ }, ht = /* @__PURE__ */ new Map([
583
583
  [`C`, `cwd`],
584
584
  [`f`, `file`],
585
585
  [`z`, `gzip`],
@@ -922,7 +922,7 @@ ue(Xt, {
922
922
  name: () => en,
923
923
  normalFsTypes: () => $t
924
924
  });
925
- var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
925
+ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = /* @__PURE__ */ new Set([
926
926
  `0`,
927
927
  ``,
928
928
  `1`,
@@ -933,7 +933,7 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
933
933
  `6`,
934
934
  `7`,
935
935
  `D`
936
- ]), en = new Map([
936
+ ]), en = /* @__PURE__ */ new Map([
937
937
  [`0`, `File`],
938
938
  [``, `OldFile`],
939
939
  [`1`, `Link`],
@@ -955,7 +955,7 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
955
955
  [`S`, `SparseFile`],
956
956
  [`V`, `TapeVolumeHeader`],
957
957
  [`X`, `OldExtendedHeader`]
958
- ]), tn = new Map(Array.from(en).map((e) => [e[1], e[0]])), I = class {
958
+ ]), tn = new Map(Array.from(en).map((e) => [e[1], e[0]])), nn = (e) => e === void 0 || e < 0 ? void 0 : e, I = class {
959
959
  cksumValid = !1;
960
960
  needPax = !1;
961
961
  nullBlock = !1;
@@ -982,13 +982,13 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
982
982
  }
983
983
  decode(e, t, n, r) {
984
984
  if (t ||= 0, !e || !(e.length >= t + 512)) throw Error(`need 512 bytes for header`);
985
- let i = rn(e, t + 156, 1), a = $t.has(i), o = a ? n : void 0, s = a ? r : void 0;
986
- if (this.path = o?.path ?? rn(e, t, 100), this.mode = o?.mode ?? s?.mode ?? L(e, t + 100, 8), this.uid = o?.uid ?? s?.uid ?? L(e, t + 108, 8), this.gid = o?.gid ?? s?.gid ?? L(e, t + 116, 8), this.size = o?.size ?? s?.size ?? L(e, t + 124, 12), this.mtime = o?.mtime ?? s?.mtime ?? an(e, t + 136, 12), this.cksum = L(e, t + 148, 12), s && this.#i(s, !0), o && this.#i(o), Zt(i) && (this.#t = i || `0`), this.#t === `0` && this.path.slice(-1) === `/` && (this.#t = `5`), this.#t === `5` && (this.size = 0), this.linkpath = rn(e, t + 157, 100), e.subarray(t + 257, t + 265).toString() === `ustar\x0000`) if (this.uname = o?.uname ?? s?.uname ?? rn(e, t + 265, 32), this.gname = o?.gname ?? s?.gname ?? rn(e, t + 297, 32), this.devmaj = o?.devmaj ?? s?.devmaj ?? L(e, t + 329, 8) ?? 0, this.devmin = o?.devmin ?? s?.devmin ?? L(e, t + 337, 8) ?? 0, e[t + 475] !== 0) {
987
- let n = rn(e, t + 345, 155);
985
+ let i = an(e, t + 156, 1), a = $t.has(i), o = a ? n : void 0, s = a ? r : void 0;
986
+ if (this.path = o?.path ?? an(e, t, 100), this.mode = o?.mode ?? s?.mode ?? cn(e, t + 100, 8), this.uid = o?.uid ?? s?.uid ?? cn(e, t + 108, 8), this.gid = o?.gid ?? s?.gid ?? cn(e, t + 116, 8), this.size = nn(o?.size ?? s?.size ?? cn(e, t + 124, 12)), this.mtime = o?.mtime ?? s?.mtime ?? on(e, t + 136, 12), this.cksum = cn(e, t + 148, 12), s && this.#i(s, !0), o && this.#i(o), Zt(i) && (this.#t = i || `0`), this.#t === `0` && this.path.slice(-1) === `/` && (this.#t = `5`), this.#t === `5` && (this.size = 0), this.linkpath = an(e, t + 157, 100), e.subarray(t + 257, t + 265).toString() === `ustar\x0000`) if (this.uname = o?.uname ?? s?.uname ?? an(e, t + 265, 32), this.gname = o?.gname ?? s?.gname ?? an(e, t + 297, 32), this.devmaj = o?.devmaj ?? s?.devmaj ?? cn(e, t + 329, 8) ?? 0, this.devmin = o?.devmin ?? s?.devmin ?? cn(e, t + 337, 8) ?? 0, e[t + 475] !== 0) {
987
+ let n = an(e, t + 345, 155);
988
988
  this.path = n + `/` + this.path;
989
989
  } else {
990
- let i = rn(e, t + 345, 130);
991
- i && (this.path = i + `/` + this.path), this.atime = n?.atime ?? r?.atime ?? an(e, t + 476, 12), this.ctime = n?.ctime ?? r?.ctime ?? an(e, t + 488, 12);
990
+ let i = an(e, t + 345, 130);
991
+ i && (this.path = i + `/` + this.path), this.atime = n?.atime ?? r?.atime ?? on(e, t + 476, 12), this.ctime = n?.ctime ?? r?.ctime ?? on(e, t + 488, 12);
992
992
  }
993
993
  let c = 256;
994
994
  for (let n = t; n < t + 148; n++) c += e[n];
@@ -996,16 +996,16 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
996
996
  this.cksumValid = c === this.cksum, this.cksum === void 0 && c === 256 && (this.nullBlock = !0);
997
997
  }
998
998
  #i(e, t = !1) {
999
- Object.assign(this, Object.fromEntries(Object.entries(e).filter(([e, n]) => !(n == null || e === `path` && t || e === `linkpath` && t || e === `global`))));
999
+ Object.assign(this, Object.fromEntries(Object.entries(e).filter(([e, n]) => !(n == null || e === `size` && Number(n) < 0 || e === `path` && t || e === `linkpath` && t || e === `global`))));
1000
1000
  }
1001
1001
  encode(e, t = 0) {
1002
1002
  if (e ||= this.block = Buffer.alloc(512), this.#t === `Unsupported` && (this.#t = `0`), !(e.length >= t + 512)) throw Error(`need 512 bytes for header`);
1003
- let n = this.ctime || this.atime ? 130 : 155, r = nn(this.path || ``, n), i = r[0], a = r[1];
1004
- this.needPax = !!r[2], this.needPax = hn(e, t, 100, i) || this.needPax, this.needPax = R(e, t + 100, 8, this.mode) || this.needPax, this.needPax = R(e, t + 108, 8, this.uid) || this.needPax, this.needPax = R(e, t + 116, 8, this.gid) || this.needPax, this.needPax = R(e, t + 124, 12, this.size) || this.needPax, this.needPax = pn(e, t + 136, 12, this.mtime) || this.needPax, e[t + 156] = Number(this.#t.codePointAt(0)), this.needPax = hn(e, t + 157, 100, this.linkpath) || this.needPax, e.write(`ustar\x0000`, t + 257, 8), this.needPax = hn(e, t + 265, 32, this.uname) || this.needPax, this.needPax = hn(e, t + 297, 32, this.gname) || this.needPax, this.needPax = R(e, t + 329, 8, this.devmaj) || this.needPax, this.needPax = R(e, t + 337, 8, this.devmin) || this.needPax, this.needPax = hn(e, t + 345, n, a) || this.needPax, e[t + 475] === 0 ? (this.needPax = hn(e, t + 345, 130, a) || this.needPax, this.needPax = pn(e, t + 476, 12, this.atime) || this.needPax, this.needPax = pn(e, t + 488, 12, this.ctime) || this.needPax) : this.needPax = hn(e, t + 345, 155, a) || this.needPax;
1003
+ let n = this.ctime || this.atime ? 130 : 155, r = rn(this.path || ``, n), i = r[0], a = r[1];
1004
+ this.needPax = !!r[2], this.needPax = vn(e, t, 100, i) || this.needPax, this.needPax = fn(e, t + 100, 8, this.mode) || this.needPax, this.needPax = fn(e, t + 108, 8, this.uid) || this.needPax, this.needPax = fn(e, t + 116, 8, this.gid) || this.needPax, this.needPax = fn(e, t + 124, 12, this.size) || this.needPax, this.needPax = gn(e, t + 136, 12, this.mtime) || this.needPax, e[t + 156] = Number(this.#t.codePointAt(0)), this.needPax = vn(e, t + 157, 100, this.linkpath) || this.needPax, e.write(`ustar\x0000`, t + 257, 8), this.needPax = vn(e, t + 265, 32, this.uname) || this.needPax, this.needPax = vn(e, t + 297, 32, this.gname) || this.needPax, this.needPax = fn(e, t + 329, 8, this.devmaj) || this.needPax, this.needPax = fn(e, t + 337, 8, this.devmin) || this.needPax, this.needPax = vn(e, t + 345, n, a) || this.needPax, e[t + 475] === 0 ? (this.needPax = vn(e, t + 345, 130, a) || this.needPax, this.needPax = gn(e, t + 476, 12, this.atime) || this.needPax, this.needPax = gn(e, t + 488, 12, this.ctime) || this.needPax) : this.needPax = vn(e, t + 345, 155, a) || this.needPax;
1005
1005
  let o = 256;
1006
1006
  for (let n = t; n < t + 148; n++) o += e[n];
1007
1007
  for (let n = t + 156; n < t + 512; n++) o += e[n];
1008
- return this.cksum = o, R(e, t + 148, 8, this.cksum), this.cksumValid = !0, this.needPax;
1008
+ return this.cksum = o, fn(e, t + 148, 8, this.cksum), this.cksumValid = !0, this.needPax;
1009
1009
  }
1010
1010
  get type() {
1011
1011
  return this.#t === `Unsupported` ? this.#t : en.get(this.#t);
@@ -1019,7 +1019,7 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
1019
1019
  else if (Zt(e)) this.#t = e;
1020
1020
  else throw TypeError(`invalid entry type: ` + e);
1021
1021
  }
1022
- }, nn = (e, t) => {
1022
+ }, rn = (e, t) => {
1023
1023
  let n = e, r = ``, i, a = node_path__rspack_import_3.posix.parse(e).root || `.`;
1024
1024
  if (Buffer.byteLength(n) < 100) i = [
1025
1025
  n,
@@ -1046,10 +1046,10 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
1046
1046
  ];
1047
1047
  }
1048
1048
  return i;
1049
- }, rn = (e, t, n) => e.subarray(t, t + n).toString(`utf8`).replace(/\0.*/, ``), an = (e, t, n) => on(L(e, t, n)), on = (e) => e === void 0 ? void 0 : /* @__PURE__ */ new Date(e * 1e3), L = (e, t, n) => Number(e[t]) & 128 ? Gt(e.subarray(t, t + n)) : cn(e, t, n), sn = (e) => isNaN(e) ? void 0 : e, cn = (e, t, n) => sn(parseInt(e.subarray(t, t + n).toString(`utf8`).replace(/\0.*$/, ``).trim(), 8)), ln = {
1049
+ }, an = (e, t, n) => e.subarray(t, t + n).toString(`utf8`).replace(/\0.*/, ``), on = (e, t, n) => sn(cn(e, t, n)), sn = (e) => e === void 0 ? void 0 : /* @__PURE__ */ new Date(e * 1e3), cn = (e, t, n) => Number(e[t]) & 128 ? Gt(e.subarray(t, t + n)) : un(e, t, n), ln = (e) => isNaN(e) ? void 0 : e, un = (e, t, n) => ln(parseInt(e.subarray(t, t + n).toString(`utf8`).replace(/\0.*$/, ``).trim(), 8)), dn = {
1050
1050
  12: 8589934591,
1051
1051
  8: 2097151
1052
- }, R = (e, t, n, r) => r === void 0 ? !1 : r > ln[n] || r < 0 ? (Ht(r, e.subarray(t, t + n)), !0) : (un(e, t, n, r), !1), un = (e, t, n, r) => e.write(dn(r, n), t, n, `ascii`), dn = (e, t) => fn(Math.floor(e).toString(8), t), fn = (e, t) => (e.length === t - 1 ? e : Array(t - e.length - 1).join(`0`) + e + ` `) + `\0`, pn = (e, t, n, r) => r === void 0 ? !1 : R(e, t, n, r.getTime() / 1e3), mn = Array(156).join(`\0`), hn = (e, t, n, r) => r === void 0 ? !1 : (e.write(r + mn, t, n, `utf8`), r.length !== Buffer.byteLength(r) || r.length > n), gn = class e {
1052
+ }, fn = (e, t, n, r) => r === void 0 ? !1 : r > dn[n] || r < 0 ? (Ht(r, e.subarray(t, t + n)), !0) : (pn(e, t, n, r), !1), pn = (e, t, n, r) => e.write(mn(r, n), t, n, `ascii`), mn = (e, t) => hn(Math.floor(e).toString(8), t), hn = (e, t) => (e.length === t - 1 ? e : Array(t - e.length - 1).join(`0`) + e + ` `) + `\0`, gn = (e, t, n, r) => r !== void 0 && fn(e, t, n, r.getTime() / 1e3), _n = Array(156).join(`\0`), vn = (e, t, n, r) => r === void 0 ? !1 : (e.write(r + _n, t, n, `utf8`), r.length !== Buffer.byteLength(r) || r.length > n), yn = class e {
1053
1053
  atime;
1054
1054
  mtime;
1055
1055
  ctime;
@@ -1104,18 +1104,46 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
1104
1104
  return i + a >= 10 ** a && (a += 1), a + i + r;
1105
1105
  }
1106
1106
  static parse(t, n, r = !1) {
1107
- return new e(_n(vn(t), n), r);
1107
+ return new e(bn(xn(t), n), r);
1108
1108
  }
1109
- }, _n = (e, t) => t ? Object.assign({}, t, e) : e, vn = (e) => e.replace(/\n$/, ``).split(`
1110
- `).reduce(yn, Object.create(null)), yn = (e, t) => {
1109
+ }, bn = (e, t) => t ? Object.assign({}, t, e) : e, xn = (e) => e.replace(/\n$/, ``).split(`
1110
+ `).reduce(Sn, Object.create(null)), Sn = (e, t) => {
1111
1111
  let n = parseInt(t, 10);
1112
1112
  if (n !== Buffer.byteLength(t) + 1) return e;
1113
1113
  t = t.slice((n + ` `).length);
1114
1114
  let r = t.split(`=`), i = r.shift();
1115
1115
  if (!i) return e;
1116
- let a = i.replace(/^SCHILY\.(dev|ino|nlink)/, `$1`), o = r.join(`=`);
1117
- return e[a] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a) ? /* @__PURE__ */ new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, e;
1118
- }, z = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32` ? (e) => e && e.replaceAll(/\\/g, `/`) : (e) => e, bn = class extends Ue {
1116
+ let a = i.replace(/^SCHILY\.(dev|ino|nlink)/, `$1`), o = r.join(`=`).replace(/\0.*/, ``);
1117
+ switch (a) {
1118
+ case `path`:
1119
+ case `linkpath`:
1120
+ case `type`:
1121
+ case `charset`:
1122
+ case `comment`:
1123
+ case `gname`:
1124
+ case `uname`:
1125
+ e[a] = o;
1126
+ break;
1127
+ case `ctime`:
1128
+ case `atime`:
1129
+ case `mtime`:
1130
+ e[a] = /* @__PURE__ */ new Date(Number(o) * 1e3);
1131
+ break;
1132
+ case `size`:
1133
+ let t = +o;
1134
+ t >= 0 && (e[a] = t);
1135
+ break;
1136
+ case `gid`:
1137
+ case `uid`:
1138
+ case `dev`:
1139
+ case `ino`:
1140
+ case `nlink`:
1141
+ case `mode`:
1142
+ e[a] = +o;
1143
+ break;
1144
+ }
1145
+ return e;
1146
+ }, L = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32` ? (e) => String(e).replaceAll(/\\/g, `/`) : (e) => String(e), Cn = class extends Ue {
1119
1147
  extended;
1120
1148
  globalExtended;
1121
1149
  header;
@@ -1165,7 +1193,7 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
1165
1193
  default: this.ignore = !0;
1166
1194
  }
1167
1195
  if (!e.path) throw Error(`no path provided for tar.ReadEntry`);
1168
- this.path = z(e.path), this.mode = e.mode, this.mode && (this.mode &= 4095), this.uid = e.uid, this.gid = e.gid, this.uname = e.uname, this.gname = e.gname, this.size = this.remain, this.mtime = e.mtime, this.atime = e.atime, this.ctime = e.ctime, this.linkpath = e.linkpath ? z(e.linkpath) : void 0, this.uname = e.uname, this.gname = e.gname, t && this.#t(t), n && this.#t(n, !0);
1196
+ this.path = L(e.path), this.mode = e.mode, this.mode && (this.mode &= 4095), this.uid = e.uid, this.gid = e.gid, this.uname = e.uname, this.gname = e.gname, this.size = this.remain, this.mtime = e.mtime, this.atime = e.atime, this.ctime = e.ctime, this.linkpath = e.linkpath ? L(e.linkpath) : void 0, this.uname = e.uname, this.gname = e.gname, t && this.#t(t), n && this.#t(n, !0);
1169
1197
  }
1170
1198
  write(e) {
1171
1199
  let t = e.length;
@@ -1174,249 +1202,268 @@ var Zt = (e) => en.has(e), Qt = (e) => tn.has(e), $t = new Set([
1174
1202
  return this.remain = Math.max(0, n - t), this.blockRemain = Math.max(0, r - t), this.ignore ? !0 : n >= t ? super.write(e) : super.write(e.subarray(0, n));
1175
1203
  }
1176
1204
  #t(e, t = !1) {
1177
- e.path &&= z(e.path), e.linkpath &&= z(e.linkpath), Object.assign(this, Object.fromEntries(Object.entries(e).filter(([e, n]) => !(n == null || e === `path` && t))));
1205
+ e.path &&= L(e.path), e.linkpath &&= L(e.linkpath), Object.assign(this, Object.fromEntries(Object.entries(e).filter(([e, n]) => !(n == null || e === `path` && t))));
1178
1206
  }
1179
- }, xn = (e, t, n, r = {}) => {
1207
+ }, wn = (e, t, n, r = {}) => {
1180
1208
  e.file && (r.file = e.file), e.cwd && (r.cwd = e.cwd), r.code = n instanceof Error && n.code || t, r.tarCode = t, !e.strict && r.recoverable !== !1 ? (n instanceof Error && (r = Object.assign(n, r), n = n.message), e.emit(`warn`, t, n, r)) : n instanceof Error ? e.emit(`error`, Object.assign(n, r)) : e.emit(`error`, Object.assign(Error(`${t}: ${n}`), r));
1181
- }, Sn = 1024 * 1024, Cn = Buffer.from([31, 139]), wn = Buffer.from([
1209
+ }, Tn = 1024 * 1024, En = Buffer.from([31, 139]), Dn = Buffer.from([
1182
1210
  40,
1183
1211
  181,
1184
1212
  47,
1185
1213
  253
1186
- ]), Tn = Math.max(Cn.length, wn.length), B = Symbol(`state`), En = Symbol(`writeEntry`), V = Symbol(`readEntry`), Dn = Symbol(`nextEntry`), On = Symbol(`processEntry`), H = Symbol(`extendedHeader`), kn = Symbol(`globalExtendedHeader`), U = Symbol(`meta`), An = Symbol(`emitMeta`), W = Symbol(`buffer`), G = Symbol(`queue`), K = Symbol(`ended`), jn = Symbol(`emittedEnd`), Mn = Symbol(`emit`), q = Symbol(`unzip`), Nn = Symbol(`consumeChunk`), Pn = Symbol(`consumeChunkSub`), Fn = Symbol(`consumeBody`), In = Symbol(`consumeMeta`), Ln = Symbol(`consumeHeader`), Rn = Symbol(`consuming`), zn = Symbol(`bufferConcat`), Bn = Symbol(`maybeEnd`), Vn = Symbol(`writing`), J = Symbol(`aborted`), Hn = Symbol(`onDone`), Un = Symbol(`sawValidEntry`), Wn = Symbol(`sawNullBlock`), Gn = Symbol(`sawEOF`), Kn = Symbol(`closeStream`), qn = () => !0, Jn = class extends events__rspack_import_4.EventEmitter {
1214
+ ]), On = Math.max(En.length, Dn.length), R = Symbol(`state`), kn = Symbol(`writeEntry`), z = Symbol(`readEntry`), An = Symbol(`nextEntry`), jn = Symbol(`processEntry`), B = Symbol(`extendedHeader`), Mn = Symbol(`globalExtendedHeader`), V = Symbol(`meta`), Nn = Symbol(`emitMeta`), H = Symbol(`buffer`), U = Symbol(`queue`), W = Symbol(`ended`), Pn = Symbol(`emittedEnd`), Fn = Symbol(`emit`), G = Symbol(`unzip`), In = Symbol(`consumeChunk`), Ln = Symbol(`consumeChunkSub`), Rn = Symbol(`consumeBody`), zn = Symbol(`consumeMeta`), Bn = Symbol(`consumeHeader`), Vn = Symbol(`consuming`), Hn = Symbol(`bufferConcat`), Un = Symbol(`maybeEnd`), Wn = Symbol(`writing`), K = Symbol(`aborted`), Gn = Symbol(`onDone`), Kn = Symbol(`sawValidEntry`), qn = Symbol(`sawNullBlock`), Jn = Symbol(`sawEOF`), Yn = Symbol(`closeStream`), Xn = 1e3, Zn = Symbol(`compressedBytesRead`), Qn = Symbol(`decompressedBytesRead`), $n = Symbol(`checkDecompressionRatio`), er = () => !0, tr = class extends events__rspack_import_4.EventEmitter {
1187
1215
  file;
1188
1216
  strict;
1189
1217
  maxMetaEntrySize;
1190
1218
  filter;
1191
1219
  brotli;
1192
1220
  zstd;
1221
+ maxDecompressionRatio;
1193
1222
  writable = !0;
1194
1223
  readable = !1;
1195
- [G] = [];
1196
- [W];
1197
- [V];
1198
- [En];
1199
- [B] = `begin`;
1200
- [U] = ``;
1224
+ [U] = [];
1201
1225
  [H];
1226
+ [z];
1202
1227
  [kn];
1228
+ [R] = `begin`;
1229
+ [V] = ``;
1230
+ [B];
1231
+ [Mn];
1232
+ [W] = !1;
1233
+ [G];
1203
1234
  [K] = !1;
1204
- [q];
1205
- [J] = !1;
1206
- [Un];
1235
+ [Kn];
1236
+ [qn] = !1;
1237
+ [Jn] = !1;
1207
1238
  [Wn] = !1;
1208
- [Gn] = !1;
1209
1239
  [Vn] = !1;
1210
- [Rn] = !1;
1211
- [jn] = !1;
1240
+ [Pn] = !1;
1241
+ [Zn] = 0;
1242
+ [Qn] = 0;
1212
1243
  constructor(e = {}) {
1213
- super(), this.file = e.file || ``, this.on(Hn, () => {
1214
- (this[B] === `begin` || this[Un] === !1) && this.warn(`TAR_BAD_ARCHIVE`, `Unrecognized archive format`);
1215
- }), e.ondone ? this.on(Hn, e.ondone) : this.on(Hn, () => {
1244
+ super(), this.file = e.file || ``, this.on(Gn, () => {
1245
+ (this[R] === `begin` || this[Kn] === !1) && this.warn(`TAR_BAD_ARCHIVE`, `Unrecognized archive format`);
1246
+ }), e.ondone ? this.on(Gn, e.ondone) : this.on(Gn, () => {
1216
1247
  this.emit(`prefinish`), this.emit(`finish`), this.emit(`end`);
1217
- }), this.strict = !!e.strict, this.maxMetaEntrySize = e.maxMetaEntrySize || Sn, this.filter = typeof e.filter == `function` ? e.filter : qn;
1248
+ }), this.strict = !!e.strict, this.maxDecompressionRatio = typeof e.maxDecompressionRatio == `number` ? e.maxDecompressionRatio : Xn, this.maxMetaEntrySize = e.maxMetaEntrySize || Tn, this.filter = typeof e.filter == `function` ? e.filter : er;
1218
1249
  let t = e.file && (e.file.endsWith(`.tar.br`) || e.file.endsWith(`.tbr`));
1219
1250
  this.brotli = !(e.gzip || e.zstd) && e.brotli !== void 0 ? e.brotli : t ? void 0 : !1;
1220
1251
  let n = e.file && (e.file.endsWith(`.tar.zst`) || e.file.endsWith(`.tzst`));
1221
- this.zstd = !(e.gzip || e.brotli) && e.zstd !== void 0 ? e.zstd : n ? !0 : void 0, this.on(`end`, () => this[Kn]()), typeof e.onwarn == `function` && this.on(`warn`, e.onwarn), typeof e.onReadEntry == `function` && this.on(`entry`, e.onReadEntry);
1252
+ this.zstd = !(e.gzip || e.brotli) && e.zstd !== void 0 ? e.zstd : n ? !0 : void 0, this.on(`end`, () => this[Yn]()), typeof e.onwarn == `function` && this.on(`warn`, e.onwarn), typeof e.onReadEntry == `function` && this.on(`entry`, e.onReadEntry);
1222
1253
  }
1223
1254
  warn(e, t, n = {}) {
1224
- xn(this, e, t, n);
1255
+ wn(this, e, t, n);
1225
1256
  }
1226
- [Ln](e, t) {
1227
- this[Un] === void 0 && (this[Un] = !1);
1257
+ [Bn](e, t) {
1258
+ this[Kn] === void 0 && (this[Kn] = !1);
1228
1259
  let n;
1229
1260
  try {
1230
- n = new I(e, t, this[H], this[kn]);
1261
+ n = new I(e, t, this[B], this[Mn]);
1231
1262
  } catch (e) {
1232
1263
  return this.warn(`TAR_ENTRY_INVALID`, e);
1233
1264
  }
1234
- if (n.nullBlock) this[Wn] ? (this[Gn] = !0, this[B] === `begin` && (this[B] = `header`), this[Mn](`eof`)) : (this[Wn] = !0, this[Mn](`nullBlock`));
1235
- else if (this[Wn] = !1, !n.cksumValid) this.warn(`TAR_ENTRY_INVALID`, `checksum failure`, { header: n });
1265
+ if (n.nullBlock) this[qn] ? (this[Jn] = !0, this[R] === `begin` && (this[R] = `header`), this[Fn](`eof`)) : (this[qn] = !0, this[Fn](`nullBlock`));
1266
+ else if (this[qn] = !1, !n.cksumValid) this.warn(`TAR_ENTRY_INVALID`, `checksum failure`, { header: n });
1236
1267
  else if (!n.path) this.warn(`TAR_ENTRY_INVALID`, `path is required`, { header: n });
1237
1268
  else {
1238
1269
  let e = n.type;
1239
1270
  if (/^(Symbolic)?Link$/.test(e) && !n.linkpath) this.warn(`TAR_ENTRY_INVALID`, `linkpath required`, { header: n });
1240
1271
  else if (!/^(Symbolic)?Link$/.test(e) && !/^(Global)?ExtendedHeader$/.test(e) && n.linkpath) this.warn(`TAR_ENTRY_INVALID`, `linkpath forbidden`, { header: n });
1241
1272
  else {
1242
- let e = this[En] = new bn(n, this[H], this[kn]);
1243
- this[Un] || (e.remain ? e.on(`end`, () => {
1244
- e.invalid || (this[Un] = !0);
1245
- }) : this[Un] = !0), e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = !0, this[Mn](`ignoredEntry`, e), this[B] = `ignore`, e.resume()) : e.size > 0 && (this[U] = ``, e.on(`data`, (e) => this[U] += e), this[B] = `meta`) : (this[H] = void 0, e.ignore = e.ignore || !this.filter(e.path, e), e.ignore ? (this[Mn](`ignoredEntry`, e), this[B] = e.remain ? `ignore` : `header`, e.resume()) : (e.remain ? this[B] = `body` : (this[B] = `header`, e.end()), this[V] ? this[G].push(e) : (this[G].push(e), this[Dn]())));
1273
+ let e = this[kn] = new Cn(n, this[B], this[Mn]);
1274
+ this[Kn] || (e.remain ? e.on(`end`, () => {
1275
+ e.invalid || (this[Kn] = !0);
1276
+ }) : this[Kn] = !0), e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = !0, this[Fn](`ignoredEntry`, e), this[R] = `ignore`, e.resume()) : e.size > 0 && (this[V] = ``, e.on(`data`, (e) => this[V] += e), this[R] = `meta`) : (this[B] = void 0, e.ignore = e.ignore || !this.filter(e.path, e), e.ignore ? (this[Fn](`ignoredEntry`, e), this[R] = e.remain ? `ignore` : `header`, e.resume()) : (e.remain ? this[R] = `body` : (this[R] = `header`, e.end()), this[z] ? this[U].push(e) : (this[U].push(e), this[An]())));
1246
1277
  }
1247
1278
  }
1248
1279
  }
1249
- [Kn]() {
1280
+ [Yn]() {
1250
1281
  queueMicrotask(() => this.emit(`close`));
1251
1282
  }
1252
- [On](e) {
1283
+ [jn](e) {
1253
1284
  let t = !0;
1254
- if (!e) this[V] = void 0, t = !1;
1285
+ if (!e) this[z] = void 0, t = !1;
1255
1286
  else if (Array.isArray(e)) {
1256
1287
  let [t, ...n] = e;
1257
1288
  this.emit(t, ...n);
1258
- } else this[V] = e, this.emit(`entry`, e), e.emittedEnd || (e.on(`end`, () => this[Dn]()), t = !1);
1289
+ } else this[z] = e, this.emit(`entry`, e), e.emittedEnd || (e.on(`end`, () => this[An]()), t = !1);
1259
1290
  return t;
1260
1291
  }
1261
- [Dn]() {
1292
+ [An]() {
1262
1293
  do ;
1263
- while (this[On](this[G].shift()));
1264
- if (this[G].length === 0) {
1265
- let e = this[V];
1266
- !e || e.flowing || e.size === e.remain ? this[Vn] || this.emit(`drain`) : e.once(`drain`, () => this.emit(`drain`));
1294
+ while (this[jn](this[U].shift()));
1295
+ if (this[U].length === 0) {
1296
+ let e = this[z];
1297
+ !e || e.flowing || e.size === e.remain ? this[Wn] || this.emit(`drain`) : e.once(`drain`, () => this.emit(`drain`));
1267
1298
  }
1268
1299
  }
1269
- [Fn](e, t) {
1270
- let n = this[En];
1300
+ [Rn](e, t) {
1301
+ let n = this[kn];
1271
1302
  if (!n) throw Error(`attempt to consume body without entry??`);
1272
1303
  let r = n.blockRemain ?? 0, i = r >= e.length && t === 0 ? e : e.subarray(t, t + r);
1273
- return n.write(i), n.blockRemain || (this[B] = `header`, this[En] = void 0, n.end()), i.length;
1304
+ return n.write(i), n.blockRemain || (this[R] = `header`, this[kn] = void 0, n.end()), i.length;
1274
1305
  }
1275
- [In](e, t) {
1276
- let n = this[En], r = this[Fn](e, t);
1277
- return !this[En] && n && this[An](n), r;
1306
+ [zn](e, t) {
1307
+ let n = this[kn], r = this[Rn](e, t);
1308
+ return !this[kn] && n && this[Nn](n), r;
1278
1309
  }
1279
- [Mn](e, t, n) {
1280
- this[G].length === 0 && !this[V] ? this.emit(e, t, n) : this[G].push([
1310
+ [Fn](e, t, n) {
1311
+ this[U].length === 0 && !this[z] ? this.emit(e, t, n) : this[U].push([
1281
1312
  e,
1282
1313
  t,
1283
1314
  n
1284
1315
  ]);
1285
1316
  }
1286
- [An](e) {
1287
- switch (this[Mn](`meta`, this[U]), e.type) {
1317
+ [Nn](e) {
1318
+ switch (this[Fn](`meta`, this[V]), e.type) {
1288
1319
  case `ExtendedHeader`:
1289
1320
  case `OldExtendedHeader`:
1290
- this[H] = gn.parse(this[U], this[H], !1);
1321
+ this[B] = yn.parse(this[V], this[B], !1);
1291
1322
  break;
1292
1323
  case `GlobalExtendedHeader`:
1293
- this[kn] = gn.parse(this[U], this[kn], !0);
1324
+ this[Mn] = yn.parse(this[V], this[Mn], !0);
1294
1325
  break;
1295
1326
  case `NextFileHasLongPath`:
1296
1327
  case `OldGnuLongPath`: {
1297
- let e = this[H] ?? Object.create(null);
1298
- this[H] = e, e.path = this[U].replace(/\0.*/, ``);
1328
+ let e = this[B] ?? Object.create(null);
1329
+ this[B] = e, e.path = this[V].replace(/\0.*/, ``);
1299
1330
  break;
1300
1331
  }
1301
1332
  case `NextFileHasLongLinkpath`: {
1302
- let e = this[H] || Object.create(null);
1303
- this[H] = e, e.linkpath = this[U].replace(/\0.*/, ``);
1333
+ let e = this[B] || Object.create(null);
1334
+ this[B] = e, e.linkpath = this[V].replace(/\0.*/, ``);
1304
1335
  break;
1305
1336
  }
1306
1337
  default: throw Error(`unknown meta: ` + e.type);
1307
1338
  }
1308
1339
  }
1309
1340
  abort(e) {
1310
- this[J] = !0, this.emit(`abort`, e), this.warn(`TAR_ABORT`, e, { recoverable: !1 });
1341
+ if (!this[K]) {
1342
+ if (this[G]) {
1343
+ let e = this[G];
1344
+ e.write = () => !0, e.end = () => e, e.emit = () => !1, e.destroy?.();
1345
+ }
1346
+ this[K] = !0, this.emit(`abort`, e), this.warn(`TAR_ABORT`, e, { recoverable: !1 });
1347
+ }
1348
+ }
1349
+ [$n](e) {
1350
+ this[Qn] += e.length;
1351
+ let t = this[Qn] / this[Zn];
1352
+ return t > this.maxDecompressionRatio ? (this.abort(Error(`max decompression ratio exceeded: ${t.toFixed(2)} > ${this.maxDecompressionRatio}`)), !1) : !0;
1311
1353
  }
1312
1354
  write(e, t, n) {
1313
- if (typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, typeof t == `string` ? t : `utf8`)), this[J]) return n?.(), !1;
1314
- if ((this[q] === void 0 || this.brotli === void 0 && this[q] === !1) && e) {
1315
- if (this[W] && (e = Buffer.concat([this[W], e]), this[W] = void 0), e.length < Tn) return this[W] = e, n?.(), !0;
1316
- for (let t = 0; this[q] === void 0 && t < Cn.length; t++) e[t] !== Cn[t] && (this[q] = !1);
1355
+ if (typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, typeof t == `string` ? t : `utf8`)), this[K]) return n?.(), !1;
1356
+ if ((this[G] === void 0 || this.brotli === void 0 && this[G] === !1) && e) {
1357
+ if (this[H] && (e = Buffer.concat([this[H], e]), this[H] = void 0), e.length < On) return this[H] = e, n?.(), !0;
1358
+ for (let t = 0; this[G] === void 0 && t < En.length; t++) e[t] !== En[t] && (this[G] = !1);
1317
1359
  let t = !1;
1318
- if (this[q] === !1 && this.zstd !== !1) {
1360
+ if (this[G] === !1 && this.zstd !== !1) {
1319
1361
  t = !0;
1320
- for (let n = 0; n < wn.length; n++) if (e[n] !== wn[n]) {
1362
+ for (let n = 0; n < Dn.length; n++) if (e[n] !== Dn[n]) {
1321
1363
  t = !1;
1322
1364
  break;
1323
1365
  }
1324
1366
  }
1325
1367
  let r = this.brotli === void 0 && !t;
1326
- if (this[q] === !1 && r) if (e.length < 512) if (this[K]) this.brotli = !0;
1327
- else return this[W] = e, n?.(), !0;
1368
+ if (this[G] === !1 && r) if (e.length < 512) if (this[W]) this.brotli = !0;
1369
+ else return this[H] = e, n?.(), !0;
1328
1370
  else try {
1329
1371
  new I(e.subarray(0, 512)), this.brotli = !1;
1330
1372
  } catch {
1331
1373
  this.brotli = !0;
1332
1374
  }
1333
- if (this[q] === void 0 || this[q] === !1 && (this.brotli || t)) {
1334
- let r = this[K];
1335
- this[K] = !1, this[q] = this[q] === void 0 ? new Ft({}) : t ? new Vt({}) : new Rt({}), this[q].on(`data`, (e) => this[Nn](e)), this[q].on(`error`, (e) => this.abort(e)), this[q].on(`end`, () => {
1336
- this[K] = !0, this[Nn]();
1337
- }), this[Vn] = !0;
1338
- let i = !!this[q][r ? `end` : `write`](e);
1339
- return this[Vn] = !1, n?.(), i;
1375
+ if (this[G] === void 0 || this[G] === !1 && (this.brotli || t)) {
1376
+ let r = this[W];
1377
+ this[W] = !1, this[G] = this[G] === void 0 ? new Ft({}) : t ? new Vt({}) : new Rt({}), this[G].on(`data`, (e) => {
1378
+ this[$n](e) && this[In](e);
1379
+ }), this[G].on(`error`, (e) => {
1380
+ this[K] || this.abort(e);
1381
+ }), this[G].on(`end`, () => {
1382
+ this[W] = !0, this[In]();
1383
+ }), this[Wn] = !0, this[Zn] += e.length;
1384
+ let i = !!this[G][r ? `end` : `write`](e);
1385
+ return this[Wn] = !1, n?.(), i;
1340
1386
  }
1341
1387
  }
1342
- this[Vn] = !0, this[q] ? this[q].write(e) : this[Nn](e), this[Vn] = !1;
1343
- let r = this[G].length > 0 ? !1 : this[V] ? this[V].flowing : !0;
1344
- return !r && this[G].length === 0 && this[V]?.once(`drain`, () => this.emit(`drain`)), n?.(), r;
1388
+ this[Wn] = !0, this[G] ? (this[Zn] += e.length, this[G].write(e)) : this[In](e), this[Wn] = !1;
1389
+ let r = this[U].length > 0 ? !1 : !this[z] || this[z].flowing;
1390
+ return !r && this[U].length === 0 && this[z]?.once(`drain`, () => this.emit(`drain`)), n?.(), r;
1345
1391
  }
1346
- [zn](e) {
1347
- e && !this[J] && (this[W] = this[W] ? Buffer.concat([this[W], e]) : e);
1392
+ [Hn](e) {
1393
+ e && !this[K] && (this[H] = this[H] ? Buffer.concat([this[H], e]) : e);
1348
1394
  }
1349
- [Bn]() {
1350
- if (this[K] && !this[jn] && !this[J] && !this[Rn]) {
1351
- this[jn] = !0;
1352
- let e = this[En];
1353
- if (e && e.blockRemain) {
1354
- let t = this[W] ? this[W].length : 0;
1355
- this.warn(`TAR_BAD_ARCHIVE`, `Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`, { entry: e }), this[W] && e.write(this[W]), e.end();
1395
+ [Un]() {
1396
+ if (this[W] && !this[Pn] && !this[K] && !this[Vn]) {
1397
+ this[Pn] = !0;
1398
+ let e = this[kn];
1399
+ if (e?.blockRemain) {
1400
+ let t = this[H] ? this[H].length : 0;
1401
+ this.warn(`TAR_BAD_ARCHIVE`, `Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`, { entry: e }), this[H] && e.write(this[H]), e.end();
1356
1402
  }
1357
- this[Mn](Hn);
1403
+ this[Fn](Gn);
1358
1404
  }
1359
1405
  }
1360
- [Nn](e) {
1361
- if (this[Rn] && e) this[zn](e);
1362
- else if (!e && !this[W]) this[Bn]();
1406
+ [In](e) {
1407
+ if (this[Vn] && e) this[Hn](e);
1408
+ else if (!e && !this[H]) this[Un]();
1363
1409
  else if (e) {
1364
- if (this[Rn] = !0, this[W]) {
1365
- this[zn](e);
1366
- let t = this[W];
1367
- this[W] = void 0, this[Pn](t);
1368
- } else this[Pn](e);
1369
- for (; this[W] && this[W]?.length >= 512 && !this[J] && !this[Gn];) {
1370
- let e = this[W];
1371
- this[W] = void 0, this[Pn](e);
1410
+ if (this[Vn] = !0, this[H]) {
1411
+ this[Hn](e);
1412
+ let t = this[H];
1413
+ this[H] = void 0, this[Ln](t);
1414
+ } else this[Ln](e);
1415
+ for (; this[H] && this[H]?.length >= 512 && !this[K] && !this[Jn];) {
1416
+ let e = this[H];
1417
+ this[H] = void 0, this[Ln](e);
1372
1418
  }
1373
- this[Rn] = !1;
1419
+ this[Vn] = !1;
1374
1420
  }
1375
- (!this[W] || this[K]) && this[Bn]();
1421
+ (!this[H] || this[W]) && this[Un]();
1376
1422
  }
1377
- [Pn](e) {
1423
+ [Ln](e) {
1378
1424
  let t = 0, n = e.length;
1379
- for (; t + 512 <= n && !this[J] && !this[Gn];) switch (this[B]) {
1425
+ for (; t + 512 <= n && !this[K] && !this[Jn];) switch (this[R]) {
1380
1426
  case `begin`:
1381
1427
  case `header`:
1382
- this[Ln](e, t), t += 512;
1428
+ this[Bn](e, t), t += 512;
1383
1429
  break;
1384
1430
  case `ignore`:
1385
1431
  case `body`:
1386
- t += this[Fn](e, t);
1432
+ t += this[Rn](e, t);
1387
1433
  break;
1388
1434
  case `meta`:
1389
- t += this[In](e, t);
1435
+ t += this[zn](e, t);
1390
1436
  break;
1391
- default: throw Error(`invalid state: ` + this[B]);
1437
+ default: throw Error(`invalid state: ` + this[R]);
1392
1438
  }
1393
- t < n && (this[W] = this[W] ? Buffer.concat([e.subarray(t), this[W]]) : e.subarray(t));
1439
+ t < n && (this[H] = this[H] ? Buffer.concat([e.subarray(t), this[H]]) : e.subarray(t));
1394
1440
  }
1395
1441
  end(e, t, n) {
1396
- return typeof e == `function` && (n = e, t = void 0, e = void 0), typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, t)), n && this.once(`finish`, n), this[J] || (this[q] ? (e && this[q].write(e), this[q].end()) : (this[K] = !0, (this.brotli === void 0 || this.zstd === void 0) && (e ||= Buffer.alloc(0)), e && this.write(e), this[Bn]())), this;
1442
+ return typeof e == `function` && (n = e, t = void 0, e = void 0), typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, t)), n && this.once(`finish`, n), this[K] || (this[G] ? (e && (this[Zn] += e.length, this[G].write(e)), this[G].end()) : (this[W] = !0, (this.brotli === void 0 || this.zstd === void 0) && (e ||= Buffer.alloc(0)), e && this.write(e), this[Un]())), this;
1397
1443
  }
1398
- }, Yn = (e) => {
1444
+ }, nr = (e) => {
1399
1445
  let t = e.length - 1, n = -1;
1400
1446
  for (; t > -1 && e.charAt(t) === `/`;) n = t, t--;
1401
1447
  return n === -1 ? e : e.slice(0, n);
1402
- }, Xn = (e) => {
1448
+ }, rr = (e) => {
1403
1449
  let t = e.onReadEntry;
1404
1450
  e.onReadEntry = t ? (e) => {
1405
1451
  t(e), e.resume();
1406
1452
  } : (e) => e.resume();
1407
- }, Zn = (e, t) => {
1408
- let n = new Map(t.map((e) => [Yn(e), !0])), r = e.filter, i = (e, t = ``) => {
1409
- let r = t || (0,path__rspack_import_8.parse)(e).root || `.`, a;
1410
- if (e === r) a = !1;
1453
+ }, ir = (e, t) => {
1454
+ let n = new Map(t.map((e) => [nr(e), !0])), r = e.filter, i = (e, t = ``, r = 0) => {
1455
+ if (r >= 100) return n.set(e, !1), !1;
1456
+ let a = t || (0,path__rspack_import_8.parse)(e).root || `.`, o;
1457
+ if (e === a) o = !1;
1411
1458
  else {
1412
1459
  let t = n.get(e);
1413
- a = t === void 0 ? i((0,path__rspack_import_8.dirname)(e), r) : t;
1460
+ o = t === void 0 ? i((0,path__rspack_import_8.dirname)(e), a, r + 1) : t;
1414
1461
  }
1415
- return n.set(e, a), a;
1462
+ return n.set(e, o), o;
1416
1463
  };
1417
- e.filter = r ? (e, t) => r(e, t) && i(Yn(e)) : (e) => i(Yn(e));
1418
- }, Qn = Ct((e) => {
1419
- let n = new Jn(e), r = e.file, i;
1464
+ e.filter = r ? (e, t) => r(e, t) && i(nr(e)) : (e) => i(nr(e));
1465
+ }, ar = Ct((e) => {
1466
+ let n = new tr(e), r = e.file, i;
1420
1467
  try {
1421
1468
  i = node_fs__rspack_import_0.openSync(r, `r`);
1422
1469
  let a = node_fs__rspack_import_0.fstatSync(i), o = e.maxReadSize || 16 * 1024 * 1024;
@@ -1438,7 +1485,7 @@ while (this[On](this[G].shift()));
1438
1485
  } catch {}
1439
1486
  }
1440
1487
  }, (e, n) => {
1441
- let r = new Jn(e), i = e.maxReadSize || 16 * 1024 * 1024, a = e.file;
1488
+ let r = new tr(e), i = e.maxReadSize || 16 * 1024 * 1024, a = e.file;
1442
1489
  return new Promise((e, n) => {
1443
1490
  r.on(`error`, n), r.on(`end`, e), node_fs__rspack_import_0.stat(a, (e, t) => {
1444
1491
  if (e) n(e);
@@ -1451,22 +1498,22 @@ while (this[On](this[G].shift()));
1451
1498
  }
1452
1499
  });
1453
1500
  });
1454
- }, (e) => new Jn(e), (e) => new Jn(e), (e, t) => {
1455
- t?.length && Zn(e, t), e.noResume || Xn(e);
1456
- }), $n = (e, t, n) => (e &= 4095, n && (e = (e | 384) & -19), t && (e & 256 && (e |= 64), e & 32 && (e |= 8), e & 4 && (e |= 1)), e), { isAbsolute: er, parse: tr } = node_path__rspack_import_3.win32, nr = (e) => {
1457
- let t = ``, n = tr(e);
1458
- for (; er(e) || n.root;) {
1501
+ }, (e) => new tr(e), (e) => new tr(e), (e, t) => {
1502
+ t?.length && ir(e, t), e.noResume || rr(e);
1503
+ }), or = (e, t, n) => (e &= 4095, n && (e = (e | 384) & -19), t && (e & 256 && (e |= 64), e & 32 && (e |= 8), e & 4 && (e |= 1)), e), { isAbsolute: sr, parse: cr } = node_path__rspack_import_3.win32, lr = (e) => {
1504
+ let t = ``, n = cr(e);
1505
+ for (; sr(e) || n.root;) {
1459
1506
  let r = e.charAt(0) === `/` && e.slice(0, 4) !== `//?/` ? `/` : n.root;
1460
- e = e.slice(r.length), t += r, n = tr(e);
1507
+ e = e.slice(r.length), t += r, n = cr(e);
1461
1508
  }
1462
1509
  return [t, e];
1463
- }, rr = [
1510
+ }, ur = [
1464
1511
  `|`,
1465
1512
  `<`,
1466
1513
  `>`,
1467
1514
  `?`,
1468
1515
  `:`
1469
- ], ir = rr.map((e) => String.fromCodePoint(61440 + Number(e.codePointAt(0)))), ar = new Map(rr.map((e, t) => [e, ir[t]])), or = new Map(ir.map((e, t) => [e, rr[t]])), sr = (e) => rr.reduce((e, t) => e.split(t).join(ar.get(t)), e), cr = (e) => ir.reduce((e, t) => e.split(t).join(or.get(t)), e), lr = (e, t) => t ? (e = z(e).replace(/^\.(\/|$)/, ``), Yn(t) + `/` + e) : z(e), ur = 16 * 1024 * 1024, dr = Symbol(`process`), fr = Symbol(`file`), pr = Symbol(`directory`), mr = Symbol(`symlink`), hr = Symbol(`hardlink`), gr = Symbol(`header`), _r = Symbol(`read`), vr = Symbol(`lstat`), yr = Symbol(`onlstat`), br = Symbol(`onread`), xr = Symbol(`onreadlink`), Sr = Symbol(`openfile`), Cr = Symbol(`onopenfile`), wr = Symbol(`close`), Tr = Symbol(`mode`), Er = Symbol(`awaitDrain`), Dr = Symbol(`ondrain`), Y = Symbol(`prefix`), Or = class extends Ue {
1516
+ ], dr = ur.map((e) => String.fromCodePoint(61440 + Number(e.codePointAt(0)))), fr = new Map(ur.map((e, t) => [e, dr[t]])), pr = new Map(dr.map((e, t) => [e, ur[t]])), mr = (e) => ur.reduce((e, t) => e.split(t).join(fr.get(t)), e), hr = (e) => dr.reduce((e, t) => e.split(t).join(pr.get(t)), e), gr = (e, t) => t ? (e = L(e).replace(/^\.(\/|$)/, ``), nr(t) + `/` + e) : L(e), _r = 16 * 1024 * 1024, vr = Symbol(`process`), yr = Symbol(`file`), br = Symbol(`directory`), xr = Symbol(`symlink`), Sr = Symbol(`hardlink`), Cr = Symbol(`header`), wr = Symbol(`read`), Tr = Symbol(`lstat`), Er = Symbol(`onlstat`), Dr = Symbol(`onread`), Or = Symbol(`onreadlink`), kr = Symbol(`openfile`), Ar = Symbol(`onopenfile`), q = Symbol(`close`), jr = Symbol(`mode`), Mr = Symbol(`awaitDrain`), Nr = Symbol(`ondrain`), J = Symbol(`prefix`), Pr = class extends Ue {
1470
1517
  path;
1471
1518
  portable;
1472
1519
  myuid = process.getuid && process.getuid() || 0;
@@ -1499,54 +1546,54 @@ while (this[On](this[G].shift()));
1499
1546
  #t = !1;
1500
1547
  constructor(e, t = {}) {
1501
1548
  let n = St(t);
1502
- super(), this.path = z(e), this.portable = !!n.portable, this.maxReadSize = n.maxReadSize || ur, this.linkCache = n.linkCache || /* @__PURE__ */ new Map(), this.statCache = n.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!n.preservePaths, this.cwd = z(n.cwd || process.cwd()), this.strict = !!n.strict, this.noPax = !!n.noPax, this.noMtime = !!n.noMtime, this.mtime = n.mtime, this.prefix = n.prefix ? z(n.prefix) : void 0, this.onWriteEntry = n.onWriteEntry, typeof n.onwarn == `function` && this.on(`warn`, n.onwarn);
1549
+ super(), this.path = L(e), this.portable = !!n.portable, this.maxReadSize = n.maxReadSize || _r, this.linkCache = n.linkCache || /* @__PURE__ */ new Map(), this.statCache = n.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!n.preservePaths, this.cwd = L(n.cwd || process.cwd()), this.strict = !!n.strict, this.noPax = !!n.noPax, this.noMtime = !!n.noMtime, this.mtime = n.mtime, this.prefix = n.prefix ? L(n.prefix) : void 0, this.onWriteEntry = n.onWriteEntry, typeof n.onwarn == `function` && this.on(`warn`, n.onwarn);
1503
1550
  let r = !1;
1504
1551
  if (!this.preservePaths) {
1505
- let [e, t] = nr(this.path);
1552
+ let [e, t] = lr(this.path);
1506
1553
  e && typeof t == `string` && (this.path = t, r = e);
1507
1554
  }
1508
- this.win32 = !!n.win32 || process.platform === `win32`, this.win32 && (this.path = cr(this.path.replaceAll(/\\/g, `/`)), e = e.replaceAll(/\\/g, `/`)), this.absolute = z(n.absolute || path__rspack_import_8.resolve(this.cwd, e)), this.path === `` && (this.path = `./`), r && this.warn(`TAR_ENTRY_INFO`, `stripping ${r} from absolute path`, {
1555
+ this.win32 = !!n.win32 || process.platform === `win32`, this.win32 && (this.path = hr(this.path.replaceAll(/\\/g, `/`)), e = e.replaceAll(/\\/g, `/`)), this.absolute = L(n.absolute || path__rspack_import_8.resolve(this.cwd, e)), this.path === `` && (this.path = `./`), r && this.warn(`TAR_ENTRY_INFO`, `stripping ${r} from absolute path`, {
1509
1556
  entry: this,
1510
1557
  path: r + this.path
1511
1558
  });
1512
1559
  let i = this.statCache.get(this.absolute);
1513
- i ? this[yr](i) : this[vr]();
1560
+ i ? this[Er](i) : this[Tr]();
1514
1561
  }
1515
1562
  warn(e, t, n = {}) {
1516
- return xn(this, e, t, n);
1563
+ return wn(this, e, t, n);
1517
1564
  }
1518
1565
  emit(e, ...t) {
1519
1566
  return e === `error` && (this.#t = !0), super.emit(e, ...t);
1520
1567
  }
1521
- [vr]() {
1568
+ [Tr]() {
1522
1569
  fs__rspack_import_5.lstat(this.absolute, (e, t) => {
1523
1570
  if (e) return this.emit(`error`, e);
1524
- this[yr](t);
1571
+ this[Er](t);
1525
1572
  });
1526
1573
  }
1527
- [yr](e) {
1528
- this.statCache.set(this.absolute, e), this.stat = e, e.isFile() || (e.size = 0), this.type = jr(e), this.emit(`stat`, e), this[dr]();
1574
+ [Er](e) {
1575
+ this.statCache.set(this.absolute, e), this.stat = e, e.isFile() || (e.size = 0), this.type = Lr(e), this.emit(`stat`, e), this[vr]();
1529
1576
  }
1530
- [dr]() {
1577
+ [vr]() {
1531
1578
  switch (this.type) {
1532
- case `File`: return this[fr]();
1533
- case `Directory`: return this[pr]();
1534
- case `SymbolicLink`: return this[mr]();
1579
+ case `File`: return this[yr]();
1580
+ case `Directory`: return this[br]();
1581
+ case `SymbolicLink`: return this[xr]();
1535
1582
  default: return this.end();
1536
1583
  }
1537
1584
  }
1538
- [Tr](e) {
1539
- return $n(e, this.type === `Directory`, this.portable);
1585
+ [jr](e) {
1586
+ return or(e, this.type === `Directory`, this.portable);
1540
1587
  }
1541
- [Y](e) {
1542
- return lr(e, this.prefix);
1588
+ [J](e) {
1589
+ return gr(e, this.prefix);
1543
1590
  }
1544
- [gr]() {
1591
+ [Cr]() {
1545
1592
  if (!this.stat) throw Error(`cannot write header before stat`);
1546
1593
  this.type === `Directory` && this.portable && (this.noMtime = !0), this.onWriteEntry?.(this), this.header = new I({
1547
- path: this[Y](this.path),
1548
- linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[Y](this.linkpath) : this.linkpath,
1549
- mode: this[Tr](this.stat.mode),
1594
+ path: this[J](this.path),
1595
+ linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[J](this.linkpath) : this.linkpath,
1596
+ mode: this[jr](this.stat.mode),
1550
1597
  uid: this.portable ? void 0 : this.stat.uid,
1551
1598
  gid: this.portable ? void 0 : this.stat.gid,
1552
1599
  size: this.stat.size,
@@ -1555,13 +1602,13 @@ while (this[On](this[G].shift()));
1555
1602
  uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : ``,
1556
1603
  atime: this.portable ? void 0 : this.stat.atime,
1557
1604
  ctime: this.portable ? void 0 : this.stat.ctime
1558
- }), this.header.encode() && !this.noPax && super.write(new gn({
1605
+ }), this.header.encode() && !this.noPax && super.write(new yn({
1559
1606
  atime: this.portable ? void 0 : this.header.atime,
1560
1607
  ctime: this.portable ? void 0 : this.header.ctime,
1561
1608
  gid: this.portable ? void 0 : this.header.gid,
1562
1609
  mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime,
1563
- path: this[Y](this.path),
1564
- linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[Y](this.linkpath) : this.linkpath,
1610
+ path: this[J](this.path),
1611
+ linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[J](this.linkpath) : this.linkpath,
1565
1612
  size: this.header.size,
1566
1613
  uid: this.portable ? void 0 : this.header.uid,
1567
1614
  uname: this.portable ? void 0 : this.header.uname,
@@ -1573,65 +1620,65 @@ while (this[On](this[G].shift()));
1573
1620
  if (!e) throw Error(`failed to encode header`);
1574
1621
  super.write(e);
1575
1622
  }
1576
- [pr]() {
1623
+ [br]() {
1577
1624
  if (!this.stat) throw Error(`cannot create directory entry without stat`);
1578
- this.path.slice(-1) !== `/` && (this.path += `/`), this.stat.size = 0, this[gr](), this.end();
1625
+ this.path.slice(-1) !== `/` && (this.path += `/`), this.stat.size = 0, this[Cr](), this.end();
1579
1626
  }
1580
- [mr]() {
1627
+ [xr]() {
1581
1628
  fs__rspack_import_5.readlink(this.absolute, (e, t) => {
1582
1629
  if (e) return this.emit(`error`, e);
1583
- this[xr](t);
1630
+ this[Or](t);
1584
1631
  });
1585
1632
  }
1586
- [xr](e) {
1587
- this.linkpath = z(e), this[gr](), this.end();
1633
+ [Or](e) {
1634
+ this.linkpath = L(e), this[Cr](), this.end();
1588
1635
  }
1589
- [hr](e) {
1636
+ [Sr](e) {
1590
1637
  if (!this.stat) throw Error(`cannot create link entry without stat`);
1591
- this.type = `Link`, this.linkpath = z(path__rspack_import_8.relative(this.cwd, e)), this.stat.size = 0, this[gr](), this.end();
1638
+ this.type = `Link`, this.linkpath = L(path__rspack_import_8.relative(this.cwd, e)), this.stat.size = 0, this[Cr](), this.end();
1592
1639
  }
1593
- [fr]() {
1640
+ [yr]() {
1594
1641
  if (!this.stat) throw Error(`cannot create file entry without stat`);
1595
1642
  if (this.stat.nlink > 1) {
1596
1643
  let e = `${this.stat.dev}:${this.stat.ino}`, t = this.linkCache.get(e);
1597
- if (t?.indexOf(this.cwd) === 0) return this[hr](t);
1644
+ if (t?.indexOf(this.cwd) === 0) return this[Sr](t);
1598
1645
  this.linkCache.set(e, this.absolute);
1599
1646
  }
1600
- if (this[gr](), this.stat.size === 0) return this.end();
1601
- this[Sr]();
1647
+ if (this[Cr](), this.stat.size === 0) return this.end();
1648
+ this[kr]();
1602
1649
  }
1603
- [Sr]() {
1650
+ [kr]() {
1604
1651
  fs__rspack_import_5.open(this.absolute, `r`, (e, t) => {
1605
1652
  if (e) return this.emit(`error`, e);
1606
- this[Cr](t);
1653
+ this[Ar](t);
1607
1654
  });
1608
1655
  }
1609
- [Cr](e) {
1610
- if (this.fd = e, this.#t) return this[wr]();
1656
+ [Ar](e) {
1657
+ if (this.fd = e, this.#t) return this[q]();
1611
1658
  if (!this.stat) throw Error(`should stat before calling onopenfile`);
1612
1659
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
1613
1660
  let t = Math.min(this.blockLen, this.maxReadSize);
1614
- this.buf = Buffer.allocUnsafe(t), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[_r]();
1661
+ this.buf = Buffer.allocUnsafe(t), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[wr]();
1615
1662
  }
1616
- [_r]() {
1663
+ [wr]() {
1617
1664
  let { fd: e, buf: t, offset: n, length: r, pos: i } = this;
1618
1665
  if (e === void 0 || t === void 0) throw Error(`cannot read file without first opening`);
1619
1666
  fs__rspack_import_5.read(e, t, n, r, i, (e, t) => {
1620
- if (e) return this[wr](() => this.emit(`error`, e));
1621
- this[br](t);
1667
+ if (e) return this[q](() => this.emit(`error`, e));
1668
+ this[Dr](t);
1622
1669
  });
1623
1670
  }
1624
- [wr](e = () => {}) {
1671
+ [q](e = () => {}) {
1625
1672
  this.fd !== void 0 && fs__rspack_import_5.close(this.fd, e);
1626
1673
  }
1627
- [br](e) {
1674
+ [Dr](e) {
1628
1675
  if (e <= 0 && this.remain > 0) {
1629
1676
  let e = Object.assign(Error(`encountered unexpected EOF`), {
1630
1677
  path: this.absolute,
1631
1678
  syscall: `read`,
1632
1679
  code: `EOF`
1633
1680
  });
1634
- return this[wr](() => this.emit(`error`, e));
1681
+ return this[q](() => this.emit(`error`, e));
1635
1682
  }
1636
1683
  if (e > this.remain) {
1637
1684
  let e = Object.assign(Error(`did not encounter expected EOF`), {
@@ -1639,14 +1686,14 @@ while (this[On](this[G].shift()));
1639
1686
  syscall: `read`,
1640
1687
  code: `EOF`
1641
1688
  });
1642
- return this[wr](() => this.emit(`error`, e));
1689
+ return this[q](() => this.emit(`error`, e));
1643
1690
  }
1644
1691
  if (!this.buf) throw Error(`should have created buffer prior to reading`);
1645
1692
  if (e === this.remain) for (let t = e; t < this.length && e < this.blockRemain; t++) this.buf[t + this.offset] = 0, e++, this.remain++;
1646
1693
  let t = this.offset === 0 && e === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + e);
1647
- this.write(t) ? this[Dr]() : this[Er](() => this[Dr]());
1694
+ this.write(t) ? this[Nr]() : this[Mr](() => this[Nr]());
1648
1695
  }
1649
- [Er](e) {
1696
+ [Mr](e) {
1650
1697
  this.once(`drain`, e);
1651
1698
  }
1652
1699
  write(e, t, n) {
@@ -1656,42 +1703,42 @@ while (this[On](this[G].shift()));
1656
1703
  }
1657
1704
  return this.remain -= e.length, this.blockRemain -= e.length, this.pos += e.length, this.offset += e.length, super.write(e, null, n);
1658
1705
  }
1659
- [Dr]() {
1660
- if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[wr]((e) => e ? this.emit(`error`, e) : this.end());
1706
+ [Nr]() {
1707
+ if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[q]((e) => e ? this.emit(`error`, e) : this.end());
1661
1708
  if (!this.buf) throw Error(`buffer lost somehow in ONDRAIN`);
1662
- 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[_r]();
1709
+ 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[wr]();
1663
1710
  }
1664
- }, kr = class extends Or {
1711
+ }, Fr = class extends Pr {
1665
1712
  sync = !0;
1666
- [vr]() {
1667
- this[yr](fs__rspack_import_5.lstatSync(this.absolute));
1713
+ [Tr]() {
1714
+ this[Er](fs__rspack_import_5.lstatSync(this.absolute));
1668
1715
  }
1669
- [mr]() {
1670
- this[xr](fs__rspack_import_5.readlinkSync(this.absolute));
1716
+ [xr]() {
1717
+ this[Or](fs__rspack_import_5.readlinkSync(this.absolute));
1671
1718
  }
1672
- [Sr]() {
1673
- this[Cr](fs__rspack_import_5.openSync(this.absolute, `r`));
1719
+ [kr]() {
1720
+ this[Ar](fs__rspack_import_5.openSync(this.absolute, `r`));
1674
1721
  }
1675
- [_r]() {
1722
+ [wr]() {
1676
1723
  let e = !0;
1677
1724
  try {
1678
1725
  let { fd: t, buf: n, offset: r, length: i, pos: a } = this;
1679
1726
  if (t === void 0 || n === void 0) throw Error(`fd and buf must be set in READ method`);
1680
1727
  let o = fs__rspack_import_5.readSync(t, n, r, i, a);
1681
- this[br](o), e = !1;
1728
+ this[Dr](o), e = !1;
1682
1729
  } finally {
1683
1730
  if (e) try {
1684
- this[wr](() => {});
1731
+ this[q](() => {});
1685
1732
  } catch {}
1686
1733
  }
1687
1734
  }
1688
- [Er](e) {
1735
+ [Mr](e) {
1689
1736
  e();
1690
1737
  }
1691
- [wr](e = () => {}) {
1738
+ [q](e = () => {}) {
1692
1739
  this.fd !== void 0 && fs__rspack_import_5.closeSync(this.fd), e();
1693
1740
  }
1694
- }, Ar = class extends Ue {
1741
+ }, Ir = class extends Ue {
1695
1742
  blockLen = 0;
1696
1743
  blockRemain = 0;
1697
1744
  buf = 0;
@@ -1720,22 +1767,22 @@ while (this[On](this[G].shift()));
1720
1767
  size;
1721
1768
  onWriteEntry;
1722
1769
  warn(e, t, n = {}) {
1723
- return xn(this, e, t, n);
1770
+ return wn(this, e, t, n);
1724
1771
  }
1725
1772
  constructor(e, t = {}) {
1726
1773
  let n = St(t);
1727
1774
  super(), this.preservePaths = !!n.preservePaths, this.portable = !!n.portable, this.strict = !!n.strict, this.noPax = !!n.noPax, this.noMtime = !!n.noMtime, this.onWriteEntry = n.onWriteEntry, this.readEntry = e;
1728
1775
  let { type: r } = e;
1729
1776
  if (r === `Unsupported`) throw Error(`writing entry that should be ignored`);
1730
- this.type = r, this.type === `Directory` && this.portable && (this.noMtime = !0), this.prefix = n.prefix, this.path = z(e.path), this.mode = e.mode === void 0 ? void 0 : this[Tr](e.mode), this.uid = this.portable ? void 0 : e.uid, this.gid = this.portable ? void 0 : e.gid, this.uname = this.portable ? void 0 : e.uname, this.gname = this.portable ? void 0 : e.gname, this.size = e.size, this.mtime = this.noMtime ? void 0 : n.mtime || e.mtime, this.atime = this.portable ? void 0 : e.atime, this.ctime = this.portable ? void 0 : e.ctime, this.linkpath = e.linkpath === void 0 ? void 0 : z(e.linkpath), typeof n.onwarn == `function` && this.on(`warn`, n.onwarn);
1777
+ this.type = r, this.type === `Directory` && this.portable && (this.noMtime = !0), this.prefix = n.prefix, this.path = L(e.path), this.mode = e.mode === void 0 ? void 0 : this[jr](e.mode), this.uid = this.portable ? void 0 : e.uid, this.gid = this.portable ? void 0 : e.gid, this.uname = this.portable ? void 0 : e.uname, this.gname = this.portable ? void 0 : e.gname, this.size = e.size, this.mtime = this.noMtime ? void 0 : n.mtime || e.mtime, this.atime = this.portable ? void 0 : e.atime, this.ctime = this.portable ? void 0 : e.ctime, this.linkpath = e.linkpath === void 0 ? void 0 : L(e.linkpath), typeof n.onwarn == `function` && this.on(`warn`, n.onwarn);
1731
1778
  let i = !1;
1732
1779
  if (!this.preservePaths) {
1733
- let [e, t] = nr(this.path);
1780
+ let [e, t] = lr(this.path);
1734
1781
  e && typeof t == `string` && (this.path = t, i = e);
1735
1782
  }
1736
1783
  this.remain = e.size, this.blockRemain = e.startBlockSize, this.onWriteEntry?.(this), this.header = new I({
1737
- path: this[Y](this.path),
1738
- linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[Y](this.linkpath) : this.linkpath,
1784
+ path: this[J](this.path),
1785
+ linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[J](this.linkpath) : this.linkpath,
1739
1786
  mode: this.mode,
1740
1787
  uid: this.portable ? void 0 : this.uid,
1741
1788
  gid: this.portable ? void 0 : this.gid,
@@ -1748,13 +1795,13 @@ while (this[On](this[G].shift()));
1748
1795
  }), i && this.warn(`TAR_ENTRY_INFO`, `stripping ${i} from absolute path`, {
1749
1796
  entry: this,
1750
1797
  path: i + this.path
1751
- }), this.header.encode() && !this.noPax && super.write(new gn({
1798
+ }), this.header.encode() && !this.noPax && super.write(new yn({
1752
1799
  atime: this.portable ? void 0 : this.atime,
1753
1800
  ctime: this.portable ? void 0 : this.ctime,
1754
1801
  gid: this.portable ? void 0 : this.gid,
1755
1802
  mtime: this.noMtime ? void 0 : this.mtime,
1756
- path: this[Y](this.path),
1757
- linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[Y](this.linkpath) : this.linkpath,
1803
+ path: this[J](this.path),
1804
+ linkpath: this.type === `Link` && this.linkpath !== void 0 ? this[J](this.linkpath) : this.linkpath,
1758
1805
  size: this.size,
1759
1806
  uid: this.portable ? void 0 : this.uid,
1760
1807
  uname: this.portable ? void 0 : this.uname,
@@ -1766,11 +1813,11 @@ while (this[On](this[G].shift()));
1766
1813
  if (!a) throw Error(`failed to encode header`);
1767
1814
  super.write(a), e.pipe(this);
1768
1815
  }
1769
- [Y](e) {
1770
- return lr(e, this.prefix);
1816
+ [J](e) {
1817
+ return gr(e, this.prefix);
1771
1818
  }
1772
- [Tr](e) {
1773
- return $n(e, this.type === `Directory`, this.portable);
1819
+ [jr](e) {
1820
+ return or(e, this.type === `Directory`, this.portable);
1774
1821
  }
1775
1822
  write(e, t, n) {
1776
1823
  typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, typeof t == `string` ? t : `utf8`));
@@ -1781,7 +1828,7 @@ while (this[On](this[G].shift()));
1781
1828
  end(e, t, n) {
1782
1829
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof e == `function` && (n = e, t = void 0, e = void 0), typeof t == `function` && (n = t, t = void 0), typeof e == `string` && (e = Buffer.from(e, t ?? `utf8`)), n && this.once(`finish`, n), e ? super.end(e, n) : super.end(n), this;
1783
1830
  }
1784
- }, jr = (e) => e.isFile() ? `File` : e.isDirectory() ? `Directory` : e.isSymbolicLink() ? `SymbolicLink` : `Unsupported`, Mr = class e {
1831
+ }, Lr = (e) => e.isFile() ? `File` : e.isDirectory() ? `Directory` : e.isSymbolicLink() ? `SymbolicLink` : `Unsupported`, Rr = class e {
1785
1832
  tail;
1786
1833
  head;
1787
1834
  length = 0;
@@ -1812,11 +1859,11 @@ while (this[On](this[G].shift()));
1812
1859
  e.list = this, e.prev = t, t && (t.next = e), this.tail = e, this.head ||= e, this.length++;
1813
1860
  }
1814
1861
  push(...e) {
1815
- for (let t = 0, n = e.length; t < n; t++) Pr(this, e[t]);
1862
+ for (let t = 0, n = e.length; t < n; t++) Br(this, e[t]);
1816
1863
  return this.length;
1817
1864
  }
1818
1865
  unshift(...e) {
1819
- for (var t = 0, n = e.length; t < n; t++) Fr(this, e[t]);
1866
+ for (var t = 0, n = e.length; t < n; t++) Vr(this, e[t]);
1820
1867
  return this.length;
1821
1868
  }
1822
1869
  pop() {
@@ -1912,7 +1959,7 @@ while (this[On](this[G].shift()));
1912
1959
  let i = [];
1913
1960
  for (let e = 0; r && e < t; e++) i.push(r.value), r = this.removeNode(r);
1914
1961
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
1915
- for (let e of n) r = Nr(this, r, e);
1962
+ for (let e of n) r = zr(this, r, e);
1916
1963
  return i;
1917
1964
  }
1918
1965
  reverse() {
@@ -1924,17 +1971,17 @@ while (this[On](this[G].shift()));
1924
1971
  return this.head = t, this.tail = e, this;
1925
1972
  }
1926
1973
  };
1927
- function Nr(e, t, n) {
1928
- let r = new Ir(n, t, t ? t.next : e.head, e);
1974
+ function zr(e, t, n) {
1975
+ let r = new Hr(n, t, t ? t.next : e.head, e);
1929
1976
  return r.next === void 0 && (e.tail = r), r.prev === void 0 && (e.head = r), e.length++, r;
1930
1977
  }
1931
- function Pr(e, t) {
1932
- e.tail = new Ir(t, e.tail, void 0, e), e.head ||= e.tail, e.length++;
1978
+ function Br(e, t) {
1979
+ e.tail = new Hr(t, e.tail, void 0, e), e.head ||= e.tail, e.length++;
1933
1980
  }
1934
- function Fr(e, t) {
1935
- e.head = new Ir(t, void 0, e.head, e), e.tail ||= e.head, e.length++;
1981
+ function Vr(e, t) {
1982
+ e.head = new Hr(t, void 0, e.head, e), e.tail ||= e.head, e.length++;
1936
1983
  }
1937
- var Ir = class {
1984
+ var Hr = class {
1938
1985
  list;
1939
1986
  next;
1940
1987
  prev;
@@ -1942,7 +1989,7 @@ var Ir = class {
1942
1989
  constructor(e, t, n, r) {
1943
1990
  this.list = r, this.value = e, t ? (t.next = this, this.prev = t) : this.prev = void 0, n ? (n.prev = this, this.next = n) : this.next = void 0;
1944
1991
  }
1945
- }, Lr = class {
1992
+ }, Ur = class {
1946
1993
  path;
1947
1994
  absolute;
1948
1995
  entry;
@@ -1955,7 +2002,7 @@ var Ir = class {
1955
2002
  constructor(e, t) {
1956
2003
  this.path = e || `./`, this.absolute = t;
1957
2004
  }
1958
- }, Rr = Buffer.alloc(1024), zr = Symbol(`onStat`), Br = Symbol(`ended`), X = Symbol(`queue`), Vr = Symbol(`pendingLinks`), Hr = Symbol(`current`), Ur = Symbol(`process`), Wr = Symbol(`processing`), Gr = Symbol(`processJob`), Z = Symbol(`jobs`), Kr = Symbol(`jobDone`), qr = Symbol(`addFSEntry`), Jr = Symbol(`addTarEntry`), Yr = Symbol(`stat`), Xr = Symbol(`readdir`), Zr = Symbol(`onreaddir`), Qr = Symbol(`pipe`), $r = Symbol(`entry`), ei = Symbol(`entryOpt`), ti = Symbol(`writeEntryClass`), ni = Symbol(`write`), ri = Symbol(`ondrain`), ii = class extends Ue {
2005
+ }, Wr = Buffer.alloc(1024), Gr = Symbol(`onStat`), Kr = Symbol(`ended`), Y = Symbol(`queue`), qr = Symbol(`pendingLinks`), X = Symbol(`current`), Jr = Symbol(`process`), Yr = Symbol(`processing`), Xr = Symbol(`processJob`), Z = Symbol(`jobs`), Zr = Symbol(`jobDone`), Qr = Symbol(`addFSEntry`), $r = Symbol(`addTarEntry`), ei = Symbol(`stat`), ti = Symbol(`readdir`), ni = Symbol(`onreaddir`), ri = Symbol(`pipe`), ii = Symbol(`entry`), ai = Symbol(`entryOpt`), oi = Symbol(`writeEntryClass`), si = Symbol(`write`), ci = Symbol(`ondrain`), li = class extends Ue {
1959
2006
  sync = !1;
1960
2007
  opt;
1961
2008
  cwd;
@@ -1976,120 +2023,120 @@ var Ir = class {
1976
2023
  mtime;
1977
2024
  filter;
1978
2025
  jobs;
1979
- [ti];
2026
+ [oi];
1980
2027
  onWriteEntry;
1981
- [X];
1982
- [Vr] = /* @__PURE__ */ new Map();
2028
+ [Y];
2029
+ [qr] = /* @__PURE__ */ new Map();
1983
2030
  [Z] = 0;
1984
- [Wr] = !1;
1985
- [Br] = !1;
2031
+ [Yr] = !1;
2032
+ [Kr] = !1;
1986
2033
  constructor(e = {}) {
1987
- if (super(), this.opt = e, this.file = e.file || ``, this.cwd = e.cwd || process.cwd(), this.maxReadSize = e.maxReadSize, this.preservePaths = !!e.preservePaths, this.strict = !!e.strict, this.noPax = !!e.noPax, this.prefix = z(e.prefix || ``), this.linkCache = e.linkCache || /* @__PURE__ */ new Map(), this.statCache = e.statCache || /* @__PURE__ */ new Map(), this.readdirCache = e.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = e.onWriteEntry, this[ti] = Or, typeof e.onwarn == `function` && this.on(`warn`, e.onwarn), this.portable = !!e.portable, e.gzip || e.brotli || e.zstd) {
2034
+ if (super(), this.opt = e, this.file = e.file || ``, this.cwd = e.cwd || process.cwd(), this.maxReadSize = e.maxReadSize, this.preservePaths = !!e.preservePaths, this.strict = !!e.strict, this.noPax = !!e.noPax, this.prefix = L(e.prefix || ``), this.linkCache = e.linkCache || /* @__PURE__ */ new Map(), this.statCache = e.statCache || /* @__PURE__ */ new Map(), this.readdirCache = e.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = e.onWriteEntry, this[oi] = Pr, typeof e.onwarn == `function` && this.on(`warn`, e.onwarn), this.portable = !!e.portable, e.gzip || e.brotli || e.zstd) {
1988
2035
  if (+!!e.gzip + +!!e.brotli + +!!e.zstd > 1) throw TypeError(`gzip, brotli, zstd are mutually exclusive`);
1989
2036
  if (e.gzip && (typeof e.gzip != `object` && (e.gzip = {}), this.portable && (e.gzip.portable = !0), this.zip = new Pt(e.gzip)), e.brotli && (typeof e.brotli != `object` && (e.brotli = {}), this.zip = new Lt(e.brotli)), e.zstd && (typeof e.zstd != `object` && (e.zstd = {}), this.zip = new Bt(e.zstd)), !this.zip) throw Error(`impossible`);
1990
2037
  let t = this.zip;
1991
- t.on(`data`, (e) => super.write(e)), t.on(`end`, () => super.end()), t.on(`drain`, () => this[ri]()), this.on(`resume`, () => t.resume());
1992
- } else this.on(`drain`, this[ri]);
1993
- this.noDirRecurse = !!e.noDirRecurse, this.follow = !!e.follow, this.noMtime = !!e.noMtime, e.mtime && (this.mtime = e.mtime), this.filter = typeof e.filter == `function` ? e.filter : () => !0, this[X] = new Mr(), this[Z] = 0, this.jobs = Number(e.jobs) || 4, this[Wr] = !1, this[Br] = !1;
2038
+ t.on(`data`, (e) => super.write(e)), t.on(`end`, () => super.end()), t.on(`drain`, () => this[ci]()), this.on(`resume`, () => t.resume());
2039
+ } else this.on(`drain`, this[ci]);
2040
+ this.noDirRecurse = !!e.noDirRecurse, this.follow = !!e.follow, this.noMtime = !!e.noMtime, e.mtime && (this.mtime = e.mtime), this.filter = typeof e.filter == `function` ? e.filter : () => !0, this[Y] = new Rr(), this[Z] = 0, this.jobs = Number(e.jobs) || 4, this[Yr] = !1, this[Kr] = !1;
1994
2041
  }
1995
- [ni](e) {
2042
+ [si](e) {
1996
2043
  return super.write(e);
1997
2044
  }
1998
2045
  add(e) {
1999
2046
  return this.write(e), this;
2000
2047
  }
2001
2048
  end(e, t, n) {
2002
- return typeof e == `function` && (n = e, e = void 0), typeof t == `function` && (n = t, t = void 0), e && this.add(e), this[Br] = !0, this[Ur](), n && n(), this;
2049
+ return typeof e == `function` && (n = e, e = void 0), typeof t == `function` && (n = t, t = void 0), e && this.add(e), this[Kr] = !0, this[Jr](), n && n(), this;
2003
2050
  }
2004
2051
  write(e) {
2005
- if (this[Br]) throw Error(`write after end`);
2006
- return typeof e == `string` ? this[qr](e) : this[Jr](e), this.flowing;
2052
+ if (this[Kr]) throw Error(`write after end`);
2053
+ return typeof e == `string` ? this[Qr](e) : this[$r](e), this.flowing;
2007
2054
  }
2008
- [Jr](e) {
2009
- let t = z(path__rspack_import_8.resolve(this.cwd, e.path));
2055
+ [$r](e) {
2056
+ let t = L(path__rspack_import_8.resolve(this.cwd, e.path));
2010
2057
  if (!this.filter(e.path, e)) e.resume();
2011
2058
  else {
2012
- let n = new Lr(e.path, t);
2013
- n.entry = new Ar(e, this[ei](n)), n.entry.on(`end`, () => this[Kr](n)), this[Z] += 1, this[X].push(n);
2059
+ let n = new Ur(e.path, t);
2060
+ n.entry = new Ir(e, this[ai](n)), n.entry.on(`end`, () => this[Zr](n)), this[Z] += 1, this[Y].push(n);
2014
2061
  }
2015
- this[Ur]();
2062
+ this[Jr]();
2016
2063
  }
2017
- [qr](e) {
2018
- let t = z(path__rspack_import_8.resolve(this.cwd, e));
2019
- this[X].push(new Lr(e, t)), this[Ur]();
2064
+ [Qr](e) {
2065
+ let t = L(path__rspack_import_8.resolve(this.cwd, e));
2066
+ this[Y].push(new Ur(e, t)), this[Jr]();
2020
2067
  }
2021
- [Yr](e) {
2068
+ [ei](e) {
2022
2069
  e.pending = !0, this[Z] += 1, fs__rspack_import_5[this.follow ? `stat` : `lstat`](e.absolute, (t, n) => {
2023
- e.pending = !1, --this[Z], t ? this.emit(`error`, t) : this[zr](e, n);
2070
+ e.pending = !1, --this[Z], t ? this.emit(`error`, t) : this[Gr](e, n);
2024
2071
  });
2025
2072
  }
2026
- [zr](e, t) {
2073
+ [Gr](e, t) {
2027
2074
  if (this.statCache.set(e.absolute, t), e.stat = t, !this.filter(e.path, t)) e.ignore = !0;
2028
- else if (t.isFile() && t.nlink > 1 && !this.linkCache.get(`${t.dev}:${t.ino}`) && !this.sync) if (e === this[Hr]) this[Gr](e);
2075
+ else if (t.isFile() && t.nlink > 1 && !this.linkCache.get(`${t.dev}:${t.ino}`) && !this.sync) if (e === this[X]) this[Xr](e);
2029
2076
  else {
2030
- let n = `${t.dev}:${t.ino}`, r = this[Vr].get(n);
2031
- r ? r.push(e) : this[Vr].set(n, [e]), e.pendingLink = !0, e.pending = !0;
2077
+ let n = `${t.dev}:${t.ino}`, r = this[qr].get(n);
2078
+ r ? r.push(e) : this[qr].set(n, [e]), e.pendingLink = !0, e.pending = !0;
2032
2079
  }
2033
- this[Ur]();
2080
+ this[Jr]();
2034
2081
  }
2035
- [Xr](e) {
2082
+ [ti](e) {
2036
2083
  e.pending = !0, this[Z] += 1, fs__rspack_import_5.readdir(e.absolute, (t, n) => {
2037
2084
  if (e.pending = !1, --this[Z], t) return this.emit(`error`, t);
2038
- this[Zr](e, n);
2085
+ this[ni](e, n);
2039
2086
  });
2040
2087
  }
2041
- [Zr](e, t) {
2042
- this.readdirCache.set(e.absolute, t), e.readdir = t, this[Ur]();
2088
+ [ni](e, t) {
2089
+ this.readdirCache.set(e.absolute, t), e.readdir = t, this[Jr]();
2043
2090
  }
2044
- [Ur]() {
2045
- if (!this[Wr]) {
2046
- this[Wr] = !0;
2047
- for (let e = this[X].head; e && this[Z] < this.jobs; e = e.next) if (this[Gr](e.value), e.value.ignore) {
2091
+ [Jr]() {
2092
+ if (!this[Yr]) {
2093
+ this[Yr] = !0;
2094
+ for (let e = this[Y].head; e && this[Z] < this.jobs; e = e.next) if (this[Xr](e.value), e.value.ignore) {
2048
2095
  let t = e.next;
2049
- this[X].removeNode(e), e.next = t;
2096
+ this[Y].removeNode(e), e.next = t;
2050
2097
  }
2051
- this[Wr] = !1, this[Br] && this[X].length === 0 && this[Z] === 0 && (this.zip ? this.zip.end(Rr) : (super.write(Rr), super.end()));
2098
+ this[Yr] = !1, this[Kr] && this[Y].length === 0 && this[Z] === 0 && (this.zip ? this.zip.end(Wr) : (super.write(Wr), super.end()));
2052
2099
  }
2053
2100
  }
2054
- get [Hr]() {
2055
- return this[X] && this[X].head && this[X].head.value;
2101
+ get [X]() {
2102
+ return this[Y] && this[Y].head && this[Y].head.value;
2056
2103
  }
2057
- [Kr](e) {
2058
- this[X].shift(), --this[Z];
2104
+ [Zr](e) {
2105
+ this[Y].shift(), --this[Z];
2059
2106
  let { stat: t } = e;
2060
2107
  if (t && t.isFile() && t.nlink > 1) {
2061
- let e = `${t.dev}:${t.ino}`, n = this[Vr].get(e);
2108
+ let e = `${t.dev}:${t.ino}`, n = this[qr].get(e);
2062
2109
  if (n) {
2063
- this[Vr].delete(e);
2064
- for (let e of n) e.pending = !1, this[Gr](e);
2110
+ this[qr].delete(e);
2111
+ for (let e of n) e.pending = !1, this[Xr](e);
2065
2112
  }
2066
2113
  }
2067
- this[Ur]();
2114
+ this[Jr]();
2068
2115
  }
2069
- [Gr](e) {
2070
- if (e.pending && e.pendingLink && e === this[Hr] && (e.pending = !1, e.pendingLink = !1), !e.pending) {
2116
+ [Xr](e) {
2117
+ if (e.pending && e.pendingLink && e === this[X] && (e.pending = !1, e.pendingLink = !1), !e.pending) {
2071
2118
  if (e.entry) {
2072
- e === this[Hr] && !e.piped && this[Qr](e);
2119
+ e === this[X] && !e.piped && this[ri](e);
2073
2120
  return;
2074
2121
  }
2075
2122
  if (!e.stat) {
2076
2123
  let t = this.statCache.get(e.absolute);
2077
- t ? this[zr](e, t) : this[Yr](e);
2124
+ t ? this[Gr](e, t) : this[ei](e);
2078
2125
  }
2079
2126
  if (e.stat && !e.ignore) {
2080
2127
  if (!this.noDirRecurse && e.stat.isDirectory() && !e.readdir) {
2081
2128
  let t = this.readdirCache.get(e.absolute);
2082
- if (t ? this[Zr](e, t) : this[Xr](e), !e.readdir) return;
2129
+ if (t ? this[ni](e, t) : this[ti](e), !e.readdir) return;
2083
2130
  }
2084
- if (e.entry = this[$r](e), !e.entry) {
2131
+ if (e.entry = this[ii](e), !e.entry) {
2085
2132
  e.ignore = !0;
2086
2133
  return;
2087
2134
  }
2088
- e === this[Hr] && !e.piped && this[Qr](e);
2135
+ e === this[X] && !e.piped && this[ri](e);
2089
2136
  }
2090
2137
  }
2091
2138
  }
2092
- [ei](e) {
2139
+ [ai](e) {
2093
2140
  return {
2094
2141
  onwarn: (e, t, n) => this.warn(e, t, n),
2095
2142
  noPax: this.noPax,
@@ -2107,21 +2154,21 @@ var Ir = class {
2107
2154
  onWriteEntry: this.onWriteEntry
2108
2155
  };
2109
2156
  }
2110
- [$r](e) {
2157
+ [ii](e) {
2111
2158
  this[Z] += 1;
2112
2159
  try {
2113
- return new this[ti](e.path, this[ei](e)).on(`end`, () => this[Kr](e)).on(`error`, (e) => this.emit(`error`, e));
2160
+ return new this[oi](e.path, this[ai](e)).on(`end`, () => this[Zr](e)).on(`error`, (e) => this.emit(`error`, e));
2114
2161
  } catch (e) {
2115
2162
  this.emit(`error`, e);
2116
2163
  }
2117
2164
  }
2118
- [ri]() {
2119
- this[Hr] && this[Hr].entry && this[Hr].entry.resume();
2165
+ [ci]() {
2166
+ this[X] && this[X].entry && this[X].entry.resume();
2120
2167
  }
2121
- [Qr](e) {
2168
+ [ri](e) {
2122
2169
  e.piped = !0, e.readdir && e.readdir.forEach((t) => {
2123
2170
  let n = e.path, r = n === `./` ? `` : n.replace(/\/*$/, `/`);
2124
- this[qr](r + t);
2171
+ this[Qr](r + t);
2125
2172
  });
2126
2173
  let t = e.entry, n = this.zip;
2127
2174
  if (!t) throw Error(`cannot pipe without source`);
@@ -2135,55 +2182,55 @@ var Ir = class {
2135
2182
  return this.zip && this.zip.pause(), super.pause();
2136
2183
  }
2137
2184
  warn(e, t, n = {}) {
2138
- xn(this, e, t, n);
2185
+ wn(this, e, t, n);
2139
2186
  }
2140
- }, ai = class extends ii {
2187
+ }, ui = class extends li {
2141
2188
  sync = !0;
2142
2189
  constructor(e) {
2143
- super(e), this[ti] = kr;
2190
+ super(e), this[oi] = Fr;
2144
2191
  }
2145
2192
  pause() {}
2146
2193
  resume() {}
2147
- [Yr](e) {
2194
+ [ei](e) {
2148
2195
  let t = this.follow ? `statSync` : `lstatSync`;
2149
- this[zr](e, fs__rspack_import_5[t](e.absolute));
2196
+ this[Gr](e, fs__rspack_import_5[t](e.absolute));
2150
2197
  }
2151
- [Xr](e) {
2152
- this[Zr](e, fs__rspack_import_5.readdirSync(e.absolute));
2198
+ [ti](e) {
2199
+ this[ni](e, fs__rspack_import_5.readdirSync(e.absolute));
2153
2200
  }
2154
- [Qr](e) {
2201
+ [ri](e) {
2155
2202
  let t = e.entry, n = this.zip;
2156
2203
  if (e.readdir && e.readdir.forEach((t) => {
2157
2204
  let n = e.path, r = n === `./` ? `` : n.replace(/\/*$/, `/`);
2158
- this[qr](r + t);
2205
+ this[Qr](r + t);
2159
2206
  }), !t) throw Error(`Cannot pipe without source`);
2160
2207
  n ? t.on(`data`, (e) => {
2161
2208
  n.write(e);
2162
2209
  }) : t.on(`data`, (e) => {
2163
- super[ni](e);
2210
+ super[si](e);
2164
2211
  });
2165
2212
  }
2166
- }, oi = (e, t) => {
2167
- let n = new ai(e), r = new mt(e.file, { mode: e.mode || 438 });
2168
- n.pipe(r), ci(n, t);
2169
- }, si = (e, t) => {
2170
- let n = new ii(e), r = new pt(e.file, { mode: e.mode || 438 });
2213
+ }, di = (e, t) => {
2214
+ let n = new ui(e), r = new mt(e.file, { mode: e.mode || 438 });
2215
+ n.pipe(r), pi(n, t);
2216
+ }, fi = (e, t) => {
2217
+ let n = new li(e), r = new pt(e.file, { mode: e.mode || 438 });
2171
2218
  n.pipe(r);
2172
2219
  let i = new Promise((e, t) => {
2173
2220
  r.on(`error`, t), r.on(`close`, e), n.on(`error`, t);
2174
2221
  });
2175
- return li(n, t).catch((e) => n.emit(`error`, e)), i;
2176
- }, ci = (e, t) => {
2222
+ return mi(n, t).catch((e) => n.emit(`error`, e)), i;
2223
+ }, pi = (e, t) => {
2177
2224
  t.forEach((t) => {
2178
- t.charAt(0) === `@` ? Qn({
2225
+ t.charAt(0) === `@` ? ar({
2179
2226
  file: node_path__rspack_import_3.resolve(e.cwd, t.slice(1)),
2180
2227
  sync: !0,
2181
2228
  noResume: !0,
2182
2229
  onReadEntry: (t) => e.add(t)
2183
2230
  }) : e.add(t);
2184
2231
  }), e.end();
2185
- }, li = async (e, t) => {
2186
- for (let n of t) n.charAt(0) === `@` ? await Qn({
2232
+ }, mi = async (e, t) => {
2233
+ for (let n of t) n.charAt(0) === `@` ? await ar({
2187
2234
  file: node_path__rspack_import_3.resolve(String(e.cwd), n.slice(1)),
2188
2235
  noResume: !0,
2189
2236
  onReadEntry: (t) => {
@@ -2191,59 +2238,59 @@ var Ir = class {
2191
2238
  }
2192
2239
  }) : e.add(n);
2193
2240
  e.end();
2194
- }, ui = Ct(oi, si, (e, t) => {
2195
- let n = new ai(e);
2196
- return ci(n, t), n;
2241
+ }, hi = Ct(di, fi, (e, t) => {
2242
+ let n = new ui(e);
2243
+ return pi(n, t), n;
2197
2244
  }, (e, t) => {
2198
- let n = new ii(e);
2199
- return li(n, t).catch((e) => n.emit(`error`, e)), n;
2245
+ let n = new li(e);
2246
+ return mi(n, t).catch((e) => n.emit(`error`, e)), n;
2200
2247
  }, (e, t) => {
2201
2248
  if (!t?.length) throw TypeError(`no paths specified to add to archive`);
2202
- }), di = (process.env.__FAKE_PLATFORM__ || process.platform) === `win32`, { O_CREAT: fi, O_NOFOLLOW: pi, O_TRUNC: mi, O_WRONLY: hi } = fs__rspack_import_5.constants, gi = Number(process.env.__FAKE_FS_O_FILENAME__) || fs__rspack_import_5.constants.UV_FS_O_FILEMAP || 0, _i = di && !!gi, vi = 512 * 1024, yi = gi | mi | fi | hi, bi = !di && typeof pi == `number` ? pi | mi | fi | hi : null, xi = bi === null ? _i ? (e) => e < vi ? yi : `w` : () => `w` : () => bi, Si = (e, n, r) => {
2249
+ }), gi = (process.env.__FAKE_PLATFORM__ || process.platform) === `win32`, { O_CREAT: _i, O_NOFOLLOW: vi, O_TRUNC: yi, O_WRONLY: bi } = fs__rspack_import_5.constants, xi = Number(process.env.__FAKE_FS_O_FILENAME__) || fs__rspack_import_5.constants.UV_FS_O_FILEMAP || 0, Si = gi && !!xi, Ci = 512 * 1024, wi = xi | yi | _i | bi, Ti = !gi && typeof vi == `number` ? vi | yi | _i | bi : null, Ei = Ti === null ? Si ? (e) => e < Ci ? wi : `w` : () => `w` : () => Ti, Di = (e, n, r) => {
2203
2250
  try {
2204
2251
  return node_fs__rspack_import_0.lchownSync(e, n, r);
2205
2252
  } catch (e) {
2206
2253
  if (e?.code !== `ENOENT`) throw e;
2207
2254
  }
2208
- }, Ci = (e, n, r, i) => {
2255
+ }, Oi = (e, n, r, i) => {
2209
2256
  node_fs__rspack_import_0.lchown(e, n, r, (e) => {
2210
2257
  i(e && e?.code !== `ENOENT` ? e : null);
2211
2258
  });
2212
- }, wi = (e, t, n, r, a) => {
2213
- t.isDirectory() ? Ti(node_path__rspack_import_3.resolve(e, t.name), n, r, (o) => {
2259
+ }, ki = (e, t, n, r, a) => {
2260
+ t.isDirectory() ? Ai(node_path__rspack_import_3.resolve(e, t.name), n, r, (o) => {
2214
2261
  if (o) return a(o);
2215
- Ci(node_path__rspack_import_3.resolve(e, t.name), n, r, a);
2216
- }) : Ci(node_path__rspack_import_3.resolve(e, t.name), n, r, a);
2217
- }, Ti = (e, n, r, i) => {
2262
+ Oi(node_path__rspack_import_3.resolve(e, t.name), n, r, a);
2263
+ }) : Oi(node_path__rspack_import_3.resolve(e, t.name), n, r, a);
2264
+ }, Ai = (e, n, r, i) => {
2218
2265
  node_fs__rspack_import_0.readdir(e, { withFileTypes: !0 }, (t, a) => {
2219
2266
  if (t) {
2220
2267
  if (t.code === `ENOENT`) return i();
2221
2268
  if (t.code !== `ENOTDIR` && t.code !== `ENOTSUP`) return i(t);
2222
2269
  }
2223
- if (t || !a.length) return Ci(e, n, r, i);
2270
+ if (t || !a.length) return Oi(e, n, r, i);
2224
2271
  let o = a.length, s = null, c = (t) => {
2225
2272
  if (!s) {
2226
2273
  if (t) return i(s = t);
2227
- if (--o === 0) return Ci(e, n, r, i);
2274
+ if (--o === 0) return Oi(e, n, r, i);
2228
2275
  }
2229
2276
  };
2230
- for (let t of a) wi(e, t, n, r, c);
2277
+ for (let t of a) ki(e, t, n, r, c);
2231
2278
  });
2232
- }, Ei = (e, t, n, r) => {
2233
- t.isDirectory() && Di(node_path__rspack_import_3.resolve(e, t.name), n, r), Si(node_path__rspack_import_3.resolve(e, t.name), n, r);
2234
- }, Di = (e, n, r) => {
2279
+ }, ji = (e, t, n, r) => {
2280
+ t.isDirectory() && Mi(node_path__rspack_import_3.resolve(e, t.name), n, r), Di(node_path__rspack_import_3.resolve(e, t.name), n, r);
2281
+ }, Mi = (e, n, r) => {
2235
2282
  let i;
2236
2283
  try {
2237
2284
  i = node_fs__rspack_import_0.readdirSync(e, { withFileTypes: !0 });
2238
2285
  } catch (t) {
2239
2286
  let i = t;
2240
2287
  if (i?.code === `ENOENT`) return;
2241
- if (i?.code === `ENOTDIR` || i?.code === `ENOTSUP`) return Si(e, n, r);
2288
+ if (i?.code === `ENOTDIR` || i?.code === `ENOTSUP`) return Di(e, n, r);
2242
2289
  throw i;
2243
2290
  }
2244
- for (let t of i) Ei(e, t, n, r);
2245
- return Si(e, n, r);
2246
- }, Oi = class extends Error {
2291
+ for (let t of i) ji(e, t, n, r);
2292
+ return Di(e, n, r);
2293
+ }, Ni = class extends Error {
2247
2294
  path;
2248
2295
  code;
2249
2296
  syscall = `chdir`;
@@ -2253,7 +2300,7 @@ var Ir = class {
2253
2300
  get name() {
2254
2301
  return `CwdError`;
2255
2302
  }
2256
- }, ki = class extends Error {
2303
+ }, Pi = class extends Error {
2257
2304
  path;
2258
2305
  symlink;
2259
2306
  syscall = `symlink`;
@@ -2264,60 +2311,60 @@ var Ir = class {
2264
2311
  get name() {
2265
2312
  return `SymlinkError`;
2266
2313
  }
2267
- }, Ai = (e, n) => {
2314
+ }, Fi = (e, n) => {
2268
2315
  node_fs__rspack_import_0.stat(e, (t, r) => {
2269
- (t || !r.isDirectory()) && (t = new Oi(e, t?.code || `ENOTDIR`)), n(t);
2316
+ (t || !r.isDirectory()) && (t = new Ni(e, t?.code || `ENOTDIR`)), n(t);
2270
2317
  });
2271
- }, ji = (e, r, a) => {
2272
- e = z(e);
2273
- let o = r.umask ?? 18, s = r.mode | 448, c = (s & o) !== 0, l = r.uid, u = r.gid, d = typeof l == `number` && typeof u == `number` && (l !== r.processUid || u !== r.processGid), f = r.preserve, ee = r.unlink, p = z(r.cwd), m = (n, r) => {
2274
- n ? a(n) : r && d ? Ti(r, l, u, (e) => m(e)) : c ? node_fs__rspack_import_0.chmod(e, s, a) : a();
2318
+ }, Ii = (e, r, a) => {
2319
+ e = L(e);
2320
+ let o = r.umask ?? 18, s = r.mode | 448, c = (s & o) !== 0, l = r.uid, u = r.gid, d = typeof l == `number` && typeof u == `number` && (l !== r.processUid || u !== r.processGid), f = r.preserve, ee = r.unlink, p = L(r.cwd), m = (n, r) => {
2321
+ n ? a(n) : r && d ? Ai(r, l, u, (e) => m(e)) : c ? node_fs__rspack_import_0.chmod(e, s, a) : a();
2275
2322
  };
2276
- if (e === p) return Ai(e, m);
2323
+ if (e === p) return Fi(e, m);
2277
2324
  if (f) return node_fs_promises__rspack_import_1.mkdir(e, {
2278
2325
  mode: s,
2279
2326
  recursive: !0
2280
2327
  }).then((e) => m(null, e ?? void 0), m);
2281
- Mi(p, z(node_path__rspack_import_3.relative(p, e)).split(`/`), s, ee, p, void 0, m);
2282
- }, Mi = (e, n, r, a, o, s, c) => {
2328
+ Li(p, L(node_path__rspack_import_3.relative(p, e)).split(`/`), s, ee, p, void 0, m);
2329
+ }, Li = (e, n, r, a, o, s, c) => {
2283
2330
  if (n.length === 0) return c(null, s);
2284
- let l = n.shift(), u = z(node_path__rspack_import_3.resolve(e + `/` + l));
2285
- node_fs__rspack_import_0.mkdir(u, r, Ni(u, n, r, a, o, s, c));
2286
- }, Ni = (e, n, r, i, a, o, s) => (c) => {
2331
+ let l = n.shift(), u = L(node_path__rspack_import_3.resolve(e + `/` + l));
2332
+ node_fs__rspack_import_0.mkdir(u, r, Ri(u, n, r, a, o, s, c));
2333
+ }, Ri = (e, n, r, i, a, o, s) => (c) => {
2287
2334
  c ? node_fs__rspack_import_0.lstat(e, (l, u) => {
2288
- if (l) l.path = l.path && z(l.path), s(l);
2289
- else if (u.isDirectory()) Mi(e, n, r, i, a, o, s);
2335
+ if (l) l.path = l.path && L(l.path), s(l);
2336
+ else if (u.isDirectory()) Li(e, n, r, i, a, o, s);
2290
2337
  else if (i) node_fs__rspack_import_0.unlink(e, (c) => {
2291
2338
  if (c) return s(c);
2292
- node_fs__rspack_import_0.mkdir(e, r, Ni(e, n, r, i, a, o, s));
2339
+ node_fs__rspack_import_0.mkdir(e, r, Ri(e, n, r, i, a, o, s));
2293
2340
  });
2294
2341
  else {
2295
- if (u.isSymbolicLink()) return s(new ki(e, e + `/` + n.join(`/`)));
2342
+ if (u.isSymbolicLink()) return s(new Pi(e, e + `/` + n.join(`/`)));
2296
2343
  s(c);
2297
2344
  }
2298
- }) : (o ||= e, Mi(e, n, r, i, a, o, s));
2299
- }, Pi = (e) => {
2345
+ }) : (o ||= e, Li(e, n, r, i, a, o, s));
2346
+ }, zi = (e) => {
2300
2347
  let n = !1, r;
2301
2348
  try {
2302
2349
  n = node_fs__rspack_import_0.statSync(e).isDirectory();
2303
2350
  } catch (e) {
2304
2351
  r = e?.code;
2305
2352
  } finally {
2306
- if (!n) throw new Oi(e, r ?? `ENOTDIR`);
2353
+ if (!n) throw new Ni(e, r ?? `ENOTDIR`);
2307
2354
  }
2308
- }, Fi = (e, n) => {
2309
- e = z(e);
2310
- let r = n.umask ?? 18, a = n.mode | 448, o = (a & r) !== 0, s = n.uid, c = n.gid, l = typeof s == `number` && typeof c == `number` && (s !== n.processUid || c !== n.processGid), u = n.preserve, d = n.unlink, f = z(n.cwd), ee = (n) => {
2311
- n && l && Di(n, s, c), o && node_fs__rspack_import_0.chmodSync(e, a);
2355
+ }, Bi = (e, n) => {
2356
+ e = L(e);
2357
+ let r = n.umask ?? 18, a = n.mode | 448, o = (a & r) !== 0, s = n.uid, c = n.gid, l = typeof s == `number` && typeof c == `number` && (s !== n.processUid || c !== n.processGid), u = n.preserve, d = n.unlink, f = L(n.cwd), ee = (n) => {
2358
+ n && l && Mi(n, s, c), o && node_fs__rspack_import_0.chmodSync(e, a);
2312
2359
  };
2313
- if (e === f) return Pi(f), ee();
2360
+ if (e === f) return zi(f), ee();
2314
2361
  if (u) return ee(node_fs__rspack_import_0.mkdirSync(e, {
2315
2362
  mode: a,
2316
2363
  recursive: !0
2317
2364
  }) ?? void 0);
2318
- let p = z(node_path__rspack_import_3.relative(f, e)).split(`/`), m;
2365
+ let p = L(node_path__rspack_import_3.relative(f, e)).split(`/`), m;
2319
2366
  for (let e = p.shift(), n = f; e && (n += `/` + e); e = p.shift()) {
2320
- n = z(node_path__rspack_import_3.resolve(n));
2367
+ n = L(node_path__rspack_import_3.resolve(n));
2321
2368
  try {
2322
2369
  node_fs__rspack_import_0.mkdirSync(n, a), m ||= n;
2323
2370
  } catch {
@@ -2326,27 +2373,27 @@ var Ir = class {
2326
2373
  if (d) {
2327
2374
  node_fs__rspack_import_0.unlinkSync(n), node_fs__rspack_import_0.mkdirSync(n, a), m ||= n;
2328
2375
  continue;
2329
- } else if (e.isSymbolicLink()) return new ki(n, n + `/` + p.join(`/`));
2376
+ } else if (e.isSymbolicLink()) return new Pi(n, n + `/` + p.join(`/`));
2330
2377
  }
2331
2378
  }
2332
2379
  return ee(m);
2333
- }, Ii = Object.create(null), Li = 1e4, Ri = /* @__PURE__ */ new Set(), zi = (e) => {
2334
- Ri.has(e) ? Ri.delete(e) : Ii[e] = e.normalize(`NFD`).toLocaleLowerCase(`en`).toLocaleUpperCase(`en`), Ri.add(e);
2335
- let t = Ii[e], n = Ri.size - Li;
2336
- if (n > Li / 10) {
2337
- for (let e of Ri) if (Ri.delete(e), delete Ii[e], --n <= 0) break;
2380
+ }, Vi = Object.create(null), Hi = 1e4, Ui = /* @__PURE__ */ new Set(), Wi = (e) => {
2381
+ Ui.has(e) ? Ui.delete(e) : Vi[e] = e.normalize(`NFD`).toLocaleLowerCase(`en`).toLocaleUpperCase(`en`), Ui.add(e);
2382
+ let t = Vi[e], n = Ui.size - Hi;
2383
+ if (n > Hi / 10) {
2384
+ for (let e of Ui) if (Ui.delete(e), delete Vi[e], --n <= 0) break;
2338
2385
  }
2339
2386
  return t;
2340
- }, Bi = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32`, Vi = (e) => e.split(`/`).slice(0, -1).reduce((e, t) => {
2387
+ }, Gi = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32`, Ki = (e) => e.split(`/`).slice(0, -1).reduce((e, t) => {
2341
2388
  let n = e.at(-1);
2342
2389
  return n !== void 0 && (t = (0,node_path__rspack_import_3.join)(n, t)), e.push(t || `/`), e;
2343
- }, []), Hi = class {
2390
+ }, []), qi = class {
2344
2391
  #t = /* @__PURE__ */ new Map();
2345
2392
  #i = /* @__PURE__ */ new Map();
2346
2393
  #s = /* @__PURE__ */ new Set();
2347
2394
  reserve(e, t) {
2348
- e = Bi ? [`win32 parallelization disabled`] : e.map((e) => Yn((0,node_path__rspack_import_3.join)(zi(e))));
2349
- let n = new Set(e.map((e) => Vi(e)).reduce((e, t) => e.concat(t)));
2395
+ e = Gi ? [`win32 parallelization disabled`] : e.map((e) => nr((0,node_path__rspack_import_3.join)(Wi(e))));
2396
+ let n = new Set(e.map((e) => Ki(e)).reduce((e, t) => e.concat(t)));
2350
2397
  this.#i.set(t, {
2351
2398
  dirs: n,
2352
2399
  paths: e
@@ -2357,10 +2404,10 @@ var Ir = class {
2357
2404
  }
2358
2405
  for (let e of n) {
2359
2406
  let n = this.#t.get(e);
2360
- if (!n) this.#t.set(e, [new Set([t])]);
2407
+ if (!n) this.#t.set(e, [/* @__PURE__ */ new Set([t])]);
2361
2408
  else {
2362
2409
  let e = n.at(-1);
2363
- e instanceof Set ? e.add(t) : n.push(new Set([t]));
2410
+ e instanceof Set ? e.add(t) : n.push(/* @__PURE__ */ new Set([t]));
2364
2411
  }
2365
2412
  }
2366
2413
  return this.#r(t);
@@ -2409,22 +2456,22 @@ var Ir = class {
2409
2456
  }
2410
2457
  return this.#s.delete(e), i.forEach((e) => this.#r(e)), !0;
2411
2458
  }
2412
- }, Ui = () => process.umask(), Wi = Symbol(`onEntry`), Gi = Symbol(`checkFs`), Ki = Symbol(`checkFs2`), qi = Symbol(`isReusable`), Q = Symbol(`makeFs`), Ji = Symbol(`file`), Yi = Symbol(`directory`), Xi = Symbol(`link`), Zi = Symbol(`symlink`), Qi = Symbol(`hardlink`), $i = Symbol(`ensureNoSymlink`), ea = Symbol(`unsupported`), ta = Symbol(`checkPath`), na = Symbol(`stripAbsolutePath`), ra = Symbol(`mkdir`), $ = Symbol(`onError`), ia = Symbol(`pending`), aa = Symbol(`pend`), oa = Symbol(`unpend`), sa = Symbol(`ended`), ca = Symbol(`maybeClose`), la = Symbol(`skip`), ua = Symbol(`doChown`), da = Symbol(`uid`), fa = Symbol(`gid`), pa = Symbol(`checkedCwd`), ma = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32`, ha = 1024, ga = (e, n) => {
2413
- if (!ma) return node_fs__rspack_import_0.unlink(e, n);
2459
+ }, Ji = () => process.umask(), Yi = Symbol(`onEntry`), Xi = Symbol(`checkFs`), Zi = Symbol(`checkFs2`), Qi = Symbol(`isReusable`), Q = Symbol(`makeFs`), $i = Symbol(`file`), ea = Symbol(`directory`), ta = Symbol(`link`), na = Symbol(`symlink`), ra = Symbol(`hardlink`), ia = Symbol(`ensureNoSymlink`), aa = Symbol(`unsupported`), oa = Symbol(`checkPath`), sa = Symbol(`stripAbsolutePath`), ca = Symbol(`mkdir`), $ = Symbol(`onError`), la = Symbol(`pending`), ua = Symbol(`pend`), da = Symbol(`unpend`), fa = Symbol(`ended`), pa = Symbol(`maybeClose`), ma = Symbol(`skip`), ha = Symbol(`doChown`), ga = Symbol(`uid`), _a = Symbol(`gid`), va = Symbol(`checkedCwd`), ya = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32`, ba = 1024, xa = (e, n) => {
2460
+ if (!ya) return node_fs__rspack_import_0.unlink(e, n);
2414
2461
  let r = e + `.DELETE.` + (0,node_crypto__rspack_import_13.randomBytes)(16).toString(`hex`);
2415
2462
  node_fs__rspack_import_0.rename(e, r, (e) => {
2416
2463
  if (e) return n(e);
2417
2464
  node_fs__rspack_import_0.unlink(r, n);
2418
2465
  });
2419
- }, _a = (e) => {
2420
- if (!ma) return node_fs__rspack_import_0.unlinkSync(e);
2466
+ }, Sa = (e) => {
2467
+ if (!ya) return node_fs__rspack_import_0.unlinkSync(e);
2421
2468
  let n = e + `.DELETE.` + (0,node_crypto__rspack_import_13.randomBytes)(16).toString(`hex`);
2422
2469
  node_fs__rspack_import_0.renameSync(e, n), node_fs__rspack_import_0.unlinkSync(n);
2423
- }, va = (e, t, n) => e !== void 0 && e === e >>> 0 ? e : t !== void 0 && t === t >>> 0 ? t : n, ya = class extends Jn {
2424
- [sa] = !1;
2425
- [pa] = !1;
2426
- [ia] = 0;
2427
- reservations = new Hi();
2470
+ }, Ca = (e, t, n) => e !== void 0 && e === e >>> 0 ? e : t !== void 0 && t === t >>> 0 ? t : n, wa = class extends tr {
2471
+ [fa] = !1;
2472
+ [va] = !1;
2473
+ [la] = 0;
2474
+ reservations = new qi();
2428
2475
  transform;
2429
2476
  writable = !0;
2430
2477
  readable = !1;
@@ -2451,25 +2498,25 @@ var Ir = class {
2451
2498
  chmod;
2452
2499
  constructor(e = {}) {
2453
2500
  if (e.ondone = () => {
2454
- this[sa] = !0, this[ca]();
2501
+ this[fa] = !0, this[pa]();
2455
2502
  }, super(e), this.transform = e.transform, this.chmod = !!e.chmod, typeof e.uid == `number` || typeof e.gid == `number`) {
2456
2503
  if (typeof e.uid != `number` || typeof e.gid != `number`) throw TypeError(`cannot set owner without number uid and gid`);
2457
2504
  if (e.preserveOwner) throw TypeError(`cannot preserve owner in archive and also set owner explicitly`);
2458
2505
  this.uid = e.uid, this.gid = e.gid, this.setOwner = !0;
2459
2506
  } else this.uid = void 0, this.gid = void 0, this.setOwner = !1;
2460
- this.preserveOwner = e.preserveOwner === void 0 && typeof e.uid != `number` ? !!(process.getuid && process.getuid() === 0) : !!e.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 e.maxDepth == `number` ? e.maxDepth : ha, this.forceChown = e.forceChown === !0, this.win32 = !!e.win32 || ma, this.newer = !!e.newer, this.keep = !!e.keep, this.noMtime = !!e.noMtime, this.preservePaths = !!e.preservePaths, this.unlink = !!e.unlink, this.cwd = z(node_path__rspack_import_3.resolve(e.cwd || process.cwd())), this.strip = Number(e.strip) || 0, this.processUmask = this.chmod ? typeof e.processUmask == `number` ? e.processUmask : Ui() : 0, this.umask = typeof e.umask == `number` ? e.umask : this.processUmask, this.dmode = e.dmode || 511 & ~this.umask, this.fmode = e.fmode || 438 & ~this.umask, this.on(`entry`, (e) => this[Wi](e));
2507
+ this.preserveOwner = e.preserveOwner === void 0 && typeof e.uid != `number` ? process.getuid?.() === 0 : !!e.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 e.maxDepth == `number` ? e.maxDepth : ba, this.forceChown = e.forceChown === !0, this.win32 = !!e.win32 || ya, this.newer = !!e.newer, this.keep = !!e.keep, this.noMtime = !!e.noMtime, this.preservePaths = !!e.preservePaths, this.unlink = !!e.unlink, this.cwd = L(node_path__rspack_import_3.resolve(e.cwd || process.cwd())), this.strip = Number(e.strip) || 0, this.processUmask = this.chmod ? typeof e.processUmask == `number` ? e.processUmask : Ji() : 0, this.umask = typeof e.umask == `number` ? e.umask : this.processUmask, this.dmode = e.dmode || 511 & ~this.umask, this.fmode = e.fmode || 438 & ~this.umask, this.on(`entry`, (e) => this[Yi](e));
2461
2508
  }
2462
2509
  warn(e, t, n = {}) {
2463
2510
  return (e === `TAR_BAD_ARCHIVE` || e === `TAR_ABORT`) && (n.recoverable = !1), super.warn(e, t, n);
2464
2511
  }
2465
- [ca]() {
2466
- this[sa] && this[ia] === 0 && (this.emit(`prefinish`), this.emit(`finish`), this.emit(`end`));
2512
+ [pa]() {
2513
+ this[fa] && this[la] === 0 && (this.emit(`prefinish`), this.emit(`finish`), this.emit(`end`));
2467
2514
  }
2468
- [na](e, t) {
2515
+ [sa](e, t) {
2469
2516
  let n = e[t], { type: r } = e;
2470
2517
  if (!n || this.preservePaths) return !0;
2471
- let [a, o] = nr(n), s = o.replaceAll(/\\/g, `/`).split(`/`);
2472
- if (s.includes(`..`) || ma && /^[a-z]:\.\.$/i.test(s[0] ?? ``)) {
2518
+ let [a, o] = lr(n), s = o.replaceAll(/\\/g, `/`).split(`/`);
2519
+ if (s.includes(`..`) || ya && /^[a-z]:\.\.$/i.test(s[0] ?? ``)) {
2473
2520
  if (t === `path` || r === `Link`) return this.warn(`TAR_ENTRY_ERROR`, `${t} contains '..'`, {
2474
2521
  entry: e,
2475
2522
  [t]: n
@@ -2485,12 +2532,12 @@ var Ir = class {
2485
2532
  [t]: n
2486
2533
  })), !0;
2487
2534
  }
2488
- [ta](e) {
2489
- let t = z(e.path), n = t.split(`/`);
2535
+ [oa](e) {
2536
+ let t = L(e.path), n = t.split(`/`);
2490
2537
  if (this.strip) {
2491
2538
  if (n.length < this.strip) return !1;
2492
2539
  if (e.type === `Link`) {
2493
- let t = z(String(e.linkpath)).split(`/`);
2540
+ let t = L(String(e.linkpath)).split(`/`);
2494
2541
  if (t.length >= this.strip) e.linkpath = t.slice(this.strip).join(`/`);
2495
2542
  else return !1;
2496
2543
  }
@@ -2502,24 +2549,24 @@ var Ir = class {
2502
2549
  depth: n.length,
2503
2550
  maxDepth: this.maxDepth
2504
2551
  }), !1;
2505
- if (!this[na](e, `path`) || !this[na](e, `linkpath`)) return !1;
2506
- if (e.absolute = node_path__rspack_import_3.isAbsolute(e.path) ? z(node_path__rspack_import_3.resolve(e.path)) : z(node_path__rspack_import_3.resolve(this.cwd, e.path)), !this.preservePaths && typeof e.absolute == `string` && e.absolute.indexOf(this.cwd + `/`) !== 0 && e.absolute !== this.cwd) return this.warn(`TAR_ENTRY_ERROR`, `path escaped extraction target`, {
2552
+ if (!this[sa](e, `path`) || !this[sa](e, `linkpath`)) return !1;
2553
+ if (e.absolute = node_path__rspack_import_3.isAbsolute(e.path) ? L(node_path__rspack_import_3.resolve(e.path)) : L(node_path__rspack_import_3.resolve(this.cwd, e.path)), !this.preservePaths && typeof e.absolute == `string` && e.absolute.indexOf(this.cwd + `/`) !== 0 && e.absolute !== this.cwd) return this.warn(`TAR_ENTRY_ERROR`, `path escaped extraction target`, {
2507
2554
  entry: e,
2508
- path: z(e.path),
2555
+ path: L(e.path),
2509
2556
  resolvedPath: e.absolute,
2510
2557
  cwd: this.cwd
2511
2558
  }), !1;
2512
2559
  if (e.absolute === this.cwd && e.type !== `Directory` && e.type !== `GNUDumpDir`) return !1;
2513
2560
  if (this.win32) {
2514
2561
  let { root: t } = node_path__rspack_import_3.win32.parse(String(e.absolute));
2515
- e.absolute = t + sr(String(e.absolute).slice(t.length));
2562
+ e.absolute = t + mr(String(e.absolute).slice(t.length));
2516
2563
  let { root: n } = node_path__rspack_import_3.win32.parse(e.path);
2517
- e.path = n + sr(e.path.slice(n.length));
2564
+ e.path = n + mr(e.path.slice(n.length));
2518
2565
  }
2519
2566
  return !0;
2520
2567
  }
2521
- [Wi](e) {
2522
- if (!this[ta](e)) return e.resume();
2568
+ [Yi](e) {
2569
+ if (!this[oa](e)) return e.resume();
2523
2570
  switch (node_assert__rspack_import_12.equal(typeof e.absolute, `string`), e.type) {
2524
2571
  case `Directory`:
2525
2572
  case `GNUDumpDir`: e.mode && (e.mode |= 448);
@@ -2527,15 +2574,15 @@ var Ir = class {
2527
2574
  case `OldFile`:
2528
2575
  case `ContiguousFile`:
2529
2576
  case `Link`:
2530
- case `SymbolicLink`: return this[Gi](e);
2531
- default: return this[ea](e);
2577
+ case `SymbolicLink`: return this[Xi](e);
2578
+ default: return this[aa](e);
2532
2579
  }
2533
2580
  }
2534
2581
  [$](e, t) {
2535
- e.name === `CwdError` ? this.emit(`error`, e) : (this.warn(`TAR_ENTRY_ERROR`, e, { entry: t }), this[oa](), t.resume());
2582
+ e.name === `CwdError` ? this.emit(`error`, e) : (this.warn(`TAR_ENTRY_ERROR`, e, { entry: t }), this[da](), t.resume());
2536
2583
  }
2537
- [ra](e, t, n) {
2538
- ji(z(e), {
2584
+ [ca](e, t, n) {
2585
+ Ii(L(e), {
2539
2586
  uid: this.uid,
2540
2587
  gid: this.gid,
2541
2588
  processUid: this.processUid,
@@ -2547,18 +2594,18 @@ var Ir = class {
2547
2594
  mode: t
2548
2595
  }, n);
2549
2596
  }
2550
- [ua](e) {
2597
+ [ha](e) {
2551
2598
  return this.forceChown || this.preserveOwner && (typeof e.uid == `number` && e.uid !== this.processUid || typeof e.gid == `number` && e.gid !== this.processGid) || typeof this.uid == `number` && this.uid !== this.processUid || typeof this.gid == `number` && this.gid !== this.processGid;
2552
2599
  }
2553
- [da](e) {
2554
- return va(this.uid, e.uid, this.processUid);
2600
+ [ga](e) {
2601
+ return Ca(this.uid, e.uid, this.processUid);
2555
2602
  }
2556
- [fa](e) {
2557
- return va(this.gid, e.gid, this.processGid);
2603
+ [_a](e) {
2604
+ return Ca(this.gid, e.gid, this.processGid);
2558
2605
  }
2559
- [Ji](e, n) {
2606
+ [$i](e, n) {
2560
2607
  let r = typeof e.mode == `number` ? e.mode & 4095 : this.fmode, i = new pt(String(e.absolute), {
2561
- flags: xi(e.size),
2608
+ flags: Ei(e.size),
2562
2609
  mode: r,
2563
2610
  autoClose: !1
2564
2611
  });
@@ -2571,7 +2618,7 @@ var Ir = class {
2571
2618
  return;
2572
2619
  }
2573
2620
  --a === 0 && i.fd !== void 0 && node_fs__rspack_import_0.close(i.fd, (t) => {
2574
- t ? this[$](t, e) : this[oa](), n();
2621
+ t ? this[$](t, e) : this[da](), n();
2575
2622
  });
2576
2623
  };
2577
2624
  i.on(`finish`, () => {
@@ -2581,9 +2628,9 @@ var Ir = class {
2581
2628
  let i = e.atime || /* @__PURE__ */ new Date(), s = e.mtime;
2582
2629
  node_fs__rspack_import_0.futimes(r, i, s, (e) => e ? node_fs__rspack_import_0.utimes(n, i, s, (t) => o(t && e)) : o());
2583
2630
  }
2584
- if (typeof r == `number` && this[ua](e)) {
2631
+ if (typeof r == `number` && this[ha](e)) {
2585
2632
  a++;
2586
- let i = this[da](e), s = this[fa](e);
2633
+ let i = this[ga](e), s = this[_a](e);
2587
2634
  typeof i == `number` && typeof s == `number` && node_fs__rspack_import_0.fchown(r, i, s, (e) => e ? node_fs__rspack_import_0.chown(n, i, s, (t) => o(t && e)) : o());
2588
2635
  }
2589
2636
  o();
@@ -2593,76 +2640,76 @@ var Ir = class {
2593
2640
  this[$](t, e), n();
2594
2641
  }), e.pipe(s)), s.pipe(i);
2595
2642
  }
2596
- [Yi](e, n) {
2643
+ [ea](e, n) {
2597
2644
  let r = typeof e.mode == `number` ? e.mode & 4095 : this.dmode;
2598
- this[ra](String(e.absolute), r, (r) => {
2645
+ this[ca](String(e.absolute), r, (r) => {
2599
2646
  if (r) {
2600
2647
  this[$](r, e), n();
2601
2648
  return;
2602
2649
  }
2603
2650
  let i = 1, a = () => {
2604
- --i === 0 && (n(), this[oa](), e.resume());
2651
+ --i === 0 && (n(), this[da](), e.resume());
2605
2652
  };
2606
- e.mtime && !this.noMtime && (i++, node_fs__rspack_import_0.utimes(String(e.absolute), e.atime || /* @__PURE__ */ new Date(), e.mtime, a)), this[ua](e) && (i++, node_fs__rspack_import_0.chown(String(e.absolute), Number(this[da](e)), Number(this[fa](e)), a)), a();
2653
+ e.mtime && !this.noMtime && (i++, node_fs__rspack_import_0.utimes(String(e.absolute), e.atime || /* @__PURE__ */ new Date(), e.mtime, a)), this[ha](e) && (i++, node_fs__rspack_import_0.chown(String(e.absolute), Number(this[ga](e)), Number(this[_a](e)), a)), a();
2607
2654
  });
2608
2655
  }
2609
- [ea](e) {
2656
+ [aa](e) {
2610
2657
  e.unsupported = !0, this.warn(`TAR_ENTRY_UNSUPPORTED`, `unsupported entry type: ${e.type}`, { entry: e }), e.resume();
2611
2658
  }
2612
- [Zi](e, t) {
2613
- let n = z(node_path__rspack_import_3.relative(this.cwd, node_path__rspack_import_3.resolve(node_path__rspack_import_3.dirname(String(e.absolute)), String(e.linkpath)))).split(`/`);
2614
- this[$i](e, this.cwd, n, () => this[Xi](e, String(e.linkpath), `symlink`, t), (n) => {
2659
+ [na](e, t) {
2660
+ let n = L(node_path__rspack_import_3.relative(this.cwd, node_path__rspack_import_3.resolve(node_path__rspack_import_3.dirname(String(e.absolute)), String(e.linkpath)))).split(`/`);
2661
+ this[ia](e, this.cwd, n, () => this[ta](e, String(e.linkpath), `symlink`, t), (n) => {
2615
2662
  this[$](n, e), t();
2616
2663
  });
2617
2664
  }
2618
- [Qi](e, t) {
2619
- let n = z(node_path__rspack_import_3.resolve(this.cwd, String(e.linkpath))), r = z(String(e.linkpath)).split(`/`);
2620
- this[$i](e, this.cwd, r, () => this[Xi](e, n, `link`, t), (n) => {
2665
+ [ra](e, t) {
2666
+ let n = L(node_path__rspack_import_3.resolve(this.cwd, String(e.linkpath))), r = L(String(e.linkpath)).split(`/`);
2667
+ this[ia](e, this.cwd, r, () => this[ta](e, n, `link`, t), (n) => {
2621
2668
  this[$](n, e), t();
2622
2669
  });
2623
2670
  }
2624
- [$i](e, n, r, a, o) {
2671
+ [ia](e, n, r, a, o) {
2625
2672
  let s = r.shift();
2626
2673
  if (this.preservePaths || s === void 0) return a();
2627
2674
  let c = node_path__rspack_import_3.resolve(n, s);
2628
2675
  node_fs__rspack_import_0.lstat(c, (t, n) => {
2629
2676
  if (t) return a();
2630
- if (n?.isSymbolicLink()) return o(new ki(c, node_path__rspack_import_3.resolve(c, r.join(`/`))));
2631
- this[$i](e, c, r, a, o);
2677
+ if (n?.isSymbolicLink()) return o(new Pi(c, node_path__rspack_import_3.resolve(c, r.join(`/`))));
2678
+ this[ia](e, c, r, a, o);
2632
2679
  });
2633
2680
  }
2634
- [aa]() {
2635
- this[ia]++;
2681
+ [ua]() {
2682
+ this[la]++;
2636
2683
  }
2637
- [oa]() {
2638
- this[ia]--, this[ca]();
2684
+ [da]() {
2685
+ this[la]--, this[pa]();
2639
2686
  }
2640
- [la](e) {
2641
- this[oa](), e.resume();
2687
+ [ma](e) {
2688
+ this[da](), e.resume();
2642
2689
  }
2643
- [qi](e, t) {
2644
- return e.type === `File` && !this.unlink && t.isFile() && t.nlink <= 1 && !ma;
2690
+ [Qi](e, t) {
2691
+ return e.type === `File` && !this.unlink && t.isFile() && t.nlink <= 1 && !ya;
2645
2692
  }
2646
- [Gi](e) {
2647
- this[aa]();
2693
+ [Xi](e) {
2694
+ this[ua]();
2648
2695
  let t = [e.path];
2649
- e.linkpath && t.push(e.linkpath), this.reservations.reserve(t, (t) => this[Ki](e, t));
2696
+ e.linkpath && t.push(e.linkpath), this.reservations.reserve(t, (t) => this[Zi](e, t));
2650
2697
  }
2651
- [Ki](e, n) {
2698
+ [Zi](e, n) {
2652
2699
  let r = (e) => {
2653
2700
  n(e);
2654
2701
  }, a = () => {
2655
- this[ra](this.cwd, this.dmode, (t) => {
2702
+ this[ca](this.cwd, this.dmode, (t) => {
2656
2703
  if (t) {
2657
2704
  this[$](t, e), r();
2658
2705
  return;
2659
2706
  }
2660
- this[pa] = !0, o();
2707
+ this[va] = !0, o();
2661
2708
  });
2662
2709
  }, o = () => {
2663
2710
  if (e.absolute !== this.cwd) {
2664
- let t = z(node_path__rspack_import_3.dirname(String(e.absolute)));
2665
- if (t !== this.cwd) return this[ra](t, this.dmode, (t) => {
2711
+ let t = L(node_path__rspack_import_3.dirname(String(e.absolute)));
2712
+ if (t !== this.cwd) return this[ca](t, this.dmode, (t) => {
2666
2713
  if (t) {
2667
2714
  this[$](t, e), r();
2668
2715
  return;
@@ -2674,10 +2721,10 @@ var Ir = class {
2674
2721
  }, s = () => {
2675
2722
  node_fs__rspack_import_0.lstat(String(e.absolute), (n, i) => {
2676
2723
  if (i && (this.keep || this.newer && i.mtime > (e.mtime ?? i.mtime))) {
2677
- this[la](e), r();
2724
+ this[ma](e), r();
2678
2725
  return;
2679
2726
  }
2680
- if (n || this[qi](e, i)) return this[Q](null, e, r);
2727
+ if (n || this[Qi](e, i)) return this[Q](null, e, r);
2681
2728
  if (i.isDirectory()) {
2682
2729
  if (e.type === `Directory`) {
2683
2730
  let n = this.chmod && e.mode && (i.mode & 4095) !== e.mode, a = (t) => this[Q](t ?? null, e, r);
@@ -2686,10 +2733,10 @@ var Ir = class {
2686
2733
  if (e.absolute !== this.cwd) return node_fs__rspack_import_0.rmdir(String(e.absolute), (t) => this[Q](t ?? null, e, r));
2687
2734
  }
2688
2735
  if (e.absolute === this.cwd) return this[Q](null, e, r);
2689
- ga(String(e.absolute), (t) => this[Q](t ?? null, e, r));
2736
+ xa(String(e.absolute), (t) => this[Q](t ?? null, e, r));
2690
2737
  });
2691
2738
  };
2692
- this[pa] ? o() : a();
2739
+ this[va] ? o() : a();
2693
2740
  }
2694
2741
  [Q](e, t, n) {
2695
2742
  if (e) {
@@ -2699,59 +2746,59 @@ var Ir = class {
2699
2746
  switch (t.type) {
2700
2747
  case `File`:
2701
2748
  case `OldFile`:
2702
- case `ContiguousFile`: return this[Ji](t, n);
2703
- case `Link`: return this[Qi](t, n);
2704
- case `SymbolicLink`: return this[Zi](t, n);
2749
+ case `ContiguousFile`: return this[$i](t, n);
2750
+ case `Link`: return this[ra](t, n);
2751
+ case `SymbolicLink`: return this[na](t, n);
2705
2752
  case `Directory`:
2706
- case `GNUDumpDir`: return this[Yi](t, n);
2753
+ case `GNUDumpDir`: return this[ea](t, n);
2707
2754
  }
2708
2755
  }
2709
- [Xi](e, n, r, i) {
2756
+ [ta](e, n, r, i) {
2710
2757
  node_fs__rspack_import_0[r](n, String(e.absolute), (t) => {
2711
- t ? this[$](t, e) : (this[oa](), e.resume()), i();
2758
+ t ? this[$](t, e) : (this[da](), e.resume()), i();
2712
2759
  });
2713
2760
  }
2714
- }, ba = (e) => {
2761
+ }, Ta = (e) => {
2715
2762
  try {
2716
2763
  return [null, e()];
2717
2764
  } catch (e) {
2718
2765
  return [e, null];
2719
2766
  }
2720
- }, xa = class extends ya {
2767
+ }, Ea = class extends wa {
2721
2768
  sync = !0;
2722
2769
  [Q](e, t) {
2723
2770
  return super[Q](e, t, () => {});
2724
2771
  }
2725
- [Gi](e) {
2726
- if (!this[pa]) {
2727
- let t = this[ra](this.cwd, this.dmode);
2772
+ [Xi](e) {
2773
+ if (!this[va]) {
2774
+ let t = this[ca](this.cwd, this.dmode);
2728
2775
  if (t) return this[$](t, e);
2729
- this[pa] = !0;
2776
+ this[va] = !0;
2730
2777
  }
2731
2778
  if (e.absolute !== this.cwd) {
2732
- let t = z(node_path__rspack_import_3.dirname(String(e.absolute)));
2779
+ let t = L(node_path__rspack_import_3.dirname(String(e.absolute)));
2733
2780
  if (t !== this.cwd) {
2734
- let n = this[ra](t, this.dmode);
2781
+ let n = this[ca](t, this.dmode);
2735
2782
  if (n) return this[$](n, e);
2736
2783
  }
2737
2784
  }
2738
- let [n, r] = ba(() => node_fs__rspack_import_0.lstatSync(String(e.absolute)));
2739
- if (r && (this.keep || this.newer && r.mtime > (e.mtime ?? r.mtime))) return this[la](e);
2740
- if (n || this[qi](e, r)) return this[Q](null, e);
2785
+ let [n, r] = Ta(() => node_fs__rspack_import_0.lstatSync(String(e.absolute)));
2786
+ if (r && (this.keep || this.newer && r.mtime > (e.mtime ?? r.mtime))) return this[ma](e);
2787
+ if (n || this[Qi](e, r)) return this[Q](null, e);
2741
2788
  if (r.isDirectory()) {
2742
2789
  if (e.type === `Directory`) {
2743
- let [n] = this.chmod && e.mode && (r.mode & 4095) !== e.mode ? ba(() => {
2790
+ let [n] = this.chmod && e.mode && (r.mode & 4095) !== e.mode ? Ta(() => {
2744
2791
  node_fs__rspack_import_0.chmodSync(String(e.absolute), Number(e.mode));
2745
2792
  }) : [];
2746
2793
  return this[Q](n, e);
2747
2794
  }
2748
- let [n] = ba(() => node_fs__rspack_import_0.rmdirSync(String(e.absolute)));
2795
+ let [n] = Ta(() => node_fs__rspack_import_0.rmdirSync(String(e.absolute)));
2749
2796
  this[Q](n, e);
2750
2797
  }
2751
- let [a] = e.absolute === this.cwd ? [] : ba(() => _a(String(e.absolute)));
2798
+ let [a] = e.absolute === this.cwd ? [] : Ta(() => Sa(String(e.absolute)));
2752
2799
  this[Q](a, e);
2753
2800
  }
2754
- [Ji](e, n) {
2801
+ [$i](e, n) {
2755
2802
  let r = typeof e.mode == `number` ? e.mode & 4095 : this.fmode, i = (r) => {
2756
2803
  let i;
2757
2804
  try {
@@ -2762,7 +2809,7 @@ var Ir = class {
2762
2809
  (r || i) && this[$](r || i, e), n();
2763
2810
  }, a;
2764
2811
  try {
2765
- a = node_fs__rspack_import_0.openSync(String(e.absolute), xi(e.size), r);
2812
+ a = node_fs__rspack_import_0.openSync(String(e.absolute), Ei(e.size), r);
2766
2813
  } catch (e) {
2767
2814
  return i(e);
2768
2815
  }
@@ -2787,8 +2834,8 @@ var Ir = class {
2787
2834
  }
2788
2835
  }
2789
2836
  }
2790
- if (this[ua](e)) {
2791
- let r = this[da](e), i = this[fa](e);
2837
+ if (this[ha](e)) {
2838
+ let r = this[ga](e), i = this[_a](e);
2792
2839
  try {
2793
2840
  node_fs__rspack_import_0.fchownSync(a, Number(r), Number(i));
2794
2841
  } catch (a) {
@@ -2802,8 +2849,8 @@ var Ir = class {
2802
2849
  i(n);
2803
2850
  });
2804
2851
  }
2805
- [Yi](e, n) {
2806
- let r = typeof e.mode == `number` ? e.mode & 4095 : this.dmode, i = this[ra](String(e.absolute), r);
2852
+ [ea](e, n) {
2853
+ let r = typeof e.mode == `number` ? e.mode & 4095 : this.dmode, i = this[ca](String(e.absolute), r);
2807
2854
  if (i) {
2808
2855
  this[$](i, e), n();
2809
2856
  return;
@@ -2811,14 +2858,14 @@ var Ir = class {
2811
2858
  if (e.mtime && !this.noMtime) try {
2812
2859
  node_fs__rspack_import_0.utimesSync(String(e.absolute), e.atime || /* @__PURE__ */ new Date(), e.mtime);
2813
2860
  } catch {}
2814
- if (this[ua](e)) try {
2815
- node_fs__rspack_import_0.chownSync(String(e.absolute), Number(this[da](e)), Number(this[fa](e)));
2861
+ if (this[ha](e)) try {
2862
+ node_fs__rspack_import_0.chownSync(String(e.absolute), Number(this[ga](e)), Number(this[_a](e)));
2816
2863
  } catch {}
2817
2864
  n(), e.resume();
2818
2865
  }
2819
- [ra](e, t) {
2866
+ [ca](e, t) {
2820
2867
  try {
2821
- return Fi(z(e), {
2868
+ return Bi(L(e), {
2822
2869
  uid: this.uid,
2823
2870
  gid: this.gid,
2824
2871
  processUid: this.processUid,
@@ -2833,18 +2880,18 @@ var Ir = class {
2833
2880
  return e;
2834
2881
  }
2835
2882
  }
2836
- [$i](e, n, r, a, o) {
2883
+ [ia](e, n, r, a, o) {
2837
2884
  if (this.preservePaths || r.length === 0) return a();
2838
2885
  let s = n;
2839
2886
  for (let e of r) {
2840
2887
  s = node_path__rspack_import_3.resolve(s, e);
2841
- let [c, l] = ba(() => node_fs__rspack_import_0.lstatSync(s));
2888
+ let [c, l] = Ta(() => node_fs__rspack_import_0.lstatSync(s));
2842
2889
  if (c) return a();
2843
- if (l.isSymbolicLink()) return o(new ki(s, node_path__rspack_import_3.resolve(n, r.join(`/`))));
2890
+ if (l.isSymbolicLink()) return o(new Pi(s, node_path__rspack_import_3.resolve(n, r.join(`/`))));
2844
2891
  }
2845
2892
  a();
2846
2893
  }
2847
- [Xi](e, n, r, i) {
2894
+ [ta](e, n, r, i) {
2848
2895
  let a = `${r}Sync`;
2849
2896
  try {
2850
2897
  node_fs__rspack_import_0[a](n, String(e.absolute)), i(), e.resume();
@@ -2852,14 +2899,14 @@ var Ir = class {
2852
2899
  return this[$](t, e);
2853
2900
  }
2854
2901
  }
2855
- }, Sa = Ct((e) => {
2856
- let n = new xa(e), r = e.file, i = node_fs__rspack_import_0.statSync(r);
2902
+ }, Da = Ct((e) => {
2903
+ let n = new Ea(e), r = e.file, i = node_fs__rspack_import_0.statSync(r);
2857
2904
  new ft(r, {
2858
2905
  readSize: e.maxReadSize || 16 * 1024 * 1024,
2859
2906
  size: i.size
2860
2907
  }).pipe(n);
2861
2908
  }, (e, n) => {
2862
- let r = new ya(e), i = e.maxReadSize || 16 * 1024 * 1024, a = e.file;
2909
+ let r = new wa(e), i = e.maxReadSize || 16 * 1024 * 1024, a = e.file;
2863
2910
  return new Promise((e, n) => {
2864
2911
  r.on(`error`, n), r.on(`close`, e), node_fs__rspack_import_0.stat(a, (e, t) => {
2865
2912
  if (e) n(e);
@@ -2872,10 +2919,10 @@ var Ir = class {
2872
2919
  }
2873
2920
  });
2874
2921
  });
2875
- }, (e) => new xa(e), (e) => new ya(e), (e, t) => {
2876
- t?.length && Zn(e, t);
2877
- }), Ca = (e, n) => {
2878
- let r = new ai(e), i = !0, a, o;
2922
+ }, (e) => new Ea(e), (e) => new wa(e), (e, t) => {
2923
+ t?.length && ir(e, t);
2924
+ }), Oa = (e, n) => {
2925
+ let r = new ui(e), i = !0, a, o;
2879
2926
  try {
2880
2927
  try {
2881
2928
  a = node_fs__rspack_import_0.openSync(e.file, `r+`);
@@ -2895,21 +2942,21 @@ var Ir = class {
2895
2942
  if (o + r + 512 > s.size) break;
2896
2943
  o += r, e.mtimeCache && n.mtime && e.mtimeCache.set(String(n.path), n.mtime);
2897
2944
  }
2898
- i = !1, wa(e, r, o, a, n);
2945
+ i = !1, ka(e, r, o, a, n);
2899
2946
  } finally {
2900
2947
  if (i) try {
2901
2948
  node_fs__rspack_import_0.closeSync(a);
2902
2949
  } catch {}
2903
2950
  }
2904
- }, wa = (e, t, n, r, i) => {
2951
+ }, ka = (e, t, n, r, i) => {
2905
2952
  let a = new mt(e.file, {
2906
2953
  fd: r,
2907
2954
  start: n
2908
2955
  });
2909
- t.pipe(a), Ea(t, i);
2910
- }, Ta = (e, n) => {
2956
+ t.pipe(a), ja(t, i);
2957
+ }, Aa = (e, n) => {
2911
2958
  n = Array.from(n);
2912
- let r = new ii(e), i = (n, r, i) => {
2959
+ let r = new li(e), i = (n, r, i) => {
2913
2960
  let a = (e, r) => {
2914
2961
  e ? node_fs__rspack_import_0.close(n, (t) => i(e)) : i(null, r);
2915
2962
  }, o = 0;
@@ -2940,29 +2987,29 @@ var Ir = class {
2940
2987
  fd: u,
2941
2988
  start: i
2942
2989
  });
2943
- r.pipe(s), s.on(`error`, o), s.on(`close`, a), Da(r, n);
2990
+ r.pipe(s), s.on(`error`, o), s.on(`close`, a), Ma(r, n);
2944
2991
  });
2945
2992
  });
2946
2993
  };
2947
2994
  node_fs__rspack_import_0.open(e.file, s, c);
2948
2995
  });
2949
- }, Ea = (e, t) => {
2996
+ }, ja = (e, t) => {
2950
2997
  t.forEach((t) => {
2951
- t.charAt(0) === `@` ? Qn({
2998
+ t.charAt(0) === `@` ? ar({
2952
2999
  file: node_path__rspack_import_3.resolve(e.cwd, t.slice(1)),
2953
3000
  sync: !0,
2954
3001
  noResume: !0,
2955
3002
  onReadEntry: (t) => e.add(t)
2956
3003
  }) : e.add(t);
2957
3004
  }), e.end();
2958
- }, Da = async (e, t) => {
2959
- for (let n of t) n.charAt(0) === `@` ? await Qn({
3005
+ }, Ma = async (e, t) => {
3006
+ for (let n of t) n.charAt(0) === `@` ? await ar({
2960
3007
  file: node_path__rspack_import_3.resolve(String(e.cwd), n.slice(1)),
2961
3008
  noResume: !0,
2962
3009
  onReadEntry: (t) => e.add(t)
2963
3010
  }) : e.add(n);
2964
3011
  e.end();
2965
- }, Oa = Ct(Ca, Ta, () => {
3012
+ }, Na = Ct(Oa, Aa, () => {
2966
3013
  throw TypeError(`file is required`);
2967
3014
  }, () => {
2968
3015
  throw TypeError(`file is required`);
@@ -2971,10 +3018,10 @@ var Ir = class {
2971
3018
  if (e.gzip || e.brotli || e.zstd || e.file.endsWith(`.br`) || e.file.endsWith(`.tbr`)) throw TypeError(`cannot append to compressed archives`);
2972
3019
  if (!t?.length) throw TypeError(`no paths specified to add/replace`);
2973
3020
  });
2974
- Ct(Oa.syncFile, Oa.asyncFile, Oa.syncNoFile, Oa.asyncNoFile, (e, t = []) => {
2975
- Oa.validate?.(e, t), ka(e);
3021
+ Ct(Na.syncFile, Na.asyncFile, Na.syncNoFile, Na.asyncNoFile, (e, t = []) => {
3022
+ Na.validate?.(e, t), Pa(e);
2976
3023
  });
2977
- var ka = (e) => {
3024
+ var Pa = (e) => {
2978
3025
  let t = e.filter;
2979
3026
  e.mtimeCache ||= /* @__PURE__ */ new Map(), e.filter = t ? (n, r) => t(n, r) && !((e.mtimeCache?.get(n) ?? r.mtime ?? 0) > (r.mtime ?? 0)) : (t, n) => !((e.mtimeCache?.get(t) ?? n.mtime ?? 0) > (n.mtime ?? 0));
2980
3027
  };