create-tldraw 5.3.2 → 5.4.0-canary.042da660fa66

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-cjs/main.cjs CHANGED
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ try {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ } catch (e2) {
12
+ throw mod = 0, e2;
13
+ }
10
14
  };
11
15
  var __copyProps = (to2, from, except, desc) => {
12
16
  if (from && typeof from === "object" || typeof from === "function") {
@@ -33,16 +37,16 @@ var require_src = __commonJS({
33
37
  var CSI = `${ESC}[`;
34
38
  var beep = "\x07";
35
39
  var cursor = {
36
- to(x3, y3) {
37
- if (!y3) return `${CSI}${x3 + 1}G`;
38
- return `${CSI}${y3 + 1};${x3 + 1}H`;
40
+ to(x3, y2) {
41
+ if (!y2) return `${CSI}${x3 + 1}G`;
42
+ return `${CSI}${y2 + 1};${x3 + 1}H`;
39
43
  },
40
- move(x3, y3) {
44
+ move(x3, y2) {
41
45
  let ret = "";
42
46
  if (x3 < 0) ret += `${CSI}${-x3}D`;
43
47
  else if (x3 > 0) ret += `${CSI}${x3}C`;
44
- if (y3 < 0) ret += `${CSI}${-y3}A`;
45
- else if (y3 > 0) ret += `${CSI}${y3}B`;
48
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
49
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
46
50
  return ret;
47
51
  },
48
52
  up: (count = 1) => `${CSI}${count}A`,
@@ -236,24 +240,24 @@ function Z(e2) {
236
240
  }
237
241
  var q = { exports: {} };
238
242
  (function(e2) {
239
- var D3 = {};
240
- e2.exports = D3, D3.eastAsianWidth = function(s3) {
243
+ var D2 = {};
244
+ e2.exports = D2, D2.eastAsianWidth = function(s3) {
241
245
  var i = s3.charCodeAt(0), F3 = s3.length == 2 ? s3.charCodeAt(1) : 0, u3 = i;
242
246
  return 55296 <= i && i <= 56319 && 56320 <= F3 && F3 <= 57343 && (i &= 1023, F3 &= 1023, u3 = i << 10 | F3, u3 += 65536), u3 == 12288 || 65281 <= u3 && u3 <= 65376 || 65504 <= u3 && u3 <= 65510 ? "F" : u3 == 8361 || 65377 <= u3 && u3 <= 65470 || 65474 <= u3 && u3 <= 65479 || 65482 <= u3 && u3 <= 65487 || 65490 <= u3 && u3 <= 65495 || 65498 <= u3 && u3 <= 65500 || 65512 <= u3 && u3 <= 65518 ? "H" : 4352 <= u3 && u3 <= 4447 || 4515 <= u3 && u3 <= 4519 || 4602 <= u3 && u3 <= 4607 || 9001 <= u3 && u3 <= 9002 || 11904 <= u3 && u3 <= 11929 || 11931 <= u3 && u3 <= 12019 || 12032 <= u3 && u3 <= 12245 || 12272 <= u3 && u3 <= 12283 || 12289 <= u3 && u3 <= 12350 || 12353 <= u3 && u3 <= 12438 || 12441 <= u3 && u3 <= 12543 || 12549 <= u3 && u3 <= 12589 || 12593 <= u3 && u3 <= 12686 || 12688 <= u3 && u3 <= 12730 || 12736 <= u3 && u3 <= 12771 || 12784 <= u3 && u3 <= 12830 || 12832 <= u3 && u3 <= 12871 || 12880 <= u3 && u3 <= 13054 || 13056 <= u3 && u3 <= 19903 || 19968 <= u3 && u3 <= 42124 || 42128 <= u3 && u3 <= 42182 || 43360 <= u3 && u3 <= 43388 || 44032 <= u3 && u3 <= 55203 || 55216 <= u3 && u3 <= 55238 || 55243 <= u3 && u3 <= 55291 || 63744 <= u3 && u3 <= 64255 || 65040 <= u3 && u3 <= 65049 || 65072 <= u3 && u3 <= 65106 || 65108 <= u3 && u3 <= 65126 || 65128 <= u3 && u3 <= 65131 || 110592 <= u3 && u3 <= 110593 || 127488 <= u3 && u3 <= 127490 || 127504 <= u3 && u3 <= 127546 || 127552 <= u3 && u3 <= 127560 || 127568 <= u3 && u3 <= 127569 || 131072 <= u3 && u3 <= 194367 || 177984 <= u3 && u3 <= 196605 || 196608 <= u3 && u3 <= 262141 ? "W" : 32 <= u3 && u3 <= 126 || 162 <= u3 && u3 <= 163 || 165 <= u3 && u3 <= 166 || u3 == 172 || u3 == 175 || 10214 <= u3 && u3 <= 10221 || 10629 <= u3 && u3 <= 10630 ? "Na" : u3 == 161 || u3 == 164 || 167 <= u3 && u3 <= 168 || u3 == 170 || 173 <= u3 && u3 <= 174 || 176 <= u3 && u3 <= 180 || 182 <= u3 && u3 <= 186 || 188 <= u3 && u3 <= 191 || u3 == 198 || u3 == 208 || 215 <= u3 && u3 <= 216 || 222 <= u3 && u3 <= 225 || u3 == 230 || 232 <= u3 && u3 <= 234 || 236 <= u3 && u3 <= 237 || u3 == 240 || 242 <= u3 && u3 <= 243 || 247 <= u3 && u3 <= 250 || u3 == 252 || u3 == 254 || u3 == 257 || u3 == 273 || u3 == 275 || u3 == 283 || 294 <= u3 && u3 <= 295 || u3 == 299 || 305 <= u3 && u3 <= 307 || u3 == 312 || 319 <= u3 && u3 <= 322 || u3 == 324 || 328 <= u3 && u3 <= 331 || u3 == 333 || 338 <= u3 && u3 <= 339 || 358 <= u3 && u3 <= 359 || u3 == 363 || u3 == 462 || u3 == 464 || u3 == 466 || u3 == 468 || u3 == 470 || u3 == 472 || u3 == 474 || u3 == 476 || u3 == 593 || u3 == 609 || u3 == 708 || u3 == 711 || 713 <= u3 && u3 <= 715 || u3 == 717 || u3 == 720 || 728 <= u3 && u3 <= 731 || u3 == 733 || u3 == 735 || 768 <= u3 && u3 <= 879 || 913 <= u3 && u3 <= 929 || 931 <= u3 && u3 <= 937 || 945 <= u3 && u3 <= 961 || 963 <= u3 && u3 <= 969 || u3 == 1025 || 1040 <= u3 && u3 <= 1103 || u3 == 1105 || u3 == 8208 || 8211 <= u3 && u3 <= 8214 || 8216 <= u3 && u3 <= 8217 || 8220 <= u3 && u3 <= 8221 || 8224 <= u3 && u3 <= 8226 || 8228 <= u3 && u3 <= 8231 || u3 == 8240 || 8242 <= u3 && u3 <= 8243 || u3 == 8245 || u3 == 8251 || u3 == 8254 || u3 == 8308 || u3 == 8319 || 8321 <= u3 && u3 <= 8324 || u3 == 8364 || u3 == 8451 || u3 == 8453 || u3 == 8457 || u3 == 8467 || u3 == 8470 || 8481 <= u3 && u3 <= 8482 || u3 == 8486 || u3 == 8491 || 8531 <= u3 && u3 <= 8532 || 8539 <= u3 && u3 <= 8542 || 8544 <= u3 && u3 <= 8555 || 8560 <= u3 && u3 <= 8569 || u3 == 8585 || 8592 <= u3 && u3 <= 8601 || 8632 <= u3 && u3 <= 8633 || u3 == 8658 || u3 == 8660 || u3 == 8679 || u3 == 8704 || 8706 <= u3 && u3 <= 8707 || 8711 <= u3 && u3 <= 8712 || u3 == 8715 || u3 == 8719 || u3 == 8721 || u3 == 8725 || u3 == 8730 || 8733 <= u3 && u3 <= 8736 || u3 == 8739 || u3 == 8741 || 8743 <= u3 && u3 <= 8748 || u3 == 8750 || 8756 <= u3 && u3 <= 8759 || 8764 <= u3 && u3 <= 8765 || u3 == 8776 || u3 == 8780 || u3 == 8786 || 8800 <= u3 && u3 <= 8801 || 8804 <= u3 && u3 <= 8807 || 8810 <= u3 && u3 <= 8811 || 8814 <= u3 && u3 <= 8815 || 8834 <= u3 && u3 <= 8835 || 8838 <= u3 && u3 <= 8839 || u3 == 8853 || u3 == 8857 || u3 == 8869 || u3 == 8895 || u3 == 8978 || 9312 <= u3 && u3 <= 9449 || 9451 <= u3 && u3 <= 9547 || 9552 <= u3 && u3 <= 9587 || 9600 <= u3 && u3 <= 9615 || 9618 <= u3 && u3 <= 9621 || 9632 <= u3 && u3 <= 9633 || 9635 <= u3 && u3 <= 9641 || 9650 <= u3 && u3 <= 9651 || 9654 <= u3 && u3 <= 9655 || 9660 <= u3 && u3 <= 9661 || 9664 <= u3 && u3 <= 9665 || 9670 <= u3 && u3 <= 9672 || u3 == 9675 || 9678 <= u3 && u3 <= 9681 || 9698 <= u3 && u3 <= 9701 || u3 == 9711 || 9733 <= u3 && u3 <= 9734 || u3 == 9737 || 9742 <= u3 && u3 <= 9743 || 9748 <= u3 && u3 <= 9749 || u3 == 9756 || u3 == 9758 || u3 == 9792 || u3 == 9794 || 9824 <= u3 && u3 <= 9825 || 9827 <= u3 && u3 <= 9829 || 9831 <= u3 && u3 <= 9834 || 9836 <= u3 && u3 <= 9837 || u3 == 9839 || 9886 <= u3 && u3 <= 9887 || 9918 <= u3 && u3 <= 9919 || 9924 <= u3 && u3 <= 9933 || 9935 <= u3 && u3 <= 9953 || u3 == 9955 || 9960 <= u3 && u3 <= 9983 || u3 == 10045 || u3 == 10071 || 10102 <= u3 && u3 <= 10111 || 11093 <= u3 && u3 <= 11097 || 12872 <= u3 && u3 <= 12879 || 57344 <= u3 && u3 <= 63743 || 65024 <= u3 && u3 <= 65039 || u3 == 65533 || 127232 <= u3 && u3 <= 127242 || 127248 <= u3 && u3 <= 127277 || 127280 <= u3 && u3 <= 127337 || 127344 <= u3 && u3 <= 127386 || 917760 <= u3 && u3 <= 917999 || 983040 <= u3 && u3 <= 1048573 || 1048576 <= u3 && u3 <= 1114109 ? "A" : "N";
243
- }, D3.characterLength = function(s3) {
247
+ }, D2.characterLength = function(s3) {
244
248
  var i = this.eastAsianWidth(s3);
245
249
  return i == "F" || i == "W" || i == "A" ? 2 : 1;
246
250
  };
247
251
  function t(s3) {
248
252
  return s3.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
249
253
  }
250
- D3.length = function(s3) {
254
+ D2.length = function(s3) {
251
255
  for (var i = t(s3), F3 = 0, u3 = 0; u3 < i.length; u3++) F3 = F3 + this.characterLength(i[u3]);
252
256
  return F3;
253
- }, D3.slice = function(s3, i, F3) {
254
- textLen = D3.length(s3), i = i || 0, F3 = F3 || 1, i < 0 && (i = textLen + i), F3 < 0 && (F3 = textLen + F3);
257
+ }, D2.slice = function(s3, i, F3) {
258
+ textLen = D2.length(s3), i = i || 0, F3 = F3 || 1, i < 0 && (i = textLen + i), F3 < 0 && (F3 = textLen + F3);
255
259
  for (var u3 = "", r = 0, a = t(s3), n = 0; n < a.length; n++) {
256
- var l = a[n], o2 = D3.length(l);
260
+ var l = a[n], o2 = D2.length(l);
257
261
  if (r >= i - (o2 == 2 ? 1 : 0)) if (r + o2 <= F3) u3 += l;
258
262
  else break;
259
263
  r += o2;
@@ -267,10 +271,10 @@ var pu = function() {
267
271
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
268
272
  };
269
273
  var Au = Z(pu);
270
- function b2(e2, D3 = {}) {
271
- if (typeof e2 != "string" || e2.length === 0 || (D3 = { ambiguousIsNarrow: true, ...D3 }, e2 = Y(e2), e2.length === 0)) return 0;
274
+ function b2(e2, D2 = {}) {
275
+ if (typeof e2 != "string" || e2.length === 0 || (D2 = { ambiguousIsNarrow: true, ...D2 }, e2 = Y(e2), e2.length === 0)) return 0;
272
276
  e2 = e2.replace(Au(), " ");
273
- const t = D3.ambiguousIsNarrow ? 1 : 2;
277
+ const t = D2.ambiguousIsNarrow ? 1 : 2;
274
278
  let s3 = 0;
275
279
  for (const i of e2) {
276
280
  const F3 = i.codePointAt(0);
@@ -290,9 +294,9 @@ function b2(e2, D3 = {}) {
290
294
  return s3;
291
295
  }
292
296
  var M = 10;
293
- var H = (e2 = 0) => (D3) => `\x1B[${D3 + e2}m`;
294
- var J = (e2 = 0) => (D3) => `\x1B[${38 + e2};5;${D3}m`;
295
- var Q = (e2 = 0) => (D3, t, s3) => `\x1B[${38 + e2};2;${D3};${t};${s3}m`;
297
+ var H = (e2 = 0) => (D2) => `\x1B[${D2 + e2}m`;
298
+ var J = (e2 = 0) => (D2) => `\x1B[${38 + e2};5;${D2}m`;
299
+ var Q = (e2 = 0) => (D2, t, s3) => `\x1B[${38 + e2};2;${D2};${t};${s3}m`;
296
300
  var C = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
297
301
  Object.keys(C.modifier);
298
302
  var fu = Object.keys(C.color);
@@ -300,32 +304,32 @@ var du = Object.keys(C.bgColor);
300
304
  [...fu, ...du];
301
305
  function gu() {
302
306
  const e2 = /* @__PURE__ */ new Map();
303
- for (const [D3, t] of Object.entries(C)) {
307
+ for (const [D2, t] of Object.entries(C)) {
304
308
  for (const [s3, i] of Object.entries(t)) C[s3] = { open: `\x1B[${i[0]}m`, close: `\x1B[${i[1]}m` }, t[s3] = C[s3], e2.set(i[0], i[1]);
305
- Object.defineProperty(C, D3, { value: t, enumerable: false });
309
+ Object.defineProperty(C, D2, { value: t, enumerable: false });
306
310
  }
307
- return Object.defineProperty(C, "codes", { value: e2, enumerable: false }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = H(), C.color.ansi256 = J(), C.color.ansi16m = Q(), C.bgColor.ansi = H(M), C.bgColor.ansi256 = J(M), C.bgColor.ansi16m = Q(M), Object.defineProperties(C, { rgbToAnsi256: { value: (D3, t, s3) => D3 === t && t === s3 ? D3 < 8 ? 16 : D3 > 248 ? 231 : Math.round((D3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(D3 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(s3 / 255 * 5), enumerable: false }, hexToRgb: { value: (D3) => {
308
- const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(D3.toString(16));
311
+ return Object.defineProperty(C, "codes", { value: e2, enumerable: false }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = H(), C.color.ansi256 = J(), C.color.ansi16m = Q(), C.bgColor.ansi = H(M), C.bgColor.ansi256 = J(M), C.bgColor.ansi16m = Q(M), Object.defineProperties(C, { rgbToAnsi256: { value: (D2, t, s3) => D2 === t && t === s3 ? D2 < 8 ? 16 : D2 > 248 ? 231 : Math.round((D2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(D2 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(s3 / 255 * 5), enumerable: false }, hexToRgb: { value: (D2) => {
312
+ const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(D2.toString(16));
309
313
  if (!t) return [0, 0, 0];
310
314
  let [s3] = t;
311
315
  s3.length === 3 && (s3 = [...s3].map((F3) => F3 + F3).join(""));
312
316
  const i = Number.parseInt(s3, 16);
313
317
  return [i >> 16 & 255, i >> 8 & 255, i & 255];
314
- }, enumerable: false }, hexToAnsi256: { value: (D3) => C.rgbToAnsi256(...C.hexToRgb(D3)), enumerable: false }, ansi256ToAnsi: { value: (D3) => {
315
- if (D3 < 8) return 30 + D3;
316
- if (D3 < 16) return 90 + (D3 - 8);
318
+ }, enumerable: false }, hexToAnsi256: { value: (D2) => C.rgbToAnsi256(...C.hexToRgb(D2)), enumerable: false }, ansi256ToAnsi: { value: (D2) => {
319
+ if (D2 < 8) return 30 + D2;
320
+ if (D2 < 16) return 90 + (D2 - 8);
317
321
  let t, s3, i;
318
- if (D3 >= 232) t = ((D3 - 232) * 10 + 8) / 255, s3 = t, i = t;
322
+ if (D2 >= 232) t = ((D2 - 232) * 10 + 8) / 255, s3 = t, i = t;
319
323
  else {
320
- D3 -= 16;
321
- const r = D3 % 36;
322
- t = Math.floor(D3 / 36) / 5, s3 = Math.floor(r / 6) / 5, i = r % 6 / 5;
324
+ D2 -= 16;
325
+ const r = D2 % 36;
326
+ t = Math.floor(D2 / 36) / 5, s3 = Math.floor(r / 6) / 5, i = r % 6 / 5;
323
327
  }
324
328
  const F3 = Math.max(t, s3, i) * 2;
325
329
  if (F3 === 0) return 30;
326
330
  let u3 = 30 + (Math.round(i) << 2 | Math.round(s3) << 1 | Math.round(t));
327
331
  return F3 === 2 && (u3 += 60), u3;
328
- }, enumerable: false }, rgbToAnsi: { value: (D3, t, s3) => C.ansi256ToAnsi(C.rgbToAnsi256(D3, t, s3)), enumerable: false }, hexToAnsi: { value: (D3) => C.ansi256ToAnsi(C.hexToAnsi256(D3)), enumerable: false } }), C;
332
+ }, enumerable: false }, rgbToAnsi: { value: (D2, t, s3) => C.ansi256ToAnsi(C.rgbToAnsi256(D2, t, s3)), enumerable: false }, hexToAnsi: { value: (D2) => C.ansi256ToAnsi(C.hexToAnsi256(D2)), enumerable: false } }), C;
329
333
  }
330
334
  var mu = gu();
331
335
  var $ = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
@@ -337,9 +341,9 @@ var uu = "m";
337
341
  var T2 = `${bu}8;;`;
338
342
  var Du = (e2) => `${$.values().next().value}${X}${e2}${uu}`;
339
343
  var tu = (e2) => `${$.values().next().value}${T2}${e2}${O}`;
340
- var wu = (e2) => e2.split(" ").map((D3) => b2(D3));
341
- var j = (e2, D3, t) => {
342
- const s3 = [...D3];
344
+ var wu = (e2) => e2.split(" ").map((D2) => b2(D2));
345
+ var j = (e2, D2, t) => {
346
+ const s3 = [...D2];
343
347
  let i = false, F3 = false, u3 = b2(Y(e2[e2.length - 1]));
344
348
  for (const [r, a] of s3.entries()) {
345
349
  const n = b2(a);
@@ -352,12 +356,12 @@ var j = (e2, D3, t) => {
352
356
  !u3 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
353
357
  };
354
358
  var yu = (e2) => {
355
- const D3 = e2.split(" ");
356
- let t = D3.length;
357
- for (; t > 0 && !(b2(D3[t - 1]) > 0); ) t--;
358
- return t === D3.length ? e2 : D3.slice(0, t).join(" ") + D3.slice(t).join("");
359
+ const D2 = e2.split(" ");
360
+ let t = D2.length;
361
+ for (; t > 0 && !(b2(D2[t - 1]) > 0); ) t--;
362
+ return t === D2.length ? e2 : D2.slice(0, t).join(" ") + D2.slice(t).join("");
359
363
  };
360
- var _u = (e2, D3, t = {}) => {
364
+ var _u = (e2, D2, t = {}) => {
361
365
  if (t.trim !== false && e2.trim() === "") return "";
362
366
  let s3 = "", i, F3;
363
367
  const u3 = wu(e2);
@@ -365,20 +369,20 @@ var _u = (e2, D3, t = {}) => {
365
369
  for (const [n, l] of e2.split(" ").entries()) {
366
370
  t.trim !== false && (r[r.length - 1] = r[r.length - 1].trimStart());
367
371
  let o2 = b2(r[r.length - 1]);
368
- if (n !== 0 && (o2 >= D3 && (t.wordWrap === false || t.trim === false) && (r.push(""), o2 = 0), (o2 > 0 || t.trim === false) && (r[r.length - 1] += " ", o2++)), t.hard && u3[n] > D3) {
369
- const A3 = D3 - o2, y3 = 1 + Math.floor((u3[n] - A3 - 1) / D3);
370
- Math.floor((u3[n] - 1) / D3) < y3 && r.push(""), j(r, l, D3);
372
+ if (n !== 0 && (o2 >= D2 && (t.wordWrap === false || t.trim === false) && (r.push(""), o2 = 0), (o2 > 0 || t.trim === false) && (r[r.length - 1] += " ", o2++)), t.hard && u3[n] > D2) {
373
+ const A3 = D2 - o2, y2 = 1 + Math.floor((u3[n] - A3 - 1) / D2);
374
+ Math.floor((u3[n] - 1) / D2) < y2 && r.push(""), j(r, l, D2);
371
375
  continue;
372
376
  }
373
- if (o2 + u3[n] > D3 && o2 > 0 && u3[n] > 0) {
374
- if (t.wordWrap === false && o2 < D3) {
375
- j(r, l, D3);
377
+ if (o2 + u3[n] > D2 && o2 > 0 && u3[n] > 0) {
378
+ if (t.wordWrap === false && o2 < D2) {
379
+ j(r, l, D2);
376
380
  continue;
377
381
  }
378
382
  r.push("");
379
383
  }
380
- if (o2 + u3[n] > D3 && t.wordWrap === false) {
381
- j(r, l, D3);
384
+ if (o2 + u3[n] > D2 && t.wordWrap === false) {
385
+ j(r, l, D2);
382
386
  continue;
383
387
  }
384
388
  r[r.length - 1] += l;
@@ -390,8 +394,8 @@ var _u = (e2, D3, t = {}) => {
390
394
  if (s3 += l, $.has(l)) {
391
395
  const { groups: A3 } = new RegExp(`(?:\\${X}(?<code>\\d+)m|\\${T2}(?<uri>.*)${O})`).exec(a.slice(n).join("")) || { groups: {} };
392
396
  if (A3.code !== void 0) {
393
- const y3 = Number.parseFloat(A3.code);
394
- i = y3 === vu ? void 0 : y3;
397
+ const y2 = Number.parseFloat(A3.code);
398
+ i = y2 === vu ? void 0 : y2;
395
399
  } else A3.uri !== void 0 && (F3 = A3.uri.length === 0 ? void 0 : A3.uri);
396
400
  }
397
401
  const o2 = mu.codes.get(Number(i));
@@ -401,23 +405,23 @@ var _u = (e2, D3, t = {}) => {
401
405
  }
402
406
  return s3;
403
407
  };
404
- function eu(e2, D3, t) {
408
+ function eu(e2, D2, t) {
405
409
  return String(e2).normalize().replace(/\r\n/g, `
406
410
  `).split(`
407
- `).map((s3) => _u(s3, D3, t)).join(`
411
+ `).map((s3) => _u(s3, D2, t)).join(`
408
412
  `);
409
413
  }
410
414
  var $u = ["up", "down", "left", "right", "space", "enter", "cancel"];
411
415
  var c = { actions: new Set($u), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" } };
412
- function W(e2, D3) {
413
- if (typeof e2 == "string") return c.aliases.get(e2) === D3;
414
- for (const t of e2) if (t !== void 0 && W(t, D3)) return true;
416
+ function W(e2, D2) {
417
+ if (typeof e2 == "string") return c.aliases.get(e2) === D2;
418
+ for (const t of e2) if (t !== void 0 && W(t, D2)) return true;
415
419
  return false;
416
420
  }
417
- function ku(e2, D3) {
418
- if (e2 === D3) return;
421
+ function ku(e2, D2) {
422
+ if (e2 === D2) return;
419
423
  const t = e2.split(`
420
- `), s3 = D3.split(`
424
+ `), s3 = D2.split(`
421
425
  `), i = [];
422
426
  for (let F3 = 0; F3 < Math.max(t.length, s3.length); F3++) t[F3] !== s3[F3] && i.push(F3);
423
427
  return i;
@@ -427,138 +431,138 @@ var L = /* @__PURE__ */ Symbol("clack:cancel");
427
431
  function Vu(e2) {
428
432
  return e2 === L;
429
433
  }
430
- function S(e2, D3) {
434
+ function S(e2, D2) {
431
435
  const t = e2;
432
- t.isTTY && t.setRawMode(D3);
436
+ t.isTTY && t.setRawMode(D2);
433
437
  }
434
- function Mu({ input: e2 = import_node_process.stdin, output: D3 = import_node_process.stdout, overwrite: t = true, hideCursor: s3 = true } = {}) {
435
- const i = _.createInterface({ input: e2, output: D3, prompt: "", tabSize: 1 });
438
+ function Mu({ input: e2 = import_node_process.stdin, output: D2 = import_node_process.stdout, overwrite: t = true, hideCursor: s3 = true } = {}) {
439
+ const i = _.createInterface({ input: e2, output: D2, prompt: "", tabSize: 1 });
436
440
  _.emitKeypressEvents(e2, i), e2 instanceof import_node_tty.ReadStream && e2.isTTY && e2.setRawMode(true);
437
441
  const F3 = (u3, { name: r, sequence: a }) => {
438
442
  const n = String(u3);
439
443
  if (W([n, r, a], "cancel")) {
440
- s3 && D3.write(import_sisteransi.cursor.show), process.exit(0);
444
+ s3 && D2.write(import_sisteransi.cursor.show), process.exit(0);
441
445
  return;
442
446
  }
443
447
  if (!t) return;
444
448
  const l = r === "return" ? 0 : -1, o2 = r === "return" ? -1 : 0;
445
- _.moveCursor(D3, l, o2, () => {
446
- _.clearLine(D3, 1, () => {
449
+ _.moveCursor(D2, l, o2, () => {
450
+ _.clearLine(D2, 1, () => {
447
451
  e2.once("keypress", F3);
448
452
  });
449
453
  });
450
454
  };
451
- return s3 && D3.write(import_sisteransi.cursor.hide), e2.once("keypress", F3), () => {
452
- e2.off("keypress", F3), s3 && D3.write(import_sisteransi.cursor.show), e2 instanceof import_node_tty.ReadStream && e2.isTTY && !Iu && e2.setRawMode(false), i.terminal = false, i.close();
455
+ return s3 && D2.write(import_sisteransi.cursor.hide), e2.once("keypress", F3), () => {
456
+ e2.off("keypress", F3), s3 && D2.write(import_sisteransi.cursor.show), e2 instanceof import_node_tty.ReadStream && e2.isTTY && !Iu && e2.setRawMode(false), i.terminal = false, i.close();
453
457
  };
454
458
  }
455
459
  var Tu = Object.defineProperty;
456
- var ju = (e2, D3, t) => D3 in e2 ? Tu(e2, D3, { enumerable: true, configurable: true, writable: true, value: t }) : e2[D3] = t;
457
- var E = (e2, D3, t) => (ju(e2, typeof D3 != "symbol" ? D3 + "" : D3, t), t);
460
+ var ju = (e2, D2, t) => D2 in e2 ? Tu(e2, D2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[D2] = t;
461
+ var E = (e2, D2, t) => (ju(e2, typeof D2 != "symbol" ? D2 + "" : D2, t), t);
458
462
  var p2 = class {
459
- constructor(D3, t = true) {
463
+ constructor(D2, t = true) {
460
464
  E(this, "input"), E(this, "output"), E(this, "_abortSignal"), E(this, "rl"), E(this, "opts"), E(this, "_render"), E(this, "_track", false), E(this, "_prevFrame", ""), E(this, "_subscribers", /* @__PURE__ */ new Map()), E(this, "_cursor", 0), E(this, "state", "initial"), E(this, "error", ""), E(this, "value"), E(this, "userInput", "");
461
- const { input: s3 = import_node_process.stdin, output: i = import_node_process.stdout, render: F3, signal: u3, ...r } = D3;
465
+ const { input: s3 = import_node_process.stdin, output: i = import_node_process.stdout, render: F3, signal: u3, ...r } = D2;
462
466
  this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = F3.bind(this), this._track = t, this._abortSignal = u3, this.input = s3, this.output = i;
463
467
  }
464
468
  unsubscribe() {
465
469
  this._subscribers.clear();
466
470
  }
467
- setSubscriber(D3, t) {
468
- const s3 = this._subscribers.get(D3) ?? [];
469
- s3.push(t), this._subscribers.set(D3, s3);
471
+ setSubscriber(D2, t) {
472
+ const s3 = this._subscribers.get(D2) ?? [];
473
+ s3.push(t), this._subscribers.set(D2, s3);
470
474
  }
471
- on(D3, t) {
472
- this.setSubscriber(D3, { cb: t });
475
+ on(D2, t) {
476
+ this.setSubscriber(D2, { cb: t });
473
477
  }
474
- once(D3, t) {
475
- this.setSubscriber(D3, { cb: t, once: true });
478
+ once(D2, t) {
479
+ this.setSubscriber(D2, { cb: t, once: true });
476
480
  }
477
- emit(D3, ...t) {
478
- const s3 = this._subscribers.get(D3) ?? [], i = [];
481
+ emit(D2, ...t) {
482
+ const s3 = this._subscribers.get(D2) ?? [], i = [];
479
483
  for (const F3 of s3) F3.cb(...t), F3.once && i.push(() => s3.splice(s3.indexOf(F3), 1));
480
484
  for (const F3 of i) F3();
481
485
  }
482
486
  prompt() {
483
- return new Promise((D3) => {
487
+ return new Promise((D2) => {
484
488
  if (this._abortSignal) {
485
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), D3(L);
489
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), D2(L);
486
490
  this._abortSignal.addEventListener("abort", () => {
487
491
  this.state = "cancel", this.close();
488
492
  }, { once: true });
489
493
  }
490
494
  this.rl = import_node_readline.default.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), S(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
491
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), S(this.input, false), D3(this.value);
495
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), S(this.input, false), D2(this.value);
492
496
  }), this.once("cancel", () => {
493
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), S(this.input, false), D3(L);
497
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), S(this.input, false), D2(L);
494
498
  });
495
499
  });
496
500
  }
497
- _isActionKey(D3, t) {
498
- return D3 === " ";
501
+ _isActionKey(D2, t) {
502
+ return D2 === " ";
499
503
  }
500
- _setValue(D3) {
501
- this.value = D3, this.emit("value", this.value);
504
+ _setValue(D2) {
505
+ this.value = D2, this.emit("value", this.value);
502
506
  }
503
- _setUserInput(D3, t) {
504
- this.userInput = D3 ?? "", this.emit("userInput", this.userInput), t && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
507
+ _setUserInput(D2, t) {
508
+ this.userInput = D2 ?? "", this.emit("userInput", this.userInput), t && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
505
509
  }
506
- onKeypress(D3, t) {
507
- if (this._track && t.name !== "return" && (t.name && this._isActionKey(D3, t) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), t?.name && (!this._track && c.aliases.has(t.name) && this.emit("cursor", c.aliases.get(t.name)), c.actions.has(t.name) && this.emit("cursor", t.name)), D3 && (D3.toLowerCase() === "y" || D3.toLowerCase() === "n") && this.emit("confirm", D3.toLowerCase() === "y"), this.emit("key", D3?.toLowerCase(), t), t?.name === "return") {
510
+ onKeypress(D2, t) {
511
+ if (this._track && t.name !== "return" && (t.name && this._isActionKey(D2, t) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), t?.name && (!this._track && c.aliases.has(t.name) && this.emit("cursor", c.aliases.get(t.name)), c.actions.has(t.name) && this.emit("cursor", t.name)), D2 && (D2.toLowerCase() === "y" || D2.toLowerCase() === "n") && this.emit("confirm", D2.toLowerCase() === "y"), this.emit("key", D2?.toLowerCase(), t), t?.name === "return") {
508
512
  if (this.opts.validate) {
509
513
  const s3 = this.opts.validate(this.value);
510
514
  s3 && (this.error = s3 instanceof Error ? s3.message : s3, this.state = "error", this.rl?.write(this.userInput));
511
515
  }
512
516
  this.state !== "error" && (this.state = "submit");
513
517
  }
514
- W([D3, t?.name, t?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
518
+ W([D2, t?.name, t?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
515
519
  }
516
520
  close() {
517
521
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
518
522
  `), S(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
519
523
  }
520
524
  restoreCursor() {
521
- const D3 = eu(this._prevFrame, process.stdout.columns, { hard: true }).split(`
525
+ const D2 = eu(this._prevFrame, process.stdout.columns, { hard: true }).split(`
522
526
  `).length - 1;
523
- this.output.write(import_sisteransi.cursor.move(-999, D3 * -1));
527
+ this.output.write(import_sisteransi.cursor.move(-999, D2 * -1));
524
528
  }
525
529
  render() {
526
- const D3 = eu(this._render(this) ?? "", process.stdout.columns, { hard: true });
527
- if (D3 !== this._prevFrame) {
530
+ const D2 = eu(this._render(this) ?? "", process.stdout.columns, { hard: true });
531
+ if (D2 !== this._prevFrame) {
528
532
  if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
529
533
  else {
530
- const t = ku(this._prevFrame, D3);
534
+ const t = ku(this._prevFrame, D2);
531
535
  if (this.restoreCursor(), t && t?.length === 1) {
532
536
  const s3 = t[0];
533
537
  this.output.write(import_sisteransi.cursor.move(0, s3)), this.output.write(import_sisteransi.erase.lines(1));
534
- const i = D3.split(`
538
+ const i = D2.split(`
535
539
  `);
536
- this.output.write(i[s3]), this._prevFrame = D3, this.output.write(import_sisteransi.cursor.move(0, i.length - s3 - 1));
540
+ this.output.write(i[s3]), this._prevFrame = D2, this.output.write(import_sisteransi.cursor.move(0, i.length - s3 - 1));
537
541
  return;
538
542
  }
539
543
  if (t && t?.length > 1) {
540
544
  const s3 = t[0];
541
545
  this.output.write(import_sisteransi.cursor.move(0, s3)), this.output.write(import_sisteransi.erase.down());
542
- const i = D3.split(`
546
+ const i = D2.split(`
543
547
  `).slice(s3);
544
548
  this.output.write(i.join(`
545
- `)), this._prevFrame = D3;
549
+ `)), this._prevFrame = D2;
546
550
  return;
547
551
  }
548
552
  this.output.write(import_sisteransi.erase.down());
549
553
  }
550
- this.output.write(D3), this.state === "initial" && (this.state = "active"), this._prevFrame = D3;
554
+ this.output.write(D2), this.state === "initial" && (this.state = "active"), this._prevFrame = D2;
551
555
  }
552
556
  }
553
557
  };
554
558
  var d;
555
559
  d = /* @__PURE__ */ new WeakMap();
556
560
  var Ju = Object.defineProperty;
557
- var Qu = (e2, D3, t) => D3 in e2 ? Ju(e2, D3, { enumerable: true, configurable: true, writable: true, value: t }) : e2[D3] = t;
558
- var ru = (e2, D3, t) => (Qu(e2, typeof D3 != "symbol" ? D3 + "" : D3, t), t);
561
+ var Qu = (e2, D2, t) => D2 in e2 ? Ju(e2, D2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[D2] = t;
562
+ var ru = (e2, D2, t) => (Qu(e2, typeof D2 != "symbol" ? D2 + "" : D2, t), t);
559
563
  var Xu = class extends p2 {
560
- constructor(D3) {
561
- super(D3, false), ru(this, "options"), ru(this, "cursor", 0), this.options = D3.options, this.cursor = this.options.findIndex(({ value: t }) => t === D3.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
564
+ constructor(D2) {
565
+ super(D2, false), ru(this, "options"), ru(this, "cursor", 0), this.options = D2.options, this.cursor = this.options.findIndex(({ value: t }) => t === D2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
562
566
  switch (t) {
563
567
  case "left":
564
568
  case "up":
@@ -582,27 +586,27 @@ var Xu = class extends p2 {
582
586
  var eD = class extends p2 {
583
587
  get userInputWithCursor() {
584
588
  if (this.state === "submit") return this.userInput;
585
- const D3 = this.userInput;
586
- if (this.cursor >= D3.length) return `${this.userInput}\u2588`;
587
- const t = D3.slice(0, this.cursor), [s3, ...i] = D3.slice(this.cursor);
589
+ const D2 = this.userInput;
590
+ if (this.cursor >= D2.length) return `${this.userInput}\u2588`;
591
+ const t = D2.slice(0, this.cursor), [s3, ...i] = D2.slice(this.cursor);
588
592
  return `${t}${import_picocolors.default.inverse(s3)}${i.join("")}`;
589
593
  }
590
594
  get cursor() {
591
595
  return this._cursor;
592
596
  }
593
- constructor(D3) {
594
- super({ ...D3, initialUserInput: D3.initialUserInput ?? D3.initialValue }), this.on("userInput", (t) => {
597
+ constructor(D2) {
598
+ super({ ...D2, initialUserInput: D2.initialUserInput ?? D2.initialValue }), this.on("userInput", (t) => {
595
599
  this._setValue(t);
596
600
  }), this.on("finalize", () => {
597
- this.value || (this.value = D3.defaultValue), this.value === void 0 && (this.value = "");
601
+ this.value || (this.value = D2.defaultValue), this.value === void 0 && (this.value = "");
598
602
  });
599
603
  }
600
604
  };
601
- var P = (e2, D3, t) => {
602
- if (!D3.has(e2)) throw TypeError("Cannot " + t);
605
+ var P = (e2, D2, t) => {
606
+ if (!D2.has(e2)) throw TypeError("Cannot " + t);
603
607
  };
604
- var x = (e2, D3, t) => (P(e2, D3, "read from private field"), t ? t.call(e2) : D3.get(e2));
605
- var m = (e2, D3, t, s3) => (P(e2, D3, "write to private field"), s3 ? s3.call(e2, t) : D3.set(e2, t), t);
608
+ var x = (e2, D2, t) => (P(e2, D2, "read from private field"), t ? t.call(e2) : D2.get(e2));
609
+ var m = (e2, D2, t, s3) => (P(e2, D2, "write to private field"), s3 ? s3.call(e2, t) : D2.set(e2, t), t);
606
610
  var B;
607
611
  var k;
608
612
  var I;
@@ -611,22 +615,22 @@ var R;
611
615
  var ou;
612
616
  var K;
613
617
  var au;
614
- function FD(e2, D3) {
615
- if (e2 === void 0 || D3.length === 0) return 0;
616
- const t = D3.findIndex((s3) => s3.value === e2);
618
+ function FD(e2, D2) {
619
+ if (e2 === void 0 || D2.length === 0) return 0;
620
+ const t = D2.findIndex((s3) => s3.value === e2);
617
621
  return t !== -1 ? t : 0;
618
622
  }
619
- function CD(e2, D3) {
620
- if (D3) return e2 ? D3 : D3[0];
623
+ function CD(e2, D2) {
624
+ if (D2) return e2 ? D2 : D2[0];
621
625
  }
622
- B = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakSet(), ou = function(e2, D3) {
623
- const t = D3.name === "up", s3 = D3.name === "down", i = D3.name === "return";
624
- t || s3 ? (m(this, B, Math.max(0, Math.min(x(this, B) + (t ? -1 : 1), this.filteredOptions.length - 1))), this.focusedValue = this.filteredOptions[x(this, B)]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : i ? this.value = CD(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== void 0 && (D3.name === "tab" || this.isNavigating && D3.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : this.focusedValue && (this.selectedValues = [this.focusedValue]);
626
+ B = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakSet(), ou = function(e2, D2) {
627
+ const t = D2.name === "up", s3 = D2.name === "down", i = D2.name === "return";
628
+ t || s3 ? (m(this, B, Math.max(0, Math.min(x(this, B) + (t ? -1 : 1), this.filteredOptions.length - 1))), this.focusedValue = this.filteredOptions[x(this, B)]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : i ? this.value = CD(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== void 0 && (D2.name === "tab" || this.isNavigating && D2.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : this.focusedValue && (this.selectedValues = [this.focusedValue]);
625
629
  }, K = /* @__PURE__ */ new WeakSet(), au = function(e2) {
626
630
  if (e2 !== x(this, k)) {
627
631
  m(this, k, e2);
628
- const D3 = this.options;
629
- e2 ? this.filteredOptions = D3.filter((t) => x(this, I).call(this, e2, t)) : this.filteredOptions = [...D3], m(this, B, FD(this.focusedValue, this.filteredOptions)), this.focusedValue = this.filteredOptions[x(this, B)]?.value, this.multiple || (this.focusedValue !== void 0 ? this.toggleSelected(this.focusedValue) : this.deselectAll());
632
+ const D2 = this.options;
633
+ e2 ? this.filteredOptions = D2.filter((t) => x(this, I).call(this, e2, t)) : this.filteredOptions = [...D2], m(this, B, FD(this.focusedValue, this.filteredOptions)), this.focusedValue = this.filteredOptions[x(this, B)]?.value, this.multiple || (this.focusedValue !== void 0 ? this.toggleSelected(this.focusedValue) : this.deselectAll());
630
634
  }
631
635
  };
632
636
 
@@ -682,10 +686,10 @@ ${import_picocolors2.default.gray(f2)} ${t}
682
686
  };
683
687
  var J2 = ({ indicator: t = "dots", onCancel: i, output: r = process.stdout, cancelMessage: s3, errorMessage: n, frames: a = N ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: l = N ? 80 : 120, signal: c2 } = {}) => {
684
688
  const u3 = D();
685
- let $3, m3, h3 = false, g2 = false, p4 = "", d2, y3 = performance.now();
686
- const w2 = (S2) => {
687
- const I3 = S2 > 1 ? n ?? c.messages.error : s3 ?? c.messages.cancel;
688
- g2 = S2 === 1, h3 && (Z3(I3, S2), g2 && typeof i == "function" && i());
689
+ let $3, m3, h3 = false, g2 = false, p4 = "", d2, y2 = performance.now();
690
+ const w2 = (S3) => {
691
+ const I3 = S3 > 1 ? n ?? c.messages.error : s3 ?? c.messages.cancel;
692
+ g2 = S3 === 1, h3 && (Z3(I3, S3), g2 && typeof i == "function" && i());
689
693
  }, b4 = () => w2(2), M3 = () => w2(1), ge2 = () => {
690
694
  process.on("uncaughtExceptionMonitor", b4), process.on("unhandledRejection", b4), process.on("SIGINT", M3), process.on("SIGTERM", M3), process.on("exit", w2), c2 && c2.addEventListener("abort", M3);
691
695
  }, ye2 = () => {
@@ -694,14 +698,14 @@ var J2 = ({ indicator: t = "dots", onCancel: i, output: r = process.stdout, canc
694
698
  if (d2 === void 0) return;
695
699
  u3 && r.write(`
696
700
  `);
697
- const S2 = d2.split(`
701
+ const S3 = d2.split(`
698
702
  `);
699
- r.write(import_sisteransi2.cursor.move(-999, S2.length - 1)), r.write(import_sisteransi2.erase.down(S2.length));
700
- }, z3 = (S2) => S2.replace(/\.+$/, ""), Q3 = (S2) => {
701
- const I3 = (performance.now() - S2) / 1e3, _3 = Math.floor(I3 / 60), A3 = Math.floor(I3 % 60);
703
+ r.write(import_sisteransi2.cursor.move(-999, S3.length - 1)), r.write(import_sisteransi2.erase.down(S3.length));
704
+ }, z3 = (S3) => S3.replace(/\.+$/, ""), Q3 = (S3) => {
705
+ const I3 = (performance.now() - S3) / 1e3, _3 = Math.floor(I3 / 60), A3 = Math.floor(I3 % 60);
702
706
  return _3 > 0 ? `[${_3}m ${A3}s]` : `[${A3}s]`;
703
- }, ve2 = (S2 = "") => {
704
- h3 = true, $3 = Mu({ output: r }), p4 = z3(S2), y3 = performance.now(), r.write(`${import_picocolors2.default.gray(o)}
707
+ }, ve2 = (S3 = "") => {
708
+ h3 = true, $3 = Mu({ output: r }), p4 = z3(S3), y2 = performance.now(), r.write(`${import_picocolors2.default.gray(o)}
705
709
  `);
706
710
  let I3 = 0, _3 = 0;
707
711
  ge2(), m3 = setInterval(() => {
@@ -709,22 +713,22 @@ var J2 = ({ indicator: t = "dots", onCancel: i, output: r = process.stdout, canc
709
713
  Y3(), d2 = p4;
710
714
  const A3 = import_picocolors2.default.magenta(a[I3]);
711
715
  if (u3) r.write(`${A3} ${p4}...`);
712
- else if (t === "timer") r.write(`${A3} ${p4} ${Q3(y3)}`);
716
+ else if (t === "timer") r.write(`${A3} ${p4} ${Q3(y2)}`);
713
717
  else {
714
718
  const fe2 = ".".repeat(Math.floor(_3)).slice(0, 3);
715
719
  r.write(`${A3} ${p4}${fe2}`);
716
720
  }
717
721
  I3 = I3 + 1 < a.length ? I3 + 1 : 0, _3 = _3 < 4 ? _3 + 0.125 : 0;
718
722
  }, l);
719
- }, Z3 = (S2 = "", I3 = 0) => {
723
+ }, Z3 = (S3 = "", I3 = 0) => {
720
724
  h3 = false, clearInterval(m3), Y3();
721
725
  const _3 = I3 === 0 ? import_picocolors2.default.green(O2) : I3 === 1 ? import_picocolors2.default.red(G2) : import_picocolors2.default.red(F);
722
- p4 = S2 ?? p4, t === "timer" ? r.write(`${_3} ${p4} ${Q3(y3)}
726
+ p4 = S3 ?? p4, t === "timer" ? r.write(`${_3} ${p4} ${Q3(y2)}
723
727
  `) : r.write(`${_3} ${p4}
724
728
  `), ye2(), $3();
725
729
  };
726
- return { start: ve2, stop: Z3, message: (S2 = "") => {
727
- p4 = z3(S2 ?? p4);
730
+ return { start: ve2, stop: Z3, message: (S3 = "") => {
731
+ p4 = z3(S3 ?? p4);
728
732
  }, get isCancelled() {
729
733
  return g2;
730
734
  } };
@@ -768,7 +772,7 @@ var import_path = require("path");
768
772
  var import_events2 = require("events");
769
773
  var import_assert = __toESM(require("assert"), 1);
770
774
  var import_buffer = require("buffer");
771
- var ks = __toESM(require("zlib"), 1);
775
+ var Ps = __toESM(require("zlib"), 1);
772
776
  var import_zlib = __toESM(require("zlib"), 1);
773
777
  var import_node_path2 = require("node:path");
774
778
  var import_node_path3 = require("node:path");
@@ -791,51 +795,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
791
795
  var import_node_path8 = require("node:path");
792
796
  var import_node_fs6 = __toESM(require("node:fs"), 1);
793
797
  var import_node_path9 = __toESM(require("node:path"), 1);
794
- var kr = Object.defineProperty;
795
- var vr = (s3, t) => {
796
- for (var e2 in t) kr(s3, e2, { get: t[e2], enumerable: true });
798
+ var zr = Object.defineProperty;
799
+ var Ur = (s3, t) => {
800
+ for (var e2 in t) zr(s3, e2, { get: t[e2], enumerable: true });
797
801
  };
798
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
799
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D2 || s3 instanceof import_node_stream.default || Pr(s3) || zr(s3));
800
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
801
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
802
- var q3 = /* @__PURE__ */ Symbol("EOF");
803
- var j2 = /* @__PURE__ */ Symbol("maybeEmitEnd");
804
- var rt = /* @__PURE__ */ Symbol("emittedEnd");
805
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
806
- var jt = /* @__PURE__ */ Symbol("emittedError");
802
+ var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
803
+ var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A2 || s3 instanceof import_node_stream.default || Gr(s3) || Zr(s3));
804
+ var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
805
+ var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
806
+ var Q2 = /* @__PURE__ */ Symbol("EOF");
807
+ var J3 = /* @__PURE__ */ Symbol("maybeEmitEnd");
808
+ var nt = /* @__PURE__ */ Symbol("emittedEnd");
809
+ var De = /* @__PURE__ */ Symbol("emittingEnd");
810
+ var qt = /* @__PURE__ */ Symbol("emittedError");
807
811
  var Ne = /* @__PURE__ */ Symbol("closed");
808
- var Ts = /* @__PURE__ */ Symbol("read");
812
+ var Ns = /* @__PURE__ */ Symbol("read");
809
813
  var Ae = /* @__PURE__ */ Symbol("flush");
810
- var xs = /* @__PURE__ */ Symbol("flushChunk");
814
+ var As = /* @__PURE__ */ Symbol("flushChunk");
811
815
  var z2 = /* @__PURE__ */ Symbol("encoding");
812
816
  var Mt = /* @__PURE__ */ Symbol("decoder");
813
- var b3 = /* @__PURE__ */ Symbol("flowing");
817
+ var g = /* @__PURE__ */ Symbol("flowing");
814
818
  var Qt = /* @__PURE__ */ Symbol("paused");
815
819
  var Bt = /* @__PURE__ */ Symbol("resume");
816
- var _2 = /* @__PURE__ */ Symbol("buffer");
817
- var A2 = /* @__PURE__ */ Symbol("pipes");
818
- var g = /* @__PURE__ */ Symbol("bufferLength");
819
- var yi = /* @__PURE__ */ Symbol("bufferPush");
820
- var De = /* @__PURE__ */ Symbol("bufferShift");
820
+ var b3 = /* @__PURE__ */ Symbol("buffer");
821
+ var N2 = /* @__PURE__ */ Symbol("pipes");
822
+ var _2 = /* @__PURE__ */ Symbol("bufferLength");
823
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
824
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
821
825
  var L3 = /* @__PURE__ */ Symbol("objectMode");
822
- var w = /* @__PURE__ */ Symbol("destroyed");
823
- var Ri = /* @__PURE__ */ Symbol("error");
824
- var bi = /* @__PURE__ */ Symbol("emitData");
825
- var Ls = /* @__PURE__ */ Symbol("emitEnd");
826
- var _i = /* @__PURE__ */ Symbol("emitEnd2");
826
+ var S2 = /* @__PURE__ */ Symbol("destroyed");
827
+ var _i = /* @__PURE__ */ Symbol("error");
828
+ var Oi = /* @__PURE__ */ Symbol("emitData");
829
+ var Is = /* @__PURE__ */ Symbol("emitEnd");
830
+ var Ti = /* @__PURE__ */ Symbol("emitEnd2");
827
831
  var Z2 = /* @__PURE__ */ Symbol("async");
828
- var gi = /* @__PURE__ */ Symbol("abort");
829
- var Ie = /* @__PURE__ */ Symbol("aborted");
832
+ var xi = /* @__PURE__ */ Symbol("abort");
833
+ var Ce = /* @__PURE__ */ Symbol("aborted");
830
834
  var Jt = /* @__PURE__ */ Symbol("signal");
831
- var yt = /* @__PURE__ */ Symbol("dataListeners");
835
+ var Rt = /* @__PURE__ */ Symbol("dataListeners");
832
836
  var C3 = /* @__PURE__ */ Symbol("discarded");
833
- var te = (s3) => Promise.resolve().then(s3);
834
- var Ur = (s3) => s3();
835
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
836
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
837
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
838
- var Ce = class {
837
+ var jt = (s3) => Promise.resolve().then(s3);
838
+ var Yr = (s3) => s3();
839
+ var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
840
+ var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
841
+ var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
842
+ var Fe2 = class {
839
843
  src;
840
844
  dest;
841
845
  opts;
@@ -852,7 +856,7 @@ var Ce = class {
852
856
  this.unpipe(), this.opts.end && this.dest.end();
853
857
  }
854
858
  };
855
- var Oi = class extends Ce {
859
+ var Li = class extends Fe2 {
856
860
  unpipe() {
857
861
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
858
862
  }
@@ -860,39 +864,39 @@ var Oi = class extends Ce {
860
864
  super(t, e2, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
861
865
  }
862
866
  };
863
- var Zr = (s3) => !!s3.objectMode;
864
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
865
- var D2 = class extends import_node_events.EventEmitter {
866
- [b3] = false;
867
+ var Xr = (s3) => !!s3.objectMode;
868
+ var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
869
+ var A2 = class extends import_node_events.EventEmitter {
870
+ [g] = false;
867
871
  [Qt] = false;
868
- [A2] = [];
869
- [_2] = [];
872
+ [N2] = [];
873
+ [b3] = [];
870
874
  [L3];
871
875
  [z2];
872
876
  [Z2];
873
877
  [Mt];
874
- [q3] = false;
875
- [rt] = false;
876
- [Le] = false;
878
+ [Q2] = false;
879
+ [nt] = false;
880
+ [De] = false;
877
881
  [Ne] = false;
878
- [jt] = null;
879
- [g] = 0;
880
- [w] = false;
882
+ [qt] = null;
883
+ [_2] = 0;
884
+ [S2] = false;
881
885
  [Jt];
882
- [Ie] = false;
883
- [yt] = 0;
886
+ [Ce] = false;
887
+ [Rt] = 0;
884
888
  [C3] = false;
885
889
  writable = true;
886
890
  readable = true;
887
891
  constructor(...t) {
888
892
  let e2 = t[0] || {};
889
893
  if (super(), e2.objectMode && typeof e2.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
890
- Zr(e2) ? (this[L3] = true, this[z2] = null) : Yr(e2) ? (this[z2] = e2.encoding, this[L3] = false) : (this[L3] = false, this[z2] = null), this[Z2] = !!e2.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e2 && e2.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_2] }), e2 && e2.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A2] });
894
+ Xr(e2) ? (this[L3] = true, this[z2] = null) : qr(e2) ? (this[z2] = e2.encoding, this[L3] = false) : (this[L3] = false, this[z2] = null), this[Z2] = !!e2.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e2 && e2.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b3] }), e2 && e2.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N2] });
891
895
  let { signal: i } = e2;
892
- i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
896
+ i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
893
897
  }
894
898
  get bufferLength() {
895
- return this[g];
899
+ return this[_2];
896
900
  }
897
901
  get encoding() {
898
902
  return this[z2];
@@ -915,99 +919,99 @@ var D2 = class extends import_node_events.EventEmitter {
915
919
  set async(t) {
916
920
  this[Z2] = this[Z2] || !!t;
917
921
  }
918
- [gi]() {
919
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
922
+ [xi]() {
923
+ this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
920
924
  }
921
925
  get aborted() {
922
- return this[Ie];
926
+ return this[Ce];
923
927
  }
924
928
  set aborted(t) {
925
929
  }
926
930
  write(t, e2, i) {
927
- if (this[Ie]) return false;
928
- if (this[q3]) throw new Error("write after end");
929
- if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
931
+ if (this[Ce]) return false;
932
+ if (this[Q2]) throw new Error("write after end");
933
+ if (this[S2]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
930
934
  typeof e2 == "function" && (i = e2, e2 = "utf8"), e2 || (e2 = "utf8");
931
- let r = this[Z2] ? te : Ur;
935
+ let r = this[Z2] ? jt : Yr;
932
936
  if (!this[L3] && !Buffer.isBuffer(t)) {
933
- if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
934
- else if (Wr(t)) t = Buffer.from(t);
937
+ if ($r(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
938
+ else if (Vr(t)) t = Buffer.from(t);
935
939
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
936
940
  }
937
- return this[L3] ? (this[b3] && this[g] !== 0 && this[Ae](true), this[b3] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b3]) : t.length ? (typeof t == "string" && !(e2 === this[z2] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e2)), Buffer.isBuffer(t) && this[z2] && (t = this[Mt].write(t)), this[b3] && this[g] !== 0 && this[Ae](true), this[b3] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b3]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b3]);
941
+ return this[L3] ? (this[g] && this[_2] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_2] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e2 === this[z2] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e2)), Buffer.isBuffer(t) && this[z2] && (t = this[Mt].write(t)), this[g] && this[_2] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_2] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_2] !== 0 && this.emit("readable"), i && r(i), this[g]);
938
942
  }
939
943
  read(t) {
940
- if (this[w]) return null;
941
- if (this[C3] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j2](), null;
942
- this[L3] && (t = null), this[_2].length > 1 && !this[L3] && (this[_2] = [this[z2] ? this[_2].join("") : Buffer.concat(this[_2], this[g])]);
943
- let e2 = this[Ts](t || null, this[_2][0]);
944
- return this[j2](), e2;
945
- }
946
- [Ts](t, e2) {
947
- if (this[L3]) this[De]();
944
+ if (this[S2]) return null;
945
+ if (this[C3] = false, this[_2] === 0 || t === 0 || t && t > this[_2]) return this[J3](), null;
946
+ this[L3] && (t = null), this[b3].length > 1 && !this[L3] && (this[b3] = [this[z2] ? this[b3].join("") : Buffer.concat(this[b3], this[_2])]);
947
+ let e2 = this[Ns](t || null, this[b3][0]);
948
+ return this[J3](), e2;
949
+ }
950
+ [Ns](t, e2) {
951
+ if (this[L3]) this[Ie]();
948
952
  else {
949
953
  let i = e2;
950
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_2][0] = i.slice(t), e2 = i.slice(0, t), this[g] -= t) : (this[_2][0] = i.subarray(t), e2 = i.subarray(0, t), this[g] -= t);
954
+ t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b3][0] = i.slice(t), e2 = i.slice(0, t), this[_2] -= t) : (this[b3][0] = i.subarray(t), e2 = i.subarray(0, t), this[_2] -= t);
951
955
  }
952
- return this.emit("data", e2), !this[_2].length && !this[q3] && this.emit("drain"), e2;
956
+ return this.emit("data", e2), !this[b3].length && !this[Q2] && this.emit("drain"), e2;
953
957
  }
954
958
  end(t, e2, i) {
955
- return typeof t == "function" && (i = t, t = void 0), typeof e2 == "function" && (i = e2, e2 = "utf8"), t !== void 0 && this.write(t, e2), i && this.once("end", i), this[q3] = true, this.writable = false, (this[b3] || !this[Qt]) && this[j2](), this;
959
+ return typeof t == "function" && (i = t, t = void 0), typeof e2 == "function" && (i = e2, e2 = "utf8"), t !== void 0 && this.write(t, e2), i && this.once("end", i), this[Q2] = true, this.writable = false, (this[g] || !this[Qt]) && this[J3](), this;
956
960
  }
957
961
  [Bt]() {
958
- this[w] || (!this[yt] && !this[A2].length && (this[C3] = true), this[Qt] = false, this[b3] = true, this.emit("resume"), this[_2].length ? this[Ae]() : this[q3] ? this[j2]() : this.emit("drain"));
962
+ this[S2] || (!this[Rt] && !this[N2].length && (this[C3] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b3].length ? this[Ae]() : this[Q2] ? this[J3]() : this.emit("drain"));
959
963
  }
960
964
  resume() {
961
965
  return this[Bt]();
962
966
  }
963
967
  pause() {
964
- this[b3] = false, this[Qt] = true, this[C3] = false;
968
+ this[g] = false, this[Qt] = true, this[C3] = false;
965
969
  }
966
970
  get destroyed() {
967
- return this[w];
971
+ return this[S2];
968
972
  }
969
973
  get flowing() {
970
- return this[b3];
974
+ return this[g];
971
975
  }
972
976
  get paused() {
973
977
  return this[Qt];
974
978
  }
975
- [yi](t) {
976
- this[L3] ? this[g] += 1 : this[g] += t.length, this[_2].push(t);
979
+ [bi](t) {
980
+ this[L3] ? this[_2] += 1 : this[_2] += t.length, this[b3].push(t);
977
981
  }
978
- [De]() {
979
- return this[L3] ? this[g] -= 1 : this[g] -= this[_2][0].length, this[_2].shift();
982
+ [Ie]() {
983
+ return this[L3] ? this[_2] -= 1 : this[_2] -= this[b3][0].length, this[b3].shift();
980
984
  }
981
985
  [Ae](t = false) {
982
986
  do
983
987
  ;
984
- while (this[xs](this[De]()) && this[_2].length);
985
- !t && !this[_2].length && !this[q3] && this.emit("drain");
988
+ while (this[As](this[Ie]()) && this[b3].length);
989
+ !t && !this[b3].length && !this[Q2] && this.emit("drain");
986
990
  }
987
- [xs](t) {
988
- return this.emit("data", t), this[b3];
991
+ [As](t) {
992
+ return this.emit("data", t), this[g];
989
993
  }
990
994
  pipe(t, e2) {
991
- if (this[w]) return t;
995
+ if (this[S2]) return t;
992
996
  this[C3] = false;
993
- let i = this[rt];
994
- return e2 = e2 || {}, t === Os.stdout || t === Os.stderr ? e2.end = false : e2.end = e2.end !== false, e2.proxyErrors = !!e2.proxyErrors, i ? e2.end && t.end() : (this[A2].push(e2.proxyErrors ? new Oi(this, t, e2) : new Ce(this, t, e2)), this[Z2] ? te(() => this[Bt]()) : this[Bt]()), t;
997
+ let i = this[nt];
998
+ return e2 = e2 || {}, t === Ds.stdout || t === Ds.stderr ? e2.end = false : e2.end = e2.end !== false, e2.proxyErrors = !!e2.proxyErrors, i ? e2.end && t.end() : (this[N2].push(e2.proxyErrors ? new Li(this, t, e2) : new Fe2(this, t, e2)), this[Z2] ? jt(() => this[Bt]()) : this[Bt]()), t;
995
999
  }
996
1000
  unpipe(t) {
997
- let e2 = this[A2].find((i) => i.dest === t);
998
- e2 && (this[A2].length === 1 ? (this[b3] && this[yt] === 0 && (this[b3] = false), this[A2] = []) : this[A2].splice(this[A2].indexOf(e2), 1), e2.unpipe());
1001
+ let e2 = this[N2].find((i) => i.dest === t);
1002
+ e2 && (this[N2].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N2] = []) : this[N2].splice(this[N2].indexOf(e2), 1), e2.unpipe());
999
1003
  }
1000
1004
  addListener(t, e2) {
1001
1005
  return this.on(t, e2);
1002
1006
  }
1003
1007
  on(t, e2) {
1004
1008
  let i = super.on(t, e2);
1005
- if (t === "data") this[C3] = false, this[yt]++, !this[A2].length && !this[b3] && this[Bt]();
1006
- else if (t === "readable" && this[g] !== 0) super.emit("readable");
1007
- else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
1008
- else if (t === "error" && this[jt]) {
1009
+ if (t === "data") this[C3] = false, this[Rt]++, !this[N2].length && !this[g] && this[Bt]();
1010
+ else if (t === "readable" && this[_2] !== 0) super.emit("readable");
1011
+ else if (Kr(t) && this[nt]) super.emit(t), this.removeAllListeners(t);
1012
+ else if (t === "error" && this[qt]) {
1009
1013
  let r = e2;
1010
- this[Z2] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
1014
+ this[Z2] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
1011
1015
  }
1012
1016
  return i;
1013
1017
  }
@@ -1016,58 +1020,58 @@ var D2 = class extends import_node_events.EventEmitter {
1016
1020
  }
1017
1021
  off(t, e2) {
1018
1022
  let i = super.off(t, e2);
1019
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C3] && !this[A2].length && (this[b3] = false)), i;
1023
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C3] && !this[N2].length && (this[g] = false)), i;
1020
1024
  }
1021
1025
  removeAllListeners(t) {
1022
1026
  let e2 = super.removeAllListeners(t);
1023
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C3] && !this[A2].length && (this[b3] = false)), e2;
1027
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C3] && !this[N2].length && (this[g] = false)), e2;
1024
1028
  }
1025
1029
  get emittedEnd() {
1026
- return this[rt];
1030
+ return this[nt];
1027
1031
  }
1028
- [j2]() {
1029
- !this[Le] && !this[rt] && !this[w] && this[_2].length === 0 && this[q3] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
1032
+ [J3]() {
1033
+ !this[De] && !this[nt] && !this[S2] && this[b3].length === 0 && this[Q2] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
1030
1034
  }
1031
1035
  emit(t, ...e2) {
1032
1036
  let i = e2[0];
1033
- if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
1034
- if (t === "data") return !this[L3] && !i ? false : this[Z2] ? (te(() => this[bi](i)), true) : this[bi](i);
1035
- if (t === "end") return this[Ls]();
1037
+ if (t !== "error" && t !== "close" && t !== S2 && this[S2]) return false;
1038
+ if (t === "data") return !this[L3] && !i ? false : this[Z2] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
1039
+ if (t === "end") return this[Is]();
1036
1040
  if (t === "close") {
1037
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
1041
+ if (this[Ne] = true, !this[nt] && !this[S2]) return false;
1038
1042
  let n = super.emit("close");
1039
1043
  return this.removeAllListeners("close"), n;
1040
1044
  } else if (t === "error") {
1041
- this[jt] = i, super.emit(Ri, i);
1045
+ this[qt] = i, super.emit(_i, i);
1042
1046
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
1043
- return this[j2](), n;
1047
+ return this[J3](), n;
1044
1048
  } else if (t === "resume") {
1045
1049
  let n = super.emit("resume");
1046
- return this[j2](), n;
1050
+ return this[J3](), n;
1047
1051
  } else if (t === "finish" || t === "prefinish") {
1048
1052
  let n = super.emit(t);
1049
1053
  return this.removeAllListeners(t), n;
1050
1054
  }
1051
1055
  let r = super.emit(t, ...e2);
1052
- return this[j2](), r;
1056
+ return this[J3](), r;
1053
1057
  }
1054
- [bi](t) {
1055
- for (let i of this[A2]) i.dest.write(t) === false && this.pause();
1058
+ [Oi](t) {
1059
+ for (let i of this[N2]) i.dest.write(t) === false && this.pause();
1056
1060
  let e2 = this[C3] ? false : super.emit("data", t);
1057
- return this[j2](), e2;
1061
+ return this[J3](), e2;
1058
1062
  }
1059
- [Ls]() {
1060
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z2] ? (te(() => this[_i]()), true) : this[_i]());
1063
+ [Is]() {
1064
+ return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z2] ? (jt(() => this[Ti]()), true) : this[Ti]());
1061
1065
  }
1062
- [_i]() {
1066
+ [Ti]() {
1063
1067
  if (this[Mt]) {
1064
1068
  let e2 = this[Mt].end();
1065
1069
  if (e2) {
1066
- for (let i of this[A2]) i.dest.write(e2);
1070
+ for (let i of this[N2]) i.dest.write(e2);
1067
1071
  this[C3] || super.emit("data", e2);
1068
1072
  }
1069
1073
  }
1070
- for (let e2 of this[A2]) e2.end();
1074
+ for (let e2 of this[N2]) e2.end();
1071
1075
  let t = super.emit("end");
1072
1076
  return this.removeAllListeners("end"), t;
1073
1077
  }
@@ -1086,7 +1090,7 @@ var D2 = class extends import_node_events.EventEmitter {
1086
1090
  }
1087
1091
  async promise() {
1088
1092
  return new Promise((t, e2) => {
1089
- this.on(w, () => e2(new Error("stream destroyed"))), this.on("error", (i) => e2(i)), this.on("end", () => t());
1093
+ this.on(S2, () => e2(new Error("stream destroyed"))), this.on("error", (i) => e2(i)), this.on("end", () => t());
1090
1094
  });
1091
1095
  }
1092
1096
  [Symbol.asyncIterator]() {
@@ -1096,16 +1100,16 @@ var D2 = class extends import_node_events.EventEmitter {
1096
1100
  if (t) return e2();
1097
1101
  let r = this.read();
1098
1102
  if (r !== null) return Promise.resolve({ done: false, value: r });
1099
- if (this[q3]) return e2();
1103
+ if (this[Q2]) return e2();
1100
1104
  let n, o2, h3 = (d2) => {
1101
- this.off("data", a), this.off("end", l), this.off(w, c2), e2(), o2(d2);
1105
+ this.off("data", a), this.off("end", l), this.off(S2, c2), e2(), o2(d2);
1102
1106
  }, a = (d2) => {
1103
- this.off("error", h3), this.off("end", l), this.off(w, c2), this.pause(), n({ value: d2, done: !!this[q3] });
1107
+ this.off("error", h3), this.off("end", l), this.off(S2, c2), this.pause(), n({ value: d2, done: !!this[Q2] });
1104
1108
  }, l = () => {
1105
- this.off("error", h3), this.off("data", a), this.off(w, c2), e2(), n({ done: true, value: void 0 });
1109
+ this.off("error", h3), this.off("data", a), this.off(S2, c2), e2(), n({ done: true, value: void 0 });
1106
1110
  }, c2 = () => h3(new Error("stream destroyed"));
1107
- return new Promise((d2, S2) => {
1108
- o2 = S2, n = d2, this.once(w, c2), this.once("error", h3), this.once("end", l), this.once("data", a);
1111
+ return new Promise((d2, y2) => {
1112
+ o2 = y2, n = d2, this.once(S2, c2), this.once("error", h3), this.once("end", l), this.once("data", a);
1109
1113
  });
1110
1114
  }, throw: e2, return: e2, [Symbol.asyncIterator]() {
1111
1115
  return this;
@@ -1114,67 +1118,67 @@ var D2 = class extends import_node_events.EventEmitter {
1114
1118
  }
1115
1119
  [Symbol.iterator]() {
1116
1120
  this[C3] = false;
1117
- let t = false, e2 = () => (this.pause(), this.off(Ri, e2), this.off(w, e2), this.off("end", e2), t = true, { done: true, value: void 0 }), i = () => {
1121
+ let t = false, e2 = () => (this.pause(), this.off(_i, e2), this.off(S2, e2), this.off("end", e2), t = true, { done: true, value: void 0 }), i = () => {
1118
1122
  if (t) return e2();
1119
1123
  let r = this.read();
1120
1124
  return r === null ? e2() : { done: false, value: r };
1121
1125
  };
1122
- return this.once("end", e2), this.once(Ri, e2), this.once(w, e2), { next: i, throw: e2, return: e2, [Symbol.iterator]() {
1126
+ return this.once("end", e2), this.once(_i, e2), this.once(S2, e2), { next: i, throw: e2, return: e2, [Symbol.iterator]() {
1123
1127
  return this;
1124
1128
  }, [Symbol.dispose]: () => {
1125
1129
  } };
1126
1130
  }
1127
1131
  destroy(t) {
1128
- if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
1129
- this[w] = true, this[C3] = true, this[_2].length = 0, this[g] = 0;
1132
+ if (this[S2]) return t ? this.emit("error", t) : this.emit(S2), this;
1133
+ this[S2] = true, this[C3] = true, this[b3].length = 0, this[_2] = 0;
1130
1134
  let e2 = this;
1131
- return typeof e2.close == "function" && !this[Ne] && e2.close(), t ? this.emit("error", t) : this.emit(w), this;
1135
+ return typeof e2.close == "function" && !this[Ne] && e2.close(), t ? this.emit("error", t) : this.emit(S2), this;
1132
1136
  }
1133
1137
  static get isStream() {
1134
- return Br;
1138
+ return Wr;
1135
1139
  }
1136
1140
  };
1137
- var Vr = import_fs.default.writev;
1138
- var ot = /* @__PURE__ */ Symbol("_autoClose");
1141
+ var Jr = import_fs.default.writev;
1142
+ var ht = /* @__PURE__ */ Symbol("_autoClose");
1139
1143
  var H3 = /* @__PURE__ */ Symbol("_close");
1140
- var ee = /* @__PURE__ */ Symbol("_ended");
1144
+ var te = /* @__PURE__ */ Symbol("_ended");
1141
1145
  var m2 = /* @__PURE__ */ Symbol("_fd");
1142
- var xi = /* @__PURE__ */ Symbol("_finished");
1143
- var J3 = /* @__PURE__ */ Symbol("_flags");
1144
- var Li = /* @__PURE__ */ Symbol("_flush");
1145
- var Ii = /* @__PURE__ */ Symbol("_handleChunk");
1146
- var Ci = /* @__PURE__ */ Symbol("_makeBuf");
1147
- var se = /* @__PURE__ */ Symbol("_mode");
1148
- var Fe2 = /* @__PURE__ */ Symbol("_needDrain");
1146
+ var Ni = /* @__PURE__ */ Symbol("_finished");
1147
+ var tt = /* @__PURE__ */ Symbol("_flags");
1148
+ var Ai = /* @__PURE__ */ Symbol("_flush");
1149
+ var ki = /* @__PURE__ */ Symbol("_handleChunk");
1150
+ var vi = /* @__PURE__ */ Symbol("_makeBuf");
1151
+ var ie2 = /* @__PURE__ */ Symbol("_mode");
1152
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
1149
1153
  var Ut = /* @__PURE__ */ Symbol("_onerror");
1150
1154
  var Ht = /* @__PURE__ */ Symbol("_onopen");
1151
- var Ni = /* @__PURE__ */ Symbol("_onread");
1155
+ var Ii = /* @__PURE__ */ Symbol("_onread");
1152
1156
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
1153
- var ht = /* @__PURE__ */ Symbol("_open");
1157
+ var at = /* @__PURE__ */ Symbol("_open");
1154
1158
  var U3 = /* @__PURE__ */ Symbol("_path");
1155
- var nt = /* @__PURE__ */ Symbol("_pos");
1159
+ var ot = /* @__PURE__ */ Symbol("_pos");
1156
1160
  var Y2 = /* @__PURE__ */ Symbol("_queue");
1157
1161
  var zt = /* @__PURE__ */ Symbol("_read");
1158
- var Ai = /* @__PURE__ */ Symbol("_readSize");
1159
- var Q2 = /* @__PURE__ */ Symbol("_reading");
1160
- var ie2 = /* @__PURE__ */ Symbol("_remain");
1161
- var Di = /* @__PURE__ */ Symbol("_size");
1162
- var ke = /* @__PURE__ */ Symbol("_write");
1163
- var Rt = /* @__PURE__ */ Symbol("_writing");
1164
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
1162
+ var Ci = /* @__PURE__ */ Symbol("_readSize");
1163
+ var j2 = /* @__PURE__ */ Symbol("_reading");
1164
+ var ee = /* @__PURE__ */ Symbol("_remain");
1165
+ var Fi = /* @__PURE__ */ Symbol("_size");
1166
+ var ve = /* @__PURE__ */ Symbol("_write");
1167
+ var gt = /* @__PURE__ */ Symbol("_writing");
1168
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
1165
1169
  var bt = /* @__PURE__ */ Symbol("_errored");
1166
- var _t = class extends D2 {
1170
+ var _t = class extends A2 {
1167
1171
  [bt] = false;
1168
1172
  [m2];
1169
1173
  [U3];
1170
- [Ai];
1171
- [Q2] = false;
1172
- [Di];
1173
- [ie2];
1174
- [ot];
1174
+ [Ci];
1175
+ [j2] = false;
1176
+ [Fi];
1177
+ [ee];
1178
+ [ht];
1175
1179
  constructor(t, e2) {
1176
1180
  if (e2 = e2 || {}, super(e2), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
1177
- this[bt] = false, this[m2] = typeof e2.fd == "number" ? e2.fd : void 0, this[U3] = t, this[Ai] = e2.readSize || 16 * 1024 * 1024, this[Q2] = false, this[Di] = typeof e2.size == "number" ? e2.size : 1 / 0, this[ie2] = this[Di], this[ot] = typeof e2.autoClose == "boolean" ? e2.autoClose : true, typeof this[m2] == "number" ? this[zt]() : this[ht]();
1181
+ this[bt] = false, this[m2] = typeof e2.fd == "number" ? e2.fd : void 0, this[U3] = t, this[Ci] = e2.readSize || 16 * 1024 * 1024, this[j2] = false, this[Fi] = typeof e2.size == "number" ? e2.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e2.autoClose == "boolean" ? e2.autoClose : true, typeof this[m2] == "number" ? this[zt]() : this[at]();
1178
1182
  }
1179
1183
  get fd() {
1180
1184
  return this[m2];
@@ -1188,38 +1192,38 @@ var _t = class extends D2 {
1188
1192
  end() {
1189
1193
  throw new TypeError("this is a readable stream");
1190
1194
  }
1191
- [ht]() {
1195
+ [at]() {
1192
1196
  import_fs.default.open(this[U3], "r", (t, e2) => this[Ht](t, e2));
1193
1197
  }
1194
1198
  [Ht](t, e2) {
1195
1199
  t ? this[Ut](t) : (this[m2] = e2, this.emit("open", e2), this[zt]());
1196
1200
  }
1197
- [Ci]() {
1198
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie2]));
1201
+ [vi]() {
1202
+ return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
1199
1203
  }
1200
1204
  [zt]() {
1201
- if (!this[Q2]) {
1202
- this[Q2] = true;
1203
- let t = this[Ci]();
1204
- if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
1205
- import_fs.default.read(this[m2], t, 0, t.length, null, (e2, i, r) => this[Ni](e2, i, r));
1205
+ if (!this[j2]) {
1206
+ this[j2] = true;
1207
+ let t = this[vi]();
1208
+ if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
1209
+ import_fs.default.read(this[m2], t, 0, t.length, null, (e2, i, r) => this[Ii](e2, i, r));
1206
1210
  }
1207
1211
  }
1208
- [Ni](t, e2, i) {
1209
- this[Q2] = false, t ? this[Ut](t) : this[Ii](e2, i) && this[zt]();
1212
+ [Ii](t, e2, i) {
1213
+ this[j2] = false, t ? this[Ut](t) : this[ki](e2, i) && this[zt]();
1210
1214
  }
1211
1215
  [H3]() {
1212
- if (this[ot] && typeof this[m2] == "number") {
1216
+ if (this[ht] && typeof this[m2] == "number") {
1213
1217
  let t = this[m2];
1214
1218
  this[m2] = void 0, import_fs.default.close(t, (e2) => e2 ? this.emit("error", e2) : this.emit("close"));
1215
1219
  }
1216
1220
  }
1217
1221
  [Ut](t) {
1218
- this[Q2] = true, this[H3](), this.emit("error", t);
1222
+ this[j2] = true, this[H3](), this.emit("error", t);
1219
1223
  }
1220
- [Ii](t, e2) {
1224
+ [ki](t, e2) {
1221
1225
  let i = false;
1222
- return this[ie2] -= t, t > 0 && (i = super.write(t < e2.length ? e2.subarray(0, t) : e2)), (t === 0 || this[ie2] <= 0) && (i = false, this[H3](), super.end()), i;
1226
+ return this[ee] -= t, t > 0 && (i = super.write(t < e2.length ? e2.subarray(0, t) : e2)), (t === 0 || this[ee] <= 0) && (i = false, this[H3](), super.end()), i;
1223
1227
  }
1224
1228
  emit(t, ...e2) {
1225
1229
  switch (t) {
@@ -1235,8 +1239,8 @@ var _t = class extends D2 {
1235
1239
  }
1236
1240
  }
1237
1241
  };
1238
- var Me = class extends _t {
1239
- [ht]() {
1242
+ var Be = class extends _t {
1243
+ [at]() {
1240
1244
  let t = true;
1241
1245
  try {
1242
1246
  this[Ht](null, import_fs.default.openSync(this[U3], "r")), t = false;
@@ -1247,13 +1251,13 @@ var Me = class extends _t {
1247
1251
  [zt]() {
1248
1252
  let t = true;
1249
1253
  try {
1250
- if (!this[Q2]) {
1251
- this[Q2] = true;
1254
+ if (!this[j2]) {
1255
+ this[j2] = true;
1252
1256
  do {
1253
- let e2 = this[Ci](), i = e2.length === 0 ? 0 : import_fs.default.readSync(this[m2], e2, 0, e2.length, null);
1254
- if (!this[Ii](i, e2)) break;
1257
+ let e2 = this[vi](), i = e2.length === 0 ? 0 : import_fs.default.readSync(this[m2], e2, 0, e2.length, null);
1258
+ if (!this[ki](i, e2)) break;
1255
1259
  } while (true);
1256
- this[Q2] = false;
1260
+ this[j2] = false;
1257
1261
  }
1258
1262
  t = false;
1259
1263
  } finally {
@@ -1261,32 +1265,32 @@ var Me = class extends _t {
1261
1265
  }
1262
1266
  }
1263
1267
  [H3]() {
1264
- if (this[ot] && typeof this[m2] == "number") {
1268
+ if (this[ht] && typeof this[m2] == "number") {
1265
1269
  let t = this[m2];
1266
1270
  this[m2] = void 0, import_fs.default.closeSync(t), this.emit("close");
1267
1271
  }
1268
1272
  }
1269
1273
  };
1270
- var tt = class extends import_events.default {
1274
+ var et2 = class extends import_events.default {
1271
1275
  readable = false;
1272
1276
  writable = true;
1273
1277
  [bt] = false;
1274
- [Rt] = false;
1275
- [ee] = false;
1278
+ [gt] = false;
1279
+ [te] = false;
1276
1280
  [Y2] = [];
1277
- [Fe2] = false;
1281
+ [ke] = false;
1278
1282
  [U3];
1279
- [se];
1280
- [ot];
1283
+ [ie2];
1284
+ [ht];
1281
1285
  [m2];
1282
- [ve];
1283
- [J3];
1284
- [xi] = false;
1285
- [nt];
1286
+ [Me];
1287
+ [tt];
1288
+ [Ni] = false;
1289
+ [ot];
1286
1290
  constructor(t, e2) {
1287
- e2 = e2 || {}, super(e2), this[U3] = t, this[m2] = typeof e2.fd == "number" ? e2.fd : void 0, this[se] = e2.mode === void 0 ? 438 : e2.mode, this[nt] = typeof e2.start == "number" ? e2.start : void 0, this[ot] = typeof e2.autoClose == "boolean" ? e2.autoClose : true;
1288
- let i = this[nt] !== void 0 ? "r+" : "w";
1289
- this[ve] = e2.flags === void 0, this[J3] = e2.flags === void 0 ? i : e2.flags, this[m2] === void 0 && this[ht]();
1291
+ e2 = e2 || {}, super(e2), this[U3] = t, this[m2] = typeof e2.fd == "number" ? e2.fd : void 0, this[ie2] = e2.mode === void 0 ? 438 : e2.mode, this[ot] = typeof e2.start == "number" ? e2.start : void 0, this[ht] = typeof e2.autoClose == "boolean" ? e2.autoClose : true;
1292
+ let i = this[ot] !== void 0 ? "r+" : "w";
1293
+ this[Me] = e2.flags === void 0, this[tt] = e2.flags === void 0 ? i : e2.flags, this[m2] === void 0 && this[at]();
1290
1294
  }
1291
1295
  emit(t, ...e2) {
1292
1296
  if (t === "error") {
@@ -1302,63 +1306,63 @@ var tt = class extends import_events.default {
1302
1306
  return this[U3];
1303
1307
  }
1304
1308
  [Ut](t) {
1305
- this[H3](), this[Rt] = true, this.emit("error", t);
1309
+ this[H3](), this[gt] = true, this.emit("error", t);
1306
1310
  }
1307
- [ht]() {
1308
- import_fs.default.open(this[U3], this[J3], this[se], (t, e2) => this[Ht](t, e2));
1311
+ [at]() {
1312
+ import_fs.default.open(this[U3], this[tt], this[ie2], (t, e2) => this[Ht](t, e2));
1309
1313
  }
1310
1314
  [Ht](t, e2) {
1311
- this[ve] && this[J3] === "r+" && t && t.code === "ENOENT" ? (this[J3] = "w", this[ht]()) : t ? this[Ut](t) : (this[m2] = e2, this.emit("open", e2), this[Rt] || this[Li]());
1315
+ this[Me] && this[tt] === "r+" && t && t.code === "ENOENT" ? (this[tt] = "w", this[at]()) : t ? this[Ut](t) : (this[m2] = e2, this.emit("open", e2), this[gt] || this[Ai]());
1312
1316
  }
1313
1317
  end(t, e2) {
1314
- return t && this.write(t, e2), this[ee] = true, !this[Rt] && !this[Y2].length && typeof this[m2] == "number" && this[Pt](null, 0), this;
1318
+ return t && this.write(t, e2), this[te] = true, !this[gt] && !this[Y2].length && typeof this[m2] == "number" && this[Pt](null, 0), this;
1315
1319
  }
1316
1320
  write(t, e2) {
1317
- return typeof t == "string" && (t = Buffer.from(t, e2)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m2] === void 0 || this[Rt] || this[Y2].length ? (this[Y2].push(t), this[Fe2] = true, false) : (this[Rt] = true, this[ke](t), true);
1321
+ return typeof t == "string" && (t = Buffer.from(t, e2)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m2] === void 0 || this[gt] || this[Y2].length ? (this[Y2].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
1318
1322
  }
1319
- [ke](t) {
1320
- import_fs.default.write(this[m2], t, 0, t.length, this[nt], (e2, i) => this[Pt](e2, i));
1323
+ [ve](t) {
1324
+ import_fs.default.write(this[m2], t, 0, t.length, this[ot], (e2, i) => this[Pt](e2, i));
1321
1325
  }
1322
1326
  [Pt](t, e2) {
1323
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e2 == "number" && (this[nt] += e2), this[Y2].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H3](), this.emit("finish")) : this[Fe2] && (this[Fe2] = false, this.emit("drain"))));
1327
+ t ? this[Ut](t) : (this[ot] !== void 0 && typeof e2 == "number" && (this[ot] += e2), this[Y2].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H3](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
1324
1328
  }
1325
- [Li]() {
1326
- if (this[Y2].length === 0) this[ee] && this[Pt](null, 0);
1327
- else if (this[Y2].length === 1) this[ke](this[Y2].pop());
1329
+ [Ai]() {
1330
+ if (this[Y2].length === 0) this[te] && this[Pt](null, 0);
1331
+ else if (this[Y2].length === 1) this[ve](this[Y2].pop());
1328
1332
  else {
1329
1333
  let t = this[Y2];
1330
- this[Y2] = [], Vr(this[m2], t, this[nt], (e2, i) => this[Pt](e2, i));
1334
+ this[Y2] = [], Jr(this[m2], t, this[ot], (e2, i) => this[Pt](e2, i));
1331
1335
  }
1332
1336
  }
1333
1337
  [H3]() {
1334
- if (this[ot] && typeof this[m2] == "number") {
1338
+ if (this[ht] && typeof this[m2] == "number") {
1335
1339
  let t = this[m2];
1336
1340
  this[m2] = void 0, import_fs.default.close(t, (e2) => e2 ? this.emit("error", e2) : this.emit("close"));
1337
1341
  }
1338
1342
  }
1339
1343
  };
1340
- var Wt = class extends tt {
1341
- [ht]() {
1344
+ var Wt = class extends et2 {
1345
+ [at]() {
1342
1346
  let t;
1343
- if (this[ve] && this[J3] === "r+") try {
1344
- t = import_fs.default.openSync(this[U3], this[J3], this[se]);
1347
+ if (this[Me] && this[tt] === "r+") try {
1348
+ t = import_fs.default.openSync(this[U3], this[tt], this[ie2]);
1345
1349
  } catch (e2) {
1346
- if (e2?.code === "ENOENT") return this[J3] = "w", this[ht]();
1350
+ if (e2?.code === "ENOENT") return this[tt] = "w", this[at]();
1347
1351
  throw e2;
1348
1352
  }
1349
- else t = import_fs.default.openSync(this[U3], this[J3], this[se]);
1353
+ else t = import_fs.default.openSync(this[U3], this[tt], this[ie2]);
1350
1354
  this[Ht](null, t);
1351
1355
  }
1352
1356
  [H3]() {
1353
- if (this[ot] && typeof this[m2] == "number") {
1357
+ if (this[ht] && typeof this[m2] == "number") {
1354
1358
  let t = this[m2];
1355
1359
  this[m2] = void 0, import_fs.default.closeSync(t), this.emit("close");
1356
1360
  }
1357
1361
  }
1358
- [ke](t) {
1362
+ [ve](t) {
1359
1363
  let e2 = true;
1360
1364
  try {
1361
- this[Pt](null, import_fs.default.writeSync(this[m2], t, 0, t.length, this[nt])), e2 = false;
1365
+ this[Pt](null, import_fs.default.writeSync(this[m2], t, 0, t.length, this[ot])), e2 = false;
1362
1366
  } finally {
1363
1367
  if (e2) try {
1364
1368
  this[H3]();
@@ -1367,53 +1371,53 @@ var Wt = class extends tt {
1367
1371
  }
1368
1372
  }
1369
1373
  };
1370
- var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
1371
- var As = (s3) => !!s3.sync && !!s3.file;
1372
- var Ds = (s3) => !s3.sync && !!s3.file;
1373
- var Is = (s3) => !!s3.sync && !s3.file;
1374
- var Cs = (s3) => !s3.sync && !s3.file;
1375
- var Fs = (s3) => !!s3.file;
1376
- var Xr = (s3) => {
1377
- let t = $r.get(s3);
1374
+ var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
1375
+ var Fs = (s3) => !!s3.sync && !!s3.file;
1376
+ var ks = (s3) => !s3.sync && !!s3.file;
1377
+ var vs = (s3) => !!s3.sync && !s3.file;
1378
+ var Ms = (s3) => !s3.sync && !s3.file;
1379
+ var Bs = (s3) => !!s3.file;
1380
+ var tn = (s3) => {
1381
+ let t = jr.get(s3);
1378
1382
  return t || s3;
1379
1383
  };
1380
- var re = (s3 = {}) => {
1384
+ var se = (s3 = {}) => {
1381
1385
  if (!s3) return {};
1382
1386
  let t = {};
1383
1387
  for (let [e2, i] of Object.entries(s3)) {
1384
- let r = Xr(e2);
1388
+ let r = tn(e2);
1385
1389
  t[r] = i;
1386
1390
  }
1387
1391
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
1388
1392
  };
1389
1393
  var K3 = (s3, t, e2, i, r) => Object.assign((n = [], o2, h3) => {
1390
1394
  Array.isArray(n) && (o2 = n, n = {}), typeof o2 == "function" && (h3 = o2, o2 = void 0), o2 = o2 ? Array.from(o2) : [];
1391
- let a = re(n);
1392
- if (r?.(a, o2), As(a)) {
1395
+ let a = se(n);
1396
+ if (r?.(a, o2), Fs(a)) {
1393
1397
  if (typeof h3 == "function") throw new TypeError("callback not supported for sync tar functions");
1394
1398
  return s3(a, o2);
1395
- } else if (Ds(a)) {
1399
+ } else if (ks(a)) {
1396
1400
  let l = t(a, o2);
1397
1401
  return h3 ? l.then(() => h3(), h3) : l;
1398
- } else if (Is(a)) {
1402
+ } else if (vs(a)) {
1399
1403
  if (typeof h3 == "function") throw new TypeError("callback not supported for sync tar functions");
1400
1404
  return e2(a, o2);
1401
- } else if (Cs(a)) {
1405
+ } else if (Ms(a)) {
1402
1406
  if (typeof h3 == "function") throw new TypeError("callback only supported with file option");
1403
1407
  return i(a, o2);
1404
1408
  }
1405
1409
  throw new Error("impossible options??");
1406
1410
  }, { syncFile: s3, asyncFile: t, syncNoFile: e2, asyncNoFile: i, validate: r });
1407
- var jr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
1408
- var M2 = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
1409
- var Qr = import_buffer.Buffer.concat;
1410
- var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
1411
- var Jr = (s3) => s3;
1412
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
1413
- import_buffer.Buffer.concat = s3 ? Jr : Qr;
1411
+ var sn = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
1412
+ var M2 = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
1413
+ var rn = import_buffer.Buffer.concat;
1414
+ var zs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
1415
+ var nn = (s3) => s3;
1416
+ var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
1417
+ import_buffer.Buffer.concat = s3 ? nn : rn;
1414
1418
  } : (s3) => {
1415
1419
  };
1416
- var Ot = /* @__PURE__ */ Symbol("_superWrite");
1420
+ var Tt = /* @__PURE__ */ Symbol("_superWrite");
1417
1421
  var Gt = class extends Error {
1418
1422
  code;
1419
1423
  errno;
@@ -1424,8 +1428,8 @@ var Gt = class extends Error {
1424
1428
  return "ZlibError";
1425
1429
  }
1426
1430
  };
1427
- var vi = /* @__PURE__ */ Symbol("flushFlag");
1428
- var ne2 = class extends D2 {
1431
+ var Pi = /* @__PURE__ */ Symbol("flushFlag");
1432
+ var re = class extends A2 {
1429
1433
  #t = false;
1430
1434
  #i = false;
1431
1435
  #s;
@@ -1444,9 +1448,9 @@ var ne2 = class extends D2 {
1444
1448
  }
1445
1449
  constructor(t, e2) {
1446
1450
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
1447
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e2] != "function") throw new TypeError("Compression method not supported: " + e2);
1451
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ps[e2] != "function") throw new TypeError("Compression method not supported: " + e2);
1448
1452
  try {
1449
- this.#e = new ks[e2](t);
1453
+ this.#e = new Ps[e2](t);
1450
1454
  } catch (i) {
1451
1455
  throw new Gt(i, this.constructor);
1452
1456
  }
@@ -1461,7 +1465,7 @@ var ne2 = class extends D2 {
1461
1465
  if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
1462
1466
  }
1463
1467
  flush(t) {
1464
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [vi]: t })));
1468
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [Pi]: t })));
1465
1469
  }
1466
1470
  end(t, e2, i) {
1467
1471
  return typeof t == "function" && (i = t, e2 = void 0, t = void 0), typeof e2 == "function" && (i = e2, e2 = void 0), t && (e2 ? this.write(t, e2) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -1469,7 +1473,7 @@ var ne2 = class extends D2 {
1469
1473
  get ended() {
1470
1474
  return this.#i;
1471
1475
  }
1472
- [Ot](t) {
1476
+ [Tt](t) {
1473
1477
  return super.write(t);
1474
1478
  }
1475
1479
  write(t, e2, i) {
@@ -1480,13 +1484,13 @@ var ne2 = class extends D2 {
1480
1484
  };
1481
1485
  let o2 = this.#e.close;
1482
1486
  this.#e.close = () => {
1483
- }, ki(true);
1487
+ }, Bi(true);
1484
1488
  let h3;
1485
1489
  try {
1486
- let l = typeof t[vi] == "number" ? t[vi] : this.#s;
1487
- h3 = this.#e._processChunk(t, l), ki(false);
1490
+ let l = typeof t[Pi] == "number" ? t[Pi] : this.#s;
1491
+ h3 = this.#e._processChunk(t, l), Bi(false);
1488
1492
  } catch (l) {
1489
- ki(false), this.#o(new Gt(l, this.write));
1493
+ Bi(false), this.#o(new Gt(l, this.write));
1490
1494
  } finally {
1491
1495
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o2, this.#e.removeAllListeners("error"));
1492
1496
  }
@@ -1494,13 +1498,13 @@ var ne2 = class extends D2 {
1494
1498
  let a;
1495
1499
  if (h3) if (Array.isArray(h3) && h3.length > 0) {
1496
1500
  let l = h3[0];
1497
- a = this[Ot](import_buffer.Buffer.from(l));
1498
- for (let c2 = 1; c2 < h3.length; c2++) a = this[Ot](h3[c2]);
1499
- } else a = this[Ot](import_buffer.Buffer.from(h3));
1501
+ a = this[Tt](import_buffer.Buffer.from(l));
1502
+ for (let c2 = 1; c2 < h3.length; c2++) a = this[Tt](h3[c2]);
1503
+ } else a = this[Tt](import_buffer.Buffer.from(h3));
1500
1504
  return i && i(), a;
1501
1505
  }
1502
1506
  };
1503
- var Be = class extends ne2 {
1507
+ var Pe2 = class extends re {
1504
1508
  #t;
1505
1509
  #i;
1506
1510
  constructor(t, e2) {
@@ -1526,96 +1530,98 @@ var Be = class extends ne2 {
1526
1530
  }
1527
1531
  }
1528
1532
  };
1529
- var Pe2 = class extends Be {
1533
+ var ze = class extends Pe2 {
1530
1534
  #t;
1531
1535
  constructor(t) {
1532
1536
  super(t, "Gzip"), this.#t = t && !!t.portable;
1533
1537
  }
1534
- [Ot](t) {
1535
- return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
1538
+ [Tt](t) {
1539
+ return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
1536
1540
  }
1537
1541
  };
1538
- var ze = class extends Be {
1542
+ var Ue = class extends Pe2 {
1539
1543
  constructor(t) {
1540
1544
  super(t, "Unzip");
1541
1545
  }
1542
1546
  };
1543
- var Ue = class extends ne2 {
1547
+ var He = class extends re {
1544
1548
  constructor(t, e2) {
1545
1549
  t = t || {}, t.flush = t.flush || M2.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M2.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M2.BROTLI_OPERATION_FLUSH, super(t, e2);
1546
1550
  }
1547
1551
  };
1548
- var He = class extends Ue {
1552
+ var We = class extends He {
1549
1553
  constructor(t) {
1550
1554
  super(t, "BrotliCompress");
1551
1555
  }
1552
1556
  };
1553
- var We = class extends Ue {
1557
+ var Ge = class extends He {
1554
1558
  constructor(t) {
1555
1559
  super(t, "BrotliDecompress");
1556
1560
  }
1557
1561
  };
1558
- var Ge = class extends ne2 {
1562
+ var Ze = class extends re {
1559
1563
  constructor(t, e2) {
1560
1564
  t = t || {}, t.flush = t.flush || M2.ZSTD_e_continue, t.finishFlush = t.finishFlush || M2.ZSTD_e_end, t.fullFlushFlag = M2.ZSTD_e_flush, super(t, e2);
1561
1565
  }
1562
1566
  };
1563
- var Ze = class extends Ge {
1567
+ var Ye = class extends Ze {
1564
1568
  constructor(t) {
1565
1569
  super(t, "ZstdCompress");
1566
1570
  }
1567
1571
  };
1568
- var Ye = class extends Ge {
1572
+ var Ke = class extends Ze {
1569
1573
  constructor(t) {
1570
1574
  super(t, "ZstdDecompress");
1571
1575
  }
1572
1576
  };
1573
- var Ms = (s3, t) => {
1574
- if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
1577
+ var Us = (s3, t) => {
1578
+ if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t) : hn(s3, t);
1575
1579
  else throw Error("cannot encode number outside of javascript safe integer range");
1576
1580
  return t;
1577
1581
  };
1578
- var en = (s3, t) => {
1582
+ var hn = (s3, t) => {
1579
1583
  t[0] = 128;
1580
1584
  for (var e2 = t.length; e2 > 1; e2--) t[e2 - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
1581
1585
  };
1582
- var sn = (s3, t) => {
1586
+ var an = (s3, t) => {
1583
1587
  t[0] = 255;
1584
1588
  var e2 = false;
1585
1589
  s3 = s3 * -1;
1586
1590
  for (var i = t.length; i > 1; i--) {
1587
1591
  var r = s3 & 255;
1588
- s3 = Math.floor(s3 / 256), e2 ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e2 = true, t[i - 1] = zs(r));
1592
+ s3 = Math.floor(s3 / 256), e2 ? t[i - 1] = Ws(r) : r === 0 ? t[i - 1] = 0 : (e2 = true, t[i - 1] = Gs(r));
1589
1593
  }
1590
1594
  };
1591
- var Bs = (s3) => {
1592
- let t = s3[0], e2 = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
1595
+ var Hs = (s3) => {
1596
+ let t = s3[0], e2 = t === 128 ? cn(s3.subarray(1, s3.length)) : t === 255 ? ln(s3) : null;
1593
1597
  if (e2 === null) throw Error("invalid base256 encoding");
1594
1598
  if (!Number.isSafeInteger(e2)) throw Error("parsed number outside of javascript safe integer range");
1595
1599
  return e2;
1596
1600
  };
1597
- var rn = (s3) => {
1601
+ var ln = (s3) => {
1598
1602
  for (var t = s3.length, e2 = 0, i = false, r = t - 1; r > -1; r--) {
1599
1603
  var n = Number(s3[r]), o2;
1600
- i ? o2 = Ps(n) : n === 0 ? o2 = n : (i = true, o2 = zs(n)), o2 !== 0 && (e2 -= o2 * Math.pow(256, t - r - 1));
1604
+ i ? o2 = Ws(n) : n === 0 ? o2 = n : (i = true, o2 = Gs(n)), o2 !== 0 && (e2 -= o2 * Math.pow(256, t - r - 1));
1601
1605
  }
1602
1606
  return e2;
1603
1607
  };
1604
- var nn = (s3) => {
1608
+ var cn = (s3) => {
1605
1609
  for (var t = s3.length, e2 = 0, i = t - 1; i > -1; i--) {
1606
1610
  var r = Number(s3[i]);
1607
1611
  r !== 0 && (e2 += r * Math.pow(256, t - i - 1));
1608
1612
  }
1609
1613
  return e2;
1610
1614
  };
1611
- var Ps = (s3) => (255 ^ s3) & 255;
1612
- var zs = (s3) => (255 ^ s3) + 1 & 255;
1613
- var Bi = {};
1614
- vr(Bi, { code: () => Ke, isCode: () => oe2, isName: () => hn, name: () => he2 });
1615
- var oe2 = (s3) => he2.has(s3);
1616
- var hn = (s3) => Ke.has(s3);
1617
- var he2 = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
1618
- var Ke = new Map(Array.from(he2).map((s3) => [s3[1], s3[0]]));
1615
+ var Ws = (s3) => (255 ^ s3) & 255;
1616
+ var Gs = (s3) => (255 ^ s3) + 1 & 255;
1617
+ var Hi = {};
1618
+ Ur(Hi, { code: () => Ve, isCode: () => ne2, isName: () => dn, name: () => oe2, normalFsTypes: () => Ui });
1619
+ var ne2 = (s3) => oe2.has(s3);
1620
+ var dn = (s3) => Ve.has(s3);
1621
+ var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
1622
+ var oe2 = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
1623
+ var Ve = new Map(Array.from(oe2).map((s3) => [s3[1], s3[0]]));
1624
+ var un = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
1619
1625
  var F2 = class {
1620
1626
  cksumValid = false;
1621
1627
  needPax = false;
@@ -1643,46 +1649,45 @@ var F2 = class {
1643
1649
  }
1644
1650
  decode(t, e2, i, r) {
1645
1651
  if (e2 || (e2 = 0), !t || !(t.length >= e2 + 512)) throw new Error("need 512 bytes for header");
1646
- this.path = i?.path ?? Tt(t, e2, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e2 + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e2 + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e2 + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e2 + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e2 + 136, 12), this.cksum = at(t, e2 + 148, 12), r && this.#i(r, true), i && this.#i(i);
1647
- let n = Tt(t, e2 + 156, 1);
1648
- if (oe2(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e2 + 157, 100), t.subarray(e2 + 257, e2 + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e2 + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e2 + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e2 + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e2 + 337, 8) ?? 0, t[e2 + 475] !== 0) {
1649
- let h3 = Tt(t, e2 + 345, 155);
1650
- this.path = h3 + "/" + this.path;
1652
+ let n = xt(t, e2 + 156, 1), o2 = Ui.has(n), h3 = o2 ? i : void 0, a = o2 ? r : void 0;
1653
+ if (this.path = h3?.path ?? xt(t, e2, 100), this.mode = h3?.mode ?? a?.mode ?? lt(t, e2 + 100, 8), this.uid = h3?.uid ?? a?.uid ?? lt(t, e2 + 108, 8), this.gid = h3?.gid ?? a?.gid ?? lt(t, e2 + 116, 8), this.size = un(h3?.size ?? a?.size ?? lt(t, e2 + 124, 12)), this.mtime = h3?.mtime ?? a?.mtime ?? Wi(t, e2 + 136, 12), this.cksum = lt(t, e2 + 148, 12), a && this.#i(a, true), h3 && this.#i(h3), ne2(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e2 + 157, 100), t.subarray(e2 + 257, e2 + 265).toString() === "ustar\x0000") if (this.uname = h3?.uname ?? a?.uname ?? xt(t, e2 + 265, 32), this.gname = h3?.gname ?? a?.gname ?? xt(t, e2 + 297, 32), this.devmaj = h3?.devmaj ?? a?.devmaj ?? lt(t, e2 + 329, 8) ?? 0, this.devmin = h3?.devmin ?? a?.devmin ?? lt(t, e2 + 337, 8) ?? 0, t[e2 + 475] !== 0) {
1654
+ let c2 = xt(t, e2 + 345, 155);
1655
+ this.path = c2 + "/" + this.path;
1651
1656
  } else {
1652
- let h3 = Tt(t, e2 + 345, 130);
1653
- h3 && (this.path = h3 + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e2 + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e2 + 488, 12);
1657
+ let c2 = xt(t, e2 + 345, 130);
1658
+ c2 && (this.path = c2 + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t, e2 + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t, e2 + 488, 12);
1654
1659
  }
1655
- let o2 = 256;
1656
- for (let h3 = e2; h3 < e2 + 148; h3++) o2 += t[h3];
1657
- for (let h3 = e2 + 156; h3 < e2 + 512; h3++) o2 += t[h3];
1658
- this.cksumValid = o2 === this.cksum, this.cksum === void 0 && o2 === 256 && (this.nullBlock = true);
1660
+ let l = 256;
1661
+ for (let c2 = e2; c2 < e2 + 148; c2++) l += t[c2];
1662
+ for (let c2 = e2 + 156; c2 < e2 + 512; c2++) l += t[c2];
1663
+ this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
1659
1664
  }
1660
1665
  #i(t, e2 = false) {
1661
- Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e2 || i === "linkpath" && e2 || i === "global"))));
1666
+ Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e2 || i === "linkpath" && e2 || i === "global"))));
1662
1667
  }
1663
1668
  encode(t, e2 = 0) {
1664
1669
  if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e2 + 512)) throw new Error("need 512 bytes for header");
1665
- let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o2 = r[1];
1666
- this.needPax = !!r[2], this.needPax = xt(t, e2, 100, n) || this.needPax, this.needPax = lt(t, e2 + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e2 + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e2 + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e2 + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e2 + 136, 12, this.mtime) || this.needPax, t[e2 + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e2 + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e2 + 257, 8), this.needPax = xt(t, e2 + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e2 + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e2 + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e2 + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e2 + 345, i, o2) || this.needPax, t[e2 + 475] !== 0 ? this.needPax = xt(t, e2 + 345, 155, o2) || this.needPax : (this.needPax = xt(t, e2 + 345, 130, o2) || this.needPax, this.needPax = zi(t, e2 + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e2 + 488, 12, this.ctime) || this.needPax);
1670
+ let i = this.ctime || this.atime ? 130 : 155, r = mn(this.path || "", i), n = r[0], o2 = r[1];
1671
+ this.needPax = !!r[2], this.needPax = Lt(t, e2, 100, n) || this.needPax, this.needPax = ct(t, e2 + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e2 + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e2 + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e2 + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e2 + 136, 12, this.mtime) || this.needPax, t[e2 + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e2 + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e2 + 257, 8), this.needPax = Lt(t, e2 + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e2 + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e2 + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e2 + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e2 + 345, i, o2) || this.needPax, t[e2 + 475] !== 0 ? this.needPax = Lt(t, e2 + 345, 155, o2) || this.needPax : (this.needPax = Lt(t, e2 + 345, 130, o2) || this.needPax, this.needPax = Gi(t, e2 + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e2 + 488, 12, this.ctime) || this.needPax);
1667
1672
  let h3 = 256;
1668
1673
  for (let a = e2; a < e2 + 148; a++) h3 += t[a];
1669
1674
  for (let a = e2 + 156; a < e2 + 512; a++) h3 += t[a];
1670
- return this.cksum = h3, lt(t, e2 + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
1675
+ return this.cksum = h3, ct(t, e2 + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
1671
1676
  }
1672
1677
  get type() {
1673
- return this.#t === "Unsupported" ? this.#t : he2.get(this.#t);
1678
+ return this.#t === "Unsupported" ? this.#t : oe2.get(this.#t);
1674
1679
  }
1675
1680
  get typeKey() {
1676
1681
  return this.#t;
1677
1682
  }
1678
1683
  set type(t) {
1679
- let e2 = String(Ke.get(t));
1680
- if (oe2(e2) || e2 === "Unsupported") this.#t = e2;
1681
- else if (oe2(t)) this.#t = t;
1684
+ let e2 = String(Ve.get(t));
1685
+ if (ne2(e2) || e2 === "Unsupported") this.#t = e2;
1686
+ else if (ne2(t)) this.#t = t;
1682
1687
  else throw new TypeError("invalid entry type: " + t);
1683
1688
  }
1684
1689
  };
1685
- var an = (s3, t) => {
1690
+ var mn = (s3, t) => {
1686
1691
  let i = s3, r = "", n, o2 = import_node_path2.posix.parse(s3).root || ".";
1687
1692
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
1688
1693
  else {
@@ -1694,21 +1699,21 @@ var an = (s3, t) => {
1694
1699
  }
1695
1700
  return n;
1696
1701
  };
1697
- var Tt = (s3, t, e2) => s3.subarray(t, t + e2).toString("utf8").replace(/\0.*/, "");
1698
- var Pi = (s3, t, e2) => ln(at(s3, t, e2));
1699
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
1700
- var at = (s3, t, e2) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e2)) : fn(s3, t, e2);
1701
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
1702
- var fn = (s3, t, e2) => cn(parseInt(s3.subarray(t, t + e2).toString("utf8").replace(/\0.*$/, "").trim(), 8));
1703
- var dn = { 12: 8589934591, 8: 2097151 };
1704
- var lt = (s3, t, e2, i) => i === void 0 ? false : i > dn[e2] || i < 0 ? (Ms(i, s3.subarray(t, t + e2)), true) : (un(s3, t, e2, i), false);
1705
- var un = (s3, t, e2, i) => s3.write(mn(i, e2), t, e2, "ascii");
1706
- var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
1707
- var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
1708
- var zi = (s3, t, e2, i) => i === void 0 ? false : lt(s3, t, e2, i.getTime() / 1e3);
1709
- var En = new Array(156).join("\0");
1710
- var xt = (s3, t, e2, i) => i === void 0 ? false : (s3.write(i + En, t, e2, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e2);
1711
- var ct = class s {
1702
+ var xt = (s3, t, e2) => s3.subarray(t, t + e2).toString("utf8").replace(/\0.*/, "");
1703
+ var Wi = (s3, t, e2) => pn(lt(s3, t, e2));
1704
+ var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
1705
+ var lt = (s3, t, e2) => Number(s3[t]) & 128 ? Hs(s3.subarray(t, t + e2)) : wn(s3, t, e2);
1706
+ var En = (s3) => isNaN(s3) ? void 0 : s3;
1707
+ var wn = (s3, t, e2) => En(parseInt(s3.subarray(t, t + e2).toString("utf8").replace(/\0.*$/, "").trim(), 8));
1708
+ var Sn = { 12: 8589934591, 8: 2097151 };
1709
+ var ct = (s3, t, e2, i) => i === void 0 ? false : i > Sn[e2] || i < 0 ? (Us(i, s3.subarray(t, t + e2)), true) : (yn(s3, t, e2, i), false);
1710
+ var yn = (s3, t, e2, i) => s3.write(Rn(i, e2), t, e2, "ascii");
1711
+ var Rn = (s3, t) => gn(Math.floor(s3).toString(8), t);
1712
+ var gn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
1713
+ var Gi = (s3, t, e2, i) => i === void 0 ? false : ct(s3, t, e2, i.getTime() / 1e3);
1714
+ var bn = new Array(156).join("\0");
1715
+ var Lt = (s3, t, e2, i) => i === void 0 ? false : (s3.write(i + bn, t, e2, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e2);
1716
+ var ft = class s {
1712
1717
  atime;
1713
1718
  mtime;
1714
1719
  ctime;
@@ -1748,24 +1753,52 @@ var ct = class s {
1748
1753
  return n + o2 >= Math.pow(10, o2) && (o2 += 1), o2 + n + r;
1749
1754
  }
1750
1755
  static parse(t, e2, i = false) {
1751
- return new s(Sn(yn(t), e2), i);
1756
+ return new s(On(Tn(t), e2), i);
1752
1757
  }
1753
1758
  };
1754
- var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
1755
- var yn = (s3) => s3.replace(/\n$/, "").split(`
1756
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
1757
- var Rn = (s3, t) => {
1759
+ var On = (s3, t) => t ? Object.assign({}, t, s3) : s3;
1760
+ var Tn = (s3) => s3.replace(/\n$/, "").split(`
1761
+ `).reduce(xn, /* @__PURE__ */ Object.create(null));
1762
+ var xn = (s3, t) => {
1758
1763
  let e2 = parseInt(t, 10);
1759
1764
  if (e2 !== Buffer.byteLength(t) + 1) return s3;
1760
1765
  t = t.slice((e2 + " ").length);
1761
1766
  let i = t.split("="), r = i.shift();
1762
1767
  if (!r) return s3;
1763
- let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i.join("=");
1764
- return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o2) * 1e3) : /^[0-9]+$/.test(o2) ? +o2 : o2, s3;
1768
+ let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i.join("=").replace(/\0.*/, "");
1769
+ switch (n) {
1770
+ case "path":
1771
+ case "linkpath":
1772
+ case "type":
1773
+ case "charset":
1774
+ case "comment":
1775
+ case "gname":
1776
+ case "uname":
1777
+ s3[n] = o2;
1778
+ break;
1779
+ case "ctime":
1780
+ case "atime":
1781
+ case "mtime":
1782
+ s3[n] = new Date(Number(o2) * 1e3);
1783
+ break;
1784
+ case "size":
1785
+ let h3 = +o2;
1786
+ h3 >= 0 && (s3[n] = h3);
1787
+ break;
1788
+ case "gid":
1789
+ case "uid":
1790
+ case "dev":
1791
+ case "ino":
1792
+ case "nlink":
1793
+ case "mode":
1794
+ s3[n] = +o2;
1795
+ break;
1796
+ }
1797
+ return s3;
1765
1798
  };
1766
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
1767
- var f3 = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
1768
- var Yt = class extends D2 {
1799
+ var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
1800
+ var f3 = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
1801
+ var $e = class extends A2 {
1769
1802
  extended;
1770
1803
  globalExtended;
1771
1804
  header;
@@ -1829,93 +1862,100 @@ var Yt = class extends D2 {
1829
1862
  t.path && (t.path = f3(t.path)), t.linkpath && (t.linkpath = f3(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e2))));
1830
1863
  }
1831
1864
  };
1832
- var Lt = (s3, t, e2, i = {}) => {
1865
+ var Dt = (s3, t, e2, i = {}) => {
1833
1866
  s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e2 instanceof Error && e2.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e2 instanceof Error && (i = Object.assign(e2, i), e2 = e2.message), s3.emit("warn", t, e2, i)) : e2 instanceof Error ? s3.emit("error", Object.assign(e2, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e2}`), i));
1834
1867
  };
1835
- var gn = 1024 * 1024;
1836
- var Zi = Buffer.from([31, 139]);
1837
- var Yi = Buffer.from([40, 181, 47, 253]);
1838
- var On = Math.max(Zi.length, Yi.length);
1868
+ var Nn = 1024 * 1024;
1869
+ var Xi = Buffer.from([31, 139]);
1870
+ var qi = Buffer.from([40, 181, 47, 253]);
1871
+ var An = Math.max(Xi.length, qi.length);
1839
1872
  var B3 = /* @__PURE__ */ Symbol("state");
1840
1873
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
1841
- var et2 = /* @__PURE__ */ Symbol("readEntry");
1842
- var Ui = /* @__PURE__ */ Symbol("nextEntry");
1843
- var Us = /* @__PURE__ */ Symbol("processEntry");
1874
+ var it = /* @__PURE__ */ Symbol("readEntry");
1875
+ var Zi = /* @__PURE__ */ Symbol("nextEntry");
1876
+ var Zs = /* @__PURE__ */ Symbol("processEntry");
1844
1877
  var V2 = /* @__PURE__ */ Symbol("extendedHeader");
1845
- var ae2 = /* @__PURE__ */ Symbol("globalExtendedHeader");
1846
- var ft = /* @__PURE__ */ Symbol("meta");
1847
- var Hs = /* @__PURE__ */ Symbol("emitMeta");
1878
+ var he2 = /* @__PURE__ */ Symbol("globalExtendedHeader");
1879
+ var dt = /* @__PURE__ */ Symbol("meta");
1880
+ var Ys = /* @__PURE__ */ Symbol("emitMeta");
1848
1881
  var p3 = /* @__PURE__ */ Symbol("buffer");
1849
- var it = /* @__PURE__ */ Symbol("queue");
1850
- var dt = /* @__PURE__ */ Symbol("ended");
1851
- var Hi = /* @__PURE__ */ Symbol("emittedEnd");
1882
+ var st = /* @__PURE__ */ Symbol("queue");
1883
+ var ut = /* @__PURE__ */ Symbol("ended");
1884
+ var Yi = /* @__PURE__ */ Symbol("emittedEnd");
1852
1885
  var At = /* @__PURE__ */ Symbol("emit");
1853
- var y2 = /* @__PURE__ */ Symbol("unzip");
1854
- var Ve = /* @__PURE__ */ Symbol("consumeChunk");
1855
- var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
1856
- var Wi = /* @__PURE__ */ Symbol("consumeBody");
1857
- var Ws = /* @__PURE__ */ Symbol("consumeMeta");
1858
- var Gs = /* @__PURE__ */ Symbol("consumeHeader");
1859
- var le2 = /* @__PURE__ */ Symbol("consuming");
1860
- var Gi = /* @__PURE__ */ Symbol("bufferConcat");
1861
- var Xe = /* @__PURE__ */ Symbol("maybeEnd");
1862
- var Kt = /* @__PURE__ */ Symbol("writing");
1863
- var ut = /* @__PURE__ */ Symbol("aborted");
1864
- var qe = /* @__PURE__ */ Symbol("onDone");
1865
- var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
1886
+ var w = /* @__PURE__ */ Symbol("unzip");
1887
+ var Xe = /* @__PURE__ */ Symbol("consumeChunk");
1888
+ var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
1889
+ var Ki = /* @__PURE__ */ Symbol("consumeBody");
1890
+ var Ks = /* @__PURE__ */ Symbol("consumeMeta");
1891
+ var Vs = /* @__PURE__ */ Symbol("consumeHeader");
1892
+ var ae2 = /* @__PURE__ */ Symbol("consuming");
1893
+ var Vi = /* @__PURE__ */ Symbol("bufferConcat");
1894
+ var Qe = /* @__PURE__ */ Symbol("maybeEnd");
1895
+ var Yt = /* @__PURE__ */ Symbol("writing");
1896
+ var $2 = /* @__PURE__ */ Symbol("aborted");
1897
+ var Je = /* @__PURE__ */ Symbol("onDone");
1898
+ var It = /* @__PURE__ */ Symbol("sawValidEntry");
1866
1899
  var je2 = /* @__PURE__ */ Symbol("sawNullBlock");
1867
- var Qe = /* @__PURE__ */ Symbol("sawEOF");
1868
- var Zs = /* @__PURE__ */ Symbol("closeStream");
1869
- var Tn = () => true;
1870
- var st = class extends import_events2.EventEmitter {
1900
+ var ti = /* @__PURE__ */ Symbol("sawEOF");
1901
+ var $s = /* @__PURE__ */ Symbol("closeStream");
1902
+ var In = 1e3;
1903
+ var le2 = /* @__PURE__ */ Symbol("compressedBytesRead");
1904
+ var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
1905
+ var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
1906
+ var Cn = () => true;
1907
+ var rt = class extends import_events2.EventEmitter {
1871
1908
  file;
1872
1909
  strict;
1873
1910
  maxMetaEntrySize;
1874
1911
  filter;
1875
1912
  brotli;
1876
1913
  zstd;
1914
+ maxDecompressionRatio;
1877
1915
  writable = true;
1878
1916
  readable = false;
1879
- [it] = [];
1917
+ [st] = [];
1880
1918
  [p3];
1881
- [et2];
1919
+ [it];
1882
1920
  [Nt];
1883
1921
  [B3] = "begin";
1884
- [ft] = "";
1922
+ [dt] = "";
1885
1923
  [V2];
1886
- [ae2];
1887
- [dt] = false;
1888
- [y2];
1924
+ [he2];
1889
1925
  [ut] = false;
1890
- [Dt];
1926
+ [w];
1927
+ [$2] = false;
1928
+ [It];
1891
1929
  [je2] = false;
1892
- [Qe] = false;
1893
- [Kt] = false;
1894
- [le2] = false;
1895
- [Hi] = false;
1930
+ [ti] = false;
1931
+ [Yt] = false;
1932
+ [ae2] = false;
1933
+ [Yi] = false;
1934
+ [le2] = 0;
1935
+ [$i] = 0;
1896
1936
  constructor(t = {}) {
1897
- super(), this.file = t.file || "", this.on(qe, () => {
1898
- (this[B3] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
1899
- }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
1937
+ super(), this.file = t.file || "", this.on(Je, () => {
1938
+ (this[B3] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
1939
+ }), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
1900
1940
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
1901
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
1941
+ }), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
1902
1942
  let e2 = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
1903
1943
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e2 ? void 0 : false;
1904
1944
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
1905
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
1945
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
1906
1946
  }
1907
1947
  warn(t, e2, i = {}) {
1908
- Lt(this, t, e2, i);
1948
+ Dt(this, t, e2, i);
1909
1949
  }
1910
- [Gs](t, e2) {
1911
- this[Dt] === void 0 && (this[Dt] = false);
1950
+ [Vs](t, e2) {
1951
+ this[It] === void 0 && (this[It] = false);
1912
1952
  let i;
1913
1953
  try {
1914
- i = new F2(t, e2, this[V2], this[ae2]);
1954
+ i = new F2(t, e2, this[V2], this[he2]);
1915
1955
  } catch (r) {
1916
1956
  return this.warn("TAR_ENTRY_INVALID", r);
1917
1957
  }
1918
- if (i.nullBlock) this[je2] ? (this[Qe] = true, this[B3] === "begin" && (this[B3] = "header"), this[At]("eof")) : (this[je2] = true, this[At]("nullBlock"));
1958
+ if (i.nullBlock) this[je2] ? (this[ti] = true, this[B3] === "begin" && (this[B3] = "header"), this[At]("eof")) : (this[je2] = true, this[At]("nullBlock"));
1919
1959
  else if (this[je2] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
1920
1960
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
1921
1961
  else {
@@ -1923,69 +1963,69 @@ var st = class extends import_events2.EventEmitter {
1923
1963
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
1924
1964
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
1925
1965
  else {
1926
- let n = this[Nt] = new Yt(i, this[V2], this[ae2]);
1927
- if (!this[Dt]) if (n.remain) {
1966
+ let n = this[Nt] = new $e(i, this[V2], this[he2]);
1967
+ if (!this[It]) if (n.remain) {
1928
1968
  let o2 = () => {
1929
- n.invalid || (this[Dt] = true);
1969
+ n.invalid || (this[It] = true);
1930
1970
  };
1931
1971
  n.on("end", o2);
1932
- } else this[Dt] = true;
1933
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B3] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o2) => this[ft] += o2), this[B3] = "meta") : (this[V2] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B3] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B3] = "body" : (this[B3] = "header", n.end()), this[et2] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
1972
+ } else this[It] = true;
1973
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B3] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o2) => this[dt] += o2), this[B3] = "meta") : (this[V2] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B3] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B3] = "body" : (this[B3] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
1934
1974
  }
1935
1975
  }
1936
1976
  }
1937
- [Zs]() {
1977
+ [$s]() {
1938
1978
  queueMicrotask(() => this.emit("close"));
1939
1979
  }
1940
- [Us](t) {
1980
+ [Zs](t) {
1941
1981
  let e2 = true;
1942
- if (!t) this[et2] = void 0, e2 = false;
1982
+ if (!t) this[it] = void 0, e2 = false;
1943
1983
  else if (Array.isArray(t)) {
1944
1984
  let [i, ...r] = t;
1945
1985
  this.emit(i, ...r);
1946
- } else this[et2] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e2 = false);
1986
+ } else this[it] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Zi]()), e2 = false);
1947
1987
  return e2;
1948
1988
  }
1949
- [Ui]() {
1989
+ [Zi]() {
1950
1990
  do
1951
1991
  ;
1952
- while (this[Us](this[it].shift()));
1953
- if (this[it].length === 0) {
1954
- let t = this[et2];
1955
- !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
1992
+ while (this[Zs](this[st].shift()));
1993
+ if (this[st].length === 0) {
1994
+ let t = this[it];
1995
+ !t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
1956
1996
  }
1957
1997
  }
1958
- [Wi](t, e2) {
1998
+ [Ki](t, e2) {
1959
1999
  let i = this[Nt];
1960
2000
  if (!i) throw new Error("attempt to consume body without entry??");
1961
2001
  let r = i.blockRemain ?? 0, n = r >= t.length && e2 === 0 ? t : t.subarray(e2, e2 + r);
1962
2002
  return i.write(n), i.blockRemain || (this[B3] = "header", this[Nt] = void 0, i.end()), n.length;
1963
2003
  }
1964
- [Ws](t, e2) {
1965
- let i = this[Nt], r = this[Wi](t, e2);
1966
- return !this[Nt] && i && this[Hs](i), r;
2004
+ [Ks](t, e2) {
2005
+ let i = this[Nt], r = this[Ki](t, e2);
2006
+ return !this[Nt] && i && this[Ys](i), r;
1967
2007
  }
1968
2008
  [At](t, e2, i) {
1969
- this[it].length === 0 && !this[et2] ? this.emit(t, e2, i) : this[it].push([t, e2, i]);
2009
+ this[st].length === 0 && !this[it] ? this.emit(t, e2, i) : this[st].push([t, e2, i]);
1970
2010
  }
1971
- [Hs](t) {
1972
- switch (this[At]("meta", this[ft]), t.type) {
2011
+ [Ys](t) {
2012
+ switch (this[At]("meta", this[dt]), t.type) {
1973
2013
  case "ExtendedHeader":
1974
2014
  case "OldExtendedHeader":
1975
- this[V2] = ct.parse(this[ft], this[V2], false);
2015
+ this[V2] = ft.parse(this[dt], this[V2], false);
1976
2016
  break;
1977
2017
  case "GlobalExtendedHeader":
1978
- this[ae2] = ct.parse(this[ft], this[ae2], true);
2018
+ this[he2] = ft.parse(this[dt], this[he2], true);
1979
2019
  break;
1980
2020
  case "NextFileHasLongPath":
1981
2021
  case "OldGnuLongPath": {
1982
2022
  let e2 = this[V2] ?? /* @__PURE__ */ Object.create(null);
1983
- this[V2] = e2, e2.path = this[ft].replace(/\0.*/, "");
2023
+ this[V2] = e2, e2.path = this[dt].replace(/\0.*/, "");
1984
2024
  break;
1985
2025
  }
1986
2026
  case "NextFileHasLongLinkpath": {
1987
2027
  let e2 = this[V2] || /* @__PURE__ */ Object.create(null);
1988
- this[V2] = e2, e2.linkpath = this[ft].replace(/\0.*/, "");
2028
+ this[V2] = e2, e2.linkpath = this[dt].replace(/\0.*/, "");
1989
2029
  break;
1990
2030
  }
1991
2031
  default:
@@ -1993,86 +2033,101 @@ var st = class extends import_events2.EventEmitter {
1993
2033
  }
1994
2034
  }
1995
2035
  abort(t) {
1996
- this[ut] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
2036
+ if (!this[$2]) {
2037
+ if (this[w]) {
2038
+ let e2 = this[w];
2039
+ e2.write = () => true, e2.end = () => e2, e2.emit = () => false, e2.destroy?.();
2040
+ }
2041
+ this[$2] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
2042
+ }
2043
+ }
2044
+ [Xs](t) {
2045
+ this[$i] += t.length;
2046
+ let e2 = this[$i] / this[le2];
2047
+ return e2 > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e2.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
1997
2048
  }
1998
2049
  write(t, e2, i) {
1999
- if (typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8")), this[ut]) return i?.(), false;
2000
- if ((this[y2] === void 0 || this.brotli === void 0 && this[y2] === false) && t) {
2001
- if (this[p3] && (t = Buffer.concat([this[p3], t]), this[p3] = void 0), t.length < On) return this[p3] = t, i?.(), true;
2002
- for (let a = 0; this[y2] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y2] = false);
2050
+ if (typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8")), this[$2]) return i?.(), false;
2051
+ if ((this[w] === void 0 || this.brotli === void 0 && this[w] === false) && t) {
2052
+ if (this[p3] && (t = Buffer.concat([this[p3], t]), this[p3] = void 0), t.length < An) return this[p3] = t, i?.(), true;
2053
+ for (let a = 0; this[w] === void 0 && a < Xi.length; a++) t[a] !== Xi[a] && (this[w] = false);
2003
2054
  let o2 = false;
2004
- if (this[y2] === false && this.zstd !== false) {
2055
+ if (this[w] === false && this.zstd !== false) {
2005
2056
  o2 = true;
2006
- for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
2057
+ for (let a = 0; a < qi.length; a++) if (t[a] !== qi[a]) {
2007
2058
  o2 = false;
2008
2059
  break;
2009
2060
  }
2010
2061
  }
2011
2062
  let h3 = this.brotli === void 0 && !o2;
2012
- if (this[y2] === false && h3) if (t.length < 512) if (this[dt]) this.brotli = true;
2063
+ if (this[w] === false && h3) if (t.length < 512) if (this[ut]) this.brotli = true;
2013
2064
  else return this[p3] = t, i?.(), true;
2014
2065
  else try {
2015
2066
  new F2(t.subarray(0, 512)), this.brotli = false;
2016
2067
  } catch {
2017
2068
  this.brotli = true;
2018
2069
  }
2019
- if (this[y2] === void 0 || this[y2] === false && (this.brotli || o2)) {
2020
- let a = this[dt];
2021
- this[dt] = false, this[y2] = this[y2] === void 0 ? new ze({}) : o2 ? new Ye({}) : new We({}), this[y2].on("data", (c2) => this[Ve](c2)), this[y2].on("error", (c2) => this.abort(c2)), this[y2].on("end", () => {
2022
- this[dt] = true, this[Ve]();
2023
- }), this[Kt] = true;
2024
- let l = !!this[y2][a ? "end" : "write"](t);
2025
- return this[Kt] = false, i?.(), l;
2070
+ if (this[w] === void 0 || this[w] === false && (this.brotli || o2)) {
2071
+ let a = this[ut];
2072
+ this[ut] = false, this[w] = this[w] === void 0 ? new Ue({}) : o2 ? new Ke({}) : new Ge({}), this[w].on("data", (c2) => {
2073
+ this[Xs](c2) && this[Xe](c2);
2074
+ }), this[w].on("error", (c2) => {
2075
+ this[$2] || this.abort(c2);
2076
+ }), this[w].on("end", () => {
2077
+ this[ut] = true, this[Xe]();
2078
+ }), this[Yt] = true, this[le2] += t.length;
2079
+ let l = !!this[w][a ? "end" : "write"](t);
2080
+ return this[Yt] = false, i?.(), l;
2026
2081
  }
2027
2082
  }
2028
- this[Kt] = true, this[y2] ? this[y2].write(t) : this[Ve](t), this[Kt] = false;
2029
- let n = this[it].length > 0 ? false : this[et2] ? this[et2].flowing : true;
2030
- return !n && this[it].length === 0 && this[et2]?.once("drain", () => this.emit("drain")), i?.(), n;
2083
+ this[Yt] = true, this[w] ? (this[le2] += t.length, this[w].write(t)) : this[Xe](t), this[Yt] = false;
2084
+ let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
2085
+ return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
2031
2086
  }
2032
- [Gi](t) {
2033
- t && !this[ut] && (this[p3] = this[p3] ? Buffer.concat([this[p3], t]) : t);
2087
+ [Vi](t) {
2088
+ t && !this[$2] && (this[p3] = this[p3] ? Buffer.concat([this[p3], t]) : t);
2034
2089
  }
2035
- [Xe]() {
2036
- if (this[dt] && !this[Hi] && !this[ut] && !this[le2]) {
2037
- this[Hi] = true;
2090
+ [Qe]() {
2091
+ if (this[ut] && !this[Yi] && !this[$2] && !this[ae2]) {
2092
+ this[Yi] = true;
2038
2093
  let t = this[Nt];
2039
- if (t && t.blockRemain) {
2094
+ if (t?.blockRemain) {
2040
2095
  let e2 = this[p3] ? this[p3].length : 0;
2041
2096
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e2} available)`, { entry: t }), this[p3] && t.write(this[p3]), t.end();
2042
2097
  }
2043
- this[At](qe);
2098
+ this[At](Je);
2044
2099
  }
2045
2100
  }
2046
- [Ve](t) {
2047
- if (this[le2] && t) this[Gi](t);
2048
- else if (!t && !this[p3]) this[Xe]();
2101
+ [Xe](t) {
2102
+ if (this[ae2] && t) this[Vi](t);
2103
+ else if (!t && !this[p3]) this[Qe]();
2049
2104
  else if (t) {
2050
- if (this[le2] = true, this[p3]) {
2051
- this[Gi](t);
2105
+ if (this[ae2] = true, this[p3]) {
2106
+ this[Vi](t);
2052
2107
  let e2 = this[p3];
2053
- this[p3] = void 0, this[$e](e2);
2054
- } else this[$e](t);
2055
- for (; this[p3] && this[p3]?.length >= 512 && !this[ut] && !this[Qe]; ) {
2108
+ this[p3] = void 0, this[qe](e2);
2109
+ } else this[qe](t);
2110
+ for (; this[p3] && this[p3]?.length >= 512 && !this[$2] && !this[ti]; ) {
2056
2111
  let e2 = this[p3];
2057
- this[p3] = void 0, this[$e](e2);
2112
+ this[p3] = void 0, this[qe](e2);
2058
2113
  }
2059
- this[le2] = false;
2114
+ this[ae2] = false;
2060
2115
  }
2061
- (!this[p3] || this[dt]) && this[Xe]();
2116
+ (!this[p3] || this[ut]) && this[Qe]();
2062
2117
  }
2063
- [$e](t) {
2118
+ [qe](t) {
2064
2119
  let e2 = 0, i = t.length;
2065
- for (; e2 + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B3]) {
2120
+ for (; e2 + 512 <= i && !this[$2] && !this[ti]; ) switch (this[B3]) {
2066
2121
  case "begin":
2067
2122
  case "header":
2068
- this[Gs](t, e2), e2 += 512;
2123
+ this[Vs](t, e2), e2 += 512;
2069
2124
  break;
2070
2125
  case "ignore":
2071
2126
  case "body":
2072
- e2 += this[Wi](t, e2);
2127
+ e2 += this[Ki](t, e2);
2073
2128
  break;
2074
2129
  case "meta":
2075
- e2 += this[Ws](t, e2);
2130
+ e2 += this[Ks](t, e2);
2076
2131
  break;
2077
2132
  default:
2078
2133
  throw new Error("invalid state: " + this[B3]);
@@ -2080,7 +2135,7 @@ var st = class extends import_events2.EventEmitter {
2080
2135
  e2 < i && (this[p3] = this[p3] ? Buffer.concat([t.subarray(e2), this[p3]]) : t.subarray(e2));
2081
2136
  }
2082
2137
  end(t, e2, i) {
2083
- return typeof t == "function" && (i = t, e2 = void 0, t = void 0), typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, e2)), i && this.once("finish", i), this[ut] || (this[y2] ? (t && this[y2].write(t), this[y2].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
2138
+ return typeof t == "function" && (i = t, e2 = void 0, t = void 0), typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, e2)), i && this.once("finish", i), this[$2] || (this[w] ? (t && (this[le2] += t.length, this[w].write(t)), this[w].end()) : (this[ut] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
2084
2139
  }
2085
2140
  };
2086
2141
  var mt = (s3) => {
@@ -2088,26 +2143,27 @@ var mt = (s3) => {
2088
2143
  for (; t > -1 && s3.charAt(t) === "/"; ) e2 = t, t--;
2089
2144
  return e2 === -1 ? s3 : s3.slice(0, e2);
2090
2145
  };
2091
- var Nn = (s3) => {
2146
+ var vn = (s3) => {
2092
2147
  let t = s3.onReadEntry;
2093
2148
  s3.onReadEntry = t ? (e2) => {
2094
2149
  t(e2), e2.resume();
2095
2150
  } : (e2) => e2.resume();
2096
2151
  };
2097
- var Ki = (s3, t) => {
2098
- let e2 = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o2 = "") => {
2099
- let h3 = o2 || (0, import_path.parse)(n).root || ".", a;
2100
- if (n === h3) a = false;
2152
+ var Qi = (s3, t) => {
2153
+ let e2 = new Map(t.map((o2) => [mt(o2), true])), i = s3.filter, r = 100, n = (o2, h3 = "", a = 0) => {
2154
+ if (a >= r) return e2.set(o2, false), false;
2155
+ let l = h3 || (0, import_path.parse)(o2).root || ".", c2;
2156
+ if (o2 === l) c2 = false;
2101
2157
  else {
2102
- let l = e2.get(n);
2103
- a = l !== void 0 ? l : r((0, import_path.dirname)(n), h3);
2158
+ let d2 = e2.get(o2);
2159
+ c2 = d2 !== void 0 ? d2 : n((0, import_path.dirname)(o2), l, a + 1);
2104
2160
  }
2105
- return e2.set(n, a), a;
2161
+ return e2.set(o2, c2), c2;
2106
2162
  };
2107
- s3.filter = i ? (n, o2) => i(n, o2) && r(mt(n)) : (n) => r(mt(n));
2163
+ s3.filter = i ? (o2, h3) => i(o2, h3) && n(mt(o2)) : (o2) => n(mt(o2));
2108
2164
  };
2109
- var An = (s3) => {
2110
- let t = new st(s3), e2 = s3.file, i;
2165
+ var Mn = (s3) => {
2166
+ let t = new rt(s3), e2 = s3.file, i;
2111
2167
  try {
2112
2168
  i = import_node_fs.default.openSync(e2, "r");
2113
2169
  let r = import_node_fs.default.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
@@ -2130,8 +2186,8 @@ var An = (s3) => {
2130
2186
  }
2131
2187
  }
2132
2188
  };
2133
- var Dn = (s3, t) => {
2134
- let e2 = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
2189
+ var Bn = (s3, t) => {
2190
+ let e2 = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
2135
2191
  return new Promise((o2, h3) => {
2136
2192
  e2.on("error", h3), e2.on("end", o2), import_node_fs.default.stat(r, (a, l) => {
2137
2193
  if (a) h3(a);
@@ -2142,46 +2198,46 @@ var Dn = (s3, t) => {
2142
2198
  });
2143
2199
  });
2144
2200
  };
2145
- var It = K3(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
2146
- t?.length && Ki(s3, t), s3.noResume || Nn(s3);
2201
+ var Ct = K3(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
2202
+ t?.length && Qi(s3, t), s3.noResume || vn(s3);
2147
2203
  });
2148
- var Vi = (s3, t, e2) => (s3 &= 4095, e2 && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
2149
- var { isAbsolute: Cn, parse: Ys } = import_node_path4.win32;
2204
+ var Ji = (s3, t, e2) => (s3 &= 4095, e2 && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
2205
+ var { isAbsolute: zn, parse: qs } = import_node_path4.win32;
2150
2206
  var ce2 = (s3) => {
2151
- let t = "", e2 = Ys(s3);
2152
- for (; Cn(s3) || e2.root; ) {
2207
+ let t = "", e2 = qs(s3);
2208
+ for (; zn(s3) || e2.root; ) {
2153
2209
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e2.root;
2154
- s3 = s3.slice(i.length), t += i, e2 = Ys(s3);
2210
+ s3 = s3.slice(i.length), t += i, e2 = qs(s3);
2155
2211
  }
2156
2212
  return [t, s3];
2157
2213
  };
2158
- var Je = ["|", "<", ">", "?", ":"];
2159
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
2160
- var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
2161
- var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
2162
- var Xi = (s3) => Je.reduce((t, e2) => t.split(e2).join(Fn.get(e2)), s3);
2163
- var Ks = (s3) => $i.reduce((t, e2) => t.split(e2).join(kn.get(e2)), s3);
2164
- var Js = (s3, t) => t ? (s3 = f3(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f3(s3);
2165
- var vn = 16 * 1024 * 1024;
2166
- var Xs = /* @__PURE__ */ Symbol("process");
2167
- var qs = /* @__PURE__ */ Symbol("file");
2168
- var js = /* @__PURE__ */ Symbol("directory");
2169
- var ji = /* @__PURE__ */ Symbol("symlink");
2170
- var Qs = /* @__PURE__ */ Symbol("hardlink");
2214
+ var ei = ["|", "<", ">", "?", ":"];
2215
+ var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
2216
+ var Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
2217
+ var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
2218
+ var ts = (s3) => ei.reduce((t, e2) => t.split(e2).join(Un.get(e2)), s3);
2219
+ var Qs = (s3) => ji.reduce((t, e2) => t.split(e2).join(Hn.get(e2)), s3);
2220
+ var rr = (s3, t) => t ? (s3 = f3(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f3(s3);
2221
+ var Wn = 16 * 1024 * 1024;
2222
+ var tr = /* @__PURE__ */ Symbol("process");
2223
+ var er = /* @__PURE__ */ Symbol("file");
2224
+ var ir = /* @__PURE__ */ Symbol("directory");
2225
+ var is = /* @__PURE__ */ Symbol("symlink");
2226
+ var sr = /* @__PURE__ */ Symbol("hardlink");
2171
2227
  var fe = /* @__PURE__ */ Symbol("header");
2172
- var ti = /* @__PURE__ */ Symbol("read");
2173
- var Qi = /* @__PURE__ */ Symbol("lstat");
2174
- var ei = /* @__PURE__ */ Symbol("onlstat");
2175
- var Ji = /* @__PURE__ */ Symbol("onread");
2176
- var ts = /* @__PURE__ */ Symbol("onreadlink");
2177
- var es = /* @__PURE__ */ Symbol("openfile");
2178
- var is = /* @__PURE__ */ Symbol("onopenfile");
2228
+ var ii = /* @__PURE__ */ Symbol("read");
2229
+ var ss = /* @__PURE__ */ Symbol("lstat");
2230
+ var si = /* @__PURE__ */ Symbol("onlstat");
2231
+ var rs = /* @__PURE__ */ Symbol("onread");
2232
+ var ns = /* @__PURE__ */ Symbol("onreadlink");
2233
+ var os = /* @__PURE__ */ Symbol("openfile");
2234
+ var hs = /* @__PURE__ */ Symbol("onopenfile");
2179
2235
  var pt = /* @__PURE__ */ Symbol("close");
2180
- var ii = /* @__PURE__ */ Symbol("mode");
2181
- var ss = /* @__PURE__ */ Symbol("awaitDrain");
2182
- var qi = /* @__PURE__ */ Symbol("ondrain");
2183
- var X3 = /* @__PURE__ */ Symbol("prefix");
2184
- var de2 = class extends D2 {
2236
+ var ri = /* @__PURE__ */ Symbol("mode");
2237
+ var as = /* @__PURE__ */ Symbol("awaitDrain");
2238
+ var es = /* @__PURE__ */ Symbol("ondrain");
2239
+ var q3 = /* @__PURE__ */ Symbol("prefix");
2240
+ var de2 = class extends A2 {
2185
2241
  path;
2186
2242
  portable;
2187
2243
  myuid = process.getuid && process.getuid() || 0;
@@ -2213,110 +2269,110 @@ var de2 = class extends D2 {
2213
2269
  onWriteEntry;
2214
2270
  #t = false;
2215
2271
  constructor(t, e2 = {}) {
2216
- let i = re(e2);
2217
- super(), this.path = f3(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f3(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f3(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2272
+ let i = se(e2);
2273
+ super(), this.path = f3(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f3(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f3(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2218
2274
  let r = false;
2219
2275
  if (!this.preservePaths) {
2220
2276
  let [o2, h3] = ce2(this.path);
2221
2277
  o2 && typeof h3 == "string" && (this.path = h3, r = o2);
2222
2278
  }
2223
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f3(i.absolute || import_path2.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
2279
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f3(i.absolute || import_path2.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
2224
2280
  let n = this.statCache.get(this.absolute);
2225
- n ? this[ei](n) : this[Qi]();
2281
+ n ? this[si](n) : this[ss]();
2226
2282
  }
2227
2283
  warn(t, e2, i = {}) {
2228
- return Lt(this, t, e2, i);
2284
+ return Dt(this, t, e2, i);
2229
2285
  }
2230
2286
  emit(t, ...e2) {
2231
2287
  return t === "error" && (this.#t = true), super.emit(t, ...e2);
2232
2288
  }
2233
- [Qi]() {
2289
+ [ss]() {
2234
2290
  import_fs3.default.lstat(this.absolute, (t, e2) => {
2235
2291
  if (t) return this.emit("error", t);
2236
- this[ei](e2);
2292
+ this[si](e2);
2237
2293
  });
2238
2294
  }
2239
- [ei](t) {
2240
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
2295
+ [si](t) {
2296
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Gn(t), this.emit("stat", t), this[tr]();
2241
2297
  }
2242
- [Xs]() {
2298
+ [tr]() {
2243
2299
  switch (this.type) {
2244
2300
  case "File":
2245
- return this[qs]();
2301
+ return this[er]();
2246
2302
  case "Directory":
2247
- return this[js]();
2303
+ return this[ir]();
2248
2304
  case "SymbolicLink":
2249
- return this[ji]();
2305
+ return this[is]();
2250
2306
  default:
2251
2307
  return this.end();
2252
2308
  }
2253
2309
  }
2254
- [ii](t) {
2255
- return Vi(t, this.type === "Directory", this.portable);
2310
+ [ri](t) {
2311
+ return Ji(t, this.type === "Directory", this.portable);
2256
2312
  }
2257
- [X3](t) {
2258
- return Js(t, this.prefix);
2313
+ [q3](t) {
2314
+ return rr(t, this.prefix);
2259
2315
  }
2260
2316
  [fe]() {
2261
2317
  if (!this.stat) throw new Error("cannot write header before stat");
2262
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F2({ path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
2318
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F2({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
2263
2319
  let t = this.header?.block;
2264
2320
  if (!t) throw new Error("failed to encode header");
2265
2321
  super.write(t);
2266
2322
  }
2267
- [js]() {
2323
+ [ir]() {
2268
2324
  if (!this.stat) throw new Error("cannot create directory entry without stat");
2269
2325
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
2270
2326
  }
2271
- [ji]() {
2327
+ [is]() {
2272
2328
  import_fs3.default.readlink(this.absolute, (t, e2) => {
2273
2329
  if (t) return this.emit("error", t);
2274
- this[ts](e2);
2330
+ this[ns](e2);
2275
2331
  });
2276
2332
  }
2277
- [ts](t) {
2333
+ [ns](t) {
2278
2334
  this.linkpath = f3(t), this[fe](), this.end();
2279
2335
  }
2280
- [Qs](t) {
2336
+ [sr](t) {
2281
2337
  if (!this.stat) throw new Error("cannot create link entry without stat");
2282
2338
  this.type = "Link", this.linkpath = f3(import_path2.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
2283
2339
  }
2284
- [qs]() {
2340
+ [er]() {
2285
2341
  if (!this.stat) throw new Error("cannot create file entry without stat");
2286
2342
  if (this.stat.nlink > 1) {
2287
2343
  let t = `${this.stat.dev}:${this.stat.ino}`, e2 = this.linkCache.get(t);
2288
- if (e2?.indexOf(this.cwd) === 0) return this[Qs](e2);
2344
+ if (e2?.indexOf(this.cwd) === 0) return this[sr](e2);
2289
2345
  this.linkCache.set(t, this.absolute);
2290
2346
  }
2291
2347
  if (this[fe](), this.stat.size === 0) return this.end();
2292
- this[es]();
2348
+ this[os]();
2293
2349
  }
2294
- [es]() {
2350
+ [os]() {
2295
2351
  import_fs3.default.open(this.absolute, "r", (t, e2) => {
2296
2352
  if (t) return this.emit("error", t);
2297
- this[is](e2);
2353
+ this[hs](e2);
2298
2354
  });
2299
2355
  }
2300
- [is](t) {
2356
+ [hs](t) {
2301
2357
  if (this.fd = t, this.#t) return this[pt]();
2302
2358
  if (!this.stat) throw new Error("should stat before calling onopenfile");
2303
2359
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
2304
2360
  let e2 = Math.min(this.blockLen, this.maxReadSize);
2305
- this.buf = Buffer.allocUnsafe(e2), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
2361
+ this.buf = Buffer.allocUnsafe(e2), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
2306
2362
  }
2307
- [ti]() {
2363
+ [ii]() {
2308
2364
  let { fd: t, buf: e2, offset: i, length: r, pos: n } = this;
2309
2365
  if (t === void 0 || e2 === void 0) throw new Error("cannot read file without first opening");
2310
2366
  import_fs3.default.read(t, e2, i, r, n, (o2, h3) => {
2311
2367
  if (o2) return this[pt](() => this.emit("error", o2));
2312
- this[Ji](h3);
2368
+ this[rs](h3);
2313
2369
  });
2314
2370
  }
2315
2371
  [pt](t = () => {
2316
2372
  }) {
2317
2373
  this.fd !== void 0 && import_fs3.default.close(this.fd, t);
2318
2374
  }
2319
- [Ji](t) {
2375
+ [rs](t) {
2320
2376
  if (t <= 0 && this.remain > 0) {
2321
2377
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
2322
2378
  return this[pt](() => this.emit("error", r));
@@ -2328,9 +2384,9 @@ var de2 = class extends D2 {
2328
2384
  if (!this.buf) throw new Error("should have created buffer prior to reading");
2329
2385
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
2330
2386
  let e2 = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
2331
- this.write(e2) ? this[qi]() : this[ss](() => this[qi]());
2387
+ this.write(e2) ? this[es]() : this[as](() => this[es]());
2332
2388
  }
2333
- [ss](t) {
2389
+ [as](t) {
2334
2390
  this.once("drain", t);
2335
2391
  }
2336
2392
  write(t, e2, i) {
@@ -2340,30 +2396,30 @@ var de2 = class extends D2 {
2340
2396
  }
2341
2397
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
2342
2398
  }
2343
- [qi]() {
2399
+ [es]() {
2344
2400
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
2345
2401
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
2346
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
2402
+ 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[ii]();
2347
2403
  }
2348
2404
  };
2349
- var si = class extends de2 {
2405
+ var ni = class extends de2 {
2350
2406
  sync = true;
2351
- [Qi]() {
2352
- this[ei](import_fs3.default.lstatSync(this.absolute));
2407
+ [ss]() {
2408
+ this[si](import_fs3.default.lstatSync(this.absolute));
2353
2409
  }
2354
- [ji]() {
2355
- this[ts](import_fs3.default.readlinkSync(this.absolute));
2410
+ [is]() {
2411
+ this[ns](import_fs3.default.readlinkSync(this.absolute));
2356
2412
  }
2357
- [es]() {
2358
- this[is](import_fs3.default.openSync(this.absolute, "r"));
2413
+ [os]() {
2414
+ this[hs](import_fs3.default.openSync(this.absolute, "r"));
2359
2415
  }
2360
- [ti]() {
2416
+ [ii]() {
2361
2417
  let t = true;
2362
2418
  try {
2363
2419
  let { fd: e2, buf: i, offset: r, length: n, pos: o2 } = this;
2364
2420
  if (e2 === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
2365
2421
  let h3 = import_fs3.default.readSync(e2, i, r, n, o2);
2366
- this[Ji](h3), t = false;
2422
+ this[rs](h3), t = false;
2367
2423
  } finally {
2368
2424
  if (t) try {
2369
2425
  this[pt](() => {
@@ -2372,7 +2428,7 @@ var si = class extends de2 {
2372
2428
  }
2373
2429
  }
2374
2430
  }
2375
- [ss](t) {
2431
+ [as](t) {
2376
2432
  t();
2377
2433
  }
2378
2434
  [pt](t = () => {
@@ -2380,7 +2436,7 @@ var si = class extends de2 {
2380
2436
  this.fd !== void 0 && import_fs3.default.closeSync(this.fd), t();
2381
2437
  }
2382
2438
  };
2383
- var ri = class extends D2 {
2439
+ var oi = class extends A2 {
2384
2440
  blockLen = 0;
2385
2441
  blockRemain = 0;
2386
2442
  buf = 0;
@@ -2409,29 +2465,29 @@ var ri = class extends D2 {
2409
2465
  size;
2410
2466
  onWriteEntry;
2411
2467
  warn(t, e2, i = {}) {
2412
- return Lt(this, t, e2, i);
2468
+ return Dt(this, t, e2, i);
2413
2469
  }
2414
2470
  constructor(t, e2 = {}) {
2415
- let i = re(e2);
2471
+ let i = se(e2);
2416
2472
  super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
2417
2473
  let { type: r } = t;
2418
2474
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
2419
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f3(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f3(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2475
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f3(t.path), this.mode = t.mode !== void 0 ? this[ri](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f3(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2420
2476
  let n = false;
2421
2477
  if (!this.preservePaths) {
2422
2478
  let [h3, a] = ce2(this.path);
2423
2479
  h3 && typeof a == "string" && (this.path = a, n = h3);
2424
2480
  }
2425
- this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F2({ path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
2481
+ this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F2({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
2426
2482
  let o2 = this.header?.block;
2427
2483
  if (!o2) throw new Error("failed to encode header");
2428
2484
  super.write(o2), t.pipe(this);
2429
2485
  }
2430
- [X3](t) {
2431
- return Js(t, this.prefix);
2486
+ [q3](t) {
2487
+ return rr(t, this.prefix);
2432
2488
  }
2433
- [ii](t) {
2434
- return Vi(t, this.type === "Directory", this.portable);
2489
+ [ri](t) {
2490
+ return Ji(t, this.type === "Directory", this.portable);
2435
2491
  }
2436
2492
  write(t, e2, i) {
2437
2493
  typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8"));
@@ -2443,8 +2499,8 @@ var ri = class extends D2 {
2443
2499
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e2 = void 0, t = void 0), typeof e2 == "function" && (i = e2, e2 = void 0), typeof t == "string" && (t = Buffer.from(t, e2 ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
2444
2500
  }
2445
2501
  };
2446
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
2447
- var ni = class s2 {
2502
+ var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
2503
+ var hi = class s2 {
2448
2504
  tail;
2449
2505
  head;
2450
2506
  length = 0;
@@ -2475,11 +2531,11 @@ var ni = class s2 {
2475
2531
  t.list = this, t.prev = e2, e2 && (e2.next = t), this.tail = t, this.head || (this.head = t), this.length++;
2476
2532
  }
2477
2533
  push(...t) {
2478
- for (let e2 = 0, i = t.length; e2 < i; e2++) Pn(this, t[e2]);
2534
+ for (let e2 = 0, i = t.length; e2 < i; e2++) Yn(this, t[e2]);
2479
2535
  return this.length;
2480
2536
  }
2481
2537
  unshift(...t) {
2482
- for (var e2 = 0, i = t.length; e2 < i; e2++) zn(this, t[e2]);
2538
+ for (var e2 = 0, i = t.length; e2 < i; e2++) Kn(this, t[e2]);
2483
2539
  return this.length;
2484
2540
  }
2485
2541
  pop() {
@@ -2575,7 +2631,7 @@ var ni = class s2 {
2575
2631
  let n = [];
2576
2632
  for (let o2 = 0; r && o2 < e2; o2++) n.push(r.value), r = this.removeNode(r);
2577
2633
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
2578
- for (let o2 of i) r = Bn(this, r, o2);
2634
+ for (let o2 of i) r = Zn(this, r, o2);
2579
2635
  return n;
2580
2636
  }
2581
2637
  reverse() {
@@ -2587,14 +2643,14 @@ var ni = class s2 {
2587
2643
  return this.head = e2, this.tail = t, this;
2588
2644
  }
2589
2645
  };
2590
- function Bn(s3, t, e2) {
2646
+ function Zn(s3, t, e2) {
2591
2647
  let i = t, r = t ? t.next : s3.head, n = new ue2(e2, i, r, s3);
2592
2648
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
2593
2649
  }
2594
- function Pn(s3, t) {
2650
+ function Yn(s3, t) {
2595
2651
  s3.tail = new ue2(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
2596
2652
  }
2597
- function zn(s3, t) {
2653
+ function Kn(s3, t) {
2598
2654
  s3.head = new ue2(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
2599
2655
  }
2600
2656
  var ue2 = class {
@@ -2606,41 +2662,43 @@ var ue2 = class {
2606
2662
  this.list = r, this.value = t, e2 ? (e2.next = this, this.prev = e2) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
2607
2663
  }
2608
2664
  };
2609
- var di = class {
2665
+ var pi = class {
2610
2666
  path;
2611
2667
  absolute;
2612
2668
  entry;
2613
2669
  stat;
2614
2670
  readdir;
2615
2671
  pending = false;
2672
+ pendingLink = false;
2616
2673
  ignore = false;
2617
2674
  piped = false;
2618
2675
  constructor(t, e2) {
2619
2676
  this.path = t || "./", this.absolute = e2;
2620
2677
  }
2621
2678
  };
2622
- var tr = Buffer.alloc(1024);
2623
- var oi = /* @__PURE__ */ Symbol("onStat");
2679
+ var nr = Buffer.alloc(1024);
2680
+ var li = /* @__PURE__ */ Symbol("onStat");
2624
2681
  var me = /* @__PURE__ */ Symbol("ended");
2625
2682
  var W2 = /* @__PURE__ */ Symbol("queue");
2626
- var Ct = /* @__PURE__ */ Symbol("current");
2683
+ var pe = /* @__PURE__ */ Symbol("pendingLinks");
2684
+ var Et = /* @__PURE__ */ Symbol("current");
2627
2685
  var Ft = /* @__PURE__ */ Symbol("process");
2628
- var pe = /* @__PURE__ */ Symbol("processing");
2629
- var rs = /* @__PURE__ */ Symbol("processJob");
2686
+ var Ee = /* @__PURE__ */ Symbol("processing");
2687
+ var ai = /* @__PURE__ */ Symbol("processJob");
2630
2688
  var G3 = /* @__PURE__ */ Symbol("jobs");
2631
- var ns = /* @__PURE__ */ Symbol("jobDone");
2632
- var hi = /* @__PURE__ */ Symbol("addFSEntry");
2633
- var er = /* @__PURE__ */ Symbol("addTarEntry");
2634
- var as = /* @__PURE__ */ Symbol("stat");
2635
- var ls = /* @__PURE__ */ Symbol("readdir");
2636
- var ai = /* @__PURE__ */ Symbol("onreaddir");
2637
- var li = /* @__PURE__ */ Symbol("pipe");
2638
- var ir = /* @__PURE__ */ Symbol("entry");
2639
- var os = /* @__PURE__ */ Symbol("entryOpt");
2640
- var ci = /* @__PURE__ */ Symbol("writeEntryClass");
2641
- var rr = /* @__PURE__ */ Symbol("write");
2642
- var hs = /* @__PURE__ */ Symbol("ondrain");
2643
- var Et = class extends D2 {
2689
+ var ls = /* @__PURE__ */ Symbol("jobDone");
2690
+ var ci = /* @__PURE__ */ Symbol("addFSEntry");
2691
+ var or = /* @__PURE__ */ Symbol("addTarEntry");
2692
+ var ds = /* @__PURE__ */ Symbol("stat");
2693
+ var us = /* @__PURE__ */ Symbol("readdir");
2694
+ var fi = /* @__PURE__ */ Symbol("onreaddir");
2695
+ var di = /* @__PURE__ */ Symbol("pipe");
2696
+ var hr = /* @__PURE__ */ Symbol("entry");
2697
+ var cs = /* @__PURE__ */ Symbol("entryOpt");
2698
+ var ui = /* @__PURE__ */ Symbol("writeEntryClass");
2699
+ var lr = /* @__PURE__ */ Symbol("write");
2700
+ var fs = /* @__PURE__ */ Symbol("ondrain");
2701
+ var wt = class extends A2 {
2644
2702
  sync = false;
2645
2703
  opt;
2646
2704
  cwd;
@@ -2661,22 +2719,23 @@ var Et = class extends D2 {
2661
2719
  mtime;
2662
2720
  filter;
2663
2721
  jobs;
2664
- [ci];
2722
+ [ui];
2665
2723
  onWriteEntry;
2666
2724
  [W2];
2725
+ [pe] = /* @__PURE__ */ new Map();
2667
2726
  [G3] = 0;
2668
- [pe] = false;
2727
+ [Ee] = false;
2669
2728
  [me] = false;
2670
2729
  constructor(t = {}) {
2671
- if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f3(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de2, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
2730
+ if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f3(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ui] = de2, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
2672
2731
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
2673
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe2(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
2732
+ if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
2674
2733
  let e2 = this.zip;
2675
- e2.on("data", (i) => super.write(i)), e2.on("end", () => super.end()), e2.on("drain", () => this[hs]()), this.on("resume", () => e2.resume());
2676
- } else this.on("drain", this[hs]);
2677
- this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W2] = new ni(), this[G3] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
2734
+ e2.on("data", (i) => super.write(i)), e2.on("end", () => super.end()), e2.on("drain", () => this[fs]()), this.on("resume", () => e2.resume());
2735
+ } else this.on("drain", this[fs]);
2736
+ this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W2] = new hi(), this[G3] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[me] = false;
2678
2737
  }
2679
- [rr](t) {
2738
+ [lr](t) {
2680
2739
  return super.write(t);
2681
2740
  }
2682
2741
  add(t) {
@@ -2687,97 +2746,112 @@ var Et = class extends D2 {
2687
2746
  }
2688
2747
  write(t) {
2689
2748
  if (this[me]) throw new Error("write after end");
2690
- return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
2749
+ return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
2691
2750
  }
2692
- [er](t) {
2751
+ [or](t) {
2693
2752
  let e2 = f3(import_path3.default.resolve(this.cwd, t.path));
2694
2753
  if (!this.filter(t.path, t)) t.resume();
2695
2754
  else {
2696
- let i = new di(t.path, e2);
2697
- i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G3] += 1, this[W2].push(i);
2755
+ let i = new pi(t.path, e2);
2756
+ i.entry = new oi(t, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G3] += 1, this[W2].push(i);
2698
2757
  }
2699
2758
  this[Ft]();
2700
2759
  }
2701
- [hi](t) {
2760
+ [ci](t) {
2702
2761
  let e2 = f3(import_path3.default.resolve(this.cwd, t));
2703
- this[W2].push(new di(t, e2)), this[Ft]();
2762
+ this[W2].push(new pi(t, e2)), this[Ft]();
2704
2763
  }
2705
- [as](t) {
2764
+ [ds](t) {
2706
2765
  t.pending = true, this[G3] += 1;
2707
2766
  let e2 = this.follow ? "stat" : "lstat";
2708
2767
  import_fs2.default[e2](t.absolute, (i, r) => {
2709
- t.pending = false, this[G3] -= 1, i ? this.emit("error", i) : this[oi](t, r);
2768
+ t.pending = false, this[G3] -= 1, i ? this.emit("error", i) : this[li](t, r);
2710
2769
  });
2711
2770
  }
2712
- [oi](t, e2) {
2713
- this.statCache.set(t.absolute, e2), t.stat = e2, this.filter(t.path, e2) ? e2.isFile() && e2.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e2.dev}:${e2.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
2771
+ [li](t, e2) {
2772
+ if (this.statCache.set(t.absolute, e2), t.stat = e2, !this.filter(t.path, e2)) t.ignore = true;
2773
+ else if (e2.isFile() && e2.nlink > 1 && !this.linkCache.get(`${e2.dev}:${e2.ino}`) && !this.sync) if (t === this[Et]) this[ai](t);
2774
+ else {
2775
+ let i = `${e2.dev}:${e2.ino}`, r = this[pe].get(i);
2776
+ r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
2777
+ }
2778
+ this[Ft]();
2714
2779
  }
2715
- [ls](t) {
2780
+ [us](t) {
2716
2781
  t.pending = true, this[G3] += 1, import_fs2.default.readdir(t.absolute, (e2, i) => {
2717
2782
  if (t.pending = false, this[G3] -= 1, e2) return this.emit("error", e2);
2718
- this[ai](t, i);
2783
+ this[fi](t, i);
2719
2784
  });
2720
2785
  }
2721
- [ai](t, e2) {
2786
+ [fi](t, e2) {
2722
2787
  this.readdirCache.set(t.absolute, e2), t.readdir = e2, this[Ft]();
2723
2788
  }
2724
2789
  [Ft]() {
2725
- if (!this[pe]) {
2726
- this[pe] = true;
2727
- for (let t = this[W2].head; t && this[G3] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
2790
+ if (!this[Ee]) {
2791
+ this[Ee] = true;
2792
+ for (let t = this[W2].head; t && this[G3] < this.jobs; t = t.next) if (this[ai](t.value), t.value.ignore) {
2728
2793
  let e2 = t.next;
2729
2794
  this[W2].removeNode(t), t.next = e2;
2730
2795
  }
2731
- this[pe] = false, this[me] && this[W2].length === 0 && this[G3] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
2796
+ this[Ee] = false, this[me] && this[W2].length === 0 && this[G3] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
2732
2797
  }
2733
2798
  }
2734
- get [Ct]() {
2799
+ get [Et]() {
2735
2800
  return this[W2] && this[W2].head && this[W2].head.value;
2736
2801
  }
2737
- [ns](t) {
2738
- this[W2].shift(), this[G3] -= 1, this[Ft]();
2802
+ [ls](t) {
2803
+ this[W2].shift(), this[G3] -= 1;
2804
+ let { stat: e2 } = t;
2805
+ if (e2 && e2.isFile() && e2.nlink > 1) {
2806
+ let i = `${e2.dev}:${e2.ino}`, r = this[pe].get(i);
2807
+ if (r) {
2808
+ this[pe].delete(i);
2809
+ for (let n of r) n.pending = false, this[ai](n);
2810
+ }
2811
+ }
2812
+ this[Ft]();
2739
2813
  }
2740
- [rs](t) {
2741
- if (!t.pending) {
2814
+ [ai](t) {
2815
+ if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
2742
2816
  if (t.entry) {
2743
- t === this[Ct] && !t.piped && this[li](t);
2817
+ t === this[Et] && !t.piped && this[di](t);
2744
2818
  return;
2745
2819
  }
2746
2820
  if (!t.stat) {
2747
2821
  let e2 = this.statCache.get(t.absolute);
2748
- e2 ? this[oi](t, e2) : this[as](t);
2822
+ e2 ? this[li](t, e2) : this[ds](t);
2749
2823
  }
2750
2824
  if (t.stat && !t.ignore) {
2751
2825
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
2752
2826
  let e2 = this.readdirCache.get(t.absolute);
2753
- if (e2 ? this[ai](t, e2) : this[ls](t), !t.readdir) return;
2827
+ if (e2 ? this[fi](t, e2) : this[us](t), !t.readdir) return;
2754
2828
  }
2755
- if (t.entry = this[ir](t), !t.entry) {
2829
+ if (t.entry = this[hr](t), !t.entry) {
2756
2830
  t.ignore = true;
2757
2831
  return;
2758
2832
  }
2759
- t === this[Ct] && !t.piped && this[li](t);
2833
+ t === this[Et] && !t.piped && this[di](t);
2760
2834
  }
2761
2835
  }
2762
2836
  }
2763
- [os](t) {
2837
+ [cs](t) {
2764
2838
  return { onwarn: (e2, i, r) => this.warn(e2, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
2765
2839
  }
2766
- [ir](t) {
2840
+ [hr](t) {
2767
2841
  this[G3] += 1;
2768
2842
  try {
2769
- return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
2843
+ return new this[ui](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
2770
2844
  } catch (e2) {
2771
2845
  this.emit("error", e2);
2772
2846
  }
2773
2847
  }
2774
- [hs]() {
2775
- this[Ct] && this[Ct].entry && this[Ct].entry.resume();
2848
+ [fs]() {
2849
+ this[Et] && this[Et].entry && this[Et].entry.resume();
2776
2850
  }
2777
- [li](t) {
2851
+ [di](t) {
2778
2852
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
2779
2853
  let n = t.path, o2 = n === "./" ? "" : n.replace(/\/*$/, "/");
2780
- this[hi](o2 + r);
2854
+ this[ci](o2 + r);
2781
2855
  });
2782
2856
  let e2 = t.entry, i = this.zip;
2783
2857
  if (!e2) throw new Error("cannot pipe without source");
@@ -2791,137 +2865,137 @@ var Et = class extends D2 {
2791
2865
  return this.zip && this.zip.pause(), super.pause();
2792
2866
  }
2793
2867
  warn(t, e2, i = {}) {
2794
- Lt(this, t, e2, i);
2868
+ Dt(this, t, e2, i);
2795
2869
  }
2796
2870
  };
2797
- var kt = class extends Et {
2871
+ var kt = class extends wt {
2798
2872
  sync = true;
2799
2873
  constructor(t) {
2800
- super(t), this[ci] = si;
2874
+ super(t), this[ui] = ni;
2801
2875
  }
2802
2876
  pause() {
2803
2877
  }
2804
2878
  resume() {
2805
2879
  }
2806
- [as](t) {
2880
+ [ds](t) {
2807
2881
  let e2 = this.follow ? "statSync" : "lstatSync";
2808
- this[oi](t, import_fs2.default[e2](t.absolute));
2882
+ this[li](t, import_fs2.default[e2](t.absolute));
2809
2883
  }
2810
- [ls](t) {
2811
- this[ai](t, import_fs2.default.readdirSync(t.absolute));
2884
+ [us](t) {
2885
+ this[fi](t, import_fs2.default.readdirSync(t.absolute));
2812
2886
  }
2813
- [li](t) {
2887
+ [di](t) {
2814
2888
  let e2 = t.entry, i = this.zip;
2815
2889
  if (t.readdir && t.readdir.forEach((r) => {
2816
2890
  let n = t.path, o2 = n === "./" ? "" : n.replace(/\/*$/, "/");
2817
- this[hi](o2 + r);
2891
+ this[ci](o2 + r);
2818
2892
  }), !e2) throw new Error("Cannot pipe without source");
2819
2893
  i ? e2.on("data", (r) => {
2820
2894
  i.write(r);
2821
2895
  }) : e2.on("data", (r) => {
2822
- super[rr](r);
2896
+ super[lr](r);
2823
2897
  });
2824
2898
  }
2825
2899
  };
2826
- var Un = (s3, t) => {
2900
+ var Vn = (s3, t) => {
2827
2901
  let e2 = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
2828
- e2.pipe(i), or(e2, t);
2902
+ e2.pipe(i), fr(e2, t);
2829
2903
  };
2830
- var Hn = (s3, t) => {
2831
- let e2 = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
2904
+ var $n = (s3, t) => {
2905
+ let e2 = new wt(s3), i = new et2(s3.file, { mode: s3.mode || 438 });
2832
2906
  e2.pipe(i);
2833
2907
  let r = new Promise((n, o2) => {
2834
2908
  i.on("error", o2), i.on("close", n), e2.on("error", o2);
2835
2909
  });
2836
- return hr(e2, t).catch((n) => e2.emit("error", n)), r;
2910
+ return dr(e2, t).catch((n) => e2.emit("error", n)), r;
2837
2911
  };
2838
- var or = (s3, t) => {
2912
+ var fr = (s3, t) => {
2839
2913
  t.forEach((e2) => {
2840
- e2.charAt(0) === "@" ? It({ file: import_node_path.default.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
2914
+ e2.charAt(0) === "@" ? Ct({ file: import_node_path.default.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
2841
2915
  }), s3.end();
2842
2916
  };
2843
- var hr = async (s3, t) => {
2844
- for (let e2 of t) e2.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => {
2917
+ var dr = async (s3, t) => {
2918
+ for (let e2 of t) e2.charAt(0) === "@" ? await Ct({ file: import_node_path.default.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => {
2845
2919
  s3.add(i);
2846
2920
  } }) : s3.add(e2);
2847
2921
  s3.end();
2848
2922
  };
2849
- var Wn = (s3, t) => {
2923
+ var Xn = (s3, t) => {
2850
2924
  let e2 = new kt(s3);
2851
- return or(e2, t), e2;
2925
+ return fr(e2, t), e2;
2852
2926
  };
2853
- var Gn = (s3, t) => {
2854
- let e2 = new Et(s3);
2855
- return hr(e2, t).catch((i) => e2.emit("error", i)), e2;
2927
+ var qn = (s3, t) => {
2928
+ let e2 = new wt(s3);
2929
+ return dr(e2, t).catch((i) => e2.emit("error", i)), e2;
2856
2930
  };
2857
- var Zn = K3(Un, Hn, Wn, Gn, (s3, t) => {
2931
+ var Qn = K3(Vn, $n, Xn, qn, (s3, t) => {
2858
2932
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
2859
2933
  });
2860
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
2861
- var fr = Yn === "win32";
2862
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = import_fs4.default.constants;
2863
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs4.default.constants.UV_FS_O_FILEMAP || 0;
2864
- var Kn = fr && !!pr;
2865
- var Vn = 512 * 1024;
2866
- var $n = pr | ur | dr | mr;
2867
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
2868
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
2869
- var fs = (s3, t, e2) => {
2934
+ var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
2935
+ var Er = Jn === "win32";
2936
+ var { O_CREAT: wr, O_NOFOLLOW: ur, O_TRUNC: Sr, O_WRONLY: yr } = import_fs4.default.constants;
2937
+ var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs4.default.constants.UV_FS_O_FILEMAP || 0;
2938
+ var jn = Er && !!Rr;
2939
+ var to = 512 * 1024;
2940
+ var eo = Rr | Sr | wr | yr;
2941
+ var mr = !Er && typeof ur == "number" ? ur | Sr | wr | yr : null;
2942
+ var ms = mr !== null ? () => mr : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
2943
+ var ps = (s3, t, e2) => {
2870
2944
  try {
2871
2945
  return import_node_fs4.default.lchownSync(s3, t, e2);
2872
2946
  } catch (i) {
2873
2947
  if (i?.code !== "ENOENT") throw i;
2874
2948
  }
2875
2949
  };
2876
- var ui = (s3, t, e2, i) => {
2950
+ var Ei = (s3, t, e2, i) => {
2877
2951
  import_node_fs4.default.lchown(s3, t, e2, (r) => {
2878
2952
  i(r && r?.code !== "ENOENT" ? r : null);
2879
2953
  });
2880
2954
  };
2881
- var Xn = (s3, t, e2, i, r) => {
2882
- if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e2, i, (n) => {
2955
+ var io = (s3, t, e2, i, r) => {
2956
+ if (t.isDirectory()) Es(import_node_path6.default.resolve(s3, t.name), e2, i, (n) => {
2883
2957
  if (n) return r(n);
2884
2958
  let o2 = import_node_path6.default.resolve(s3, t.name);
2885
- ui(o2, e2, i, r);
2959
+ Ei(o2, e2, i, r);
2886
2960
  });
2887
2961
  else {
2888
2962
  let n = import_node_path6.default.resolve(s3, t.name);
2889
- ui(n, e2, i, r);
2963
+ Ei(n, e2, i, r);
2890
2964
  }
2891
2965
  };
2892
- var ds = (s3, t, e2, i) => {
2966
+ var Es = (s3, t, e2, i) => {
2893
2967
  import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
2894
2968
  if (r) {
2895
2969
  if (r.code === "ENOENT") return i();
2896
2970
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
2897
2971
  }
2898
- if (r || !n.length) return ui(s3, t, e2, i);
2972
+ if (r || !n.length) return Ei(s3, t, e2, i);
2899
2973
  let o2 = n.length, h3 = null, a = (l) => {
2900
2974
  if (!h3) {
2901
2975
  if (l) return i(h3 = l);
2902
- if (--o2 === 0) return ui(s3, t, e2, i);
2976
+ if (--o2 === 0) return Ei(s3, t, e2, i);
2903
2977
  }
2904
2978
  };
2905
- for (let l of n) Xn(s3, l, t, e2, a);
2979
+ for (let l of n) io(s3, l, t, e2, a);
2906
2980
  });
2907
2981
  };
2908
- var qn = (s3, t, e2, i) => {
2909
- t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e2, i), fs(import_node_path6.default.resolve(s3, t.name), e2, i);
2982
+ var so = (s3, t, e2, i) => {
2983
+ t.isDirectory() && ws(import_node_path6.default.resolve(s3, t.name), e2, i), ps(import_node_path6.default.resolve(s3, t.name), e2, i);
2910
2984
  };
2911
- var us = (s3, t, e2) => {
2985
+ var ws = (s3, t, e2) => {
2912
2986
  let i;
2913
2987
  try {
2914
2988
  i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
2915
2989
  } catch (r) {
2916
2990
  let n = r;
2917
2991
  if (n?.code === "ENOENT") return;
2918
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs(s3, t, e2);
2992
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t, e2);
2919
2993
  throw n;
2920
2994
  }
2921
- for (let r of i) qn(s3, r, t, e2);
2922
- return fs(s3, t, e2);
2995
+ for (let r of i) so(s3, r, t, e2);
2996
+ return ps(s3, t, e2);
2923
2997
  };
2924
- var we = class extends Error {
2998
+ var Se = class extends Error {
2925
2999
  path;
2926
3000
  code;
2927
3001
  syscall = "chdir";
@@ -2932,7 +3006,7 @@ var we = class extends Error {
2932
3006
  return "CwdError";
2933
3007
  }
2934
3008
  };
2935
- var wt = class extends Error {
3009
+ var St = class extends Error {
2936
3010
  path;
2937
3011
  symlink;
2938
3012
  syscall = "symlink";
@@ -2944,97 +3018,97 @@ var wt = class extends Error {
2944
3018
  return "SymlinkError";
2945
3019
  }
2946
3020
  };
2947
- var Qn = (s3, t) => {
3021
+ var no = (s3, t) => {
2948
3022
  import_node_fs5.default.stat(s3, (e2, i) => {
2949
- (e2 || !i.isDirectory()) && (e2 = new we(s3, e2?.code || "ENOTDIR")), t(e2);
3023
+ (e2 || !i.isDirectory()) && (e2 = new Se(s3, e2?.code || "ENOTDIR")), t(e2);
2950
3024
  });
2951
3025
  };
2952
- var Er = (s3, t, e2) => {
3026
+ var gr = (s3, t, e2) => {
2953
3027
  s3 = f3(s3);
2954
- let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o2 = t.uid, h3 = t.gid, a = typeof o2 == "number" && typeof h3 == "number" && (o2 !== t.processUid || h3 !== t.processGid), l = t.preserve, c2 = t.unlink, d2 = f3(t.cwd), S2 = (E3, x3) => {
2955
- E3 ? e2(E3) : x3 && a ? ds(x3, o2, h3, (xe) => S2(xe)) : n ? import_node_fs5.default.chmod(s3, r, e2) : e2();
3028
+ let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o2 = t.uid, h3 = t.gid, a = typeof o2 == "number" && typeof h3 == "number" && (o2 !== t.processUid || h3 !== t.processGid), l = t.preserve, c2 = t.unlink, d2 = f3(t.cwd), y2 = (E3, x3) => {
3029
+ E3 ? e2(E3) : x3 && a ? Es(x3, o2, h3, (Le) => y2(Le)) : n ? import_node_fs5.default.chmod(s3, r, e2) : e2();
2956
3030
  };
2957
- if (s3 === d2) return Qn(s3, S2);
2958
- if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E3) => S2(null, E3 ?? void 0), S2);
2959
- let N2 = f3(import_node_path7.default.relative(d2, s3)).split("/");
2960
- ms(d2, N2, r, c2, d2, void 0, S2);
3031
+ if (s3 === d2) return no(s3, y2);
3032
+ if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E3) => y2(null, E3 ?? void 0), y2);
3033
+ let D2 = f3(import_node_path7.default.relative(d2, s3)).split("/");
3034
+ Ss(d2, D2, r, c2, d2, void 0, y2);
2961
3035
  };
2962
- var ms = (s3, t, e2, i, r, n, o2) => {
3036
+ var Ss = (s3, t, e2, i, r, n, o2) => {
2963
3037
  if (t.length === 0) return o2(null, n);
2964
3038
  let h3 = t.shift(), a = f3(import_node_path7.default.resolve(s3 + "/" + h3));
2965
- import_node_fs5.default.mkdir(a, e2, wr(a, t, e2, i, r, n, o2));
3039
+ import_node_fs5.default.mkdir(a, e2, br(a, t, e2, i, r, n, o2));
2966
3040
  };
2967
- var wr = (s3, t, e2, i, r, n, o2) => (h3) => {
3041
+ var br = (s3, t, e2, i, r, n, o2) => (h3) => {
2968
3042
  h3 ? import_node_fs5.default.lstat(s3, (a, l) => {
2969
3043
  if (a) a.path = a.path && f3(a.path), o2(a);
2970
- else if (l.isDirectory()) ms(s3, t, e2, i, r, n, o2);
3044
+ else if (l.isDirectory()) Ss(s3, t, e2, i, r, n, o2);
2971
3045
  else if (i) import_node_fs5.default.unlink(s3, (c2) => {
2972
3046
  if (c2) return o2(c2);
2973
- import_node_fs5.default.mkdir(s3, e2, wr(s3, t, e2, i, r, n, o2));
3047
+ import_node_fs5.default.mkdir(s3, e2, br(s3, t, e2, i, r, n, o2));
2974
3048
  });
2975
3049
  else {
2976
- if (l.isSymbolicLink()) return o2(new wt(s3, s3 + "/" + t.join("/")));
3050
+ if (l.isSymbolicLink()) return o2(new St(s3, s3 + "/" + t.join("/")));
2977
3051
  o2(h3);
2978
3052
  }
2979
- }) : (n = n || s3, ms(s3, t, e2, i, r, n, o2));
3053
+ }) : (n = n || s3, Ss(s3, t, e2, i, r, n, o2));
2980
3054
  };
2981
- var Jn = (s3) => {
3055
+ var oo = (s3) => {
2982
3056
  let t = false, e2;
2983
3057
  try {
2984
3058
  t = import_node_fs5.default.statSync(s3).isDirectory();
2985
3059
  } catch (i) {
2986
3060
  e2 = i?.code;
2987
3061
  } finally {
2988
- if (!t) throw new we(s3, e2 ?? "ENOTDIR");
3062
+ if (!t) throw new Se(s3, e2 ?? "ENOTDIR");
2989
3063
  }
2990
3064
  };
2991
- var Sr = (s3, t) => {
3065
+ var _r = (s3, t) => {
2992
3066
  s3 = f3(s3);
2993
3067
  let e2 = t.umask ?? 18, i = t.mode | 448, r = (i & e2) !== 0, n = t.uid, o2 = t.gid, h3 = typeof n == "number" && typeof o2 == "number" && (n !== t.processUid || o2 !== t.processGid), a = t.preserve, l = t.unlink, c2 = f3(t.cwd), d2 = (E3) => {
2994
- E3 && h3 && us(E3, n, o2), r && import_node_fs5.default.chmodSync(s3, i);
3068
+ E3 && h3 && ws(E3, n, o2), r && import_node_fs5.default.chmodSync(s3, i);
2995
3069
  };
2996
- if (s3 === c2) return Jn(c2), d2();
3070
+ if (s3 === c2) return oo(c2), d2();
2997
3071
  if (a) return d2(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
2998
- let T3 = f3(import_node_path7.default.relative(c2, s3)).split("/"), N2;
3072
+ let T3 = f3(import_node_path7.default.relative(c2, s3)).split("/"), D2;
2999
3073
  for (let E3 = T3.shift(), x3 = c2; E3 && (x3 += "/" + E3); E3 = T3.shift()) {
3000
3074
  x3 = f3(import_node_path7.default.resolve(x3));
3001
3075
  try {
3002
- import_node_fs5.default.mkdirSync(x3, i), N2 = N2 || x3;
3076
+ import_node_fs5.default.mkdirSync(x3, i), D2 = D2 || x3;
3003
3077
  } catch {
3004
- let xe = import_node_fs5.default.lstatSync(x3);
3005
- if (xe.isDirectory()) continue;
3078
+ let Le = import_node_fs5.default.lstatSync(x3);
3079
+ if (Le.isDirectory()) continue;
3006
3080
  if (l) {
3007
- import_node_fs5.default.unlinkSync(x3), import_node_fs5.default.mkdirSync(x3, i), N2 = N2 || x3;
3081
+ import_node_fs5.default.unlinkSync(x3), import_node_fs5.default.mkdirSync(x3, i), D2 = D2 || x3;
3008
3082
  continue;
3009
- } else if (xe.isSymbolicLink()) return new wt(x3, x3 + "/" + T3.join("/"));
3083
+ } else if (Le.isSymbolicLink()) return new St(x3, x3 + "/" + T3.join("/"));
3010
3084
  }
3011
3085
  }
3012
- return d2(N2);
3086
+ return d2(D2);
3013
3087
  };
3014
- var ps = /* @__PURE__ */ Object.create(null);
3015
- var yr = 1e4;
3016
- var $t = /* @__PURE__ */ new Set();
3017
- var Rr = (s3) => {
3018
- $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
3019
- let t = ps[s3], e2 = $t.size - yr;
3020
- if (e2 > yr / 10) {
3021
- for (let i of $t) if ($t.delete(i), delete ps[i], --e2 <= 0) break;
3088
+ var ys = /* @__PURE__ */ Object.create(null);
3089
+ var Or = 1e4;
3090
+ var Vt = /* @__PURE__ */ new Set();
3091
+ var Tr = (s3) => {
3092
+ Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
3093
+ let t = ys[s3], e2 = Vt.size - Or;
3094
+ if (e2 > Or / 10) {
3095
+ for (let i of Vt) if (Vt.delete(i), delete ys[i], --e2 <= 0) break;
3022
3096
  }
3023
3097
  return t;
3024
3098
  };
3025
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3026
- var eo = to === "win32";
3027
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e2, i) => {
3099
+ var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3100
+ var ao = ho === "win32";
3101
+ var lo = (s3) => s3.split("/").slice(0, -1).reduce((e2, i) => {
3028
3102
  let r = e2.at(-1);
3029
3103
  return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e2.push(i || "/"), e2;
3030
3104
  }, []);
3031
- var Ei = class {
3105
+ var yi = class {
3032
3106
  #t = /* @__PURE__ */ new Map();
3033
3107
  #i = /* @__PURE__ */ new Map();
3034
3108
  #s = /* @__PURE__ */ new Set();
3035
3109
  reserve(t, e2) {
3036
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(Rr(r))));
3037
- let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
3110
+ t = ao ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(Tr(r))));
3111
+ let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
3038
3112
  this.#i.set(e2, { dirs: i, paths: t });
3039
3113
  for (let r of t) {
3040
3114
  let n = this.#t.get(r);
@@ -3092,55 +3166,55 @@ var Ei = class {
3092
3166
  return this.#s.delete(t), n.forEach((o2) => this.#r(o2)), true;
3093
3167
  }
3094
3168
  };
3095
- var _r = () => process.umask();
3096
- var gr = /* @__PURE__ */ Symbol("onEntry");
3097
- var ys = /* @__PURE__ */ Symbol("checkFs");
3098
- var Or = /* @__PURE__ */ Symbol("checkFs2");
3099
- var Rs = /* @__PURE__ */ Symbol("isReusable");
3169
+ var Lr = () => process.umask();
3170
+ var Dr = /* @__PURE__ */ Symbol("onEntry");
3171
+ var _s = /* @__PURE__ */ Symbol("checkFs");
3172
+ var Nr = /* @__PURE__ */ Symbol("checkFs2");
3173
+ var Os = /* @__PURE__ */ Symbol("isReusable");
3100
3174
  var P3 = /* @__PURE__ */ Symbol("makeFs");
3101
- var bs = /* @__PURE__ */ Symbol("file");
3102
- var _s = /* @__PURE__ */ Symbol("directory");
3103
- var Si = /* @__PURE__ */ Symbol("link");
3104
- var Tr = /* @__PURE__ */ Symbol("symlink");
3105
- var xr = /* @__PURE__ */ Symbol("hardlink");
3106
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
3107
- var Lr = /* @__PURE__ */ Symbol("unsupported");
3108
- var Nr = /* @__PURE__ */ Symbol("checkPath");
3109
- var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
3110
- var St = /* @__PURE__ */ Symbol("mkdir");
3175
+ var Ts = /* @__PURE__ */ Symbol("file");
3176
+ var xs = /* @__PURE__ */ Symbol("directory");
3177
+ var gi = /* @__PURE__ */ Symbol("link");
3178
+ var Ar = /* @__PURE__ */ Symbol("symlink");
3179
+ var Ir = /* @__PURE__ */ Symbol("hardlink");
3180
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
3181
+ var Cr = /* @__PURE__ */ Symbol("unsupported");
3182
+ var Fr = /* @__PURE__ */ Symbol("checkPath");
3183
+ var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
3184
+ var yt = /* @__PURE__ */ Symbol("mkdir");
3111
3185
  var O3 = /* @__PURE__ */ Symbol("onError");
3112
- var wi = /* @__PURE__ */ Symbol("pending");
3113
- var Ar = /* @__PURE__ */ Symbol("pend");
3114
- var Xt = /* @__PURE__ */ Symbol("unpend");
3115
- var ws = /* @__PURE__ */ Symbol("ended");
3116
- var Ss = /* @__PURE__ */ Symbol("maybeClose");
3117
- var gs = /* @__PURE__ */ Symbol("skip");
3118
- var Re = /* @__PURE__ */ Symbol("doChown");
3186
+ var Ri = /* @__PURE__ */ Symbol("pending");
3187
+ var kr = /* @__PURE__ */ Symbol("pend");
3188
+ var $t = /* @__PURE__ */ Symbol("unpend");
3189
+ var gs = /* @__PURE__ */ Symbol("ended");
3190
+ var bs = /* @__PURE__ */ Symbol("maybeClose");
3191
+ var Ls = /* @__PURE__ */ Symbol("skip");
3192
+ var ge = /* @__PURE__ */ Symbol("doChown");
3119
3193
  var be = /* @__PURE__ */ Symbol("uid");
3120
3194
  var _e = /* @__PURE__ */ Symbol("gid");
3121
- var ge = /* @__PURE__ */ Symbol("checkedCwd");
3122
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3123
- var Oe = ro === "win32";
3124
- var no = 1024;
3125
- var oo = (s3, t) => {
3126
- if (!Oe) return import_node_fs3.default.unlink(s3, t);
3195
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
3196
+ var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3197
+ var Te = fo === "win32";
3198
+ var uo = 1024;
3199
+ var mo = (s3, t) => {
3200
+ if (!Te) return import_node_fs3.default.unlink(s3, t);
3127
3201
  let e2 = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
3128
3202
  import_node_fs3.default.rename(s3, e2, (i) => {
3129
3203
  if (i) return t(i);
3130
3204
  import_node_fs3.default.unlink(e2, t);
3131
3205
  });
3132
3206
  };
3133
- var ho = (s3) => {
3134
- if (!Oe) return import_node_fs3.default.unlinkSync(s3);
3207
+ var po = (s3) => {
3208
+ if (!Te) return import_node_fs3.default.unlinkSync(s3);
3135
3209
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
3136
3210
  import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
3137
3211
  };
3138
- var Dr = (s3, t, e2) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e2;
3139
- var qt = class extends st {
3140
- [ws] = false;
3141
- [ge] = false;
3142
- [wi] = 0;
3143
- reservations = new Ei();
3212
+ var vr = (s3, t, e2) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e2;
3213
+ var Xt = class extends rt {
3214
+ [gs] = false;
3215
+ [Oe] = false;
3216
+ [Ri] = 0;
3217
+ reservations = new yi();
3144
3218
  transform;
3145
3219
  writable = true;
3146
3220
  readable = false;
@@ -3167,32 +3241,32 @@ var qt = class extends st {
3167
3241
  chmod;
3168
3242
  constructor(t = {}) {
3169
3243
  if (t.ondone = () => {
3170
- this[ws] = true, this[Ss]();
3244
+ this[gs] = true, this[bs]();
3171
3245
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
3172
3246
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
3173
3247
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
3174
3248
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
3175
3249
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
3176
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f3(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e2) => this[gr](e2));
3250
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : uo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f3(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e2) => this[Dr](e2));
3177
3251
  }
3178
3252
  warn(t, e2, i = {}) {
3179
3253
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e2, i);
3180
3254
  }
3181
- [Ss]() {
3182
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
3255
+ [bs]() {
3256
+ this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
3183
3257
  }
3184
- [Es](t, e2) {
3258
+ [Rs](t, e2) {
3185
3259
  let i = t[e2], { type: r } = t;
3186
3260
  if (!i || this.preservePaths) return true;
3187
3261
  let [n, o2] = ce2(i), h3 = o2.replaceAll(/\\/g, "/").split("/");
3188
- if (h3.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h3[0] ?? "")) {
3262
+ if (h3.includes("..") || Te && /^[a-z]:\.\.$/i.test(h3[0] ?? "")) {
3189
3263
  if (e2 === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e2} contains '..'`, { entry: t, [e2]: i }), false;
3190
3264
  let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h3.join("/")));
3191
3265
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e2} escapes extraction directory`, { entry: t, [e2]: i }), false;
3192
3266
  }
3193
3267
  return n && (t[e2] = String(o2), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e2}`, { entry: t, [e2]: i })), true;
3194
3268
  }
3195
- [Nr](t) {
3269
+ [Fr](t) {
3196
3270
  let e2 = f3(t.path), i = e2.split("/");
3197
3271
  if (this.strip) {
3198
3272
  if (i.length < this.strip) return false;
@@ -3204,19 +3278,19 @@ var qt = class extends st {
3204
3278
  i.splice(0, this.strip), t.path = i.join("/");
3205
3279
  }
3206
3280
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e2, depth: i.length, maxDepth: this.maxDepth }), false;
3207
- if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
3281
+ if (!this[Rs](t, "path") || !this[Rs](t, "linkpath")) return false;
3208
3282
  if (t.absolute = import_node_path5.default.isAbsolute(t.path) ? f3(import_node_path5.default.resolve(t.path)) : f3(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f3(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
3209
3283
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
3210
3284
  if (this.win32) {
3211
3285
  let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
3212
- t.absolute = r + Xi(String(t.absolute).slice(r.length));
3286
+ t.absolute = r + ts(String(t.absolute).slice(r.length));
3213
3287
  let { root: n } = import_node_path5.default.win32.parse(t.path);
3214
- t.path = n + Xi(t.path.slice(n.length));
3288
+ t.path = n + ts(t.path.slice(n.length));
3215
3289
  }
3216
3290
  return true;
3217
3291
  }
3218
- [gr](t) {
3219
- if (!this[Nr](t)) return t.resume();
3292
+ [Dr](t) {
3293
+ if (!this[Fr](t)) return t.resume();
3220
3294
  switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
3221
3295
  case "Directory":
3222
3296
  case "GNUDumpDir":
@@ -3226,28 +3300,28 @@ var qt = class extends st {
3226
3300
  case "ContiguousFile":
3227
3301
  case "Link":
3228
3302
  case "SymbolicLink":
3229
- return this[ys](t);
3303
+ return this[_s](t);
3230
3304
  default:
3231
- return this[Lr](t);
3305
+ return this[Cr](t);
3232
3306
  }
3233
3307
  }
3234
3308
  [O3](t, e2) {
3235
- t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e2 }), this[Xt](), e2.resume());
3309
+ t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e2 }), this[$t](), e2.resume());
3236
3310
  }
3237
- [St](t, e2, i) {
3238
- Er(f3(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e2 }, i);
3311
+ [yt](t, e2, i) {
3312
+ gr(f3(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e2 }, i);
3239
3313
  }
3240
- [Re](t) {
3314
+ [ge](t) {
3241
3315
  return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
3242
3316
  }
3243
3317
  [be](t) {
3244
- return Dr(this.uid, t.uid, this.processUid);
3318
+ return vr(this.uid, t.uid, this.processUid);
3245
3319
  }
3246
3320
  [_e](t) {
3247
- return Dr(this.gid, t.gid, this.processGid);
3321
+ return vr(this.gid, t.gid, this.processGid);
3248
3322
  }
3249
- [bs](t, e2) {
3250
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
3323
+ [Ts](t, e2) {
3324
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et2(String(t.absolute), { flags: ms(t.size), mode: i, autoClose: false });
3251
3325
  r.on("error", (a) => {
3252
3326
  r.fd && import_node_fs3.default.close(r.fd, () => {
3253
3327
  }), r.write = () => true, this[O3](a, t), e2();
@@ -3259,7 +3333,7 @@ var qt = class extends st {
3259
3333
  return;
3260
3334
  }
3261
3335
  --n === 0 && r.fd !== void 0 && import_node_fs3.default.close(r.fd, (l) => {
3262
- l ? this[O3](l, t) : this[Xt](), e2();
3336
+ l ? this[O3](l, t) : this[$t](), e2();
3263
3337
  });
3264
3338
  };
3265
3339
  r.on("finish", () => {
@@ -3267,12 +3341,12 @@ var qt = class extends st {
3267
3341
  if (typeof l == "number" && t.mtime && !this.noMtime) {
3268
3342
  n++;
3269
3343
  let c2 = t.atime || /* @__PURE__ */ new Date(), d2 = t.mtime;
3270
- import_node_fs3.default.futimes(l, c2, d2, (S2) => S2 ? import_node_fs3.default.utimes(a, c2, d2, (T3) => o2(T3 && S2)) : o2());
3344
+ import_node_fs3.default.futimes(l, c2, d2, (y2) => y2 ? import_node_fs3.default.utimes(a, c2, d2, (T3) => o2(T3 && y2)) : o2());
3271
3345
  }
3272
- if (typeof l == "number" && this[Re](t)) {
3346
+ if (typeof l == "number" && this[ge](t)) {
3273
3347
  n++;
3274
3348
  let c2 = this[be](t), d2 = this[_e](t);
3275
- typeof c2 == "number" && typeof d2 == "number" && import_node_fs3.default.fchown(l, c2, d2, (S2) => S2 ? import_node_fs3.default.chown(a, c2, d2, (T3) => o2(T3 && S2)) : o2());
3349
+ typeof c2 == "number" && typeof d2 == "number" && import_node_fs3.default.fchown(l, c2, d2, (y2) => y2 ? import_node_fs3.default.chown(a, c2, d2, (T3) => o2(T3 && y2)) : o2());
3276
3350
  }
3277
3351
  o2();
3278
3352
  });
@@ -3281,76 +3355,76 @@ var qt = class extends st {
3281
3355
  this[O3](a, t), e2();
3282
3356
  }), t.pipe(h3)), h3.pipe(r);
3283
3357
  }
3284
- [_s](t, e2) {
3358
+ [xs](t, e2) {
3285
3359
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
3286
- this[St](String(t.absolute), i, (r) => {
3360
+ this[yt](String(t.absolute), i, (r) => {
3287
3361
  if (r) {
3288
3362
  this[O3](r, t), e2();
3289
3363
  return;
3290
3364
  }
3291
3365
  let n = 1, o2 = () => {
3292
- --n === 0 && (e2(), this[Xt](), t.resume());
3366
+ --n === 0 && (e2(), this[$t](), t.resume());
3293
3367
  };
3294
- t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o2)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o2)), o2();
3368
+ t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o2)), this[ge](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o2)), o2();
3295
3369
  });
3296
3370
  }
3297
- [Lr](t) {
3371
+ [Cr](t) {
3298
3372
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
3299
3373
  }
3300
- [Tr](t, e2) {
3374
+ [Ar](t, e2) {
3301
3375
  let i = f3(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
3302
- this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e2), (r) => {
3376
+ this[Re](t, this.cwd, i, () => this[gi](t, String(t.linkpath), "symlink", e2), (r) => {
3303
3377
  this[O3](r, t), e2();
3304
3378
  });
3305
3379
  }
3306
- [xr](t, e2) {
3380
+ [Ir](t, e2) {
3307
3381
  let i = f3(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f3(String(t.linkpath)).split("/");
3308
- this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e2), (n) => {
3382
+ this[Re](t, this.cwd, r, () => this[gi](t, i, "link", e2), (n) => {
3309
3383
  this[O3](n, t), e2();
3310
3384
  });
3311
3385
  }
3312
- [ye](t, e2, i, r, n) {
3386
+ [Re](t, e2, i, r, n) {
3313
3387
  let o2 = i.shift();
3314
3388
  if (this.preservePaths || o2 === void 0) return r();
3315
3389
  let h3 = import_node_path5.default.resolve(e2, o2);
3316
3390
  import_node_fs3.default.lstat(h3, (a, l) => {
3317
3391
  if (a) return r();
3318
- if (l?.isSymbolicLink()) return n(new wt(h3, import_node_path5.default.resolve(h3, i.join("/"))));
3319
- this[ye](t, h3, i, r, n);
3392
+ if (l?.isSymbolicLink()) return n(new St(h3, import_node_path5.default.resolve(h3, i.join("/"))));
3393
+ this[Re](t, h3, i, r, n);
3320
3394
  });
3321
3395
  }
3322
- [Ar]() {
3323
- this[wi]++;
3396
+ [kr]() {
3397
+ this[Ri]++;
3324
3398
  }
3325
- [Xt]() {
3326
- this[wi]--, this[Ss]();
3399
+ [$t]() {
3400
+ this[Ri]--, this[bs]();
3327
3401
  }
3328
- [gs](t) {
3329
- this[Xt](), t.resume();
3402
+ [Ls](t) {
3403
+ this[$t](), t.resume();
3330
3404
  }
3331
- [Rs](t, e2) {
3332
- return t.type === "File" && !this.unlink && e2.isFile() && e2.nlink <= 1 && !Oe;
3405
+ [Os](t, e2) {
3406
+ return t.type === "File" && !this.unlink && e2.isFile() && e2.nlink <= 1 && !Te;
3333
3407
  }
3334
- [ys](t) {
3335
- this[Ar]();
3408
+ [_s](t) {
3409
+ this[kr]();
3336
3410
  let e2 = [t.path];
3337
- t.linkpath && e2.push(t.linkpath), this.reservations.reserve(e2, (i) => this[Or](t, i));
3411
+ t.linkpath && e2.push(t.linkpath), this.reservations.reserve(e2, (i) => this[Nr](t, i));
3338
3412
  }
3339
- [Or](t, e2) {
3413
+ [Nr](t, e2) {
3340
3414
  let i = (h3) => {
3341
3415
  e2(h3);
3342
3416
  }, r = () => {
3343
- this[St](this.cwd, this.dmode, (h3) => {
3417
+ this[yt](this.cwd, this.dmode, (h3) => {
3344
3418
  if (h3) {
3345
3419
  this[O3](h3, t), i();
3346
3420
  return;
3347
3421
  }
3348
- this[ge] = true, n();
3422
+ this[Oe] = true, n();
3349
3423
  });
3350
3424
  }, n = () => {
3351
3425
  if (t.absolute !== this.cwd) {
3352
3426
  let h3 = f3(import_node_path5.default.dirname(String(t.absolute)));
3353
- if (h3 !== this.cwd) return this[St](h3, this.dmode, (a) => {
3427
+ if (h3 !== this.cwd) return this[yt](h3, this.dmode, (a) => {
3354
3428
  if (a) {
3355
3429
  this[O3](a, t), i();
3356
3430
  return;
@@ -3362,10 +3436,10 @@ var qt = class extends st {
3362
3436
  }, o2 = () => {
3363
3437
  import_node_fs3.default.lstat(String(t.absolute), (h3, a) => {
3364
3438
  if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
3365
- this[gs](t), i();
3439
+ this[Ls](t), i();
3366
3440
  return;
3367
3441
  }
3368
- if (h3 || this[Rs](t, a)) return this[P3](null, t, i);
3442
+ if (h3 || this[Os](t, a)) return this[P3](null, t, i);
3369
3443
  if (a.isDirectory()) {
3370
3444
  if (t.type === "Directory") {
3371
3445
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c2 = (d2) => this[P3](d2 ?? null, t, i);
@@ -3374,10 +3448,10 @@ var qt = class extends st {
3374
3448
  if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P3](l ?? null, t, i));
3375
3449
  }
3376
3450
  if (t.absolute === this.cwd) return this[P3](null, t, i);
3377
- oo(String(t.absolute), (l) => this[P3](l ?? null, t, i));
3451
+ mo(String(t.absolute), (l) => this[P3](l ?? null, t, i));
3378
3452
  });
3379
3453
  };
3380
- this[ge] ? n() : r();
3454
+ this[Oe] ? n() : r();
3381
3455
  }
3382
3456
  [P3](t, e2, i) {
3383
3457
  if (t) {
@@ -3388,65 +3462,65 @@ var qt = class extends st {
3388
3462
  case "File":
3389
3463
  case "OldFile":
3390
3464
  case "ContiguousFile":
3391
- return this[bs](e2, i);
3465
+ return this[Ts](e2, i);
3392
3466
  case "Link":
3393
- return this[xr](e2, i);
3467
+ return this[Ir](e2, i);
3394
3468
  case "SymbolicLink":
3395
- return this[Tr](e2, i);
3469
+ return this[Ar](e2, i);
3396
3470
  case "Directory":
3397
3471
  case "GNUDumpDir":
3398
- return this[_s](e2, i);
3472
+ return this[xs](e2, i);
3399
3473
  }
3400
3474
  }
3401
- [Si](t, e2, i, r) {
3475
+ [gi](t, e2, i, r) {
3402
3476
  import_node_fs3.default[i](e2, String(t.absolute), (n) => {
3403
- n ? this[O3](n, t) : (this[Xt](), t.resume()), r();
3477
+ n ? this[O3](n, t) : (this[$t](), t.resume()), r();
3404
3478
  });
3405
3479
  }
3406
3480
  };
3407
- var Se = (s3) => {
3481
+ var ye = (s3) => {
3408
3482
  try {
3409
3483
  return [null, s3()];
3410
3484
  } catch (t) {
3411
3485
  return [t, null];
3412
3486
  }
3413
3487
  };
3414
- var Te = class extends qt {
3488
+ var xe = class extends Xt {
3415
3489
  sync = true;
3416
3490
  [P3](t, e2) {
3417
3491
  return super[P3](t, e2, () => {
3418
3492
  });
3419
3493
  }
3420
- [ys](t) {
3421
- if (!this[ge]) {
3422
- let n = this[St](this.cwd, this.dmode);
3494
+ [_s](t) {
3495
+ if (!this[Oe]) {
3496
+ let n = this[yt](this.cwd, this.dmode);
3423
3497
  if (n) return this[O3](n, t);
3424
- this[ge] = true;
3498
+ this[Oe] = true;
3425
3499
  }
3426
3500
  if (t.absolute !== this.cwd) {
3427
3501
  let n = f3(import_node_path5.default.dirname(String(t.absolute)));
3428
3502
  if (n !== this.cwd) {
3429
- let o2 = this[St](n, this.dmode);
3503
+ let o2 = this[yt](n, this.dmode);
3430
3504
  if (o2) return this[O3](o2, t);
3431
3505
  }
3432
3506
  }
3433
- let [e2, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
3434
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
3435
- if (e2 || this[Rs](t, i)) return this[P3](null, t);
3507
+ let [e2, i] = ye(() => import_node_fs3.default.lstatSync(String(t.absolute)));
3508
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
3509
+ if (e2 || this[Os](t, i)) return this[P3](null, t);
3436
3510
  if (i.isDirectory()) {
3437
3511
  if (t.type === "Directory") {
3438
- let o2 = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h3] = o2 ? Se(() => {
3512
+ let o2 = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h3] = o2 ? ye(() => {
3439
3513
  import_node_fs3.default.chmodSync(String(t.absolute), Number(t.mode));
3440
3514
  }) : [];
3441
3515
  return this[P3](h3, t);
3442
3516
  }
3443
- let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
3517
+ let [n] = ye(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
3444
3518
  this[P3](n, t);
3445
3519
  }
3446
- let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
3520
+ let [r] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
3447
3521
  this[P3](r, t);
3448
3522
  }
3449
- [bs](t, e2) {
3523
+ [Ts](t, e2) {
3450
3524
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h3) => {
3451
3525
  let a;
3452
3526
  try {
@@ -3457,7 +3531,7 @@ var Te = class extends qt {
3457
3531
  (h3 || a) && this[O3](h3 || a, t), e2();
3458
3532
  }, n;
3459
3533
  try {
3460
- n = import_node_fs3.default.openSync(String(t.absolute), cs(t.size), i);
3534
+ n = import_node_fs3.default.openSync(String(t.absolute), ms(t.size), i);
3461
3535
  } catch (h3) {
3462
3536
  return r(h3);
3463
3537
  }
@@ -3482,7 +3556,7 @@ var Te = class extends qt {
3482
3556
  }
3483
3557
  }
3484
3558
  }
3485
- if (this[Re](t)) {
3559
+ if (this[ge](t)) {
3486
3560
  let a = this[be](t), l = this[_e](t);
3487
3561
  try {
3488
3562
  import_node_fs3.default.fchownSync(n, Number(a), Number(l));
@@ -3497,8 +3571,8 @@ var Te = class extends qt {
3497
3571
  r(h3);
3498
3572
  });
3499
3573
  }
3500
- [_s](t, e2) {
3501
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
3574
+ [xs](t, e2) {
3575
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
3502
3576
  if (r) {
3503
3577
  this[O3](r, t), e2();
3504
3578
  return;
@@ -3507,31 +3581,31 @@ var Te = class extends qt {
3507
3581
  import_node_fs3.default.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
3508
3582
  } catch {
3509
3583
  }
3510
- if (this[Re](t)) try {
3584
+ if (this[ge](t)) try {
3511
3585
  import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
3512
3586
  } catch {
3513
3587
  }
3514
3588
  e2(), t.resume();
3515
3589
  }
3516
- [St](t, e2) {
3590
+ [yt](t, e2) {
3517
3591
  try {
3518
- return Sr(f3(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e2 });
3592
+ return _r(f3(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e2 });
3519
3593
  } catch (i) {
3520
3594
  return i;
3521
3595
  }
3522
3596
  }
3523
- [ye](t, e2, i, r, n) {
3597
+ [Re](t, e2, i, r, n) {
3524
3598
  if (this.preservePaths || i.length === 0) return r();
3525
3599
  let o2 = e2;
3526
3600
  for (let h3 of i) {
3527
3601
  o2 = import_node_path5.default.resolve(o2, h3);
3528
- let [a, l] = Se(() => import_node_fs3.default.lstatSync(o2));
3602
+ let [a, l] = ye(() => import_node_fs3.default.lstatSync(o2));
3529
3603
  if (a) return r();
3530
- if (l.isSymbolicLink()) return n(new wt(o2, import_node_path5.default.resolve(e2, i.join("/"))));
3604
+ if (l.isSymbolicLink()) return n(new St(o2, import_node_path5.default.resolve(e2, i.join("/"))));
3531
3605
  }
3532
3606
  r();
3533
3607
  }
3534
- [Si](t, e2, i, r) {
3608
+ [gi](t, e2, i, r) {
3535
3609
  let n = `${i}Sync`;
3536
3610
  try {
3537
3611
  import_node_fs3.default[n](e2, String(t.absolute)), r(), t.resume();
@@ -3540,12 +3614,12 @@ var Te = class extends qt {
3540
3614
  }
3541
3615
  }
3542
3616
  };
3543
- var ao = (s3) => {
3544
- let t = new Te(s3), e2 = s3.file, i = import_node_fs2.default.statSync(e2), r = s3.maxReadSize || 16 * 1024 * 1024;
3545
- new Me(e2, { readSize: r, size: i.size }).pipe(t);
3617
+ var Eo = (s3) => {
3618
+ let t = new xe(s3), e2 = s3.file, i = import_node_fs2.default.statSync(e2), r = s3.maxReadSize || 16 * 1024 * 1024;
3619
+ new Be(e2, { readSize: r, size: i.size }).pipe(t);
3546
3620
  };
3547
- var lo = (s3, t) => {
3548
- let e2 = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
3621
+ var wo = (s3, t) => {
3622
+ let e2 = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
3549
3623
  return new Promise((o2, h3) => {
3550
3624
  e2.on("error", h3), e2.on("close", o2), import_node_fs2.default.stat(r, (a, l) => {
3551
3625
  if (a) h3(a);
@@ -3556,10 +3630,10 @@ var lo = (s3, t) => {
3556
3630
  });
3557
3631
  });
3558
3632
  };
3559
- var co = K3(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
3560
- t?.length && Ki(s3, t);
3633
+ var So = K3(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
3634
+ t?.length && Qi(s3, t);
3561
3635
  });
3562
- var fo = (s3, t) => {
3636
+ var yo = (s3, t) => {
3563
3637
  let e2 = new kt(s3), i = true, r, n;
3564
3638
  try {
3565
3639
  try {
@@ -3580,7 +3654,7 @@ var fo = (s3, t) => {
3580
3654
  if (n + l + 512 > o2.size) break;
3581
3655
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
3582
3656
  }
3583
- i = false, uo(s3, e2, n, r, t);
3657
+ i = false, Ro(s3, e2, n, r, t);
3584
3658
  } finally {
3585
3659
  if (i) try {
3586
3660
  import_node_fs6.default.closeSync(r);
@@ -3588,69 +3662,69 @@ var fo = (s3, t) => {
3588
3662
  }
3589
3663
  }
3590
3664
  };
3591
- var uo = (s3, t, e2, i, r) => {
3665
+ var Ro = (s3, t, e2, i, r) => {
3592
3666
  let n = new Wt(s3.file, { fd: i, start: e2 });
3593
- t.pipe(n), po(t, r);
3667
+ t.pipe(n), bo(t, r);
3594
3668
  };
3595
- var mo = (s3, t) => {
3669
+ var go = (s3, t) => {
3596
3670
  t = Array.from(t);
3597
- let e2 = new Et(s3), i = (n, o2, h3) => {
3598
- let a = (T3, N2) => {
3599
- T3 ? import_node_fs6.default.close(n, (E3) => h3(T3)) : h3(null, N2);
3671
+ let e2 = new wt(s3), i = (n, o2, h3) => {
3672
+ let a = (T3, D2) => {
3673
+ T3 ? import_node_fs6.default.close(n, (E3) => h3(T3)) : h3(null, D2);
3600
3674
  }, l = 0;
3601
3675
  if (o2 === 0) return a(null, 0);
3602
- let c2 = 0, d2 = Buffer.alloc(512), S2 = (T3, N2) => {
3603
- if (T3 || N2 === void 0) return a(T3);
3604
- if (c2 += N2, c2 < 512 && N2) return import_node_fs6.default.read(n, d2, c2, d2.length - c2, l + c2, S2);
3676
+ let c2 = 0, d2 = Buffer.alloc(512), y2 = (T3, D2) => {
3677
+ if (T3 || D2 === void 0) return a(T3);
3678
+ if (c2 += D2, c2 < 512 && D2) return import_node_fs6.default.read(n, d2, c2, d2.length - c2, l + c2, y2);
3605
3679
  if (l === 0 && d2[0] === 31 && d2[1] === 139) return a(new Error("cannot append to compressed archives"));
3606
3680
  if (c2 < 512) return a(null, l);
3607
3681
  let E3 = new F2(d2);
3608
3682
  if (!E3.cksumValid) return a(null, l);
3609
3683
  let x3 = 512 * Math.ceil((E3.size ?? 0) / 512);
3610
3684
  if (l + x3 + 512 > o2 || (l += x3 + 512, l >= o2)) return a(null, l);
3611
- s3.mtimeCache && E3.mtime && s3.mtimeCache.set(String(E3.path), E3.mtime), c2 = 0, import_node_fs6.default.read(n, d2, 0, 512, l, S2);
3685
+ s3.mtimeCache && E3.mtime && s3.mtimeCache.set(String(E3.path), E3.mtime), c2 = 0, import_node_fs6.default.read(n, d2, 0, 512, l, y2);
3612
3686
  };
3613
- import_node_fs6.default.read(n, d2, 0, 512, l, S2);
3687
+ import_node_fs6.default.read(n, d2, 0, 512, l, y2);
3614
3688
  };
3615
3689
  return new Promise((n, o2) => {
3616
3690
  e2.on("error", o2);
3617
3691
  let h3 = "r+", a = (l, c2) => {
3618
3692
  if (l && l.code === "ENOENT" && h3 === "r+") return h3 = "w+", import_node_fs6.default.open(s3.file, h3, a);
3619
3693
  if (l || !c2) return o2(l);
3620
- import_node_fs6.default.fstat(c2, (d2, S2) => {
3694
+ import_node_fs6.default.fstat(c2, (d2, y2) => {
3621
3695
  if (d2) return import_node_fs6.default.close(c2, () => o2(d2));
3622
- i(c2, S2.size, (T3, N2) => {
3696
+ i(c2, y2.size, (T3, D2) => {
3623
3697
  if (T3) return o2(T3);
3624
- let E3 = new tt(s3.file, { fd: c2, start: N2 });
3625
- e2.pipe(E3), E3.on("error", o2), E3.on("close", n), Eo(e2, t);
3698
+ let E3 = new et2(s3.file, { fd: c2, start: D2 });
3699
+ e2.pipe(E3), E3.on("error", o2), E3.on("close", n), _o(e2, t);
3626
3700
  });
3627
3701
  });
3628
3702
  };
3629
3703
  import_node_fs6.default.open(s3.file, h3, a);
3630
3704
  });
3631
3705
  };
3632
- var po = (s3, t) => {
3706
+ var bo = (s3, t) => {
3633
3707
  t.forEach((e2) => {
3634
- e2.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
3708
+ e2.charAt(0) === "@" ? Ct({ file: import_node_path9.default.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
3635
3709
  }), s3.end();
3636
3710
  };
3637
- var Eo = async (s3, t) => {
3638
- for (let e2 of t) e2.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
3711
+ var _o = async (s3, t) => {
3712
+ for (let e2 of t) e2.charAt(0) === "@" ? await Ct({ file: import_node_path9.default.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
3639
3713
  s3.end();
3640
3714
  };
3641
- var vt = K3(fo, mo, () => {
3715
+ var vt = K3(yo, go, () => {
3642
3716
  throw new TypeError("file is required");
3643
3717
  }, () => {
3644
3718
  throw new TypeError("file is required");
3645
3719
  }, (s3, t) => {
3646
- if (!Fs(s3)) throw new TypeError("file is required");
3720
+ if (!Bs(s3)) throw new TypeError("file is required");
3647
3721
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
3648
3722
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
3649
3723
  });
3650
- var wo = K3(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
3651
- vt.validate?.(s3, t), So(s3);
3724
+ var Oo = K3(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
3725
+ vt.validate?.(s3, t), To(s3);
3652
3726
  });
3653
- var So = (s3) => {
3727
+ var To = (s3) => {
3654
3728
  let t = s3.filter;
3655
3729
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e2, i) => t(e2, i) && !((s3.mtimeCache?.get(e2) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e2, i) => !((s3.mtimeCache?.get(e2) ?? i.mtime ?? 0) > (i.mtime ?? 0));
3656
3730
  };
@@ -4471,7 +4545,7 @@ async function downloadTemplate(template, targetDir) {
4471
4545
  if (!tarResponse.body) {
4472
4546
  throw new Error(`${url}: no body`);
4473
4547
  }
4474
- const extractor = co({
4548
+ const extractor = So({
4475
4549
  cwd: targetDir,
4476
4550
  strip: 1
4477
4551
  });